/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunkprint_designer"] = self["webpackChunkprint_designer"] || []).push([[816],{

/***/ 45816:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   PrintDesigner: function() { return /* reexport safe */ _src__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; },\n/* harmony export */   useInstallFontFamilyOnline: function() { return /* reexport safe */ _src_hooks_useInstallFontFamilyOnline__WEBPACK_IMPORTED_MODULE_2__.useInstallFontFamilyOnline; }\n/* harmony export */ });\n/* harmony import */ var _src_style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19600);\n/* harmony import */ var _src_style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_src_style_index_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _src__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90236);\n/* harmony import */ var _src_hooks_useInstallFontFamilyOnline__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42552);\n\n\n\n\n//# sourceURL=webpack://print-designer/./index.js?");

/***/ }),

/***/ 30936:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   DataMatrix: function() { return /* reexport safe */ _DataMatrix_png__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; },\n/* harmony export */   PDF417: function() { return /* reexport safe */ _PDF417_png__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; },\n/* harmony export */   QRCode: function() { return /* reexport safe */ _QRCode_png__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; },\n/* harmony export */   defaultQRCode: function() { return /* binding */ defaultQRCode; }\n/* harmony export */ });\n/* harmony import */ var _PDF417_png__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45896);\n/* harmony import */ var _DataMatrix_png__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97264);\n/* harmony import */ var _QRCode_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41480);\n\n\n\nvar defaultQRCode = _QRCode_png__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n\n//# sourceURL=webpack://print-designer/./src/components/base/qrCode/image/index.js?");

/***/ }),

/***/ 2248:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ FileNameModal; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _slate__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(29496);\n/* harmony import */ var _slate_history__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(44992);\n/* harmony import */ var _slate_react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(62620);\n/* harmony import */ var _assets_images_search_png__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(25812);\n/* harmony import */ var _utils_createData__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(76000);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction FileNameModal(_ref) {\n  var visible = _ref.visible,\n    onCancel = _ref.onCancel,\n    selectList = _ref.selectList,\n    fileName = _ref.fileName,\n    id = _ref.id;\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.DataContext);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState, 2),\n    errorTipShow = _useState2[0],\n    setErrorTipShow = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)([]),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState3, 2),\n    checkedNodes = _useState4[0],\n    setCheckedNodes = _useState4[1];\n  var dataRef = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)(null);\n  var className = 'grid-guide';\n  var specialStr = ['\\\\', '/', ':', '*', '?', '<', '>', '|'];\n  var isExistSpecialChar = function isExistSpecialChar(fileName) {\n    if (!(fileName !== null && fileName !== void 0 && fileName.length)) return;\n    return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_11___default()(fileName).call(fileName, function (item) {\n      return typeof item === 'string' && _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_11___default()(specialStr).call(specialStr, function (_char) {\n        return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12___default()(item).call(item, _char);\n      });\n    });\n  };\n  var handleCloseBtnClick = function handleCloseBtnClick() {\n    setErrorTipShow(false);\n    onCancel();\n  };\n  var onConfirm = function onConfirm() {\n    var _dataRef$current, _dataRef$current2;\n    var data = (_dataRef$current = dataRef.current) === null || _dataRef$current === void 0 ? void 0 : _dataRef$current.getFormulaData();\n    var len = (_dataRef$current2 = dataRef.current) === null || _dataRef$current2 === void 0 ? void 0 : _dataRef$current2.getDataLen();\n    if (len <= 100) {\n      if (isExistSpecialChar(data)) {\n        setErrorTipShow('existSpecialStr');\n      } else {\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.createUpdateAction)([[id, {\n          fileName: data\n        }]]));\n        handleCloseBtnClick();\n      }\n    } else {\n      setErrorTipShow(true);\n    }\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Modal, {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(ModalBody, {\n      checkable: true,\n      className: \"\".concat(className, \"-body\"),\n      errorTipShow: errorTipShow,\n      setErrorTipShow: setErrorTipShow,\n      checkedNodes: checkedNodes,\n      setCheckedNodes: setCheckedNodes,\n      selectList: selectList,\n      fileName: fileName,\n      ref: dataRef\n    }),\n    titleIcon: null,\n    maskClosable: false,\n    className: \"\".concat(className, \"-modal\"),\n    footer: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n      className: \"\".concat(className, \"-modal-footer-btns\")\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Button, {\n      onClick: handleCloseBtnClick,\n      type: \"second\",\n      className: \"\".concat(className, \"-modal-cancel-btn\")\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0011')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Button, {\n      className: \"\".concat(className, \"-modal-ok-btn\"),\n      type: \"primary\",\n      onClick: onConfirm\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0012')))),\n    width: 480,\n    height: 320,\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0121'),\n    closable: true,\n    destroyOnClose: true,\n    onCancel: handleCloseBtnClick,\n    onOk: handleCloseBtnClick,\n    mask: true,\n    visible: visible\n  });\n}\nvar ModalBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_16__.forwardRef)(function (props, ref) {\n  var expressionRef = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)();\n  var getFormulaData = function getFormulaData() {\n    var _expressionRef$curren;\n    return (_expressionRef$curren = expressionRef.current) === null || _expressionRef$curren === void 0 ? void 0 : _expressionRef$curren.getFormulaData();\n  };\n  var getDataLen = function getDataLen() {\n    var _expressionRef$curren2;\n    return (_expressionRef$curren2 = expressionRef.current) === null || _expressionRef$curren2 === void 0 ? void 0 : _expressionRef$curren2.getDataLen();\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useImperativeHandle)(ref, function () {\n    return {\n      getFormulaData: getFormulaData,\n      getDataLen: getDataLen\n    };\n  });\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useEffect)(function () {\n    expressionRef.current.onAutoFocus();\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(props.className, \" fileNameRoot\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(ExpressionView, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n    ref: expressionRef\n  }, props)));\n});\nModalBody.displayName = 'FileNameModalBody';\nvar ExpressionView = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_16__.forwardRef)(function (props, ref) {\n  var editor = (0,react__WEBPACK_IMPORTED_MODULE_16__.useMemo)(function () {\n    return withLabels((0,_slate_react__WEBPACK_IMPORTED_MODULE_21__.withReact)((0,_slate_history__WEBPACK_IMPORTED_MODULE_20__.withHistory)((0,_slate__WEBPACK_IMPORTED_MODULE_19__.createEditor)())));\n  }, []);\n  var fileName = props.fileName,\n    errorTipShow = props.errorTipShow,\n    className = props.className,\n    setErrorTipShow = props.setErrorTipShow;\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(false),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState5, 2),\n    dropdownVisible = _useState6[0],\n    setDropdownVisible = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(''),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState7, 2),\n    searchVal = _useState8[0],\n    setSearchVal = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(0),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState9, 2),\n    count = _useState10[0],\n    setCount = _useState10[1];\n  var tempSelection = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)(null);\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(function () {\n      if (fileName !== null && fileName !== void 0 && fileName.length) {\n        var newValue = [];\n        var data = {\n          type: 'paragraph',\n          children: [{\n            text: ''\n          }]\n        };\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(fileName).call(fileName, function (item, i) {\n          var isLast = i === fileName.length - 1;\n          isLast && newValue.push(_objectSpread({}, data));\n          typeof item === 'string' ? data.children.push({\n            text: item\n          }) : data.children.push({\n            text: ''\n          }, _objectSpread(_objectSpread({}, item), {}, {\n            type: 'label',\n            children: [{\n              text: ''\n            }]\n          }), {\n            text: ''\n          });\n          data = isLast ? {\n            type: 'paragraph',\n            children: []\n          } : data;\n        });\n        return newValue;\n      } else {\n        return [{\n          type: 'paragraph',\n          children: [{\n            text: ''\n          }]\n        }];\n      }\n    }),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState11, 2),\n    value = _useState12[0],\n    setValue = _useState12[1];\n  var selectList = (0,react__WEBPACK_IMPORTED_MODULE_16__.useMemo)(function () {\n    var _context;\n    return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(_context = props.selectList).call(_context, function (_ref2) {\n      var name = _ref2.name,\n        key = _ref2.key;\n      return _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(name).call(name, searchVal) !== -1 || _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(key).call(key, searchVal) !== -1;\n    });\n  }, [props.selectList, searchVal]);\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useEffect)(function () {\n    document.addEventListener('mousedown', handleMouseDown);\n    return function () {\n      document.removeEventListener('mousedown', handleMouseDown);\n    };\n  }, [dropdownVisible]);\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useImperativeHandle)(ref, function () {\n    return {\n      getFormulaData: getFormulaData,\n      onAutoFocus: onAutoFocus,\n      getDataLen: getDataLen\n    };\n  });\n  var getDataLen = function getDataLen(data) {\n    var _ref3 = (data === null || data === void 0 ? void 0 : data[0]) || (value === null || value === void 0 ? void 0 : value[0]),\n      children = _ref3.children;\n    var fileNameLen = 0;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(children).call(children, function () {\n      var _item$name;\n      var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n      var type = item.type,\n        text = item.text;\n      fileNameLen += type === 'label' ? item === null || item === void 0 || (_item$name = item.name) === null || _item$name === void 0 ? void 0 : _item$name.length : text === null || text === void 0 ? void 0 : text.length;\n    });\n    return fileNameLen;\n  };\n  var getFormulaData = function getFormulaData() {\n    var _context2;\n    var _ref4 = value[0] || {},\n      children = _ref4.children;\n    var fileName = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(children).call(children, function (item) {\n      var type = item.type,\n        text = item.text;\n      if (type === 'label') {\n        return item;\n      } else {\n        return text;\n      }\n    })).call(_context2, function (item) {\n      return item !== '';\n    });\n    return fileName;\n  };\n  var handleBtnClick = function handleBtnClick() {\n    setDropdownVisible(!dropdownVisible);\n  };\n  var handleMouseDown = function handleMouseDown(e) {\n    if (dropdownVisible) {\n      var currentEle = e.target;\n      var dropDownEle = document.getElementById('kdPrintDesignerFileNameList');\n      var btn = document.getElementById('kdPrintDesignerFileNameBtn');\n      if (!dropDownEle.contains(currentEle) && !btn.contains(currentEle)) {\n        setDropdownVisible(false);\n      }\n    }\n  };\n  var handleItemClick = function handleItemClick(key) {\n    insertLabel(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_11___default()(selectList).call(selectList, function (item) {\n      return key === item.key;\n    }));\n  };\n  var handleInputChange = function handleInputChange(e) {\n    var val = e.target.value;\n    setSearchVal(val);\n  };\n  var insertLabel = function insertLabel(_ref5) {\n    var name = _ref5.name,\n      key = _ref5.key,\n      type = _ref5.type;\n    if (!tempSelection.current) return;\n    _slate__WEBPACK_IMPORTED_MODULE_19__.Transforms.select(editor, tempSelection.current);\n    var labelNode = {\n      type: 'label',\n      name: name,\n      key: key,\n      textFormat: type,\n      children: [{\n        text: ''\n      }],\n      id: (0,_utils_createData__WEBPACK_IMPORTED_MODULE_23__.createUUid)()\n    };\n    _slate__WEBPACK_IMPORTED_MODULE_19__.Transforms.insertNodes(editor, labelNode);\n    _slate__WEBPACK_IMPORTED_MODULE_19__.Transforms.move(editor);\n    _slate_react__WEBPACK_IMPORTED_MODULE_21__.ReactEditor.focus(editor);\n  };\n  var onAutoFocus = function onAutoFocus() {\n    var _editor$children$, _editor$children$2;\n    var eleLength = (_editor$children$ = editor.children[0]) === null || _editor$children$ === void 0 || (_editor$children$ = _editor$children$.children) === null || _editor$children$ === void 0 ? void 0 : _editor$children$.length;\n    var offset = (_editor$children$2 = editor.children[0]) === null || _editor$children$2 === void 0 || (_editor$children$2 = _editor$children$2.children[eleLength - 1]) === null || _editor$children$2 === void 0 || (_editor$children$2 = _editor$children$2.text) === null || _editor$children$2 === void 0 ? void 0 : _editor$children$2.length;\n    var selectionCopy = {\n      anchor: {\n        path: [0, eleLength - 1],\n        offset: offset\n      },\n      focus: {\n        path: [0, eleLength - 1],\n        offset: offset\n      }\n    };\n    _slate__WEBPACK_IMPORTED_MODULE_19__.Transforms.select(editor, selectionCopy);\n    _slate_react__WEBPACK_IMPORTED_MODULE_21__.ReactEditor.focus(editor);\n  };\n  var menu = (0,react__WEBPACK_IMPORTED_MODULE_16__.useMemo)(function () {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Dropdown.Menu, {\n      id: \"kdPrintDesignerFileNameList\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n      className: \"searchInput\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Input, {\n      style: {\n        marginBottom: 8,\n        marginRight: 8,\n        paddingRight: 28\n      },\n      placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0115'),\n      borderType: \"bordered\",\n      onChange: handleInputChange\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n      className: \"image\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"img\", {\n      src: _assets_images_search_png__WEBPACK_IMPORTED_MODULE_22__[\"default\"]\n    }))), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(selectList).call(selectList, function (_ref6, i) {\n      var fileViewName = _ref6.fileViewName,\n        key = _ref6.key;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Dropdown.Item, {\n        className: \"\".concat(i === 0 ? 'firstItem' : ''),\n        key: key\n      }, \" \", fileViewName);\n    }), !selectList.length && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n      className: \"noData\"\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)(' printd.grid.key0116')));\n  }, [selectList]);\n  var renderElement = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (props) {\n    var type = props.element.type;\n    switch (type) {\n      case 'label':\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(LabelElement, props);\n      default:\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(DefaultElement, props);\n    }\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, errorTipShow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Alert, {\n    className: \"\".concat(className, \"-alert\"),\n    message: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)(errorTipShow !== 'existSpecialStr' ? 'printd.grid.key0117' : 'printd.grid.key0122'),\n    type: \"error\",\n    delayOffTime: 0,\n    closable: true,\n    showIcon: true,\n    onClose: function onClose() {\n      return setErrorTipShow(false);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"span\", {\n    className: \"fileName\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0118')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"editor\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_slate_react__WEBPACK_IMPORTED_MODULE_21__.Slate, {\n    value: value,\n    editor: editor,\n    onChange: function onChange(value) {\n      var len = getDataLen(value);\n      setCount(len);\n      setValue(value);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_slate_react__WEBPACK_IMPORTED_MODULE_21__.Editable, {\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0119'),\n    id: \"slate-editor\",\n    renderElement: renderElement,\n    onKeyDown: function onKeyDown(event) {\n      if (event.key === '(') {\n        event.preventDefault();\n        editor.insertText('()');\n        _slate__WEBPACK_IMPORTED_MODULE_19__.Transforms.move(editor, {\n          distance: 1,\n          unit: 'offset',\n          reverse: true\n        });\n      }\n    },\n    autoFocus: true,\n    onBlur: function onBlur(event) {\n      event.persist();\n      var relatedTarget = event.relatedTarget;\n      if ((relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.tagName) !== 'INPUT') {\n        var selection = editor.selection;\n        var selectionCopy = {};\n        for (var key in selection) {\n          var _selection$key = selection[key],\n            path = _selection$key.path,\n            offset = _selection$key.offset;\n          selectionCopy[key] = {\n            path: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15___default()(path).call(path, 0, 2),\n            offset: offset\n          };\n        }\n        tempSelection.current = selectionCopy;\n        _slate__WEBPACK_IMPORTED_MODULE_19__.Transforms.select(editor, selectionCopy);\n        _slate_react__WEBPACK_IMPORTED_MODULE_21__.ReactEditor.focus(editor);\n      }\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"count\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    class: \"kd-input-textarea-mark\"\n  }, \"\".concat(count, \"/100\"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Button, {\n    icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n      type: \"add\"\n    }),\n    onClick: handleBtnClick,\n    className: \"button-basic-left\",\n    style: {\n      marginTop: 8,\n      width: 85\n    },\n    id: \"kdPrintDesignerFileNameBtn\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0120')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"helpText\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0123'), \" \"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Dropdown, {\n    menu: menu,\n    visible: dropdownVisible,\n    onItemClick: handleItemClick\n  }));\n});\nExpressionView.displayName = 'FileNameExpressionView';\nfunction DefaultElement(props) {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"p\", props.attributes, props.children);\n}\nfunction withLabels(editor) {\n  var isVoid = editor.isVoid,\n    isInline = editor.isInline;\n  editor.isInline = function (element) {\n    return element.type === 'label' || isInline(element);\n  };\n  editor.isVoid = function (element) {\n    return element.type === 'label' || isVoid(element);\n  };\n  return editor;\n}\nfunction LabelElement(props) {\n  var selected = (0,_slate_react__WEBPACK_IMPORTED_MODULE_21__.useSelected)();\n  var focused = (0,_slate_react__WEBPACK_IMPORTED_MODULE_21__.useFocused)();\n  var textFormat = props.element.textFormat;\n  var backgroundColor = textFormat === 'Date' ? '#FFF1D4' : textFormat === 'Number' || textFormat === 'Amount' ? '#DCFAE4' : '#E0EFFF';\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"span\", (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, props.attributes, {\n    contentEditable: false,\n    style: {\n      padding: '1px 8px',\n      margin: '0 3px',\n      verticalAlign: 'baseline',\n      display: 'inline-block',\n      borderRadius: '2px',\n      backgroundColor: backgroundColor,\n      fontSize: '12px',\n      cursor: 'pointer',\n      boxShadow: selected && focused ? '0 0 0 2px #B4D5FF' : 'none',\n      lineHeight: '18px'\n    }\n  }), props.element.name, props.children);\n}\n\n//# sourceURL=webpack://print-designer/./src/components/common/fileName.jsx?");

/***/ }),

/***/ 26736:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   defaultTableBorder: function() { return /* binding */ defaultTableBorder; },\n/* harmony export */   lineHeightList: function() { return /* binding */ lineHeightList; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nvar lineHeightList = [{\n  value: '1.0',\n  label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xingjushezhi\",\n    itemTitle: \"1.0\",\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n  }),\n  title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n}, {\n  value: '1.15',\n  label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xingjushezhi\",\n    itemTitle: \"1.15\",\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n  }),\n  title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n}, {\n  value: '1.25',\n  label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xingjushezhi\",\n    itemTitle: \"1.25\",\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n  }),\n  title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n}, {\n  value: '1.5',\n  label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xingjushezhi\",\n    itemTitle: \"1.5\",\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n  }),\n  title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n}, {\n  value: '2.0',\n  label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xingjushezhi\",\n    itemTitle: \"2.0\",\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n  }),\n  title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0114')\n}];\nvar defaultTableBorder = {\n  color: {\n    top: '#000000',\n    left: '#000000',\n    bottom: '#000000',\n    right: '#000000',\n    inner: '#000000'\n  },\n  width: {\n    top: 0.5,\n    left: 0.5,\n    bottom: 0.5,\n    right: 0.5,\n    inner: 0.5\n  },\n  style: {\n    top: 'solid',\n    left: 'solid',\n    bottom: 'solid',\n    right: 'solid',\n    inner: 'solid'\n  }\n};\n\n//# sourceURL=webpack://print-designer/./src/views/center/constant.js?");

/***/ }),

/***/ 58012:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   SetStatistic: function() { return /* binding */ SetStatistic; }\n/* harmony export */ });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction SetStatistic(args, field) {\n  var key = args.Key,\n    value = args.Value;\n  var prop = {};\n  key = lodash__WEBPACK_IMPORTED_MODULE_0___default().camelCase(key);\n  value = lodash__WEBPACK_IMPORTED_MODULE_0___default().camelCase(value);\n  var viewText = field[key];\n  var statType = field[value];\n  if (!viewText) return prop;\n  if (!/\\S+\\((\\S+)\\)$/.test(viewText)) {\n    prop[key] = viewText.replace(/^\\=\\$(\\S+)/, \"=\".concat(statType, \"($1)\"));\n  } else {\n    if (statType === 'noStat') {\n      prop[key] = \"=$\".concat(viewText.replace(/\\S+\\((\\S+)\\)$/g, \"$1\"));\n    } else {\n      prop[key] = viewText.replace(/\\S+\\((\\S+)\\)$/g, \"=\".concat(statType, \"($1)\"));\n    }\n  }\n  return prop;\n}\n\n//# sourceURL=webpack://print-designer/./src/action/dataCell/index.ts?");

/***/ }),

/***/ 88584:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _dataCell_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58012);\n\n\n\n\nvar getCustomActions = function getCustomActions() {\n  var actionMap = {\n    dataActions: [],\n    propertyActions: []\n  };\n  var dataActionList = [[_dataCell_index__WEBPACK_IMPORTED_MODULE_3__, 'DataCell']];\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(dataActionList).call(dataActionList, function (_ref) {\n    var _context;\n    var _ref2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, 2),\n      actions = _ref2[0],\n      controlType = _ref2[1];\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(actions)).call(_context, function (actionName) {\n      actionMap.dataActions.push([actionName, actions[actionName], controlType]);\n    });\n  });\n  return actionMap;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (getCustomActions);\n\n//# sourceURL=webpack://print-designer/./src/action/index.ts?");

/***/ }),

/***/ 64492:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_barCode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(68776);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69900);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\nvar KDBarCode = function KDBarCode(props) {\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.CanvasSelectContext);\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var gridState = dataGridContext.gridState;\n  var id = data.id;\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      beforeMouseDown: (0,_hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__.useBeforeGridChildItemMouseDown)(gridState),\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_barCode__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDBarCode);\n\n//# sourceURL=webpack://print-designer/./src/components/KDBarCode.tsx?");

/***/ }),

/***/ 10420:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_footer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(95920);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\nvar KDFooter = function KDFooter(props) {\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.PrintRootContext),\n    dataContext = _useContext.dataContext,\n    _useContext$scale = _useContext.scale,\n    scale = _useContext$scale === void 0 ? 1 : _useContext$scale;\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var id = data.id;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.CanvasSelectContext);\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  var childItems = dataContext.findControlByCondition(function (item) {\n    return item.parentId === id;\n  }) || [];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_footer__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    scale: scale,\n    childItems: childItems,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDFooter);\n\n//# sourceURL=webpack://print-designer/./src/components/KDFooter.tsx?");

/***/ }),

/***/ 21191:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_gridFooter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(77072);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\nvar TableTail = function TableTail(props) {\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.PrintRootContext),\n    dataContext = _useContext.dataContext,\n    _useContext$scale = _useContext.scale,\n    scale = _useContext$scale === void 0 ? 1 : _useContext$scale;\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var id = data.id;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.CanvasSelectContext);\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  var childItems = dataContext.findControlByCondition(function (item) {\n    return item.parentId === id;\n  }) || [];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_gridFooter__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    scale: scale,\n    childItems: childItems,\n    activedSelectId: activedSelectId,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (TableTail);\n\n//# sourceURL=webpack://print-designer/./src/components/KDGridFooter.tsx?");

/***/ }),

/***/ 68432:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_header__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(97108);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\nvar KDHeader = function KDHeader(props) {\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.PrintRootContext),\n    dataContext = _useContext.dataContext,\n    _useContext$scale = _useContext.scale,\n    scale = _useContext$scale === void 0 ? 1 : _useContext$scale;\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var id = data.id;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_14__.CanvasSelectContext);\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  var childItems = dataContext.findControlByCondition(function (item) {\n    return item.parentId === id;\n  }) || [];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_header__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    scale: scale,\n    childItems: childItems,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDHeader);\n\n//# sourceURL=webpack://print-designer/./src/components/KDHeader.tsx?");

/***/ }),

/***/ 4496:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_image__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(57340);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69900);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\nvar KDImage = function KDImage(props) {\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.CanvasSelectContext);\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var gridState = dataGridContext.gridState;\n  var id = data.id;\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      beforeMouseDown: (0,_hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__.useBeforeGridChildItemMouseDown)(gridState),\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_image__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDImage);\n\n//# sourceURL=webpack://print-designer/./src/components/KDImage.tsx?");

/***/ }),

/***/ 61376:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_Line__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75340);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69900);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\nvar KDLine = function KDLine(props) {\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.CanvasSelectContext);\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var gridState = dataGridContext.gridState;\n  var id = data.id;\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      beforeMouseDown: (0,_hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__.useBeforeGridChildItemMouseDown)(gridState),\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_Line__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDLine);\n\n//# sourceURL=webpack://print-designer/./src/components/KDLine.tsx?");

/***/ }),

/***/ 47944:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_qrCode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30852);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69900);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\nvar KDQrCode = function KDQrCode(props) {\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.CanvasSelectContext);\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var gridState = dataGridContext.gridState;\n  var id = data.id;\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      beforeMouseDown: (0,_hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__.useBeforeGridChildItemMouseDown)(gridState),\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_qrCode__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDQrCode);\n\n//# sourceURL=webpack://print-designer/./src/components/KDQrCode.tsx?");

/***/ }),

/***/ 59812:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_richText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(22088);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69900);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\nvar KDRichText = function KDRichText(props) {\n  var data = props.data;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.CanvasSelectContext);\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var gridState = dataGridContext.gridState;\n  var id = data.id;\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      beforeMouseDown: (0,_hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__.useBeforeGridChildItemMouseDown)(gridState),\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_richText__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, componentData, {\n    dataKey: dataKey,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDRichText);\n\n//# sourceURL=webpack://print-designer/./src/components/KDRichText.tsx?");

/***/ }),

/***/ 94028:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _base_textField__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33404);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(69900);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\nvar KDTextField = function KDTextField(props) {\n  // 实际上这里也有个context\n  var data = props.data,\n    children = props.children,\n    meta = props.meta;\n  // 这里需要添加数据处理, 由KD层管理并下发\n  // 添加应该在这里处理? 还是root层处理\n  // 这里拿不到 context 奇怪\n  // const context = useContext(PrintDesignerContext)\n  // const {\n  //   selectionContext,\n  //   dataContext\n  // } = context\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(data, _excluded);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.CanvasSelectContext);\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_11__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var gridState = dataGridContext.gridState;\n  var id = data.id;\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_13__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      beforeMouseDown: (0,_hooks_useBeforeGridChildItemMouseDown__WEBPACK_IMPORTED_MODULE_14__.useBeforeGridChildItemMouseDown)(gridState),\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n\n  // const activedSelectId = useSelected(context)\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(_base_textField__WEBPACK_IMPORTED_MODULE_12__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n    id: id\n  }, componentData, {\n    dataKey: dataKey,\n    isLastSelected: isLastSelected,\n    isSelected: isSelected,\n    handleMouseDown: handleMouseDown\n  }), children);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDTextField);\n\n//# sourceURL=webpack://print-designer/./src/components/KDTextField.tsx?");

/***/ }),

/***/ 75340:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(37520);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(86020);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(5668);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(84945);\n/* harmony import */ var _hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(3260);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98092);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41232);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(20100);\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"id\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\", \"direction\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Line = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_5__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_5__.forwardRef)(function (props, forwardedRef) {\n  var _context, _context2, _context3, _context4, _context5, _context6, _context7;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_5__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_16__.PrintRootContext);\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio,\n    setMessage = context.setMessage;\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_5__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_16__.DataGridContext);\n  var gridState = dataGridContext.gridState,\n    _dataGridContext$isEd = dataGridContext.isEditorGridState,\n    isEditorGridState = _dataGridContext$isEd === void 0 ? true : _dataGridContext$isEd;\n  var gridItemDoubleClick = (0,_hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_17__.useGridChildItemDoubleClick)();\n  var lineHitStrokeWidth = 20;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    id = props.id,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    direction = props.direction,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, _excluded);\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_12__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      id: id\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_10__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: false\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_11__.useHover)({\n      strokeEnabled: strokeEnabled,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var heightToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_15__.useGetControlRenderSizeProp)(height, scale, 2);\n  var widthToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_15__.useGetControlRenderSizeProp)(width, scale, 2);\n  var containerWidth = widthToPx;\n  var containerHeight = heightToPx;\n  var titleHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(7, scale);\n  var textHeight = heightToPx - titleHeight;\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(y, scale);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_13__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_14__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      width = _ref.width,\n      height = _ref.height;\n    // if (scaleX === 1 && scaleY === 1) return\n    // const newWidth = width * scaleX\n    // const newHeight = height * scaleY\n\n    var newX = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(x, scale);\n    var newY = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(y, scale);\n    var newWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(width, scale, 2);\n    var newHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(height, scale, 2);\n    var updateContext = {\n      x: newX,\n      y: newY,\n      width: newWidth,\n      height: newHeight\n    };\n    if (direction === _constants_index__WEBPACK_IMPORTED_MODULE_18__.HORIZONTAL && newHeight > _constants_index__WEBPACK_IMPORTED_MODULE_18__.MAX_LINE_HEIGHT_MM) {\n      updateContext.height = _constants_index__WEBPACK_IMPORTED_MODULE_18__.MAX_LINE_HEIGHT_MM;\n      delete updateContext.y;\n      setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_7__.getLangMsg)('printd.grid.key0130'));\n    }\n    if (direction === _constants_index__WEBPACK_IMPORTED_MODULE_18__.VERTICAL && newWidth > _constants_index__WEBPACK_IMPORTED_MODULE_18__.MAX_LINE_HEIGHT_MM) {\n      updateContext.width = _constants_index__WEBPACK_IMPORTED_MODULE_18__.MAX_LINE_HEIGHT_MM;\n      delete updateContext.x;\n      setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_7__.getLangMsg)('printd.grid.key0130'));\n    }\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_7__.createUpdateAction)([[id, updateContext]]));\n  }, [id, scale, direction]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_8__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_9__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n  var color = border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_3___default()(border.color)).call(_context, function (c) {\n    return c;\n  })[0];\n  var lineType = border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_3___default()(border.style)).call(_context2, function (t) {\n    return t;\n  })[0];\n  var dash;\n  if (lineType === _constants_index__WEBPACK_IMPORTED_MODULE_18__.DASH_CU) {\n    dash = [2, 2];\n  } else if (lineType === _constants_index__WEBPACK_IMPORTED_MODULE_18__.DASH_XI) {\n    dash = [4, 4];\n  }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement((react__WEBPACK_IMPORTED_MODULE_5___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_6__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: -lineHitStrokeWidth / 2,\n    clipY: -lineHitStrokeWidth / 2,\n    clipWidth: containerWidth + lineHitStrokeWidth,\n    clipHeight: containerHeight + lineHitStrokeWidth,\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    onMouseDown: handleMouseDown,\n    onDblClick: function onDblClick(e) {\n      if (gridItemDoubleClick(e, gridState, handleMouseDown)) return null;\n    },\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    draggable: isEditorGridState,\n    dragBoundFunc: dragBoundFunc,\n    id: id,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(_context4 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_18__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_18__.SCALE_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_18__.NORMAL_NODE_CLASSNAME)\n    // rotation={direction === HORIZONTAL ? 0 : 90}\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_6__.Line, {\n    x: 0,\n    y: 0,\n    stroke: color || _constants_index__WEBPACK_IMPORTED_MODULE_18__.DEFAULT_LINE_COLOR,\n    strokeWidth: direction === 'H' ? containerHeight : containerWidth,\n    points: direction === 'H' ? [0, containerHeight / 2, containerWidth, containerHeight / 2] : [containerWidth / 2, containerHeight, containerWidth / 2, 0],\n    dash: dash,\n    hitStrokeWidth: lineHitStrokeWidth\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_6__.Rect, {\n    id: \"\".concat(id, \"_rect\"),\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(_context6 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(_context7 = \"\".concat(id, \" \")).call(_context7, _constants_index__WEBPACK_IMPORTED_MODULE_18__.SCALE_NODE_CLASSNAME, \" \")).call(_context6, _constants_index__WEBPACK_IMPORTED_MODULE_18__.NORMAL_NODE_CLASSNAME, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_18__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: true\n  })));\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_20__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (Line);\n\n//# sourceURL=webpack://print-designer/./src/components/base/Line/index.tsx?");

/***/ }),

/***/ 68776:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(84945);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(37520);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(86020);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5668);\n/* harmony import */ var _hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(3260);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(71420);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(41232);\n/* harmony import */ var _common_baseImage__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9172);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(2680);\n/* harmony import */ var _default_png__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(24708);\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"bindField\", \"encodeMode\", \"showLabel\", \"rotate\", \"id\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction generateRandomCode() {\n  var arr = [];\n  while (arr.length < 13) {\n    var num = Math.floor(Math.random() * 10);\n    arr.push(num);\n  }\n  return arr.join('');\n}\n\n// 二维码控件\nvar BaseImage = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.forwardRef)(function (props, forwardedRef) {\n  var _context, _context2, _context3, _context4, _context5, _context6;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_4__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_7__.PrintRootContext);\n  var randomCode = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(function () {\n    return generateRandomCode();\n  })[0];\n  var selectionContext = context.selectionContext;\n  var selection = selectionContext.getSelection();\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_4__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_7__.DataGridContext);\n  var gridState = dataGridContext.gridState,\n    _dataGridContext$isEd = dataGridContext.isEditorGridState,\n    isEditorGridState = _dataGridContext$isEd === void 0 ? true : _dataGridContext$isEd;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var gridItemDoubleClick = (0,_hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_14__.useGridChildItemDoubleClick)();\n  var smallBillWidth = 48;\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.console.log(context, context.refLineRef.searchRefLines);\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    bindField = props.bindField,\n    encodeMode = props.encodeMode,\n    showLabel = props.showLabel,\n    rotate = props.rotate,\n    id = props.id,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, _excluded);\n\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_8__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    // refs: gridState ? [] : [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      bindField: bindField,\n      encodeMode: encodeMode,\n      showLabel: showLabel,\n      rotate: rotate,\n      id: id\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_10__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_15__.useHover)({\n      strokeEnabled: strokeEnabled,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var imageSrc = _default_png__WEBPACK_IMPORTED_MODULE_20__[\"default\"];\n  var heightToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_13__.useGetControlRenderSizeProp)(height, scale);\n  var widthToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_13__.useGetControlRenderSizeProp)(width, scale);\n  var containerWidth = widthToPx;\n  var containerHeight = heightToPx;\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(y, scale);\n  var rotateProps = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    return {\n      rotation: Number(rotate) || 0\n    };\n  }, [rotate]);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_9__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_12__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      width = _ref.width,\n      height = _ref.height;\n    // if (scaleX === 1 && scaleY === 1) return\n    // const newWidth = width * scaleX\n    // const newHeight = height * scaleY\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(y, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(width, scale),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(height, scale)\n    }]]));\n  }, [id, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_11__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_16__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n  var labelProps = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    var rotation = Number(rotate);\n    var fontSize = Math.min(widthToPx / 9, heightToPx * 0.3);\n    if (rotation === 90 || rotation === 270) {\n      fontSize = Math.min(heightToPx / 9, widthToPx * 0.3);\n      return {\n        width: heightToPx,\n        height: fontSize * 1.2,\n        fontSize: fontSize\n      };\n    }\n    return {\n      width: widthToPx,\n      height: fontSize * 1.2,\n      fontSize: fontSize\n    };\n  }, [rotate, widthToPx, heightToPx]);\n  var getImageSize = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function () {\n    var rotation = Number(rotate);\n    if (rotation === 90 || rotation === 270) {\n      return {\n        width: height,\n        height: !showLabel ? width : (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(widthToPx - labelProps.height)\n      };\n    }\n    return {\n      width: width,\n      height: !showLabel ? height : (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(heightToPx - labelProps.height)\n    };\n  }, [width, height, showLabel, rotate]);\n  var codeX = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    var rotation = Number(rotate);\n    switch (rotation) {\n      case 90:\n        return widthToPx;\n      case 180:\n        return widthToPx;\n      case 270:\n        return 0;\n      default:\n        return 0;\n    }\n  }, [rotate, widthToPx, heightToPx]);\n  var codeY = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    var rotation = Number(rotate);\n    switch (rotation) {\n      case 90:\n        return 0;\n      case 180:\n        return heightToPx;\n      case 270:\n        return heightToPx;\n      default:\n        return 0;\n    }\n  }, [rotate, widthToPx, heightToPx]);\n  var textX = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    var rotation = Number(rotate);\n    switch (rotation) {\n      case 90:\n        return labelProps.height;\n      case 180:\n        return widthToPx;\n      case 270:\n        return widthToPx - labelProps.height;\n      default:\n        return 0;\n    }\n  }, [rotate, widthToPx, heightToPx]);\n  var textY = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    var rotation = Number(rotate);\n    switch (rotation) {\n      case 90:\n        return 0;\n      case 180:\n        return labelProps.height;\n      case 270:\n        return heightToPx;\n      default:\n        return heightToPx - labelProps.height;\n    }\n  }, [rotate, widthToPx, heightToPx]);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.console.log('labelProps', labelProps);\n  var bizType = context.dataContext.getData().bizType;\n  // const fontStyle = [italic && 'italic', bold && 'bold'].filter(Boolean).join(',')\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    onMouseDown: handleMouseDown,\n    onDblClick: function onDblClick(e) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.console.log('image onDblClick');\n      if (gridItemDoubleClick(e, gridState, handleMouseDown)) return;\n    },\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    dragBoundFunc: dragBoundFunc,\n    id: id,\n    draggable: isEditorGridState,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_6__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context2, _constants_index__WEBPACK_IMPORTED_MODULE_6__.SCALE_NODE_CLASSNAME, \" \")).call(_context, _constants_index__WEBPACK_IMPORTED_MODULE_6__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Group, {\n    x: 0,\n    y: 0,\n    height: containerHeight,\n    width: containerWidth,\n    name: _constants_index__WEBPACK_IMPORTED_MODULE_6__.CONTAINER_NODE_CLASSNAME\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_common_baseImage__WEBPACK_IMPORTED_MODULE_18__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    getImageSize: getImageSize,\n    src: imageSrc,\n    scale: scale,\n    x: bizType === '1' ? (containerWidth - (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(smallBillWidth, scale)) / 2 || 0 : codeX,\n    width: bizType === '1' ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(smallBillWidth) : undefined,\n    y: codeY\n  }, rotateProps)), showLabel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Text, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, labelProps, {\n    x: textX,\n    y: textY,\n    text: randomCode,\n    fill: \"#000\",\n    verticalAlign: \"middle\",\n    align: \"center\",\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_6__.NORMAL_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_6__.TEXT_NODE_CLASSNAME),\n    hitStrokeWidth: 0\n  }, rotateProps))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Rect, {\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context6 = \"\".concat(id, \" \")).call(_context6, _constants_index__WEBPACK_IMPORTED_MODULE_6__.SCALE_NODE_CLASSNAME, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_6__.NORMAL_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_6__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: strokeEnabled\n  }), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_19__[\"default\"], transformerProps));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (BaseImage);\n\n//# sourceURL=webpack://print-designer/./src/components/base/barCode/index.tsx?");

/***/ }),

/***/ 95920:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(5668);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n/* harmony import */ var _factory_parseUIControl__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(23312);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(98092);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(2680);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41232);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(20100);\n\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"id\", \"childItems\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// 页脚控件\nvar BaseFooter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_7__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_7__.forwardRef)(function (props, forwardedRef) {\n  var _context4, _context5, _context6, _context7, _context8;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_7__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var selectionContext = context.selectionContext,\n    dataContext = context.dataContext,\n    pageWidth = context.pageWidth,\n    pageHeight = context.pageHeight;\n  var selection = selectionContext.getSelection();\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log(context, context.refLineRef.searchRefLines);\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    id = props.id,\n    _props$childItems = props.childItems,\n    childItems = _props$childItems === void 0 ? [] : _props$childItems,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, _excluded);\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_13__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      id: id,\n      childItems: childItems\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_11__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_12__.useHover)({\n      strokeEnabled: true,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var heightToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_14__.useGetControlRenderSizeProp)(height, scale);\n  var widthToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_14__.useGetControlRenderSizeProp)(width, scale);\n  var containerWidth = widthToPx;\n  var containerHeight = heightToPx;\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(y, scale);\n  var onDragEndAction = (0,react__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y;\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(y, scale)\n    }]]));\n  }, [id, scale]);\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_7__.useCallback)(function (_ref2) {\n    var _context, _context2, _context3;\n    var x = _ref2.x,\n      y = _ref2.y,\n      scaleX = _ref2.scaleX,\n      scaleY = _ref2.scaleY,\n      footerWidth = _ref2.width,\n      footerHeight = _ref2.height;\n    var rootId = dataContext.getRootId();\n    var childControls = dataContext.findControlByCondition(function (item) {\n      return item.parentId === id;\n    });\n    var transformHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(footerHeight, scale);\n    var transformWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(footerWidth, scale);\n    var minHeight = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default()(childControls).call(childControls, function (calcHeight, control) {\n      var height = control.height;\n      return height > calcHeight ? height : calcHeight;\n    }, 5);\n    if (transformWidth !== pageWidth) {\n      transformWidth = pageWidth;\n    }\n    if (transformHeight <= minHeight) {\n      transformHeight = Math.min(minHeight, 80);\n    } else if (transformHeight > 80) {\n      transformHeight = 80;\n    }\n    var childUpdateValues = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_4___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(childControls).call(childControls, function (item) {\n      var y = item.y,\n        height = item.height,\n        childId = item.id;\n      if (y + height > transformHeight) {\n        return [childId, {\n          y: transformHeight - height\n        }];\n      }\n      return null;\n    })).call(_context, Boolean);\n    var otherControls = dataContext.findControlByCondition(function (item) {\n      var y = item.y,\n        type = item.type,\n        height = item.height,\n        parentId = item.parentId;\n      return type !== 'Header' && type !== 'Footer' && parentId === rootId && y + height > pageHeight - transformHeight;\n    });\n    var updateControlValues = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_5___default()(_context2 = otherControls || []).call(_context2, function (item) {\n      return [item.id, {\n        y: pageHeight - transformHeight - item.height\n      }];\n    });\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context3 = [[id, {\n      x: 0,\n      width: transformWidth,\n      height: transformHeight\n    }]]).call(_context3, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(updateControlValues), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(childUpdateValues))));\n  }, [id, pageWidth, pageHeight, dataContext, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_9__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      parentId: props.ParentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_10__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    dataContext: dataContext,\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n\n  // const fontStyle = [italic && 'italic', bold && 'bold'].filter(Boolean).join(',')\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default().createElement((react__WEBPACK_IMPORTED_MODULE_7___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_8__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth\n    // onDragStart={onDragStart}\n    // onDragMove={onDragMove}\n    // onDragEnd={onDragEnd}\n    ,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    draggable: false,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    id: id,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context5 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_17__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_17__.SCALE_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_17__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_8__.Text, {\n    height: containerHeight,\n    width: containerWidth,\n    x: 0,\n    y: 0,\n    text: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0030'),\n    fill: \"#E5E5E5\",\n    verticalAlign: \"middle\",\n    align: \"center\",\n    name: \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_17__.NORMAL_NODE_CLASSNAME),\n    fontSize: 18,\n    hitStrokeWidth: 0\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_8__.Rect, {\n    id: \"\".concat(id, \"_rect\"),\n    x: 0,\n    y: 0,\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context6 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context7 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context8 = \"\".concat(id, \" \")).call(_context8, _constants_index__WEBPACK_IMPORTED_MODULE_17__.SCALE_NODE_CLASSNAME, \" \")).call(_context7, _constants_index__WEBPACK_IMPORTED_MODULE_17__.NORMAL_NODE_CLASSNAME, \" \")).call(_context6, _constants_index__WEBPACK_IMPORTED_MODULE_17__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    onMouseDown: handleMouseDown,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: true\n  }), childItems && (0,_factory_parseUIControl__WEBPACK_IMPORTED_MODULE_16__.parseUIControl)(childItems, true), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_18__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transformerProps, {\n    enabledAnchors: ['top-center']\n  })));\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_21__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BaseFooter);\n\n//# sourceURL=webpack://print-designer/./src/components/base/footer/index.tsx?");

/***/ }),

/***/ 77072:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(5668);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(84945);\n/* harmony import */ var _factory_parseUIControl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(23312);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(98092);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(2680);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(41232);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(20100);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(37520);\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"id\", \"childItems\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\", \"activedSelectId\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// 页脚控件\nvar BaseFooter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.forwardRef)(function (props, forwardedRef) {\n  var _context, _context2, _context3, _context4, _context5;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_4__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_12__.PrintRootContext);\n  var selectionContext = context.selectionContext,\n    dataContext = context.dataContext,\n    pageWidth = context.pageWidth,\n    pageHeight = context.pageHeight;\n  var selection = selectionContext.getSelection();\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.console.log(context, context.refLineRef.searchRefLines);\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    id = props.id,\n    _props$childItems = props.childItems,\n    childItems = _props$childItems === void 0 ? [] : _props$childItems,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    activedSelectId = props.activedSelectId,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, _excluded);\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_10__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      id: id,\n      childItems: childItems\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_8__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_9__.useHover)({\n      strokeEnabled: true,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var heightToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_11__.useGetControlRenderSizeProp)(height, scale);\n  var widthToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_11__.useGetControlRenderSizeProp)(width, scale);\n  var containerWidth = widthToPx;\n  var containerHeight = heightToPx;\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(y, scale);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_19__.useControlDragEnd)(props, context);\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      footerWidth = _ref.width,\n      footerHeight = _ref.height;\n    var rootId = dataContext.getRootId();\n    var field = dataContext.findControl(id);\n    var gridField = dataContext.findControl(field.parentGridId);\n    var childControls = dataContext.findControlByCondition(function (item) {\n      return item.parentId === id;\n    });\n    var transformHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(footerHeight, scale);\n    var transformWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(footerWidth, scale);\n    var minHeight = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(childControls).call(childControls, function (calcHeight, control) {\n      var height = control.height;\n      return height > calcHeight ? height : calcHeight;\n    }, 5);\n    if (transformHeight <= minHeight) {\n      transformHeight = Math.min(minHeight, 100);\n    }\n    if (gridField.width < transformWidth) {\n      transformWidth = gridField.width;\n    }\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(x),\n      width: transformWidth,\n      height: transformHeight\n    }]]));\n  }, [id, pageWidth, pageHeight, dataContext, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_6__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      parentId: props.ParentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_7__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n\n  // const fontStyle = [italic && 'italic', bold && 'bold'].filter(Boolean).join(',')\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    draggable: dataContext.findControl(activedSelectId).type !== 'LayoutCell',\n    id: id,\n    dragBoundFunc: dragBoundFunc,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context2 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_14__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context2, _constants_index__WEBPACK_IMPORTED_MODULE_14__.SCALE_NODE_CLASSNAME, \" \")).call(_context, _constants_index__WEBPACK_IMPORTED_MODULE_14__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Text, {\n    height: containerHeight,\n    width: containerWidth,\n    x: 0,\n    y: 0,\n    text: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.components.key0002'),\n    fill: \"#E5E5E5\",\n    verticalAlign: \"middle\",\n    align: \"center\",\n    name: \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_14__.NORMAL_NODE_CLASSNAME),\n    fontSize: 18,\n    hitStrokeWidth: 0\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_5__.Rect, {\n    id: \"\".concat(id, \"_rect\"),\n    x: 0,\n    y: 0,\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context5 = \"\".concat(id, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_14__.SCALE_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_14__.NORMAL_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_14__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    onMouseDown: handleMouseDown,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: true\n  }), childItems && (0,_factory_parseUIControl__WEBPACK_IMPORTED_MODULE_13__.parseUIControl)(childItems, true), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_15__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transformerProps, {\n    enabledAnchors: ['top-center']\n  })));\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_18__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BaseFooter);\n\n//# sourceURL=webpack://print-designer/./src/components/base/gridFooter/index.tsx?");

/***/ }),

/***/ 97108:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98092);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(84945);\n/* harmony import */ var _factory_parseUIControl__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(23312);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5668);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(71420);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(41232);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(20100);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(2680);\n\n\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"id\", \"childItems\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context10 = ownKeys(Object(t))).call(_context10, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// 页眉控件\nvar BaseHeader = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_16__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_16__.forwardRef)(function (props, forwardedRef) {\n  var _context3, _context4, _context5, _context6, _context7, _context8;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_19__.PrintRootContext);\n  var selectionContext = context.selectionContext,\n    dataContext = context.dataContext,\n    pageWidth = context.pageWidth;\n  var selection = selectionContext.getSelection();\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)(null);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log(context, context.refLineRef.searchRefLines);\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    id = props.id,\n    _props$childItems = props.childItems,\n    childItems = _props$childItems === void 0 ? [] : _props$childItems,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, _excluded);\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_21__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      id: id,\n      childItems: childItems\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_22__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_25__.useHover)({\n      strokeEnabled: true,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var heightToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_24__.useGetControlRenderSizeProp)(height, scale);\n  var widthToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_24__.useGetControlRenderSizeProp)(width, scale);\n  var containerWidth = widthToPx;\n  var containerHeight = heightToPx;\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorMMtoPx)(y, scale);\n  var onDragEndAction = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y;\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorPxtoMM)(y, scale)\n    }]]));\n  }, [id, scale]);\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (_ref2) {\n    var _context, _context2;\n    var x = _ref2.x,\n      y = _ref2.y,\n      scaleX = _ref2.scaleX,\n      scaleY = _ref2.scaleY,\n      width = _ref2.width,\n      height = _ref2.height;\n    var rootId = dataContext.getRootId();\n    var childControls = dataContext.findControlByCondition(function (item) {\n      return item.parentId === id;\n    });\n    var minHeight = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(childControls).call(childControls, function (calcHeight, control) {\n      var y = control.y,\n        height = control.height;\n      return y + height > calcHeight ? y + height : calcHeight;\n    }, 5);\n    var transformWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorPxtoMM)(width, scale);\n    if (transformWidth !== pageWidth) {\n      transformWidth = pageWidth;\n    }\n    var transformHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorPxtoMM)(height, scale);\n    if (transformHeight < minHeight) {\n      transformHeight = Math.min(minHeight, 80);\n    } else if (transformHeight > 80) {\n      transformHeight = 80;\n    }\n    var otherControls = dataContext.findControlByCondition(function (item) {\n      var y = item.y,\n        type = item.type,\n        parentId = item.parentId;\n      return type !== 'Header' && type !== 'Footer' && parentId === rootId && y < transformHeight;\n    });\n    var updateControlValues = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context = otherControls || []).call(_context, function (item) {\n      return [item.id, {\n        y: transformHeight\n      }];\n    });\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('onTransformEndAction-------', transformHeight, updateControlValues);\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context2 = [[id, {\n      x: 0,\n      y: 0,\n      width: transformWidth,\n      height: transformHeight\n    }]]).call(_context2, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(updateControlValues))));\n  }, [id, scale, dataContext, pageWidth]);\n  var boundBoxFunc = function boundBoxFunc(oldBox, newBox) {\n    // return oldBox\n    var dataContext = context.dataContext,\n      pageWidth = context.pageWidth;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('oldBox------', newBox, oldBox);\n    var childControls = dataContext.findControlByCondition(function (item) {\n      return item.parentId === id;\n    });\n    var minHeight = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(childControls).call(childControls, function (calcHeight, control) {\n      var y = control.y,\n        height = control.height;\n      return y + height > calcHeight ? y + height : calcHeight;\n    }, 5);\n    minHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorMMtoPx)(minHeight, scale);\n    var maxHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorMMtoPx)(80.1, scale);\n    // if (transformHeight > 80) {\n    //   transformHeight = 80\n    // } else if (transformHeight < minHeight) {\n    //   transformHeight = minHeight\n    // }\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('boundBoxFunc------', maxHeight, minHeight, (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorPxtoMM)(maxHeight, scale), (0,_utils_index__WEBPACK_IMPORTED_MODULE_27__.calculatorPxtoMM)(minHeight, scale));\n    if (Math.abs(newBox.height) > maxHeight) {\n      return _objectSpread(_objectSpread({}, oldBox), {}, {\n        height: maxHeight,\n        y: oldBox.y\n      });\n    } else if (Math.abs(newBox.height) <= minHeight) {\n      return _objectSpread(_objectSpread({}, oldBox), {}, {\n        height: minHeight,\n        y: oldBox.y\n      });\n    }\n    return newBox;\n  };\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      parentId: props.ParentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_26__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n\n  // const fontStyle = [italic && 'italic', bold && 'bold'].filter(Boolean).join(',')\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_17__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight\n    // onDragStart={onDragStart}\n    // onDragMove={onDragMove}\n    // onDragEnd={onDragEnd}\n    ,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    draggable: false,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    id: id,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context4 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_18__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_18__.SCALE_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_18__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_17__.Text, {\n    height: containerHeight,\n    width: containerWidth,\n    x: 0,\n    y: 0,\n    text: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0033'),\n    fill: \"#E5E5E5\",\n    verticalAlign: \"middle\",\n    align: \"center\",\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context5 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_18__.NORMAL_NODE_CLASSNAME, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_18__.TEXT_NODE_CLASSNAME),\n    fontSize: 18,\n    hitStrokeWidth: 0\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_17__.Rect, {\n    id: \"\".concat(id, \"_rect\"),\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context6 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context7 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context8 = \"\".concat(id, \" \")).call(_context8, _constants_index__WEBPACK_IMPORTED_MODULE_18__.SCALE_NODE_CLASSNAME, \" \")).call(_context7, _constants_index__WEBPACK_IMPORTED_MODULE_18__.NORMAL_NODE_CLASSNAME, \" \")).call(_context6, _constants_index__WEBPACK_IMPORTED_MODULE_18__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    onMouseDown: handleMouseDown,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: true\n  }), childItems && (0,_factory_parseUIControl__WEBPACK_IMPORTED_MODULE_20__.parseUIControl)(childItems, true), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_29__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transformerProps, {\n    enabledAnchors: ['bottom-center']\n  })));\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_28__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BaseHeader);\n\n//# sourceURL=webpack://print-designer/./src/components/base/header/index.tsx?");

/***/ }),

/***/ 57340:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(88972);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(86020);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(5668);\n/* harmony import */ var _hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(3260);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(37520);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(98092);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2680);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(41232);\n/* harmony import */ var _default_png__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(42700);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(32064);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _common_baseImage__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(9172);\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"displayMode\", \"name\", \"bindType\", \"bindText\", \"bindField\", \"type\", \"id\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\", \"horAlignment\", \"verAlignment\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar BaseImage = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(function (props, forwardedRef) {\n  var _context, _context2, _context3, _context4, _context5, _context6;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.PrintRootContext);\n  var previewImageUrl = context.globalConfig.previewImageUrl;\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_15__.DataGridContext);\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(0)[1];\n  var gridState = dataGridContext.gridState,\n    _dataGridContext$isEd = dataGridContext.isEditorGridState,\n    isEditorGridState = _dataGridContext$isEd === void 0 ? true : _dataGridContext$isEd;\n  var selectionContext = context.selectionContext;\n  var selection = selectionContext.getSelection();\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var gridItemDoubleClick = (0,_hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_13__.useGridChildItemDoubleClick)();\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  (0,_hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_8__.useStopDrag)({\n    shapeRef: shapeRef\n  });\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    _props$displayMode = props.displayMode,\n    displayMode = _props$displayMode === void 0 ? 'zoom' : _props$displayMode,\n    name = props.name,\n    bindType = props.bindType,\n    bindText = props.bindText,\n    bindField = props.bindField,\n    type = props.type,\n    id = props.id,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    _props$horAlignment = props.horAlignment,\n    horAlignment = _props$horAlignment === void 0 ? 'left' : _props$horAlignment,\n    _props$verAlignment = props.verAlignment,\n    verAlignment = _props$verAlignment === void 0 ? 'top' : _props$verAlignment,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, _excluded);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('image----PROPS', props);\n\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_9__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    // refs: gridState ? [] : [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      displayMode: displayMode,\n      name: name,\n      bindType: bindType,\n      bindText: bindText,\n      bindField: bindField,\n      type: type,\n      id: id\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_7__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_10__.useHover)({\n      strokeEnabled: strokeEnabled,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_20__.isBindFieldMode)(bindText),\n    isBindField = _isBindFieldMode.isBindField;\n  var imageHasUrl = !isBindField ? bindField : '';\n  var imageSrc = imageHasUrl ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = \"\".concat(previewImageUrl)).call(_context, bindField) : _default_png__WEBPACK_IMPORTED_MODULE_19__[\"default\"];\n  var containerWidth = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_12__.useGetControlRenderSizeProp)(width, scale);\n  var containerHeight = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_12__.useGetControlRenderSizeProp)(height, scale);\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_18__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_18__.calculatorMMtoPx)(y, scale);\n  var getImageSize = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (imageWidth, imageHeight, verAlignment, horAlignment) {\n    if (imageHasUrl) {\n      var containerSizeRadio = width / height;\n      var imageSizeRadio = imageWidth / imageHeight;\n      var _ref = displayMode === 'zoom' ? imageSizeRadio < containerSizeRadio ? {\n          width: height / imageHeight * imageWidth,\n          height: height\n        } : {\n          width: width,\n          height: width / imageWidth * imageHeight\n        } : {\n          width: imageWidth,\n          height: imageHeight\n        },\n        imgW = _ref.width,\n        imgH = _ref.height;\n      var top = 0;\n      var left = 0;\n      if (height - imgH > 0) {\n        switch (verAlignment) {\n          case 'middle':\n            top = (height - imgH) / 2;\n            break;\n          case 'bottom':\n            top = height - imgH;\n            break;\n        }\n      }\n      if (width - imgW > 0) {\n        switch (horAlignment) {\n          case 'center':\n            left = (width - imgW) / 2;\n            break;\n          case 'right':\n            left = width - imgW;\n            break;\n        }\n      }\n      return {\n        height: imgH,\n        width: imgW,\n        top: top,\n        left: left\n      };\n    }\n    return {\n      width: imageHasUrl ? imageWidth : width,\n      height: imageHasUrl ? imageHeight : height,\n      top: 0,\n      left: 0\n    };\n  }, [width, height, displayMode, imageHasUrl, scale]);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_14__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_11__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (_ref2) {\n    var x = _ref2.x,\n      y = _ref2.y,\n      scaleX = _ref2.scaleX,\n      scaleY = _ref2.scaleY,\n      width = _ref2.width,\n      height = _ref2.height;\n    // if (scaleX === 1 && scaleY === 1) return\n    // const newWidth = width * scaleX\n    // const newHeight = height * scaleY\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_18__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_18__.calculatorPxtoMM)(y, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_18__.calculatorPxtoMM)(width, scale),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_18__.calculatorPxtoMM)(height, scale)\n    }]]));\n  }, [id, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_5__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_6__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n  // const fontStyle = [italic && 'italic', bold && 'bold'].filter(Boolean).join(',')\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    onMouseDown: handleMouseDown,\n    onDblClick: function onDblClick(e) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('image onDblClick');\n      if (gridItemDoubleClick(e, gridState, handleMouseDown)) return;\n    },\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    dragBoundFunc: dragBoundFunc,\n    id: id,\n    draggable: isEditorGridState,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_16__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_16__.SCALE_NODE_CLASSNAME, \" \")).call(_context2, _constants_index__WEBPACK_IMPORTED_MODULE_16__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_common_baseImage__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    getImageSize: getImageSize,\n    src: imageSrc,\n    scale: scale,\n    horAlignment: horAlignment,\n    verAlignment: verAlignment\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Rect, {\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context6 = \"\".concat(id, \" \")).call(_context6, _constants_index__WEBPACK_IMPORTED_MODULE_16__.SCALE_NODE_CLASSNAME, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_16__.NORMAL_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_16__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: strokeEnabled\n  }), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_17__[\"default\"], transformerProps));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (BaseImage);\n\n//# sourceURL=webpack://print-designer/./src/components/base/image/index.tsx?");

/***/ }),

/***/ 30852:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(88972);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(86020);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(20100);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(37520);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(5668);\n/* harmony import */ var _hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(3260);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(84945);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(98092);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(2680);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41232);\n/* harmony import */ var _common_baseImage__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(9172);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(30936);\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"bindField\", \"type\", \"id\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\", \"encodeMode\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// 二维码控件\nvar BaseImage = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_3__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(function (props, forwardedRef) {\n  var _context, _context2, _context3, _context4, _context5;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_16__.PrintRootContext);\n  var selectionContext = context.selectionContext;\n  var selection = selectionContext.getSelection();\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_16__.DataGridContext);\n  var gridState = dataGridContext.gridState,\n    _dataGridContext$isEd = dataGridContext.isEditorGridState,\n    isEditorGridState = _dataGridContext$isEd === void 0 ? true : _dataGridContext$isEd;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log(context, context.refLineRef.searchRefLines);\n  var gridItemDoubleClick = (0,_hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_15__.useGridChildItemDoubleClick)();\n  (0,_hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_8__.useStopDrag)({\n    shapeRef: shapeRef\n  });\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    bindField = props.bindField,\n    type = props.type,\n    id = props.id,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    encodeMode = props.encodeMode,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, _excluded);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('qrcode----PROPS', props);\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_9__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    // refs: gridState ? [] : [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      bindField: bindField,\n      type: type,\n      id: id\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_7__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_10__.useHover)({\n      strokeEnabled: strokeEnabled,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var imageSrc = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {\n    var _QRCodeMap$QR_CODE_IM;\n    return (_QRCodeMap$QR_CODE_IM = _image__WEBPACK_IMPORTED_MODULE_22__[_constants_index__WEBPACK_IMPORTED_MODULE_17__.QR_CODE_IMAGE[encodeMode]]) !== null && _QRCodeMap$QR_CODE_IM !== void 0 ? _QRCodeMap$QR_CODE_IM : _image__WEBPACK_IMPORTED_MODULE_22__.defaultQRCode;\n  }, [encodeMode]);\n  var containerWidth = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_14__.useGetControlRenderSizeProp)(width, scale);\n  var containerHeight = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_14__.useGetControlRenderSizeProp)(height, scale);\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)(y, scale);\n  var imgSize = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {\n    var widthSize = width;\n    var heightSize = height;\n\n    // encodeMode可能不存在 默认返回一比一\n    if (_constants_index__WEBPACK_IMPORTED_MODULE_17__.QR_CODE_RATIO[encodeMode] === 1 || !encodeMode) {\n      // 正方形\n      widthSize = heightSize = width > height ? height : width;\n    } else {\n      // 以容器长为图片长，宽按比例缩小\n      heightSize = width * _constants_index__WEBPACK_IMPORTED_MODULE_17__.QR_CODE_RATIO[encodeMode];\n\n      // 如果宽度缩小后还比容器宽度大（溢出容器，使用容器高做基底，缩小宽）\n      while (heightSize > height) {\n        heightSize = height;\n        widthSize = height / _constants_index__WEBPACK_IMPORTED_MODULE_17__.QR_CODE_RATIO[encodeMode];\n      }\n    }\n    return {\n      width: widthSize,\n      height: heightSize\n    };\n  }, [width, height, encodeMode]);\n  var getImageSize = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function () {\n    return imgSize;\n  }, [imgSize]);\n  var imageX = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {\n    if (width > imgSize.height) {\n      return (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)((width - imgSize.width) / 2, scale);\n    } else {\n      return 0;\n    }\n  }, [imgSize, scale]);\n  var imageY = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () {\n    if (height > imgSize.height) {\n      return (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorMMtoPx)((height - imgSize.height) / 2, scale);\n    } else {\n      return 0;\n    }\n  }, [imgSize, scale]);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_13__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_11__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      width = _ref.width,\n      height = _ref.height;\n    // if (scaleX === 1 && scaleY === 1) return\n    // const newWidth = width * scaleX\n    // const newHeight = height * scaleY\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(y, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(width, scale),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_19__.calculatorPxtoMM)(height, scale)\n    }]]));\n  }, [id, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_5__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_6__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n\n  // const fontStyle = [italic && 'italic', bold && 'bold'].filter(Boolean).join(',')\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    onDblClick: function onDblClick(e) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('image onDblClick');\n      if (gridItemDoubleClick(e, gridState, handleMouseDown)) return;\n    },\n    scale: {\n      x: 1,\n      y: 1\n    },\n    onMouseDown: handleMouseDown,\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    dragBoundFunc: dragBoundFunc,\n    id: id,\n    draggable: isEditorGridState,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_17__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context2, _constants_index__WEBPACK_IMPORTED_MODULE_17__.SCALE_NODE_CLASSNAME, \" \")).call(_context, _constants_index__WEBPACK_IMPORTED_MODULE_17__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_common_baseImage__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n    getImageSize: getImageSize,\n    src: imageSrc,\n    scale: scale,\n    x: imageX,\n    y: imageY\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Rect, {\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = \"\".concat(id, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_17__.SCALE_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_17__.NORMAL_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_17__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: strokeEnabled\n  }), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_18__[\"default\"], transformerProps));\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_12__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (BaseImage);\n\n//# sourceURL=webpack://print-designer/./src/components/base/qrCode/index.tsx?");

/***/ }),

/***/ 22088:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(37520);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(86020);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(5668);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(84945);\n/* harmony import */ var _hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(3260);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(98092);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(2680);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(41232);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(20100);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_19__);\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"border\", \"name\", \"id\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar RichText = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_3__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(function (props, forwardedRef) {\n  var _context, _context2, _context3, _context4, _context5, _context6;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_13__.PrintRootContext);\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    contextStrokeEnabled = context.contextStrokeEnabled,\n    pixelRatio = context.pixelRatio;\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_13__.DataGridContext);\n  var gridState = dataGridContext.gridState,\n    _dataGridContext$isEd = dataGridContext.isEditorGridState,\n    isEditorGridState = _dataGridContext$isEd === void 0 ? true : _dataGridContext$isEd;\n  var gridItemDoubleClick = (0,_hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_14__.useGridChildItemDoubleClick)();\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.console.log(context, context.refLineRef.searchRefLines);\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    border = props.border,\n    name = props.name,\n    id = props.id,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, _excluded);\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_9__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      name: name,\n      id: id\n    }\n  });\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_7__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      isSelected: isSelected,\n      contextStrokeEnabled: contextStrokeEnabled\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_8__.useHover)({\n      strokeEnabled: strokeEnabled,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var heightToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_12__.useGetControlRenderSizeProp)(height, scale);\n  var widthToPx = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_12__.useGetControlRenderSizeProp)(width, scale);\n  var containerWidth = widthToPx;\n  var containerHeight = heightToPx;\n  var titleHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(7, scale);\n  var textHeight = heightToPx - titleHeight;\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorMMtoPx)(y, scale);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_10__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_11__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      width = _ref.width,\n      height = _ref.height;\n    // if (scaleX === 1 && scaleY === 1) return\n    // const newWidth = width * scaleX\n    // const newHeight = height * scaleY\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(y, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(width, scale),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(height, scale)\n    }]]));\n  }, [id, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_5__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_6__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    // 这里应该从context获取并作判断\n    isSelected: isSelected && !isLastSelected\n    // isLastSelected: id === activedSelectId\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver,\n    onMouseDown: handleMouseDown,\n    onDblClick: function onDblClick(e) {\n      if (gridItemDoubleClick(e, gridState, handleMouseDown)) return;\n    },\n    ref: shapeRef\n  }, rest, {\n    x: xPos,\n    y: yPos,\n    draggable: isEditorGridState,\n    dragBoundFunc: dragBoundFunc,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight,\n    id: id,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_15__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context2, _constants_index__WEBPACK_IMPORTED_MODULE_15__.SCALE_NODE_CLASSNAME, \" \")).call(_context, _constants_index__WEBPACK_IMPORTED_MODULE_15__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Rect, {\n    width: containerWidth,\n    height: containerHeight,\n    x: 0,\n    y: 0,\n    fill: \"#f2f6ff\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Text, {\n    height: containerHeight,\n    width: containerWidth,\n    x: 0,\n    y: 0,\n    text: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.components.key0062'),\n    fill: \"#212121\",\n    verticalAlign: \"middle\",\n    align: \"center\",\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_15__.NORMAL_NODE_CLASSNAME, \" \")).call(_context3, _constants_index__WEBPACK_IMPORTED_MODULE_15__.TEXT_NODE_CLASSNAME),\n    fontSize: 20,\n    fontStyle: \"bold\",\n    fontFamily: \"Arial\",\n    hitStrokeWidth: 0\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Rect, {\n    id: \"\".concat(id, \"_rect\"),\n    height: containerHeight,\n    width: containerWidth,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context6 = \"\".concat(id, \" \")).call(_context6, _constants_index__WEBPACK_IMPORTED_MODULE_15__.SCALE_NODE_CLASSNAME, \" \")).call(_context5, _constants_index__WEBPACK_IMPORTED_MODULE_15__.NORMAL_NODE_CLASSNAME, \" \")).call(_context4, _constants_index__WEBPACK_IMPORTED_MODULE_15__.HOVER_NODE_CLASSNAME),\n    fill: \"transparent\",\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    dashEnabled: dashEnabled,\n    dash: defaultDash,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1\n    // fillEnabled={fillEnabled}\n    ,\n    strokeEnabled: true\n  }), customedStrokeElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_16__[\"default\"], transformerProps));\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_18__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (RichText);\n\n//# sourceURL=webpack://print-designer/./src/components/base/richText/index.tsx?");

/***/ }),

/***/ 33404:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(1508);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(11872);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(71420);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(88972);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(86020);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useValidateWarningIcon__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(82872);\n/* harmony import */ var _hooks_useValidateBindField__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(95568);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(37520);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(5668);\n/* harmony import */ var _hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(3260);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(84945);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(20100);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(98092);\n/* harmony import */ var _constants_ctrlMethodName__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(66416);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(2680);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(41232);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_43__);\n\n\n\n\n\nvar _excluded = [\"x\", \"y\", \"width\", \"height\", \"backColor\", \"horAlignment\", \"verAlignment\", \"lineWrapRule\", \"foreColor\", \"padding\", \"divideModel\", \"divideCharNums\", \"fontName\", \"fontSize\", \"children\", \"wrap\", \"bold\", \"underLine\", \"strike\", \"italic\", \"textFormat\", \"textOverFlow\", \"type\", \"alpha\", \"globalCompositeOperation\", \"id\", \"border\", \"borderType\", \"isCell\", \"isTemplate\", \"hasChildItems\", \"childItems\", \"isLastSelected\", \"handleMouseDown\", \"isSelected\", \"parentId\", \"dsType\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(_context21 = ownKeys(Object(t), !0)).call(_context21, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(_context22 = ownKeys(Object(t))).call(_context22, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar TEXT_PROPERTY = 'bindText';\nvar TEXT_BINDFIELD = 'bindField';\nvar VIEW_TEXT = 'viewText';\nvar DATA_SOURCE = 'dataSource';\nvar MIN_FONT_SIZE = 1; // 设置最小字体大小\nvar MAX_FONT_SIZE = 100; // 设置最大字体大小\n\n/**\n * 填格时，通过设置的填格数，处理原文本，将其分割成数组形式\n * 1.填格数大于文本长度，展示原文本\n * 2.填格数小于文本长度，三种情况：\n *  对齐方式居左，展示文字+ '...'\n * 对齐方式居右，展示’...' + 文字\n * 对齐方式居中，如果填格数为2，展示两个‘...’；如果填格数>2，展示'...'+中间部分文字+'...'\n */\nfunction getDivideText(text, align, num) {\n  var _context, _context6;\n  var textArr = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_13___default()(_context = new Array(num)).call(_context, '');\n  var arr = [];\n  var textLength = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(text).length;\n  if (textLength > num) {\n    if (align === 'left') {\n      var _context2;\n      arr = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(text).call(text, 0, num - 1).split('')).call(_context2, '...');\n    } else if (align === 'right') {\n      arr = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(text).call(text, -num + 1).split('');\n      arr.unshift('...');\n    } else {\n      if (num === 1) {\n        arr = ['...'];\n      } else if (num === 2) {\n        arr = ['...', '...'];\n      } else {\n        var middleTextIndex = Math.floor((textLength - num) / 2 + 1);\n        if (middleTextIndex === 1) {\n          var _context3;\n          arr = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context3 = []).call(_context3, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(text).call(text, 0, num - 1)), ['...']);\n        } else {\n          var _context4;\n          arr = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context4 = ['...']).call(_context4, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(text).call(text, middleTextIndex, middleTextIndex + num - 2)), ['...']);\n        }\n      }\n    }\n  } else if (textLength < num) {\n    if (align === 'left') {\n      arr = text.split('');\n    } else if (align === 'right') {\n      var _textArr$slice;\n      arr = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_textArr$slice = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(textArr).call(textArr, 0, -textLength)).apply(_textArr$slice, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(text));\n    } else {\n      var _arr, _context5;\n      var _middleTextIndex = Math.floor((num - textLength) / 2);\n      arr = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(textArr);\n      _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_17___default()(_arr = arr).apply(_arr, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context5 = [_middleTextIndex, textLength]).call(_context5, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(text)));\n    }\n  } else {\n    arr = text.split('');\n  }\n  _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_17___default()(textArr).apply(textArr, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context6 = [0, arr.length]).call(_context6, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(arr)));\n  return textArr;\n}\nfunction getDivideXPos(width, devideNum, index) {\n  return width / devideNum * index;\n}\nfunction getDivideTextWidth(width, devideNum, fontSize) {\n  // 这里有个问题，konva当宽度小于字体大小时，文本就不显示了,这里做个最小宽度的限制\n  var divideWidth = width / devideNum;\n  return Math.max(divideWidth, fontSize);\n}\nvar DivideText = function DivideText(_ref) {\n  var width = _ref.width,\n    height = _ref.height,\n    text = _ref.text,\n    divideNums = _ref.divideNums,\n    fill = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_13___default()(_ref),\n    verticalAlign = _ref.verticalAlign,\n    align = _ref.align,\n    fontFamily = _ref.fontFamily,\n    fontStyle = _ref.fontStyle,\n    textDecoration = _ref.textDecoration,\n    fontSize = _ref.fontSize,\n    divideLineEnable = _ref.divideLineEnable,\n    divideLineColor = _ref.divideLineColor,\n    divideLineWidth = _ref.divideLineWidth;\n  var divideTextArr = getDivideText(text, align, divideNums);\n  var showDivideLine = (0,react__WEBPACK_IMPORTED_MODULE_22__.useCallback)(function (index) {\n    return divideLineEnable && index !== divideNums && index !== 0;\n  }, [divideNums, divideLineEnable]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement((react__WEBPACK_IMPORTED_MODULE_22___default().Fragment), null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(divideTextArr).call(divideTextArr, function (word, index) {\n    var _context7, _context8, _context9, _context10;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement((react__WEBPACK_IMPORTED_MODULE_22___default().Fragment), {\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context7 = \"divide_\".concat(word, \"_\")).call(_context7, index)\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Text, {\n      width: getDivideTextWidth(width, divideNums, fontSize),\n      height: height,\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context8 = \"text_\".concat(word, \"_\")).call(_context8, index),\n      x: getDivideXPos(width, divideNums, index),\n      y: 0,\n      text: word,\n      fill: fill,\n      verticalAlign: \"middle\",\n      align: \"center\",\n      name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context9 = \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_39__.NORMAL_NODE_CLASSNAME, \" \")).call(_context9, _constants_index__WEBPACK_IMPORTED_MODULE_39__.TEXT_NODE_CLASSNAME),\n      fontFamily: fontFamily,\n      fontStyle: fontStyle,\n      textDecoration: textDecoration,\n      fontSize: fontSize,\n      wrap: \"none\",\n      hitStrokeWidth: 0,\n      letterSpacing: _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFAULT_LETTER_SPACING\n    }), showDivideLine(index) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Line, {\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context10 = \"line_\".concat(word, \"_\")).call(_context10, index),\n      x: getDivideXPos(width, divideNums, index),\n      y: 0,\n      stroke: divideLineColor,\n      strokeWidth: divideLineWidth,\n      points: [0, height, 0, 0]\n    }));\n  }));\n};\nvar TextField = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_22__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_22__.forwardRef)(function (props, forwardedRef) {\n  var _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19, _context20;\n  // console.log('renderLog component TextField')\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_22__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_37__.PrintRootContext);\n  var selectionContext = context.selectionContext,\n    contextStrokeEnabled = context.contextStrokeEnabled;\n  var selection = selectionContext.getSelection();\n  var dataGridContext = (0,react__WEBPACK_IMPORTED_MODULE_22__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_37__.DataGridContext);\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    pixelRatio = context.pixelRatio,\n    getRedundancyXY = context.getRedundancyXY,\n    getInputSize = context.getInputSize,\n    getTextSize = context.getTextSize,\n    onValid = context.onValid,\n    globalTrRef = context.globalTrRef,\n    dataContext = context.dataContext;\n  var gridState = dataGridContext.gridState,\n    gridX = dataGridContext.gridX,\n    gridY = dataGridContext.gridY,\n    gridBorderType = dataGridContext.gridBorderType,\n    _dataGridContext$isEd = dataGridContext.isEditorGridState,\n    isEditorGridState = _dataGridContext$isEd === void 0 ? true : _dataGridContext$isEd,\n    removeGridSelection = dataGridContext.removeGridSelection;\n  var gridItemDoubleClick = (0,_hooks_useGridChildItemDoubleClick__WEBPACK_IMPORTED_MODULE_36__.useGridChildItemDoubleClick)();\n  var previousGridState = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_33__.usePrevious)(gridState);\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_22__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_22__.useRef)(null);\n  var textShapeRef = (0,react__WEBPACK_IMPORTED_MODULE_22__.useRef)(null);\n  var value = props[TEXT_PROPERTY];\n  var renderValue = props[VIEW_TEXT] || props[TEXT_PROPERTY] || '';\n  // const renderValue = props[TEXT_BINDFIELD] ? `=$${_.last(props[TEXT_PROPERTY].split('.'))}` : value\n  var bindText = props[TEXT_PROPERTY];\n  var bindField = props[TEXT_BINDFIELD];\n  var dataSource = props[DATA_SOURCE];\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    width = props.width,\n    height = props.height,\n    fill = props.backColor,\n    _props$horAlignment = props.horAlignment,\n    align = _props$horAlignment === void 0 ? \"left\" : _props$horAlignment,\n    _props$verAlignment = props.verAlignment,\n    verAlignment = _props$verAlignment === void 0 ? \"middle\" : _props$verAlignment,\n    _props$lineWrapRule = props.lineWrapRule,\n    lineWrapRule = _props$lineWrapRule === void 0 ? 1 : _props$lineWrapRule,\n    _props$foreColor = props.foreColor,\n    textColor = _props$foreColor === void 0 ? \"#333\" : _props$foreColor,\n    _props$padding = props.padding,\n    padding = _props$padding === void 0 ? _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFALUT_PADDING : _props$padding,\n    divideModel = props.divideModel,\n    divideCharNums = props.divideCharNums,\n    _props$fontName = props.fontName,\n    fontFamily = _props$fontName === void 0 ? \"Arial\" : _props$fontName,\n    _props$fontSize = props.fontSize,\n    fontSize = _props$fontSize === void 0 ? _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFAULT_FONT_SIZE : _props$fontSize,\n    children = props.children,\n    _props$wrap = props.wrap,\n    wrap = _props$wrap === void 0 ? \"none\" : _props$wrap,\n    _props$bold = props.bold,\n    bold = _props$bold === void 0 ? false : _props$bold,\n    _props$underLine = props.underLine,\n    underLine = _props$underLine === void 0 ? false : _props$underLine,\n    _props$strike = props.strike,\n    strike = _props$strike === void 0 ? false : _props$strike,\n    _props$italic = props.italic,\n    italic = _props$italic === void 0 ? false : _props$italic,\n    textFormat = props.textFormat,\n    textOverFlow = props.textOverFlow,\n    type = props.type,\n    _props$alpha = props.alpha,\n    alpha = _props$alpha === void 0 ? 0 : _props$alpha,\n    _props$globalComposit = props.globalCompositeOperation,\n    globalCompositeOperation = _props$globalComposit === void 0 ? \"multiply\" : _props$globalComposit,\n    id = props.id,\n    _props$border = props.border,\n    border = _props$border === void 0 ? {} : _props$border,\n    borderType = props.borderType,\n    isCell = props.isCell,\n    isTemplate = props.isTemplate,\n    hasChildItems = props.hasChildItems,\n    childItems = props.childItems,\n    isLastSelected = props.isLastSelected,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    parentId = props.parentId,\n    dsType = props.dsType,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, _excluded);\n  var lineSpace = props.lineSpace || 1;\n  console.log('textField----------borderType', borderType);\n  // TODO:\n  // Konva偷懒，没支持对象传值\n  var paddings = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(_context11 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_19___default()(padding || _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFALUT_PADDING)).call(_context11, Boolean);\n  // const { dataContext } = context\n  // TODO:\n  // parseUIControl层注入\n  // 有点麻烦，需要先 modalData 再 Properties 再找Node\n  // const modalData = createControlDataOrModel(dataContext.getMeta(), true)({ type })\n  // const { Editor: editor = {} } = modalData?.Properties || {}\n  // const { MaxLength: maxLength } = editor\n  var _Object$keys$reduce = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_20___default()(_context12 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default()(padding)).call(_context12, function (res, key) {\n      res[key] = padding[key] * scale;\n      return res;\n    }, {}),\n    paddingTop = _Object$keys$reduce.top,\n    paddingLeft = _Object$keys$reduce.left,\n    paddingRight = _Object$keys$reduce.right,\n    paddingBottom = _Object$keys$reduce.bottom;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_22__.useState)((fontSize || 12) * scale),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState, 2),\n    scaledFontSize = _useState2[0],\n    setScaledFontSize = _useState2[1];\n  var textDecoration = 'normal';\n  if (strike && underLine) {\n    textDecoration = 'underline line-through';\n  } else if (strike) {\n    textDecoration = 'line-through';\n  } else if (underLine) {\n    textDecoration = 'underline';\n  }\n  var fontStyle = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(_context13 = [italic && 'italic', bold && 'bold']).call(_context13, Boolean).join(' ');\n  var editorStyle = {\n    fontSize: scaledFontSize,\n    fontFamily: (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily),\n    fontWeight: bold ? '700' : 'normal',\n    fontStyle: italic ? 'italic' : 'textDecoration',\n    textDecoration: textDecoration,\n    backgroundColor: fill,\n    color: textColor,\n    paddingTop: paddingTop,\n    paddingLeft: paddingLeft,\n    paddingRight: paddingRight,\n    paddingBottom: paddingBottom,\n    align: align,\n    verAlignment: verAlignment,\n    lineHeight: lineSpace,\n    letterSpacing: _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFAULT_LETTER_SPACING\n    // maxLength\n  };\n  var trRef = (0,react__WEBPACK_IMPORTED_MODULE_22__.useRef)(null);\n  // const showText = (isCell ? (!children?.length && renderValue) : renderValue)\n  var showText = !(isCell && children !== null && children !== void 0 && children.length);\n  var isShowCellDetail = (!!(children !== null && children !== void 0 && children.length) || !!showText) && !isTemplate;\n  var scaleClassname = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context14 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context15 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context16 = \"\".concat(!isTemplate ? id : \"template_\".concat(id, \"}\"), \" \")).call(_context16, _constants_index__WEBPACK_IMPORTED_MODULE_39__.SCALE_NODE_CLASSNAME, \" \")).call(_context15, _constants_index__WEBPACK_IMPORTED_MODULE_39__.NORMAL_NODE_CLASSNAME, \" \")).call(_context14, _constants_index__WEBPACK_IMPORTED_MODULE_39__.HOVER_NODE_CLASSNAME);\n  var groupClassname = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context17 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context18 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_15___default()(_context19 = \"\".concat(isCell ? _constants_index__WEBPACK_IMPORTED_MODULE_39__.CELL_NODE_CLASSNAME : '', \" \")).call(_context19, _constants_index__WEBPACK_IMPORTED_MODULE_39__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context18, _constants_index__WEBPACK_IMPORTED_MODULE_39__.SCALE_NODE_CLASSNAME, \" \")).call(_context17, _constants_index__WEBPACK_IMPORTED_MODULE_39__.NORMAL_NODE_CLASSNAME);\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_30__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      contextStrokeEnabled: contextStrokeEnabled,\n      borderType: borderType,\n      isSelected: isSelected && !isTemplate\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef,\n    borderTypes = _useControlStroke.borderTypes;\n  var _useValidateBindField = (0,_hooks_useValidateBindField__WEBPACK_IMPORTED_MODULE_32__.useValidateBindField)({\n      onValid: onValid,\n      dataSource: dataSource,\n      bindField: bindField,\n      value: bindText,\n      isFormulaMode: dsType === 'Formula',\n      id: id,\n      dataContext: context.dataContext\n    }, _constants_ctrlMethodName__WEBPACK_IMPORTED_MODULE_40__.BEFORE_SAVE),\n    _useValidateBindField2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useValidateBindField, 1),\n    showValidateStoke = _useValidateBindField2[0];\n  var _useValidateWarningIc = (0,_hooks_useValidateWarningIcon__WEBPACK_IMPORTED_MODULE_31__.useValidateWarningIcon)({\n      height: height,\n      scale: scale,\n      offsetLeft: 3,\n      scaledFontSize: scaledFontSize\n    }),\n    _useValidateWarningIc2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useValidateWarningIc, 3),\n    warningIcon = _useValidateWarningIc2[0],\n    offsetLeft = _useValidateWarningIc2[1],\n    warningIconWidth = _useValidateWarningIc2[2];\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    selectedId: id,\n    ref: trRef,\n    isSelected: isSelected && !isLastSelected,\n    isCell: isCell,\n    resizeEnabled: !isCell\n  };\n  var TransformerComp = !isTemplate && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_41__[\"default\"], transformerProps);\n  (0,_hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_28__.useStopDrag)({\n    shapeRef: shapeRef,\n    isNotNeed: isCell\n  });\n  var realPadding = paddings.length > 0 ? Math.min.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(paddings)) : 0;\n  // 需求更改，默认就是换行\n  // const isTextWrap = textOverFlow === 'WrapLine'\n  var isTextWrap = true;\n  var containerWidth = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_35__.useGetControlRenderSizeProp)(width, scale);\n  var containerHeight = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_35__.useGetControlRenderSizeProp)(height, scale);\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.calculatorMMtoPx)(y, scale);\n  var showDivideText = divideModel && divideCharNums > 0;\n  var divideLineEnable = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21___default()(borderTypes).call(borderTypes, _constants_index__WEBPACK_IMPORTED_MODULE_39__.INNER_BORDER) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21___default()(borderTypes).call(borderTypes, _constants_index__WEBPACK_IMPORTED_MODULE_39__.ALL_BORDER);\n  // 这里缓存会导致文本不清晰，只能缓存部分不可察觉的节点\n  // 已排除文本节点\n  // 缩放前后又有问题\n  // 表格下的字段暂时不予以缓存(由表格自身来执行缓存动作)\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_26__.useCache)({\n    isSelected: isSelected,\n    // refs: gridState ? [] : [shapeRef],\n    refs: !isShowCellDetail ? [shapeRef] : [],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      fill: fill,\n      align: align,\n      textColor: textColor,\n      padding: padding,\n      divideModel: divideModel,\n      divideCharNums: divideCharNums,\n      fontFamily: fontFamily,\n      fontSize: fontSize,\n      wrap: wrap,\n      bold: bold,\n      underLine: underLine,\n      strike: strike,\n      italic: italic,\n      textFormat: textFormat,\n      textOverFlow: textOverFlow,\n      type: type,\n      alpha: alpha,\n      // strokeEnabled = true,\n      globalCompositeOperation: globalCompositeOperation,\n      id: id,\n      border: border,\n      isCell: isCell,\n      isTemplate: isTemplate,\n      hasChildItems: hasChildItems,\n      childItems: childItems\n    }\n  });\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_27__.useHover)({\n      strokeEnabled: strokeEnabled,\n      shapeRef: transformRef,\n      isSelected: isLastSelected,\n      shapeRefStroke: stroke,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_34__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_29__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_22__.useCallback)(function (_ref2) {\n    var x = _ref2.x,\n      y = _ref2.y,\n      scaleX = _ref2.scaleX,\n      scaleY = _ref2.scaleY,\n      width = _ref2.width,\n      height = _ref2.height;\n    var dataContext = context.dataContext;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_33__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.toRoundFix)((0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.calculatorPxtoMM)(x, scale), _constants_index__WEBPACK_IMPORTED_MODULE_39__.PRECISION),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.toRoundFix)((0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.calculatorPxtoMM)(y, scale), _constants_index__WEBPACK_IMPORTED_MODULE_39__.PRECISION),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.toRoundFix)((0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.calculatorPxtoMM)(width, scale), _constants_index__WEBPACK_IMPORTED_MODULE_39__.PRECISION),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.toRoundFix)((0,_utils_index__WEBPACK_IMPORTED_MODULE_42__.calculatorPxtoMM)(height, scale), _constants_index__WEBPACK_IMPORTED_MODULE_39__.PRECISION)\n    }]]));\n  }, [id, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_24__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_25__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      // currentShapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  // TODO: 悬浮需求需要帧计算鼠标位置? 也可以定时器延时 // 完善非选中状态\n\n  var onMouseDown = (0,react__WEBPACK_IMPORTED_MODULE_22__.useCallback)(function (e) {\n    console.log('onMouseDown', e);\n    handleMouseDown(e);\n  }, [handleMouseDown]);\n  var onContextMenu = (0,react__WEBPACK_IMPORTED_MODULE_22__.useCallback)(function (e) {\n    // return\n    if (gridState !== _constants_index__WEBPACK_IMPORTED_MODULE_39__.GRID_EDITOR_STATE) return;\n    if (isTemplate || !gridState) return;\n    var ids = selectionContext.getSelection();\n    var cellId = isCell ? id : parentId; // 只能嵌套一层\n    if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21___default()(ids).call(ids, cellId)) {\n      window.requestAnimationFrame(function () {\n        removeGridSelection();\n        selectionContext.setSelect([cellId]);\n      });\n    }\n  }, [id, isCell, isTemplate, gridState, parentId]);\n  var onDblClick = !(isCell || !!gridState) ? function (e) {\n    console.log('onDblClick');\n    if (e.evt.button !== 0) return;\n    if (type === 'RichText') return;\n    var showEditor = context.showEditor,\n      setEditorPosition = context.setEditorPosition;\n    var node = shapeRef.current;\n    var _getPosition = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_24__.getPosition)(node),\n      height = _getPosition.height,\n      width = _getPosition.width;\n    var _getAbsolutePosition = node.getAbsolutePosition(),\n      x = _getAbsolutePosition.x,\n      y = _getAbsolutePosition.y;\n    setEditorPosition(_objectSpread({\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      value: value,\n      shapeRef: shapeRef,\n      id: id,\n      isWrap: isTextWrap,\n      propertyName: TEXT_PROPERTY\n    }, editorStyle));\n    showEditor();\n  } : function (e) {\n    console.log('grid textField onDblClick', gridState, previousGridState, hasChildItems, e.evt.button);\n    // previousGridState !== GRID_EDITOR_STATE &&\n    if (hasChildItems) {\n      return;\n    }\n    if (gridItemDoubleClick(e, gridState, handleMouseDown)) {\n      return;\n    }\n    // 双击时实际上还是 GRID_SELECT_STATE\n    // [GRID_SELECT_STATE, GRID_EDITOR_STATE].includes(gridState)\n    if (gridState !== _constants_index__WEBPACK_IMPORTED_MODULE_39__.GRID_EDITOR_STATE) {\n      console.log('grid textField onDblClick', gridState, e);\n      // 但是因为是2，还是会被打断不进行\n      handleMouseDown(e);\n      return;\n    }\n    var showEditor = context.showEditor,\n      setEditorPosition = context.setEditorPosition;\n    var node = shapeRef.current;\n    var _getPosition2 = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_24__.getPosition)(node),\n      height = _getPosition2.height,\n      width = _getPosition2.width;\n    var _getAbsolutePosition2 = node.getAbsolutePosition(),\n      x = _getAbsolutePosition2.x,\n      y = _getAbsolutePosition2.y;\n    setEditorPosition(_objectSpread({\n      x: x,\n      y: y,\n      width: width,\n      height: height,\n      value: value,\n      shapeRef: shapeRef,\n      id: id,\n      isWrap: isTextWrap,\n      propertyName: TEXT_PROPERTY\n    }, editorStyle));\n    showEditor();\n  };\n  var dragDropEventsProp = !isCell ? {\n    onDragStart: onDragStart,\n    onDragMove: lodash__WEBPACK_IMPORTED_MODULE_43___default().throttle(onDragMove, 100),\n    onDragEnd: onDragEnd,\n    onMouseOver: onMouseOver,\n    onMouseOut: onMouseOut,\n    dragBoundFunc: lodash__WEBPACK_IMPORTED_MODULE_43___default().throttle(dragBoundFunc, 100)\n  } : _objectSpread({}, gridState === _constants_index__WEBPACK_IMPORTED_MODULE_39__.GRID_EDITOR_STATE ? {\n    onMouseOver: onMouseOver,\n    onMouseOut: onMouseOut\n  } : {});\n  var transformEventsProp = !isCell ? {\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd\n  } : {};\n  var formulaPrefixWidth = scaledFontSize * 1.5;\n  var warningIconPrefixWidth = (offsetLeft + warningIconWidth) * 3;\n\n  // useCache\n  // REDUNDANCY_TEXT_HEIGHT可以用fontsize来判断?\n  // 或者measureSize 中文?\n  // 需要异步?初始加载时\n  var textProp = (0,react__WEBPACK_IMPORTED_MODULE_22__.useMemo)(function () {\n    // textShapeRef.current ? textShapeRef.current.measureSize('Text').height : REDUNDANCY_TEXT_HEIGHT\n    // 会导致 垂直居中有问题\n    var redundancyHeight = 0;\n    var isFormulaMode = dsType === 'Formula';\n    var textSize = {\n      width: containerWidth - paddingRight - paddingLeft - (isFormulaMode ? formulaPrefixWidth : 0) - (showValidateStoke ? warningIconPrefixWidth : 0),\n      height: containerHeight - paddingTop - paddingBottom + redundancyHeight,\n      x: paddingLeft + (isFormulaMode ? formulaPrefixWidth : 0) + (showValidateStoke ? warningIconPrefixWidth : 0),\n      y: paddingTop\n    };\n    // 不换行也需要计算\n    // 换行只是撑开\n    // !isTextWrap\n    if (!renderValue) {\n      return textSize;\n    }\n    var size = getInputSize(renderValue, {\n      width: textSize.width * scale,\n      fontSize: scaledFontSize,\n      fontFamily: (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily)\n    }, id);\n    if (!size) return textSize;\n    var width = size.width,\n      height = size.height;\n    // padding也计算在内\n    if (height > containerHeight) {\n      // 不进行精度计算\n      var calcY = verAlignment === 'middle' ? containerHeight / 2 - (paddingTop + paddingBottom + height) / 2 : verAlignment === 'bottom' ? containerHeight - (paddingTop + paddingBottom + height) : paddingTop;\n      return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(textSize, {\n        height: height + redundancyHeight,\n        y: calcY\n      });\n    } else {\n      return textSize;\n    }\n  }, [padding, width, height, x, y, scale, renderValue, xPos, yPos, dsType, (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily), fontSize, scaledFontSize,\n  // isTextWrap,\n  verAlignment, showValidateStoke, offsetLeft, warningIconWidth, id]);\n  (0,react__WEBPACK_IMPORTED_MODULE_22__.useEffect)(function () {\n    if (lineWrapRule === 3 && renderValue && /[\\r\\n]/g.test(renderValue)) {\n      var _bindText = renderValue.replace(/[\\r\\n]/g, \"\");\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_33__.createUpdateAction)([[id, {\n        bindText: _bindText\n      }]]));\n    }\n  }, [lineWrapRule, id, renderValue, dataContext]);\n  var getContainerSize = function getContainerSize(scaledFontSize) {\n    var formulaPrefixWidth = scaledFontSize * 1.5;\n    var warningIconPrefixWidth = (offsetLeft + scaledFontSize / 2.54) * 3;\n    var redundancyHeight = 0;\n    var isFormulaMode = dsType === 'Formula';\n    return {\n      width: containerWidth - paddingRight - paddingLeft - (isFormulaMode ? formulaPrefixWidth : 0) - (showValidateStoke ? warningIconPrefixWidth : 0),\n      height: containerHeight - paddingTop - paddingBottom + redundancyHeight,\n      x: paddingLeft + (isFormulaMode ? formulaPrefixWidth : 0) + (showValidateStoke ? warningIconPrefixWidth : 0),\n      y: paddingTop\n    };\n  };\n  var getFontSize = function getFontSize(nowrap) {\n    var key = nowrap ? 'width' : 'height';\n    var newFontSize;\n    var currentFontSize = scaledFontSize;\n    var realFontSize = Number(fontSize || 12) * scale;\n    var containerSize = getContainerSize(currentFontSize);\n    var width = containerSize.width,\n      height = containerSize.height;\n    var size = containerSize[key];\n    var getContentSize = function getContentSize() {\n      return getTextSize(_objectSpread({\n        x: 0,\n        // 确保文本的测量从坐标 (0, 0) 开始，这样可以避免由于坐标不明确而导致的计算误差。\n        y: 0,\n        fontSize: currentFontSize,\n        width: nowrap ? null : width\n      }, otherOptions))[key];\n    };\n    var otherOptions = {\n      wrap: _constants_index__WEBPACK_IMPORTED_MODULE_39__.TEXT_WRAP_TYPE[lineWrapRule],\n      textDecoration: textDecoration,\n      fontStyle: fontStyle,\n      text: renderValue,\n      perfectDrawEnabled: false,\n      hitStrokeWidth: 0,\n      verticalAlign: verAlignment,\n      align: align,\n      fontFamily: (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily)\n    };\n    var contentSize = getContentSize();\n\n    // 减小字体大小的逻辑\n    if (contentSize > size) {\n      while (!newFontSize && currentFontSize > MIN_FONT_SIZE) {\n        currentFontSize -= 1;\n        var _contentSize = getContentSize();\n        // 重新检查 contentSize 的有效性\n        if (_contentSize <= 0) {\n          break; // 如果内容大小无效，停止循环\n        }\n        if (_contentSize <= size || _contentSize <= 6) {\n          newFontSize = currentFontSize;\n        }\n      }\n    }\n    // 增大字体大小的逻辑\n    else if (currentFontSize < realFontSize) {\n      while (!newFontSize && currentFontSize < MAX_FONT_SIZE) {\n        currentFontSize += 1;\n        var _contentSize2 = getContentSize();\n        // 重新检查 contentSize 的有效性\n        if (_contentSize2 <= 0) {\n          break; // 如果内容大小无效，停止循环\n        }\n        if (_contentSize2 >= size || _contentSize2 >= 18) {\n          var _currentFontSize = currentFontSize - 1;\n          newFontSize = _currentFontSize >= realFontSize ? realFontSize : _currentFontSize;\n        }\n      }\n    }\n    return newFontSize;\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_22__.useEffect)(function () {\n    var realFontSize = Number(fontSize || 12) * scale;\n    if (textOverFlow !== 'ShrinkWrap' && realFontSize !== scaledFontSize) {\n      setScaledFontSize(realFontSize);\n    }\n  }, [textOverFlow, fontSize, scale, scaledFontSize]);\n  (0,react__WEBPACK_IMPORTED_MODULE_22__.useEffect)(function () {\n    if (!renderValue || textOverFlow !== 'ShrinkWrap' || scaledFontSize === 1) return;\n    var fontSize = getFontSize(lineWrapRule === 3);\n    if (fontSize) {\n      setScaledFontSize(fontSize);\n    }\n  }, [padding.top, padding.left, padding.right, padding.bottom, width, height, scale, renderValue, dsType, lineWrapRule, (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily), fontSize, scaledFontSize, textOverFlow, verAlignment, showValidateStoke, offsetLeft, warningIconWidth]);\n  var rectFillProp = isShowCellDetail ? {} : {\n    fill: fill\n  };\n  var text = lineWrapRule === 3 && renderValue && /[\\r\\n]/g.test(renderValue) ? renderValue.replace(/[\\r\\n]/g, \"\") : renderValue;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement((react__WEBPACK_IMPORTED_MODULE_22___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Group, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    clipX: 0,\n    clipY: 0,\n    clipWidth: containerWidth,\n    clipHeight: containerHeight\n  }, dragDropEventsProp, {\n    scale: {\n      x: 1,\n      y: 1\n    },\n    ref: shapeRef,\n    x: xPos,\n    y: yPos,\n    id: !isTemplate ? id : \"template_\".concat(id),\n    draggable: !isCell && isEditorGridState,\n    listening: !isTemplate,\n    name: groupClassname\n  }), isShowCellDetail && !!fill && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Rect, {\n    height: containerHeight,\n    width: containerWidth,\n    name: \"rect-\".concat(id, \"-backColor\"),\n    fill: fill,\n    scale: {\n      x: 1,\n      y: 1\n    }\n  }), showText ? showDivideText ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(DivideText, {\n    width: containerWidth,\n    height: containerHeight,\n    text: text,\n    divideNums: divideCharNums,\n    fill: textColor,\n    divideLineEnable: divideLineEnable,\n    divideLineColor: stroke,\n    divideLineWidth: strokeWidth\n    // verticalAlign={verAlignment}\n    ,\n    align: align,\n    fontFamily: (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily),\n    fontStyle: fontStyle,\n    textDecoration: textDecoration,\n    fontSize: scaledFontSize\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement((react__WEBPACK_IMPORTED_MODULE_22___default().Fragment), null, showValidateStoke && warningIcon, dsType === 'Formula' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Text, {\n    text: \"fx\",\n    width: formulaPrefixWidth,\n    height: containerHeight,\n    x: paddingLeft + (showValidateStoke ? warningIconPrefixWidth : 0),\n    fill: \"#B2B2B2\",\n    verticalAlign: \"middle\",\n    align: \"center\",\n    fontFamily: (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily),\n    fontStyle: fontStyle,\n    fontSize: scaledFontSize\n  }) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Text\n  // width={containerWidth - paddingRight - paddingLeft}\n  // height={containerHeight - paddingTop - paddingBottom}\n  // x={paddingLeft}\n  // y={paddingTop}\n  , (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, textProp, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    perfectDrawEnabled: _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFAULT_PERFECTDRAWENABLED,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    text: text,\n    letterSpacing: _constants_index__WEBPACK_IMPORTED_MODULE_39__.DEFAULT_LETTER_SPACING,\n    fill: textColor,\n    verticalAlign: verAlignment,\n    align: align,\n    name: \"\".concat(_constants_index__WEBPACK_IMPORTED_MODULE_39__.NORMAL_NODE_CLASSNAME),\n    fontFamily: (0,_constants_index__WEBPACK_IMPORTED_MODULE_39__.getFontFamily)(fontFamily),\n    fontStyle: fontStyle,\n    textDecoration: textDecoration,\n    fontSize: scaledFontSize\n    // en字符采用 word 空格会导致换行\n    // ch字符采用 word 空格会导致换行\n    // en字符采用 char 空格不会导致换行\n    // ch字符采用 char 空格不会导致换行\n    // 包含en则用word 包含ch 采用char ?\n    // 后端的换行逻辑不止考虑语言层面的分词，还会考虑金额: 340元, 机器型号 a1020-3s之类也作为一个分词\n    // TODO:\n    // 如何一定要跟后端一样，考虑自己getContext画，\n    // 或者自己建个分词层（不是数据），在Konva.Text实例上应用内部方法_addTextLine（建议跟作者沟通，免得以后有库不支持的隐患）\n    // 暂时统一用char\n    ,\n    wrap: _constants_index__WEBPACK_IMPORTED_MODULE_39__.TEXT_WRAP_TYPE[lineWrapRule]\n    // 不是bug，需求如此\n    // wrap={isTextWrap ? 'char' : 'none'}\n    ,\n    ref: textShapeRef,\n    hitStrokeWidth: 0\n  }, \"name\", _constants_index__WEBPACK_IMPORTED_MODULE_39__.TEXT_NODE_CLASSNAME), \"lineHeight\", lineSpace)))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_23__.Rect // hover时边框\n  , (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    height: containerHeight,\n    width: containerWidth,\n    id: \"\".concat(id, \"_rect\"),\n    name: scaleClassname\n  }, transformEventsProp, {\n    // 这里不能靠customedStrokeElement判断\n    // dashEnabled={!isCell ? dashEnabled : (!customedStrokeElement || customedStrokeElement.props.children?.filter(Boolean).length !== 4) && dashEnabled}\n    dashEnabled: !isCell ? dashEnabled : dashEnabled && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_21___default()(_context20 = [_constants_index__WEBPACK_IMPORTED_MODULE_39__.ALL_BORDER]).call(_context20, gridBorderType),\n    listening: !isTemplate,\n    dash: defaultDash,\n    onDblClick: onDblClick,\n    onMouseDown: onMouseDown,\n    onContextMenu: onContextMenu,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    x: 0,\n    y: 0,\n    ref: transformRef,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    strokeEnabled: strokeEnabled\n  }, rectFillProp)), children, customedStrokeElement), TransformerComp);\n}), _utils_scu__WEBPACK_IMPORTED_MODULE_38__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (TextField);\n\n//# sourceURL=webpack://print-designer/./src/components/base/textField.tsx?");

/***/ }),

/***/ 9172:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28220);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41232);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n\n\n\nvar _excluded = [\"src\", \"getImageSize\", \"xPos\", \"yPos\", \"scale\", \"pixelRatio\", \"verAlignment\", \"horAlignment\"];\n\n\n\n\nvar URLImage = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_3__.forwardRef)(function (_ref, forwardedRef) {\n  var src = _ref.src,\n    getImageSize = _ref.getImageSize,\n    xPos = _ref.xPos,\n    yPos = _ref.yPos,\n    scale = _ref.scale,\n    pixelRatio = _ref.pixelRatio,\n    verAlignment = _ref.verAlignment,\n    horAlignment = _ref.horAlignment,\n    others = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_ref, _excluded);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useState, 2),\n    image = _useState2[0],\n    setImage = _useState2[1]; // 绑定给konva的image实例\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)({\n      width: 0,\n      height: 0,\n      left: 0,\n      top: 0\n    }),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useState3, 2),\n    imageSize = _useState4[0],\n    setImageSize = _useState4[1];\n  var imageWidth = imageSize.width,\n    imageHeight = imageSize.height,\n    left = imageSize.left,\n    top = imageSize.top;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);\n  var imageRef = forwardedRef || shapeRef;\n  // 当src变化时，重新加载image实例\n  (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n    var imageObj;\n    var handleLoad = function handleLoad() {\n      setImage(imageObj);\n    };\n    if (src) {\n      imageObj = new Image();\n      imageObj.addEventListener('load', handleLoad);\n      imageObj.src = src;\n    }\n    return function () {\n      var _imageObj;\n      (_imageObj = imageObj) === null || _imageObj === void 0 || _imageObj.removeEventListener('load', handleLoad);\n    };\n  }, [src]);\n  (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n    if (image !== null) {\n      var _width = image.width,\n        _height = image.height;\n      var widthToMM = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.calculatorPxtoMM)(_width, 1);\n      var heightToMM = (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.calculatorPxtoMM)(_height, 1);\n      setImageSize(getImageSize(widthToMM, heightToMM, verAlignment, horAlignment));\n    }\n  }, [setImageSize, getImageSize, image, verAlignment, horAlignment]);\n  if (!image) return null;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_4__.Image, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    ref: imageRef,\n    image: image,\n    width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.calculatorMMtoPx)(imageWidth, scale),\n    height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.calculatorMMtoPx)(imageHeight, scale),\n    x: left ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.calculatorMMtoPx)(left, scale) : undefined,\n    y: top ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_5__.calculatorMMtoPx)(top, scale) : undefined\n  }, others, {\n    // 需要添加，这里是容器子控件，会导致父缓存子的\n    name: _constants__WEBPACK_IMPORTED_MODULE_6__.NOT_CACHE_CLASSNAME\n  }));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (URLImage);\n\n//# sourceURL=webpack://print-designer/./src/components/common/baseImage.tsx?");

/***/ }),

/***/ 30380:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\nvar ModalBody = function ModalBody(props) {\n  var className = props.className,\n    row = props.row,\n    setRow = props.setRow,\n    column = props.column,\n    setColumn = props.setColumn,\n    errorTipShow = props.errorTipShow,\n    setErrorTipShow = props.setErrorTipShow;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(0),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    hoverRow = _useState2[0],\n    setHoverRow = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(0),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    hoverCol = _useState4[0],\n    setHoverCol = _useState4[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.DataContext);\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var handleCellClick = function handleCellClick(rowNum, colNum) {\n    rowNum = String(rowNum);\n    colNum = String(colNum);\n    setRow(rowNum);\n    setColumn(colNum);\n  };\n  var handleMouseLeave = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function () {\n    setHoverRow(0);\n    setHoverCol(0);\n  }, []);\n  var handleMouseOver = function handleMouseOver(rowNum, colNum) {\n    setHoverRow(rowNum);\n    setHoverCol(colNum);\n  };\n  var renderEllipsis = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function () {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"span\", {\n      className: \"exceed-cell\"\n    }, \"...\");\n  }, []);\n  var renderColumn = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (rowNum) {\n    var columnData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n    var exceedGrid = function exceedGrid(columnNum) {\n      return rowNum === 8 && row > 8 && columnNum <= column || columnNum === 10 && column > 10 && rowNum <= row;\n    };\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(columnData).call(columnData, function (colNum) {\n      var _context;\n      var isActive = rowNum <= row && colNum <= column;\n      var isHover = rowNum <= hoverRow && colNum <= hoverCol;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_6___default()({\n          cell: true,\n          active: isActive,\n          hover: !isActive && isHover\n        }),\n        key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = \"\".concat(rowNum, \"-\")).call(_context, colNum),\n        onClick: function onClick() {\n          return handleCellClick(rowNum, colNum);\n        },\n        onMouseOver: function onMouseOver() {\n          return handleMouseOver(rowNum, colNum);\n        }\n      }, exceedGrid(colNum) ? renderEllipsis() : null);\n    });\n  }, [row, column, hoverRow, hoverCol]);\n  var renderRow = function renderRow() {\n    var rowData = [1, 2, 3, 4, 5, 6, 7, 8];\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(rowData).call(rowData, function (num) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n        className: \"row\",\n        key: num\n      }, renderColumn(num));\n    });\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, errorTipShow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Alert, {\n    className: \"\".concat(className, \"-alert\"),\n    message: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0014'),\n    type: \"error\",\n    delayOffTime: 0,\n    closable: true,\n    showIcon: true,\n    onClose: function onClose() {\n      return setErrorTipShow(false);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: className\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-info\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-input\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"label\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0015')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.InputNumber, {\n    placeholder: \"\",\n    value: row,\n    style: language === 'en_US' ? {\n      width: 45\n    } : {},\n    onChange: function onChange(e) {\n      setRow(e.target.value);\n    }\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-input\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"label\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0016')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.InputNumber, {\n    placeholder: \"\",\n    value: column,\n    style: language === 'en_US' ? {\n      width: 45\n    } : {},\n    onChange: function onChange(e) {\n      setColumn(e.target.value);\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-main\",\n    onMouseLeave: handleMouseLeave\n  }, renderRow())));\n};\n\n// 网格设置向导\nvar GridGuideModal = function GridGuideModal(_ref) {\n  var visible = _ref.visible,\n    onCancel = _ref.onCancel,\n    meta = _ref.meta,\n    definition = _ref.definition,\n    onConfirm = _ref.onConfirm;\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState5, 2),\n    row = _useState6[0],\n    setRow = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState7, 2),\n    column = _useState8[0],\n    setColumn = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState9, 2),\n    errorTipShow = _useState10[0],\n    setErrorTipShow = _useState10[1];\n  var className = 'grid-settings';\n  var handleConfirm = function handleConfirm() {\n    if (!(Number(row) > 0) || !(Number(column) > 0)) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.console.log('errorTipShow', errorTipShow);\n      return setErrorTipShow(true);\n    } else if (errorTipShow) {\n      setErrorTipShow(false);\n    }\n    onConfirm({\n      row: row,\n      column: column\n    });\n  };\n  var footer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-modal-footer-btns\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Button, {\n    onClick: onCancel,\n    type: \"second\",\n    className: \"\".concat(className, \"-modal-cancel-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0011')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Button, {\n    className: \"\".concat(className, \"-modal-ok-btn\"),\n    type: \"primary\",\n    onClick: handleConfirm\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0012'))));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Modal, {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(ModalBody, {\n      className: \"\".concat(className, \"-body\"),\n      row: row,\n      setRow: setRow,\n      column: column,\n      setColumn: setColumn,\n      errorTipShow: errorTipShow,\n      setErrorTipShow: setErrorTipShow\n    }),\n    titleIcon: null,\n    maskClosable: false,\n    className: \"\".concat(className, \"-modal\"),\n    footer: footer,\n    width: 400,\n    height: 500,\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0017'),\n    destroyOnClose: true,\n    closable: true,\n    onCancel: onCancel,\n    onOk: function onOk() {\n      return null;\n    },\n    mask: true,\n    visible: visible\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (GridGuideModal);\n\n//# sourceURL=webpack://print-designer/./src/components/common/cardSetting.tsx?");

/***/ }),

/***/ 69652:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _print_assets_images_save_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12492);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nvar ModalBody = function ModalBody(props) {\n  var className = props.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"img\", {\n    src: _print_assets_images_save_png__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getLangMsg)('printd.components.key0018')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getLangMsg)('printd.components.key0019')));\n};\n\n// 数据表格向导\nvar ChangeLangModal = function ChangeLangModal(_ref) {\n  var visible = _ref.visible,\n    meta = _ref.meta,\n    definition = _ref.definition,\n    onConfirm = _ref.onConfirm,\n    onCancel = _ref.onCancel,\n    onClose = _ref.onClose;\n  var className = 'change-lang';\n  var handleCancel = function handleCancel() {\n    onCancel();\n  };\n  var handleConfirm = function handleConfirm() {\n    onConfirm();\n  };\n  var footer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-modal-footer-btns\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Button, {\n    onClick: handleCancel,\n    type: \"second\",\n    className: \"\".concat(className, \"-modal-cancel-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getLangMsg)('printd.components.key0020')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Button, {\n    className: \"\".concat(className, \"-modal-ok-btn\"),\n    type: \"primary\",\n    onClick: handleConfirm\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getLangMsg)('printd.components.key0021'))));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_1__.Modal, {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ModalBody, {\n      className: \"\".concat(className, \"-body\")\n    }),\n    maskClosable: false,\n    className: \"\".concat(className, \"-modal\"),\n    footer: footer,\n    bodyStyle: {\n      display: 'flex',\n      alignItems: 'center',\n      justifyContent: 'center'\n    },\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getLangMsg)('printd.components.key0018'),\n    type: \"confirm\",\n    destroyOnClose: true,\n    onCancel: onClose,\n    onOk: handleConfirm,\n    mask: true,\n    visible: visible\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ChangeLangModal);\n\n//# sourceURL=webpack://print-designer/./src/components/common/changeLangModal.tsx?");

/***/ }),

/***/ 2680:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31408);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30479);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(48560);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(98092);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75252);\n/* harmony import */ var _utils_shape__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(82795);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(21980);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(41232);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _utils_controlType__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98600);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar DEFAULT_TRANSFORMER_ANCHOR_SIZE = 7;\n// const defaultBoundBoxFunc = (oldBox: Konva.RectConfig, newBox: Konva.RectConfig) => {\n//   // limit resize\n//   if ((newBox.width || 0) < 5 || (newBox.height || 0) < 5) {\n//     return oldBox\n//   }\n//   return newBox\n// }\n// 这样可能会有性能问题\nvar ControlTransformer = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_9__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_9__.forwardRef)(function (props, forwardedRef) {\n  var stageRef = props.stageRef,\n    rootControlRef = props.rootControlRef,\n    selectedId = props.selectedId,\n    parentId = props.parentId,\n    _props$isCell = props.isCell,\n    isCell = _props$isCell === void 0 ? false : _props$isCell,\n    _props$isSelected = props.isSelected,\n    isSelected = _props$isSelected === void 0 ? false : _props$isSelected,\n    _props$isLastSelected = props.isLastSelected,\n    isLastSelected = _props$isLastSelected === void 0 ? false : _props$isLastSelected,\n    forwardRef = props.trRef,\n    _props$rotateEnabled = props.rotateEnabled,\n    rotateEnabled = _props$rotateEnabled === void 0 ? false : _props$rotateEnabled,\n    _props$resizeEnabled = props.resizeEnabled,\n    resizeEnabled = _props$resizeEnabled === void 0 ? true : _props$resizeEnabled,\n    id = props.id,\n    dataContext = props.dataContext,\n    _props$enabledAnchors = props.enabledAnchors,\n    enabledAnchors = _props$enabledAnchors === void 0 ? ['top-left', 'top-center', 'top-right', 'middle-right', 'middle-left', 'bottom-left', 'bottom-center', 'bottom-right'] : _props$enabledAnchors,\n    bc = props.boundBoxFunc,\n    controlGroupRef = props.controlGroupRef,\n    _props$isGlobal = props.isGlobal,\n    isGlobal = _props$isGlobal === void 0 ? false : _props$isGlobal,\n    _props$refLineRef = props.refLineRef,\n    refLineRef = _props$refLineRef === void 0 ? {} : _props$refLineRef,\n    padding = props.padding;\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);\n  var trRef = forwardRef || ref;\n  var defaultBoundBoxFunc = function defaultBoundBoxFunc(originOldBox, originNewBox) {\n    var _dataContext$findCont;\n    var parentNode = stageRef.current.findOne(\"#\".concat((_dataContext$findCont = dataContext.findControl(selectedId)) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont.parentId));\n    var rootRect = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_12__.getAbsolutePosition)(parentNode || rootControlRef.current);\n    var x = rootRect.x,\n      y = rootRect.y,\n      width = rootRect.width,\n      height = rootRect.height,\n      bottom = rootRect.bottom;\n    var oldBox = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.getCalcPosObj)(originOldBox);\n    var newBox = (0,_utils__WEBPACK_IMPORTED_MODULE_15__.getCalcPosObj)(originNewBox);\n    var _ref = refLineRef.current || {},\n      searchRefLines = _ref.searchRefLines;\n    var activeAnchor = trRef.current.getActiveAnchor();\n    var refPosition = searchRefLines && searchRefLines(selectedId, true, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, newBox, {\n      activeAnchor: activeAnchor\n    }));\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('refPosition out', refPosition);\n    if (refPosition && !lodash__WEBPACK_IMPORTED_MODULE_17___default().isEmpty(refPosition)) {\n      var _context;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('refPosition', refPosition);\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('refPosition', oldBox, newBox);\n      // FIX: 缩放要结合newBox，但是还要继续走\n      // 但是这样如果下面溢出了，那吸附效果就没了\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4___default()(refPosition)).call(_context, function (_ref2) {\n        var _ref3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref2, 2),\n          key = _ref3[0],\n          value = _ref3[1];\n        // fix【PG质量加固】【新打印】控件拖入页眉页脚后，无法缩放。缩放图标也很难显示，选中太不便\n        // 缩放时垂直居中、水平居中的辅助线不参与吸附，必须过滤掉\n        if (!lodash__WEBPACK_IMPORTED_MODULE_17___default().isUndefined(value)) {\n          newBox[key] = value;\n        }\n      });\n      // Object.assign(newBox, refPosition)\n      // return refPosition\n    }\n\n    // limit resize\n    // TODO：规范\n    // 表格特殊\n    if ((0,_utils_shape__WEBPACK_IMPORTED_MODULE_13__.isShapeOverflow)(oldBox, rootRect)) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('isShapeOverflow(oldBox, rootRect)', oldBox, newBox, rootRect, _utils_shape__WEBPACK_IMPORTED_MODULE_13__.isShapeOverflow);\n      // 其实只有表格传\n      // TODO:考虑所有传？\n      if (dataContext && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_14__.isGridType)(dataContext.findControl(id))) {\n        // 如果完全溢出的话也自由吧\n        // const box = {}\n        // 左上角不在纸张内，自由\n        // 由于拖拽出去左上角会导致x y 为负数，不会进这一分支\n        if (oldBox.x > x + width || oldBox.x < x || oldBox.y < y || oldBox.y > y + height) {\n          return newBox;\n        }\n        // 如果是左上角的话?\n        // TODO:\n        return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, oldBox, {\n          width: oldBox.width > width ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(x + width - oldBox.x, 1) : oldBox.width,\n          height: oldBox.height > height ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(y + height - oldBox.y, 1) : oldBox.height\n        });\n      } else {\n        return newBox;\n      }\n    }\n    // if ((newBox.width || 0) < 5 || (newBox.height || 0) < 5) {\n    //   // 这里要补齐\n    //   // 因为19.9 缩放没法精确控制（辅助线？）\n    //   // TODO: 补齐\n    //   console.log('isShapeOverflow(newBox, rootRect)', oldBox, newBox, rootRect, isShapeOverflow)\n    //   return oldBox\n    // }\n    if ((0,_utils_shape__WEBPACK_IMPORTED_MODULE_13__.isShapeOverflow)(newBox, rootRect)) {\n      if (newBox.x !== oldBox.x || newBox.y !== oldBox.y) {\n        return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, oldBox, {\n          x: newBox.x < rootRect.x ? rootRect.x : oldBox.x,\n          y: newBox.y < rootRect.y ? rootRect.y : oldBox.y,\n          width: newBox.x < rootRect.x ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(newBox.width + (newBox.x - rootRect.x), 1) : oldBox.width,\n          height: newBox.y < rootRect.y ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(newBox.height + (newBox.y - rootRect.y), 1) : oldBox.height\n        });\n      }\n      return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, oldBox, {\n        width: (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(newBox.x + newBox.width, 1) > (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(rootRect.x + rootRect.width, 1) ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(rootRect.x + rootRect.width - newBox.x, 1) : oldBox.width,\n        height: (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(newBox.y + newBox.height, 1) > (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(rootRect.y + rootRect.height, 1) ? (0,_utils__WEBPACK_IMPORTED_MODULE_15__.toFloorFix)(rootRect.y + rootRect.height - newBox.y, 1) : oldBox.height\n      });\n    }\n\n    // 高度不允许超过父容器\n    var currentNode = dataContext && dataContext.findControl(selectedId);\n    if (currentNode && (0,_utils_controlType__WEBPACK_IMPORTED_MODULE_18__.isFooter)(currentNode)) {\n      // 页脚特殊处理，只要小于父的高度即可\n      if (newBox.height > height) {\n        return oldBox;\n      }\n    } else {\n      if (newBox.y + newBox.height > bottom) {\n        return oldBox;\n      }\n    }\n    if (newBox.height === 0) {\n      return oldBox; // 为0会导致Konva内部异常\n    }\n    return newBox;\n  };\n  var boundBoxFunc = bc || defaultBoundBoxFunc;\n  // const isSelected = !!selectedId\n  var dashRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(false);\n  var attachNodeHelper = (0,react__WEBPACK_IMPORTED_MODULE_9__.useCallback)(function () {\n    if (isSelected) {\n      var _stageRef$current;\n      // we need to attach transformer manually\n      // 这里用Rect会不一致\n      // 用Group又会导致嵌套在Group下的文本也会一起缩放\n      // 文本不嵌套又有问题,例如由于层叠导致的点击、拖拽问题\n      // 用Rect就要去修正其他元素的缩放问题\n      var node = (_stageRef$current = stageRef.current) === null || _stageRef$current === void 0 ? void 0 : _stageRef$current.findOne(function (node) {\n        var _context2;\n        var names = node.name().split(' ');\n        return _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_5___default()(_context2 = [selectedId.toString(), _constants__WEBPACK_IMPORTED_MODULE_11__.SCALE_NODE_CLASSNAME]).call(_context2, function (name) {\n          return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_6___default()(names).call(names, name);\n        });\n      });\n      // const node = stageRef.current.findOne(`#${selectedId}`)\n      if (node) {\n        var _trRef$current;\n        (_trRef$current = trRef.current) === null || _trRef$current === void 0 || _trRef$current.nodes([node]);\n        if (controlGroupRef !== null && controlGroupRef !== void 0 && controlGroupRef.current) {\n          var _trRef$current2, _controlGroupRef$curr;\n          (_trRef$current2 = trRef.current) === null || _trRef$current2 === void 0 || _trRef$current2.zIndex(Math.max(((_controlGroupRef$curr = controlGroupRef.current) === null || _controlGroupRef$curr === void 0 ? void 0 : _controlGroupRef$curr.children.length) - 2, 0));\n        }\n        // 交由全局更新\n        // trRef.current?.forceUpdate()\n      } else {\n        var _trRef$current3;\n        // fix: 整行合并单元格插入行列，多一个global的缩放格子\n        // TODO: 这里疑似KonvaReact的问题, 共用了attachNode\n        (_trRef$current3 = trRef.current) === null || _trRef$current3 === void 0 || _trRef$current3.detach();\n      }\n    }\n  }, [isSelected, selectedId, parentId]);\n  react__WEBPACK_IMPORTED_MODULE_9___default().useEffect(function () {\n    if (!isGlobal) {\n      attachNodeHelper();\n    }\n  }, [isSelected, selectedId, parentId, isGlobal]);\n  (0,react__WEBPACK_IMPORTED_MODULE_9__.useEffect)(function () {\n    var callback = function callback(e) {\n      var _trRef$current4;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('e.ctrlKe shapeRef.current?.stopDrag()');\n      if ((_trRef$current4 = trRef.current) !== null && _trRef$current4 !== void 0 && _trRef$current4.isTransforming()) {\n        var _trRef$current5;\n        (_trRef$current5 = trRef.current) === null || _trRef$current5 === void 0 || _trRef$current5.stopTransform();\n      }\n    };\n    isGlobal && document.addEventListener('keydown', callback);\n    return function () {\n      isGlobal && document.removeEventListener('keydown', callback);\n    };\n  }, [isGlobal]);\n  if (isGlobal) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_7___default()(function () {\n      attachNodeHelper();\n    });\n  }\n\n  // 废弃\n  (0,react__WEBPACK_IMPORTED_MODULE_9__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      showDash: function showDash() {\n        var _trRef$current6, _trRef$current7;\n        if (dashRef.current || !isSelected) return;\n        (_trRef$current6 = trRef.current) === null || _trRef$current6 === void 0 || _trRef$current6.borderDash([2, 2]);\n        (_trRef$current7 = trRef.current) === null || _trRef$current7 === void 0 || _trRef$current7.forceUpdate();\n        dashRef.current = true;\n      },\n      hideDash: function hideDash() {\n        var _trRef$current8, _trRef$current9;\n        if (!dashRef.current || !isSelected) return;\n        (_trRef$current8 = trRef.current) === null || _trRef$current8 === void 0 || _trRef$current8.borderDash([]);\n        (_trRef$current9 = trRef.current) === null || _trRef$current9 === void 0 || _trRef$current9.forceUpdate();\n        dashRef.current = false;\n      },\n      mouseEnter: function mouseEnter(color) {\n        var _trRef$current10, _trRef$current11, _trRef$current12;\n        (_trRef$current10 = trRef.current) === null || _trRef$current10 === void 0 || _trRef$current10.borderStroke(color);\n        (_trRef$current11 = trRef.current) === null || _trRef$current11 === void 0 || _trRef$current11.visible(true);\n        (_trRef$current12 = trRef.current) === null || _trRef$current12 === void 0 || _trRef$current12.forceUpdate();\n      },\n      mouseLeave: function mouseLeave() {\n        var _trRef$current13, _trRef$current14, _trRef$current15;\n        (_trRef$current13 = trRef.current) === null || _trRef$current13 === void 0 || _trRef$current13.borderStroke(_constants__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_TRANSFORMER_BORDER_COLOR);\n        (_trRef$current14 = trRef.current) === null || _trRef$current14 === void 0 || _trRef$current14.visible(false);\n        (_trRef$current15 = trRef.current) === null || _trRef$current15 === void 0 || _trRef$current15.forceUpdate();\n      }\n    };\n  }, [isSelected, selectedId]);\n  if (isLastSelected) designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('isLastSelected', trRef);\n  // 不跟随比例\n  return isSelected ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_10__.Transformer, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    ref: trRef,\n    id: \"transformer_\".concat(selectedId),\n    resizeEnabled: resizeEnabled && isLastSelected && !isCell,\n    rotateEnabled: rotateEnabled,\n    anchorStroke: _constants__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_TRANSFORMER_BORDER_COLOR,\n    keepRatio: false,\n    ignoreStroke: true\n    // 神奇，这样可以做到内边框\n    ,\n    padding: isCell ? -1 : 0,\n    anchorSize: DEFAULT_TRANSFORMER_ANCHOR_SIZE\n    // anchorCornerRadius={DEFAULT_TRANSFORMER_ANCHOR_SIZE}\n    ,\n    enabledAnchors: enabledAnchors,\n    borderStroke: _constants__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_TRANSFORMER_BORDER_COLOR,\n    borderStrokeWidth: isCell ? 2 : 1,\n    boundBoxFunc: boundBoxFunc\n  }, \"padding\", padding)) : null;\n}), function (prevProps, nextProps) {\n  if (prevProps.isGlobal || nextProps.isGlobal) return false;\n  return _babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_8___default()(nextProps, prevProps);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (ControlTransformer);\n\n//# sourceURL=webpack://print-designer/./src/components/common/controlTransformer.tsx?");

/***/ }),

/***/ 21920:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(58496);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(32064);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _hooks_useMeasureDirty__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(99252);\n/* harmony import */ var _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(36324);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(77620);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"controlType\", \"draggable\", \"checkable\", \"meta\", \"definition\", \"onSelect\", \"onCheck\", \"checkedKeys\", \"showDefinitionId\", \"showDataSourceTitle\", \"filterTreeData\", \"emptyNode\", \"onDataChange\", \"scrollToKey\", \"expandedKeys\"];\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context14; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6___default()(_context14 = Object.prototype.toString.call(o)).call(_context14, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context12, _context13; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18___default()(_context12 = ownKeys(Object(t), !0)).call(_context12, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18___default()(_context13 = ownKeys(Object(t))).call(_context13, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar DataSourceTreeNodeIcon = function DataSourceTreeNodeIcon(_ref) {\n  var type = _ref.type,\n    _ref$style = _ref.style,\n    style = _ref$style === void 0 ? {} : _ref$style;\n  if (type) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__.Icon, {\n      prefix: \"printdesignericon\",\n      type: type,\n      style: style\n    });\n  } else {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"zidingyi\",\n      style: style\n    });\n  }\n};\nvar defaultFilterTreeData = function defaultFilterTreeData(definition) {\n  return definition;\n};\nvar TreeNodeComponent = function TreeNodeComponent(_ref2) {\n  var name = _ref2.name,\n    type = _ref2.type,\n    isDsRoot = _ref2.isDsRoot,\n    _ref2$tag = _ref2.tag,\n    tag = _ref2$tag === void 0 ? {} : _ref2$tag;\n  // TODO: className维护\n  // const isShowTag = Object.assign({}, DSTYPE_MAP).includes(dsType)\n  var tagColor = tag.Color,\n    tagName = tag.Name;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"span\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()('kds-tree-node', {\n      'kds-tree-node-tag': isDsRoot\n    })\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(DataSourceTreeNodeIcon, {\n    type: type\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"span\", {\n    style: {\n      marginLeft: 3\n    }\n  }, name), tagName && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__.Tag, {\n    style: {\n      marginLeft: 16\n    },\n    type: \"attribute\",\n    color: tagColor,\n    className: \"kds-tree-tag\"\n  }, tagName));\n};\n/**\n *\n  Root(\"Root\"),//根节点，预览\n  Sys(\"Sys\"),//系统字段\n  Main(\"Main\"),//主数据源\n  Ref(\"Ref\"),//引入数据源\n  Custom(\"Custom\"), //自定义数据源\n  Workflow(\"Workflow\"), //自定义数据源\n\n  //以下节点可能在主数据源，引入数据源中出现。目前只有单体，子单据体\n  Head(\"Head\"),//体单头.预留\n  Entry(\"Entry\"),//单体\n  Subentry(\"Subentry\"),//子分录\n  Approveline(\"Approveline\"),//工作流.审批线路\n  Approveactivity(\"Approveactivity\"),//工作流.审批节点\n  Attach(\"Attach\");//附件面板\n * @param definition\n * @param showDefinitionId\n */\n// 注意：这里跟选择数据源规则相关\n// const notShowDefinitionIdParentDsType = ['Sys', 'Approveline', 'Approveactivity', 'Attach']\nvar notShowDefinitionIdParentDsType = ['Sys'];\nvar root = ['Workflow'];\nvar dealTreeData = function dealTreeData(controlType, definition, showDefinitionId) {\n  var _context;\n  var checkable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n  var isFirstIterator = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n  var parentDsType = arguments.length > 5 ? arguments[5] : undefined;\n  var parentIsDataGridDs = arguments.length > 6 ? arguments[6] : undefined;\n  var parentIsSubDataDataGridDs = arguments.length > 7 ? arguments[7] : undefined;\n  return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19___default()(definition).call(definition, function (def) {\n    var _context2;\n    var name = def.Name,\n      Type = def.Type,\n      Items = def.Items,\n      Key = def.Key,\n      DsType = def.DsType,\n      IsDataGridDs = def.IsDataGridDs,\n      IsSubDataGridDs = def.IsSubDataGridDs,\n      Tag = def.Tag,\n      IsDs = def.IsDs,\n      viewName = def.ViewName,\n      dataSourceKey = def.dataSource,\n      currentFieldKey = def.bindField,\n      Icon = def.Icon;\n    var children = Items ? {\n      children: dealTreeData(controlType, Items, showDefinitionId, checkable, false, DsType || parentDsType, IsDataGridDs || parentIsDataGridDs, IsSubDataGridDs || parentIsSubDataDataGridDs)\n    } : {};\n    var Name = viewName || name;\n    // const currentDataSource = parentIsDs && parentKey\n    // 这里怎么表示第一层，没有字段只能用层级了\n    return _objectSpread(_objectSpread({\n      // key: ancestorKey ? `${ancestorKey}.${Key}` : Key,\n      key: (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_27__.createDataSourceNodeKey)(dataSourceKey, currentFieldKey),\n      title: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(TreeNodeComponent, {\n        isDsRoot: isFirstIterator,\n        type: Icon || Type,\n        name: !showDefinitionId ? Name : (isFirstIterator ? DsType === 'Sys' : _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default()(notShowDefinitionIdParentDsType).call(notShowDefinitionIdParentDsType, parentDsType)) ? Name : _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21___default()(_context2 = \"\".concat(Name, \"(\")).call(_context2, Key, \")\"),\n        tag: Tag\n      }),\n      type: Type,\n      dataSource: dataSourceKey,\n      bindField: currentFieldKey,\n      dsType: DsType || parentDsType,\n      isDataGridDs: IsDataGridDs || parentIsDataGridDs,\n      isSubDataGridDs: IsSubDataGridDs || parentIsSubDataDataGridDs,\n      viewName: viewName\n    }, children), {}, {\n      checkable: checkable && !(Items && Items.length) && controlType !== 'CardGrid',\n      selectable: !Items && !checkable || controlType === 'CardGrid' && !(Items && Items.length),\n      expandOnClickNode: controlType === 'CardGrid'\n    }, def);\n  })).call(_context, Boolean);\n};\nvar searchTreeData = function searchTreeData(treeData, searchVal) {\n  var filterFunc = function filterFunc(data, filterValue) {\n    return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(data).call(data, function (item) {\n      var _ref3, _context3;\n      // 需要将Name改为ViewName\n      if ((0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(item.Name) === 'object') {\n        var _item$Name;\n        item.Name = (_item$Name = item.Name) === null || _item$Name === void 0 ? void 0 : _item$Name.zh_CN;\n      }\n      if ((((_ref3 = item.ViewName || item.Name) === null || _ref3 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_22___default()(_ref3).call(_ref3, filterValue)) !== -1 || _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_22___default()(_context3 = item.Key.toLowerCase()).call(_context3, filterValue) > -1) && (!item.children || item.children.length === 0)) {\n        return true;\n      }\n      var childrenFilterData = item.children && filterFunc(item.children, filterValue);\n      if ((childrenFilterData === null || childrenFilterData === void 0 ? void 0 : childrenFilterData.length) > 0) {\n        item.children = childrenFilterData;\n        return true;\n      }\n    });\n  };\n  return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19___default()(treeData).call(treeData, function (treeObj) {\n    var children = treeObj === null || treeObj === void 0 ? void 0 : treeObj.children;\n    if (!children) {\n      return treeObj;\n    }\n    var filteredChildren = filterFunc(treeObj.children, searchVal);\n    return _objectSpread(_objectSpread({}, treeObj), {}, {\n      children: filteredChildren\n    });\n  });\n};\nvar getAllKeys = function getAllKeys(dataSource) {\n  var keys = [];\n  var getKey = function getKey(item, arr) {\n    var key = item.key,\n      Items = item.Items,\n      dataSourceKey = item.dataSource,\n      currentFieldKey = item.bindField;\n    key = key || (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_27__.createDataSourceNodeKey)(dataSourceKey, currentFieldKey);\n    arr.push(key);\n    Items && _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18___default()(Items).call(Items, function (i) {\n      return getKey(i, arr);\n    });\n  };\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_18___default()(dataSource).call(dataSource, function (data) {\n    getKey(data, keys);\n  });\n  return keys;\n};\nvar getNodeExistByKey = function getNodeExistByKey(dataSource, nodeKey) {\n  var _iterator = _createForOfIteratorHelper(dataSource),\n    _step;\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var _step$value = _step.value,\n        key = _step$value.key,\n        children = _step$value.children;\n      if (nodeKey === key) return true;\n      if (children && children.length) {\n        var res = getNodeExistByKey(children, nodeKey);\n        if (res) return res;\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n  return false;\n};\nfunction SearchEmptyNode(_ref4) {\n  var className = _ref4.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_30__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0004')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0004')));\n}\nvar DataSourceTree = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_23__.memo)(function (_ref5) {\n  var controlType = _ref5.controlType,\n    draggable = _ref5.draggable,\n    checkable = _ref5.checkable,\n    meta = _ref5.meta,\n    definition = _ref5.definition,\n    onSelect = _ref5.onSelect,\n    onCheck = _ref5.onCheck,\n    _ref5$checkedKeys = _ref5.checkedKeys,\n    checkedKeys = _ref5$checkedKeys === void 0 ? [] : _ref5$checkedKeys,\n    showDefinitionId = _ref5.showDefinitionId,\n    showDataSourceTitle = _ref5.showDataSourceTitle,\n    _ref5$filterTreeData = _ref5.filterTreeData,\n    filterTreeData = _ref5$filterTreeData === void 0 ? defaultFilterTreeData : _ref5$filterTreeData,\n    emptyNode = _ref5.emptyNode,\n    onDataChange = _ref5.onDataChange,\n    scrollToKey = _ref5.scrollToKey,\n    expandedKeys = _ref5.expandedKeys,\n    others = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(_ref5, _excluded);\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_23__.useRef)(null);\n  var previousExpandKeys = (0,react__WEBPACK_IMPORTED_MODULE_23__.useRef)([]);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_23__.useState)(''),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useState, 2),\n    inputVal = _useState2[0],\n    setInputVal = _useState2[1];\n  if (scrollToKey) {\n    console.log(scrollToKey);\n  }\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_23__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useState3, 2),\n    defaultExpandAll = _useState4[0],\n    setDefaultExpandAll = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_23__.useState)([scrollToKey]),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useState5, 2),\n    selectedKeys = _useState6[0],\n    setSelectedKeys = _useState6[1];\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_23__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.SelectionContext);\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_23__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.DataContext);\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_23__.useState)(''),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useState7, 2),\n    rootControlType = _useState8[0],\n    setRootControlType = _useState8[1];\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_23__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.GlobalConfigContext),\n    env = _useContext.env;\n  var selection = selectionContext.getSelection();\n  // const isRootSelected = activedSelectId === rootId\n  // const { selectItem } = useLastSelectedModal({ selectionContext, dataContext, meta })\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_23__.useState)(function () {\n      return dealTreeData(controlType, filterTreeData(definition), showDefinitionId, checkable);\n    }),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useState9, 2),\n    dataSource = _useState10[0],\n    setDataSource = _useState10[1];\n  var scrollToKeyProps = (0,react__WEBPACK_IMPORTED_MODULE_23__.useMemo)(function () {\n    if (scrollToKey) {\n      var hasNode = getNodeExistByKey(dataSource, scrollToKey);\n      console.log('dataSource---------', dataSource, hasNode, scrollToKey);\n      return hasNode ? {\n        scrollToKey: scrollToKey\n      } : {};\n    }\n    return {};\n  }, [scrollToKey, dataSource]);\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_23__.useState)(function () {\n      var _context5;\n      var expandAll = others.expandAll;\n      var keys = [];\n      if (expandAll) {\n        keys = getAllKeys(dataSource);\n      } else {\n        var _context4;\n        keys = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19___default()(_context4 = dataSource || []).call(_context4, function (node) {\n          return node.key;\n        });\n      }\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21___default()(_context5 = []).call(_context5, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(keys), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(expandedKeys || []));\n    }),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useState11, 2),\n    expandNodeKeys = _useState12[0],\n    setExpandNodeKeys = _useState12[1];\n  function getCurrentDataSource(id) {\n    var _context6;\n    var data = dataContext.findControl(id) || {};\n    var parentData = dataContext.findControl(data.parentId) || {};\n    if (data && data !== null && data !== void 0 && data.parentId && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default()(_context6 = ['Text', 'Barcode', 'QRCode', 'Image']).call(_context6, data.type)) {\n      var _context7;\n      var rootData = dataContext.findControl(parentData.parentId) || {};\n      var isGridCell = rootData.type === 'DataGrid' && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default()(_context7 = ['Detail', 'Group']).call(_context7, parentData.cellType);\n      return (rootData.type === 'CardGrid' || isGridCell) && rootData.dataSource;\n    } else {\n      var _context8;\n      var _isGridCell = parentData.type === 'DataGrid' && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default()(_context8 = ['Detail', 'Group']).call(_context8, data.cellType);\n      return (parentData.type === 'CardGrid' || _isGridCell) && parentData.dataSource;\n    }\n  }\n  (0,react__WEBPACK_IMPORTED_MODULE_23__.useEffect)(function () {\n    controlType && setRootControlType(controlType);\n  }, [controlType]);\n  (0,react__WEBPACK_IMPORTED_MODULE_23__.useEffect)(function () {\n    var dataSource = getCurrentDataSource(selection[0]);\n    if (dataSource && controlType !== 'SubDataGrid') {\n      definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_31__.filterCardFieldDataSourceByDsType)(dataSource, definition);\n    }\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_23__.useEffect)(function () {\n    setDataSource(function (dataSource) {\n      var _context9;\n      var newDataSource = dealTreeData(controlType, filterTreeData(definition), showDefinitionId, checkable);\n      var newKeys = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19___default()(_context9 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(newDataSource).call(newDataSource, function (node) {\n        var dataSourceKeys = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_19___default()(dataSource).call(dataSource, function (item) {\n          return item.key;\n        });\n        return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default()(dataSourceKeys).call(dataSourceKeys, node.key);\n      })).call(_context9, function (node) {\n        return node.key;\n      });\n      setExpandNodeKeys(function (keys) {\n        var _context10;\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21___default()(_context10 = []).call(_context10, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(keys), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(newKeys));\n      });\n      return newDataSource;\n    });\n  }, [definition, checkable]);\n  (0,react__WEBPACK_IMPORTED_MODULE_23__.useEffect)(function () {\n    setDataSource(function () {\n      var treeData = dealTreeData(controlType, filterTreeData(definition), showDefinitionId, checkable);\n      var newDataSource = searchTreeData(treeData, inputVal);\n      if (controlType !== 'CardGrid') {\n        newDataSource = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(newDataSource).call(newDataSource, function (treeObj) {\n          var _treeObj$children;\n          return treeObj === null || treeObj === void 0 || (_treeObj$children = treeObj.children) === null || _treeObj$children === void 0 ? void 0 : _treeObj$children.length;\n        });\n      }\n      return newDataSource;\n    });\n  }, [showDefinitionId]);\n  (0,react__WEBPACK_IMPORTED_MODULE_23__.useEffect)(function () {\n    onDataChange && onDataChange(dataSource);\n  }, [dataSource]);\n\n  // 选中重置\n  (0,react__WEBPACK_IMPORTED_MODULE_23__.useEffect)(function () {\n    if (selectedKeys.length && !scrollToKey) {\n      setSelectedKeys([]);\n    }\n  }, [selection, scrollToKey]);\n  var handleControlSearch = function handleControlSearch(e) {\n    var value = e.target.value;\n    var newTreeData = dealTreeData(controlType, filterTreeData(definition), showDefinitionId, checkable);\n    if (!value) {\n      if (!lodash__WEBPACK_IMPORTED_MODULE_25___default().isEqual(newTreeData, dataSource)) {\n        setDataSource(newTreeData);\n      }\n      setExpandNodeKeys(previousExpandKeys.current);\n      // setDefaultExpandAll(false)\n    } else {\n      var newDataSource = searchTreeData(newTreeData, value);\n      if (controlType !== 'CardGrid') {\n        newDataSource = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(newDataSource).call(newDataSource, function (treeObj) {\n          var _treeObj$children2;\n          return treeObj === null || treeObj === void 0 || (_treeObj$children2 = treeObj.children) === null || _treeObj$children2 === void 0 ? void 0 : _treeObj$children2.length;\n        });\n      }\n      console.log('newDataSource', newDataSource);\n      if (!inputVal) {\n        // 存储在未搜索之前时的状态\n        previousExpandKeys.current = expandNodeKeys;\n      }\n      setDataSource(newDataSource);\n      var allKeys = getAllKeys(newDataSource);\n      setExpandNodeKeys(allKeys);\n      // setDefaultExpandAll(true)\n    }\n    setInputVal(value);\n  };\n  var onSelectProxy = function onSelectProxy(selectedKeys, _ref6) {\n    var checked = _ref6.checked,\n      node = _ref6.node,\n      event = _ref6.event;\n    setSelectedKeys(selectedKeys);\n    if (controlType === 'CardGrid') {\n      node.key = [node.key];\n      onSelect(node, controlType);\n    } else {\n      onSelect(checked, node, event);\n    }\n  };\n  var onExpand = function onExpand(keys, _ref7) {\n    var _context11;\n    var expanded = _ref7.expanded,\n      node = _ref7.node;\n    var key = node.key;\n    console.log('onExpand', expandNodeKeys, defaultExpandAll, scrollToKeyProps);\n    var allKeys = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(keys).call(keys, Boolean);\n    allKeys = expanded ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_21___default()(_context11 = [key]).call(_context11, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(allKeys)) : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(allKeys).call(allKeys, function (item) {\n      return item !== key;\n    });\n    setExpandNodeKeys(allKeys);\n  };\n  var onDragStart = (0,react__WEBPACK_IMPORTED_MODULE_23__.useCallback)(function (_ref8) {\n    var e = _ref8.event,\n      node = _ref8.node;\n    if (((node === null || node === void 0 ? void 0 : node.Items) || []).length) {\n      // 父节点，阻止拖拽\n      return e.preventDefault();\n    }\n    e = e || window.event;\n    e.currentTarget.style.backgroundColor = '#fff';\n    e.currentTarget.style.color = '#000';\n    var data = {};\n    for (var key in node) {\n      if (typeof node[key] !== 'function' && key !== 'title') {\n        data[key] = node[key];\n      }\n    }\n    console.log('onDragStart', data);\n    var dragData = {\n      type: 'dataSource',\n      data: data,\n      showDataSourceTitle: showDataSourceTitle\n    };\n    env[designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.CONTROL_DRAG_DATA] = dragData;\n  }, [showDataSourceTitle]);\n  var onDragEnd = (0,react__WEBPACK_IMPORTED_MODULE_23__.useCallback)(function (_ref9) {\n    var e = _ref9.event,\n      node = _ref9.node;\n    e = e || window.event;\n    e.currentTarget.style.backgroundColor = '';\n    e.currentTarget.style.color = '';\n  }, []);\n  var setTreeNodeClassName = (0,react__WEBPACK_IMPORTED_MODULE_23__.useCallback)(function (node) {\n    var key = node.Key,\n      children = node.Items,\n      fieldKey = node.key,\n      DsType = node.DsType;\n    var baseCls = 'print-tree-node';\n    // 分组下的子节点，文本颜色为#666\n    var isField = !(children && children.length) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_20___default()(fieldKey).call(fieldKey, '.');\n    var isParent = children && children.length;\n    if (isField) {\n      baseCls += ' print-tree-node-children';\n    }\n    if (isParent) {\n      baseCls += ' print-tree-node-parent';\n    }\n    if (controlType === 'CardGrid') {\n      return baseCls;\n    }\n    // 这里是因为只要首层节点\n    if (DsType === 'Main' || DsType === 'Custom' || DsType === 'Sys' || DsType === 'Ref') {\n      baseCls += ' print-tree-root';\n    }\n    return baseCls;\n  }, [dataSource]);\n  var _useMeasureDirty = (0,_hooks_useMeasureDirty__WEBPACK_IMPORTED_MODULE_29__.useMeasureDirty)(),\n    _useMeasureDirty2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_useMeasureDirty, 2),\n    treeContainerRef = _useMeasureDirty2[0],\n    _useMeasureDirty2$ = _useMeasureDirty2[1],\n    height = _useMeasureDirty2$.height,\n    width = _useMeasureDirty2$.width;\n  console.log('scrollToKeyProps------', scrollToKey);\n  if (!inputVal && !(dataSource !== null && dataSource !== void 0 && dataSource.length) && emptyNode) {\n    return emptyNode;\n  }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement((react__WEBPACK_IMPORTED_MODULE_23___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__.Input, {\n    style: {\n      marginBottom: 12,\n      width: '100%'\n    },\n    ref: inputRef,\n    value: inputVal,\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.components.key0022'),\n    borderType: \"bordered\",\n    onChange: handleControlSearch,\n    allowClear: true,\n    suffix: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__.Icon, {\n      type: \"search\",\n      style: {\n        cursor: 'pointer'\n      }\n    }))\n  }), inputVal && !(dataSource !== null && dataSource !== void 0 && dataSource.length) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(SearchEmptyNode, {\n    className: \"left-datasource\"\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"div\", {\n    className: \"kd-datasource-tree\",\n    ref: treeContainerRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(\"div\", {\n    className: \"tree-wrap\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_23___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_24__.Tree\n  // style={{\n  //   height: height\n  // }}\n  , (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({\n    name: \"definition\",\n    draggable: !!draggable,\n    checkable: !!checkable,\n    setTreeNodeClassName: setTreeNodeClassName\n    // kui bug待修复\n  }, scrollToKeyProps, {\n    // defaultExpandAll={defaultExpandAll}\n    expandedKeys: expandNodeKeys,\n    showIcon: false\n    // checkable\n    ,\n    style: {\n      width: '100%'\n    },\n    onDragStart: onDragStart,\n    onDragEnd: onDragEnd\n    // scrollToKey生效这个onExpand会导致收不起来\n    ,\n    onExpand: onExpand,\n    treeData: dataSource,\n    onSelect: onSelectProxy,\n    selectedKeys: selectedKeys,\n    onCheck: onCheck,\n    checkedKeys: checkedKeys,\n    virtual: false\n  })))));\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (DataSourceTree);\n\n//# sourceURL=webpack://print-designer/./src/components/common/dataSource.tsx?");

/***/ }),

/***/ 53828:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(73400);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _hooks_useScrollKey__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(98724);\n/* harmony import */ var _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(36324);\n/* harmony import */ var _dataSource__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(21920);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(32064);\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction CheckLang() {\n  var className = 'left-datasource';\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0011')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0006')));\n}\nvar TreeDemo = function TreeDemo() {\n  var dataFactory = function dataFactory() {\n    var leafLength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;\n    var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n    var maxLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n    var preKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n    var treeData = [];\n    for (var i = 0; i < leafLength; i++) {\n      var _context;\n      var key = preKey ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context = \"\".concat(preKey, \"-\")).call(_context, i) : \"\".concat(i);\n      var _level = level;\n      var node = {\n        title: key,\n        key: key\n      };\n      if (_level <= maxLevel) {\n        _level++;\n        node.children = dataFactory(3, _level, maxLevel, key);\n      }\n      treeData.push(node);\n    }\n    return treeData;\n  };\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(['0-1', '0', '1']),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState, 2),\n    expandedKeys = _useState2[0],\n    setExpandedKeys = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(['1-1']),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState3, 2),\n    checkedKeys = _useState4[0],\n    setCheckedKeys = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(['0']),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState5, 2),\n    selectedKeys = _useState6[0],\n    setSelectedKeys = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(dataFactory(200, 0, 2)),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState7, 2),\n    treeData = _useState8[0],\n    setTreeData = _useState8[1];\n  var onSelect = function onSelect(selectedKeys, info) {\n    // setSelectedKeys(selectedKeys)\n    console.log('onSelect', selectedKeys);\n  };\n  var onCheck = function onCheck(checkedKeys, info) {\n    console.log('checkedKeys', checkedKeys);\n    setCheckedKeys(checkedKeys);\n  };\n  var onExpand = function onExpand(expandedKeys, info) {\n    console.log('onExpand', expandedKeys);\n    setExpandedKeys(expandedKeys);\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useEffect)(function () {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_12___default()(function () {\n      setScrollToKey('16-0');\n    }, 5000);\n  }, []);\n  var _React$useState = react__WEBPACK_IMPORTED_MODULE_16___default().useState('53-0'),\n    _React$useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_React$useState, 2),\n    scrollToKey = _React$useState2[0],\n    setScrollToKey = _React$useState2[1];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    style: {\n      width: '300px',\n      height: '300px'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Tree, {\n    name: \"Tree\",\n    treeData: treeData,\n    expandedKeys: expandedKeys,\n    checkedKeys: checkedKeys,\n    selectedKeys: selectedKeys,\n    scrollToKey: scrollToKey,\n    virtual: false,\n    onCheck: onCheck,\n    onExpand: onExpand,\n    onSelect: onSelect\n  }));\n};\nfunction EmptyDataSource(_ref) {\n  var className = _ref.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_20__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0004')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0004')));\n}\nvar DataSourceModal = function DataSourceModal(_ref2) {\n  var visible = _ref2.visible,\n    checkable = _ref2.checkable,\n    meta = _ref2.meta,\n    definition = _ref2.definition,\n    onSelect = _ref2.onSelect,\n    className = _ref2.className,\n    _ref2$emptyNode = _ref2.emptyNode,\n    emptyNode = _ref2$emptyNode === void 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(EmptyDataSource, {\n      className: \"left-datasource\"\n    }) : _ref2$emptyNode,\n    _ref2$expandedKeys = _ref2.expandedKeys,\n    expandedKeys = _ref2$expandedKeys === void 0 ? [] : _ref2$expandedKeys,\n    selectedKey = _ref2.selectedKey,\n    filterTreeData = _ref2.filterTreeData,\n    activedSelectId = _ref2.activedSelectId,\n    _ref2$checkedKeys = _ref2.checkedKeys,\n    checkedKeys = _ref2$checkedKeys === void 0 ? [] : _ref2$checkedKeys,\n    modalTitle = _ref2.modalTitle,\n    onCancel = _ref2.onCancel;\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(false),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState9, 2),\n    showDefinitionId = _useState10[0],\n    setShowDefinitionId = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(true),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState11, 2),\n    isEmpty = _useState12[0],\n    setIsEmpty = _useState12[1];\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)([]),\n    _useState14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState13, 2),\n    checkedNodes = _useState14[0],\n    setCheckedNodes = _useState14[1];\n  var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(checkedKeys),\n    _useState16 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState15, 2),\n    checkedNodeKeys = _useState16[0],\n    setCheckedNodeKeys = _useState16[1];\n  var selectRef = (0,react__WEBPACK_IMPORTED_MODULE_16__.useRef)(null);\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.SelectionContext);\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.DataFactoryContext),\n    modelFactory = _useContext.modelFactory;\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var scrollToKey = selectedKey || (0,_hooks_useScrollKey__WEBPACK_IMPORTED_MODULE_19__.useScrollKey)({\n    dataContext: dataContext,\n    selectionContext: selectionContext,\n    meta: meta,\n    activedSelectId: activedSelectId,\n    modelFactory: modelFactory\n  });\n  var onSelectProxy = function onSelectProxy(checked, node, event) {\n    selectRef.current = node;\n  };\n  var getDataEmpty = function getDataEmpty(data) {\n    var emptyFlag = !(data && data.length);\n    setIsEmpty(emptyFlag);\n  };\n  var onCheck = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (allKeys, _ref3) {\n    var _context2, _context3, _context4, _context5;\n    var value = _ref3.checked,\n      node = _ref3.node,\n      event = _ref3.event;\n    console.log('checkedKeys', value, allKeys, node);\n    var fieldKeys = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_22__.getFieldKeysByNode)(node);\n    console.log('fieldKeys--------', fieldKeys, checkedNodeKeys);\n    var checkedKeys = value ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context2 = []).call(_context2, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(checkedNodeKeys), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(fieldKeys)) : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(checkedNodeKeys).call(checkedNodeKeys, function (key) {\n      return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(fieldKeys).call(fieldKeys, key);\n    });\n    console.log('checkedKeys--------', checkedKeys);\n    var nodes = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(checkedKeys).call(checkedKeys, Boolean)).call(_context4, function (key) {\n      return _objectSpread({\n        key: key\n      }, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_22__.queryDataSourceNodeByKey)(key, definition));\n    })).call(_context3, function (node) {\n      // 全选时，父节点的key也会带过来，需要过滤下\n      var dataSource = node.dataSource,\n        Key = node.Key,\n        Items = node.Items;\n      if (Items && Items.length) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15___default()(dataSource).call(dataSource, Key) && !(Items && Items.length);\n      } else {\n        return true;\n      }\n    });\n    console.log('nodes------', nodes, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(checkedKeys).call(checkedKeys, Boolean)).call(_context5, function (key) {\n      return _objectSpread({\n        key: key\n      }, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_22__.queryDataSourceNodeByKey)(key, definition));\n    }));\n    var keys = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(nodes).call(nodes, function (item) {\n      return item.key;\n    });\n    setCheckedNodeKeys(keys);\n    setCheckedNodes(nodes);\n  }, [checkedNodeKeys, setCheckedNodeKeys]);\n  var onConfirm = function onConfirm() {\n    if (checkable) {\n      onSelect(checkedNodes);\n    } else {\n      var node = selectRef.current;\n      onSelect(node);\n    }\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useEffect)(function () {\n    if (visible) {\n      setCheckedNodeKeys(checkedKeys);\n      var nodes = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(checkedKeys).call(checkedKeys, function (key) {\n        return _objectSpread({\n          key: key\n        }, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_22__.queryDataSourceNodeByKey)(key, definition));\n      });\n      setCheckedNodes(nodes);\n    }\n  }, [visible]);\n  var footer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, !isEmpty && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Checkbox, {\n    className: \"\".concat(className, \"-modal-footer-checkbox\"),\n    checked: showDefinitionId,\n    onChange: function onChange(e) {\n      var newVal = !!e.target.checked;\n      setShowDefinitionId(newVal);\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0101')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-modal-footer-btns\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Button, {\n    onClick: onCancel,\n    type: \"second\",\n    className: \"\".concat(className, \"-modal-cancel-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0011')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Button, {\n    onClick: onConfirm,\n    type: \"primary\",\n    className: \"\".concat(className, \"-modal-ok-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0012'))));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Modal\n  // body={<TreeDemo></TreeDemo>}\n  , {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_dataSource__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n      checkable: !!checkable,\n      scrollToKey: scrollToKey,\n      meta: meta,\n      definition: definition,\n      filterTreeData: filterTreeData,\n      onSelect: onSelectProxy,\n      showDefinitionId: showDefinitionId,\n      emptyNode: emptyNode,\n      onDataChange: getDataEmpty,\n      expandedKeys: expandedKeys,\n      onCheck: onCheck,\n      checkedKeys: checkedNodeKeys\n    }),\n    bodyStyle: {\n      justifyContent: 'start',\n      alignItems: 'start',\n      overflowX: 'hidden',\n      overflowY: 'auto',\n      flexDirection: 'column'\n    },\n    titleIcon: null,\n    className: \"\".concat(className, \"-modal\"),\n    footer: footer,\n    maskClosable: false,\n    width: 512,\n    height: 614,\n    title: modalTitle || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0001'),\n    closable: true,\n    destroyOnClose: true,\n    onCancel: onCancel,\n    onOk: onCancel,\n    mask: true,\n    visible: visible\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (DataSourceModal);\n\n//# sourceURL=webpack://print-designer/./src/components/common/dataSourceModal.tsx?");

/***/ }),

/***/ 48724:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _slate__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(29496);\n/* harmony import */ var _slate_history__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(44992);\n/* harmony import */ var _slate_react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(62620);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _hooks_useScrollKey__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(98724);\n/* harmony import */ var _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(36324);\n/* harmony import */ var _dataSource__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(21920);\n/* harmony import */ var _expressions__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(24732);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(77620);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(32064);\n/* harmony import */ var _utils_createData__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(76000);\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n// import { Editor, EditorState, RichUtils, CompositeDecorator, convertFromRaw, Modifier, SelectionState } from 'draft-js'\n\n\n\n\n\n\n\n\n\n\n\n\nvar TipLinkUrl = 'https://vip.kingdee.com/article/609740912138348800';\nvar initialEditorValue = [{\n  type: 'paragraph',\n  children: [{\n    text: ''\n  }]\n}];\nvar SlateComponent = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.ErrorBoundaryWrap)(_slate_react__WEBPACK_IMPORTED_MODULE_22__.Slate, 'slate');\nfunction DefaultElement(props) {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"p\", props.attributes, props.children);\n}\nfunction LabelElement(props) {\n  var selected = (0,_slate_react__WEBPACK_IMPORTED_MODULE_22__.useSelected)();\n  var focused = (0,_slate_react__WEBPACK_IMPORTED_MODULE_22__.useFocused)();\n  var textFormat = props.element.textFormat;\n  var backgroundColor = textFormat === 'Date' ? '#FFF1D4' : textFormat === 'Number' || textFormat === 'Amount' ? '#DCFAE4' : '#E0EFFF';\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useEffect)(function () {\n    if (selected && focused) {\n      var key = props.element.key,\n        setActiveDataSourceKey = props.setActiveDataSourceKey;\n      setActiveDataSourceKey(key);\n    }\n  }, [selected, focused]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, props.attributes, {\n    contentEditable: false,\n    style: {\n      padding: '1px 8px',\n      margin: '0 3px',\n      verticalAlign: 'baseline',\n      display: 'inline-block',\n      borderRadius: '2px',\n      backgroundColor: backgroundColor,\n      fontSize: '12px',\n      cursor: 'pointer',\n      boxShadow: selected && focused ? '0 0 0 2px #B4D5FF' : 'none',\n      lineHeight: '18px'\n    }\n  }), props.element.formulaName, props.children);\n}\nvar withLabels = function withLabels(editor) {\n  var isVoid = editor.isVoid,\n    isInline = editor.isInline;\n  editor.isInline = function (element) {\n    return element.type === 'label' || isInline(element);\n  };\n  editor.isVoid = function (element) {\n    return element.type === 'label' || isVoid(element);\n  };\n  return editor;\n};\nfunction EmptyDataSource() {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"left-datasource-empty\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"img\", {\n    className: \"left-datasource-empty-img\",\n    src: _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_25__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0011')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"left-datasource-empty-text\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0006')));\n}\nvar ExpressionView = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_18__.forwardRef)(function (props, ref) {\n  var meta = props.meta,\n    definition = props.definition,\n    expandedKeys = props.expandedKeys,\n    formulaData = props.formulaData,\n    activedSelectId = props.activedSelectId,\n    filterTreeData = props.filterTreeData,\n    showDefinitionId = props.showDefinitionId;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState, 2),\n    descriptionData = _useState2[0],\n    setDescriptionData = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(''),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState3, 2),\n    activeDataSourceKey = _useState4[0],\n    setActiveDataSourceKey = _useState4[1];\n  var timerRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  // const [description] = useState(`1、可从左侧选择多个字段组合<br />2、从右侧插入函数，如sum()，需按照函数指引进行操作<br />3、请在英文输入法下使用特殊符号及函数<br />4、文本内容请用英文双引号\" \"`)[0]\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(function () {\n      console.log(formulaData);\n      if (formulaData && formulaData.length) {\n        var newValue = [];\n        var data = {\n          type: 'paragraph',\n          children: [{\n            text: ''\n          }]\n        };\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(formulaData).call(formulaData, function (item, i) {\n          if (item !== '_enter_') {\n            var isLast = i === formulaData.length - 1;\n            isLast && newValue.push(_objectSpread({}, data));\n            typeof item === 'string' ? data.children.push({\n              text: item\n            }) : data.children.push({\n              text: ''\n            }, _objectSpread(_objectSpread({}, item), {}, {\n              type: 'label',\n              children: [{\n                text: ''\n              }]\n            }), {\n              text: ''\n            });\n            data = isLast ? {\n              type: 'paragraph',\n              children: []\n            } : data;\n          } else {\n            newValue.push(_objectSpread({}, data));\n            data = {\n              type: 'paragraph',\n              children: [{\n                text: ''\n              }]\n            };\n          }\n        });\n        return newValue;\n      } else {\n        return initialEditorValue;\n      }\n    }),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState5, 2),\n    value = _useState6[0],\n    setValue = _useState6[1];\n  var verifyDisabled = (0,react__WEBPACK_IMPORTED_MODULE_18__.useMemo)(function () {\n    return _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12___default()(value) === _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12___default()(initialEditorValue);\n  }, [value]);\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)({\n      visible: false,\n      msg: '',\n      type: 'success'\n    }),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState7, 2),\n    alertData = _useState8[0],\n    setAlertData = _useState8[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.DataContext);\n  var _dataContext$findCont = dataContext.findControl(activedSelectId),\n    cellType = _dataContext$findCont.cellType,\n    parentId = _dataContext$findCont.parentId;\n  var gridData = dataContext.findControl(parentId);\n  var editor = (0,react__WEBPACK_IMPORTED_MODULE_18__.useMemo)(function () {\n    return withLabels((0,_slate_react__WEBPACK_IMPORTED_MODULE_22__.withReact)((0,_slate_history__WEBPACK_IMPORTED_MODULE_21__.withHistory)((0,_slate__WEBPACK_IMPORTED_MODULE_20__.createEditor)())));\n  }, []);\n  var getFormulaData = function getFormulaData() {\n    var formulaData = [];\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(value).call(value, function (_ref, i) {\n      var _context;\n      var children = _ref.children;\n      var data = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(children).call(children, function (item) {\n        var type = item.type,\n          text = item.text;\n        if (type === 'label') {\n          return item;\n        } else {\n          return text;\n        }\n      })).call(_context, function (item) {\n        return item !== '';\n      });\n      formulaData.push.apply(formulaData, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(data));\n      if (i !== value.length - 1) {\n        formulaData.push('_enter_');\n      }\n    });\n    var data = dataContext.getData();\n    var version = data === null || data === void 0 ? void 0 : data.version;\n    return {\n      formulaData: formulaData,\n      tplVersion: version\n    };\n  };\n  var onExpressionSave = function onExpressionSave() {\n    var data = getFormulaData();\n    return window.fetch('api/print/validatePrintFormula.do', {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/jsoncharset=utf-8'\n      },\n      body: _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12___default()(data),\n      mode: 'cors',\n      credentials: 'include'\n    }).then(function (response) {\n      if (response.ok) {\n        return response.json();\n      } else {\n        throw new Error(response.statusText);\n      }\n    }).then(function (res) {\n      var result = res.result,\n        msg = res.msg;\n      setAlertData(function () {\n        return {\n          type: result === 'fail' ? 'error' : 'success',\n          visible: true,\n          msg: msg\n        };\n      });\n      if (result === 'success') {\n        timerRef.current = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14___default()(function () {\n          timerRef.current && clearTimeout(timerRef.current);\n          setAlertData(function (data) {\n            return _objectSpread(_objectSpread({}, data), {}, {\n              visible: false\n            });\n          });\n        }, 1100);\n        return _objectSpread({\n          curTab: '2'\n        }, data);\n      } else {\n        return 'fail';\n      }\n    }).catch(function (err) {\n      console.error(err);\n      return false;\n    });\n  };\n\n  // useEffect(() => {\n  //   const childrenLength = value[0].children.length - 1\n  //   const path = [0, childrenLength]\n  //   const offset = value[0].children[childrenLength]?.text?.length || 0\n  //   Transforms.select(editor, {\n  //     focus: { path, offset },\n  //     anchor: { path, offset },\n  //   })\n  //   document.getElementById(\"slate-editor\").focus()\n  // }, [])\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useImperativeHandle)(ref, function () {\n    return {\n      getFormulaData: getFormulaData,\n      onExpressionSave: onExpressionSave,\n      onAutoFocus: onAutoFocus\n    };\n  });\n  var renderElement = (0,react__WEBPACK_IMPORTED_MODULE_18__.useCallback)(function (props) {\n    var type = props.element.type;\n    switch (type) {\n      case 'label':\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(LabelElement, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, props, {\n          setActiveDataSourceKey: setActiveDataSourceKey\n        }));\n      default:\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(DefaultElement, props);\n    }\n  }, []);\n  var tempSelection = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var insertLabel = function insertLabel(checked, node, event) {\n    var _context2;\n    if (!tempSelection.current) return;\n    var Name = node.Name,\n      ViewName = node.ViewName,\n      bindField = node.bindField,\n      dataSource = node.dataSource,\n      dsType = node.dsTypeKey,\n      key = node.key,\n      _node$InitAttr = node.InitAttr,\n      InitAttr = _node$InitAttr === void 0 ? {\n        TextFormat: 'Text'\n      } : _node$InitAttr;\n    var formulaName = ViewName || Name;\n    if (!tempSelection.current) {\n      var _value$0$children$chi;\n      var childrenLength = value[0].children.length - 1;\n      var path = [0, childrenLength];\n      var offset = ((_value$0$children$chi = value[0].children[childrenLength]) === null || _value$0$children$chi === void 0 || (_value$0$children$chi = _value$0$children$chi.text) === null || _value$0$children$chi === void 0 ? void 0 : _value$0$children$chi.length) || 0;\n      _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.select(editor, {\n        focus: {\n          path: path,\n          offset: offset\n        },\n        anchor: {\n          path: path,\n          offset: offset\n        }\n      });\n    } else {\n      _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.select(editor, tempSelection.current);\n    }\n    var labelNode = {\n      id: (0,_utils_createData__WEBPACK_IMPORTED_MODULE_31__.createUUid)(),\n      type: 'label',\n      formulaName: formulaName,\n      bindField: (bindField === null || bindField === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = bindField.split('.')).call(_context2, function (key) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(key).call(key, '$reportEntryGroup$');\n      }).join('.')) || '',\n      dataSource: dataSource,\n      dsType: dsType,\n      key: key,\n      textFormat: InitAttr.TextFormat,\n      children: [{\n        text: ''\n      }]\n    };\n    setActiveDataSourceKey(key);\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.insertNodes(editor, labelNode);\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.move(editor);\n    _slate_react__WEBPACK_IMPORTED_MODULE_22__.ReactEditor.focus(editor);\n  };\n  var onSelectExpression = function onSelectExpression(text) {\n    if (!tempSelection.current) return;\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.select(editor, tempSelection.current);\n    // if (cellType === 'Detail' && text !== 'if') {\n    //   return setAlertData(() => ({\n    //     type: 'error',\n    //     visible: true,\n    //     msg: getLangMsg('printd.components.key0004')\n    //   }))\n    // }\n    // Transforms.insertText(editor, 'some words', {\n    //   at: {\n    //     anchor: { path: [0, 0], offset: 0 },\n    //     focus: { path: [0, 0], offset: 3 },\n    //   },\n    // })\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.insertText(editor, text + '()');\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.move(editor, {\n      distance: 1,\n      unit: 'offset',\n      reverse: true\n    });\n    _slate_react__WEBPACK_IMPORTED_MODULE_22__.ReactEditor.focus(editor);\n  };\n  var insertCharacter = function insertCharacter(character) {\n    if (!tempSelection.current) return;\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.select(editor, tempSelection.current);\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.insertText(editor, character);\n    _slate_react__WEBPACK_IMPORTED_MODULE_22__.ReactEditor.focus(editor);\n  };\n  var onVerify = function onVerify() {\n    if (verifyDisabled) return;\n    var formulaData = getFormulaData();\n    var postData = _objectSpread(_objectSpread({}, cellType === 'Detail' ? {\n      cellType: cellType,\n      dataSource: gridData.dataSource\n    } : {}), formulaData);\n    window.fetch('api/print/validatePrintFormula.do', {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/jsoncharset=utf-8'\n      },\n      body: _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_12___default()(postData),\n      mode: 'cors',\n      credentials: 'include'\n    }).then(function (response) {\n      if (response.ok) {\n        return response.json();\n      } else {\n        throw new Error(response.statusText);\n      }\n    }).then(function (res) {\n      var result = res.result,\n        msg = res.msg;\n      setAlertData(function () {\n        return {\n          type: result === 'fail' ? 'error' : 'success',\n          visible: true,\n          msg: msg\n        };\n      });\n      if (result === 'success') {\n        timerRef.current = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14___default()(function () {\n          timerRef.current && clearTimeout(timerRef.current);\n          setAlertData(function (data) {\n            return _objectSpread(_objectSpread({}, data), {}, {\n              visible: false\n            });\n          });\n        }, 1100);\n      }\n    }).catch(function (err) {\n      console.error(err);\n    });\n  };\n  var onAutoFocus = (0,react__WEBPACK_IMPORTED_MODULE_18__.useCallback)(function () {\n    var _editor$children$, _editor$children$2;\n    var eleLength = (_editor$children$ = editor.children[0]) === null || _editor$children$ === void 0 || (_editor$children$ = _editor$children$.children) === null || _editor$children$ === void 0 ? void 0 : _editor$children$.length;\n    var offset = (_editor$children$2 = editor.children[0]) === null || _editor$children$2 === void 0 || (_editor$children$2 = _editor$children$2.children[eleLength - 1]) === null || _editor$children$2 === void 0 || (_editor$children$2 = _editor$children$2.text) === null || _editor$children$2 === void 0 ? void 0 : _editor$children$2.length;\n    var selectionCopy = {\n      anchor: {\n        path: [0, eleLength - 1],\n        offset: offset\n      },\n      focus: {\n        path: [0, eleLength - 1],\n        offset: offset\n      }\n    };\n    _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.select(editor, selectionCopy);\n    _slate_react__WEBPACK_IMPORTED_MODULE_22__.ReactEditor.focus(editor);\n  }, [editor]);\n  var cardFieldDataSource = function cardFieldDataSource(definition) {\n    var cardGridDataSource = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_30__.geGridDataSource)(dataContext, activedSelectId, 'DataGrid');\n    return cardGridDataSource ? (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_29__.filterCardFieldDataSourceByDsType)(cardGridDataSource, definition) : filterTreeData(definition);\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement((react__WEBPACK_IMPORTED_MODULE_18___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"expression-left\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"block-title\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0013')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"block-main\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_dataSource__WEBPACK_IMPORTED_MODULE_26__[\"default\"], {\n    meta: meta,\n    definition: definition,\n    onSelect: insertLabel,\n    expandedKeys: expandedKeys,\n    scrollToKey: activeDataSourceKey,\n    filterTreeData: cardFieldDataSource,\n    showDefinitionId: showDefinitionId\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"expression-main\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"editor-area\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"editor-toolbar\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('+');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    type: \"add\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('-');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    type: \"reduce\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('*');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"chengyi\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('/');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xiegang\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('>');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"dayu\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('<');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xiaoyu\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('>=');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"dayudengyu\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('<=');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"xiaoyudengyu\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('=');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"dengyu3\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return insertCharacter('!=');\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"budengyu\"\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"editor\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(SlateComponent, {\n    value: value,\n    editor: editor,\n    onChange: function onChange(value) {\n      setValue(value);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_slate_react__WEBPACK_IMPORTED_MODULE_22__.Editable, {\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0005'),\n    id: \"slate-editor\",\n    renderElement: renderElement,\n    onKeyDown: function onKeyDown(event) {\n      if (event.key === '(') {\n        event.preventDefault();\n        editor.insertText('()');\n        _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.move(editor, {\n          distance: 1,\n          unit: 'offset',\n          reverse: true\n        });\n      }\n      if (event.keyCode === 13) {\n        var data = dataContext.getData();\n        var version = data === null || data === void 0 ? void 0 : data.version;\n        // 6.0之后的版本都可以使用换行\n        if (!version || Number(version) < 6) {\n          event.preventDefault();\n        }\n      }\n    },\n    autoFocus: true,\n    onBlur: function onBlur(event) {\n      event.persist();\n      var relatedTarget = event.relatedTarget;\n      if ((relatedTarget === null || relatedTarget === void 0 ? void 0 : relatedTarget.tagName) !== 'INPUT') {\n        var selection = editor.selection;\n        // 这里用变量劫持下\n        var selectionCopy = {};\n        for (var key in selection) {\n          var _selection$key = selection[key],\n            path = _selection$key.path,\n            offset = _selection$key.offset;\n          selectionCopy[key] = {\n            // path只保留两位，原因：标签激活状态在blur时能够保留\n            path: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(path).call(path, 0, 2),\n            offset: offset\n          };\n        }\n        tempSelection.current = selectionCopy;\n        console.log('selection-----', selectionCopy);\n        _slate__WEBPACK_IMPORTED_MODULE_20__.Transforms.select(editor, selectionCopy);\n        _slate_react__WEBPACK_IMPORTED_MODULE_22__.ReactEditor.focus(editor);\n      }\n    }\n    // onCompositionEnd={(e) => {\n    //   Transforms.setNodes(\n    //     editor,\n    //     {\n    //       key: +new Date()\n    //     },\n    //     { match: Text.isText }\n    //   )\n    // }}\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"editor-bottom\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_28___default()(['verify-btn', {\n      disabled: verifyDisabled\n    }]),\n    onClick: onVerify\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0010'))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"description-area\"\n  }, alertData.visible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Alert, {\n    message: alertData.msg,\n    showIcon: true,\n    closable: true,\n    type: alertData.type,\n    delayOffTime: alertData.type === 'success' ? 1000 : 0,\n    onClose: function onClose() {\n      return setAlertData(function (data) {\n        return _objectSpread(_objectSpread({}, data), {}, {\n          visible: false\n        });\n      });\n    }\n  }), descriptionData ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"description-content\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"description-title\"\n  }, (descriptionData === null || descriptionData === void 0 ? void 0 : descriptionData.title) || ''), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"description-detail\"\n  }, (descriptionData === null || descriptionData === void 0 ? void 0 : descriptionData.description) || '')) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"description-content\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0023'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"br\", null), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0024'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"br\", null), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0025'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"br\", null), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0026')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"expression-right\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"block-title\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0028')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"block-main\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_expressions__WEBPACK_IMPORTED_MODULE_27__[\"default\"], {\n    onSelect: onSelectExpression,\n    onShowDescription: setDescriptionData\n  }))));\n});\nvar ModalBody = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_18__.forwardRef)(function (props, ref) {\n  var _dataContext$getData;\n  var meta = props.meta,\n    definition = props.definition,\n    _props$expandedKeys = props.expandedKeys,\n    expandedKeys = _props$expandedKeys === void 0 ? [] : _props$expandedKeys,\n    scrollToKey = props.scrollToKey,\n    filterTreeData = props.filterTreeData,\n    activedSelectId = props.activedSelectId,\n    showDefinitionId = props.showDefinitionId,\n    activeTab = props.activeTab,\n    formulaData = props.formulaData,\n    filterExpressionTreeData = props.filterExpressionTreeData,\n    DataSourceOption = props.DataSourceOption;\n  var selectNode = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var expressionRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var expressionDom = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(activeTab),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState9, 2),\n    curTab = _useState10[0],\n    setCurTab = _useState10[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.DataContext);\n  var version = (_dataContext$getData = dataContext.getData()) === null || _dataContext$getData === void 0 ? void 0 : _dataContext$getData.version;\n  var className = 'expression-modal';\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useImperativeHandle)(ref, function () {\n    return {\n      getDataSource: function getDataSource() {\n        return new (_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_17___default())(function (resolve, reject) {\n          if (curTab === '1') {\n            resolve({\n              curTab: curTab,\n              selectNode: selectNode.current\n            });\n          } else {\n            var _expressionRef$curren;\n            (_expressionRef$curren = expressionRef.current) === null || _expressionRef$curren === void 0 || _expressionRef$curren.onExpressionSave().then(resolve);\n          }\n        });\n      }\n    };\n  });\n  var onTabChange = function onTabChange(key) {\n    setCurTab(key);\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useEffect)(function () {\n    var _expressionRef$curren2;\n    curTab && ((_expressionRef$curren2 = expressionRef.current) === null || _expressionRef$curren2 === void 0 ? void 0 : _expressionRef$curren2.onAutoFocus());\n  }, [curTab]);\n  var onSelectProxy = function onSelectProxy(checked, node, event) {\n    selectNode.current = node;\n  };\n  var _useMemo = (0,react__WEBPACK_IMPORTED_MODULE_18__.useMemo)(function () {\n      var showNewTag = version && Number(version) >= 6;\n      var tabTitle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0003'), showNewTag ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"label\", {\n        className: \"\".concat(className, \"-new-tag\")\n      }, \"NEW\") : null);\n      return [tabTitle, showNewTag];\n    }, [version]),\n    _useMemo2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useMemo, 2),\n    TabTitle = _useMemo2[0],\n    showNewTag = _useMemo2[1];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-tab-wrapper\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Tabs, {\n    type: \"dynamic\",\n    activeKey: curTab,\n    onChange: onTabChange\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Tabs.TabPane, {\n    key: \"1\",\n    tab: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0027')\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"body-left\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_dataSource__WEBPACK_IMPORTED_MODULE_26__[\"default\"], {\n    scrollToKey: scrollToKey,\n    meta: meta,\n    definition: definition,\n    onSelect: onSelectProxy,\n    showDefinitionId: showDefinitionId,\n    expandedKeys: expandedKeys,\n    filterTreeData: filterTreeData\n  }))), (DataSourceOption === null || DataSourceOption === void 0 ? void 0 : DataSourceOption.AllowFormula) === false ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Tabs.TabPane, {\n    key: \"2\",\n    tab: TabTitle\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"body-right\",\n    ref: expressionDom\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(ExpressionView, {\n    meta: meta,\n    definition: definition,\n    expandedKeys: expandedKeys,\n    ref: expressionRef,\n    formulaData: formulaData,\n    activedSelectId: activedSelectId,\n    filterTreeData: filterExpressionTreeData,\n    showDefinitionId: showDefinitionId\n  }))), showNewTag ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Tabs.TabPane, {\n    specialPane: \"right\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Link, {\n    target: \"_blank\",\n    rel: \"noreferrer\",\n    href: TipLinkUrl\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0129'))) : null));\n});\nvar ExpressionModal = function ExpressionModal(_ref2) {\n  var visible = _ref2.visible,\n    setVisible = _ref2.setVisible,\n    meta = _ref2.meta,\n    definition = _ref2.definition,\n    onSelect = _ref2.onSelect,\n    emptyNode = _ref2.emptyNode,\n    _ref2$expandedKeys = _ref2.expandedKeys,\n    expandedKeys = _ref2$expandedKeys === void 0 ? [] : _ref2$expandedKeys,\n    activeTab = _ref2.activeTab,\n    DataSourceOption = _ref2.DataSourceOption,\n    filterTreeData = _ref2.filterTreeData,\n    activedSelectId = _ref2.activedSelectId,\n    formulaData = _ref2.formulaData,\n    filterExpressionTreeData = _ref2.filterExpressionTreeData;\n  var className = 'expression';\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(false),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState11, 2),\n    showDefinitionId = _useState12[0],\n    setShowDefinitionId = _useState12[1];\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(true),\n    _useState14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState13, 2),\n    isEmpty = _useState14[0],\n    setIsEmpty = _useState14[1];\n  var dataRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.SelectionContext);\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.DataFactoryContext),\n    modelFactory = _useContext.modelFactory;\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var scrollToKey = (0,_hooks_useScrollKey__WEBPACK_IMPORTED_MODULE_24__.useScrollKey)({\n    dataContext: dataContext,\n    selectionContext: selectionContext,\n    meta: meta,\n    activedSelectId: activedSelectId,\n    modelFactory: modelFactory\n  });\n  var handleConfirm = function handleConfirm() {\n    var _dataRef$current;\n    (_dataRef$current = dataRef.current) === null || _dataRef$current === void 0 || _dataRef$current.getDataSource().then(function (data) {\n      console.log('data---------', data);\n      if (data === 'fail') return;\n      onSelect(data);\n    });\n  };\n  var footer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement((react__WEBPACK_IMPORTED_MODULE_18___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Checkbox, {\n    className: \"\".concat(className, \"-modal-footer-checkbox\"),\n    checked: showDefinitionId,\n    onChange: function onChange(e) {\n      var newVal = !!e.target.checked;\n      setShowDefinitionId(newVal);\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0101')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-modal-footer-btns\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Button, {\n    onClick: function onClick() {\n      return setVisible(false);\n    },\n    type: \"second\",\n    className: \"\".concat(className, \"-modal-cancel-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0011')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Button, {\n    onClick: handleConfirm,\n    type: \"primary\",\n    className: \"\".concat(className, \"-modal-ok-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0012'))));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Modal, {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(ModalBody, {\n      scrollToKey: scrollToKey,\n      activeTab: activeTab,\n      formulaData: formulaData,\n      meta: meta,\n      definition: definition,\n      showDefinitionId: showDefinitionId,\n      expandedKeys: expandedKeys,\n      ref: dataRef,\n      filterTreeData: filterTreeData,\n      activedSelectId: activedSelectId,\n      filterExpressionTreeData: filterExpressionTreeData,\n      DataSourceOption: DataSourceOption\n    }),\n    bodyStyle: {\n      justifyContent: 'start',\n      alignItems: 'start',\n      overflowX: 'hidden',\n      overflowY: 'auto',\n      flexDirection: 'column'\n    },\n    titleIcon: null,\n    className: \"\".concat(className, \"-modal\"),\n    footer: footer,\n    maskClosable: false,\n    width: 1000,\n    height: 614,\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.components.key0001'),\n    closable: true,\n    destroyOnClose: true,\n    onCancel: function onCancel() {\n      return setVisible(false);\n    },\n    onOk: function onOk() {\n      return setVisible(false);\n    },\n    mask: true,\n    visible: visible\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ExpressionModal);\n\n//# sourceURL=webpack://print-designer/./src/components/common/expressionModal-slate.tsx?");

/***/ }),

/***/ 24732:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(36324);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(84945);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_18__);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context4 = ownKeys(Object(t), !0)).call(_context4, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\nvar searchExpressions = function searchExpressions(data, searchVal) {\n  var _context;\n  return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(data).call(data, function (expression) {\n    var items = expression.items;\n    var filteredChildren = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(items).call(items, function (item) {\n      var _context2;\n      return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(_context2 = item.name).call(_context2, searchVal);\n    });\n    if (!filteredChildren.length) return null;\n    return _objectSpread(_objectSpread({}, expression), {}, {\n      items: filteredChildren\n    });\n  })).call(_context, Boolean);\n};\nfunction SearchEmptyNode(_ref) {\n  var className = _ref.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0004')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.grid.key0004')));\n}\nfunction ExpressionTree(_ref2) {\n  var onSelect = _ref2.onSelect,\n    onShowDescription = _ref2.onShowDescription;\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_13__.useContext)(_context__WEBPACK_IMPORTED_MODULE_17__.PrintDesignerContext),\n    expressions = _useContext.expressions;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_13__.useState)(''),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState, 2),\n    inputVal = _useState2[0],\n    setInputVal = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_13__.useState)(null),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState3, 2),\n    descriptionCache = _useState4[0],\n    setDescriptionCache = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_13__.useState)(''),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState5, 2),\n    activeKey = _useState6[0],\n    setActiveKey = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_13__.useState)(expressions),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState7, 2),\n    expressionsWithSearch = _useState8[0],\n    setExpressionsWithSearch = _useState8[1];\n  var handleExpressionSearch = function handleExpressionSearch(e) {\n    var value = e.target.value;\n    setInputVal(value);\n    setExpressionsWithSearch(function () {\n      var newExpressions = searchExpressions(expressions, value);\n      return newExpressions;\n    });\n  };\n  var handleClick = function handleClick(item) {\n    var key = item.key;\n    onSelect(key);\n    setActiveKey(key);\n    setDescriptionCache(item);\n    onShowDescription(item);\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"div\", {\n    className: \"kd-expression-tree-wrap\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16__.Input, {\n    style: {\n      marginBottom: 12,\n      width: '100%'\n    },\n    value: inputVal,\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_18__.getLangMsg)('printd.components.key0029'),\n    borderType: \"bordered\",\n    onChange: handleExpressionSearch,\n    allowClear: true,\n    suffix: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16__.Icon, {\n      type: \"search\",\n      style: {\n        cursor: 'pointer'\n      }\n    }))\n  }), inputVal && !(expressionsWithSearch !== null && expressionsWithSearch !== void 0 && expressionsWithSearch.length) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(SearchEmptyNode, {\n    className: \"left-datasource\"\n  }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"div\", {\n    className: \"kd-expression-tree\"\n  }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(expressionsWithSearch).call(expressionsWithSearch, function (expression) {\n    var items = expression.items,\n      name = expression.name;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16__.Collapse, {\n      name: \"Collapse\",\n      key: expression.type,\n      defaultActiveKey: expression.type\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_16__.Collapse.Panel, {\n      header: name,\n      panelKey: expression.type\n    }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(items).call(items, function (item) {\n      var _context3;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(\"div\", {\n        key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context3 = \"\".concat(expression.type, \"-\")).call(_context3, item.key),\n        className: classnames__WEBPACK_IMPORTED_MODULE_14___default()(['expression-item', {\n          'is-active': item.key === activeKey\n        }]),\n        onClick: function onClick() {\n          return handleClick(item);\n        },\n        onMouseOver: function onMouseOver() {\n          return onShowDescription(item);\n        },\n        onMouseLeave: function onMouseLeave() {\n          return onShowDescription(descriptionCache);\n        }\n      }, item.name);\n    })));\n  })));\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (ExpressionTree);\n\n//# sourceURL=webpack://print-designer/./src/components/common/expressions.tsx?");

/***/ }),

/***/ 90588:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(11872);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(73400);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _components_common_dataSource__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21920);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(77620);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(98092);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(32064);\n/* harmony import */ var _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(36324);\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction EmptyDataSource() {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"left-datasource-empty\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"img\", {\n    className: \"left-datasource-empty-img\",\n    src: _assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.grid.key0011')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"left-datasource-empty-text\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0006')));\n}\nvar ModalBody = function ModalBody(props) {\n  var className = props.className,\n    scrollToKey = props.scrollToKey,\n    errorTipShow = props.errorTipShow,\n    setErrorTipShow = props.setErrorTipShow,\n    checkable = props.checkable,\n    meta = props.meta,\n    definition = props.definition,\n    showDefinitionId = props.showDefinitionId,\n    filterTreeData = props.filterTreeData,\n    onCheck = props.onCheck,\n    checkedKeys = props.checkedKeys,\n    checkedNodes = props.checkedNodes,\n    emptyNode = props.emptyNode,\n    handleDelete = props.handleDelete,\n    handleClear = props.handleClear,\n    setCheckedNodes = props.setCheckedNodes,\n    setCheckedNodeKeys = props.setCheckedNodeKeys,\n    controlType = props.controlType,\n    onSelect = props.onSelect;\n  var total = checkedNodes.length || 0;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState, 2),\n    dragIndex = _useState2[0],\n    setDragIndex = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState3, 2),\n    isDragging = _useState4[0],\n    setIsDragging = _useState4[1];\n\n  // 数组成员交换位置\n  var swapArray = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (arr, index1, index2) {\n    arr[index1] = _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_11___default()(arr).call(arr, index2, 1, arr[index1])[0];\n    return arr;\n  }, []);\n  var allowDrag = function allowDrag(e) {\n    e.preventDefault();\n  };\n  var _onMouseOver = function onMouseOver(e, index) {\n    setDragIndex(index);\n  };\n  var _onMouseLeave = function onMouseLeave(e, index) {\n    setDragIndex(null);\n  };\n  var dragStart = function dragStart(e, index) {\n    e.stopPropagation();\n    setDragIndex(index);\n    setIsDragging(true);\n  };\n  var dragEnd = function dragEnd(e) {\n    // e.target.style.opacity = 1\n    setIsDragging(false);\n  };\n  var dragOver = function dragOver(e, index) {\n    if (index !== dragIndex) {\n      var newCheckedNodes = swapArray(checkedNodes, index, dragIndex);\n      setCheckedNodes(newCheckedNodes);\n      setCheckedNodeKeys(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(newCheckedNodes).call(newCheckedNodes, function (item) {\n        return item.key;\n      }));\n      setDragIndex(index);\n    }\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement((react__WEBPACK_IMPORTED_MODULE_19___default().Fragment), null, errorTipShow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Alert, {\n    className: \"\".concat(className, \"-alert\"),\n    message: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0007'),\n    type: \"error\",\n    delayOffTime: 0,\n    closable: true,\n    showIcon: true,\n    onClose: function onClose() {\n      return setErrorTipShow(false);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: className\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-left\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_components_common_dataSource__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    controlType: controlType,\n    onSelect: onSelect,\n    checkable: !!checkable && controlType !== 'CardGrid',\n    scrollToKey: scrollToKey,\n    meta: meta,\n    definition: definition,\n    showDefinitionId: showDefinitionId,\n    filterTreeData: filterTreeData,\n    onCheck: onCheck,\n    checkedKeys: checkedKeys,\n    emptyNode: emptyNode\n  })), controlType !== 'CardGrid' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-right\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"right-header\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"total\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0008'), \"\\uFF08\", total, \"\\uFF09\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_23___default()({\n      'clear-all': true,\n      disabled: total === 0\n    }),\n    onClick: handleClear\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0009'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"ul\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_23___default()('checked-list', {\n      'is-drag': isDragging\n    }),\n    onDragOver: allowDrag,\n    onDragEnter: allowDrag\n  }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(checkedNodes).call(checkedNodes, function (node, index) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"li\", {\n      className: classnames__WEBPACK_IMPORTED_MODULE_23___default()('checked-item', {\n        'is-active': dragIndex === index\n      }),\n      key: index,\n      draggable: true,\n      onDragStart: function onDragStart(e) {\n        return dragStart(e, index);\n      },\n      onDragEnd: dragEnd,\n      onDragOver: function onDragOver(e) {\n        return dragOver(e, index);\n      },\n      onMouseOver: function onMouseOver(e) {\n        return _onMouseOver(e, index);\n      },\n      onMouseLeave: function onMouseLeave(e) {\n        return _onMouseLeave(e, index);\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"span\", {\n      className: \"item-name\"\n    }, node.ViewName || node.Name || ''), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Icon, {\n      type: \"close\",\n      onClick: function onClick() {\n        return handleDelete(node.key);\n      }\n    }));\n  })))));\n};\n\n// 数据表格向导\nvar GridGuideModal = function GridGuideModal(_ref) {\n  var visible = _ref.visible,\n    onCancel = _ref.onCancel,\n    meta = _ref.meta,\n    definition = _ref.definition,\n    _ref$checkedKeys = _ref.checkedKeys,\n    checkedKeys = _ref$checkedKeys === void 0 ? [] : _ref$checkedKeys,\n    onSelect = _ref.onSelect,\n    emptyNode = _ref.emptyNode,\n    activedSelectId = _ref.activedSelectId,\n    _ref$controlType = _ref.controlType,\n    controlType = _ref$controlType === void 0 ? 'DataGrid' : _ref$controlType,\n    transferData = _ref.transferData;\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState5, 2),\n    errorTipShow = _useState6[0],\n    setErrorTipShow = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState7, 2),\n    showDefinitionId = _useState8[0],\n    setShowDefinitionId = _useState8[1];\n  // const initCheckedNodes = () => {}\n  // const initCheckedNodeKeys = () => {}\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)([]),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState9, 2),\n    checkedNodes = _useState10[0],\n    setCheckedNodes = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(checkedKeys),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState11, 2),\n    checkedNodeKeys = _useState12[0],\n    setCheckedNodeKeys = _useState12[1];\n  var confirmDisabled = !checkedNodeKeys.length;\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.SelectionContext);\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.DataFactoryContext),\n    modelFactory = _useContext.modelFactory;\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var parentGridId = controlType === _constants__WEBPACK_IMPORTED_MODULE_25__.SUB_GRID_TYPE ? transferData === null || transferData === void 0 ? void 0 : transferData.parentGridId : '';\n  var className = 'grid-guide';\n  var onCheck = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (allKeys, _ref2) {\n    var _context, _context2, _context3, _context4, _filteredNodes$filter;\n    var value = _ref2.checked,\n      node = _ref2.node,\n      event = _ref2.event;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('checkedKeys', value, allKeys, node);\n    var fieldKeys = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_26__.getFieldKeysByNode)(node);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('fieldKeys--------', fieldKeys, checkedNodeKeys);\n    var checkedKeys = value ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context = []).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(checkedNodeKeys), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(fieldKeys)) : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(checkedNodeKeys).call(checkedNodeKeys, function (key) {\n      return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_14___default()(fieldKeys).call(fieldKeys, key);\n    });\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('checkedKeys--------', checkedKeys);\n    var nodes = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(checkedKeys).call(checkedKeys, Boolean)).call(_context3, function (key) {\n      return _objectSpread({\n        key: key\n      }, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_26__.queryDataSourceNodeByKey)(key, definition));\n    })).call(_context2, function (node) {\n      // 全选时，父节点的key也会带过来，需要过滤下\n      var dataSource = node.dataSource,\n        Key = node.Key,\n        Items = node.Items;\n      if (Items && Items.length) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_15___default()(dataSource).call(dataSource, Key) && !(Items && Items.length);\n      } else {\n        return true;\n      }\n    });\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('nodes------', nodes, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(checkedKeys).call(checkedKeys, Boolean)).call(_context4, function (key) {\n      return _objectSpread({\n        key: key\n      }, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_26__.queryDataSourceNodeByKey)(key, definition));\n    }));\n    // 数据行行号可以添加至数据表格中，需要特殊处理判断下（Key: =getRowNumber()）\n    var filteredNodes = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(nodes).call(nodes, function (node) {\n      return node.Key !== '=getRowNumber()';\n    });\n    var checkedDataSource = ((_filteredNodes$filter = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(filteredNodes).call(filteredNodes, function (node) {\n      return node;\n    })[0]) === null || _filteredNodes$filter === void 0 ? void 0 : _filteredNodes$filter.dataSource) || '';\n    var dataSources = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_16___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(filteredNodes).call(filteredNodes, function (node) {\n      return node.dataSource;\n    })));\n    var errorShow = dataSources.length > 1;\n    setErrorTipShow(errorShow);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('nodes---------', nodes);\n    nodes = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(nodes).call(nodes, function (node) {\n      if (node.Key === '=getRowNumber()') {\n        return true;\n      } else {\n        return node.dataSource === checkedDataSource;\n      }\n    });\n    var filterCheckedKeys = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(nodes).call(nodes, function (item) {\n      return item.key;\n    });\n    setCheckedNodeKeys(filterCheckedKeys);\n    setCheckedNodes(nodes);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.console.log('checkedNodes.current', nodes);\n  }, [checkedNodeKeys, setCheckedNodeKeys, setErrorTipShow]);\n  var handleDelete = function handleDelete(key) {\n    setCheckedNodes(function (nodes) {\n      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(nodes).call(nodes, function (checkedNode) {\n        return checkedNode.key !== key;\n      });\n    });\n    setCheckedNodeKeys(function (keys) {\n      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(keys).call(keys, function (k) {\n        return k !== key;\n      });\n    });\n  };\n  var _onSelect = function _onSelect(nodes) {\n    setCheckedNodes(nodes);\n    setCheckedNodeKeys(nodes.key);\n  };\n  var onConfirm = function onConfirm() {\n    onSelect(checkedNodes, controlType);\n  };\n  var handleClear = function handleClear() {\n    setCheckedNodes([]);\n    setCheckedNodeKeys([]);\n  };\n  var onBeforeClose = function onBeforeClose() {\n    setErrorTipShow(false);\n  };\n  var onModalCancel = function onModalCancel() {\n    onBeforeClose();\n    onCancel();\n  };\n  var DsTypes = ['Entry', 'ReportEntry', 'Custom', 'Ref', 'Subentry', 'Workflow', 'Head', 'Main', 'Report', 'Approveline'];\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (definition) {\n    if (controlType === 'CardGrid') {\n      return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__.filterCardDataSourceByDsType)(DsTypes)(definition);\n    }\n    if (controlType === _constants__WEBPACK_IMPORTED_MODULE_25__.SUB_GRID_TYPE) {\n      var _getDataSourceNodeBy;\n      var _dataContext$findCont = dataContext.findControl(parentGridId),\n        dataSource = _dataContext$findCont.dataSource;\n      var subEntryList = ((_getDataSourceNodeBy = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_26__.getDataSourceNodeBy)(definition, function (node) {\n        if (node.dataSource === dataSource) return true;\n      })) === null || _getDataSourceNodeBy === void 0 ? void 0 : _getDataSourceNodeBy.SubEntryList) || [];\n      definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__.filterSubGridDataSource)(definition);\n      return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__.filterTreeByDataSource)(definition, subEntryList);\n    } else {\n      var subGridId = transferData === null || transferData === void 0 ? void 0 : transferData.subGridId;\n      if (subGridId !== null && subGridId !== void 0 && subGridId.length) {\n        var _dataSource = transferData.dataSource;\n        return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__.filterTreeByDataSource)(definition, _dataSource);\n      } else {\n        var data = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__.filterGridDataSource)(definition);\n        try {\n          var _data$find, _context5;\n          var workflow = data === null || data === void 0 || (_data$find = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_17___default()(data).call(data, function (_ref3) {\n            var DsType = _ref3.DsType;\n            return DsType === 'Ref';\n          })) === null || _data$find === void 0 || (_data$find = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_17___default()(_context5 = _data$find.Items).call(_context5, function (_ref4) {\n            var DsType = _ref4.DsType;\n            return DsType === 'Workflow';\n          })) === null || _data$find === void 0 ? void 0 : _data$find.Items;\n          if ((workflow === null || workflow === void 0 ? void 0 : workflow.length) > 1) {\n            var index = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_18___default()(workflow).call(workflow, function (_ref5) {\n              var DsType = _ref5.DsType;\n              return DsType === 'Approveactivity';\n            });\n            index !== -1 && _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_11___default()(workflow).call(workflow, index, 1);\n          }\n        } catch (error) {}\n        return data;\n      }\n    }\n    // return controlType === SUB_GRID_TYPE ? filterSubGridDataSource(definition) : filterGridDataSource(definition)\n  }, [controlType]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {}, [checkedNodeKeys]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    if (!visible) return;\n    if (!(0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_24__.includeDataSource)(definition, transferData === null || transferData === void 0 ? void 0 : transferData.dataSource) && controlType !== 'CardGrid') {\n      handleClear();\n    } else {\n      setCheckedNodeKeys(checkedKeys);\n      var nodes = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(checkedKeys).call(checkedKeys, function (key) {\n        return _objectSpread({\n          key: key\n        }, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_26__.queryDataSourceNodeByKey)(key, definition));\n      });\n      setCheckedNodes(nodes);\n    }\n  }, [visible, definition.length, transferData === null || transferData === void 0 ? void 0 : transferData.dataSource, controlType]);\n  var footer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement((react__WEBPACK_IMPORTED_MODULE_19___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Checkbox, {\n    className: \"\".concat(className, \"-modal-footer-checkbox\"),\n    checked: showDefinitionId,\n    onChange: function onChange(e) {\n      var newVal = !!e.target.checked;\n      setShowDefinitionId(newVal);\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.grid.key0101')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-modal-footer-btns\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Button, {\n    onClick: onModalCancel,\n    type: \"second\",\n    className: \"\".concat(className, \"-modal-cancel-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0011')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Button, {\n    className: \"\".concat(className, \"-modal-ok-btn\"),\n    type: \"primary\",\n    disabled: confirmDisabled,\n    onClick: onConfirm\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0012'))));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Modal, {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(ModalBody, {\n      checkable: true,\n      className: \"\".concat(className, \"-body\"),\n      errorTipShow: errorTipShow,\n      setErrorTipShow: setErrorTipShow,\n      meta: meta,\n      definition: definition,\n      showDefinitionId: showDefinitionId,\n      filterTreeData: filterTreeData,\n      onCheck: onCheck,\n      checkedKeys: checkedNodeKeys,\n      checkedNodes: checkedNodes,\n      handleDelete: handleDelete,\n      handleClear: handleClear,\n      emptyNode: emptyNode,\n      setCheckedNodes: setCheckedNodes,\n      setCheckedNodeKeys: setCheckedNodeKeys,\n      controlType: controlType,\n      onSelect: _onSelect\n    }),\n    titleIcon: null,\n    maskClosable: false,\n    className: \"\".concat(className, \"-modal\"),\n    footer: footer,\n    width: 688,\n    height: 500,\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.getLangMsg)('printd.components.key0013'),\n    closable: true,\n    destroyOnClose: true,\n    onCancel: onModalCancel,\n    onOk: onModalCancel,\n    mask: true,\n    visible: visible\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (GridGuideModal);\n\n//# sourceURL=webpack://print-designer/./src/components/common/gridGuide.tsx?");

/***/ }),

/***/ 48600:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\nvar ModalBody = function ModalBody(props) {\n  var className = props.className,\n    row = props.row,\n    setRow = props.setRow,\n    column = props.column,\n    setColumn = props.setColumn,\n    errorTipShow = props.errorTipShow,\n    setErrorTipShow = props.setErrorTipShow;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(0),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    hoverRow = _useState2[0],\n    setHoverRow = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(0),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    hoverCol = _useState4[0],\n    setHoverCol = _useState4[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.DataContext);\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var handleCellClick = function handleCellClick(rowNum, colNum) {\n    rowNum = String(rowNum);\n    colNum = String(colNum);\n    setRow(rowNum);\n    setColumn(colNum);\n  };\n  var handleMouseLeave = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function () {\n    setHoverRow(0);\n    setHoverCol(0);\n  }, []);\n  var handleMouseOver = function handleMouseOver(rowNum, colNum) {\n    setHoverRow(rowNum);\n    setHoverCol(colNum);\n  };\n  var renderEllipsis = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function () {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"span\", {\n      className: \"exceed-cell\"\n    }, \"...\");\n  }, []);\n  var renderColumn = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (rowNum) {\n    var columnData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\n    var exceedGrid = function exceedGrid(columnNum) {\n      return rowNum === 8 && row > 8 && columnNum <= column || columnNum === 10 && column > 10 && rowNum <= row;\n    };\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(columnData).call(columnData, function (colNum) {\n      var _context;\n      var isActive = rowNum <= row && colNum <= column;\n      var isHover = rowNum <= hoverRow && colNum <= hoverCol;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_6___default()({\n          cell: true,\n          active: isActive,\n          hover: !isActive && isHover\n        }),\n        key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = \"\".concat(rowNum, \"-\")).call(_context, colNum),\n        onClick: function onClick() {\n          return handleCellClick(rowNum, colNum);\n        },\n        onMouseOver: function onMouseOver() {\n          return handleMouseOver(rowNum, colNum);\n        }\n      }, exceedGrid(colNum) ? renderEllipsis() : null);\n    });\n  }, [row, column, hoverRow, hoverCol]);\n  var renderRow = function renderRow() {\n    var rowData = [1, 2, 3, 4, 5, 6, 7, 8];\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(rowData).call(rowData, function (num) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n        className: \"row\",\n        key: num\n      }, renderColumn(num));\n    });\n  };\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, errorTipShow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Alert, {\n    className: \"\".concat(className, \"-alert\"),\n    message: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0030'),\n    type: \"error\",\n    delayOffTime: 0,\n    closable: true,\n    showIcon: true,\n    onClose: function onClose() {\n      return setErrorTipShow(false);\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: className\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-info\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-input\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"label\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0015')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.InputNumber, {\n    placeholder: \"\",\n    value: row,\n    style: language === 'en_US' ? {\n      width: 45\n    } : {},\n    onChange: function onChange(e) {\n      setRow(e.target.value);\n    }\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-input\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"label\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0016')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.InputNumber, {\n    placeholder: \"\",\n    value: column,\n    style: language === 'en_US' ? {\n      width: 45\n    } : {},\n    onChange: function onChange(e) {\n      setColumn(e.target.value);\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"grid-main\",\n    onMouseLeave: handleMouseLeave\n  }, renderRow())));\n};\n\n// 网格设置向导\nvar GridGuideModal = function GridGuideModal(_ref) {\n  var visible = _ref.visible,\n    onCancel = _ref.onCancel,\n    meta = _ref.meta,\n    definition = _ref.definition,\n    onConfirm = _ref.onConfirm;\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState5, 2),\n    row = _useState6[0],\n    setRow = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(''),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState7, 2),\n    column = _useState8[0],\n    setColumn = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState9, 2),\n    errorTipShow = _useState10[0],\n    setErrorTipShow = _useState10[1];\n  var className = 'grid-settings';\n  var handleConfirm = function handleConfirm() {\n    if (!(Number(row) > 0) || !(Number(column) > 0)) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.console.log('errorTipShow', errorTipShow);\n      return setErrorTipShow(true);\n    } else if (errorTipShow) {\n      setErrorTipShow(false);\n    }\n    onConfirm({\n      row: row,\n      column: column\n    });\n  };\n  var footer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-modal-footer-btns\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Button, {\n    onClick: onCancel,\n    type: \"second\",\n    className: \"\".concat(className, \"-modal-cancel-btn\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0011')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Button, {\n    className: \"\".concat(className, \"-modal-ok-btn\"),\n    type: \"primary\",\n    onClick: handleConfirm\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0012'))));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Modal, {\n    body: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(ModalBody, {\n      className: \"\".concat(className, \"-body\"),\n      row: row,\n      setRow: setRow,\n      column: column,\n      setColumn: setColumn,\n      errorTipShow: errorTipShow,\n      setErrorTipShow: setErrorTipShow\n    }),\n    titleIcon: null,\n    maskClosable: false,\n    className: \"\".concat(className, \"-modal\"),\n    footer: footer,\n    width: 400,\n    height: 500,\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.getLangMsg)('printd.components.key0017'),\n    destroyOnClose: true,\n    closable: true,\n    onCancel: onCancel,\n    onOk: function onOk() {\n      return null;\n    },\n    mask: true,\n    visible: visible\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (GridGuideModal);\n\n//# sourceURL=webpack://print-designer/./src/components/common/gridSettings.tsx?");

/***/ }),

/***/ 84528:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   RULER_WIDTH: function() { return /* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var konva__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(25700);\n/* harmony import */ var konva__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(konva__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(98092);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(41232);\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_8___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_9___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_10___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context11; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_6___default()(_context11 = Object.prototype.toString.call(o)).call(_context11, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_7___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(_context10 = ownKeys(Object(t))).call(_context10, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n// 25的话右边的纵轴有问题\nvar RECT_SEQ_START = 'start';\nvar RECT_SEQ_END = 'end';\nvar RULER_SPLIT_LINE_NAME = 'ruler-split-line';\n// const HIGH_LIGHT_LINE_COLOR = '#3987ED'\nvar HIGH_LIGHT_LINE_COLOR = '#5797FF';\nvar DEFAULT_LINE_COLOR = '#D9D9D9';\nvar calculateXY = function calculateXY(i, marginLeftOrMarginTop) {\n  var ruleWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH;\n  // 10 mm\n  var distance = i;\n  // 这里是逻辑2的算法\n  // if (typeof marginLeftOrMarginTop === 'number') {\n  //   distance = i > marginLeftOrMarginTop ? Math.round(i - marginLeftOrMarginTop) : Math.round(marginLeftOrMarginTop - i)\n  // }\n  if (distance % 20 === 0) {\n    return (ruleWidth - 16) * 1; // 16\n    // 5mm\n  } else if (distance % 10 === 0) {\n    return (ruleWidth - 8) * 1; // 8\n  }\n  // 1mm\n  return (ruleWidth - 4) * 1; // 4\n  // return i % 10 === 0 ? ruleWidth - 10 : i % 5 === 0 ? ruleWidth - 5 : ruleWidth - 3\n};\nvar getCommonPosition = function getCommonPosition() {\n  var solidDirection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'x';\n  var rulerWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH;\n  return solidDirection === 'x' ? {\n    x: 0,\n    y: rulerWidth\n  } : {\n    y: 0,\n    x: rulerWidth\n  };\n};\nvar getCommonLineProps = function getCommonLineProps() {\n  var solidDirection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'x';\n  return _objectSpread(_objectSpread({}, getCommonPosition(solidDirection)), {}, {\n    // stroke: 'yello',\n    stroke: DEFAULT_LINE_COLOR,\n    strokeWidth: 1,\n    listening: false\n  });\n};\n// 文本位置应该固定\nvar getTextPosition = function getTextPosition() {\n  return _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH / 2 - 4;\n};\nvar Ruler = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_18__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_18__.forwardRef)(function (props, forwardedRef) {\n  var direction = props.direction,\n    _props$scale = props.scale,\n    scale = _props$scale === void 0 ? 1 : _props$scale,\n    pageSize = props.pageSize,\n    _props$ruleWidth = props.ruleWidth,\n    ruleWidth = _props$ruleWidth === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH : _props$ruleWidth,\n    _props$marginTop = props.marginTop,\n    marginTop = _props$marginTop === void 0 ? 0 : _props$marginTop,\n    _props$marginLeft = props.marginLeft,\n    marginLeft = _props$marginLeft === void 0 ? 0 : _props$marginLeft,\n    _props$marginBottom = props.marginBottom,\n    marginBottom = _props$marginBottom === void 0 ? 0 : _props$marginBottom,\n    _props$marginRight = props.marginRight,\n    marginRight = _props$marginRight === void 0 ? 0 : _props$marginRight;\n  var topRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var bottomRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var leftRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var rightRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var controlLeftRectRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var controlTopRectRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var oneMMDistance = (0,_utils_index__WEBPACK_IMPORTED_MODULE_23__.oneMMtoPx)(scale);\n  var RULER_TOP = _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH + marginTop * oneMMDistance;\n  var RULER_LEFT = _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH + marginLeft * oneMMDistance;\n  // const RULER_TOP = RULER_WIDTH\n  // const RULER_LEFT = RULER_WIDTH\n  var refs = [topRef, bottomRef, leftRef, rightRef];\n  var leftRulerRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var topRulerRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var hightLineRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)([]);\n  var topHighLineRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var leftHighLineRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      // 这里的单位是px\n      operateLine: function operateLine(_ref) {\n        var _controlLeftRectRef$c, _topHighLineRef$curre, _topHighLineRef$curre2, _controlLeftRectRef$c2, _controlTopRectRef$cu, _leftHighLineRef$curr, _leftHighLineRef$curr2, _controlTopRectRef$cu2, _context;\n        var top = _ref.top,\n          bottom = _ref.bottom,\n          left = _ref.left,\n          right = _ref.right,\n          width = _ref.width,\n          height = _ref.height;\n        var isChangeLine = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n        // topRef.current?.position({\n        //   x: 0,\n        //   y: top + RULER_TOP\n        // })\n        // bottomRef.current?.position({\n        //   x: 0,\n        //   y: bottom + RULER_TOP\n        // })\n        // leftRef.current?.position({\n        //   x: left + RULER_LEFT,\n        //   y: 0\n        // })\n        // rightRef.current?.position({\n        //   x: right + RULER_LEFT,\n        //   y: 0\n        // })\n        (_controlLeftRectRef$c = controlLeftRectRef.current) === null || _controlLeftRectRef$c === void 0 || _controlLeftRectRef$c.position({\n          x: 0,\n          y: top + RULER_TOP\n        });\n        // topHighLineRef.current?.point\n        (_topHighLineRef$curre = topHighLineRef.current) === null || _topHighLineRef$curre === void 0 || _topHighLineRef$curre.points([left + RULER_LEFT, _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH, width + left + RULER_LEFT, _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH]);\n        (_topHighLineRef$curre2 = topHighLineRef.current) === null || _topHighLineRef$curre2 === void 0 || _topHighLineRef$curre2.visible(true);\n        (_controlLeftRectRef$c2 = controlLeftRectRef.current) === null || _controlLeftRectRef$c2 === void 0 || _controlLeftRectRef$c2.height(height);\n        (_controlTopRectRef$cu = controlTopRectRef.current) === null || _controlTopRectRef$cu === void 0 || _controlTopRectRef$cu.position({\n          x: left + RULER_LEFT,\n          y: 0\n        });\n        (_leftHighLineRef$curr = leftHighLineRef.current) === null || _leftHighLineRef$curr === void 0 || _leftHighLineRef$curr.points([_constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH, top + RULER_TOP, _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH, top + RULER_TOP + height]);\n        (_leftHighLineRef$curr2 = leftHighLineRef.current) === null || _leftHighLineRef$curr2 === void 0 || _leftHighLineRef$curr2.visible(true);\n        (_controlTopRectRef$cu2 = controlTopRectRef.current) === null || _controlTopRectRef$cu2 === void 0 || _controlTopRectRef$cu2.width(width);\n        var rectRefs = [controlLeftRectRef, controlTopRectRef];\n        // 确实有性能问题\n        // TODO:\n        // 二分查找\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(_context = [topRulerRef, leftRulerRef]).call(_context, function (ref, idx) {\n          var _ref$current;\n          var lines = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_14___default()(_ref$current).call(_ref$current, \".\".concat(RULER_SPLIT_LINE_NAME)).toArray();\n          var currentRect = rectRefs[idx].current;\n          if (currentRect) {\n            var _context2;\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = hightLineRef.current).call(_context2, function (line) {\n              line.stroke(DEFAULT_LINE_COLOR);\n            });\n            hightLineRef.current = [];\n            var isFindLine = false;\n            var _iterator = _createForOfIteratorHelper(lines),\n              _step;\n            try {\n              for (_iterator.s(); !(_step = _iterator.n()).done;) {\n                var line = _step.value;\n                if (konva__WEBPACK_IMPORTED_MODULE_20___default().Util.haveIntersection(currentRect.getClientRect(), line.getClientRect())) {\n                  isFindLine = true;\n                  hightLineRef.current.push(line);\n                  line.stroke(HIGH_LIGHT_LINE_COLOR);\n                } else {\n                  if (isFindLine) break;\n                  line.stroke(DEFAULT_LINE_COLOR);\n                }\n              }\n            } catch (err) {\n              _iterator.e(err);\n            } finally {\n              _iterator.f();\n            }\n          }\n        });\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(rectRefs).call(rectRefs, function (ref) {\n          var _ref$current2, _ref$current3;\n          (_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _ref$current2.visible(true);\n          (_ref$current3 = ref.current) === null || _ref$current3 === void 0 || (_ref$current3 = _ref$current3.getLayer()) === null || _ref$current3 === void 0 || _ref$current3.batchDraw();\n        });\n      },\n      hideLine: function hideLine() {\n        var _topHighLineRef$curre3, _leftHighLineRef$curr3, _context3, _context4;\n        // refs.forEach(ref => {\n        //   ref.current?.visible(false)\n        // })\n        (_topHighLineRef$curre3 = topHighLineRef.current) === null || _topHighLineRef$curre3 === void 0 || _topHighLineRef$curre3.visible(false);\n        (_leftHighLineRef$curr3 = leftHighLineRef.current) === null || _leftHighLineRef$curr3 === void 0 || _leftHighLineRef$curr3.visible(false);\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(_context3 = hightLineRef.current).call(_context3, function (line) {\n          line.stroke(DEFAULT_LINE_COLOR);\n        });\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_13___default()(_context4 = [controlLeftRectRef, controlTopRectRef]).call(_context4, function (ref) {\n          var _ref$current4, _ref$current5;\n          (_ref$current4 = ref.current) === null || _ref$current4 === void 0 || _ref$current4.visible(false);\n          (_ref$current5 = ref.current) === null || _ref$current5 === void 0 || (_ref$current5 = _ref$current5.getLayer()) === null || _ref$current5 === void 0 || _ref$current5.batchDraw();\n        });\n      },\n      operateRuler: function operateRuler(_ref2) {\n        var top = _ref2.top,\n          left = _ref2.left;\n        if (top !== undefined) {\n          var _topRulerRef$current, _topRulerRef$current2;\n          (_topRulerRef$current = topRulerRef.current) === null || _topRulerRef$current === void 0 || _topRulerRef$current.position({\n            y: top\n          });\n          (_topRulerRef$current2 = topRulerRef.current) === null || _topRulerRef$current2 === void 0 || _topRulerRef$current2.batchDraw();\n        }\n        if (left !== undefined) {\n          var _leftRulerRef$current, _leftRulerRef$current2;\n          (_leftRulerRef$current = leftRulerRef.current) === null || _leftRulerRef$current === void 0 || _leftRulerRef$current.position({\n            x: left\n          });\n          (_leftRulerRef$current2 = leftRulerRef.current) === null || _leftRulerRef$current2 === void 0 || _leftRulerRef$current2.batchDraw();\n        }\n      }\n    };\n  }, [marginTop, marginLeft, scale]);\n  // 需要转mm\n  var h = pageSize.height,\n    w = pageSize.width;\n  var height = Math.max(h, marginTop + marginBottom) + _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_REDUNDANCY;\n  var width = Math.max(w, marginLeft + marginRight) + _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_REDUNDANCY;\n  if (direction === 'x') {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(PartRuler, {\n      direction: \"x\",\n      highLineRef: leftHighLineRef,\n      scale: scale,\n      rectRef: controlLeftRectRef,\n      marginStart: marginTop,\n      marginEnd: marginBottom,\n      realLength: height,\n      ruleWidth: ruleWidth,\n      frontRef: topRef,\n      endRef: bottomRef,\n      ref: topRulerRef\n    });\n  } else {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(PartRuler, {\n      direction: \"y\",\n      highLineRef: topHighLineRef,\n      scale: scale,\n      rectRef: controlTopRectRef,\n      marginStart: marginLeft,\n      marginEnd: marginRight,\n      realLength: width,\n      ruleWidth: ruleWidth,\n      frontRef: leftRef,\n      endRef: rightRef,\n      ref: leftRulerRef\n    });\n  }\n}));\nvar TEXT_DISTANCE_Y = 4;\nvar TEXT_DISTANCE_X = -3;\nfunction getTextXY(direction, textPosition, solidOrigin) {\n  var rulerWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH;\n  return {\n    x: direction === 'x' ? textPosition : solidOrigin + rulerWidth + TEXT_DISTANCE_Y,\n    y: direction === 'x' ? solidOrigin + rulerWidth + TEXT_DISTANCE_X : textPosition\n  };\n}\n// TODO:\n// 这种方式不是很好\nfunction getRectPos(_ref3) {\n  var direction = _ref3.direction,\n    scale = _ref3.scale,\n    seq = _ref3.seq,\n    marginLength = _ref3.marginLength,\n    length = _ref3.length,\n    _ref3$rulerWidth = _ref3.rulerWidth,\n    rulerWidth = _ref3$rulerWidth === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH : _ref3$rulerWidth;\n  var pos = {};\n  var oneMMDistance = (0,_utils_index__WEBPACK_IMPORTED_MODULE_23__.oneMMtoPx)(scale);\n  // direction 为 x 则是y轴, x固定的意思\n  if (direction === 'x') {\n    var _context5;\n    var posX = {\n      y: seq === RECT_SEQ_START ? 0 : length - marginLength - _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_REDUNDANCY,\n      x: 0,\n      height: marginLength\n    };\n    (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(pos, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15___default()(_context5 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(posX)).call(_context5, function (ret, key) {\n      ret[key] = posX[key] * oneMMDistance;\n      if (key === 'y') {\n        ret[key] += rulerWidth;\n      }\n      return ret;\n    }, {}), {\n      width: rulerWidth\n    });\n  } else {\n    var _context6;\n    var posY = {\n      x: seq === RECT_SEQ_START ? 0 : length - marginLength - _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_REDUNDANCY,\n      y: 0,\n      width: marginLength\n    };\n    (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(pos, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15___default()(_context6 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(posY)).call(_context6, function (ret, key) {\n      ret[key] = posY[key] * oneMMDistance;\n      if (key === 'x') {\n        ret[key] += rulerWidth;\n      }\n      return ret;\n    }, {}), {\n      height: rulerWidth\n    });\n  }\n  return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(pos, {\n    listening: false,\n    fill: '#000000',\n    // stroke: '#d9d9d9',\n    // strokeWidth: 1,\n    // shadowForStrokeEnabled: false,\n    // strokeScaleEnabled: false,\n    // hitStrokeWidth: 0,\n    // strokeEnabled: true,\n    // alpha: .2,\n    opacity: 0.1\n    // opacity: 1\n  });\n}\nvar PartRuler = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_18__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_18__.forwardRef)(function (props, forwardedRef) {\n  var direction = props.direction,\n    scale = props.scale,\n    marginStart = props.marginStart,\n    marginEnd = props.marginEnd,\n    length = props.realLength,\n    _props$ruleWidth2 = props.ruleWidth,\n    ruleWidth = _props$ruleWidth2 === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_WIDTH : _props$ruleWidth2,\n    frontRef = props.frontRef,\n    endRef = props.endRef,\n    rectRef = props.rectRef,\n    highLineRef = props.highLineRef;\n  var marginLength = marginStart;\n  var lines = [];\n  var rects = [];\n  var oneMMDistance = (0,_utils_index__WEBPACK_IMPORTED_MODULE_23__.oneMMtoPx)(scale);\n  var startRectProp = getRectPos({\n    direction: direction,\n    scale: scale,\n    seq: RECT_SEQ_START,\n    marginLength: marginStart,\n    length: length\n  });\n  var endRectProp = getRectPos({\n    direction: direction,\n    scale: scale,\n    seq: RECT_SEQ_END,\n    marginLength: marginEnd,\n    length: length\n  });\n  var startLinePoints = direction === 'x' ? [endRectProp.x, startRectProp.y + startRectProp.height, startRectProp.x + startRectProp.width, startRectProp.y + startRectProp.height] : [startRectProp.x + startRectProp.width, 0, startRectProp.x + startRectProp.width, startRectProp.height];\n  var endLinePoints = direction === 'x' ? [endRectProp.x, endRectProp.y, endRectProp.x + endRectProp.width, endRectProp.y] : [endRectProp.x, 0, endRectProp.x, endRectProp.height];\n  rects.push(\n  /*#__PURE__*/\n  // <Rect {...startRectProp} key={`${direction === 'x' ? 'rect_horizontal_start' : 'rect_vertical_start'}`} />,\n  // <Rect {...endRectProp} key={`${direction === 'x' ? 'rect_horizontal_end' : 'rect_vertical_end'}`} />,\n  react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, startRectProp, {\n    opacity: 1,\n    fill: \"#0E5FD8\",\n    dash: [2, 2],\n    x: 0,\n    y: 0,\n    stroke: \"#0E5FD8\",\n    strokeWidth: 2,\n    points: startLinePoints,\n    key: \"\".concat(direction === 'x' ? 'rect_horizontal_start' : 'rect_vertical_start')\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, endRectProp, {\n    opacity: 1,\n    fill: \"#0E5FD8\",\n    dash: [2, 2],\n    x: 0,\n    y: 0,\n    stroke: \"#0E5FD8\",\n    strokeWidth: 2,\n    points: endLinePoints,\n    key: \"\".concat(direction === 'x' ? 'rect_horizontal_end' : 'rect_vertical_end')\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Rect, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({\n    ref: rectRef,\n    visible: false\n  }, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_12__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_12__[\"default\"])({\n    listening: false,\n    // opacity: 0.4,\n    opacity: 1\n  }, direction === 'x' ? 'width' : 'height', ruleWidth), direction !== 'x' ? 'width' : 'height', ruleWidth), {\n    key: \"\".concat(direction === 'x' ? 'rect_horizontal_control' : 'rect_vertical_control'),\n    fill: \"#C7E5FF\",\n    x: 0,\n    y: 0\n    // zIndex 无效\n    // zIndex={1000000}\n    ,\n    id: \"\".concat(direction === 'x' ? 'rect_horizontal_control' : 'rect_vertical_control')\n  })));\n  // 这里需要懒加载,非可见区域的尺寸不需要绘制\n  // 分区域应该就不会有影响了\n  // 这里需要对marginTop进行倒排计算\n  for (var i = 0; i < length; i += 2) {\n    var _context7;\n    // 这样也有可能整除不了\n    // 纵 - 横线\n    // 先负\n    // TODO:\n    // mm-px\n    // 1. 从零开始计数: 竖线不从零开始，要除去margin上下的余值，然后计算，文字要 i - margin （这里得考虑下误差，与零比较的问题）\n    // 2. 从零开始，并反过来，得考虑怎么反过来，或者用DOM一起实现\n    // mm 计算, 1mm = 3.77px，难以计算，不如整数，如 4px 先考虑下计算再考虑是否换整数\n    // 换种方式, 1mm -> 3.77px -> 1px -> 放大3.77倍 ? 这种好像比较好实现? 不用，坐标乘以mmPX换算\n    // 后正\n    var solidOrigin = i * oneMMDistance;\n    var linePoints = direction === 'x' ? [calculateXY(i, length), solidOrigin, ruleWidth, solidOrigin] : [solidOrigin, calculateXY(i, length), solidOrigin, ruleWidth];\n    lines.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, getCommonLineProps(direction), {\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context7 = \"\".concat(direction, \"_\")).call(_context7, i),\n      points: linePoints,\n      name: RULER_SPLIT_LINE_NAME\n    })));\n    // 复用下\n    var textPosition = getTextPosition();\n    // mm\n    // 逻辑1：先算margin再算实际\n    // if (marginLength - i >= 0) {\n    //   if (Math.round(marginLength - i) % 10 === 0) {\n    //     const textXY = getTextXY(direction, textPosition, solidOrigin)\n    //     lines.push(<Text align='right' text={Math.round((marginLength - i)) / 10 + ''} key={`text_${direction === 'x' ? 'horizontal' : 'vertical'}_10_${i}`} listening={false} {...textXY} />)\n    //   }\n    // } else if (Math.round(i - marginLength) % 10 === 0) {\n    //   const textXY = getTextXY(direction, textPosition, solidOrigin)\n    //   lines.push(<Text align='right' text={Math.round((i - marginLength) / 10) + ''} key={`text_${direction === 'x' ? 'horizontal' : 'vertical'}_${i}`} listening={false} {...textXY} />)\n    // }\n    // 逻辑2：直接从零计算\n    // 这个逻辑有点耦合\n    if (i % 20 === 0 && i < length - _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_REDUNDANCY) {\n      var _context8;\n      var textXY = getTextXY(direction, textPosition, solidOrigin);\n      lines.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Text, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({\n        letterSpacing: 2,\n        fill: _constants__WEBPACK_IMPORTED_MODULE_22__.RULER_FONT_COLOR,\n        rotation: direction === 'x' ? -90 : 0,\n        fontSize: 10,\n        align: \"right\",\n        text: Math.round(i / 1) + '',\n        key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context8 = \"text_\".concat(direction === 'x' ? 'horizontal' : 'vertical', \"_\")).call(_context8, i),\n        listening: false\n      }, textXY)));\n    }\n  }\n  var nameLinePoints = direction === 'x' ? [0, 0, ruleWidth, 0] : [0, 0, 0, ruleWidth];\n  lines.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, getCommonLineProps(direction), {\n    points: nameLinePoints,\n    ref: frontRef,\n    visible: false,\n    key: direction === 'x' ? 'top-line' : 'left-line'\n  })));\n  lines.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, getCommonLineProps(direction), {\n    points: nameLinePoints,\n    ref: endRef,\n    visible: false,\n    key: direction === 'x' ? 'bottom-line' : 'right-line'\n  })));\n  lines.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Line, {\n    stroke: HIGH_LIGHT_LINE_COLOR,\n    points: direction === 'x' ? [ruleWidth, 0, ruleWidth, 1] : [0, ruleWidth, 1, ruleWidth],\n    ref: highLineRef,\n    visible: false,\n    key: direction === 'x' ? 'left-high-line' : 'top-high-line'\n  }));\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement((react__WEBPACK_IMPORTED_MODULE_18___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Layer, {\n    ref: forwardedRef,\n    listening: false,\n    key: \"ruler_\".concat(direction)\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_19__.Group, null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_21__.toArray)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(rects).call(rects, lines)))));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (Ruler);\n\n//# sourceURL=webpack://print-designer/./src/components/common/printRuler.tsx?");

/***/ }),

/***/ 21532:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75240);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(92192);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(1508);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var konva__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(25700);\n/* harmony import */ var konva__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(konva__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(98092);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(75252);\n/* harmony import */ var _utils_shape__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(82795);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(41232);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(21980);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__);\n\n\n\n\n\n\n\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context19; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context19 = Object.prototype.toString.call(o)).call(_context19, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SNAP_TOLERANCE = 5;\nvar SNAP_FILTER_TOLERANCE = SNAP_TOLERANCE + 1;\nvar EQUAL_DISTANCE = 0.09; // 一位小数精度\nvar ABSOLUTE_EQUAL_DISTANCE = 0.009; // 一位小数精度\nvar initialReflines = {\n  hLine: [],\n  vLine: []\n};\nvar LEFT = 'LEFT';\nvar RIGHT = 'RIGHT';\nvar BOTTOM = 'BOTTOM';\nvar TOP = 'TOP';\nvar skipConfig = {\n  skipTransform: false,\n  skipShadow: true,\n  skipStroke: true\n};\nvar refLineProps = {\n  x: 0,\n  y: 0,\n  stroke: '#FB2323',\n  fill: '#FB2323',\n  shadowEnabled: false,\n  strokeWidth: .5,\n  listening: false\n};\nfunction calcLineValues(arr) {\n  var defaultPosInfo = {\n    length: 0,\n    origin: 0,\n    position: 0,\n    distance: (_babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_9___default())\n  };\n  if (!arr.length) return [defaultPosInfo, -1];\n  var minDistance = (_babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_9___default());\n  var allPosInfos = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(arr).call(arr, function (res, posArr) {\n    var _posArr = (0,_babel_runtime_corejs3_helpers_toArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(posArr),\n      position = _posArr[0],\n      distance = _posArr[1],\n      restArr = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_posArr).call(_posArr, 2);\n    if (!restArr.length) {\n      return res;\n    } else {\n      var length = Math.max.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(restArr)) - Math.min.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(restArr));\n      var origin = Math.min.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(restArr));\n      if (distance < minDistance) {\n        minDistance = distance;\n      }\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(res).call(res, [{\n        length: length,\n        origin: origin,\n        position: position,\n        distance: distance\n      }]);\n    }\n  }, []);\n  var resPosInfoIdx = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_12___default()(allPosInfos).call(allPosInfos, function (_ref) {\n    var distance = _ref.distance;\n    return minDistance === distance;\n  });\n  return [resPosInfoIdx !== -1 ? allPosInfos[resPosInfoIdx] : defaultPosInfo, resPosInfoIdx];\n}\nfunction calculatePointByProp(props, solidDirection, _ref2) {\n  var redundancyX = _ref2.x,\n    redundancyY = _ref2.y;\n  var position = props.position,\n    origin = props.origin,\n    lineLength = props.lineLength;\n  if (solidDirection === 'x') {\n    return [position - redundancyX, origin - redundancyY, position - redundancyX, origin + lineLength - redundancyY];\n  } else {\n    return [origin - redundancyX, position - redundancyY, origin + lineLength - redundancyX, position - redundancyY];\n  }\n}\nvar RefLine = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_19__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_19__.forwardRef)(function (props, forwardedRef) {\n  var _context17, _context18;\n  var _props$lines = props.lines,\n    lines = _props$lines === void 0 ? initialReflines : _props$lines,\n    stageRef = props.stageRef,\n    marginTop = props.marginTop,\n    marginLeft = props.marginLeft,\n    rootControlRef = props.rootControlRef,\n    selectionContext = props.selectionContext,\n    getRedundancyXY = props.getRedundancyXY,\n    dataContext = props.dataContext,\n    controlGroupRef = props.controlGroupRef;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(true),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_useState, 2),\n    enableRefline = _useState2[0],\n    setEnableRefline = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(lines),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_useState3, 2),\n    refLines = _useState4[0],\n    setRefLines = _useState4[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('refline', function (newEnableRefline) {\n      if (enableRefline !== newEnableRefline) {\n        setEnableRefline(newEnableRefline);\n      }\n    });\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('refline');\n    };\n  }, [enableRefline]);\n  // shiftKey, altKey的功能不想禁用 所以不判断这些\n  // const changePositionTransformerAnchor = ['top-left', 'top-center', 'top-right', 'middle-left']\n  var handleSelectedNodeSnapAction = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (_ref3) {\n    var selectedNode = _ref3.selectedNode,\n      posInfo = _ref3.posInfo,\n      _ref3$isTransformActi = _ref3.isTransformAction,\n      isTransformAction = _ref3$isTransformActi === void 0 ? false : _ref3$isTransformActi,\n      selectedId = _ref3.selectedId,\n      transformerNewBox = _ref3.transformerNewBox;\n    var top = posInfo.top,\n      left = posInfo.left,\n      width = posInfo.width,\n      height = posInfo.height,\n      _posInfo$isNotChangeT = posInfo.isNotChangeTopLeft,\n      isNotChangeTopLeft = _posInfo$isNotChangeT === void 0 ? false : _posInfo$isNotChangeT;\n    var res = {};\n    if (!enableRefline) return;\n    if (top !== undefined) {\n      if (!isTransformAction) {\n        // const { x, y } = transformerNewBox\n        var _selectedNode$absolut = selectedNode.absolutePosition(),\n          x = _selectedNode$absolut.x;\n        // selectedNode.absolutePosition({\n        //   y: top,\n        //   x\n        // })\n        res.x = x;\n        res.refY = top;\n        res.selectedNode = selectedNode;\n      } else {\n        var _x = transformerNewBox.x,\n          originHeight = transformerNewBox.height,\n          rotation = transformerNewBox.rotation,\n          _width = transformerNewBox.width,\n          y = transformerNewBox.y;\n        res.rotation = rotation;\n        res.x = _x;\n        res.y = isNotChangeTopLeft ? y : top;\n        res.height = height;\n        res.width = _width;\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('transformer resBox update', {\n          y: top,\n          x: _x,\n          height: height,\n          heightArr: [originHeight, height]\n        });\n      }\n    } else if (left !== undefined) {\n      if (!isTransformAction) {\n        var _selectedNode$absolut2 = selectedNode.absolutePosition(),\n          _y = _selectedNode$absolut2.y;\n        // const { x, y } = transformerNewBox\n        // selectedNode.absolutePosition({\n        //   x: left,\n        //   y\n        // })\n        res.refX = left;\n        res.y = _y;\n        res.selectedNode = selectedNode;\n      } else {\n        var _y2 = transformerNewBox.y,\n          originWidth = transformerNewBox.width,\n          _rotation = transformerNewBox.rotation,\n          _height = transformerNewBox.height,\n          _x2 = transformerNewBox.x;\n        res.rotation = _rotation;\n        res.x = isNotChangeTopLeft ? _x2 : left;\n        res.y = _y2;\n        res.width = width;\n        res.height = _height;\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('transformer resBox update', {\n          y: _y2,\n          x: left,\n          width: width,\n          widthArr: [originWidth, width]\n        });\n      }\n    }\n    return res;\n    // selectedNode?.getLayer().batchDraw()\n  }, [enableRefline]);\n  // transformer 应该传NewBox\n  var searchRefLines = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (selectedId) {\n    var isTransformAction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    var transformerNewBox = arguments.length > 2 ? arguments[2] : undefined;\n    if (!enableRefline) return;\n    // TODO:\n    // 拿上次与本次的图形位置信息做比较，少更新？\n    if (selectedId) {\n      var _dataContext$findCont, _context, _controlGroupRef$curr, _context3;\n      var refPostionInfo = {};\n      var activeAnchor = '';\n      var parentItem = dataContext.findControl((_dataContext$findCont = dataContext.findControl(selectedId)) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont.parentId);\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants_index__WEBPACK_IMPORTED_MODULE_22__.NOT_REF_TYPES).call(_constants_index__WEBPACK_IMPORTED_MODULE_22__.NOT_REF_TYPES, parentItem === null || parentItem === void 0 ? void 0 : parentItem.type)) return;\n      // by id\n      var stage = stageRef.current;\n      var root = rootControlRef.current;\n      var rootRect = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.getAbsolutePosition)(root);\n      var selectedNode = stage === null || stage === void 0 ? void 0 : stage.findOne(\"#\".concat(selectedId));\n      // if (isTransformAction) {\n      //   selectedNode = stage?.findOne(`#transformer_${selectedId}`)\n      // }\n      if (!selectedNode) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log(\"error selectedNode selectedId\", selectedNode, selectedId);\n        return;\n      }\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('selectedNode', selectedNode);\n      // 暂时全部跳过\n      var rect = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.getAbsolutePosition)(selectedNode));\n      if (isTransformAction) {\n        var _x3 = transformerNewBox.x,\n          _y3 = transformerNewBox.y,\n          _height2 = transformerNewBox.height,\n          _width2 = transformerNewBox.width,\n          _activeAnchor = transformerNewBox.activeAnchor;\n        activeAnchor = _activeAnchor;\n        (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(rect, (0,_utils__WEBPACK_IMPORTED_MODULE_25__.getCalcPosObj)((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, transformerNewBox, {\n          left: _x3,\n          top: _y3,\n          right: _x3 + _width2,\n          bottom: _y3 + _height2\n        })));\n        // Object.assign(refPostionInfo, rect)\n      }\n      // refPostionInfo.rect = rect\n      // transformer 自己判断了\n      var isSelectedNodeOverflow = !isTransformAction && (0,_utils_shape__WEBPACK_IMPORTED_MODULE_24__.isShapeOverflow)((0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.getAbsolutePosition)(selectedNode), (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.getAbsolutePosition)(rootControlRef.current));\n      // if (isTransformAction || isSelectedNodeOverflow) {\n      //   Object.assign(rect, getAbsolutePosition(selectedNode, getRedundancyXY()))\n      // }\n      // console.log(`selectedNode selectedId`, selectedNode, rect)\n      // const rect: rectConfig = selectedNode.getClientRect(skipConfig)\n      var handleSelectedNodeSnap = function handleSelectedNodeSnap(selectedNode, snapPositionConfig, isTransformAction) {\n        // if (isTransformAction) return\n        // isTransformAction不传，此道不通\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('transformer newBox', (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, transformerNewBox));\n        var res = handleSelectedNodeSnapAction({\n          selectedNode: selectedNode,\n          posInfo: snapPositionConfig,\n          isTransformAction: isTransformAction,\n          selectedId: selectedId,\n          // 这里每次备份，因为每次只吸附一个方向，不用考虑副作用\n          // fix: 可能吸附两个方向\n          transformerNewBox: (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, !_.isEmpty(refPostionInfo) ? refPostionInfo : transformerNewBox)\n        });\n        (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(refPostionInfo, res);\n      };\n      var width = rect.width,\n        height = rect.height,\n        x = rect.x,\n        y = rect.y;\n      var selectedNodeLeft = x;\n      var selectedNodeRight = x + width;\n      var selectedNodeTop = y;\n      var selectedNodeBottom = y + height;\n      // 添加冗余区间 SNAP_TOLERANCE * 2\n      // root必须有值\n      var selectedNodeVerticalRegion = {\n          // x 右移，宽需要补足\n          x: Math.max(x - SNAP_FILTER_TOLERANCE, 0),\n          y: rootRect.y,\n          width: Math.min(width + SNAP_FILTER_TOLERANCE * 2, rootRect.width),\n          height: rootRect.height\n        },\n        selectedNodeHorizontalRegion = {\n          // y 上移，高需要补足\n          x: rootRect.x,\n          y: Math.max(y - SNAP_FILTER_TOLERANCE, 0),\n          width: rootRect.width,\n          height: Math.min(height + SNAP_FILTER_TOLERANCE * 2, rootRect.height)\n        };\n      var temArr = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14___default()(_context = new Array(6)).call(_context, {\n        visible: false,\n        position: 0,\n        origin: 0,\n        lineLength: 0\n      });\n      var _refLines = {\n        vLine: JSON.parse(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_15___default()(temArr)),\n        hLine: JSON.parse(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_15___default()(temArr))\n      };\n\n      // 可以考虑根据当前选中节点上下加减多少，拿到相交的节点\n      // 获取当前父节点（现在是直接取画布下的）下所有子节点\n      // by name\n      // const allNodes = stage?.find(`.${CONTAINER_NODE_CLASSNAME}`).toArray()\n      var allNodes = ((_controlGroupRef$curr = controlGroupRef.current) === null || _controlGroupRef$curr === void 0 ? void 0 : _controlGroupRef$curr.getChildren(function (node) {\n        var _context2;\n        return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = node.name().split(' ')).call(_context2, _constants_index__WEBPACK_IMPORTED_MODULE_22__.CONTAINER_NODE_CLASSNAME);\n      })) || [];\n      // 这里root只取实际区域\n      // 可以考虑直接赋值对象并区分，但是语义会奇怪，没性能影响前不做考虑\n      // const nodes = [...allNodes.filter(node => ([selectedNodeVerticalRegion, selectedNodeHorizontalRegion].some(region => Konva.Util.haveIntersection(region, node.getClientRect())))), root]\n      var selection = selectionContext.getSelection();\n      var excludeIds = [];\n      var control = dataContext.findControl(selectedId);\n      if (!isTransformAction && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_26__.isSubDataGrid)(control)) {\n        var parentGridId = control.parentGridId;\n        parentGridId && excludeIds.push(parentGridId);\n      }\n      if (!isTransformAction && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_26__.isDataGrid)(control)) {\n        var subGridId = control.subGridId;\n        if (subGridId !== null && subGridId !== void 0 && subGridId.length) {\n          excludeIds.push.apply(excludeIds, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(subGridId));\n        }\n      }\n      var nodes = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context3 = []).call(_context3, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(isSelectedNodeOverflow ? allNodes : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(allNodes).call(allNodes, function (node) {\n        var _context4;\n        return _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_17___default()(_context4 = [selectedNodeVerticalRegion, selectedNodeHorizontalRegion]).call(_context4, function (region) {\n          var names = node.name().split(' ');\n          var nodeId = node.id();\n          var isCell = names.length > 0 && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(names).call(names, _constants_index__WEBPACK_IMPORTED_MODULE_22__.CELL_NODE_CLASSNAME);\n          return !isCell && (isTransformAction ? true : !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(selection).call(selection, nodeId)) && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(excludeIds).call(excludeIds, nodeId) && konva__WEBPACK_IMPORTED_MODULE_21___default().Util.haveIntersection(region, (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.getAbsolutePosition)(node));\n        });\n      })), [root]);\n      // 扩展成6个\n      var tem = {\n        value: {\n          x: [[], [], [], [], [], []],\n          y: [[], [], [], [], [], []]\n        },\n        snapPosConfig: {\n          x: [[], [], [], [], [], []],\n          y: [[], [], [], [], [], []]\n        },\n        visible: [],\n        position: []\n      };\n      var haveRefLine = false;\n      // 需要提到外面来,这样的话只能根据最早找到的最近,而不是所有最近里的\n      // let isVerticalSnap = false\n      // let isHorizontalSnap = false\n      var _iterator = _createForOfIteratorHelper(nodes),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var item = _step.value;\n          // by id\n          // !item.name().split(' ').includes(${selectedId}`)\n          var isRoot = item === root;\n          // if (isTransformAction ? !item.name().split(' ').includes(selectedId) : item.id() !== `${selectedId}` || isRoot) {\n          if (item.id() !== \"\".concat(selectedId) || isRoot) {\n            // const rect: rectConfig = item.getClientRect(skipConfig)\n            var _rect = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_23__.getAbsolutePosition)(item);\n            // if (isShapeOverflow(getAbsolutePosition(item), getAbsolutePosition(rootControlRef.current))) {\n            //   Object.assign(rect, getAbsolutePosition(item, getRedundancyXY()))\n            // }\n            // if (isRoot) {\n            //   Object.assign(rect, {\n            //     width: root.width(),\n            //     height: root.height(),\n            //     x: 0,\n            //     y: 0,\n            //   })\n            // }\n            var w = _rect.width,\n              h = _rect.height,\n              l = _rect.x,\n              t = _rect.y;\n            var r = l + w; // 对齐目标right\n            var b = t + h; // 对齐目标的bottom\n            // 0.1误差 ? 0.05\n            // const snapTolerance = isTransformAction ? EQUAL_DISTANCE : SNAP_TOLERANCE\n            // 放在里面 会根据最后找到的为准\n            var isVerticalSnap = false;\n            var isHorizontalSnap = false;\n            var snapTolerance = SNAP_TOLERANCE;\n            // 这里应该要考虑误差?\n            // 不然拖放可能都无法显示\n            var originhcDistance = selectedNodeTop + height / 2 - (t + h / 2);\n            var hcDistance = Math.abs(originhcDistance);\n            var originvcDistance = selectedNodeLeft + width / 2 - (l + w / 2);\n            var vcDistance = Math.abs(originvcDistance);\n            var origintsDistance = t - selectedNodeBottom;\n            var tsDistance = Math.abs(origintsDistance);\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refLines', t, selectedNodeBottom, origintsDistance, tsDistance);\n            var originTSDistance = b - selectedNodeBottom;\n            var TSDistance = Math.abs(originTSDistance);\n            var originbsDistance = t - selectedNodeTop;\n            var bsDistance = Math.abs(originbsDistance);\n            var originBSDistance = b - selectedNodeTop;\n            var BSDistance = Math.abs(originBSDistance);\n            var originlsDistance = l - selectedNodeRight;\n            var lsDistance = Math.abs(originlsDistance);\n            var originLSDistance = r - selectedNodeRight;\n            var LSDistance = Math.abs(originLSDistance);\n            var originrsDistance = l - selectedNodeLeft;\n            var rsDistance = Math.abs(originrsDistance);\n            var originRSDistance = r - selectedNodeLeft;\n            var RSDistance = Math.abs(originRSDistance);\n            // 水平距离 宽度相关计算\n            // 过滤掉为0的值, 那确实相等又没办法\n            // \n            var horizontalDistances = [vcDistance, lsDistance, LSDistance, rsDistance, RSDistance]; //.filter(dis => dis !== 0)\n            // 垂直距离 高度相关计算\n            var verticalDistances = [hcDistance, tsDistance, TSDistance, bsDistance, BSDistance]; //.filter(dis => dis !== 0)\n            // 如果控件溢出，现在的计算会有问题，因为getPosition只是相对根节点而言，而溢出控件的位置计算不相对父节点，框架问题？\n            // if (isRoot) {\n            //   console.log('verticalDistances', verticalDistances)\n            //   console.log('horizontalDistances', horizontalDistances)\n            // }\n            var minHorizontalDistance = Math.min.apply(Math, horizontalDistances);\n            var minVerticalDistance = Math.min.apply(Math, verticalDistances);\n            // 不通过最小来判断，通过最先\n            var isEqualMinHorizontalDistance = function isEqualMinHorizontalDistance(dis) {\n              return true;\n            }; //dis === minHorizontalDistance\n            var isEqualMinVerticalDistances = function isEqualMinVerticalDistances(dis) {\n              return true;\n            }; // dis === minVerticalDistance\n            var hc = hcDistance <= snapTolerance; // 水平中线\n            var vc = vcDistance <= snapTolerance; // 垂直中线\n            // console.log(`t, selectedNodeBottom`, t, selectedNodeBottom)\n            // 下面这个情况有些问题\n            var ts = tsDistance <= snapTolerance && !isRoot; // 从上到下\n            var TS = TSDistance <= snapTolerance && !isRoot; // 从上到下\n            // \n            var bs = bsDistance <= snapTolerance && !isRoot; // 从下到上\n            var BS = BSDistance <= snapTolerance && !isRoot; // 从下到上\n\n            var ls = lsDistance <= snapTolerance && !isRoot; // 外左\n            var LS = LSDistance <= snapTolerance && !isRoot; // 外左\n\n            var rs = rsDistance <= snapTolerance && !isRoot; // 外右\n            var RS = RSDistance <= snapTolerance && !isRoot; // 外右\n\n            var isAcceptAbsorbDirection = function isAcceptAbsorbDirection(absorbDirection) {\n              if (!isTransformAction) return true;\n              switch (activeAnchor) {\n                // 左顶\n                case 'top-left':\n                  {\n                    var _context5;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context5 = [TOP, LEFT]).call(_context5, absorbDirection);\n                  }\n                // 顶\n                case 'top-center':\n                  {\n                    var _context6;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context6 = [TOP]).call(_context6, absorbDirection);\n                  }\n                // 右顶\n                case 'top-right':\n                  {\n                    var _context7;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context7 = [TOP, RIGHT]).call(_context7, absorbDirection);\n                  }\n                // 左底\n                case 'bottom-left':\n                  {\n                    var _context8;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context8 = [BOTTOM, LEFT]).call(_context8, absorbDirection);\n                  }\n                // 底\n                case 'bottom-center':\n                  {\n                    var _context9;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context9 = [BOTTOM]).call(_context9, absorbDirection);\n                  }\n                // 右底\n                case 'bottom-right':\n                  {\n                    var _context10;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context10 = [BOTTOM, RIGHT]).call(_context10, absorbDirection);\n                  }\n                // 左\n                case 'middle-left':\n                  {\n                    var _context11;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context11 = [LEFT]).call(_context11, absorbDirection);\n                  }\n                // 右\n                case 'middle-right':\n                  {\n                    var _context12;\n                    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context12 = [RIGHT]).call(_context12, absorbDirection);\n                  }\n                default:\n                  {\n                    return false;\n                  }\n              }\n            };\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log(lsDistance, LSDistance, activeAnchor);\n            // 不变\n            tem['visible'] = [ts, TS, bs, BS, hc, hc, ls, LS, rs, RS, vc, vc];\n            // 不变\n            tem['position'] = [t, b, t, b, t + h / 2, t + h / 2, l, r, l, r, l + w / 2, l + w / 2];\n            // 这样设置之后可能会导致，再拖拽，其计算位置会不会忽略该设置\n            // 这样的策略确实会导致这样的问题：\n            // 1. 先底部吸附，然后又有中间吸附；由于两者存在误差（因为有3px的距离）导致辅助线对不准\n            // 解决方式：\n            // 1. 再减小吸附效果（）\n            // 2. 每次吸附完重新计算（死循环？）\n            // 3. 每次吸附完修改变动边的吸附计算？（逻辑不好）那下次\n            // 4. 只吸附一边，其余不再计算 x\n            // 5. 只吸附一边，最近吸附，其余边相等就显示 o\n            // 另外,拖放不吸附\n            // 操作图形-吸附图形\n            // 有问题\n            // 底顶\n            if (ts || isTransformAction && tsDistance <= EQUAL_DISTANCE && !isRoot) {\n              var snapPosConfig = {\n                top: t - height,\n                // height: transformerOldBox?.height\n                // 这里又改top height 会冲突\n                height: t - selectedNodeTop,\n                isNotChangeTopLeft: true\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline ts', snapPosConfig);\n              var isSnap = isEqualMinVerticalDistances(tsDistance);\n              var isSnapDone = false;\n              if (isSnap && !isVerticalSnap && isAcceptAbsorbDirection(BOTTOM)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.y[0].push(snapPosConfig);\n                isVerticalSnap = true;\n                isSnapDone = true;\n              }\n              if ((isSnap && isSnapDone || tsDistance <= EQUAL_DISTANCE) && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.y[0].length = 0\n                // }\n                tem.value.y[0].push([t, tsDistance, l, r, selectedNodeLeft, selectedNodeRight]);\n              }\n            }\n            // 顶顶\n            if (bs || isTransformAction && bsDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig = {\n                top: t,\n                height: selectedNodeBottom - t\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline bs', _snapPosConfig);\n              var _isSnap = isEqualMinVerticalDistances(bsDistance);\n              var _isSnapDone = false;\n              if (_isSnap && !isVerticalSnap && isAcceptAbsorbDirection(TOP)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.y[0 + 3].push(_snapPosConfig);\n                isVerticalSnap = true;\n                _isSnapDone = true;\n              }\n              if (_isSnap && _isSnapDone || bsDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.y[0 + 3].length = 0\n                // }\n                tem.value.y[0 + 3].push([t, bsDistance, l, r, selectedNodeLeft, selectedNodeRight]);\n              }\n            }\n            // TODO:\n            // 有问题\n            // 底底\n            if (TS || isTransformAction && TSDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig2 = {\n                top: b - height,\n                height: b - selectedNodeTop,\n                isNotChangeTopLeft: true\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline ts', _snapPosConfig2);\n              var _isSnap2 = isEqualMinVerticalDistances(TSDistance);\n              var _isSnapDone2 = false;\n              if (_isSnap2 && !isVerticalSnap && isAcceptAbsorbDirection(BOTTOM)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.y[1].push(_snapPosConfig2);\n                isVerticalSnap = true;\n                _isSnapDone2 = true;\n              }\n              if (_isSnap2 && _isSnapDone2 || TSDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.y[1].length = 0\n                // }\n                tem.value.y[1].push([b, TSDistance, l, r, selectedNodeLeft, selectedNodeRight]);\n              }\n            }\n            // 顶底\n            if (BS || isTransformAction && BSDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig3 = {\n                top: b,\n                height: selectedNodeBottom - b\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline bs', _snapPosConfig3);\n              var _isSnap3 = isEqualMinVerticalDistances(BSDistance);\n              var _isSnapDone3 = false;\n              if (_isSnap3 && !isVerticalSnap && isAcceptAbsorbDirection(TOP)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.y[1 + 3].push(_snapPosConfig3);\n                isVerticalSnap = true;\n                _isSnapDone3 = true;\n              }\n              if (_isSnap3 && _isSnapDone3 || BSDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.y[1 + 3].length = 0\n                // }\n                tem.value.y[1 + 3].push([b, BSDistance, l, r, selectedNodeLeft, selectedNodeRight]);\n              }\n            }\n            // 有问题\n            // 右左\n            if (ls || isTransformAction && lsDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig4 = {\n                left: l - width,\n                width: l - selectedNodeLeft,\n                isNotChangeTopLeft: true\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline ls', _snapPosConfig4);\n              var _isSnap4 = isEqualMinHorizontalDistance(lsDistance);\n              var _isSnapDone4 = false;\n              if (_isSnap4 && !isHorizontalSnap && isAcceptAbsorbDirection(RIGHT)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.x[0].push(_snapPosConfig4);\n                isHorizontalSnap = true;\n                _isSnapDone4 = true;\n              }\n              if (_isSnap4 && _isSnapDone4 || lsDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.x[0].length = 0\n                // }\n                tem.value.x[0].push([l, lsDistance, t, b, selectedNodeTop, selectedNodeBottom]);\n              }\n            }\n            // 这种同边的好像会有点问题\n            // 左左\n            if (rs || isTransformAction && rsDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig5 = {\n                left: l,\n                width: selectedNodeRight - l\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline rs', _snapPosConfig5);\n              var _isSnap5 = isEqualMinHorizontalDistance(rsDistance);\n              var _isSnapDone5 = false;\n              if (_isSnap5 && !isHorizontalSnap && isAcceptAbsorbDirection(LEFT)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.x[0 + 3].push(_snapPosConfig5);\n                isHorizontalSnap = true;\n                _isSnapDone5 = true;\n              }\n              if (_isSnap5 && _isSnapDone5 || rsDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.x[0 + 3].length = 0\n                // }\n                tem.value.x[0 + 3].push([l, rsDistance, t, b, selectedNodeTop, selectedNodeBottom]);\n              }\n            }\n            // 不太理解有什么问题\n            // 右右\n            if (LS || isTransformAction && LSDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig6 = {\n                left: r - width,\n                width: r - selectedNodeLeft,\n                isNotChangeTopLeft: true\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline ls', _snapPosConfig6);\n              var _isSnap6 = isEqualMinHorizontalDistance(LSDistance);\n              var _isSnapDone6 = false;\n              if (_isSnap6 && !isHorizontalSnap && isAcceptAbsorbDirection(RIGHT)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.x[1].push(_snapPosConfig6);\n                isHorizontalSnap = true;\n                _isSnapDone6 = true;\n              }\n              if (_isSnap6 && _isSnapDone6 || LSDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.x[1].length = 0\n                // }\n                tem.value.x[1].push([r, LSDistance, t, b, selectedNodeTop, selectedNodeBottom]);\n              }\n            }\n            // 左右\n            if (RS || isTransformAction && RSDistance <= EQUAL_DISTANCE && !isRoot) {\n              var _snapPosConfig7 = {\n                left: r,\n                width: selectedNodeRight - r\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline rs', _snapPosConfig7);\n              var _isSnap7 = isEqualMinHorizontalDistance(RSDistance);\n              var _isSnapDone7 = false;\n              if (_isSnap7 && !isHorizontalSnap && isAcceptAbsorbDirection(LEFT)) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.x[1 + 3].push(_snapPosConfig7);\n                isHorizontalSnap = true;\n                _isSnapDone7 = true;\n              }\n              if (_isSnap7 && _isSnapDone7 || RSDistance <= EQUAL_DISTANCE && !isRoot) {\n                // if (isSnapDone) {\n                //   tem.value.x[1 + 3].length = 0\n                // }\n                tem.value.x[1 + 3].push([r, RSDistance, t, b, selectedNodeTop, selectedNodeBottom]);\n              }\n            }\n            // 垂直居中、水平居中的暂时不写，没有场景\n            // 垂直居中\n            if (!isTransformAction && hc || hcDistance <= EQUAL_DISTANCE) {\n              var _snapPosConfig8 = {\n                top: t + h / 2 - height / 2\n                // height: originhcDistance\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline hc', _snapPosConfig8);\n              var _isSnap8 = isEqualMinVerticalDistances(hcDistance);\n              var _isSnapDone8 = false;\n              if (_isSnap8 && !isVerticalSnap && isAcceptAbsorbDirection('')) {\n                tem.snapPosConfig.y[2].push(_snapPosConfig8);\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                isVerticalSnap = true;\n                _isSnapDone8 = true;\n              }\n              if (_isSnap8 && _isSnapDone8 || hcDistance <= EQUAL_DISTANCE) {\n                // if (isSnapDone) {\n                //   tem.value.y[2].length = 0\n                // }\n                tem.value.y[2].push([t + h / 2, hcDistance, l, r, selectedNodeLeft, selectedNodeRight]);\n              }\n            }\n            // 水平居中\n            if (!isTransformAction && (vc || vcDistance <= EQUAL_DISTANCE)) {\n              var _snapPosConfig9 = {\n                left: l + w / 2 - width / 2\n                // width: originvcDistance\n              };\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline vc', _snapPosConfig9);\n              var _isSnap9 = isEqualMinHorizontalDistance(vcDistance);\n              var _isSnapDone9 = false;\n              if (_isSnap9 && !isHorizontalSnap && isAcceptAbsorbDirection('')) {\n                // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n                tem.snapPosConfig.x[5].push(_snapPosConfig9);\n                isHorizontalSnap = true;\n                _isSnapDone9 = true;\n              }\n              if (_isSnap9 && _isSnapDone9 || vcDistance <= EQUAL_DISTANCE) {\n                // if (isSnapDone) {\n                //   tem.value.y[2].length = 0\n                // }\n                tem.value.x[5].push([l + w / 2, vcDistance, t, b, selectedNodeTop, selectedNodeBottom]);\n              }\n            }\n          }\n        }\n        // 辅助线坐标与是否显示(visible)对应的数组,易于循环遍历\n        // let isVerticalSnap = false\n        // let isHorizontalSnap = false\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      var arrTem = [0, 1, 0 + 3, 1 + 3, 2, 0, 1, 0 + 3, 1 + 3, 5];\n      // 底 y[0] y[1]\n      // 顶 y[3] y[4]\n      // 右 x[0] x[1]\n      // 左 x[3] x[4]\n      // 垂直居中 y[2]\n      // 水平居中 x[5]\n\n      var oppoIndex = {\n        0: 1,\n        3: 4,\n        1: 0,\n        4: 3\n      };\n      var oppoDirectionIndex = {\n        x_0: [5, 3, 4],\n        x_1: [5, 3, 4],\n        x_5: [0, 1, 3, 4],\n        x_3: [0, 1, 5],\n        x_4: [0, 1, 5],\n        y_0: [3, 4, 2],\n        y_1: [3, 4, 2],\n        y_3: [0, 1, 2],\n        y_4: [0, 1, 2],\n        y_2: [0, 1, 3, 4]\n        // 0: [2, 3, 4],\n        // 1: [2, 3, 4],\n        // 3: [0, 1, 2],\n        // 4: [0, 1, 2],\n      };\n      // const arrTem = [0, 1, 0 + 3, 1 + 3, 2, 2]\n      // const inoppoDirection = {x: 'y', y: 'x'}\n      var _loop = function _loop() {\n        // 前6为Y辅助线,后6为X辅助线\n        // hLine y为横线，y坐标恒定\n        // vLine x为竖线，x坐标恒定\n        var xory = i < arrTem.length / 2 ? 'y' : 'x';\n        var horv = i < arrTem.length / 2 ? 'hLine' : 'vLine';\n        var _calcLineValues = calcLineValues(tem.value[xory][arrTem[i]]),\n          _calcLineValues2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_calcLineValues, 2),\n          _calcLineValues2$ = _calcLineValues2[0],\n          origin = _calcLineValues2$.origin,\n          length = _calcLineValues2$.length,\n          position = _calcLineValues2$.position,\n          distance = _calcLineValues2$.distance,\n          index = _calcLineValues2[1];\n        var dealIndex = index;\n        // && arrTem[i] !== 2\n        if (!isTransformAction && dealIndex !== -1) {\n          var _context13, _context14, _context15;\n          var oppoArrTemIdx = oppoIndex[arrTem[i]];\n          // const oppoDirectionArrTemIdxs = oppoDirectionIndex[oppoArrTemIdx]\n          var oppoDirectionArrTemIdxs = oppoDirectionIndex[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context13 = \"\".concat(xory, \"_\")).call(_context13, arrTem[i])]; // 相似边冲突\n          var _ref4 = _.isUndefined(oppoArrTemIdx) ? [{\n              distance: distance\n            }, dealIndex] : calcLineValues(tem.value[xory][oppoArrTemIdx]),\n            _ref5 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ref4, 2),\n            _distance = _ref5[0].distance,\n            _index = _ref5[1];\n          var oppoDirectionDistances = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context14 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_context15 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(oppoDirectionArrTemIdxs).call(oppoDirectionArrTemIdxs, function (idx) {\n            return calcLineValues(tem.value[xory][idx]);\n          })).call(_context15, function (_ref6) {\n            var _ref7 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ref6, 2),\n              _1 = _ref7[0],\n              index = _ref7[1];\n            return index !== -1;\n          })).call(_context14, function (_ref8) {\n            var _ref9 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ref8, 1),\n              distance = _ref9[0].distance;\n            return distance;\n          });\n          // 等于就两根线\n          // 不能两根线\n          // 公共边可以相等\n          // 冲突边不可以\n          if (_index !== -1 && _distance < distance && distance > EQUAL_DISTANCE) {\n            dealIndex = -1;\n          }\n          if (dealIndex !== -1 && oppoDirectionDistances.length > 0 && distance > EQUAL_DISTANCE) {\n            if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_17___default()(oppoDirectionDistances).call(oppoDirectionDistances, function (dis) {\n              return dis <= distance;\n            })) {\n              dealIndex = -1;\n              if (Math.min.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(oppoDirectionDistances)) === distance) {\n                var _context16;\n                // 应该改为最小，而不是有一个与他相等，偶发\n                // 最先 // 左顶\n                if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context16 = [3, 4]).call(_context16, arrTem[i])) {\n                  dealIndex = index;\n                }\n              }\n            }\n          }\n        }\n        if (origin !== 0 && length !== 0 && dealIndex !== -1) {\n          !haveRefLine && (haveRefLine = true);\n          var snapConfig = tem.snapPosConfig[xory][arrTem[i]][index];\n          snapConfig && handleSelectedNodeSnap(selectedNode, snapConfig, isTransformAction);\n          // handleSelectedNodeSnap(selectedNode, snapPosConfig, isTransformAction)\n          // refLines[horv][arrTem[i]].visible = !!snapConfig // 不吸附但相等就显示\n          _refLines[horv][arrTem[i]].visible = true;\n          _refLines[horv][arrTem[i]].position = position; // tem.position[i]\n          _refLines[horv][arrTem[i]].origin = origin;\n          _refLines[horv][arrTem[i]].lineLength = length;\n        }\n      };\n      for (var i = 0; i < arrTem.length; i++) {\n        _loop();\n      }\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refLines', _refLines);\n      if (haveRefLine) {\n        setRefLines(function () {\n          return _refLines;\n        });\n      } else {\n        setRefLines(function () {\n          return initialReflines;\n        });\n      }\n      return refPostionInfo;\n    }\n  }, [enableRefline]);\n  var hideRefLines = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function () {\n    if (!enableRefline) return;\n    setRefLines(function () {\n      return initialReflines;\n    });\n  }, [enableRefline]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      setRefLines: setRefLines,\n      searchRefLines: searchRefLines,\n      hideRefLines: hideRefLines\n    };\n  }, [enableRefline]);\n  if (!enableRefline) return null;\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.log('refline', refLines);\n  // { x: 0, y: 0 } ||\n  var _getRedundancyXY = getRedundancyXY(),\n    redundancyX = _getRedundancyXY.x,\n    redundancyY = _getRedundancyXY.y;\n  var reduceXY = {\n    x: redundancyX,\n    y: redundancyY\n  };\n  // TODO: 辅助线的显隐\n  // 1. 多个图形之间的辅助线 没有比较 可以以公共边做考虑\n  // 2. 辅助线参数 refPostionInfo 传到外界，可能还会被篡改, 返回来再看下是否 没法返回\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement((react__WEBPACK_IMPORTED_MODULE_19___default().Fragment), null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context17 = refLines.vLine).call(_context17, function (line, idx) {\n    // 暂时都是原点坐标\n    var points = calculatePointByProp(line, 'x', reduceXY);\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, refLineProps, {\n      name: \"ref_line_y_\".concat(idx),\n      key: \"ref_line_y_\".concat(idx),\n      points: points,\n      visible: line.visible\n    }));\n  }), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context18 = refLines.hLine).call(_context18, function (line, idx) {\n    // 暂时都是原点坐标\n    var points = calculatePointByProp(line, 'y', reduceXY);\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({}, refLineProps, {\n      name: \"ref_line_x_\".concat(idx),\n      key: \"ref_line_x_\".concat(idx),\n      points: points,\n      visible: line.visible\n    }));\n  }));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (RefLine);\n\n//# sourceURL=webpack://print-designer/./src/components/common/refLine.tsx?");

/***/ }),

/***/ 44992:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   HISTORY: function() { return /* binding */ HISTORY; },\n/* harmony export */   History: function() { return /* binding */ History; },\n/* harmony export */   HistoryEditor: function() { return /* binding */ HistoryEditor; },\n/* harmony export */   MERGING: function() { return /* binding */ MERGING; },\n/* harmony export */   SAVING: function() { return /* binding */ SAVING; },\n/* harmony export */   withHistory: function() { return /* binding */ withHistory; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89472);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96416);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30856);\n/* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(is_plain_object__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _slate__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(29496);\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context2; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_3___default()(_context2 = Object.prototype.toString.call(o)).call(_context2, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_4___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\n\n\n\n\n\nvar History = {\n  /**\n   * Check if a value is a `History` object.\n   */\n  isHistory: function isHistory(value) {\n    return is_plain_object__WEBPACK_IMPORTED_MODULE_8___default()(value) && _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(value.redos) && _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_2___default()(value.undos) && (value.redos.length === 0 || _slate__WEBPACK_IMPORTED_MODULE_9__.Operation.isOperationList(value.redos[0])) && (value.undos.length === 0 || _slate__WEBPACK_IMPORTED_MODULE_9__.Operation.isOperationList(value.undos[0]));\n  }\n};\n\n/**\n * Weakmaps for attaching state to the editor.\n */\n\nvar HISTORY = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_5___default())();\nvar SAVING = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_5___default())();\nvar MERGING = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_5___default())();\nvar HistoryEditor = {\n  /**\n   * Check if a value is a `HistoryEditor` object.\n   */\n  isHistoryEditor: function isHistoryEditor(value) {\n    return History.isHistory(value.history) && _slate__WEBPACK_IMPORTED_MODULE_9__.Editor.isEditor(value);\n  },\n  /**\n   * Get the merge flag's current value.\n   */\n  isMerging: function isMerging(editor) {\n    return MERGING.get(editor);\n  },\n  /**\n   * Get the saving flag's current value.\n   */\n  isSaving: function isSaving(editor) {\n    return SAVING.get(editor);\n  },\n  /**\n   * Redo to the previous saved state.\n   */\n  redo: function redo(editor) {\n    editor.redo();\n  },\n  /**\n   * Undo to the previous saved state.\n   */\n  undo: function undo(editor) {\n    editor.undo();\n  },\n  /**\n   * Apply a series of changes inside a synchronous `fn`, without merging any of\n   * the new operations into previous save point in the history.\n   */\n  withoutMerging: function withoutMerging(editor, fn) {\n    var prev = HistoryEditor.isMerging(editor);\n    MERGING.set(editor, false);\n    fn();\n    MERGING.set(editor, prev);\n  },\n  /**\n   * Apply a series of changes inside a synchronous `fn`, without saving any of\n   * their operations into the history.\n   */\n  withoutSaving: function withoutSaving(editor, fn) {\n    var prev = HistoryEditor.isSaving(editor);\n    SAVING.set(editor, false);\n    fn();\n    SAVING.set(editor, prev);\n  }\n};\n\n/**\n * The `withHistory` plugin keeps track of the operation history of a Slate\n * editor as operations are applied to it, using undo and redo stacks.\n *\n * If you are using TypeScript, you must extend Slate's CustomTypes to use\n * this plugin.\n *\n * See https://docs.slatejs.org/concepts/11-typescript to learn how.\n */\n\nvar withHistory = function withHistory(editor) {\n  var e = editor;\n  var apply = e.apply;\n  e.history = {\n    undos: [],\n    redos: []\n  };\n  e.redo = function () {\n    var history = e.history;\n    var redos = history.redos;\n    if (redos.length > 0) {\n      var batch = redos[redos.length - 1];\n      HistoryEditor.withoutSaving(e, function () {\n        _slate__WEBPACK_IMPORTED_MODULE_9__.Editor.withoutNormalizing(e, function () {\n          var _iterator = _createForOfIteratorHelper(batch),\n            _step;\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var op = _step.value;\n              e.apply(op);\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        });\n      });\n      history.redos.pop();\n      history.undos.push(batch);\n    }\n  };\n  e.undo = function () {\n    var history = e.history;\n    var undos = history.undos;\n    if (undos.length > 0) {\n      var batch = undos[undos.length - 1];\n      HistoryEditor.withoutSaving(e, function () {\n        _slate__WEBPACK_IMPORTED_MODULE_9__.Editor.withoutNormalizing(e, function () {\n          var _context;\n          var inverseOps = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_6___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(batch).call(batch, _slate__WEBPACK_IMPORTED_MODULE_9__.Operation.inverse)).call(_context);\n          var _iterator2 = _createForOfIteratorHelper(inverseOps),\n            _step2;\n          try {\n            for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n              var op = _step2.value;\n              e.apply(op);\n            }\n          } catch (err) {\n            _iterator2.e(err);\n          } finally {\n            _iterator2.f();\n          }\n        });\n      });\n      history.redos.push(batch);\n      history.undos.pop();\n    }\n  };\n  e.apply = function (op) {\n    var operations = e.operations,\n      history = e.history;\n    var undos = history.undos;\n    var lastBatch = undos[undos.length - 1];\n    var lastOp = lastBatch && lastBatch[lastBatch.length - 1];\n    var overwrite = shouldOverwrite(op, lastOp);\n    var save = HistoryEditor.isSaving(e);\n    var merge = HistoryEditor.isMerging(e);\n    if (save == null) {\n      save = shouldSave(op);\n    }\n    if (save) {\n      if (merge == null) {\n        if (lastBatch == null) {\n          merge = false;\n        } else if (operations.length !== 0) {\n          merge = true;\n        } else {\n          merge = shouldMerge(op, lastOp) || overwrite;\n        }\n      }\n      if (lastBatch && merge) {\n        if (overwrite) {\n          lastBatch.pop();\n        }\n        lastBatch.push(op);\n      } else {\n        var batch = [op];\n        undos.push(batch);\n      }\n      while (undos.length > 100) {\n        undos.shift();\n      }\n      if (shouldClear(op)) {\n        history.redos = [];\n      }\n    }\n    apply(op);\n  };\n  return e;\n};\n/**\n * Check whether to merge an operation into the previous operation.\n */\n\nvar shouldMerge = function shouldMerge(op, prev) {\n  if (op.type === 'set_selection') {\n    return true;\n  }\n  if (prev && op.type === 'insert_text' && prev.type === 'insert_text' && op.offset === prev.offset + prev.text.length && _slate__WEBPACK_IMPORTED_MODULE_9__.Path.equals(op.path, prev.path)) {\n    return true;\n  }\n  if (prev && op.type === 'remove_text' && prev.type === 'remove_text' && op.offset + op.text.length === prev.offset && _slate__WEBPACK_IMPORTED_MODULE_9__.Path.equals(op.path, prev.path)) {\n    return true;\n  }\n  return false;\n};\n/**\n * Check whether an operation needs to be saved to the history.\n */\n\nvar shouldSave = function shouldSave(op, prev) {\n  if (op.type === 'set_selection' && (op.properties == null || op.newProperties == null)) {\n    return false;\n  }\n  return true;\n};\n/**\n * Check whether an operation should overwrite the previous one.\n */\n\nvar shouldOverwrite = function shouldOverwrite(op, prev) {\n  if (prev && op.type === 'set_selection' && prev.type === 'set_selection') {\n    return true;\n  }\n  return false;\n};\n/**\n * Check whether an operation should clear the redos stack.\n */\n\nvar shouldClear = function shouldClear(op) {\n  if (op.type === 'set_selection') {\n    return false;\n  }\n  return true;\n};\n\n// # sourceMappingURL=index.es.js.map\n\n//# sourceURL=webpack://print-designer/./src/components/common/slate-history.ts?");

/***/ }),

/***/ 62620:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   DefaultElement: function() { return /* binding */ DefaultElement; },\n/* harmony export */   DefaultLeaf: function() { return /* binding */ DefaultLeaf; },\n/* harmony export */   DefaultPlaceholder: function() { return /* binding */ DefaultPlaceholder; },\n/* harmony export */   Editable: function() { return /* binding */ Editable; },\n/* harmony export */   ReactEditor: function() { return /* binding */ ReactEditor; },\n/* harmony export */   Slate: function() { return /* binding */ Slate; },\n/* harmony export */   useEditor: function() { return /* binding */ useEditor; },\n/* harmony export */   useFocused: function() { return /* binding */ useFocused; },\n/* harmony export */   useReadOnly: function() { return /* binding */ useReadOnly; },\n/* harmony export */   useSelected: function() { return /* binding */ useSelected; },\n/* harmony export */   useSlate: function() { return /* binding */ useSlate; },\n/* harmony export */   useSlateSelection: function() { return /* binding */ useSlateSelection; },\n/* harmony export */   useSlateSelector: function() { return /* binding */ useSlateSelector; },\n/* harmony export */   useSlateStatic: function() { return /* binding */ useSlateStatic; },\n/* harmony export */   useSlateWithV: function() { return /* binding */ useSlateWithV; },\n/* harmony export */   withReact: function() { return /* binding */ withReact; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54895);\n/* harmony import */ var _babel_runtime_corejs3_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50024);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27688);\n/* harmony import */ var _babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(3460);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(97552);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(57548);\n/* harmony import */ var _babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(89472);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49464);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(73400);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(11872);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(30479);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(96416);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_from_entries__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(20484);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_from_entries__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_from_entries__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(37152);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(52360);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_42___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_42__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_43___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_43__);\n/* harmony import */ var direction__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(6220);\n/* harmony import */ var direction__WEBPACK_IMPORTED_MODULE_44___default = /*#__PURE__*/__webpack_require__.n(direction__WEBPACK_IMPORTED_MODULE_44__);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(94608);\n/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_45__);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(5800);\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_46___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_46__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_47___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_47__);\n/* harmony import */ var scroll_into_view_if_needed__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(48216);\n/* harmony import */ var slate__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(5148);\n/* harmony import */ var is_hotkey__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(90352);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(71536);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_49___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_49__);\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _callSuper(t, o, e) { return o = (0,_babel_runtime_corejs3_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(o), (0,_babel_runtime_corejs3_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(t, _isNativeReflectConstruct() ? _babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_2___default()(o, e || [], (0,_babel_runtime_corejs3_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(t).constructor) : o.apply(t, e)); }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_2___default()(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_12___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_0___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_1___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context33; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_context33 = Object.prototype.toString.call(o)).call(_context33, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15___default()(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_17___default()(excluded).call(excluded, key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default())) {\n    var sourceSymbolKeys = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default()(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_17___default()(excluded).call(excluded, key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\n\n/**\n * A React context for sharing the editor object.\n */\n\nvar EditorContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)(null);\n/**\n * Get the current editor object from the React context.\n */\n\nvar useSlateStatic = function useSlateStatic() {\n  var editor = (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(EditorContext);\n  if (!editor) {\n    throw new Error(\"The `useSlateStatic` hook must be used inside the <Slate> component's context.\");\n  }\n  return editor;\n};\nvar REACT_MAJOR_VERSION = _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_19___default()(react__WEBPACK_IMPORTED_MODULE_47___default().version.split('.')[0], 10);\nvar IS_IOS = typeof navigator !== 'undefined' && typeof window !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\nvar IS_APPLE = typeof navigator !== 'undefined' && /Mac OS X/.test(navigator.userAgent);\nvar IS_ANDROID = typeof navigator !== 'undefined' && /Android/.test(navigator.userAgent);\nvar IS_FIREFOX = typeof navigator !== 'undefined' && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);\nvar IS_WEBKIT = typeof navigator !== 'undefined' && /AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent); // \"modern\" Edge was released at 79.x\n\nvar IS_EDGE_LEGACY = typeof navigator !== 'undefined' && /Edge?\\/(?:[0-6][0-9]|[0-7][0-8])(?:\\.)/i.test(navigator.userAgent);\nvar IS_CHROME = typeof navigator !== 'undefined' && /Chrome/i.test(navigator.userAgent); // Native `beforeInput` events don't work well with react on Chrome 75\n// and older, Chrome 76+ can use `beforeInput` though.\n\nvar IS_CHROME_LEGACY = typeof navigator !== 'undefined' && /Chrome?\\/(?:[0-7][0-5]|[0-6][0-9])(?:\\.)/i.test(navigator.userAgent);\nvar IS_ANDROID_CHROME_LEGACY = IS_ANDROID && typeof navigator !== 'undefined' && /Chrome?\\/(?:[0-5]?\\d)(?:\\.)/i.test(navigator.userAgent); // Firefox did not support `beforeInput` until `v87`.\n\nvar IS_FIREFOX_LEGACY = typeof navigator !== 'undefined' && /^(?!.*Seamonkey)(?=.*Firefox\\/(?:[0-7][0-9]|[0-8][0-6])(?:\\.)).*/i.test(navigator.userAgent); // UC mobile browser\n\nvar IS_UC_MOBILE = typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent); // Wechat browser (not including mac wechat)\n\nvar IS_WECHATBROWSER = typeof navigator !== 'undefined' && /.*Wechat/.test(navigator.userAgent) && !/.*MacWechat/.test(navigator.userAgent); // avoid lookbehind (buggy in safari < 16.4)\n// Check if DOM is available as React does internally.\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\n\nvar CAN_USE_DOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); // COMPAT: Firefox/Edge Legacy don't support the `beforeinput` event\n// Chrome Legacy doesn't support `beforeinput` correctly\n\nvar HAS_BEFORE_INPUT_SUPPORT = (!IS_CHROME_LEGACY || !IS_ANDROID_CHROME_LEGACY) && !IS_EDGE_LEGACY &&\n// globalThis is undefined in older browsers\ntypeof (_babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20___default()) !== 'undefined' && (_babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20___default().InputEvent) &&\n// @ts-ignore The `getTargetRanges` property isn't recognized.\ntypeof (_babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20___default().InputEvent).prototype.getTargetRanges === 'function';\n\n/**\n * Two weak maps that allow us rebuild a path given a node. They are populated\n * at render time such that after a render occurs we can always backtrack.\n */\nvar NODE_TO_INDEX = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar NODE_TO_PARENT = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n/**\n * Weak maps that allow us to go between Slate nodes and DOM nodes. These\n * are used to resolve DOM event-related logic into Slate actions.\n */\n\nvar EDITOR_TO_WINDOW = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_ELEMENT = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_PLACEHOLDER_ELEMENT = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar ELEMENT_TO_NODE = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar NODE_TO_ELEMENT = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar NODE_TO_KEY = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_KEY_TO_ELEMENT = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n/**\n * Weak maps for storing editor-related state.\n */\n\nvar IS_READ_ONLY = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar IS_FOCUSED = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar IS_COMPOSING = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_USER_SELECTION = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n/**\n * Weak map for associating the context `onChange` context with the plugin.\n */\n\nvar EDITOR_TO_ON_CHANGE = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n/**\n * Weak maps for saving pending state on composition stage.\n */\n\nvar EDITOR_TO_SCHEDULE_FLUSH = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_PENDING_INSERTION_MARKS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_USER_MARKS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n/**\n * Android input handling specific weak-maps\n */\n\nvar EDITOR_TO_PENDING_DIFFS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_PENDING_ACTION = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_PENDING_SELECTION = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\nvar EDITOR_TO_FORCE_RENDER = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n/**\n * Symbols.\n */\n\nvar PLACEHOLDER_SYMBOL = _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_12___default()('placeholder');\nvar MARK_PLACEHOLDER_SYMBOL = _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_12___default()('mark-placeholder');\n\n/**\n * Types.\n */\nvar DOMText = (_babel_runtime_corejs3_core_js_global_this__WEBPACK_IMPORTED_MODULE_20___default().Text);\n/**\n * Returns the host window of a DOM node\n */\n\nvar getDefaultView = function getDefaultView(value) {\n  return value && value.ownerDocument && value.ownerDocument.defaultView || null;\n};\n/**\n * Check if a DOM node is a comment node.\n */\n\nvar isDOMComment = function isDOMComment(value) {\n  return isDOMNode(value) && value.nodeType === 8;\n};\n/**\n * Check if a DOM node is an element node.\n */\n\nvar isDOMElement = function isDOMElement(value) {\n  return isDOMNode(value) && value.nodeType === 1;\n};\n/**\n * Check if a value is a DOM node.\n */\n\nvar isDOMNode = function isDOMNode(value) {\n  var window = getDefaultView(value);\n  return !!window && value instanceof window.Node;\n};\n/**\n * Check if a value is a DOM selection.\n */\n\nvar isDOMSelection = function isDOMSelection(value) {\n  var window = value && value.anchorNode && getDefaultView(value.anchorNode);\n  return !!window && value instanceof window.Selection;\n};\n/**\n * Check if a DOM node is an element node.\n */\n\nvar isDOMText = function isDOMText(value) {\n  return isDOMNode(value) && value.nodeType === 3;\n};\n/**\n * Checks whether a paste event is a plaintext-only event.\n */\n\nvar isPlainTextOnlyPaste = function isPlainTextOnlyPaste(event) {\n  return event.clipboardData && event.clipboardData.getData('text/plain') !== '' && event.clipboardData.types.length === 1;\n};\n/**\n * Normalize a DOM point so that it always refers to a text node.\n */\n\nvar normalizeDOMPoint = function normalizeDOMPoint(domPoint) {\n  var _domPoint = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(domPoint, 2),\n    node = _domPoint[0],\n    offset = _domPoint[1]; // If it's an element node, its offset refers to the index of its children\n  // including comment nodes, so try to find the right text child node.\n\n  if (isDOMElement(node) && node.childNodes.length) {\n    var isLast = offset === node.childNodes.length;\n    var index = isLast ? offset - 1 : offset;\n    // If the editable child found is in front of input offset, we instead seek to its end\n    var _getEditableChildAndI = getEditableChildAndIndex(node, index, isLast ? 'backward' : 'forward');\n    var _getEditableChildAndI2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_getEditableChildAndI, 2);\n    node = _getEditableChildAndI2[0];\n    index = _getEditableChildAndI2[1];\n    isLast = index < offset; // If the node has children, traverse until we have a leaf node. Leaf nodes\n    // can be either text nodes, or other void DOM nodes.\n\n    while (isDOMElement(node) && node.childNodes.length) {\n      var i = isLast ? node.childNodes.length - 1 : 0;\n      node = getEditableChild(node, i, isLast ? 'backward' : 'forward');\n    } // Determine the new offset inside the text node.\n\n    offset = isLast && node.textContent != null ? node.textContent.length : 0;\n  } // Return the node and offset.\n\n  return [node, offset];\n};\n/**\n * Determines whether the active element is nested within a shadowRoot\n */\n\nvar hasShadowRoot = function hasShadowRoot(node) {\n  var parent = node && node.parentNode;\n  while (parent) {\n    if (parent.toString() === '[object ShadowRoot]') {\n      return true;\n    }\n    parent = parent.parentNode;\n  }\n  return false;\n};\n/**\n * Get the nearest editable child and index at `index` in a `parent`, preferring\n * `direction`.\n */\n\nvar getEditableChildAndIndex = function getEditableChildAndIndex(parent, index, direction) {\n  var childNodes = parent.childNodes;\n  var child = childNodes[index];\n  var i = index;\n  var triedForward = false;\n  var triedBackward = false; // While the child is a comment node, or an element node with no children,\n  // keep iterating to find a sibling non-void, non-comment node.\n\n  while (isDOMComment(child) || isDOMElement(child) && child.childNodes.length === 0 || isDOMElement(child) && child.getAttribute('contenteditable') === 'false') {\n    if (triedForward && triedBackward) {\n      break;\n    }\n    if (i >= childNodes.length) {\n      triedForward = true;\n      i = index - 1;\n      direction = 'backward';\n      continue;\n    }\n    if (i < 0) {\n      triedBackward = true;\n      i = index + 1;\n      direction = 'forward';\n      continue;\n    }\n    child = childNodes[i];\n    index = i;\n    i += direction === 'forward' ? 1 : -1;\n  }\n  return [child, index];\n};\n/**\n * Get the nearest editable child at `index` in a `parent`, preferring\n * `direction`.\n */\n\nvar getEditableChild = function getEditableChild(parent, index, direction) {\n  var _getEditableChildAndI3 = getEditableChildAndIndex(parent, index, direction),\n    _getEditableChildAndI4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_getEditableChildAndI3, 1),\n    child = _getEditableChildAndI4[0];\n  return child;\n};\n/**\n * Get a plaintext representation of the content of a node, accounting for block\n * elements which get a newline appended.\n *\n * The domNode must be attached to the DOM.\n */\n\nvar getPlainText = function getPlainText(domNode) {\n  var text = '';\n  if (isDOMText(domNode) && domNode.nodeValue) {\n    return domNode.nodeValue;\n  }\n  if (isDOMElement(domNode)) {\n    for (var _i = 0, _Array$from = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(domNode.childNodes); _i < _Array$from.length; _i++) {\n      var childNode = _Array$from[_i];\n      text += getPlainText(childNode);\n    }\n    var display = getComputedStyle(domNode).getPropertyValue('display');\n    if (display === 'block' || display === 'list' || domNode.tagName === 'BR') {\n      text += '\\n';\n    }\n  }\n  return text;\n};\n/**\n * Get x-slate-fragment attribute from data-slate-fragment\n */\n\nvar catchSlateFragment = /data-slate-fragment=\"(.+?)\"/m;\nvar getSlateFragmentAttribute = function getSlateFragmentAttribute(dataTransfer) {\n  var htmlData = dataTransfer.getData('text/html');\n  var _ref3 = htmlData.match(catchSlateFragment) || [],\n    _ref4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_ref3, 2),\n    fragment = _ref4[1];\n  return fragment;\n};\n/**\n * Check whether a mutation originates from a editable element inside the editor.\n */\n\nvar isTrackedMutation = function isTrackedMutation(editor, mutation, batch) {\n  var target = mutation.target;\n  if (isDOMElement(target) && target.matches('[contentEditable=\"false\"]')) {\n    return false;\n  }\n  var _ReactEditor$getWindo = ReactEditor.getWindow(editor),\n    document = _ReactEditor$getWindo.document;\n  if (document.contains(target)) {\n    return ReactEditor.hasDOMNode(editor, target, {\n      editable: true\n    });\n  }\n  var parentMutation = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_22___default()(batch).call(batch, function (_ref) {\n    var addedNodes = _ref.addedNodes,\n      removedNodes = _ref.removedNodes;\n    var _iterator = _createForOfIteratorHelper(addedNodes),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var node = _step.value;\n        if (node === target || node.contains(target)) {\n          return true;\n        }\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    var _iterator2 = _createForOfIteratorHelper(removedNodes),\n      _step2;\n    try {\n      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n        var _node = _step2.value;\n        if (_node === target || _node.contains(target)) {\n          return true;\n        }\n      }\n    } catch (err) {\n      _iterator2.e(err);\n    } finally {\n      _iterator2.f();\n    }\n  });\n  if (!parentMutation || parentMutation === mutation) {\n    return false;\n  } // Target add/remove is tracked. Track the mutation if we track the parent mutation.\n\n  return isTrackedMutation(editor, parentMutation, batch);\n};\n\n/**\n * An auto-incrementing identifier for keys.\n */\nvar n = 0;\n/**\n * A class that keeps track of a key string. We use a full class here because we\n * want to be able to use them as keys in `WeakMap` objects.\n */\nvar Key = /*#__PURE__*/(0,_babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function Key() {\n  (0,_babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(this, Key);\n  this.id = \"\".concat(n++);\n});\nvar ReactEditor = {\n  androidPendingDiffs: function androidPendingDiffs(editor) {\n    return EDITOR_TO_PENDING_DIFFS.get(editor);\n  },\n  androidScheduleFlush: function androidScheduleFlush(editor) {\n    var _EDITOR_TO_SCHEDULE_F;\n    (_EDITOR_TO_SCHEDULE_F = EDITOR_TO_SCHEDULE_FLUSH.get(editor)) === null || _EDITOR_TO_SCHEDULE_F === void 0 ? void 0 : _EDITOR_TO_SCHEDULE_F();\n  },\n  blur: function blur(editor) {\n    var el = ReactEditor.toDOMNode(editor, editor);\n    var root = ReactEditor.findDocumentOrShadowRoot(editor);\n    IS_FOCUSED.set(editor, false);\n    if (root.activeElement === el) {\n      el.blur();\n    }\n  },\n  deselect: function deselect(editor) {\n    var selection = editor.selection;\n    var root = ReactEditor.findDocumentOrShadowRoot(editor);\n    var domSelection = root.getSelection();\n    if (domSelection && domSelection.rangeCount > 0) {\n      domSelection.removeAllRanges();\n    }\n    if (selection) {\n      slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.deselect(editor);\n    }\n  },\n  findDocumentOrShadowRoot: function findDocumentOrShadowRoot(editor) {\n    var el = ReactEditor.toDOMNode(editor, editor);\n    var root = el.getRootNode();\n    if ((root instanceof Document || root instanceof ShadowRoot) && root.getSelection != null) {\n      return root;\n    }\n    return el.ownerDocument;\n  },\n  findEventRange: function findEventRange(editor, event) {\n    if ('nativeEvent' in event) {\n      event = event.nativeEvent;\n    }\n    var _event2 = event,\n      x = _event2.clientX,\n      y = _event2.clientY,\n      target = _event2.target;\n    if (x == null || y == null) {\n      throw new Error(\"Cannot resolve a Slate range from a DOM event: \".concat(event));\n    }\n    var node = ReactEditor.toSlateNode(editor, event.target);\n    var path = ReactEditor.findPath(editor, node); // If the drop target is inside a void node, move it into either the\n    // next or previous node, depending on which side the `x` and `y`\n    // coordinates are closest to.\n\n    if (slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(node) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, node)) {\n      var rect = target.getBoundingClientRect();\n      var isPrev = editor.isInline(node) ? x - rect.left < rect.left + rect.width - x : y - rect.top < rect.top + rect.height - y;\n      var edge = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.point(editor, path, {\n        edge: isPrev ? 'start' : 'end'\n      });\n      var point = isPrev ? slate__WEBPACK_IMPORTED_MODULE_50__.Editor.before(editor, edge) : slate__WEBPACK_IMPORTED_MODULE_50__.Editor.after(editor, edge);\n      if (point) {\n        var _range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, point);\n        return _range;\n      }\n    } // Else resolve a range from the caret position where the drop occured.\n\n    var domRange;\n    var _ReactEditor$getWindo2 = ReactEditor.getWindow(editor),\n      document = _ReactEditor$getWindo2.document; // COMPAT: In Firefox, `caretRangeFromPoint` doesn't exist. (2016/07/25)\n\n    if (document.caretRangeFromPoint) {\n      domRange = document.caretRangeFromPoint(x, y);\n    } else {\n      var position = document.caretPositionFromPoint(x, y);\n      if (position) {\n        domRange = document.createRange();\n        domRange.setStart(position.offsetNode, position.offset);\n        domRange.setEnd(position.offsetNode, position.offset);\n      }\n    }\n    if (!domRange) {\n      throw new Error(\"Cannot resolve a Slate range from a DOM event: \".concat(event));\n    } // Resolve a Slate range from the DOM range.\n\n    var range = ReactEditor.toSlateRange(editor, domRange, {\n      exactMatch: false,\n      suppressThrow: false\n    });\n    return range;\n  },\n  findKey: function findKey(editor, node) {\n    var key = NODE_TO_KEY.get(node);\n    if (!key) {\n      key = new Key();\n      NODE_TO_KEY.set(node, key);\n    }\n    return key;\n  },\n  findPath: function findPath(editor, node) {\n    var path = [];\n    var child = node;\n    while (true) {\n      var parent = NODE_TO_PARENT.get(child);\n      if (parent == null) {\n        if (slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isEditor(child)) {\n          return path;\n        } else {\n          break;\n        }\n      }\n      var i = NODE_TO_INDEX.get(child);\n      if (i == null) {\n        break;\n      }\n      path.unshift(i);\n      child = parent;\n    }\n    throw new Error(\"Unable to find the path for Slate node: \".concat(slate__WEBPACK_IMPORTED_MODULE_50__.Scrubber.stringify(node)));\n  },\n  focus: function focus(editor) {\n    var el = ReactEditor.toDOMNode(editor, editor);\n    var root = ReactEditor.findDocumentOrShadowRoot(editor);\n    IS_FOCUSED.set(editor, true);\n    if (root.activeElement !== el) {\n      el.focus({\n        preventScroll: true\n      });\n    }\n  },\n  getWindow: function getWindow(editor) {\n    var window = EDITOR_TO_WINDOW.get(editor);\n    if (!window) {\n      throw new Error('Unable to find a host window element for this editor');\n    }\n    return window;\n  },\n  hasDOMNode: function hasDOMNode(editor, target) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    var _options$editable = options.editable,\n      editable = _options$editable === void 0 ? false : _options$editable;\n    var editorEl = ReactEditor.toDOMNode(editor, editor);\n    var targetEl; // COMPAT: In Firefox, reading `target.nodeType` will throw an error if\n    // target is originating from an internal \"restricted\" element (e.g. a\n    // stepper arrow on a number input). (2018/05/04)\n    // https://github.com/ianstormtaylor/slate/issues/1819\n\n    try {\n      targetEl = isDOMElement(target) ? target : target.parentElement;\n    } catch (err) {\n      var _context;\n      if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_23___default()(_context = err.message).call(_context, 'Permission denied to access property \"nodeType\"')) {\n        throw err;\n      }\n    }\n    if (!targetEl) {\n      return false;\n    }\n    return targetEl.closest(\"[data-slate-editor]\") === editorEl && (!editable || targetEl.isContentEditable ? true : typeof targetEl.isContentEditable === 'boolean' &&\n    // isContentEditable exists only on HTMLElement, and on other nodes it will be undefined\n    // this is the core logic that lets you know you got the right editor.selection instead of null when editor is contenteditable=\"false\"(readOnly)\n    targetEl.closest('[contenteditable=\"false\"]') === editorEl || !!targetEl.getAttribute('data-slate-zero-width'));\n  },\n  hasEditableTarget: function hasEditableTarget(editor, target) {\n    return isDOMNode(target) && ReactEditor.hasDOMNode(editor, target, {\n      editable: true\n    });\n  },\n  hasRange: function hasRange(editor, range) {\n    var anchor = range.anchor,\n      focus = range.focus;\n    return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasPath(editor, anchor.path) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasPath(editor, focus.path);\n  },\n  hasSelectableTarget: function hasSelectableTarget(editor, target) {\n    return ReactEditor.hasEditableTarget(editor, target) || ReactEditor.isTargetInsideNonReadonlyVoid(editor, target);\n  },\n  hasTarget: function hasTarget(editor, target) {\n    return isDOMNode(target) && ReactEditor.hasDOMNode(editor, target);\n  },\n  insertData: function insertData(editor, data) {\n    editor.insertData(data);\n  },\n  insertFragmentData: function insertFragmentData(editor, data) {\n    return editor.insertFragmentData(data);\n  },\n  insertTextData: function insertTextData(editor, data) {\n    return editor.insertTextData(data);\n  },\n  isComposing: function isComposing(editor) {\n    return !!IS_COMPOSING.get(editor);\n  },\n  isFocused: function isFocused(editor) {\n    return !!IS_FOCUSED.get(editor);\n  },\n  isReadOnly: function isReadOnly(editor) {\n    return !!IS_READ_ONLY.get(editor);\n  },\n  isTargetInsideNonReadonlyVoid: function isTargetInsideNonReadonlyVoid(editor, target) {\n    if (IS_READ_ONLY.get(editor)) return false;\n    var slateNode = ReactEditor.hasTarget(editor, target) && ReactEditor.toSlateNode(editor, target);\n    return slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(slateNode) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, slateNode);\n  },\n  setFragmentData: function setFragmentData(editor, data, originEvent) {\n    return editor.setFragmentData(data, originEvent);\n  },\n  toDOMNode: function toDOMNode(editor, node) {\n    var KEY_TO_ELEMENT = EDITOR_TO_KEY_TO_ELEMENT.get(editor);\n    var domNode = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));\n    if (!domNode) {\n      throw new Error(\"Cannot resolve a DOM node from Slate node: \".concat(slate__WEBPACK_IMPORTED_MODULE_50__.Scrubber.stringify(node)));\n    }\n    return domNode;\n  },\n  toDOMPoint: function toDOMPoint(editor, point) {\n    var _Editor$node = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.node(editor, point.path),\n      _Editor$node2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Editor$node, 1),\n      node = _Editor$node2[0];\n    var el = ReactEditor.toDOMNode(editor, node);\n    var domPoint; // If we're inside a void node, force the offset to 0, otherwise the zero\n    // width spacing character will result in an incorrect offset of 1\n\n    if (slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(editor, {\n      at: point\n    })) {\n      point = {\n        path: point.path,\n        offset: 0\n      };\n    } // For each leaf, we need to isolate its content, which means filtering\n    // to its direct text and zero-width spans. (We have to filter out any\n    // other siblings that may have been rendered alongside them.)\n\n    var selector = \"[data-slate-string], [data-slate-zero-width]\";\n    var texts = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(el.querySelectorAll(selector));\n    var start = 0;\n    for (var i = 0; i < texts.length; i++) {\n      var text = texts[i];\n      var domNode = text.childNodes[0];\n      if (domNode == null || domNode.textContent == null) {\n        continue;\n      }\n      var length = domNode.textContent.length;\n      var attr = text.getAttribute('data-slate-length');\n      var trueLength = attr == null ? length : _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_19___default()(attr, 10);\n      var end = start + trueLength; // Prefer putting the selection inside the mark placeholder to ensure\n      // composed text is displayed with the correct marks.\n\n      var nextText = texts[i + 1];\n      if (point.offset === end && nextText !== null && nextText !== void 0 && nextText.hasAttribute('data-slate-mark-placeholder')) {\n        var _nextText$textContent;\n        var domText = nextText.childNodes[0];\n        domPoint = [\n        // COMPAT: If we don't explicity set the dom point to be on the actual\n        // dom text element, chrome will put the selection behind the actual dom\n        // text element, causing domRange.getBoundingClientRect() calls on a collapsed\n        // selection to return incorrect zero values (https://bugs.chromium.org/p/chromium/issues/detail?id=435438)\n        // which will cause issues when scrolling to it.\n        domText instanceof DOMText ? domText : nextText, (_nextText$textContent = nextText.textContent) !== null && _nextText$textContent !== void 0 && _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(_nextText$textContent).call(_nextText$textContent, \"\\uFEFF\") ? 1 : 0];\n        break;\n      }\n      if (point.offset <= end) {\n        var offset = Math.min(length, Math.max(0, point.offset - start));\n        domPoint = [domNode, offset];\n        break;\n      }\n      start = end;\n    }\n    if (!domPoint) {\n      throw new Error(\"Cannot resolve a DOM point from Slate point: \".concat(slate__WEBPACK_IMPORTED_MODULE_50__.Scrubber.stringify(point)));\n    }\n    return domPoint;\n  },\n  toDOMRange: function toDOMRange(editor, range) {\n    var anchor = range.anchor,\n      focus = range.focus;\n    var isBackward = slate__WEBPACK_IMPORTED_MODULE_50__.Range.isBackward(range);\n    var domAnchor = ReactEditor.toDOMPoint(editor, anchor);\n    var domFocus = slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(range) ? domAnchor : ReactEditor.toDOMPoint(editor, focus);\n    var window = ReactEditor.getWindow(editor);\n    var domRange = window.document.createRange();\n    var _ref5 = isBackward ? domFocus : domAnchor,\n      _ref6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_ref5, 2),\n      startNode = _ref6[0],\n      startOffset = _ref6[1];\n    var _ref7 = isBackward ? domAnchor : domFocus,\n      _ref8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_ref7, 2),\n      endNode = _ref8[0],\n      endOffset = _ref8[1]; // A slate Point at zero-width Leaf always has an offset of 0 but a native DOM selection at\n    // zero-width node has an offset of 1 so we have to check if we are in a zero-width node and\n    // adjust the offset accordingly.\n\n    var startEl = isDOMElement(startNode) ? startNode : startNode.parentElement;\n    var isStartAtZeroWidth = !!startEl.getAttribute('data-slate-zero-width');\n    var endEl = isDOMElement(endNode) ? endNode : endNode.parentElement;\n    var isEndAtZeroWidth = !!endEl.getAttribute('data-slate-zero-width');\n    domRange.setStart(startNode, isStartAtZeroWidth ? 1 : startOffset);\n    domRange.setEnd(endNode, isEndAtZeroWidth ? 1 : endOffset);\n    return domRange;\n  },\n  toSlateNode: function toSlateNode(editor, domNode) {\n    var domEl = isDOMElement(domNode) ? domNode : domNode.parentElement;\n    if (domEl && !domEl.hasAttribute('data-slate-node')) {\n      domEl = domEl.closest(\"[data-slate-node]\");\n    }\n    var node = domEl ? ELEMENT_TO_NODE.get(domEl) : null;\n    if (!node) {\n      throw new Error(\"Cannot resolve a Slate node from DOM node: \".concat(domEl));\n    }\n    return node;\n  },\n  toSlatePoint: function toSlatePoint(editor, domPoint, options) {\n    var exactMatch = options.exactMatch,\n      suppressThrow = options.suppressThrow;\n    var _ref9 = exactMatch ? domPoint : normalizeDOMPoint(domPoint),\n      _ref10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_ref9, 2),\n      nearestNode = _ref10[0],\n      nearestOffset = _ref10[1];\n    var parentNode = nearestNode.parentNode;\n    var textNode = null;\n    var offset = 0;\n    if (parentNode) {\n      var _domNode$textContent, _domNode$textContent2;\n      var editorEl = ReactEditor.toDOMNode(editor, editor);\n      var potentialVoidNode = parentNode.closest('[data-slate-void=\"true\"]'); // Need to ensure that the closest void node is actually a void node\n      // within this editor, and not a void node within some parent editor. This can happen\n      // if this editor is within a void node of another editor (\"nested editors\", like in\n      // the \"Editable Voids\" example on the docs site).\n\n      var voidNode = potentialVoidNode && editorEl.contains(potentialVoidNode) ? potentialVoidNode : null;\n      var leafNode = parentNode.closest('[data-slate-leaf]');\n      var domNode = null; // Calculate how far into the text node the `nearestNode` is, so that we\n      // can determine what the offset relative to the text node is.\n\n      if (leafNode) {\n        textNode = leafNode.closest('[data-slate-node=\"text\"]');\n        if (textNode) {\n          var _context2;\n          var window = ReactEditor.getWindow(editor);\n          var range = window.document.createRange();\n          range.setStart(textNode, 0);\n          range.setEnd(nearestNode, nearestOffset);\n          var contents = range.cloneContents();\n          var removals = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25___default()(_context2 = []).call(_context2, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(Array.prototype).call(contents.querySelectorAll('[data-slate-zero-width]'))), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(Array.prototype).call(contents.querySelectorAll('[contenteditable=false]'))));\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(removals).call(removals, function (el) {\n            // COMPAT: While composing at the start of a text node, some keyboards put\n            // the text content inside the zero width space.\n            if (IS_ANDROID && !exactMatch && el.hasAttribute('data-slate-zero-width') && el.textContent.length > 0 && el.textContext !== \"\\uFEFF\") {\n              var _context3;\n              if (_babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(_context3 = el.textContent).call(_context3, \"\\uFEFF\")) {\n                var _context4;\n                el.textContent = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_context4 = el.textContent).call(_context4, 1);\n              }\n              return;\n            }\n            el.parentNode.removeChild(el);\n          }); // COMPAT: Edge has a bug where Range.prototype.toString() will\n          // convert \\n into \\r\\n. The bug causes a loop when slate-react\n          // attempts to reposition its cursor to match the native position. Use\n          // textContent.length instead.\n          // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10291116/\n\n          offset = contents.textContent.length;\n          domNode = textNode;\n        }\n      } else if (voidNode) {\n        // For void nodes, the element with the offset key will be a cousin, not an\n        // ancestor, so find it by going down from the nearest void parent and taking the\n        // first one that isn't inside a nested editor.\n        var leafNodes = voidNode.querySelectorAll('[data-slate-leaf]');\n        for (var index = 0; index < leafNodes.length; index++) {\n          var current = leafNodes[index];\n          if (ReactEditor.hasDOMNode(editor, current)) {\n            leafNode = current;\n            break;\n          }\n        } // COMPAT: In read-only editors the leaf is not rendered.\n\n        if (!leafNode) {\n          offset = 1;\n        } else {\n          var _context5;\n          textNode = leafNode.closest('[data-slate-node=\"text\"]');\n          domNode = leafNode;\n          offset = domNode.textContent.length;\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context5 = domNode.querySelectorAll('[data-slate-zero-width]')).call(_context5, function (el) {\n            offset -= el.textContent.length;\n          });\n        }\n      }\n      if (domNode && offset === domNode.textContent.length &&\n      // COMPAT: Android IMEs might remove the zero width space while composing,\n      // and we don't add it for line-breaks.\n      IS_ANDROID && domNode.getAttribute('data-slate-zero-width') === 'z' && (_domNode$textContent = domNode.textContent) !== null && _domNode$textContent !== void 0 && _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(_domNode$textContent).call(_domNode$textContent, \"\\uFEFF\") && (parentNode.hasAttribute('data-slate-zero-width') || IS_FIREFOX && (_domNode$textContent2 = domNode.textContent) !== null && _domNode$textContent2 !== void 0 && _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default()(_domNode$textContent2).call(_domNode$textContent2, '\\n\\n'))) {\n        offset--;\n      }\n    }\n    if (IS_ANDROID && !textNode && !exactMatch) {\n      var node = parentNode.hasAttribute('data-slate-node') ? parentNode : parentNode.closest('[data-slate-node]');\n      if (node && ReactEditor.hasDOMNode(editor, node, {\n        editable: true\n      })) {\n        var _slateNode = ReactEditor.toSlateNode(editor, node);\n        var _Editor$start = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.start(editor, ReactEditor.findPath(editor, _slateNode)),\n          _path = _Editor$start.path,\n          _offset = _Editor$start.offset;\n        if (!node.querySelector('[data-slate-leaf]')) {\n          _offset = nearestOffset;\n        }\n        return {\n          path: _path,\n          offset: _offset\n        };\n      }\n    }\n    if (!textNode) {\n      if (suppressThrow) {\n        return null;\n      }\n      throw new Error(\"Cannot resolve a Slate point from DOM point: \".concat(domPoint));\n    } // COMPAT: If someone is clicking from one Slate editor into another,\n    // the select event fires twice, once for the old editor's `element`\n    // first, and then afterwards for the correct `element`. (2017/03/03)\n\n    var slateNode = ReactEditor.toSlateNode(editor, textNode);\n    var path = ReactEditor.findPath(editor, slateNode);\n    return {\n      path: path,\n      offset: offset\n    };\n  },\n  toSlateRange: function toSlateRange(editor, domRange, options) {\n    var exactMatch = options.exactMatch,\n      suppressThrow = options.suppressThrow;\n    var el = isDOMSelection(domRange) ? domRange.anchorNode : domRange.startContainer;\n    var anchorNode;\n    var anchorOffset;\n    var focusNode;\n    var focusOffset;\n    var isCollapsed;\n    if (el) {\n      if (isDOMSelection(domRange)) {\n        // COMPAT: In firefox the normal seletion way does not work\n        // (https://github.com/ianstormtaylor/slate/pull/5486#issue-1820720223)\n        if (IS_FIREFOX && domRange.rangeCount > 1) {\n          focusNode = domRange.focusNode; // Focus node works fine\n\n          var firstRange = domRange.getRangeAt(0);\n          var lastRange = domRange.getRangeAt(domRange.rangeCount - 1); // Here we are in the contenteditable mode of a table in firefox\n\n          if (focusNode instanceof HTMLTableRowElement && firstRange.startContainer instanceof HTMLTableRowElement && lastRange.startContainer instanceof HTMLTableRowElement) {\n            // HTMLElement, becouse Element is a slate element\n            var getLastChildren = function getLastChildren(element) {\n              if (element.childElementCount > 0) {\n                return getLastChildren(element.children[0]);\n              } else {\n                return element;\n              }\n            };\n            var firstNodeRow = firstRange.startContainer;\n            var lastNodeRow = lastRange.startContainer; // This should never fail as \"The HTMLElement interface represents any HTML element.\"\n\n            var firstNode = getLastChildren(firstNodeRow.children[firstRange.startOffset]);\n            var lastNode = getLastChildren(lastNodeRow.children[lastRange.startOffset]); // Zero, as we allways take the right one as the anchor point\n\n            focusOffset = 0;\n            if (lastNode.childNodes.length > 0) {\n              anchorNode = lastNode.childNodes[0];\n            } else {\n              anchorNode = lastNode;\n            }\n            if (firstNode.childNodes.length > 0) {\n              focusNode = firstNode.childNodes[0];\n            } else {\n              focusNode = firstNode;\n            }\n            if (lastNode instanceof HTMLElement) {\n              anchorOffset = lastNode.innerHTML.length;\n            } else {\n              // Fallback option\n              anchorOffset = 0;\n            }\n          } else {\n            // This is the read only mode of a firefox table\n            // Right to left\n            if (firstRange.startContainer === focusNode) {\n              anchorNode = lastRange.endContainer;\n              anchorOffset = lastRange.endOffset;\n              focusOffset = firstRange.startOffset;\n            } else {\n              // Left to right\n              anchorNode = firstRange.startContainer;\n              anchorOffset = firstRange.endOffset;\n              focusOffset = lastRange.startOffset;\n            }\n          }\n        } else {\n          anchorNode = domRange.anchorNode;\n          anchorOffset = domRange.anchorOffset;\n          focusNode = domRange.focusNode;\n          focusOffset = domRange.focusOffset;\n        } // COMPAT: There's a bug in chrome that always returns `true` for\n        // `isCollapsed` for a Selection that comes from a ShadowRoot.\n        // (2020/08/08)\n        // https://bugs.chromium.org/p/chromium/issues/detail?id=447523\n        // IsCollapsed might not work in firefox, but this will\n\n        if (IS_CHROME && hasShadowRoot(anchorNode) || IS_FIREFOX) {\n          isCollapsed = domRange.anchorNode === domRange.focusNode && domRange.anchorOffset === domRange.focusOffset;\n        } else {\n          isCollapsed = domRange.isCollapsed;\n        }\n      } else {\n        anchorNode = domRange.startContainer;\n        anchorOffset = domRange.startOffset;\n        focusNode = domRange.endContainer;\n        focusOffset = domRange.endOffset;\n        isCollapsed = domRange.collapsed;\n      }\n    }\n    if (anchorNode == null || focusNode == null || anchorOffset == null || focusOffset == null) {\n      throw new Error(\"Cannot resolve a Slate range from DOM range: \".concat(domRange));\n    } // COMPAT: Triple-clicking a word in chrome will sometimes place the focus\n    // inside a `contenteditable=\"false\"` DOM node following the word, which\n    // will cause `toSlatePoint` to throw an error. (2023/03/07)\n\n    if ('getAttribute' in focusNode && focusNode.getAttribute('contenteditable') === 'false' && focusNode.getAttribute('data-slate-void') !== 'true') {\n      var _anchorNode$textConte;\n      focusNode = anchorNode;\n      focusOffset = ((_anchorNode$textConte = anchorNode.textContent) === null || _anchorNode$textConte === void 0 ? void 0 : _anchorNode$textConte.length) || 0;\n    }\n    var anchor = ReactEditor.toSlatePoint(editor, [anchorNode, anchorOffset], {\n      exactMatch: exactMatch,\n      suppressThrow: suppressThrow\n    });\n    if (!anchor) {\n      return null;\n    }\n    var focus = isCollapsed ? anchor : ReactEditor.toSlatePoint(editor, [focusNode, focusOffset], {\n      exactMatch: exactMatch,\n      suppressThrow: suppressThrow\n    });\n    if (!focus) {\n      return null;\n    }\n    var range = {\n      anchor: anchor,\n      focus: focus\n    }; // if the selection is a hanging range that ends in a void\n    // and the DOM focus is an Element\n    // (meaning that the selection ends before the element)\n    // unhang the range to avoid mistakenly including the void\n\n    if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(range) && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isForward(range) && isDOMElement(focusNode) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(editor, {\n      at: range.focus,\n      mode: 'highest'\n    })) {\n      range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.unhangRange(editor, range, {\n        voids: true\n      });\n    }\n    return range;\n  }\n};\n\n/**\n * Check whether a text diff was applied in a way we can perform the pending action on /\n * recover the pending selection.\n */\n\nfunction verifyDiffState(editor, textDiff) {\n  var _context7;\n  var path = textDiff.path,\n    diff = textDiff.diff;\n  if (!slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasPath(editor, path)) {\n    return false;\n  }\n  var node = slate__WEBPACK_IMPORTED_MODULE_50__.Node.get(editor, path);\n  if (!slate__WEBPACK_IMPORTED_MODULE_50__.Text.isText(node)) {\n    return false;\n  }\n  if (diff.start !== node.text.length || diff.text.length === 0) {\n    var _context6;\n    return _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_context6 = node.text).call(_context6, diff.start, diff.start + diff.text.length) === diff.text;\n  }\n  var nextPath = slate__WEBPACK_IMPORTED_MODULE_50__.Path.next(path);\n  if (!slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasPath(editor, nextPath)) {\n    return false;\n  }\n  var nextNode = slate__WEBPACK_IMPORTED_MODULE_50__.Node.get(editor, nextPath);\n  return slate__WEBPACK_IMPORTED_MODULE_50__.Text.isText(nextNode) && _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(_context7 = nextNode.text).call(_context7, diff.text);\n}\nfunction applyStringDiff(text) {\n  for (var _len = arguments.length, diffs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    diffs[_key - 1] = arguments[_key];\n  }\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_28___default()(diffs).call(diffs, function (text, diff) {\n    return _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(text).call(text, 0, diff.start) + diff.text + _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(text).call(text, diff.end);\n  }, text);\n}\nfunction longestCommonPrefixLength(str, another) {\n  var length = Math.min(str.length, another.length);\n  for (var i = 0; i < length; i++) {\n    if (str.charAt(i) !== another.charAt(i)) {\n      return i;\n    }\n  }\n  return length;\n}\nfunction longestCommonSuffixLength(str, another, max) {\n  var length = Math.min(str.length, another.length, max);\n  for (var i = 0; i < length; i++) {\n    if (str.charAt(str.length - i - 1) !== another.charAt(another.length - i - 1)) {\n      return i;\n    }\n  }\n  return length;\n}\n/**\n * Remove redundant changes from the diff so that it spans the minimal possible range\n */\n\nfunction normalizeStringDiff(targetText, diff) {\n  var start = diff.start,\n    end = diff.end,\n    text = diff.text;\n  var removedText = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(targetText).call(targetText, start, end);\n  var prefixLength = longestCommonPrefixLength(removedText, text);\n  var max = Math.min(removedText.length - prefixLength, text.length - prefixLength);\n  var suffixLength = longestCommonSuffixLength(removedText, text, max);\n  var normalized = {\n    start: start + prefixLength,\n    end: end - suffixLength,\n    text: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(text).call(text, prefixLength, text.length - suffixLength)\n  };\n  if (normalized.start === normalized.end && normalized.text.length === 0) {\n    return null;\n  }\n  return normalized;\n}\n/**\n * Return a string diff that is equivalent to applying b after a spanning the range of\n * both changes\n */\n\nfunction mergeStringDiffs(targetText, a, b) {\n  var start = Math.min(a.start, b.start);\n  var overlap = Math.max(0, Math.min(a.start + a.text.length, b.end) - b.start);\n  var applied = applyStringDiff(targetText, a, b);\n  var sliceEnd = Math.max(b.start + b.text.length, a.start + a.text.length + (a.start + a.text.length > b.start ? b.text.length : 0) - overlap);\n  var text = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(applied).call(applied, start, sliceEnd);\n  var end = Math.max(a.end, b.end - a.text.length + (a.end - a.start));\n  return normalizeStringDiff(targetText, {\n    start: start,\n    end: end,\n    text: text\n  });\n}\n/**\n * Get the slate range the text diff spans.\n */\n\nfunction targetRange(textDiff) {\n  var path = textDiff.path,\n    diff = textDiff.diff;\n  return {\n    anchor: {\n      path: path,\n      offset: diff.start\n    },\n    focus: {\n      path: path,\n      offset: diff.end\n    }\n  };\n}\n/**\n * Normalize a 'pending point' a.k.a a point based on the dom state before applying\n * the pending diffs. Since the pending diffs might have been inserted with different\n * marks we have to 'walk' the offset from the starting position to ensure we still\n * have a valid point inside the document\n */\n\nfunction normalizePoint(editor, point) {\n  var path = point.path,\n    offset = point.offset;\n  if (!slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasPath(editor, path)) {\n    return null;\n  }\n  var leaf = slate__WEBPACK_IMPORTED_MODULE_50__.Node.get(editor, path);\n  if (!slate__WEBPACK_IMPORTED_MODULE_50__.Text.isText(leaf)) {\n    return null;\n  }\n  var parentBlock = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.above(editor, {\n    match: function match(n) {\n      return slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(n) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isBlock(editor, n);\n    },\n    at: path\n  });\n  if (!parentBlock) {\n    return null;\n  }\n  while (offset > leaf.text.length) {\n    var entry = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.next(editor, {\n      at: path,\n      match: slate__WEBPACK_IMPORTED_MODULE_50__.Text.isText\n    });\n    if (!entry || !slate__WEBPACK_IMPORTED_MODULE_50__.Path.isDescendant(entry[1], parentBlock[1])) {\n      return null;\n    }\n    offset -= leaf.text.length;\n    leaf = entry[0];\n    path = entry[1];\n  }\n  return {\n    path: path,\n    offset: offset\n  };\n}\n/**\n * Normalize a 'pending selection' to ensure it's valid in the current document state.\n */\n\nfunction normalizeRange(editor, range) {\n  var anchor = normalizePoint(editor, range.anchor);\n  if (!anchor) {\n    return null;\n  }\n  if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(range)) {\n    return {\n      anchor: anchor,\n      focus: anchor\n    };\n  }\n  var focus = normalizePoint(editor, range.focus);\n  if (!focus) {\n    return null;\n  }\n  return {\n    anchor: anchor,\n    focus: focus\n  };\n}\nfunction transformPendingPoint(editor, point, op) {\n  var pendingDiffs = EDITOR_TO_PENDING_DIFFS.get(editor);\n  var textDiff = pendingDiffs === null || pendingDiffs === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_22___default()(pendingDiffs).call(pendingDiffs, function (_ref) {\n    var path = _ref.path;\n    return slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(path, point.path);\n  });\n  if (!textDiff || point.offset <= textDiff.diff.start) {\n    return slate__WEBPACK_IMPORTED_MODULE_50__.Point.transform(point, op, {\n      affinity: 'backward'\n    });\n  }\n  var diff = textDiff.diff; // Point references location inside the diff => transform the point based on the location\n  // the diff will be applied to and add the offset inside the diff.\n\n  if (point.offset <= diff.start + diff.text.length) {\n    var _anchor = {\n      path: point.path,\n      offset: diff.start\n    };\n    var _transformed = slate__WEBPACK_IMPORTED_MODULE_50__.Point.transform(_anchor, op, {\n      affinity: 'backward'\n    });\n    if (!_transformed) {\n      return null;\n    }\n    return {\n      path: _transformed.path,\n      offset: _transformed.offset + point.offset - diff.start\n    };\n  } // Point references location after the diff\n\n  var anchor = {\n    path: point.path,\n    offset: point.offset - diff.text.length + diff.end - diff.start\n  };\n  var transformed = slate__WEBPACK_IMPORTED_MODULE_50__.Point.transform(anchor, op, {\n    affinity: 'backward'\n  });\n  if (!transformed) {\n    return null;\n  }\n  if (op.type === 'split_node' && slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(op.path, point.path) && anchor.offset < op.position && diff.start < op.position) {\n    return transformed;\n  }\n  return {\n    path: transformed.path,\n    offset: transformed.offset + diff.text.length - diff.end + diff.start\n  };\n}\nfunction transformPendingRange(editor, range, op) {\n  var anchor = transformPendingPoint(editor, range.anchor, op);\n  if (!anchor) {\n    return null;\n  }\n  if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(range)) {\n    return {\n      anchor: anchor,\n      focus: anchor\n    };\n  }\n  var focus = transformPendingPoint(editor, range.focus, op);\n  if (!focus) {\n    return null;\n  }\n  return {\n    anchor: anchor,\n    focus: focus\n  };\n}\nfunction transformTextDiff(textDiff, op) {\n  var path = textDiff.path,\n    diff = textDiff.diff,\n    id = textDiff.id;\n  switch (op.type) {\n    case 'insert_text':\n      {\n        if (!slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(op.path, path) || op.offset >= diff.end) {\n          return textDiff;\n        }\n        if (op.offset <= diff.start) {\n          return {\n            diff: {\n              start: op.text.length + diff.start,\n              end: op.text.length + diff.end,\n              text: diff.text\n            },\n            id: id,\n            path: path\n          };\n        }\n        return {\n          diff: {\n            start: diff.start,\n            end: diff.end + op.text.length,\n            text: diff.text\n          },\n          id: id,\n          path: path\n        };\n      }\n    case 'remove_text':\n      {\n        if (!slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(op.path, path) || op.offset >= diff.end) {\n          return textDiff;\n        }\n        if (op.offset + op.text.length <= diff.start) {\n          return {\n            diff: {\n              start: diff.start - op.text.length,\n              end: diff.end - op.text.length,\n              text: diff.text\n            },\n            id: id,\n            path: path\n          };\n        }\n        return {\n          diff: {\n            start: diff.start,\n            end: diff.end - op.text.length,\n            text: diff.text\n          },\n          id: id,\n          path: path\n        };\n      }\n    case 'split_node':\n      {\n        if (!slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(op.path, path) || op.position >= diff.end) {\n          return {\n            diff: diff,\n            id: id,\n            path: slate__WEBPACK_IMPORTED_MODULE_50__.Path.transform(path, op, {\n              affinity: 'backward'\n            })\n          };\n        }\n        if (op.position > diff.start) {\n          return {\n            diff: {\n              start: diff.start,\n              end: Math.min(op.position, diff.end),\n              text: diff.text\n            },\n            id: id,\n            path: path\n          };\n        }\n        return {\n          diff: {\n            start: diff.start - op.position,\n            end: diff.end - op.position,\n            text: diff.text\n          },\n          id: id,\n          path: slate__WEBPACK_IMPORTED_MODULE_50__.Path.transform(path, op, {\n            affinity: 'forward'\n          })\n        };\n      }\n    case 'merge_node':\n      {\n        if (!slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(op.path, path)) {\n          return {\n            diff: diff,\n            id: id,\n            path: slate__WEBPACK_IMPORTED_MODULE_50__.Path.transform(path, op)\n          };\n        }\n        return {\n          diff: {\n            start: diff.start + op.position,\n            end: diff.end + op.position,\n            text: diff.text\n          },\n          id: id,\n          path: slate__WEBPACK_IMPORTED_MODULE_50__.Path.transform(path, op)\n        };\n      }\n  }\n  var newPath = slate__WEBPACK_IMPORTED_MODULE_50__.Path.transform(path, op);\n  if (!newPath) {\n    return null;\n  }\n  return {\n    diff: diff,\n    path: newPath,\n    id: id\n  };\n}\nfunction ownKeys$3(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$3(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context8;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context8 = ownKeys$3(Object(source), true)).call(_context8, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default()(source));\n    } else {\n      var _context9;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context9 = ownKeys$3(Object(source))).call(_context9, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\n// When using keyboard English association function, conpositionEnd triggered too fast, resulting in after `insertText` still maintain association state.\n\nvar RESOLVE_DELAY = 25; // Time with no user interaction before the current user action is considered as done.\n\nvar FLUSH_DELAY = 200; // Replace with `const debug = console.log` to debug\n\nvar debug = function debug() {}; // Type guard to check if a value is a DataTransfer\n\nvar isDataTransfer = function isDataTransfer(value) {\n  return (value === null || value === void 0 ? void 0 : value.constructor.name) === 'DataTransfer';\n};\nfunction createAndroidInputManager(_ref) {\n  var editor = _ref.editor,\n    scheduleOnDOMSelectionChange = _ref.scheduleOnDOMSelectionChange,\n    onDOMSelectionChange = _ref.onDOMSelectionChange;\n  var flushing = false;\n  var compositionEndTimeoutId = null;\n  var flushTimeoutId = null;\n  var actionTimeoutId = null;\n  var idCounter = 0;\n  var insertPositionHint = false;\n  var applyPendingSelection = function applyPendingSelection() {\n    var pendingSelection = EDITOR_TO_PENDING_SELECTION.get(editor);\n    EDITOR_TO_PENDING_SELECTION.delete(editor);\n    if (pendingSelection) {\n      var selection = editor.selection;\n      var normalized = normalizeRange(editor, pendingSelection);\n      if (normalized && (!selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(normalized, selection))) {\n        slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, normalized);\n      }\n    }\n  };\n  var performAction = function performAction() {\n    var action = EDITOR_TO_PENDING_ACTION.get(editor);\n    EDITOR_TO_PENDING_ACTION.delete(editor);\n    if (!action) {\n      return;\n    }\n    if (action.at) {\n      var target = slate__WEBPACK_IMPORTED_MODULE_50__.Point.isPoint(action.at) ? normalizePoint(editor, action.at) : normalizeRange(editor, action.at);\n      if (!target) {\n        return;\n      }\n      var _targetRange = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, target);\n      if (!editor.selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(editor.selection, _targetRange)) {\n        slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, target);\n      }\n    }\n    action.run();\n  };\n  var flush = function flush() {\n    if (flushTimeoutId) {\n      clearTimeout(flushTimeoutId);\n      flushTimeoutId = null;\n    }\n    if (actionTimeoutId) {\n      clearTimeout(actionTimeoutId);\n      actionTimeoutId = null;\n    }\n    if (!hasPendingDiffs() && !hasPendingAction()) {\n      applyPendingSelection();\n      return;\n    }\n    if (!flushing) {\n      flushing = true;\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(function () {\n        return flushing = false;\n      });\n    }\n    if (hasPendingAction()) {\n      flushing = 'action';\n    }\n    var selectionRef = editor.selection && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.rangeRef(editor, editor.selection, {\n      affinity: 'forward'\n    });\n    EDITOR_TO_USER_MARKS.set(editor, editor.marks);\n    debug('flush', EDITOR_TO_PENDING_ACTION.get(editor), EDITOR_TO_PENDING_DIFFS.get(editor));\n    var scheduleSelectionChange = hasPendingDiffs();\n    var diff;\n    while (diff = (_EDITOR_TO_PENDING_DI = EDITOR_TO_PENDING_DIFFS.get(editor)) === null || _EDITOR_TO_PENDING_DI === void 0 ? void 0 : _EDITOR_TO_PENDING_DI[0]) {\n      var _EDITOR_TO_PENDING_DI, _EDITOR_TO_PENDING_DI2;\n      var pendingMarks = EDITOR_TO_PENDING_INSERTION_MARKS.get(editor);\n      if (pendingMarks !== undefined) {\n        EDITOR_TO_PENDING_INSERTION_MARKS.delete(editor);\n        editor.marks = pendingMarks;\n      }\n      if (pendingMarks && insertPositionHint === false) {\n        insertPositionHint = null;\n      }\n      var range = targetRange(diff);\n      if (!editor.selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(editor.selection, range)) {\n        slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, range);\n      }\n      if (diff.diff.text) {\n        slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, diff.diff.text);\n      } else {\n        slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor);\n      } // Remove diff only after we have applied it to account for it when transforming\n      // pending ranges.\n\n      EDITOR_TO_PENDING_DIFFS.set(editor, (_EDITOR_TO_PENDING_DI2 = EDITOR_TO_PENDING_DIFFS.get(editor)) === null || _EDITOR_TO_PENDING_DI2 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(_EDITOR_TO_PENDING_DI2).call(_EDITOR_TO_PENDING_DI2, function (_ref2) {\n        var id = _ref2.id;\n        return id !== diff.id;\n      }));\n      if (!verifyDiffState(editor, diff)) {\n        scheduleSelectionChange = false;\n        EDITOR_TO_PENDING_ACTION.delete(editor);\n        EDITOR_TO_USER_MARKS.delete(editor);\n        flushing = 'action'; // Ensure we don't restore the pending user (dom) selection\n        // since the document and dom state do not match.\n\n        EDITOR_TO_PENDING_SELECTION.delete(editor);\n        scheduleOnDOMSelectionChange.cancel();\n        onDOMSelectionChange.cancel();\n        selectionRef === null || selectionRef === void 0 ? void 0 : selectionRef.unref();\n      }\n    }\n    var selection = selectionRef === null || selectionRef === void 0 ? void 0 : selectionRef.unref();\n    if (selection && !EDITOR_TO_PENDING_SELECTION.get(editor) && (!editor.selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(selection, editor.selection))) {\n      slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, selection);\n    }\n    if (hasPendingAction()) {\n      performAction();\n      return;\n    } // COMPAT: The selectionChange event is fired after the action is performed,\n    // so we have to manually schedule it to ensure we don't 'throw away' the selection\n    // while rendering if we have pending changes.\n\n    if (scheduleSelectionChange) {\n      scheduleOnDOMSelectionChange();\n    }\n    scheduleOnDOMSelectionChange.flush();\n    onDOMSelectionChange.flush();\n    applyPendingSelection();\n    var userMarks = EDITOR_TO_USER_MARKS.get(editor);\n    EDITOR_TO_USER_MARKS.delete(editor);\n    if (userMarks !== undefined) {\n      editor.marks = userMarks;\n      editor.onChange();\n    }\n  };\n  var handleCompositionEnd = function handleCompositionEnd(_event) {\n    if (compositionEndTimeoutId) {\n      clearTimeout(compositionEndTimeoutId);\n    }\n    compositionEndTimeoutId = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(function () {\n      IS_COMPOSING.set(editor, false);\n      flush();\n    }, RESOLVE_DELAY);\n  };\n  var handleCompositionStart = function handleCompositionStart(_event) {\n    IS_COMPOSING.set(editor, true);\n    if (compositionEndTimeoutId) {\n      clearTimeout(compositionEndTimeoutId);\n      compositionEndTimeoutId = null;\n    }\n  };\n  var updatePlaceholderVisibility = function updatePlaceholderVisibility() {\n    var forceHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n    var placeholderElement = EDITOR_TO_PLACEHOLDER_ELEMENT.get(editor);\n    if (!placeholderElement) {\n      return;\n    }\n    if (hasPendingDiffs() || forceHide) {\n      placeholderElement.style.display = 'none';\n      return;\n    }\n    placeholderElement.style.removeProperty('display');\n  };\n  var storeDiff = function storeDiff(path, diff) {\n    var _EDITOR_TO_PENDING_DI3;\n    var pendingDiffs = (_EDITOR_TO_PENDING_DI3 = EDITOR_TO_PENDING_DIFFS.get(editor)) !== null && _EDITOR_TO_PENDING_DI3 !== void 0 ? _EDITOR_TO_PENDING_DI3 : [];\n    EDITOR_TO_PENDING_DIFFS.set(editor, pendingDiffs);\n    var target = slate__WEBPACK_IMPORTED_MODULE_50__.Node.leaf(editor, path);\n    var idx = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_34___default()(pendingDiffs).call(pendingDiffs, function (change) {\n      return slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(change.path, path);\n    });\n    if (idx < 0) {\n      var normalized = normalizeStringDiff(target.text, diff);\n      if (normalized) {\n        pendingDiffs.push({\n          path: path,\n          diff: diff,\n          id: idCounter++\n        });\n      }\n      updatePlaceholderVisibility();\n      return;\n    }\n    var merged = mergeStringDiffs(target.text, pendingDiffs[idx].diff, diff);\n    if (!merged) {\n      _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_35___default()(pendingDiffs).call(pendingDiffs, idx, 1);\n      updatePlaceholderVisibility();\n      return;\n    }\n    pendingDiffs[idx] = _objectSpread$3(_objectSpread$3({}, pendingDiffs[idx]), {}, {\n      diff: merged\n    });\n  };\n  var scheduleAction = function scheduleAction(run) {\n    var _ref11 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      at = _ref11.at;\n    insertPositionHint = false;\n    EDITOR_TO_PENDING_SELECTION.delete(editor);\n    scheduleOnDOMSelectionChange.cancel();\n    onDOMSelectionChange.cancel();\n    if (hasPendingAction()) {\n      flush();\n    }\n    EDITOR_TO_PENDING_ACTION.set(editor, {\n      at: at,\n      run: run\n    }); // COMPAT: When deleting before a non-contenteditable element chrome only fires a beforeinput,\n    // (no input) and doesn't perform any dom mutations. Without a flush timeout we would never flush\n    // in this case and thus never actually perform the action.\n\n    actionTimeoutId = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(flush);\n  };\n  var handleDOMBeforeInput = function handleDOMBeforeInput(event) {\n    var _targetRange2;\n    if (flushTimeoutId) {\n      clearTimeout(flushTimeoutId);\n      flushTimeoutId = null;\n    }\n    var type = event.inputType;\n    var targetRange = null;\n    var data = event.dataTransfer || event.data || undefined;\n    if (insertPositionHint !== false && type !== 'insertText' && type !== 'insertCompositionText') {\n      insertPositionHint = false;\n    }\n    var _event$getTargetRange = event.getTargetRanges(),\n      _event$getTargetRange2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_event$getTargetRange, 1),\n      nativeTargetRange = _event$getTargetRange2[0];\n    if (nativeTargetRange) {\n      targetRange = ReactEditor.toSlateRange(editor, nativeTargetRange, {\n        exactMatch: false,\n        suppressThrow: true\n      });\n    } // COMPAT: SelectionChange event is fired after the action is performed, so we\n    // have to manually get the selection here to ensure it's up-to-date.\n\n    var window = ReactEditor.getWindow(editor);\n    var domSelection = window.getSelection();\n    if (!targetRange && domSelection) {\n      nativeTargetRange = domSelection;\n      targetRange = ReactEditor.toSlateRange(editor, domSelection, {\n        exactMatch: false,\n        suppressThrow: true\n      });\n    }\n    targetRange = (_targetRange2 = targetRange) !== null && _targetRange2 !== void 0 ? _targetRange2 : editor.selection;\n    if (!targetRange) {\n      return;\n    } // By default, the input manager tries to store text diffs so that we can\n    // defer flushing them at a later point in time. We don't want to flush\n    // for every input event as this can be expensive. However, there are some\n    // scenarios where we cannot safely store the text diff and must instead\n    // schedule an action to let Slate normalize the editor state.\n\n    var canStoreDiff = true;\n    if (_babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(type).call(type, 'delete')) {\n      var _context10;\n      if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(targetRange)) {\n        var _Range$edges = slate__WEBPACK_IMPORTED_MODULE_50__.Range.edges(targetRange),\n          _Range$edges2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Range$edges, 2),\n          _start = _Range$edges2[0],\n          _end = _Range$edges2[1];\n        var _leaf = slate__WEBPACK_IMPORTED_MODULE_50__.Node.leaf(editor, _start.path);\n        if (_leaf.text.length === _start.offset && _end.offset === 0) {\n          var next = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.next(editor, {\n            at: _start.path,\n            match: slate__WEBPACK_IMPORTED_MODULE_50__.Text.isText\n          });\n          if (next && slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(next[1], _end.path)) {\n            targetRange = {\n              anchor: _end,\n              focus: _end\n            };\n          }\n        }\n      }\n      var direction = _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default()(type).call(type, 'Backward') ? 'backward' : 'forward';\n      var _Range$edges3 = slate__WEBPACK_IMPORTED_MODULE_50__.Range.edges(targetRange),\n        _Range$edges4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Range$edges3, 2),\n        start = _Range$edges4[0],\n        end = _Range$edges4[1];\n      var _Editor$leaf = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.leaf(editor, start.path),\n        _Editor$leaf2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Editor$leaf, 2),\n        leaf = _Editor$leaf2[0],\n        path = _Editor$leaf2[1];\n      var diff = {\n        text: '',\n        start: start.offset,\n        end: end.offset\n      };\n      var pendingDiffs = EDITOR_TO_PENDING_DIFFS.get(editor);\n      var relevantPendingDiffs = pendingDiffs === null || pendingDiffs === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_22___default()(pendingDiffs).call(pendingDiffs, function (change) {\n        return slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(change.path, path);\n      });\n      var diffs = relevantPendingDiffs ? [relevantPendingDiffs.diff, diff] : [diff];\n      var text = applyStringDiff.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25___default()(_context10 = [leaf.text]).call(_context10, diffs));\n      if (text.length === 0) {\n        // Text leaf will be removed, so we need to schedule an\n        // action to remove it so that Slate can normalize instead\n        // of storing as a diff\n        canStoreDiff = false;\n      }\n      if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(targetRange)) {\n        if (canStoreDiff && slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(targetRange.anchor.path, targetRange.focus.path)) {\n          var point = {\n            path: targetRange.anchor.path,\n            offset: start.offset\n          };\n          var range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, point, point);\n          handleUserSelect(range);\n          return storeDiff(targetRange.anchor.path, {\n            text: '',\n            end: end.offset,\n            start: start.offset\n          });\n        }\n        return scheduleAction(function () {\n          return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n            direction: direction\n          });\n        }, {\n          at: targetRange\n        });\n      }\n    }\n    switch (type) {\n      case 'deleteByComposition':\n      case 'deleteByCut':\n      case 'deleteByDrag':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor);\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteContent':\n      case 'deleteContentForward':\n        {\n          var _targetRange3 = targetRange,\n            anchor = _targetRange3.anchor;\n          if (canStoreDiff && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(targetRange)) {\n            var targetNode = slate__WEBPACK_IMPORTED_MODULE_50__.Node.leaf(editor, anchor.path);\n            if (anchor.offset < targetNode.text.length) {\n              return storeDiff(anchor.path, {\n                text: '',\n                start: anchor.offset,\n                end: anchor.offset + 1\n              });\n            }\n          }\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor);\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteContentBackward':\n        {\n          var _nativeTargetRange;\n          var _targetRange4 = targetRange,\n            _anchor = _targetRange4.anchor; // If we have a mismatch between the native and slate selection being collapsed\n          // we are most likely deleting a zero-width placeholder and thus should perform it\n          // as an action to ensure correct behavior (mostly happens with mark placeholders)\n\n          var nativeCollapsed = isDOMSelection(nativeTargetRange) ? nativeTargetRange.isCollapsed : !!((_nativeTargetRange = nativeTargetRange) !== null && _nativeTargetRange !== void 0 && _nativeTargetRange.collapsed);\n          if (canStoreDiff && nativeCollapsed && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(targetRange) && _anchor.offset > 0) {\n            return storeDiff(_anchor.path, {\n              text: '',\n              start: _anchor.offset - 1,\n              end: _anchor.offset\n            });\n          }\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor);\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteEntireSoftLine':\n        {\n          return scheduleAction(function () {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'line'\n            });\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'line'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteHardLineBackward':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'block'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteSoftLineBackward':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'line'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteHardLineForward':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'block'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteSoftLineForward':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'line'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteWordBackward':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'word'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'deleteWordForward':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'word'\n            });\n          }, {\n            at: targetRange\n          });\n        }\n      case 'insertLineBreak':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertSoftBreak(editor);\n          }, {\n            at: targetRange\n          });\n        }\n      case 'insertParagraph':\n        {\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertBreak(editor);\n          }, {\n            at: targetRange\n          });\n        }\n      case 'insertCompositionText':\n      case 'deleteCompositionText':\n      case 'insertFromComposition':\n      case 'insertFromDrop':\n      case 'insertFromPaste':\n      case 'insertFromYank':\n      case 'insertReplacementText':\n      case 'insertText':\n        {\n          if (isDataTransfer(data)) {\n            return scheduleAction(function () {\n              return ReactEditor.insertData(editor, data);\n            }, {\n              at: targetRange\n            });\n          }\n          var _text = data !== null && data !== void 0 ? data : ''; // COMPAT: If we are writing inside a placeholder, the ime inserts the text inside\n          // the placeholder itself and thus includes the zero-width space inside edit events.\n\n          if (EDITOR_TO_PENDING_INSERTION_MARKS.get(editor)) {\n            _text = _text.replace(\"\\uFEFF\", '');\n          } // Pastes from the Android clipboard will generate `insertText` events.\n          // If the copied text contains any newlines, Android will append an\n          // extra newline to the end of the copied text.\n\n          if (type === 'insertText' && /.*\\n.*\\n$/.test(_text)) {\n            _text = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_text).call(_text, 0, -1);\n          } // If the text includes a newline, split it at newlines and paste each component\n          // string, with soft breaks in between each.\n\n          if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_23___default()(_text).call(_text, '\\n')) {\n            return scheduleAction(function () {\n              var parts = _text.split('\\n');\n              _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(parts).call(parts, function (line, i) {\n                if (line) {\n                  slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, line);\n                }\n                if (i !== parts.length - 1) {\n                  slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertSoftBreak(editor);\n                }\n              });\n            }, {\n              at: targetRange\n            });\n          }\n          if (slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(targetRange.anchor.path, targetRange.focus.path)) {\n            var _Range$edges5 = slate__WEBPACK_IMPORTED_MODULE_50__.Range.edges(targetRange),\n              _Range$edges6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Range$edges5, 2),\n              _start2 = _Range$edges6[0],\n              _end2 = _Range$edges6[1];\n            var _diff = {\n              start: _start2.offset,\n              end: _end2.offset,\n              text: _text\n            }; // COMPAT: Swiftkey has a weird bug where the target range of the 2nd word\n            // inserted after a mark placeholder is inserted with an anchor offset off by 1.\n            // So writing 'some text' will result in 'some ttext'. Luckily all 'normal' insert\n            // text events are fired with the correct target ranges, only the final 'insertComposition'\n            // isn't, so we can adjust the target range start offset if we are confident this is the\n            // swiftkey insert causing the issue.\n\n            if (_text && insertPositionHint && type === 'insertCompositionText') {\n              var hintPosition = insertPositionHint.start + insertPositionHint.text.search(/\\S|$/);\n              var diffPosition = _diff.start + _diff.text.search(/\\S|$/);\n              if (diffPosition === hintPosition + 1 && _diff.end === insertPositionHint.start + insertPositionHint.text.length) {\n                _diff.start -= 1;\n                insertPositionHint = null;\n                scheduleFlush();\n              } else {\n                insertPositionHint = false;\n              }\n            } else if (type === 'insertText') {\n              if (insertPositionHint === null) {\n                insertPositionHint = _diff;\n              } else if (insertPositionHint && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(targetRange) && insertPositionHint.end + insertPositionHint.text.length === _start2.offset) {\n                insertPositionHint = _objectSpread$3(_objectSpread$3({}, insertPositionHint), {}, {\n                  text: insertPositionHint.text + _text\n                });\n              } else {\n                insertPositionHint = false;\n              }\n            } else {\n              insertPositionHint = false;\n            }\n            if (canStoreDiff) {\n              storeDiff(_start2.path, _diff);\n              return;\n            }\n          }\n          return scheduleAction(function () {\n            return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, _text);\n          }, {\n            at: targetRange\n          });\n        }\n    }\n  };\n  var hasPendingAction = function hasPendingAction() {\n    return !!EDITOR_TO_PENDING_ACTION.get(editor);\n  };\n  var hasPendingDiffs = function hasPendingDiffs() {\n    var _EDITOR_TO_PENDING_DI4;\n    return !!((_EDITOR_TO_PENDING_DI4 = EDITOR_TO_PENDING_DIFFS.get(editor)) !== null && _EDITOR_TO_PENDING_DI4 !== void 0 && _EDITOR_TO_PENDING_DI4.length);\n  };\n  var hasPendingChanges = function hasPendingChanges() {\n    return hasPendingAction() || hasPendingDiffs();\n  };\n  var isFlushing = function isFlushing() {\n    return flushing;\n  };\n  var handleUserSelect = function handleUserSelect(range) {\n    var _context11, _context12;\n    EDITOR_TO_PENDING_SELECTION.set(editor, range);\n    if (flushTimeoutId) {\n      clearTimeout(flushTimeoutId);\n      flushTimeoutId = null;\n    }\n    var selection = editor.selection;\n    if (!range) {\n      return;\n    }\n    var pathChanged = !selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(selection.anchor.path, range.anchor.path);\n    var parentPathChanged = !selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_context11 = selection.anchor.path).call(_context11, 0, -1), _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_context12 = range.anchor.path).call(_context12, 0, -1));\n    if (pathChanged && insertPositionHint || parentPathChanged) {\n      insertPositionHint = false;\n    }\n    if (pathChanged || hasPendingDiffs()) {\n      flushTimeoutId = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(flush, FLUSH_DELAY);\n    }\n  };\n  var handleInput = function handleInput() {\n    if (hasPendingAction() || !hasPendingDiffs()) {\n      flush();\n    }\n  };\n  var handleKeyDown = function handleKeyDown(_) {\n    // COMPAT: Swiftkey closes the keyboard when typing inside a empty node\n    // directly next to a non-contenteditable element (= the placeholder).\n    // The only event fired soon enough for us to allow hiding the placeholder\n    // without swiftkey picking it up is the keydown event, so we have to hide it\n    // here. See https://github.com/ianstormtaylor/slate/pull/4988#issuecomment-1201050535\n    if (!hasPendingDiffs()) {\n      updatePlaceholderVisibility(true);\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(updatePlaceholderVisibility);\n    }\n  };\n  var scheduleFlush = function scheduleFlush() {\n    if (!hasPendingAction()) {\n      actionTimeoutId = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(flush);\n    }\n  };\n  var handleDomMutations = function handleDomMutations(mutations) {\n    if (hasPendingDiffs() || hasPendingAction()) {\n      return;\n    }\n    if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_36___default()(mutations).call(mutations, function (mutation) {\n      return isTrackedMutation(editor, mutation, mutations);\n    })) {\n      var _EDITOR_TO_FORCE_REND;\n\n      // Cause a re-render to restore the dom state if we encounter tracked mutations without\n      // a corresponding pending action.\n      (_EDITOR_TO_FORCE_REND = EDITOR_TO_FORCE_RENDER.get(editor)) === null || _EDITOR_TO_FORCE_REND === void 0 ? void 0 : _EDITOR_TO_FORCE_REND();\n    }\n  };\n  return {\n    flush: flush,\n    scheduleFlush: scheduleFlush,\n    hasPendingDiffs: hasPendingDiffs,\n    hasPendingAction: hasPendingAction,\n    hasPendingChanges: hasPendingChanges,\n    isFlushing: isFlushing,\n    handleUserSelect: handleUserSelect,\n    handleCompositionEnd: handleCompositionEnd,\n    handleCompositionStart: handleCompositionStart,\n    handleDOMBeforeInput: handleDOMBeforeInput,\n    handleKeyDown: handleKeyDown,\n    handleDomMutations: handleDomMutations,\n    handleInput: handleInput\n  };\n}\nfunction useIsMounted() {\n  var isMountedRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(false);\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    isMountedRef.current = true;\n    return function () {\n      isMountedRef.current = false;\n    };\n  }, []);\n  return isMountedRef.current;\n}\n\n/**\n * Prevent warning on SSR by falling back to useEffect when DOM isn't available\n */\n\nvar useIsomorphicLayoutEffect = CAN_USE_DOM ? react__WEBPACK_IMPORTED_MODULE_47__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_47__.useEffect;\nfunction useMutationObserver(node, callback, options) {\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(function () {\n      return new MutationObserver(callback);\n    }),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState, 1),\n    mutationObserver = _useState2[0];\n  useIsomorphicLayoutEffect(function () {\n    // Discard mutations caused during render phase. This works due to react calling\n    // useLayoutEffect synchronously after the render phase before the next tick.\n    mutationObserver.takeRecords();\n  });\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    if (!node.current) {\n      throw new Error('Failed to attach MutationObserver, `node` is undefined');\n    }\n    mutationObserver.observe(node.current, options);\n    return function () {\n      return mutationObserver.disconnect();\n    };\n  }, [mutationObserver, node, options]);\n}\nvar _excluded$3 = [\"node\"];\nfunction ownKeys$2(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context13;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context13 = ownKeys$2(Object(source), true)).call(_context13, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default()(source));\n    } else {\n      var _context14;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context14 = ownKeys$2(Object(source))).call(_context14, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar MUTATION_OBSERVER_CONFIG$1 = {\n  subtree: true,\n  childList: true,\n  characterData: true\n};\nvar useAndroidInputManager = !IS_ANDROID ? function () {\n  return null;\n} : function (_ref) {\n  var node = _ref.node,\n    options = _objectWithoutProperties(_ref, _excluded$3);\n  if (!IS_ANDROID) {\n    return null;\n  }\n  var editor = useSlateStatic();\n  var isMounted = useIsMounted();\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(function () {\n      return createAndroidInputManager(_objectSpread$2({\n        editor: editor\n      }, options));\n    }),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState3, 1),\n    inputManager = _useState4[0];\n  useMutationObserver(node, inputManager.handleDomMutations, MUTATION_OBSERVER_CONFIG$1);\n  EDITOR_TO_SCHEDULE_FLUSH.set(editor, inputManager.scheduleFlush);\n  if (isMounted) {\n    inputManager.flush();\n  }\n  return inputManager;\n};\nvar _excluded$2 = [\"anchor\", \"focus\"],\n  _excluded2$1 = [\"anchor\", \"focus\"];\nvar shallowCompare = function shallowCompare(obj1, obj2) {\n  var _context15;\n  return _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(obj1).length === _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(obj2).length && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_37___default()(_context15 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(obj1)).call(_context15, function (key) {\n    return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];\n  });\n};\nvar isDecorationFlagsEqual = function isDecorationFlagsEqual(range, other) {\n  var rangeOwnProps = _objectWithoutProperties(range, _excluded$2);\n  var otherOwnProps = _objectWithoutProperties(other, _excluded2$1);\n  return range[PLACEHOLDER_SYMBOL] === other[PLACEHOLDER_SYMBOL] && shallowCompare(rangeOwnProps, otherOwnProps);\n};\n/**\n * Check if a list of decorator ranges are equal to another.\n *\n * PERF: this requires the two lists to also have the ranges inside them in the\n * same order, but this is an okay constraint for us since decorations are\n * kept in order, and the odd case where they aren't is okay to re-render for.\n */\n\nvar isElementDecorationsEqual = function isElementDecorationsEqual(list, another) {\n  if (list.length !== another.length) {\n    return false;\n  }\n  for (var i = 0; i < list.length; i++) {\n    var range = list[i];\n    var other = another[i];\n    if (!slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(range, other) || !isDecorationFlagsEqual(range, other)) {\n      return false;\n    }\n  }\n  return true;\n};\n/**\n * Check if a list of decorator ranges are equal to another.\n *\n * PERF: this requires the two lists to also have the ranges inside them in the\n * same order, but this is an okay constraint for us since decorations are\n * kept in order, and the odd case where they aren't is okay to re-render for.\n */\n\nvar isTextDecorationsEqual = function isTextDecorationsEqual(list, another) {\n  if (list.length !== another.length) {\n    return false;\n  }\n  for (var i = 0; i < list.length; i++) {\n    var range = list[i];\n    var other = another[i]; // compare only offsets because paths doesn't matter for text\n\n    if (range.anchor.offset !== other.anchor.offset || range.focus.offset !== other.focus.offset || !isDecorationFlagsEqual(range, other)) {\n      return false;\n    }\n  }\n  return true;\n};\n\n/**\n * Leaf content strings.\n */\n\nvar String = function String(props) {\n  var _context16;\n  var isLast = props.isLast,\n    leaf = props.leaf,\n    parent = props.parent,\n    text = props.text;\n  var editor = useSlateStatic();\n  var path = ReactEditor.findPath(editor, text);\n  var parentPath = slate__WEBPACK_IMPORTED_MODULE_50__.Path.parent(path);\n  var isMarkPlaceholder = leaf[MARK_PLACEHOLDER_SYMBOL] === true; // COMPAT: Render text inside void nodes with a zero-width space.\n  // So the node can contain selection but the text is not visible.\n\n  if (editor.isVoid(parent)) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(ZeroWidthString, {\n      length: slate__WEBPACK_IMPORTED_MODULE_50__.Node.string(parent).length\n    });\n  } // COMPAT: If this is the last text node in an empty block, render a zero-\n  // width space that will convert into a line break when copying and pasting\n  // to support expected plain text.\n\n  if (leaf.text === '' && parent.children[parent.children.length - 1] === text && !editor.isInline(parent) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.string(editor, parentPath) === '') {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(ZeroWidthString, {\n      isLineBreak: true,\n      isMarkPlaceholder: isMarkPlaceholder\n    });\n  } // COMPAT: If the text is empty, it's because it's on the edge of an inline\n  // node, so we render a zero-width space so that the selection can be\n  // inserted next to it still.\n\n  if (leaf.text === '') {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(ZeroWidthString, {\n      isMarkPlaceholder: isMarkPlaceholder\n    });\n  } // COMPAT: Browsers will collapse trailing new lines at the end of blocks,\n  // so we need to add an extra trailing new lines to prevent that.\n\n  if (isLast && _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(_context16 = leaf.text).call(_context16, -1) === '\\n') {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(TextString, {\n      isTrailing: true,\n      text: leaf.text\n    });\n  }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(TextString, {\n    text: leaf.text\n  });\n};\n/**\n * Leaf strings with text in them.\n */\n\nvar TextString = function TextString(props) {\n  var text = props.text,\n    _props$isTrailing = props.isTrailing,\n    isTrailing = _props$isTrailing === void 0 ? false : _props$isTrailing;\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var getTextContent = function getTextContent() {\n    var _context17;\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25___default()(_context17 = \"\".concat(text !== null && text !== void 0 ? text : '')).call(_context17, isTrailing ? '\\n' : '');\n  };\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(getTextContent),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState5, 1),\n    initialText = _useState6[0]; // This is the actual text rendering boundary where we interface with the DOM\n  // The text is not rendered as part of the virtual DOM, as since we handle basic character insertions natively,\n  // updating the DOM is not a one way dataflow anymore. What we need here is not reconciliation and diffing\n  // with previous version of the virtual DOM, but rather diffing with the actual DOM element, and replace the DOM <span> content\n  // exactly if and only if its current content does not match our current virtual DOM.\n  // Otherwise the DOM TextNode would always be replaced by React as the user types, which interferes with native text features,\n  // eg makes native spellcheck opt out from checking the text node.\n  // useLayoutEffect: updating our span before browser paint\n\n  useIsomorphicLayoutEffect(function () {\n    // null coalescing text to make sure we're not outputing \"null\" as a string in the extreme case it is nullish at runtime\n    var textWithTrailing = getTextContent();\n    if (ref.current && ref.current.textContent !== textWithTrailing) {\n      ref.current.textContent = textWithTrailing;\n    } // intentionally not specifying dependencies, so that this effect runs on every render\n    // as this effectively replaces \"specifying the text in the virtual DOM under the <span> below\" on each render\n  }); // We intentionally render a memoized <span> that only receives the initial text content when the component is mounted.\n  // We defer to the layout effect above to update the `textContent` of the span element when needed.\n\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(MemoizedText$1, {\n    ref: ref\n  }, initialText);\n};\nvar MemoizedText$1 = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.forwardRef)(function (props, ref) {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"span\", {\n    \"data-slate-string\": true,\n    ref: ref\n  }, props.children);\n}));\n/**\n * Leaf strings without text, render as zero-width strings.\n */\n\nvar ZeroWidthString = function ZeroWidthString(props) {\n  var _props$length = props.length,\n    length = _props$length === void 0 ? 0 : _props$length,\n    _props$isLineBreak = props.isLineBreak,\n    isLineBreak = _props$isLineBreak === void 0 ? false : _props$isLineBreak,\n    _props$isMarkPlacehol = props.isMarkPlaceholder,\n    isMarkPlaceholder = _props$isMarkPlacehol === void 0 ? false : _props$isMarkPlacehol;\n  var attributes = {\n    'data-slate-zero-width': isLineBreak ? 'n' : 'z',\n    'data-slate-length': length\n  };\n  if (isMarkPlaceholder) {\n    attributes['data-slate-mark-placeholder'] = true;\n  }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"span\", (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, attributes), !IS_ANDROID || !isLineBreak ? \"\\uFEFF\" : null, isLineBreak ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"br\", null) : null);\n};\nfunction disconnectPlaceholderResizeObserver(placeholderResizeObserver, releaseObserver) {\n  if (placeholderResizeObserver.current) {\n    placeholderResizeObserver.current.disconnect();\n    if (releaseObserver) {\n      placeholderResizeObserver.current = null;\n    }\n  }\n}\nfunction clearTimeoutRef(timeoutRef) {\n  if (timeoutRef.current) {\n    clearTimeout(timeoutRef.current);\n    timeoutRef.current = null;\n  }\n}\n/**\n * Individual leaves in a text node with unique formatting.\n */\n\nvar Leaf = function Leaf(props) {\n  var leaf = props.leaf,\n    isLast = props.isLast,\n    text = props.text,\n    parent = props.parent,\n    renderPlaceholder = props.renderPlaceholder,\n    _props$renderLeaf = props.renderLeaf,\n    renderLeaf = _props$renderLeaf === void 0 ? function (props) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(DefaultLeaf, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, props));\n    } : _props$renderLeaf;\n  var editor = useSlateStatic();\n  var placeholderResizeObserver = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var placeholderRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(false),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState7, 2),\n    showPlaceholder = _useState8[0],\n    setShowPlaceholder = _useState8[1];\n  var showPlaceholderTimeoutRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var callbackPlaceholderRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (placeholderEl) {\n    disconnectPlaceholderResizeObserver(placeholderResizeObserver, placeholderEl == null);\n    if (placeholderEl == null) {\n      var _leaf$onPlaceholderRe;\n      EDITOR_TO_PLACEHOLDER_ELEMENT.delete(editor);\n      (_leaf$onPlaceholderRe = leaf.onPlaceholderResize) === null || _leaf$onPlaceholderRe === void 0 ? void 0 : _leaf$onPlaceholderRe.call(leaf, null);\n    } else {\n      EDITOR_TO_PLACEHOLDER_ELEMENT.set(editor, placeholderEl);\n      if (!placeholderResizeObserver.current) {\n        // Create a new observer and observe the placeholder element.\n        var ResizeObserver$1 = window.ResizeObserver || ResizeObserver;\n        placeholderResizeObserver.current = new ResizeObserver$1(function () {\n          var _leaf$onPlaceholderRe2;\n          (_leaf$onPlaceholderRe2 = leaf.onPlaceholderResize) === null || _leaf$onPlaceholderRe2 === void 0 ? void 0 : _leaf$onPlaceholderRe2.call(leaf, placeholderEl);\n        });\n      }\n      placeholderResizeObserver.current.observe(placeholderEl);\n      placeholderRef.current = placeholderEl;\n    }\n  }, [placeholderRef, leaf, editor]);\n  var children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(String, {\n    isLast: isLast,\n    leaf: leaf,\n    parent: parent,\n    text: text\n  });\n  var leafIsPlaceholder = leaf[PLACEHOLDER_SYMBOL];\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    if (leafIsPlaceholder) {\n      if (!showPlaceholderTimeoutRef.current) {\n        // Delay the placeholder so it will not render in a selection\n        showPlaceholderTimeoutRef.current = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(function () {\n          setShowPlaceholder(true);\n          showPlaceholderTimeoutRef.current = null;\n        }, 300);\n      }\n    } else {\n      clearTimeoutRef(showPlaceholderTimeoutRef);\n      setShowPlaceholder(false);\n    }\n    return function () {\n      return clearTimeoutRef(showPlaceholderTimeoutRef);\n    };\n  }, [leafIsPlaceholder, setShowPlaceholder]);\n  if (leafIsPlaceholder && showPlaceholder) {\n    var placeholderProps = {\n      children: leaf.placeholder,\n      attributes: {\n        'data-slate-placeholder': true,\n        style: {\n          position: 'absolute',\n          top: 0,\n          pointerEvents: 'none',\n          width: '100%',\n          maxWidth: '100%',\n          display: 'block',\n          opacity: '0.333',\n          userSelect: 'none',\n          textDecoration: 'none',\n          // Fixes https://github.com/udecode/plate/issues/2315\n          WebkitUserModify: IS_WEBKIT ? 'inherit' : undefined\n        },\n        contentEditable: false,\n        ref: callbackPlaceholderRef\n      }\n    };\n    children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement((react__WEBPACK_IMPORTED_MODULE_47___default().Fragment), null, renderPlaceholder(placeholderProps), children);\n  } // COMPAT: Having the `data-` attributes on these leaf elements ensures that\n  // in certain misbehaving browsers they aren't weirdly cloned/destroyed by\n  // contenteditable behaviors. (2019/05/08)\n\n  var attributes = {\n    'data-slate-leaf': true\n  };\n  return renderLeaf({\n    attributes: attributes,\n    children: children,\n    leaf: leaf,\n    text: text\n  });\n};\nvar MemoizedLeaf = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().memo(Leaf, function (prev, next) {\n  return next.parent === prev.parent && next.isLast === prev.isLast && next.renderLeaf === prev.renderLeaf && next.renderPlaceholder === prev.renderPlaceholder && next.text === prev.text && slate__WEBPACK_IMPORTED_MODULE_50__.Text.equals(next.leaf, prev.leaf) && next.leaf[PLACEHOLDER_SYMBOL] === prev.leaf[PLACEHOLDER_SYMBOL];\n});\nvar DefaultLeaf = function DefaultLeaf(props) {\n  var attributes = props.attributes,\n    children = props.children;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"span\", (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, attributes), children);\n};\n\n/**\n * Text.\n */\n\nvar Text = function Text(props) {\n  var decorations = props.decorations,\n    isLast = props.isLast,\n    parent = props.parent,\n    renderPlaceholder = props.renderPlaceholder,\n    renderLeaf = props.renderLeaf,\n    text = props.text;\n  var editor = useSlateStatic();\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var leaves = slate__WEBPACK_IMPORTED_MODULE_50__.Text.decorations(text, decorations);\n  var key = ReactEditor.findKey(editor, text);\n  var children = [];\n  for (var i = 0; i < leaves.length; i++) {\n    var _context18;\n    var leaf = leaves[i];\n    children.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(MemoizedLeaf, {\n      isLast: isLast && i === leaves.length - 1,\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25___default()(_context18 = \"\".concat(key.id, \"-\")).call(_context18, i),\n      renderPlaceholder: renderPlaceholder,\n      leaf: leaf,\n      text: text,\n      parent: parent,\n      renderLeaf: renderLeaf\n    }));\n  } // Update element-related weak maps with the DOM element ref.\n\n  var callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (span) {\n    var KEY_TO_ELEMENT = EDITOR_TO_KEY_TO_ELEMENT.get(editor);\n    if (span) {\n      KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.set(key, span);\n      NODE_TO_ELEMENT.set(text, span);\n      ELEMENT_TO_NODE.set(span, text);\n    } else {\n      KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.delete(key);\n      NODE_TO_ELEMENT.delete(text);\n      if (ref.current) {\n        ELEMENT_TO_NODE.delete(ref.current);\n      }\n    }\n    ref.current = span;\n  }, [ref, editor, key, text]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"span\", {\n    \"data-slate-node\": \"text\",\n    ref: callbackRef\n  }, children);\n};\nvar MemoizedText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().memo(Text, function (prev, next) {\n  return next.parent === prev.parent && next.isLast === prev.isLast && next.renderLeaf === prev.renderLeaf && next.renderPlaceholder === prev.renderPlaceholder && next.text === prev.text && isTextDecorationsEqual(next.decorations, prev.decorations);\n});\n\n/**\n * Element.\n */\n\nvar Element = function Element(props) {\n  var decorations = props.decorations,\n    element = props.element,\n    _props$renderElement = props.renderElement,\n    renderElement = _props$renderElement === void 0 ? function (p) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(DefaultElement, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, p));\n    } : _props$renderElement,\n    renderPlaceholder = props.renderPlaceholder,\n    renderLeaf = props.renderLeaf,\n    selection = props.selection;\n  var editor = useSlateStatic();\n  var readOnly = useReadOnly();\n  var isInline = editor.isInline(element);\n  var key = ReactEditor.findKey(editor, element);\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (ref) {\n    // Update element-related weak maps with the DOM element ref.\n    var KEY_TO_ELEMENT = EDITOR_TO_KEY_TO_ELEMENT.get(editor);\n    if (ref) {\n      KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.set(key, ref);\n      NODE_TO_ELEMENT.set(element, ref);\n      ELEMENT_TO_NODE.set(ref, element);\n    } else {\n      KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.delete(key);\n      NODE_TO_ELEMENT.delete(element);\n    }\n  }, [editor, key, element]);\n  var children = useChildren({\n    decorations: decorations,\n    node: element,\n    renderElement: renderElement,\n    renderPlaceholder: renderPlaceholder,\n    renderLeaf: renderLeaf,\n    selection: selection\n  }); // Attributes that the developer must mix into the element in their\n  // custom node renderer component.\n\n  var attributes = {\n    'data-slate-node': 'element',\n    ref: ref\n  };\n  if (isInline) {\n    attributes['data-slate-inline'] = true;\n  } // If it's a block node with inline children, add the proper `dir` attribute\n  // for text direction.\n\n  if (!isInline && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasInlines(editor, element)) {\n    var text = slate__WEBPACK_IMPORTED_MODULE_50__.Node.string(element);\n    var dir = direction__WEBPACK_IMPORTED_MODULE_44___default()(text);\n    if (dir === 'rtl') {\n      attributes.dir = dir;\n    }\n  } // If it's a void node, wrap the children in extra void-specific elements.\n\n  if (slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, element)) {\n    attributes['data-slate-void'] = true;\n    if (!readOnly && isInline) {\n      attributes.contentEditable = false;\n    }\n    var Tag = isInline ? 'span' : 'div';\n    var _Node$texts = slate__WEBPACK_IMPORTED_MODULE_50__.Node.texts(element),\n      _Node$texts2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Node$texts, 1),\n      _Node$texts2$ = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Node$texts2[0], 1),\n      _text = _Node$texts2$[0];\n    children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(Tag, {\n      \"data-slate-spacer\": true,\n      style: {\n        height: '0',\n        color: 'transparent',\n        outline: 'none',\n        position: 'absolute'\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(MemoizedText, {\n      renderPlaceholder: renderPlaceholder,\n      decorations: [],\n      isLast: false,\n      parent: element,\n      text: _text\n    }));\n    NODE_TO_INDEX.set(_text, 0);\n    NODE_TO_PARENT.set(_text, element);\n  }\n  return renderElement({\n    attributes: attributes,\n    children: children,\n    element: element\n  });\n};\nvar MemoizedElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().memo(Element, function (prev, next) {\n  return prev.element === next.element && prev.renderElement === next.renderElement && prev.renderLeaf === next.renderLeaf && prev.renderPlaceholder === next.renderPlaceholder && isElementDecorationsEqual(prev.decorations, next.decorations) && (prev.selection === next.selection || !!prev.selection && !!next.selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(prev.selection, next.selection));\n});\n/**\n * The default element renderer.\n */\n\nvar DefaultElement = function DefaultElement(props) {\n  var attributes = props.attributes,\n    children = props.children,\n    element = props.element;\n  var editor = useSlateStatic();\n  var Tag = editor.isInline(element) ? 'span' : 'div';\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(Tag, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, attributes, {\n    style: {\n      position: 'relative'\n    }\n  }), children);\n};\n\n/**\n * A React context for sharing the `decorate` prop of the editable.\n */\n\nvar DecorateContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)(function () {\n  return [];\n});\n/**\n * Get the current `decorate` prop of the editable.\n */\n\nvar useDecorate = function useDecorate() {\n  return (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(DecorateContext);\n};\n\n/**\n * A React context for sharing the `selected` state of an element.\n */\n\nvar SelectedContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)(false);\n/**\n * Get the current `selected` state of an element.\n */\n\nvar useSelected = function useSelected() {\n  return (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(SelectedContext);\n};\n\n/**\n * Children.\n */\n\nvar useChildren = function useChildren(props) {\n  var decorations = props.decorations,\n    node = props.node,\n    renderElement = props.renderElement,\n    renderPlaceholder = props.renderPlaceholder,\n    renderLeaf = props.renderLeaf,\n    selection = props.selection;\n  var decorate = useDecorate();\n  var editor = useSlateStatic();\n  var path = ReactEditor.findPath(editor, node);\n  var children = [];\n  var isLeafBlock = slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(node) && !editor.isInline(node) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasInlines(editor, node);\n  for (var i = 0; i < node.children.length; i++) {\n    var p = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_25___default()(path).call(path, i);\n    var n = node.children[i];\n    var key = ReactEditor.findKey(editor, n);\n    var range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, p);\n    var sel = selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.intersection(range, selection);\n    var ds = decorate([n, p]);\n    var _iterator3 = _createForOfIteratorHelper(decorations),\n      _step3;\n    try {\n      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n        var dec = _step3.value;\n        var d = slate__WEBPACK_IMPORTED_MODULE_50__.Range.intersection(dec, range);\n        if (d) {\n          ds.push(d);\n        }\n      }\n    } catch (err) {\n      _iterator3.e(err);\n    } finally {\n      _iterator3.f();\n    }\n    if (slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(n)) {\n      children.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(SelectedContext.Provider, {\n        key: \"provider-\".concat(key.id),\n        value: !!sel\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(MemoizedElement, {\n        decorations: ds,\n        element: n,\n        key: key.id,\n        renderElement: renderElement,\n        renderPlaceholder: renderPlaceholder,\n        renderLeaf: renderLeaf,\n        selection: sel\n      })));\n    } else {\n      children.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(MemoizedText, {\n        decorations: ds,\n        key: key.id,\n        isLast: isLeafBlock && i === node.children.length - 1,\n        parent: node,\n        renderPlaceholder: renderPlaceholder,\n        renderLeaf: renderLeaf,\n        text: n\n      }));\n    }\n    NODE_TO_INDEX.set(n, i);\n    NODE_TO_PARENT.set(n, node);\n  }\n  return children;\n};\n\n/**\n * A React context for sharing the `readOnly` state of the editor.\n */\n\nvar ReadOnlyContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)(false);\n/**\n * Get the current `readOnly` state of the editor.\n */\n\nvar useReadOnly = function useReadOnly() {\n  return (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(ReadOnlyContext);\n};\nvar SlateContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)(null);\n/**\n * Get the current editor object from the React context.\n */\n\nvar useSlate = function useSlate() {\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(SlateContext);\n  if (!context) {\n    throw new Error(\"The `useSlate` hook must be used inside the <Slate> component's context.\");\n  }\n  var editor = context.editor;\n  return editor;\n};\nvar useSlateWithV = function useSlateWithV() {\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(SlateContext);\n  if (!context) {\n    throw new Error(\"The `useSlate` hook must be used inside the <Slate> component's context.\");\n  }\n  return context;\n};\nfunction useTrackUserInput() {\n  var editor = useSlateStatic();\n  var receivedUserInput = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(false);\n  var animationFrameIdRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(0);\n  var onUserInput = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function () {\n    if (receivedUserInput.current) {\n      return;\n    }\n    receivedUserInput.current = true;\n    var window = ReactEditor.getWindow(editor);\n    window.cancelAnimationFrame(animationFrameIdRef.current);\n    animationFrameIdRef.current = window.requestAnimationFrame(function () {\n      receivedUserInput.current = false;\n    });\n  }, [editor]);\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    return function () {\n      return cancelAnimationFrame(animationFrameIdRef.current);\n    };\n  }, []);\n  return {\n    receivedUserInput: receivedUserInput,\n    onUserInput: onUserInput\n  };\n}\nvar TRIPLE_CLICK = 3;\n\n/**\n * Hotkey mappings for each platform.\n */\n\nvar HOTKEYS = {\n  bold: 'mod+b',\n  compose: ['down', 'left', 'right', 'up', 'backspace', 'enter'],\n  moveBackward: 'left',\n  moveForward: 'right',\n  moveWordBackward: 'ctrl+left',\n  moveWordForward: 'ctrl+right',\n  deleteBackward: 'shift?+backspace',\n  deleteForward: 'shift?+delete',\n  extendBackward: 'shift+left',\n  extendForward: 'shift+right',\n  italic: 'mod+i',\n  insertSoftBreak: 'shift+enter',\n  splitBlock: 'enter',\n  undo: 'mod+z'\n};\nvar APPLE_HOTKEYS = {\n  moveLineBackward: 'opt+up',\n  moveLineForward: 'opt+down',\n  moveWordBackward: 'opt+left',\n  moveWordForward: 'opt+right',\n  deleteBackward: ['ctrl+backspace', 'ctrl+h'],\n  deleteForward: ['ctrl+delete', 'ctrl+d'],\n  deleteLineBackward: 'cmd+shift?+backspace',\n  deleteLineForward: ['cmd+shift?+delete', 'ctrl+k'],\n  deleteWordBackward: 'opt+shift?+backspace',\n  deleteWordForward: 'opt+shift?+delete',\n  extendLineBackward: 'opt+shift+up',\n  extendLineForward: 'opt+shift+down',\n  redo: 'cmd+shift+z',\n  transposeCharacter: 'ctrl+t'\n};\nvar WINDOWS_HOTKEYS = {\n  deleteWordBackward: 'ctrl+shift?+backspace',\n  deleteWordForward: 'ctrl+shift?+delete',\n  redo: ['ctrl+y', 'ctrl+shift+z']\n};\n/**\n * Create a platform-aware hotkey checker.\n */\n\nvar create = function create(key) {\n  var generic = HOTKEYS[key];\n  var apple = APPLE_HOTKEYS[key];\n  var windows = WINDOWS_HOTKEYS[key];\n  var isGeneric = generic && (0,is_hotkey__WEBPACK_IMPORTED_MODULE_48__.isHotkey)(generic);\n  var isApple = apple && (0,is_hotkey__WEBPACK_IMPORTED_MODULE_48__.isHotkey)(apple);\n  var isWindows = windows && (0,is_hotkey__WEBPACK_IMPORTED_MODULE_48__.isHotkey)(windows);\n  return function (event) {\n    if (isGeneric && isGeneric(event)) return true;\n    if (IS_APPLE && isApple && isApple(event)) return true;\n    if (!IS_APPLE && isWindows && isWindows(event)) return true;\n    return false;\n  };\n};\n/**\n * Hotkeys.\n */\n\nvar Hotkeys = {\n  isBold: create('bold'),\n  isCompose: create('compose'),\n  isMoveBackward: create('moveBackward'),\n  isMoveForward: create('moveForward'),\n  isDeleteBackward: create('deleteBackward'),\n  isDeleteForward: create('deleteForward'),\n  isDeleteLineBackward: create('deleteLineBackward'),\n  isDeleteLineForward: create('deleteLineForward'),\n  isDeleteWordBackward: create('deleteWordBackward'),\n  isDeleteWordForward: create('deleteWordForward'),\n  isExtendBackward: create('extendBackward'),\n  isExtendForward: create('extendForward'),\n  isExtendLineBackward: create('extendLineBackward'),\n  isExtendLineForward: create('extendLineForward'),\n  isItalic: create('italic'),\n  isMoveLineBackward: create('moveLineBackward'),\n  isMoveLineForward: create('moveLineForward'),\n  isMoveWordBackward: create('moveWordBackward'),\n  isMoveWordForward: create('moveWordForward'),\n  isRedo: create('redo'),\n  isSoftBreak: create('insertSoftBreak'),\n  isSplitBlock: create('splitBlock'),\n  isTransposeCharacter: create('transposeCharacter'),\n  isUndo: create('undo')\n};\nvar createRestoreDomManager = function createRestoreDomManager(editor, receivedUserInput) {\n  var bufferedMutations = [];\n  var clear = function clear() {\n    bufferedMutations = [];\n  };\n  var registerMutations = function registerMutations(mutations) {\n    var _bufferedMutations;\n    if (!receivedUserInput.current) {\n      return;\n    }\n    var trackedMutations = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(mutations).call(mutations, function (mutation) {\n      return isTrackedMutation(editor, mutation, mutations);\n    });\n    (_bufferedMutations = bufferedMutations).push.apply(_bufferedMutations, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(trackedMutations));\n  };\n  function restoreDOM() {\n    if (bufferedMutations.length > 0) {\n      var _context19;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context19 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_38___default()(bufferedMutations).call(bufferedMutations)).call(_context19, function (mutation) {\n        var _context20, _context21;\n        if (mutation.type === 'characterData') {\n          // We don't want to restore the DOM for characterData mutations\n          // because this interrupts the composition.\n          return;\n        }\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context20 = mutation.removedNodes).call(_context20, function (node) {\n          mutation.target.insertBefore(node, mutation.nextSibling);\n        });\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context21 = mutation.addedNodes).call(_context21, function (node) {\n          mutation.target.removeChild(node);\n        });\n      }); // Clear buffered mutations to ensure we don't undo them twice\n\n      clear();\n    }\n  }\n  return {\n    registerMutations: registerMutations,\n    restoreDOM: restoreDOM,\n    clear: clear\n  };\n};\nvar MUTATION_OBSERVER_CONFIG = {\n  subtree: true,\n  childList: true,\n  characterData: true,\n  characterDataOldValue: true\n}; // We have to use a class component here since we rely on `getSnapshotBeforeUpdate` which has no FC equivalent\n// to run code synchronously immediately before react commits the component update to the DOM.\nvar RestoreDOMComponent = /*#__PURE__*/function (_Component) {\n  (0,_babel_runtime_corejs3_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(RestoreDOMComponent, _Component);\n  function RestoreDOMComponent() {\n    var _this;\n    (0,_babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(this, RestoreDOMComponent);\n    _this = _callSuper(this, RestoreDOMComponent, arguments);\n    _this.context = null;\n    _this.manager = null;\n    _this.mutationObserver = null;\n    return _this;\n  }\n  (0,_babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(RestoreDOMComponent, [{\n    key: \"observe\",\n    value: function observe() {\n      var _this$mutationObserve;\n      var node = this.props.node;\n      if (!node.current) {\n        throw new Error('Failed to attach MutationObserver, `node` is undefined');\n      }\n      (_this$mutationObserve = this.mutationObserver) === null || _this$mutationObserve === void 0 ? void 0 : _this$mutationObserve.observe(node.current, MUTATION_OBSERVER_CONFIG);\n    }\n  }, {\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var receivedUserInput = this.props.receivedUserInput;\n      var editor = this.context;\n      this.manager = createRestoreDomManager(editor, receivedUserInput);\n      this.mutationObserver = new MutationObserver(this.manager.registerMutations);\n      this.observe();\n    }\n  }, {\n    key: \"getSnapshotBeforeUpdate\",\n    value: function getSnapshotBeforeUpdate() {\n      var _this$mutationObserve2, _this$mutationObserve3, _this$manager2;\n      var pendingMutations = (_this$mutationObserve2 = this.mutationObserver) === null || _this$mutationObserve2 === void 0 ? void 0 : _this$mutationObserve2.takeRecords();\n      if (pendingMutations !== null && pendingMutations !== void 0 && pendingMutations.length) {\n        var _this$manager;\n        (_this$manager = this.manager) === null || _this$manager === void 0 ? void 0 : _this$manager.registerMutations(pendingMutations);\n      }\n      (_this$mutationObserve3 = this.mutationObserver) === null || _this$mutationObserve3 === void 0 ? void 0 : _this$mutationObserve3.disconnect();\n      (_this$manager2 = this.manager) === null || _this$manager2 === void 0 ? void 0 : _this$manager2.restoreDOM();\n      return null;\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      var _this$manager3;\n      (_this$manager3 = this.manager) === null || _this$manager3 === void 0 ? void 0 : _this$manager3.clear();\n      this.observe();\n    }\n  }, {\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      var _this$mutationObserve4;\n      (_this$mutationObserve4 = this.mutationObserver) === null || _this$mutationObserve4 === void 0 ? void 0 : _this$mutationObserve4.disconnect();\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      return this.props.children;\n    }\n  }]);\n  return RestoreDOMComponent;\n}(react__WEBPACK_IMPORTED_MODULE_47__.Component);\nRestoreDOMComponent.contextType = EditorContext;\nvar RestoreDOM = IS_ANDROID ? RestoreDOMComponent : function (_ref) {\n  var children = _ref.children;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement((react__WEBPACK_IMPORTED_MODULE_47___default().Fragment), null, children);\n};\nvar _excluded$1 = [\"autoFocus\", \"decorate\", \"onDOMBeforeInput\", \"placeholder\", \"readOnly\", \"renderElement\", \"renderLeaf\", \"renderPlaceholder\", \"scrollSelectionIntoView\", \"style\", \"as\", \"disableDefaultStyles\"],\n  _excluded2 = [\"text\"];\nfunction ownKeys$1(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$1(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context22;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context22 = ownKeys$1(Object(source), true)).call(_context22, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default()(source));\n    } else {\n      var _context23;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context23 = ownKeys$1(Object(source))).call(_context23, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar Children = function Children(props) {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement((react__WEBPACK_IMPORTED_MODULE_47___default().Fragment), null, useChildren(props));\n};\n/**\n * Editable.\n */\n\nvar Editable = function Editable(props) {\n  var defaultRenderPlaceholder = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (props) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(DefaultPlaceholder, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, props));\n  }, []);\n  var autoFocus = props.autoFocus,\n    _props$decorate = props.decorate,\n    decorate = _props$decorate === void 0 ? defaultDecorate : _props$decorate,\n    propsOnDOMBeforeInput = props.onDOMBeforeInput,\n    placeholder = props.placeholder,\n    _props$readOnly = props.readOnly,\n    readOnly = _props$readOnly === void 0 ? false : _props$readOnly,\n    renderElement = props.renderElement,\n    renderLeaf = props.renderLeaf,\n    _props$renderPlacehol = props.renderPlaceholder,\n    renderPlaceholder = _props$renderPlacehol === void 0 ? defaultRenderPlaceholder : _props$renderPlacehol,\n    _props$scrollSelectio = props.scrollSelectionIntoView,\n    scrollSelectionIntoView = _props$scrollSelectio === void 0 ? defaultScrollSelectionIntoView : _props$scrollSelectio,\n    _props$style = props.style,\n    userStyle = _props$style === void 0 ? {} : _props$style,\n    _props$as = props.as,\n    Component = _props$as === void 0 ? 'div' : _props$as,\n    _props$disableDefault = props.disableDefaultStyles,\n    disableDefaultStyles = _props$disableDefault === void 0 ? false : _props$disableDefault,\n    attributes = _objectWithoutProperties(props, _excluded$1);\n  var editor = useSlate(); // Rerender editor when composition status changed\n\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(false),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState9, 2),\n    isComposing = _useState10[0],\n    setIsComposing = _useState10[1];\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var deferredOperations = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)([]);\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState11, 2),\n    placeholderHeight = _useState12[0],\n    setPlaceholderHeight = _useState12[1];\n  var _useTrackUserInput = useTrackUserInput(),\n    onUserInput = _useTrackUserInput.onUserInput,\n    receivedUserInput = _useTrackUserInput.receivedUserInput;\n  var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_47__.useReducer)(function (s) {\n      return s + 1;\n    }, 0),\n    _useReducer2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useReducer, 2),\n    forceRender = _useReducer2[1];\n  EDITOR_TO_FORCE_RENDER.set(editor, forceRender); // Update internal state on each render.\n\n  IS_READ_ONLY.set(editor, readOnly); // Keep track of some state for the event handler logic.\n\n  var state = (0,react__WEBPACK_IMPORTED_MODULE_47__.useMemo)(function () {\n    return {\n      isDraggingInternally: false,\n      isUpdatingSelection: false,\n      latestElement: null,\n      hasMarkPlaceholder: false\n    };\n  }, []); // The autoFocus TextareaHTMLAttribute doesn't do anything on a div, so it\n  // needs to be manually focused.\n\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    if (ref.current && autoFocus) {\n      ref.current.focus();\n    }\n  }, [autoFocus]);\n  /**\n   * The AndroidInputManager object has a cyclical dependency on onDOMSelectionChange\n   *\n   * It is defined as a reference to simplify hook dependencies and clarify that\n   * it needs to be initialized.\n   */\n\n  var androidInputManagerRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(); // Listen on the native `selectionchange` event to be able to update any time\n  // the selection changes. This is required because React's `onSelect` is leaky\n  // and non-standard so it doesn't fire until after a selection has been\n  // released. This causes issues in situations where another change happens\n  // while a selection is being dragged.\n\n  var onDOMSelectionChange = (0,react__WEBPACK_IMPORTED_MODULE_47__.useMemo)(function () {\n    return lodash_throttle__WEBPACK_IMPORTED_MODULE_46___default()(function () {\n      var androidInputManager = androidInputManagerRef.current;\n      if ((IS_ANDROID || !ReactEditor.isComposing(editor)) && (!state.isUpdatingSelection || androidInputManager !== null && androidInputManager !== void 0 && androidInputManager.isFlushing()) && !state.isDraggingInternally) {\n        var root = ReactEditor.findDocumentOrShadowRoot(editor);\n        var activeElement = root.activeElement;\n        var el = ReactEditor.toDOMNode(editor, editor);\n        var domSelection = root.getSelection();\n        if (activeElement === el) {\n          state.latestElement = activeElement;\n          IS_FOCUSED.set(editor, true);\n        } else {\n          IS_FOCUSED.delete(editor);\n        }\n        if (!domSelection) {\n          return slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.deselect(editor);\n        }\n        var anchorNode = domSelection.anchorNode,\n          focusNode = domSelection.focusNode;\n        var anchorNodeSelectable = ReactEditor.hasEditableTarget(editor, anchorNode) || ReactEditor.isTargetInsideNonReadonlyVoid(editor, anchorNode);\n        var focusNodeSelectable = ReactEditor.hasEditableTarget(editor, focusNode) || ReactEditor.isTargetInsideNonReadonlyVoid(editor, focusNode);\n        if (anchorNodeSelectable && focusNodeSelectable) {\n          var range = ReactEditor.toSlateRange(editor, domSelection, {\n            exactMatch: false,\n            suppressThrow: true\n          });\n          if (range) {\n            if (!ReactEditor.isComposing(editor) && !(androidInputManager !== null && androidInputManager !== void 0 && androidInputManager.hasPendingChanges()) && !(androidInputManager !== null && androidInputManager !== void 0 && androidInputManager.isFlushing())) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, range);\n            } else {\n              androidInputManager === null || androidInputManager === void 0 ? void 0 : androidInputManager.handleUserSelect(range);\n            }\n          }\n        } // Deselect the editor if the dom selection is not selectable in readonly mode\n\n        if (readOnly && (!anchorNodeSelectable || !focusNodeSelectable)) {\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.deselect(editor);\n        }\n      }\n    }, 100);\n  }, [editor, readOnly, state]);\n  var scheduleOnDOMSelectionChange = (0,react__WEBPACK_IMPORTED_MODULE_47__.useMemo)(function () {\n    return lodash_debounce__WEBPACK_IMPORTED_MODULE_45___default()(onDOMSelectionChange, 0);\n  }, [onDOMSelectionChange]);\n  androidInputManagerRef.current = useAndroidInputManager({\n    node: ref,\n    onDOMSelectionChange: onDOMSelectionChange,\n    scheduleOnDOMSelectionChange: scheduleOnDOMSelectionChange\n  });\n  useIsomorphicLayoutEffect(function () {\n    var _androidInputManagerR, _androidInputManagerR2;\n\n    // Update element-related weak maps with the DOM element ref.\n    var window;\n    if (ref.current && (window = getDefaultView(ref.current))) {\n      EDITOR_TO_WINDOW.set(editor, window);\n      EDITOR_TO_ELEMENT.set(editor, ref.current);\n      NODE_TO_ELEMENT.set(editor, ref.current);\n      ELEMENT_TO_NODE.set(ref.current, editor);\n    } else {\n      NODE_TO_ELEMENT.delete(editor);\n    } // Make sure the DOM selection state is in sync.\n\n    var selection = editor.selection;\n    var root = ReactEditor.findDocumentOrShadowRoot(editor);\n    var domSelection = root.getSelection();\n    if (!domSelection || !ReactEditor.isFocused(editor) || (_androidInputManagerR = androidInputManagerRef.current) !== null && _androidInputManagerR !== void 0 && _androidInputManagerR.hasPendingAction()) {\n      return;\n    }\n    var setDomSelection = function setDomSelection(forceChange) {\n      var hasDomSelection = domSelection.type !== 'None'; // If the DOM selection is properly unset, we're done.\n\n      if (!selection && !hasDomSelection) {\n        return;\n      } // Get anchorNode and focusNode\n\n      var focusNode = domSelection.focusNode;\n      var anchorNode; // COMPAT: In firefox the normal seletion way does not work\n      // (https://github.com/ianstormtaylor/slate/pull/5486#issue-1820720223)\n\n      if (IS_FIREFOX && domSelection.rangeCount > 1) {\n        var firstRange = domSelection.getRangeAt(0);\n        var lastRange = domSelection.getRangeAt(domSelection.rangeCount - 1); // Right to left\n\n        if (firstRange.startContainer === focusNode) {\n          anchorNode = lastRange.endContainer;\n        } else {\n          // Left to right\n          anchorNode = firstRange.startContainer;\n        }\n      } else {\n        anchorNode = domSelection.anchorNode;\n      } // verify that the dom selection is in the editor\n\n      var editorElement = EDITOR_TO_ELEMENT.get(editor);\n      var hasDomSelectionInEditor = false;\n      if (editorElement.contains(anchorNode) && editorElement.contains(focusNode)) {\n        hasDomSelectionInEditor = true;\n      } // If the DOM selection is in the editor and the editor selection is already correct, we're done.\n\n      if (hasDomSelection && hasDomSelectionInEditor && selection && !forceChange) {\n        var slateRange = ReactEditor.toSlateRange(editor, domSelection, {\n          exactMatch: true,\n          // domSelection is not necessarily a valid Slate range\n          // (e.g. when clicking on contentEditable:false element)\n          suppressThrow: true\n        });\n        if (slateRange && slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(slateRange, selection)) {\n          var _anchorNode, _anchorNode$parentEle;\n          if (!state.hasMarkPlaceholder) {\n            return;\n          } // Ensure selection is inside the mark placeholder\n\n          if ((_anchorNode = anchorNode) !== null && _anchorNode !== void 0 && (_anchorNode$parentEle = _anchorNode.parentElement) !== null && _anchorNode$parentEle !== void 0 && _anchorNode$parentEle.hasAttribute('data-slate-mark-placeholder')) {\n            return;\n          }\n        }\n      } // when <Editable/> is being controlled through external value\n      // then its children might just change - DOM responds to it on its own\n      // but Slate's value is not being updated through any operation\n      // and thus it doesn't transform selection on its own\n\n      if (selection && !ReactEditor.hasRange(editor, selection)) {\n        editor.selection = ReactEditor.toSlateRange(editor, domSelection, {\n          exactMatch: false,\n          suppressThrow: true\n        });\n        return;\n      } // Otherwise the DOM selection is out of sync, so update it.\n\n      state.isUpdatingSelection = true;\n      var newDomRange = selection && ReactEditor.toDOMRange(editor, selection);\n      if (newDomRange) {\n        if (ReactEditor.isComposing(editor) && !IS_ANDROID) {\n          domSelection.collapseToEnd();\n        } else if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isBackward(selection)) {\n          domSelection.setBaseAndExtent(newDomRange.endContainer, newDomRange.endOffset, newDomRange.startContainer, newDomRange.startOffset);\n        } else {\n          domSelection.setBaseAndExtent(newDomRange.startContainer, newDomRange.startOffset, newDomRange.endContainer, newDomRange.endOffset);\n        }\n        scrollSelectionIntoView(editor, newDomRange);\n      } else {\n        domSelection.removeAllRanges();\n      }\n      return newDomRange;\n    }; // In firefox if there is more then 1 range and we call setDomSelection we remove the ability to select more cells in a table\n\n    if (domSelection.rangeCount <= 1) {\n      setDomSelection();\n    }\n    var ensureSelection = ((_androidInputManagerR2 = androidInputManagerRef.current) === null || _androidInputManagerR2 === void 0 ? void 0 : _androidInputManagerR2.isFlushing()) === 'action';\n    if (!IS_ANDROID || !ensureSelection) {\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(function () {\n        state.isUpdatingSelection = false;\n      });\n      return;\n    }\n    var timeoutId = null;\n    var animationFrameId = requestAnimationFrame(function () {\n      if (ensureSelection) {\n        var ensureDomSelection = function ensureDomSelection(forceChange) {\n          try {\n            var el = ReactEditor.toDOMNode(editor, editor);\n            el.focus();\n            setDomSelection(forceChange);\n          } catch (e) {// Ignore, dom and state might be out of sync\n          }\n        }; // Compat: Android IMEs try to force their selection by manually re-applying it even after we set it.\n        // This essentially would make setting the slate selection during an update meaningless, so we force it\n        // again here. We can't only do it in the setTimeout after the animation frame since that would cause a\n        // visible flicker.\n\n        ensureDomSelection();\n        timeoutId = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(function () {\n          // COMPAT: While setting the selection in an animation frame visually correctly sets the selection,\n          // it doesn't update GBoards spellchecker state. We have to manually trigger a selection change after\n          // the animation frame to ensure it displays the correct state.\n          ensureDomSelection(true);\n          state.isUpdatingSelection = false;\n        });\n      }\n    });\n    return function () {\n      cancelAnimationFrame(animationFrameId);\n      if (timeoutId) {\n        clearTimeout(timeoutId);\n      }\n    };\n  }); // Listen on the native `beforeinput` event to get real \"Level 2\" events. This\n  // is required because React's `beforeinput` is fake and never really attaches\n  // to the real event sadly. (2019/11/01)\n  // https://github.com/facebook/react/issues/11211\n\n  var onDOMBeforeInput = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n    onUserInput();\n    if (!readOnly && ReactEditor.hasEditableTarget(editor, event.target) && !isDOMEventHandled(event, propsOnDOMBeforeInput)) {\n      var _EDITOR_TO_USER_SELEC;\n\n      // COMPAT: BeforeInput events aren't cancelable on android, so we have to handle them differently using the android input manager.\n      if (androidInputManagerRef.current) {\n        return androidInputManagerRef.current.handleDOMBeforeInput(event);\n      } // Some IMEs/Chrome extensions like e.g. Grammarly set the selection immediately before\n      // triggering a `beforeinput` expecting the change to be applied to the immediately before\n      // set selection.\n\n      scheduleOnDOMSelectionChange.flush();\n      onDOMSelectionChange.flush();\n      var selection = editor.selection;\n      var type = event.inputType;\n      var data = event.dataTransfer || event.data || undefined;\n      var isCompositionChange = type === 'insertCompositionText' || type === 'deleteCompositionText'; // COMPAT: use composition change events as a hint to where we should insert\n      // composition text if we aren't composing to work around https://github.com/ianstormtaylor/slate/issues/5038\n\n      if (isCompositionChange && ReactEditor.isComposing(editor)) {\n        return;\n      }\n      var _native = false;\n      if (type === 'insertText' && selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(selection) &&\n      // Only use native character insertion for single characters a-z or space for now.\n      // Long-press events (hold a + press 4 = ä) to choose a special character otherwise\n      // causes duplicate inserts.\n      event.data && event.data.length === 1 && /[a-z ]/i.test(event.data) &&\n      // Chrome has issues correctly editing the start of nodes: https://bugs.chromium.org/p/chromium/issues/detail?id=1249405\n      // When there is an inline element, e.g. a link, and you select\n      // right after it (the start of the next node).\n      selection.anchor.offset !== 0) {\n        var _node$parentElement, _window$getComputedSt;\n        _native = true; // Skip native if there are marks, as\n        // `insertText` will insert a node, not just text.\n\n        if (editor.marks) {\n          _native = false;\n        } // Chrome also has issues correctly editing the end of anchor elements: https://bugs.chromium.org/p/chromium/issues/detail?id=1259100\n        // Therefore we don't allow native events to insert text at the end of anchor nodes.\n\n        var anchor = selection.anchor;\n        var _ReactEditor$toDOMPoi = ReactEditor.toDOMPoint(editor, anchor),\n          _ReactEditor$toDOMPoi2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_ReactEditor$toDOMPoi, 2),\n          node = _ReactEditor$toDOMPoi2[0],\n          offset = _ReactEditor$toDOMPoi2[1];\n        var anchorNode = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('a');\n        var window = ReactEditor.getWindow(editor);\n        if (_native && anchorNode && ReactEditor.hasDOMNode(editor, anchorNode)) {\n          var _lastText$textContent;\n\n          // Find the last text node inside the anchor.\n          var lastText = window === null || window === void 0 ? void 0 : window.document.createTreeWalker(anchorNode, NodeFilter.SHOW_TEXT).lastChild();\n          if (lastText === node && ((_lastText$textContent = lastText.textContent) === null || _lastText$textContent === void 0 ? void 0 : _lastText$textContent.length) === offset) {\n            _native = false;\n          }\n        } // Chrome has issues with the presence of tab characters inside elements with whiteSpace = 'pre'\n        // causing abnormal insert behavior: https://bugs.chromium.org/p/chromium/issues/detail?id=1219139\n\n        if (_native && node.parentElement && (window === null || window === void 0 ? void 0 : (_window$getComputedSt = window.getComputedStyle(node.parentElement)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.whiteSpace) === 'pre') {\n          var _context24;\n          var block = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.above(editor, {\n            at: anchor.path,\n            match: function match(n) {\n              return slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(n) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isBlock(editor, n);\n            }\n          });\n          if (block && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_23___default()(_context24 = slate__WEBPACK_IMPORTED_MODULE_50__.Node.string(block[0])).call(_context24, '\\t')) {\n            _native = false;\n          }\n        }\n      } // COMPAT: For the deleting forward/backward input types we don't want\n      // to change the selection because it is the range that will be deleted,\n      // and those commands determine that for themselves.\n\n      if (!_babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(type).call(type, 'delete') || _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(type).call(type, 'deleteBy')) {\n        var _event$getTargetRange3 = event.getTargetRanges(),\n          _event$getTargetRange4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_event$getTargetRange3, 1),\n          targetRange = _event$getTargetRange4[0];\n        if (targetRange) {\n          var range = ReactEditor.toSlateRange(editor, targetRange, {\n            exactMatch: false,\n            suppressThrow: false\n          });\n          if (!selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(selection, range)) {\n            _native = false;\n            var selectionRef = !isCompositionChange && editor.selection && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.rangeRef(editor, editor.selection);\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, range);\n            if (selectionRef) {\n              EDITOR_TO_USER_SELECTION.set(editor, selectionRef);\n            }\n          }\n        }\n      } // Composition change types occur while a user is composing text and can't be\n      // cancelled. Let them through and wait for the composition to end.\n\n      if (isCompositionChange) {\n        return;\n      }\n      if (!_native) {\n        event.preventDefault();\n      } // COMPAT: If the selection is expanded, even if the command seems like\n      // a delete forward/backward command it should delete the selection.\n\n      if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection) && _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_24___default()(type).call(type, 'delete')) {\n        var direction = _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default()(type).call(type, 'Backward') ? 'backward' : 'forward';\n        slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n          direction: direction\n        });\n        return;\n      }\n      switch (type) {\n        case 'deleteByComposition':\n        case 'deleteByCut':\n        case 'deleteByDrag':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor);\n            break;\n          }\n        case 'deleteContent':\n        case 'deleteContentForward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor);\n            break;\n          }\n        case 'deleteContentBackward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor);\n            break;\n          }\n        case 'deleteEntireSoftLine':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'line'\n            });\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'line'\n            });\n            break;\n          }\n        case 'deleteHardLineBackward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'block'\n            });\n            break;\n          }\n        case 'deleteSoftLineBackward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'line'\n            });\n            break;\n          }\n        case 'deleteHardLineForward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'block'\n            });\n            break;\n          }\n        case 'deleteSoftLineForward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'line'\n            });\n            break;\n          }\n        case 'deleteWordBackward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n              unit: 'word'\n            });\n            break;\n          }\n        case 'deleteWordForward':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n              unit: 'word'\n            });\n            break;\n          }\n        case 'insertLineBreak':\n          slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertSoftBreak(editor);\n          break;\n        case 'insertParagraph':\n          {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertBreak(editor);\n            break;\n          }\n        case 'insertFromComposition':\n        case 'insertFromDrop':\n        case 'insertFromPaste':\n        case 'insertFromYank':\n        case 'insertReplacementText':\n        case 'insertText':\n          {\n            if (type === 'insertFromComposition') {\n              // COMPAT: in Safari, `compositionend` is dispatched after the\n              // `beforeinput` for \"insertFromComposition\". But if we wait for it\n              // then we will abort because we're still composing and the selection\n              // won't be updated properly.\n              // https://www.w3.org/TR/input-events-2/\n              if (ReactEditor.isComposing(editor)) {\n                setIsComposing(false);\n                IS_COMPOSING.set(editor, false);\n              }\n            } // use a weak comparison instead of 'instanceof' to allow\n            // programmatic access of paste events coming from external windows\n            // like cypress where cy.window does not work realibly\n\n            if ((data === null || data === void 0 ? void 0 : data.constructor.name) === 'DataTransfer') {\n              ReactEditor.insertData(editor, data);\n            } else if (typeof data === 'string') {\n              // Only insertText operations use the native functionality, for now.\n              // Potentially expand to single character deletes, as well.\n              if (_native) {\n                deferredOperations.current.push(function () {\n                  return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, data);\n                });\n              } else {\n                slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, data);\n              }\n            }\n            break;\n          }\n      } // Restore the actual user section if nothing manually set it.\n\n      var toRestore = (_EDITOR_TO_USER_SELEC = EDITOR_TO_USER_SELECTION.get(editor)) === null || _EDITOR_TO_USER_SELEC === void 0 ? void 0 : _EDITOR_TO_USER_SELEC.unref();\n      EDITOR_TO_USER_SELECTION.delete(editor);\n      if (toRestore && (!editor.selection || !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(editor.selection, toRestore))) {\n        slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, toRestore);\n      }\n    }\n  }, [editor, onDOMSelectionChange, onUserInput, propsOnDOMBeforeInput, readOnly, scheduleOnDOMSelectionChange]);\n  var callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (node) {\n    if (node == null) {\n      onDOMSelectionChange.cancel();\n      scheduleOnDOMSelectionChange.cancel();\n      EDITOR_TO_ELEMENT.delete(editor);\n      NODE_TO_ELEMENT.delete(editor);\n      if (ref.current && HAS_BEFORE_INPUT_SUPPORT) {\n        // @ts-ignore The `beforeinput` event isn't recognized.\n        ref.current.removeEventListener('beforeinput', onDOMBeforeInput);\n      }\n    } else {\n      // Attach a native DOM event handler for `beforeinput` events, because React's\n      // built-in `onBeforeInput` is actually a leaky polyfill that doesn't expose\n      // real `beforeinput` events sadly... (2019/11/04)\n      // https://github.com/facebook/react/issues/11211\n      if (HAS_BEFORE_INPUT_SUPPORT) {\n        // @ts-ignore The `beforeinput` event isn't recognized.\n        node.addEventListener('beforeinput', onDOMBeforeInput);\n      }\n    }\n    ref.current = node;\n  }, [onDOMSelectionChange, scheduleOnDOMSelectionChange, editor, onDOMBeforeInput]); // Attach a native DOM event handler for `selectionchange`, because React's\n  // built-in `onSelect` handler doesn't fire for all selection changes. It's a\n  // leaky polyfill that only fires on keypresses or clicks. Instead, we want to\n  // fire for any change to the selection inside the editor. (2019/11/04)\n  // https://github.com/facebook/react/issues/5785\n\n  useIsomorphicLayoutEffect(function () {\n    var window = ReactEditor.getWindow(editor);\n    window.document.addEventListener('selectionchange', scheduleOnDOMSelectionChange);\n    return function () {\n      window.document.removeEventListener('selectionchange', scheduleOnDOMSelectionChange);\n    };\n  }, [scheduleOnDOMSelectionChange]);\n  var decorations = decorate([editor, []]);\n  var showPlaceholder = placeholder && editor.children.length === 1 && _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(slate__WEBPACK_IMPORTED_MODULE_50__.Node.texts(editor)).length === 1 && slate__WEBPACK_IMPORTED_MODULE_50__.Node.string(editor) === '' && !isComposing;\n  var placeHolderResizeHandler = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (placeholderEl) {\n    if (placeholderEl && showPlaceholder) {\n      var _placeholderEl$getBou;\n      setPlaceholderHeight((_placeholderEl$getBou = placeholderEl.getBoundingClientRect()) === null || _placeholderEl$getBou === void 0 ? void 0 : _placeholderEl$getBou.height);\n    } else {\n      setPlaceholderHeight(undefined);\n    }\n  }, [showPlaceholder]);\n  if (showPlaceholder) {\n    var start = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.start(editor, []);\n    decorations.push((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, PLACEHOLDER_SYMBOL, true), \"placeholder\", placeholder), \"onPlaceholderResize\", placeHolderResizeHandler), \"anchor\", start), \"focus\", start));\n  }\n  var marks = editor.marks;\n  state.hasMarkPlaceholder = false;\n  if (editor.selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(editor.selection) && marks) {\n    var anchor = editor.selection.anchor;\n    var leaf = slate__WEBPACK_IMPORTED_MODULE_50__.Node.leaf(editor, anchor.path);\n    var rest = _objectWithoutProperties(leaf, _excluded2); // While marks isn't a 'complete' text, we can still use loose Text.equals\n    // here which only compares marks anyway.\n\n    if (!slate__WEBPACK_IMPORTED_MODULE_50__.Text.equals(leaf, marks, {\n      loose: true\n    })) {\n      var _context25;\n      state.hasMarkPlaceholder = true;\n      var unset = _babel_runtime_corejs3_core_js_stable_object_from_entries__WEBPACK_IMPORTED_MODULE_39___default()(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_40___default()(_context25 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(rest)).call(_context25, function (mark) {\n        return [mark, null];\n      }));\n      decorations.push(_objectSpread$1(_objectSpread$1(_objectSpread$1((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, MARK_PLACEHOLDER_SYMBOL, true), unset), marks), {}, {\n        anchor: anchor,\n        focus: anchor\n      }));\n    }\n  } // Update EDITOR_TO_MARK_PLACEHOLDER_MARKS in setTimeout useEffect to ensure we don't set it\n  // before we receive the composition end event.\n\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_33___default()(function () {\n      var selection = editor.selection;\n      if (selection) {\n        var _anchor = selection.anchor;\n        var _text = slate__WEBPACK_IMPORTED_MODULE_50__.Node.leaf(editor, _anchor.path); // While marks isn't a 'complete' text, we can still use loose Text.equals\n        // here which only compares marks anyway.\n\n        if (marks && !slate__WEBPACK_IMPORTED_MODULE_50__.Text.equals(_text, marks, {\n          loose: true\n        })) {\n          EDITOR_TO_PENDING_INSERTION_MARKS.set(editor, marks);\n          return;\n        }\n      }\n      EDITOR_TO_PENDING_INSERTION_MARKS.delete(editor);\n    });\n  });\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(ReadOnlyContext.Provider, {\n    value: readOnly\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(DecorateContext.Provider, {\n    value: decorate\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(RestoreDOM, {\n    node: ref,\n    receivedUserInput: receivedUserInput\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(Component, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n    role: readOnly ? undefined : 'textbox',\n    \"aria-multiline\": readOnly ? undefined : true\n  }, attributes, {\n    // COMPAT: Certain browsers don't support the `beforeinput` event, so we'd\n    // have to use hacks to make these replacement-based features work.\n    // For SSR situations HAS_BEFORE_INPUT_SUPPORT is false and results in prop\n    // mismatch warning app moves to browser. Pass-through consumer props when\n    // not CAN_USE_DOM (SSR) and default to falsy value\n    spellCheck: HAS_BEFORE_INPUT_SUPPORT || !CAN_USE_DOM ? attributes.spellCheck : false,\n    autoCorrect: HAS_BEFORE_INPUT_SUPPORT || !CAN_USE_DOM ? attributes.autoCorrect : 'false',\n    autoCapitalize: HAS_BEFORE_INPUT_SUPPORT || !CAN_USE_DOM ? attributes.autoCapitalize : 'false',\n    \"data-slate-editor\": true,\n    \"data-slate-node\": \"value\",\n    // explicitly set this\n    contentEditable: !readOnly,\n    // in some cases, a decoration needs access to the range / selection to decorate a text node,\n    // then you will select the whole text node when you select part the of text\n    // this magic zIndex=\"-1\" will fix it\n    zindex: -1,\n    suppressContentEditableWarning: true,\n    ref: callbackRef,\n    style: _objectSpread$1(_objectSpread$1({}, disableDefaultStyles ? {} : _objectSpread$1({\n      // Allow positioning relative to the editable element.\n      position: 'relative',\n      // Preserve adjacent whitespace and new lines.\n      whiteSpace: 'pre-wrap',\n      // Allow words to break if they are too long.\n      wordWrap: 'break-word'\n    }, placeholderHeight ? {\n      minHeight: placeholderHeight\n    } : {})), userStyle),\n    onBeforeInput: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n      // fall back to React's leaky polyfill instead just for it. It\n      // only works for the `insertText` input type.\n      if (!HAS_BEFORE_INPUT_SUPPORT && !readOnly && !isEventHandled(event, attributes.onBeforeInput) && ReactEditor.hasSelectableTarget(editor, event.target)) {\n        event.preventDefault();\n        if (!ReactEditor.isComposing(editor)) {\n          var _text2 = event.data;\n          slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, _text2);\n        }\n      }\n    }, [attributes.onBeforeInput, editor, readOnly]),\n    onInput: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (isEventHandled(event, attributes.onInput)) {\n        return;\n      }\n      if (androidInputManagerRef.current) {\n        androidInputManagerRef.current.handleInput();\n        return;\n      } // Flush native operations, as native events will have propogated\n      // and we can correctly compare DOM text values in components\n      // to stop rendering, so that browser functions like autocorrect\n      // and spellcheck work as expected.\n      var _iterator4 = _createForOfIteratorHelper(deferredOperations.current),\n        _step4;\n      try {\n        for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n          var op = _step4.value;\n          op();\n        }\n      } catch (err) {\n        _iterator4.e(err);\n      } finally {\n        _iterator4.f();\n      }\n      deferredOperations.current = [];\n    }, [attributes.onInput]),\n    onBlur: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (readOnly || state.isUpdatingSelection || !ReactEditor.hasSelectableTarget(editor, event.target) || isEventHandled(event, attributes.onBlur)) {\n        return;\n      } // COMPAT: If the current `activeElement` is still the previous\n      // one, this is due to the window being blurred when the tab\n      // itself becomes unfocused, so we want to abort early to allow to\n      // editor to stay focused when the tab becomes focused again.\n\n      var root = ReactEditor.findDocumentOrShadowRoot(editor);\n      if (state.latestElement === root.activeElement) {\n        return;\n      }\n      var relatedTarget = event.relatedTarget;\n      var el = ReactEditor.toDOMNode(editor, editor); // COMPAT: The event should be ignored if the focus is returning\n      // to the editor from an embedded editable element (eg. an <input>\n      // element inside a void node).\n\n      if (relatedTarget === el) {\n        return;\n      } // COMPAT: The event should be ignored if the focus is moving from\n      // the editor to inside a void node's spacer element.\n\n      if (isDOMElement(relatedTarget) && relatedTarget.hasAttribute('data-slate-spacer')) {\n        return;\n      } // COMPAT: The event should be ignored if the focus is moving to a\n      // non- editable section of an element that isn't a void node (eg.\n      // a list item of the check list example).\n\n      if (relatedTarget != null && isDOMNode(relatedTarget) && ReactEditor.hasDOMNode(editor, relatedTarget)) {\n        var node = ReactEditor.toSlateNode(editor, relatedTarget);\n        if (slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(node) && !editor.isVoid(node)) {\n          return;\n        }\n      } // COMPAT: Safari doesn't always remove the selection even if the content-\n      // editable element no longer has focus. Refer to:\n      // https://stackoverflow.com/questions/12353247/force-contenteditable-div-to-stop-accepting-input-after-it-loses-focus-under-web\n\n      if (IS_WEBKIT) {\n        var domSelection = root.getSelection();\n        domSelection === null || domSelection === void 0 ? void 0 : domSelection.removeAllRanges();\n      }\n      IS_FOCUSED.delete(editor);\n    }, [readOnly, state.isUpdatingSelection, state.latestElement, editor, attributes.onBlur]),\n    onClick: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (ReactEditor.hasTarget(editor, event.target) && !isEventHandled(event, attributes.onClick) && isDOMNode(event.target)) {\n        var node = ReactEditor.toSlateNode(editor, event.target);\n        var path = ReactEditor.findPath(editor, node); // At this time, the Slate document may be arbitrarily different,\n        // because onClick handlers can change the document before we get here.\n        // Therefore we must check that this path actually exists,\n        // and that it still refers to the same node.\n\n        if (!slate__WEBPACK_IMPORTED_MODULE_50__.Editor.hasPath(editor, path) || slate__WEBPACK_IMPORTED_MODULE_50__.Node.get(editor, path) !== node) {\n          return;\n        }\n        if (event.detail === TRIPLE_CLICK && path.length >= 1) {\n          var blockPath = path;\n          if (!(slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(node) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isBlock(editor, node))) {\n            var _block$;\n            var block = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.above(editor, {\n              match: function match(n) {\n                return slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(n) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isBlock(editor, n);\n              },\n              at: path\n            });\n            blockPath = (_block$ = block === null || block === void 0 ? void 0 : block[1]) !== null && _block$ !== void 0 ? _block$ : _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, 0, 1);\n          }\n          var range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, blockPath);\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, range);\n          return;\n        }\n        if (readOnly) {\n          return;\n        }\n        var _start = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.start(editor, path);\n        var end = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.end(editor, path);\n        var startVoid = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(editor, {\n          at: _start\n        });\n        var endVoid = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(editor, {\n          at: end\n        });\n        if (startVoid && endVoid && slate__WEBPACK_IMPORTED_MODULE_50__.Path.equals(startVoid[1], endVoid[1])) {\n          var _range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, _start);\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, _range);\n        }\n      }\n    }, [editor, attributes.onClick, readOnly]),\n    onCompositionEnd: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (ReactEditor.hasSelectableTarget(editor, event.target)) {\n        var _androidInputManagerR3;\n        if (ReactEditor.isComposing(editor)) {\n          setIsComposing(false);\n          IS_COMPOSING.set(editor, false);\n        }\n        (_androidInputManagerR3 = androidInputManagerRef.current) === null || _androidInputManagerR3 === void 0 ? void 0 : _androidInputManagerR3.handleCompositionEnd(event);\n        if (isEventHandled(event, attributes.onCompositionEnd) || IS_ANDROID) {\n          return;\n        } // COMPAT: In Chrome, `beforeinput` events for compositions\n        // aren't correct and never fire the \"insertFromComposition\"\n        // type that we need. So instead, insert whenever a composition\n        // ends since it will already have been committed to the DOM.\n\n        if (!IS_WEBKIT && !IS_FIREFOX_LEGACY && !IS_IOS && !IS_WECHATBROWSER && !IS_UC_MOBILE && event.data) {\n          var placeholderMarks = EDITOR_TO_PENDING_INSERTION_MARKS.get(editor);\n          EDITOR_TO_PENDING_INSERTION_MARKS.delete(editor); // Ensure we insert text with the marks the user was actually seeing\n\n          if (placeholderMarks !== undefined) {\n            EDITOR_TO_USER_MARKS.set(editor, editor.marks);\n            editor.marks = placeholderMarks;\n          }\n          slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertText(editor, event.data);\n          var userMarks = EDITOR_TO_USER_MARKS.get(editor);\n          EDITOR_TO_USER_MARKS.delete(editor);\n          if (userMarks !== undefined) {\n            editor.marks = userMarks;\n          }\n        }\n      }\n    }, [attributes.onCompositionEnd, editor]),\n    onCompositionUpdate: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (ReactEditor.hasSelectableTarget(editor, event.target) && !isEventHandled(event, attributes.onCompositionUpdate)) {\n        if (!ReactEditor.isComposing(editor)) {\n          setIsComposing(true);\n          IS_COMPOSING.set(editor, true);\n        }\n      }\n    }, [attributes.onCompositionUpdate, editor]),\n    onCompositionStart: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (ReactEditor.hasSelectableTarget(editor, event.target)) {\n        var _androidInputManagerR4;\n        (_androidInputManagerR4 = androidInputManagerRef.current) === null || _androidInputManagerR4 === void 0 ? void 0 : _androidInputManagerR4.handleCompositionStart(event);\n        if (isEventHandled(event, attributes.onCompositionStart) || IS_ANDROID) {\n          return;\n        }\n        setIsComposing(true);\n        var selection = editor.selection;\n        if (selection) {\n          if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor);\n            return;\n          }\n          var inline = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.above(editor, {\n            match: function match(n) {\n              return slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(n) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isInline(editor, n);\n            },\n            mode: 'highest'\n          });\n          if (inline) {\n            var _inline = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(inline, 2),\n              inlinePath = _inline[1];\n            if (slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isEnd(editor, selection.anchor, inlinePath)) {\n              var point = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.after(editor, inlinePath);\n              slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.setSelection(editor, {\n                anchor: point,\n                focus: point\n              });\n            }\n          }\n        }\n      }\n    }, [attributes.onCompositionStart, editor]),\n    onCopy: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (ReactEditor.hasSelectableTarget(editor, event.target) && !isEventHandled(event, attributes.onCopy) && !isDOMEventTargetInput(event)) {\n        event.preventDefault();\n        ReactEditor.setFragmentData(editor, event.clipboardData, 'copy');\n      }\n    }, [attributes.onCopy, editor]),\n    onCut: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && ReactEditor.hasSelectableTarget(editor, event.target) && !isEventHandled(event, attributes.onCut) && !isDOMEventTargetInput(event)) {\n        event.preventDefault();\n        ReactEditor.setFragmentData(editor, event.clipboardData, 'cut');\n        var selection = editor.selection;\n        if (selection) {\n          if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor);\n          } else {\n            var node = slate__WEBPACK_IMPORTED_MODULE_50__.Node.parent(editor, selection.anchor.path);\n            if (slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, node)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.delete(editor);\n            }\n          }\n        }\n      }\n    }, [readOnly, editor, attributes.onCut]),\n    onDragOver: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (ReactEditor.hasTarget(editor, event.target) && !isEventHandled(event, attributes.onDragOver)) {\n        // Only when the target is void, call `preventDefault` to signal\n        // that drops are allowed. Editable content is droppable by\n        // default, and calling `preventDefault` hides the cursor.\n        var node = ReactEditor.toSlateNode(editor, event.target);\n        if (slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(node) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, node)) {\n          event.preventDefault();\n        }\n      }\n    }, [attributes.onDragOver, editor]),\n    onDragStart: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && ReactEditor.hasTarget(editor, event.target) && !isEventHandled(event, attributes.onDragStart)) {\n        var node = ReactEditor.toSlateNode(editor, event.target);\n        var path = ReactEditor.findPath(editor, node);\n        var voidMatch = slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(node) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, node) || slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(editor, {\n          at: path,\n          voids: true\n        }); // If starting a drag on a void node, make sure it is selected\n        // so that it shows up in the selection's fragment.\n\n        if (voidMatch) {\n          var range = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, path);\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, range);\n        }\n        state.isDraggingInternally = true;\n        ReactEditor.setFragmentData(editor, event.dataTransfer, 'drag');\n      }\n    }, [readOnly, editor, attributes.onDragStart, state]),\n    onDrop: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && ReactEditor.hasTarget(editor, event.target) && !isEventHandled(event, attributes.onDrop)) {\n        event.preventDefault(); // Keep a reference to the dragged range before updating selection\n\n        var draggedRange = editor.selection; // Find the range where the drop happened\n\n        var range = ReactEditor.findEventRange(editor, event);\n        var data = event.dataTransfer;\n        slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.select(editor, range);\n        if (state.isDraggingInternally) {\n          if (draggedRange && !slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(draggedRange, range) && !slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(editor, {\n            at: range,\n            voids: true\n          })) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.delete(editor, {\n              at: draggedRange\n            });\n          }\n        }\n        ReactEditor.insertData(editor, data); // When dragging from another source into the editor, it's possible\n        // that the current editor does not have focus.\n\n        if (!ReactEditor.isFocused(editor)) {\n          ReactEditor.focus(editor);\n        }\n      }\n      state.isDraggingInternally = false;\n    }, [readOnly, editor, attributes.onDrop, state]),\n    onDragEnd: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && state.isDraggingInternally && attributes.onDragEnd && ReactEditor.hasTarget(editor, event.target)) {\n        attributes.onDragEnd(event);\n      } // When dropping on a different droppable element than the current editor,\n      // `onDrop` is not called. So we need to clean up in `onDragEnd` instead.\n      // Note: `onDragEnd` is only called when `onDrop` is not called\n\n      state.isDraggingInternally = false;\n    }, [readOnly, state, attributes, editor]),\n    onFocus: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && !state.isUpdatingSelection && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onFocus)) {\n        var el = ReactEditor.toDOMNode(editor, editor);\n        var root = ReactEditor.findDocumentOrShadowRoot(editor);\n        state.latestElement = root.activeElement; // COMPAT: If the editor has nested editable elements, the focus\n        // can go to them. In Firefox, this must be prevented because it\n        // results in issues with keyboard navigation. (2017/03/30)\n\n        if (IS_FIREFOX && event.target !== el) {\n          el.focus();\n          return;\n        }\n        IS_FOCUSED.set(editor, true);\n      }\n    }, [readOnly, state, editor, attributes.onFocus]),\n    onKeyDown: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && ReactEditor.hasEditableTarget(editor, event.target)) {\n        var _androidInputManagerR5;\n        (_androidInputManagerR5 = androidInputManagerRef.current) === null || _androidInputManagerR5 === void 0 ? void 0 : _androidInputManagerR5.handleKeyDown(event);\n        var nativeEvent = event.nativeEvent; // COMPAT: The composition end event isn't fired reliably in all browsers,\n        // so we sometimes might end up stuck in a composition state even though we\n        // aren't composing any more.\n\n        if (ReactEditor.isComposing(editor) && nativeEvent.isComposing === false) {\n          IS_COMPOSING.set(editor, false);\n          setIsComposing(false);\n        }\n        if (isEventHandled(event, attributes.onKeyDown) || ReactEditor.isComposing(editor)) {\n          return;\n        }\n        var selection = editor.selection;\n        var element = editor.children[selection !== null ? selection.focus.path[0] : 0];\n        var isRTL = direction__WEBPACK_IMPORTED_MODULE_44___default()(slate__WEBPACK_IMPORTED_MODULE_50__.Node.string(element)) === 'rtl'; // COMPAT: Since we prevent the default behavior on\n        // `beforeinput` events, the browser doesn't think there's ever\n        // any history stack to undo or redo, so we have to manage these\n        // hotkeys ourselves. (2019/11/06)\n\n        if (Hotkeys.isRedo(nativeEvent)) {\n          event.preventDefault();\n          var maybeHistoryEditor = editor;\n          if (typeof maybeHistoryEditor.redo === 'function') {\n            maybeHistoryEditor.redo();\n          }\n          return;\n        }\n        if (Hotkeys.isUndo(nativeEvent)) {\n          event.preventDefault();\n          var _maybeHistoryEditor = editor;\n          if (typeof _maybeHistoryEditor.undo === 'function') {\n            _maybeHistoryEditor.undo();\n          }\n          return;\n        } // COMPAT: Certain browsers don't handle the selection updates\n        // properly. In Chrome, the selection isn't properly extended.\n        // And in Firefox, the selection isn't properly collapsed.\n        // (2017/10/17)\n\n        if (Hotkeys.isMoveLineBackward(nativeEvent)) {\n          event.preventDefault();\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n            unit: 'line',\n            reverse: true\n          });\n          return;\n        }\n        if (Hotkeys.isMoveLineForward(nativeEvent)) {\n          event.preventDefault();\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n            unit: 'line'\n          });\n          return;\n        }\n        if (Hotkeys.isExtendLineBackward(nativeEvent)) {\n          event.preventDefault();\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n            unit: 'line',\n            edge: 'focus',\n            reverse: true\n          });\n          return;\n        }\n        if (Hotkeys.isExtendLineForward(nativeEvent)) {\n          event.preventDefault();\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n            unit: 'line',\n            edge: 'focus'\n          });\n          return;\n        } // COMPAT: If a void node is selected, or a zero-width text node\n        // adjacent to an inline is selected, we need to handle these\n        // hotkeys manually because browsers won't be able to skip over\n        // the void node with the zero-width space not being an empty\n        // string.\n\n        if (Hotkeys.isMoveBackward(nativeEvent)) {\n          event.preventDefault();\n          if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(selection)) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n              reverse: !isRTL\n            });\n          } else {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.collapse(editor, {\n              edge: 'start'\n            });\n          }\n          return;\n        }\n        if (Hotkeys.isMoveForward(nativeEvent)) {\n          event.preventDefault();\n          if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(selection)) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n              reverse: isRTL\n            });\n          } else {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.collapse(editor, {\n              edge: 'end'\n            });\n          }\n          return;\n        }\n        if (Hotkeys.isMoveWordBackward(nativeEvent)) {\n          event.preventDefault();\n          if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.collapse(editor, {\n              edge: 'focus'\n            });\n          }\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n            unit: 'word',\n            reverse: !isRTL\n          });\n          return;\n        }\n        if (Hotkeys.isMoveWordForward(nativeEvent)) {\n          event.preventDefault();\n          if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.collapse(editor, {\n              edge: 'focus'\n            });\n          }\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.move(editor, {\n            unit: 'word',\n            reverse: isRTL\n          });\n          return;\n        } // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n        // fall back to guessing at the input intention for hotkeys.\n        // COMPAT: In iOS, some of these hotkeys are handled in the\n\n        if (!HAS_BEFORE_INPUT_SUPPORT) {\n          // We don't have a core behavior for these, but they change the\n          // DOM if we don't prevent them, so we have to.\n          if (Hotkeys.isBold(nativeEvent) || Hotkeys.isItalic(nativeEvent) || Hotkeys.isTransposeCharacter(nativeEvent)) {\n            event.preventDefault();\n            return;\n          }\n          if (Hotkeys.isSoftBreak(nativeEvent)) {\n            event.preventDefault();\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertSoftBreak(editor);\n            return;\n          }\n          if (Hotkeys.isSplitBlock(nativeEvent)) {\n            event.preventDefault();\n            slate__WEBPACK_IMPORTED_MODULE_50__.Editor.insertBreak(editor);\n            return;\n          }\n          if (Hotkeys.isDeleteBackward(nativeEvent)) {\n            event.preventDefault();\n            if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n                direction: 'backward'\n              });\n            } else {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor);\n            }\n            return;\n          }\n          if (Hotkeys.isDeleteForward(nativeEvent)) {\n            event.preventDefault();\n            if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n                direction: 'forward'\n              });\n            } else {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor);\n            }\n            return;\n          }\n          if (Hotkeys.isDeleteLineBackward(nativeEvent)) {\n            event.preventDefault();\n            if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n                direction: 'backward'\n              });\n            } else {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n                unit: 'line'\n              });\n            }\n            return;\n          }\n          if (Hotkeys.isDeleteLineForward(nativeEvent)) {\n            event.preventDefault();\n            if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n                direction: 'forward'\n              });\n            } else {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n                unit: 'line'\n              });\n            }\n            return;\n          }\n          if (Hotkeys.isDeleteWordBackward(nativeEvent)) {\n            event.preventDefault();\n            if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n                direction: 'backward'\n              });\n            } else {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n                unit: 'word'\n              });\n            }\n            return;\n          }\n          if (Hotkeys.isDeleteWordForward(nativeEvent)) {\n            event.preventDefault();\n            if (selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isExpanded(selection)) {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteFragment(editor, {\n                direction: 'forward'\n              });\n            } else {\n              slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteForward(editor, {\n                unit: 'word'\n              });\n            }\n            return;\n          }\n        } else {\n          if (IS_CHROME || IS_WEBKIT) {\n            // COMPAT: Chrome and Safari support `beforeinput` event but do not fire\n            // an event when deleting backwards in a selected void inline node\n            if (selection && (Hotkeys.isDeleteBackward(nativeEvent) || Hotkeys.isDeleteForward(nativeEvent)) && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(selection)) {\n              var currentNode = slate__WEBPACK_IMPORTED_MODULE_50__.Node.parent(editor, selection.anchor.path);\n              if (slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(currentNode) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isVoid(editor, currentNode) && (slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isInline(editor, currentNode) || slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isBlock(editor, currentNode))) {\n                event.preventDefault();\n                slate__WEBPACK_IMPORTED_MODULE_50__.Editor.deleteBackward(editor, {\n                  unit: 'block'\n                });\n                return;\n              }\n            }\n          }\n        }\n      }\n    }, [readOnly, editor, attributes.onKeyDown]),\n    onPaste: (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (event) {\n      if (!readOnly && ReactEditor.hasEditableTarget(editor, event.target) && !isEventHandled(event, attributes.onPaste)) {\n        // COMPAT: Certain browsers don't support the `beforeinput` event, so we\n        // fall back to React's `onPaste` here instead.\n        // COMPAT: Firefox, Chrome and Safari don't emit `beforeinput` events\n        // when \"paste without formatting\" is used, so fallback. (2020/02/20)\n        // COMPAT: Safari InputEvents generated by pasting won't include\n        // application/x-slate-fragment items, so use the\n        // ClipboardEvent here. (2023/03/15)\n        if (!HAS_BEFORE_INPUT_SUPPORT || isPlainTextOnlyPaste(event.nativeEvent) || IS_WEBKIT) {\n          event.preventDefault();\n          ReactEditor.insertData(editor, event.clipboardData);\n        }\n      }\n    }, [readOnly, editor, attributes.onPaste])\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(Children, {\n    decorations: decorations,\n    node: editor,\n    renderElement: renderElement,\n    renderPlaceholder: renderPlaceholder,\n    renderLeaf: renderLeaf,\n    selection: editor.selection\n  })))));\n};\n/**\n * The default placeholder element\n */\n\nvar DefaultPlaceholder = function DefaultPlaceholder(_ref) {\n  var attributes = _ref.attributes,\n    children = _ref.children;\n  return /*#__PURE__*/(\n    // COMPAT: Artificially add a line-break to the end on the placeholder element\n    // to prevent Android IMEs to pick up its content in autocorrect and to auto-capitalize the first letter\n    react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"span\", (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, attributes), children, IS_ANDROID && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(\"br\", null))\n  );\n};\n/**\n * A default memoized decorate function.\n */\n\nvar defaultDecorate = function defaultDecorate() {\n  return [];\n};\n/**\n * A default implement to scroll dom range into view.\n */\n\nvar defaultScrollSelectionIntoView = function defaultScrollSelectionIntoView(editor, domRange) {\n  // This was affecting the selection of multiple blocks and dragging behavior,\n  // so enabled only if the selection has been collapsed.\n  if (domRange.getBoundingClientRect && (!editor.selection || editor.selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(editor.selection))) {\n    var _context26;\n    var leafEl = domRange.startContainer.parentElement;\n    leafEl.getBoundingClientRect = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_41___default()(_context26 = domRange.getBoundingClientRect).call(_context26, domRange);\n    (0,scroll_into_view_if_needed__WEBPACK_IMPORTED_MODULE_51__[\"default\"])(leafEl, {\n      scrollMode: 'if-needed'\n    }); // @ts-expect-error an unorthodox delete D:\n\n    delete leafEl.getBoundingClientRect;\n  }\n};\n/**\n * Check if an event is overrided by a handler.\n */\n\nvar isEventHandled = function isEventHandled(event, handler) {\n  if (!handler) {\n    return false;\n  } // The custom event handler may return a boolean to specify whether the event\n  // shall be treated as being handled or not.\n\n  var shouldTreatEventAsHandled = handler(event);\n  if (shouldTreatEventAsHandled != null) {\n    return shouldTreatEventAsHandled;\n  }\n  return event.isDefaultPrevented() || event.isPropagationStopped();\n};\n/**\n * Check if the event's target is an input element\n */\n\nvar isDOMEventTargetInput = function isDOMEventTargetInput(event) {\n  return isDOMNode(event.target) && (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement);\n};\n/**\n * Check if a DOM event is overrided by a handler.\n */\n\nvar isDOMEventHandled = function isDOMEventHandled(event, handler) {\n  if (!handler) {\n    return false;\n  } // The custom event handler may return a boolean to specify whether the event\n  // shall be treated as being handled or not.\n\n  var shouldTreatEventAsHandled = handler(event);\n  if (shouldTreatEventAsHandled != null) {\n    return shouldTreatEventAsHandled;\n  }\n  return event.defaultPrevented;\n};\n\n/**\n * A React context for sharing the `focused` state of the editor.\n */\n\nvar FocusedContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)(false);\n/**\n * Get the current `focused` state of the editor.\n */\n\nvar useFocused = function useFocused() {\n  return (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(FocusedContext);\n};\nfunction isError(error) {\n  return error instanceof Error;\n}\n/**\n * A React context for sharing the editor selector context in a way to control rerenders\n */\n\nvar SlateSelectorContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_47__.createContext)({});\nvar refEquality = function refEquality(a, b) {\n  return a === b;\n};\n/**\n * use redux style selectors to prevent rerendering on every keystroke.\n * Bear in mind rerendering can only prevented if the returned value is a value type or for reference types (e.g. objects and arrays) add a custom equality function.\n *\n * Example:\n * ```\n *  const isSelectionActive = useSlateSelector(editor => Boolean(editor.selection));\n * ```\n */\n\nfunction useSlateSelector(selector) {\n  var equalityFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : refEquality;\n  var _useReducer3 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useReducer)(function (s) {\n      return s + 1;\n    }, 0),\n    _useReducer4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useReducer3, 2),\n    forceRender = _useReducer4[1];\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(SlateSelectorContext);\n  if (!context) {\n    throw new Error(\"The `useSlateSelector` hook must be used inside the <Slate> component's context.\");\n  }\n  var getSlate = context.getSlate,\n    addEventListener = context.addEventListener;\n  var latestSubscriptionCallbackError = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)();\n  var latestSelector = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(function () {\n    return null;\n  });\n  var latestSelectedState = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)(null);\n  var selectedState;\n  try {\n    if (selector !== latestSelector.current || latestSubscriptionCallbackError.current) {\n      selectedState = selector(getSlate());\n    } else {\n      selectedState = latestSelectedState.current;\n    }\n  } catch (err) {\n    if (latestSubscriptionCallbackError.current && isError(err)) {\n      err.message += \"\\nThe error may be correlated with this previous error:\\n\".concat(latestSubscriptionCallbackError.current.stack, \"\\n\\n\");\n    }\n    throw err;\n  }\n  useIsomorphicLayoutEffect(function () {\n    latestSelector.current = selector;\n    latestSelectedState.current = selectedState;\n    latestSubscriptionCallbackError.current = undefined;\n  });\n  useIsomorphicLayoutEffect(function () {\n    function checkForUpdates() {\n      try {\n        var newSelectedState = latestSelector.current(getSlate());\n        if (equalityFn(newSelectedState, latestSelectedState.current)) {\n          return;\n        }\n        latestSelectedState.current = newSelectedState;\n      } catch (err) {\n        // we ignore all errors here, since when the component\n        // is re-rendered, the selectors are called again, and\n        // will throw again, if neither props nor store state\n        // changed\n        latestSubscriptionCallbackError.current = err;\n      }\n      forceRender();\n    }\n    var unsubscribe = addEventListener(checkForUpdates);\n    checkForUpdates();\n    return function () {\n      return unsubscribe();\n    };\n  },\n  // don't rerender on equalityFn change since we want to be able to define it inline\n  [addEventListener, getSlate]);\n  return selectedState;\n}\n/**\n * Create selector context with editor updating on every editor change\n */\n\nfunction useSelectorContext(editor) {\n  var eventListeners = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)([]).current;\n  var slateRef = (0,react__WEBPACK_IMPORTED_MODULE_47__.useRef)({\n    editor: editor\n  }).current;\n  var onChange = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function (editor) {\n    slateRef.editor = editor;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(eventListeners).call(eventListeners, function (listener) {\n      return listener(editor);\n    });\n  }, [eventListeners, slateRef]);\n  var selectorContext = (0,react__WEBPACK_IMPORTED_MODULE_47__.useMemo)(function () {\n    return {\n      getSlate: function getSlate() {\n        return slateRef.editor;\n      },\n      addEventListener: function addEventListener(callback) {\n        eventListeners.push(callback);\n        return function () {\n          _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_35___default()(eventListeners).call(eventListeners, _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_17___default()(eventListeners).call(eventListeners, callback), 1);\n        };\n      }\n    };\n  }, [eventListeners, slateRef]);\n  return {\n    selectorContext: selectorContext,\n    onChange: onChange\n  };\n}\nvar _excluded = [\"editor\", \"children\", \"onChange\", \"value\"];\n/**\n * A wrapper around the provider to handle `onChange` events, because the editor\n * is a mutable singleton so it won't ever register as \"changed\" otherwise.\n */\n\nvar Slate = function Slate(props) {\n  var editor = props.editor,\n    children = props.children,\n    onChange = props.onChange,\n    value = props.value,\n    rest = _objectWithoutProperties(props, _excluded);\n  var _React$useState = react__WEBPACK_IMPORTED_MODULE_47___default().useState(function () {\n      if (!slate__WEBPACK_IMPORTED_MODULE_50__.Node.isNodeList(value)) {\n        throw new Error(\"[Slate] initialValue is invalid! Expected a list of elements but got: \".concat(slate__WEBPACK_IMPORTED_MODULE_50__.Scrubber.stringify(value)));\n      }\n      if (!slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isEditor(editor)) {\n        throw new Error(\"[Slate] editor is invalid! You passed: \".concat(slate__WEBPACK_IMPORTED_MODULE_50__.Scrubber.stringify(editor)));\n      }\n      editor.children = value;\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(editor, rest);\n      return {\n        v: 0,\n        editor: editor\n      };\n    }),\n    _React$useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_React$useState, 2),\n    context = _React$useState2[0],\n    setContext = _React$useState2[1];\n  var _useSelectorContext = useSelectorContext(editor),\n    selectorContext = _useSelectorContext.selectorContext,\n    handleSelectorChange = _useSelectorContext.onChange;\n  var onContextChange = (0,react__WEBPACK_IMPORTED_MODULE_47__.useCallback)(function () {\n    if (onChange) {\n      onChange(editor.children);\n    }\n    setContext(function (prevContext) {\n      return {\n        v: prevContext.v + 1,\n        editor: editor\n      };\n    });\n    handleSelectorChange(editor);\n  }, [editor, handleSelectorChange, onChange]);\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    EDITOR_TO_ON_CHANGE.set(editor, onContextChange);\n    return function () {\n      EDITOR_TO_ON_CHANGE.set(editor, function () {});\n    };\n  }, [editor, onContextChange]);\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_47__.useState)(ReactEditor.isFocused(editor)),\n    _useState14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState13, 2),\n    isFocused = _useState14[0],\n    setIsFocused = _useState14[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_47__.useEffect)(function () {\n    setIsFocused(ReactEditor.isFocused(editor));\n  }, [editor]);\n  useIsomorphicLayoutEffect(function () {\n    var fn = function fn() {\n      return setIsFocused(ReactEditor.isFocused(editor));\n    };\n    if (REACT_MAJOR_VERSION >= 17) {\n      // In React >= 17 onFocus and onBlur listen to the focusin and focusout events during the bubbling phase.\n      // Therefore in order for <Editable />'s handlers to run first, which is necessary for ReactEditor.isFocused(editor)\n      // to return the correct value, we have to listen to the focusin and focusout events without useCapture here.\n      document.addEventListener('focusin', fn);\n      document.addEventListener('focusout', fn);\n      return function () {\n        document.removeEventListener('focusin', fn);\n        document.removeEventListener('focusout', fn);\n      };\n    } else {\n      document.addEventListener('focus', fn, true);\n      document.addEventListener('blur', fn, true);\n      return function () {\n        document.removeEventListener('focus', fn, true);\n        document.removeEventListener('blur', fn, true);\n      };\n    }\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(SlateSelectorContext.Provider, {\n    value: selectorContext\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(SlateContext.Provider, {\n    value: context\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(EditorContext.Provider, {\n    value: context.editor\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_47___default().createElement(FocusedContext.Provider, {\n    value: isFocused\n  }, children))));\n};\n\n/**\n * Get the current editor object from the React context.\n * @deprecated Use useSlateStatic instead.\n */\n\nvar useEditor = function useEditor() {\n  var editor = (0,react__WEBPACK_IMPORTED_MODULE_47__.useContext)(EditorContext);\n  if (!editor) {\n    throw new Error(\"The `useEditor` hook must be used inside the <Slate> component's context.\");\n  }\n  return editor;\n};\n\n/**\n * Get the current slate selection.\n * Only triggers a rerender when the selection actually changes\n */\n\nvar useSlateSelection = function useSlateSelection() {\n  return useSlateSelector(function (editor) {\n    return editor.selection;\n  }, isSelectionEqual);\n};\nvar isSelectionEqual = function isSelectionEqual(a, b) {\n  if (!a && !b) return true;\n  if (!a || !b) return false;\n  return slate__WEBPACK_IMPORTED_MODULE_50__.Range.equals(a, b);\n};\n\n/**\n * Utilities for single-line deletion\n */\n\nvar doRectsIntersect = function doRectsIntersect(rect, compareRect) {\n  var middle = (compareRect.top + compareRect.bottom) / 2;\n  return rect.top <= middle && rect.bottom >= middle;\n};\nvar areRangesSameLine = function areRangesSameLine(editor, range1, range2) {\n  var rect1 = ReactEditor.toDOMRange(editor, range1).getBoundingClientRect();\n  var rect2 = ReactEditor.toDOMRange(editor, range2).getBoundingClientRect();\n  return doRectsIntersect(rect1, rect2) && doRectsIntersect(rect2, rect1);\n};\n/**\n * A helper utility that returns the end portion of a `Range`\n * which is located on a single line.\n *\n * @param {Editor} editor The editor object to compare against\n * @param {Range} parentRange The parent range to compare against\n * @returns {Range} A valid portion of the parentRange which is one a single line\n */\n\nvar findCurrentLineRange = function findCurrentLineRange(editor, parentRange) {\n  var parentRangeBoundary = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, slate__WEBPACK_IMPORTED_MODULE_50__.Range.end(parentRange));\n  var positions = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(slate__WEBPACK_IMPORTED_MODULE_50__.Editor.positions(editor, {\n    at: parentRange\n  }));\n  var left = 0;\n  var right = positions.length;\n  var middle = Math.floor(right / 2);\n  if (areRangesSameLine(editor, slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, positions[left]), parentRangeBoundary)) {\n    return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, positions[left], parentRangeBoundary);\n  }\n  if (positions.length < 2) {\n    return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, positions[positions.length - 1], parentRangeBoundary);\n  }\n  while (middle !== positions.length && middle !== left) {\n    if (areRangesSameLine(editor, slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, positions[middle]), parentRangeBoundary)) {\n      right = middle;\n    } else {\n      left = middle;\n    }\n    middle = Math.floor((left + right) / 2);\n  }\n  return slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(editor, positions[right], parentRangeBoundary);\n};\nfunction ownKeys(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_16___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_18___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context27;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context27 = ownKeys(Object(source), true)).call(_context27, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_32___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_31___default()(source));\n    } else {\n      var _context28;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context28 = ownKeys(Object(source))).call(_context28, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_15___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_30___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\n/**\n * `withReact` adds React and DOM specific behaviors to the editor.\n *\n * If you are using TypeScript, you must extend Slate's CustomTypes to use\n * this plugin.\n *\n * See https://docs.slatejs.org/concepts/11-typescript to learn how.\n */\n\nvar withReact = function withReact(editor) {\n  var clipboardFormatKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x-slate-fragment';\n  var e = editor;\n  var apply = e.apply,\n    onChange = e.onChange,\n    deleteBackward = e.deleteBackward,\n    addMark = e.addMark,\n    removeMark = e.removeMark; // The WeakMap which maps a key to a specific HTMLElement must be scoped to the editor instance to\n  // avoid collisions between editors in the DOM that share the same value.\n\n  EDITOR_TO_KEY_TO_ELEMENT.set(e, new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())());\n  e.addMark = function (key, value) {\n    var _EDITOR_TO_SCHEDULE_F, _EDITOR_TO_PENDING_DI;\n    (_EDITOR_TO_SCHEDULE_F = EDITOR_TO_SCHEDULE_FLUSH.get(e)) === null || _EDITOR_TO_SCHEDULE_F === void 0 ? void 0 : _EDITOR_TO_SCHEDULE_F();\n    if (!EDITOR_TO_PENDING_INSERTION_MARKS.get(e) && (_EDITOR_TO_PENDING_DI = EDITOR_TO_PENDING_DIFFS.get(e)) !== null && _EDITOR_TO_PENDING_DI !== void 0 && _EDITOR_TO_PENDING_DI.length) {\n      // Ensure the current pending diffs originating from changes before the addMark\n      // are applied with the current formatting\n      EDITOR_TO_PENDING_INSERTION_MARKS.set(e, null);\n    }\n    EDITOR_TO_USER_MARKS.delete(e);\n    addMark(key, value);\n  };\n  e.removeMark = function (key) {\n    var _EDITOR_TO_PENDING_DI2;\n    if (!EDITOR_TO_PENDING_INSERTION_MARKS.get(e) && (_EDITOR_TO_PENDING_DI2 = EDITOR_TO_PENDING_DIFFS.get(e)) !== null && _EDITOR_TO_PENDING_DI2 !== void 0 && _EDITOR_TO_PENDING_DI2.length) {\n      // Ensure the current pending diffs originating from changes before the addMark\n      // are applied with the current formatting\n      EDITOR_TO_PENDING_INSERTION_MARKS.set(e, null);\n    }\n    EDITOR_TO_USER_MARKS.delete(e);\n    removeMark(key);\n  };\n  e.deleteBackward = function (unit) {\n    if (unit !== 'line') {\n      return deleteBackward(unit);\n    }\n    if (e.selection && slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(e.selection)) {\n      var parentBlockEntry = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.above(e, {\n        match: function match(n) {\n          return slate__WEBPACK_IMPORTED_MODULE_50__.Element.isElement(n) && slate__WEBPACK_IMPORTED_MODULE_50__.Editor.isBlock(e, n);\n        },\n        at: e.selection\n      });\n      if (parentBlockEntry) {\n        var _parentBlockEntry = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(parentBlockEntry, 2),\n          parentBlockPath = _parentBlockEntry[1];\n        var parentElementRange = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.range(e, parentBlockPath, e.selection.anchor);\n        var currentLineRange = findCurrentLineRange(e, parentElementRange);\n        if (!slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(currentLineRange)) {\n          slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.delete(e, {\n            at: currentLineRange\n          });\n        }\n      }\n    }\n  }; // This attempts to reset the NODE_TO_KEY entry to the correct value\n  // as apply() changes the object reference and hence invalidates the NODE_TO_KEY entry\n\n  e.apply = function (op) {\n    var matches = [];\n    var pendingDiffs = EDITOR_TO_PENDING_DIFFS.get(e);\n    if (pendingDiffs !== null && pendingDiffs !== void 0 && pendingDiffs.length) {\n      var _context29;\n      var transformed = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_29___default()(_context29 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_40___default()(pendingDiffs).call(pendingDiffs, function (textDiff) {\n        return transformTextDiff(textDiff, op);\n      })).call(_context29, Boolean);\n      EDITOR_TO_PENDING_DIFFS.set(e, transformed);\n    }\n    var pendingSelection = EDITOR_TO_PENDING_SELECTION.get(e);\n    if (pendingSelection) {\n      EDITOR_TO_PENDING_SELECTION.set(e, transformPendingRange(e, pendingSelection, op));\n    }\n    var pendingAction = EDITOR_TO_PENDING_ACTION.get(e);\n    if (pendingAction !== null && pendingAction !== void 0 && pendingAction.at) {\n      var at = slate__WEBPACK_IMPORTED_MODULE_50__.Point.isPoint(pendingAction === null || pendingAction === void 0 ? void 0 : pendingAction.at) ? transformPendingPoint(e, pendingAction.at, op) : transformPendingRange(e, pendingAction.at, op);\n      EDITOR_TO_PENDING_ACTION.set(e, at ? _objectSpread(_objectSpread({}, pendingAction), {}, {\n        at: at\n      }) : null);\n    }\n    switch (op.type) {\n      case 'insert_text':\n      case 'remove_text':\n      case 'set_node':\n      case 'split_node':\n        {\n          matches.push.apply(matches, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(getMatches(e, op.path)));\n          break;\n        }\n      case 'set_selection':\n        {\n          var _EDITOR_TO_USER_SELEC;\n\n          // Selection was manually set, don't restore the user selection after the change.\n          (_EDITOR_TO_USER_SELEC = EDITOR_TO_USER_SELECTION.get(e)) === null || _EDITOR_TO_USER_SELEC === void 0 ? void 0 : _EDITOR_TO_USER_SELEC.unref();\n          EDITOR_TO_USER_SELECTION.delete(e);\n          break;\n        }\n      case 'insert_node':\n      case 'remove_node':\n        {\n          matches.push.apply(matches, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(getMatches(e, slate__WEBPACK_IMPORTED_MODULE_50__.Path.parent(op.path))));\n          break;\n        }\n      case 'merge_node':\n        {\n          var prevPath = slate__WEBPACK_IMPORTED_MODULE_50__.Path.previous(op.path);\n          matches.push.apply(matches, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(getMatches(e, prevPath)));\n          break;\n        }\n      case 'move_node':\n        {\n          var commonPath = slate__WEBPACK_IMPORTED_MODULE_50__.Path.common(slate__WEBPACK_IMPORTED_MODULE_50__.Path.parent(op.path), slate__WEBPACK_IMPORTED_MODULE_50__.Path.parent(op.newPath));\n          matches.push.apply(matches, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(getMatches(e, commonPath)));\n          break;\n        }\n    }\n    apply(op);\n    for (var _i2 = 0, _matches = matches; _i2 < _matches.length; _i2++) {\n      var _matches$_i = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_matches[_i2], 2),\n        path = _matches$_i[0],\n        key = _matches$_i[1];\n      var _Editor$node3 = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.node(e, path),\n        _Editor$node4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Editor$node3, 1),\n        node = _Editor$node4[0];\n      NODE_TO_KEY.set(node, key);\n    }\n  };\n  e.setFragmentData = function (data) {\n    var _context30, _context32;\n    var selection = e.selection;\n    if (!selection) {\n      return;\n    }\n    var _Range$edges7 = slate__WEBPACK_IMPORTED_MODULE_50__.Range.edges(selection),\n      _Range$edges8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_Range$edges7, 2),\n      start = _Range$edges8[0],\n      end = _Range$edges8[1];\n    var startVoid = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(e, {\n      at: start.path\n    });\n    var endVoid = slate__WEBPACK_IMPORTED_MODULE_50__.Editor.void(e, {\n      at: end.path\n    });\n    if (slate__WEBPACK_IMPORTED_MODULE_50__.Range.isCollapsed(selection) && !startVoid) {\n      return;\n    } // Create a fake selection so that we can add a Base64-encoded copy of the\n    // fragment to the HTML, to decode on future pastes.\n\n    var domRange = ReactEditor.toDOMRange(e, selection);\n    var contents = domRange.cloneContents();\n    var attach = contents.childNodes[0]; // Make sure attach is non-empty, since empty nodes will not get copied.\n\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context30 = contents.childNodes).call(_context30, function (node) {\n      var _context31;\n      if (node.textContent && _babel_runtime_corejs3_core_js_stable_instance_trim__WEBPACK_IMPORTED_MODULE_42___default()(_context31 = node.textContent).call(_context31) !== '') {\n        attach = node;\n      }\n    }); // COMPAT: If the end node is a void node, we need to move the end of the\n    // range from the void node's spacer span, to the end of the void node's\n    // content, since the spacer is before void's content in the DOM.\n\n    if (endVoid) {\n      var _endVoid = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(endVoid, 1),\n        voidNode = _endVoid[0];\n      var r = domRange.cloneRange();\n      var domNode = ReactEditor.toDOMNode(e, voidNode);\n      r.setEndAfter(domNode);\n      contents = r.cloneContents();\n    } // COMPAT: If the start node is a void node, we need to attach the encoded\n    // fragment to the void node's content node instead of the spacer, because\n    // attaching it to empty `<div>/<span>` nodes will end up having it erased by\n    // most browsers. (2018/04/27)\n\n    if (startVoid) {\n      attach = contents.querySelector('[data-slate-spacer]');\n    } // Remove any zero-width space spans from the cloned DOM so that they don't\n    // show up elsewhere when pasted.\n\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_26___default()(_context32 = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_14___default()(contents.querySelectorAll('[data-slate-zero-width]'))).call(_context32, function (zw) {\n      var isNewline = zw.getAttribute('data-slate-zero-width') === 'n';\n      zw.textContent = isNewline ? '\\n' : '';\n    }); // Set a `data-slate-fragment` attribute on a non-empty node, so it shows up\n    // in the HTML, and can be used for intra-Slate pasting. If it's a text\n    // node, wrap it in a `<span>` so we have something to set an attribute on.\n\n    if (isDOMText(attach)) {\n      var span = attach.ownerDocument.createElement('span'); // COMPAT: In Chrome and Safari, if we don't add the `white-space` style\n      // then leading and trailing spaces will be ignored. (2017/09/21)\n\n      span.style.whiteSpace = 'pre';\n      span.appendChild(attach);\n      contents.appendChild(span);\n      attach = span;\n    }\n    var fragment = e.getFragment();\n    var string = _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_43___default()(fragment);\n    var encoded = window.btoa(encodeURIComponent(string));\n    attach.setAttribute('data-slate-fragment', encoded);\n    data.setData(\"application/\".concat(clipboardFormatKey), encoded); // Add the content to a <div> so that we can get its inner HTML.\n\n    var div = contents.ownerDocument.createElement('div');\n    div.appendChild(contents);\n    div.setAttribute('hidden', 'true');\n    contents.ownerDocument.body.appendChild(div);\n    data.setData('text/html', div.innerHTML);\n    data.setData('text/plain', getPlainText(div));\n    contents.ownerDocument.body.removeChild(div);\n    return data;\n  };\n  e.insertData = function (data) {\n    if (!e.insertFragmentData(data)) {\n      e.insertTextData(data);\n    }\n  };\n  e.insertFragmentData = function (data) {\n    /**\n     * Checking copied fragment from application/x-slate-fragment or data-slate-fragment\n     */\n    var fragment = data.getData(\"application/\".concat(clipboardFormatKey)) || getSlateFragmentAttribute(data);\n    if (fragment) {\n      var decoded = decodeURIComponent(window.atob(fragment));\n      var parsed = JSON.parse(decoded);\n      e.insertFragment(parsed);\n      return true;\n    }\n    return false;\n  };\n  e.insertTextData = function (data) {\n    var text = data.getData('text/plain');\n    if (text) {\n      var lines = text.split(/\\r\\n|\\r|\\n/);\n      var split = false;\n      var _iterator5 = _createForOfIteratorHelper(lines),\n        _step5;\n      try {\n        for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n          var line = _step5.value;\n          if (split) {\n            slate__WEBPACK_IMPORTED_MODULE_50__.Transforms.splitNodes(e, {\n              always: true\n            });\n          }\n          e.insertText(line);\n          split = true;\n        }\n      } catch (err) {\n        _iterator5.e(err);\n      } finally {\n        _iterator5.f();\n      }\n      return true;\n    }\n    return false;\n  };\n  e.onChange = function (options) {\n    // COMPAT: React < 18 doesn't batch `setState` hook calls, which means\n    // that the children and selection can get out of sync for one render\n    // pass. So we have to use this unstable API to ensure it batches them.\n    // (2019/12/03)\n    // https://github.com/facebook/react/issues/14259#issuecomment-439702367\n    var maybeBatchUpdates = REACT_MAJOR_VERSION < 18 ? (react_dom__WEBPACK_IMPORTED_MODULE_49___default().unstable_batchedUpdates) : function (callback) {\n      return callback();\n    };\n    maybeBatchUpdates(function () {\n      var onContextChange = EDITOR_TO_ON_CHANGE.get(e);\n      if (onContextChange) {\n        onContextChange();\n      }\n      onChange(options);\n    });\n  };\n  return e;\n};\nvar getMatches = function getMatches(e, path) {\n  var matches = [];\n  var _iterator6 = _createForOfIteratorHelper(slate__WEBPACK_IMPORTED_MODULE_50__.Editor.levels(e, {\n      at: path\n    })),\n    _step6;\n  try {\n    for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n      var _step6$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_step6.value, 2),\n        n = _step6$value[0],\n        p = _step6$value[1];\n      var key = ReactEditor.findKey(e, n);\n      matches.push([p, key]);\n    }\n  } catch (err) {\n    _iterator6.e(err);\n  } finally {\n    _iterator6.f();\n  }\n  return matches;\n};\n\n\n//# sourceURL=webpack://print-designer/./src/components/common/slate-react.ts?");

/***/ }),

/***/ 29496:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   Editor: function() { return /* binding */ Editor; },\n/* harmony export */   Element: function() { return /* binding */ Element; },\n/* harmony export */   Location: function() { return /* binding */ Location; },\n/* harmony export */   Node: function() { return /* binding */ Node; },\n/* harmony export */   Operation: function() { return /* binding */ Operation; },\n/* harmony export */   Path: function() { return /* binding */ Path; },\n/* harmony export */   PathRef: function() { return /* binding */ PathRef; },\n/* harmony export */   Point: function() { return /* binding */ Point; },\n/* harmony export */   PointRef: function() { return /* binding */ PointRef; },\n/* harmony export */   Range: function() { return /* binding */ Range; },\n/* harmony export */   RangeRef: function() { return /* binding */ RangeRef; },\n/* harmony export */   Scrubber: function() { return /* binding */ Scrubber; },\n/* harmony export */   Span: function() { return /* binding */ Span; },\n/* harmony export */   Text: function() { return /* binding */ Text; },\n/* harmony export */   Transforms: function() { return /* binding */ Transforms; },\n/* harmony export */   above: function() { return /* binding */ above; },\n/* harmony export */   addMark: function() { return /* binding */ addMark; },\n/* harmony export */   after: function() { return /* binding */ after; },\n/* harmony export */   apply: function() { return /* binding */ apply; },\n/* harmony export */   before: function() { return /* binding */ before; },\n/* harmony export */   collapse: function() { return /* binding */ collapse; },\n/* harmony export */   createEditor: function() { return /* binding */ createEditor; },\n/* harmony export */   deleteBackward: function() { return /* binding */ deleteBackward; },\n/* harmony export */   deleteForward: function() { return /* binding */ deleteForward; },\n/* harmony export */   deleteFragment: function() { return /* binding */ deleteFragment; },\n/* harmony export */   deleteText: function() { return /* binding */ deleteText; },\n/* harmony export */   deselect: function() { return /* binding */ deselect; },\n/* harmony export */   edges: function() { return /* binding */ edges; },\n/* harmony export */   elementReadOnly: function() { return /* binding */ elementReadOnly; },\n/* harmony export */   end: function() { return /* binding */ end; },\n/* harmony export */   first: function() { return /* binding */ first; },\n/* harmony export */   fragment: function() { return /* binding */ fragment; },\n/* harmony export */   getDirtyPaths: function() { return /* binding */ getDirtyPaths; },\n/* harmony export */   getFragment: function() { return /* binding */ getFragment; },\n/* harmony export */   getVoid: function() { return /* binding */ getVoid; },\n/* harmony export */   hasBlocks: function() { return /* binding */ hasBlocks; },\n/* harmony export */   hasInlines: function() { return /* binding */ hasInlines; },\n/* harmony export */   hasPath: function() { return /* binding */ hasPath; },\n/* harmony export */   hasTexts: function() { return /* binding */ hasTexts; },\n/* harmony export */   insertBreak: function() { return /* binding */ insertBreak; },\n/* harmony export */   insertFragment: function() { return /* binding */ insertFragment; },\n/* harmony export */   insertNode: function() { return /* binding */ insertNode; },\n/* harmony export */   insertNodes: function() { return /* binding */ insertNodes; },\n/* harmony export */   insertSoftBreak: function() { return /* binding */ insertSoftBreak; },\n/* harmony export */   insertText: function() { return /* binding */ insertText; },\n/* harmony export */   isBlock: function() { return /* binding */ isBlock; },\n/* harmony export */   isEdge: function() { return /* binding */ isEdge; },\n/* harmony export */   isEditor: function() { return /* binding */ _isEditor; },\n/* harmony export */   isEmpty: function() { return /* binding */ isEmpty; },\n/* harmony export */   isEnd: function() { return /* binding */ isEnd; },\n/* harmony export */   isNormalizing: function() { return /* binding */ isNormalizing; },\n/* harmony export */   isStart: function() { return /* binding */ isStart; },\n/* harmony export */   last: function() { return /* binding */ last; },\n/* harmony export */   leaf: function() { return /* binding */ leaf; },\n/* harmony export */   levels: function() { return /* binding */ levels; },\n/* harmony export */   liftNodes: function() { return /* binding */ liftNodes; },\n/* harmony export */   marks: function() { return /* binding */ marks; },\n/* harmony export */   mergeNodes: function() { return /* binding */ mergeNodes; },\n/* harmony export */   move: function() { return /* binding */ move; },\n/* harmony export */   moveNodes: function() { return /* binding */ moveNodes; },\n/* harmony export */   next: function() { return /* binding */ next; },\n/* harmony export */   node: function() { return /* binding */ node; },\n/* harmony export */   nodes: function() { return /* binding */ nodes; },\n/* harmony export */   normalize: function() { return /* binding */ normalize; },\n/* harmony export */   normalizeNode: function() { return /* binding */ normalizeNode; },\n/* harmony export */   parent: function() { return /* binding */ parent; },\n/* harmony export */   path: function() { return /* binding */ path; },\n/* harmony export */   pathRef: function() { return /* binding */ pathRef; },\n/* harmony export */   pathRefs: function() { return /* binding */ pathRefs; },\n/* harmony export */   point: function() { return /* binding */ point; },\n/* harmony export */   pointRef: function() { return /* binding */ pointRef; },\n/* harmony export */   pointRefs: function() { return /* binding */ pointRefs; },\n/* harmony export */   positions: function() { return /* binding */ positions; },\n/* harmony export */   previous: function() { return /* binding */ previous; },\n/* harmony export */   range: function() { return /* binding */ range; },\n/* harmony export */   rangeRef: function() { return /* binding */ rangeRef; },\n/* harmony export */   rangeRefs: function() { return /* binding */ rangeRefs; },\n/* harmony export */   removeMark: function() { return /* binding */ removeMark; },\n/* harmony export */   removeNodes: function() { return /* binding */ removeNodes; },\n/* harmony export */   select: function() { return /* binding */ select; },\n/* harmony export */   setNodes: function() { return /* binding */ setNodes; },\n/* harmony export */   setNormalizing: function() { return /* binding */ setNormalizing; },\n/* harmony export */   setPoint: function() { return /* binding */ setPoint; },\n/* harmony export */   setSelection: function() { return /* binding */ setSelection; },\n/* harmony export */   shouldNormalize: function() { return /* binding */ shouldNormalize; },\n/* harmony export */   splitNodes: function() { return /* binding */ splitNodes; },\n/* harmony export */   start: function() { return /* binding */ start; },\n/* harmony export */   string: function() { return /* binding */ string; },\n/* harmony export */   unhangRange: function() { return /* binding */ unhangRange; },\n/* harmony export */   unsetNodes: function() { return /* binding */ unsetNodes; },\n/* harmony export */   unwrapNodes: function() { return /* binding */ unwrapNodes; },\n/* harmony export */   withoutNormalizing: function() { return /* binding */ withoutNormalizing; },\n/* harmony export */   wrapNodes: function() { return /* binding */ wrapNodes; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85344);\n/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(89472);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96416);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(30479);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(11872);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(73400);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_code_point_at__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(53684);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_code_point_at__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_code_point_at__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(2992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(30856);\n/* harmony import */ var is_plain_object__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(is_plain_object__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(83789);\n\n\n\n\n\n\nvar _marked = /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(levels),\n  _marked2 = /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(nodes),\n  _marked3 = /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(positions);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_0___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_1___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context180; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context180 = Object.prototype.toString.call(o)).call(_context180, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar PathRef = {\n  transform: function transform(ref, op) {\n    var current = ref.current,\n      affinity = ref.affinity;\n    if (current == null) {\n      return;\n    }\n    var path = Path.transform(current, op, {\n      affinity: affinity\n    });\n    ref.current = path;\n    if (path == null) {\n      ref.unref();\n    }\n  }\n};\nvar PointRef = {\n  transform: function transform(ref, op) {\n    var current = ref.current,\n      affinity = ref.affinity;\n    if (current == null) {\n      return;\n    }\n    var point = Point.transform(current, op, {\n      affinity: affinity\n    });\n    ref.current = point;\n    if (point == null) {\n      ref.unref();\n    }\n  }\n};\nvar RangeRef = {\n  transform: function transform(ref, op) {\n    var current = ref.current,\n      affinity = ref.affinity;\n    if (current == null) {\n      return;\n    }\n    var path = Range.transform(current, op, {\n      affinity: affinity\n    });\n    ref.current = path;\n    if (path == null) {\n      ref.unref();\n    }\n  }\n};\nvar DIRTY_PATHS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar DIRTY_PATH_KEYS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar FLUSHING = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar NORMALIZING = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar PATH_REFS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar POINT_REFS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar RANGE_REFS = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\n\n// eslint-disable-next-line no-redeclare\nvar Path = {\n  ancestors: function ancestors(path) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var _options$reverse = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options),\n      reverse = _options$reverse === void 0 ? false : _options$reverse;\n    var paths = Path.levels(path, options);\n    if (reverse) {\n      paths = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(paths).call(paths, 1);\n    } else {\n      paths = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(paths).call(paths, 0, -1);\n    }\n    return paths;\n  },\n  common: function common(path, another) {\n    var common = [];\n    for (var i = 0; i < path.length && i < another.length; i++) {\n      var av = path[i];\n      var bv = another[i];\n      if (av !== bv) {\n        break;\n      }\n      common.push(av);\n    }\n    return common;\n  },\n  compare: function compare(path, another) {\n    var min = Math.min(path.length, another.length);\n    for (var i = 0; i < min; i++) {\n      if (path[i] < another[i]) return -1;\n      if (path[i] > another[i]) return 1;\n    }\n    return 0;\n  },\n  endsAfter: function endsAfter(path, another) {\n    var i = path.length - 1;\n    var as = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, i);\n    var bs = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(another).call(another, 0, i);\n    var av = path[i];\n    var bv = another[i];\n    return Path.equals(as, bs) && av > bv;\n  },\n  endsAt: function endsAt(path, another) {\n    var i = path.length;\n    var as = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, i);\n    var bs = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(another).call(another, 0, i);\n    return Path.equals(as, bs);\n  },\n  endsBefore: function endsBefore(path, another) {\n    var i = path.length - 1;\n    var as = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, i);\n    var bs = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(another).call(another, 0, i);\n    var av = path[i];\n    var bv = another[i];\n    return Path.equals(as, bs) && av < bv;\n  },\n  equals: function equals(path, another) {\n    return path.length === another.length && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(path).call(path, function (n, i) {\n      return n === another[i];\n    });\n  },\n  hasPrevious: function hasPrevious(path) {\n    return path[path.length - 1] > 0;\n  },\n  isAfter: function isAfter(path, another) {\n    return Path.compare(path, another) === 1;\n  },\n  isAncestor: function isAncestor(path, another) {\n    return path.length < another.length && Path.compare(path, another) === 0;\n  },\n  isBefore: function isBefore(path, another) {\n    return Path.compare(path, another) === -1;\n  },\n  isChild: function isChild(path, another) {\n    return path.length === another.length + 1 && Path.compare(path, another) === 0;\n  },\n  isCommon: function isCommon(path, another) {\n    return path.length <= another.length && Path.compare(path, another) === 0;\n  },\n  isDescendant: function isDescendant(path, another) {\n    return path.length > another.length && Path.compare(path, another) === 0;\n  },\n  isParent: function isParent(path, another) {\n    return path.length + 1 === another.length && Path.compare(path, another) === 0;\n  },\n  isPath: function isPath(value) {\n    return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(value) && (value.length === 0 || typeof value[0] === 'number');\n  },\n  isSibling: function isSibling(path, another) {\n    if (path.length !== another.length) {\n      return false;\n    }\n    var as = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, -1);\n    var bs = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(another).call(another, 0, -1);\n    var al = path[path.length - 1];\n    var bl = another[another.length - 1];\n    return al !== bl && Path.equals(as, bs);\n  },\n  levels: function levels(path) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var _options$reverse2 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options),\n      reverse = _options$reverse2 === void 0 ? false : _options$reverse2;\n    var list = [];\n    for (var i = 0; i <= path.length; i++) {\n      list.push(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, i));\n    }\n    if (reverse) {\n      _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(list).call(list);\n    }\n    return list;\n  },\n  next: function next(path) {\n    var _context;\n    if (path.length === 0) {\n      throw new Error(\"Cannot get the next path of a root path [\".concat(path, \"], because it has no next index.\"));\n    }\n    var last = path[path.length - 1];\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, -1)).call(_context, last + 1);\n  },\n  operationCanTransformPath: function operationCanTransformPath(operation) {\n    switch (operation.type) {\n      case 'insert_node':\n      case 'remove_node':\n      case 'merge_node':\n      case 'split_node':\n      case 'move_node':\n        return true;\n      default:\n        return false;\n    }\n  },\n  parent: function parent(path) {\n    if (path.length === 0) {\n      throw new Error(\"Cannot get the parent path of the root path [\".concat(path, \"].\"));\n    }\n    return _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, -1);\n  },\n  previous: function previous(path) {\n    var _context2;\n    if (path.length === 0) {\n      throw new Error(\"Cannot get the previous path of a root path [\".concat(path, \"], because it has no previous index.\"));\n    }\n    var last = path[path.length - 1];\n    if (last <= 0) {\n      throw new Error(\"Cannot get the previous path of a first child path [\".concat(path, \"] because it would result in a negative index.\"));\n    }\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, 0, -1)).call(_context2, last - 1);\n  },\n  relative: function relative(path, ancestor) {\n    if (!Path.isAncestor(ancestor, path) && !Path.equals(path, ancestor)) {\n      var _context3;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context3 = \"Cannot get the relative path of [\".concat(path, \"] inside ancestor [\")).call(_context3, ancestor, \"], because it is not above or equal to the path.\"));\n    }\n    return _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path, ancestor.length);\n  },\n  transform: function transform(path, operation) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    if (!path) return null; // PERF: use destructing instead of immer\n\n    var p = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(path);\n    var _options$affinity = options.affinity,\n      affinity = _options$affinity === void 0 ? 'forward' : _options$affinity; // PERF: Exit early if the operation is guaranteed not to have an effect.\n\n    if (path.length === 0) {\n      return p;\n    }\n    switch (operation.type) {\n      case 'insert_node':\n        {\n          var op = operation.path;\n          if (Path.equals(op, p) || Path.endsBefore(op, p) || Path.isAncestor(op, p)) {\n            p[op.length - 1] += 1;\n          }\n          break;\n        }\n      case 'remove_node':\n        {\n          var _op = operation.path;\n          if (Path.equals(_op, p) || Path.isAncestor(_op, p)) {\n            return null;\n          } else if (Path.endsBefore(_op, p)) {\n            p[_op.length - 1] -= 1;\n          }\n          break;\n        }\n      case 'merge_node':\n        {\n          var _op2 = operation.path,\n            position = operation.position;\n          if (Path.equals(_op2, p) || Path.endsBefore(_op2, p)) {\n            p[_op2.length - 1] -= 1;\n          } else if (Path.isAncestor(_op2, p)) {\n            p[_op2.length - 1] -= 1;\n            p[_op2.length] += position;\n          }\n          break;\n        }\n      case 'split_node':\n        {\n          var _op3 = operation.path,\n            _position = operation.position;\n          if (Path.equals(_op3, p)) {\n            if (affinity === 'forward') {\n              p[p.length - 1] += 1;\n            } else if (affinity === 'backward') ;else {\n              return null;\n            }\n          } else if (Path.endsBefore(_op3, p)) {\n            p[_op3.length - 1] += 1;\n          } else if (Path.isAncestor(_op3, p) && path[_op3.length] >= _position) {\n            p[_op3.length - 1] += 1;\n            p[_op3.length] -= _position;\n          }\n          break;\n        }\n      case 'move_node':\n        {\n          var _op4 = operation.path,\n            onp = operation.newPath; // If the old and new path are the same, it's a no-op.\n\n          if (Path.equals(_op4, onp)) {\n            return p;\n          }\n          if (Path.isAncestor(_op4, p) || Path.equals(_op4, p)) {\n            var copy = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(onp).call(onp);\n            if (Path.endsBefore(_op4, onp) && _op4.length < onp.length) {\n              copy[_op4.length - 1] -= 1;\n            }\n            return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(copy).call(copy, _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(p).call(p, _op4.length));\n          } else if (Path.isSibling(_op4, onp) && (Path.isAncestor(onp, p) || Path.equals(onp, p))) {\n            if (Path.endsBefore(_op4, p)) {\n              p[_op4.length - 1] -= 1;\n            } else {\n              p[_op4.length - 1] += 1;\n            }\n          } else if (Path.endsBefore(onp, p) || Path.equals(onp, p) || Path.isAncestor(onp, p)) {\n            if (Path.endsBefore(_op4, p)) {\n              p[_op4.length - 1] -= 1;\n            }\n            p[onp.length - 1] += 1;\n          } else if (Path.endsBefore(_op4, p)) {\n            if (Path.equals(onp, p)) {\n              p[onp.length - 1] += 1;\n            }\n            p[_op4.length - 1] -= 1;\n          }\n          break;\n        }\n    }\n    return p;\n  }\n};\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nfunction ownKeys$e(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$e(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context4;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context4 = ownKeys$e(Object(source), true)).call(_context4, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context5;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context5 = ownKeys$e(Object(source))).call(_context5, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar applyToDraft = function applyToDraft(editor, selection, op) {\n  switch (op.type) {\n    case 'insert_node':\n      {\n        var _context6;\n        var path = op.path,\n          node = op.node;\n        var parent = Node.parent(editor, path);\n        var index = path[path.length - 1];\n        if (index > parent.children.length) {\n          throw new Error(\"Cannot apply an \\\"insert_node\\\" operation at path [\".concat(path, \"] because the destination is past the end of the node.\"));\n        }\n        _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context6 = parent.children).call(_context6, index, 0, node);\n        if (selection) {\n          var _iterator = _createForOfIteratorHelper(Range.points(selection)),\n            _step;\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var _step$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step.value, 2),\n                point = _step$value[0],\n                key = _step$value[1];\n              selection[key] = Point.transform(point, op);\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        }\n        break;\n      }\n    case 'insert_text':\n      {\n        var _context7, _context8;\n        var _path = op.path,\n          offset = op.offset,\n          text = op.text;\n        if (text.length === 0) break;\n        var _node = Node.leaf(editor, _path);\n        var before = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context7 = _node.text).call(_context7, 0, offset);\n        var after = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context8 = _node.text).call(_context8, offset);\n        _node.text = before + text + after;\n        if (selection) {\n          var _iterator2 = _createForOfIteratorHelper(Range.points(selection)),\n            _step2;\n          try {\n            for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n              var _step2$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step2.value, 2),\n                _point = _step2$value[0],\n                _key = _step2$value[1];\n              selection[_key] = Point.transform(_point, op);\n            }\n          } catch (err) {\n            _iterator2.e(err);\n          } finally {\n            _iterator2.f();\n          }\n        }\n        break;\n      }\n    case 'merge_node':\n      {\n        var _context11;\n        var _path2 = op.path;\n        var _node2 = Node.get(editor, _path2);\n        var prevPath = Path.previous(_path2);\n        var prev = Node.get(editor, prevPath);\n        var _parent = Node.parent(editor, _path2);\n        var _index = _path2[_path2.length - 1];\n        if (Text.isText(_node2) && Text.isText(prev)) {\n          prev.text += _node2.text;\n        } else if (!Text.isText(_node2) && !Text.isText(prev)) {\n          var _prev$children;\n          (_prev$children = prev.children).push.apply(_prev$children, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_node2.children));\n        } else {\n          var _context9, _context10;\n          throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context9 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context10 = \"Cannot apply a \\\"merge_node\\\" operation at path [\".concat(_path2, \"] to nodes of different interfaces: \")).call(_context10, Scrubber.stringify(_node2), \" \")).call(_context9, Scrubber.stringify(prev)));\n        }\n        _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context11 = _parent.children).call(_context11, _index, 1);\n        if (selection) {\n          var _iterator3 = _createForOfIteratorHelper(Range.points(selection)),\n            _step3;\n          try {\n            for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n              var _step3$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step3.value, 2),\n                _point2 = _step3$value[0],\n                _key2 = _step3$value[1];\n              selection[_key2] = Point.transform(_point2, op);\n            }\n          } catch (err) {\n            _iterator3.e(err);\n          } finally {\n            _iterator3.f();\n          }\n        }\n        break;\n      }\n    case 'move_node':\n      {\n        var _context13, _context14;\n        var _path3 = op.path,\n          newPath = op.newPath;\n        if (Path.isAncestor(_path3, newPath)) {\n          var _context12;\n          throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context12 = \"Cannot move a path [\".concat(_path3, \"] to new path [\")).call(_context12, newPath, \"] because the destination is inside itself.\"));\n        }\n        var _node3 = Node.get(editor, _path3);\n        var _parent2 = Node.parent(editor, _path3);\n        var _index2 = _path3[_path3.length - 1]; // This is tricky, but since the `path` and `newPath` both refer to\n        // the same snapshot in time, there's a mismatch. After either\n        // removing the original position, the second step's path can be out\n        // of date. So instead of using the `op.newPath` directly, we\n        // transform `op.path` to ascertain what the `newPath` would be after\n        // the operation was applied.\n\n        _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context13 = _parent2.children).call(_context13, _index2, 1);\n        var truePath = Path.transform(_path3, op);\n        var newParent = Node.get(editor, Path.parent(truePath));\n        var newIndex = truePath[truePath.length - 1];\n        _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context14 = newParent.children).call(_context14, newIndex, 0, _node3);\n        if (selection) {\n          var _iterator4 = _createForOfIteratorHelper(Range.points(selection)),\n            _step4;\n          try {\n            for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n              var _step4$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step4.value, 2),\n                _point3 = _step4$value[0],\n                _key3 = _step4$value[1];\n              selection[_key3] = Point.transform(_point3, op);\n            }\n          } catch (err) {\n            _iterator4.e(err);\n          } finally {\n            _iterator4.f();\n          }\n        }\n        break;\n      }\n    case 'remove_node':\n      {\n        var _context15;\n        var _path4 = op.path;\n        var _index3 = _path4[_path4.length - 1];\n        var _parent3 = Node.parent(editor, _path4);\n        _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context15 = _parent3.children).call(_context15, _index3, 1); // Transform all of the points in the value, but if the point was in the\n        // node that was removed we need to update the range or remove it.\n\n        if (selection) {\n          var _iterator5 = _createForOfIteratorHelper(Range.points(selection)),\n            _step5;\n          try {\n            for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n              var _step5$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step5.value, 2),\n                _point4 = _step5$value[0],\n                _key4 = _step5$value[1];\n              var result = Point.transform(_point4, op);\n              if (selection != null && result != null) {\n                selection[_key4] = result;\n              } else {\n                var _prev = void 0;\n                var next = void 0;\n                var _iterator6 = _createForOfIteratorHelper(Node.texts(editor)),\n                  _step6;\n                try {\n                  for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n                    var _step6$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step6.value, 2),\n                      n = _step6$value[0],\n                      p = _step6$value[1];\n                    if (Path.compare(p, _path4) === -1) {\n                      _prev = [n, p];\n                    } else {\n                      next = [n, p];\n                      break;\n                    }\n                  }\n                } catch (err) {\n                  _iterator6.e(err);\n                } finally {\n                  _iterator6.f();\n                }\n                var preferNext = false;\n                if (_prev && next) {\n                  if (Path.equals(next[1], _path4)) {\n                    preferNext = !Path.hasPrevious(next[1]);\n                  } else {\n                    preferNext = Path.common(_prev[1], _path4).length < Path.common(next[1], _path4).length;\n                  }\n                }\n                if (_prev && !preferNext) {\n                  _point4.path = _prev[1];\n                  _point4.offset = _prev[0].text.length;\n                } else if (next) {\n                  _point4.path = next[1];\n                  _point4.offset = 0;\n                } else {\n                  selection = null;\n                }\n              }\n            }\n          } catch (err) {\n            _iterator5.e(err);\n          } finally {\n            _iterator5.f();\n          }\n        }\n        break;\n      }\n    case 'remove_text':\n      {\n        var _context16, _context17;\n        var _path5 = op.path,\n          _offset = op.offset,\n          _text = op.text;\n        if (_text.length === 0) break;\n        var _node4 = Node.leaf(editor, _path5);\n        var _before = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context16 = _node4.text).call(_context16, 0, _offset);\n        var _after = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context17 = _node4.text).call(_context17, _offset + _text.length);\n        _node4.text = _before + _after;\n        if (selection) {\n          var _iterator7 = _createForOfIteratorHelper(Range.points(selection)),\n            _step7;\n          try {\n            for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n              var _step7$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step7.value, 2),\n                _point5 = _step7$value[0],\n                _key5 = _step7$value[1];\n              selection[_key5] = Point.transform(_point5, op);\n            }\n          } catch (err) {\n            _iterator7.e(err);\n          } finally {\n            _iterator7.f();\n          }\n        }\n        break;\n      }\n    case 'set_node':\n      {\n        var _path6 = op.path,\n          properties = op.properties,\n          newProperties = op.newProperties;\n        if (_path6.length === 0) {\n          throw new Error(\"Cannot set properties on the root node!\");\n        }\n        var _node5 = Node.get(editor, _path6);\n        for (var _key6 in newProperties) {\n          if (_key6 === 'children' || _key6 === 'text') {\n            throw new Error(\"Cannot set the \\\"\".concat(_key6, \"\\\" property of nodes!\"));\n          }\n          var value = newProperties[_key6];\n          if (value == null) {\n            delete _node5[_key6];\n          } else {\n            _node5[_key6] = value;\n          }\n        } // properties that were previously defined, but are now missing, must be deleted\n\n        for (var _key7 in properties) {\n          if (!newProperties.hasOwnProperty(_key7)) {\n            delete _node5[_key7];\n          }\n        }\n        break;\n      }\n    case 'set_selection':\n      {\n        var _newProperties = op.newProperties;\n        if (_newProperties == null) {\n          selection = _newProperties;\n        } else {\n          if (selection == null) {\n            if (!Range.isRange(_newProperties)) {\n              throw new Error(\"Cannot apply an incomplete \\\"set_selection\\\" operation properties \".concat(Scrubber.stringify(_newProperties), \" when there is no current selection.\"));\n            }\n            selection = _objectSpread$e({}, _newProperties);\n          }\n          for (var _key8 in _newProperties) {\n            var _value = _newProperties[_key8];\n            if (_value == null) {\n              if (_key8 === 'anchor' || _key8 === 'focus') {\n                throw new Error(\"Cannot remove the \\\"\".concat(_key8, \"\\\" selection property\"));\n              }\n              delete selection[_key8];\n            } else {\n              selection[_key8] = _value;\n            }\n          }\n        }\n        break;\n      }\n    case 'split_node':\n      {\n        var _context22;\n        var _path7 = op.path,\n          position = op.position,\n          _properties = op.properties;\n        if (_path7.length === 0) {\n          throw new Error(\"Cannot apply a \\\"split_node\\\" operation at path [\".concat(_path7, \"] because the root node cannot be split.\"));\n        }\n        var _node6 = Node.get(editor, _path7);\n        var _parent4 = Node.parent(editor, _path7);\n        var _index4 = _path7[_path7.length - 1];\n        var newNode;\n        if (Text.isText(_node6)) {\n          var _context18, _context19;\n          var _before2 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context18 = _node6.text).call(_context18, 0, position);\n          var _after2 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context19 = _node6.text).call(_context19, position);\n          _node6.text = _before2;\n          newNode = _objectSpread$e(_objectSpread$e({}, _properties), {}, {\n            text: _after2\n          });\n        } else {\n          var _context20, _context21;\n          var _before3 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context20 = _node6.children).call(_context20, 0, position);\n          var _after3 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context21 = _node6.children).call(_context21, position);\n          _node6.children = _before3;\n          newNode = _objectSpread$e(_objectSpread$e({}, _properties), {}, {\n            children: _after3\n          });\n        }\n        _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context22 = _parent4.children).call(_context22, _index4 + 1, 0, newNode);\n        if (selection) {\n          var _iterator8 = _createForOfIteratorHelper(Range.points(selection)),\n            _step8;\n          try {\n            for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n              var _step8$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step8.value, 2),\n                _point6 = _step8$value[0],\n                _key9 = _step8$value[1];\n              selection[_key9] = Point.transform(_point6, op);\n            }\n          } catch (err) {\n            _iterator8.e(err);\n          } finally {\n            _iterator8.f();\n          }\n        }\n        break;\n      }\n  }\n  return selection;\n}; // eslint-disable-next-line no-redeclare\n\nvar GeneralTransforms = {\n  transform: function transform(editor, op) {\n    editor.children = (0,immer__WEBPACK_IMPORTED_MODULE_34__.createDraft)(editor.children);\n    var selection = editor.selection && (0,immer__WEBPACK_IMPORTED_MODULE_34__.createDraft)(editor.selection);\n    try {\n      selection = applyToDraft(editor, selection, op);\n    } finally {\n      editor.children = (0,immer__WEBPACK_IMPORTED_MODULE_34__.finishDraft)(editor.children);\n      if (selection) {\n        editor.selection = (0,immer__WEBPACK_IMPORTED_MODULE_34__.isDraft)(selection) ? (0,immer__WEBPACK_IMPORTED_MODULE_34__.finishDraft)(selection) : selection;\n      } else {\n        editor.selection = null;\n      }\n    }\n  }\n};\n\n// eslint-disable-next-line no-redeclare\nvar NodeTransforms = {\n  insertNodes: function insertNodes(editor, nodes, options) {\n    editor.insertNodes(nodes, options);\n  },\n  liftNodes: function liftNodes(editor, options) {\n    editor.liftNodes(options);\n  },\n  mergeNodes: function mergeNodes(editor, options) {\n    editor.mergeNodes(options);\n  },\n  moveNodes: function moveNodes(editor, options) {\n    editor.moveNodes(options);\n  },\n  removeNodes: function removeNodes(editor, options) {\n    editor.removeNodes(options);\n  },\n  setNodes: function setNodes(editor, props, options) {\n    editor.setNodes(props, options);\n  },\n  splitNodes: function splitNodes(editor, options) {\n    editor.splitNodes(options);\n  },\n  unsetNodes: function unsetNodes(editor, props, options) {\n    editor.unsetNodes(props, options);\n  },\n  unwrapNodes: function unwrapNodes(editor, options) {\n    editor.unwrapNodes(options);\n  },\n  wrapNodes: function wrapNodes(editor, element, options) {\n    editor.wrapNodes(element, options);\n  }\n};\n\n// eslint-disable-next-line no-redeclare\nvar SelectionTransforms = {\n  collapse: function collapse(editor, options) {\n    editor.collapse(options);\n  },\n  deselect: function deselect(editor) {\n    editor.deselect();\n  },\n  move: function move(editor, options) {\n    editor.move(options);\n  },\n  select: function select(editor, target) {\n    editor.select(target);\n  },\n  setPoint: function setPoint(editor, props, options) {\n    editor.setPoint(props, options);\n  },\n  setSelection: function setSelection(editor, props) {\n    editor.setSelection(props);\n  }\n};\n\n/*\n  Custom deep equal comparison for Slate nodes.\n\n  We don't need general purpose deep equality;\n  Slate only supports plain values, Arrays, and nested objects.\n  Complex values nested inside Arrays are not supported.\n\n  Slate objects are designed to be serialised, so\n  missing keys are deliberately normalised to undefined.\n */\n\nvar isDeepEqual = function isDeepEqual(node, another) {\n  for (var key in node) {\n    var a = node[key];\n    var b = another[key];\n    if (is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(a) && is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(b)) {\n      if (!isDeepEqual(a, b)) return false;\n    } else if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(a) && _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(b)) {\n      if (a.length !== b.length) return false;\n      for (var i = 0; i < a.length; i++) {\n        if (a[i] !== b[i]) return false;\n      }\n    } else if (a !== b) {\n      return false;\n    }\n  }\n  /*\n    Deep object equality is only necessary in one direction; in the reverse direction\n    we are only looking for keys that are missing.\n    As above, undefined keys are normalised to missing.\n  */\n\n  for (var _key in another) {\n    if (node[_key] === undefined && another[_key] !== undefined) {\n      return false;\n    }\n  }\n  return true;\n};\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_23___default()(excluded).call(excluded, key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n  var key, i;\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var sourceSymbolKeys = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(source);\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_23___default()(excluded).call(excluded, key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n  return target;\n}\nvar _excluded$4 = [\"anchor\", \"focus\"];\nfunction ownKeys$d(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$d(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context23;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context23 = ownKeys$d(Object(source), true)).call(_context23, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context24;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context24 = ownKeys$d(Object(source))).call(_context24, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar Range = {\n  edges: function edges(range) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var _options$reverse3 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options),\n      reverse = _options$reverse3 === void 0 ? false : _options$reverse3;\n    var anchor = range.anchor,\n      focus = range.focus;\n    return Range.isBackward(range) === reverse ? [anchor, focus] : [focus, anchor];\n  },\n  end: function end(range) {\n    var _Range$edges = Range.edges(range),\n      _Range$edges2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges, 2),\n      end = _Range$edges2[1];\n    return end;\n  },\n  equals: function equals(range, another) {\n    return Point.equals(range.anchor, another.anchor) && Point.equals(range.focus, another.focus);\n  },\n  includes: function includes(range, target) {\n    if (Range.isRange(target)) {\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(Range).call(Range, range, target.anchor) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(Range).call(Range, range, target.focus)) {\n        return true;\n      }\n      var _Range$edges3 = Range.edges(range),\n        _Range$edges4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges3, 2),\n        rs = _Range$edges4[0],\n        re = _Range$edges4[1];\n      var _Range$edges5 = Range.edges(target),\n        _Range$edges6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges5, 2),\n        ts = _Range$edges6[0],\n        te = _Range$edges6[1];\n      return Point.isBefore(rs, ts) && Point.isAfter(re, te);\n    }\n    var _Range$edges7 = Range.edges(range),\n      _Range$edges8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges7, 2),\n      start = _Range$edges8[0],\n      end = _Range$edges8[1];\n    var isAfterStart = false;\n    var isBeforeEnd = false;\n    if (Point.isPoint(target)) {\n      isAfterStart = Point.compare(target, start) >= 0;\n      isBeforeEnd = Point.compare(target, end) <= 0;\n    } else {\n      isAfterStart = Path.compare(target, start.path) >= 0;\n      isBeforeEnd = Path.compare(target, end.path) <= 0;\n    }\n    return isAfterStart && isBeforeEnd;\n  },\n  intersection: function intersection(range, another) {\n    var rest = _objectWithoutProperties(range, _excluded$4);\n    var _Range$edges9 = Range.edges(range),\n      _Range$edges10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges9, 2),\n      s1 = _Range$edges10[0],\n      e1 = _Range$edges10[1];\n    var _Range$edges11 = Range.edges(another),\n      _Range$edges12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges11, 2),\n      s2 = _Range$edges12[0],\n      e2 = _Range$edges12[1];\n    var start = Point.isBefore(s1, s2) ? s2 : s1;\n    var end = Point.isBefore(e1, e2) ? e1 : e2;\n    if (Point.isBefore(end, start)) {\n      return null;\n    } else {\n      return _objectSpread$d({\n        anchor: start,\n        focus: end\n      }, rest);\n    }\n  },\n  isBackward: function isBackward(range) {\n    var anchor = range.anchor,\n      focus = range.focus;\n    return Point.isAfter(anchor, focus);\n  },\n  isCollapsed: function isCollapsed(range) {\n    var anchor = range.anchor,\n      focus = range.focus;\n    return Point.equals(anchor, focus);\n  },\n  isExpanded: function isExpanded(range) {\n    return !Range.isCollapsed(range);\n  },\n  isForward: function isForward(range) {\n    return !Range.isBackward(range);\n  },\n  isRange: function isRange(value) {\n    return is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value) && Point.isPoint(value.anchor) && Point.isPoint(value.focus);\n  },\n  points: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function points(range) {\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function points$(_context25) {\n      while (1) switch (_context25.prev = _context25.next) {\n        case 0:\n          _context25.next = 2;\n          return [range.anchor, 'anchor'];\n        case 2:\n          _context25.next = 4;\n          return [range.focus, 'focus'];\n        case 4:\n        case \"end\":\n          return _context25.stop();\n      }\n    }, points);\n  }),\n  start: function start(range) {\n    var _Range$edges13 = Range.edges(range),\n      _Range$edges14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges13, 1),\n      start = _Range$edges14[0];\n    return start;\n  },\n  transform: function transform(range, op) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    return (0,immer__WEBPACK_IMPORTED_MODULE_34__.produce)(range, function (r) {\n      if (r === null) {\n        return null;\n      }\n      var _options$affinity2 = options.affinity,\n        affinity = _options$affinity2 === void 0 ? 'inward' : _options$affinity2;\n      var affinityAnchor;\n      var affinityFocus;\n      if (affinity === 'inward') {\n        // If the range is collapsed, make sure to use the same affinity to\n        // avoid the two points passing each other and expanding in the opposite\n        // direction\n        var isCollapsed = Range.isCollapsed(r);\n        if (Range.isForward(r)) {\n          affinityAnchor = 'forward';\n          affinityFocus = isCollapsed ? affinityAnchor : 'backward';\n        } else {\n          affinityAnchor = 'backward';\n          affinityFocus = isCollapsed ? affinityAnchor : 'forward';\n        }\n      } else if (affinity === 'outward') {\n        if (Range.isForward(r)) {\n          affinityAnchor = 'backward';\n          affinityFocus = 'forward';\n        } else {\n          affinityAnchor = 'forward';\n          affinityFocus = 'backward';\n        }\n      } else {\n        affinityAnchor = affinity;\n        affinityFocus = affinity;\n      }\n      var anchor = Point.transform(r.anchor, op, {\n        affinity: affinityAnchor\n      });\n      var focus = Point.transform(r.focus, op, {\n        affinity: affinityFocus\n      });\n      if (!anchor || !focus) {\n        return null;\n      }\n      r.anchor = anchor;\n      r.focus = focus;\n    });\n  }\n};\n\n/**\n * Shared the function with isElementType utility\n */\n\nvar isElement = function isElement(value) {\n  return is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value) && Node.isNodeList(value.children) && !Editor.isEditor(value);\n}; // eslint-disable-next-line no-redeclare\n\nvar Element = {\n  isAncestor: function isAncestor(value) {\n    return is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value) && Node.isNodeList(value.children);\n  },\n  isElement: isElement,\n  isElementList: function isElementList(value) {\n    return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(value) && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, function (val) {\n      return Element.isElement(val);\n    });\n  },\n  isElementProps: function isElementProps(props) {\n    return props.children !== undefined;\n  },\n  isElementType: function isElementType(value, elementVal) {\n    var elementKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'type';\n    return isElement(value) && value[elementKey] === elementVal;\n  },\n  matches: function matches(element, props) {\n    for (var key in props) {\n      if (key === 'children') {\n        continue;\n      }\n      if (element[key] !== props[key]) {\n        return false;\n      }\n    }\n    return true;\n  }\n};\nvar _excluded$3 = [\"children\"],\n  _excluded2$3 = [\"text\"];\nvar IS_NODE_LIST_CACHE = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())(); // eslint-disable-next-line no-redeclare\n\nvar Node = {\n  ancestor: function ancestor(root, path) {\n    var node = Node.get(root, path);\n    if (Text.isText(node)) {\n      var _context26;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context26 = \"Cannot get the ancestor node at path [\".concat(path, \"] because it refers to a text node instead: \")).call(_context26, Scrubber.stringify(node)));\n    }\n    return node;\n  },\n  ancestors: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function ancestors(root, path) {\n    var options,\n      _iterator9,\n      _step9,\n      p,\n      n,\n      entry,\n      _args2 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function ancestors$(_context27) {\n      while (1) switch (_context27.prev = _context27.next) {\n        case 0:\n          options = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : {};\n          _iterator9 = _createForOfIteratorHelper(Path.ancestors(path, options));\n          _context27.prev = 2;\n          _iterator9.s();\n        case 4:\n          if ((_step9 = _iterator9.n()).done) {\n            _context27.next = 12;\n            break;\n          }\n          p = _step9.value;\n          n = Node.ancestor(root, p);\n          entry = [n, p];\n          _context27.next = 10;\n          return entry;\n        case 10:\n          _context27.next = 4;\n          break;\n        case 12:\n          _context27.next = 17;\n          break;\n        case 14:\n          _context27.prev = 14;\n          _context27.t0 = _context27[\"catch\"](2);\n          _iterator9.e(_context27.t0);\n        case 17:\n          _context27.prev = 17;\n          _iterator9.f();\n          return _context27.finish(17);\n        case 20:\n        case \"end\":\n          return _context27.stop();\n      }\n    }, ancestors, null, [[2, 14, 17, 20]]);\n  }),\n  child: function child(root, index) {\n    if (Text.isText(root)) {\n      throw new Error(\"Cannot get the child of a text node: \".concat(Scrubber.stringify(root)));\n    }\n    var c = root.children[index];\n    if (c == null) {\n      var _context28;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context28 = \"Cannot get child at index `\".concat(index, \"` in node: \")).call(_context28, Scrubber.stringify(root)));\n    }\n    return c;\n  },\n  children: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function children(root, path) {\n    var options,\n      _options$reverse4,\n      reverse,\n      ancestor,\n      children,\n      index,\n      child,\n      childPath,\n      _args3 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function children$(_context29) {\n      while (1) switch (_context29.prev = _context29.next) {\n        case 0:\n          options = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {};\n          _options$reverse4 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options), reverse = _options$reverse4 === void 0 ? false : _options$reverse4;\n          ancestor = Node.ancestor(root, path);\n          children = ancestor.children;\n          index = reverse ? children.length - 1 : 0;\n        case 5:\n          if (!(reverse ? index >= 0 : index < children.length)) {\n            _context29.next = 13;\n            break;\n          }\n          child = Node.child(ancestor, index);\n          childPath = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, index);\n          _context29.next = 10;\n          return [child, childPath];\n        case 10:\n          index = reverse ? index - 1 : index + 1;\n          _context29.next = 5;\n          break;\n        case 13:\n        case \"end\":\n          return _context29.stop();\n      }\n    }, children);\n  }),\n  common: function common(root, path, another) {\n    var p = Path.common(path, another);\n    var n = Node.get(root, p);\n    return [n, p];\n  },\n  descendant: function descendant(root, path) {\n    var node = Node.get(root, path);\n    if (Editor.isEditor(node)) {\n      var _context30;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context30 = \"Cannot get the descendant node at path [\".concat(path, \"] because it refers to the root editor node instead: \")).call(_context30, Scrubber.stringify(node)));\n    }\n    return node;\n  },\n  descendants: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function descendants(root) {\n    var options,\n      _iterator10,\n      _step10,\n      _step10$value,\n      node,\n      path,\n      _args4 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function descendants$(_context31) {\n      while (1) switch (_context31.prev = _context31.next) {\n        case 0:\n          options = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {};\n          _iterator10 = _createForOfIteratorHelper(Node.nodes(root, options));\n          _context31.prev = 2;\n          _iterator10.s();\n        case 4:\n          if ((_step10 = _iterator10.n()).done) {\n            _context31.next = 11;\n            break;\n          }\n          _step10$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step10.value, 2), node = _step10$value[0], path = _step10$value[1];\n          if (!(path.length !== 0)) {\n            _context31.next = 9;\n            break;\n          }\n          _context31.next = 9;\n          return [node, path];\n        case 9:\n          _context31.next = 4;\n          break;\n        case 11:\n          _context31.next = 16;\n          break;\n        case 13:\n          _context31.prev = 13;\n          _context31.t0 = _context31[\"catch\"](2);\n          _iterator10.e(_context31.t0);\n        case 16:\n          _context31.prev = 16;\n          _iterator10.f();\n          return _context31.finish(16);\n        case 19:\n        case \"end\":\n          return _context31.stop();\n      }\n    }, descendants, null, [[2, 13, 16, 19]]);\n  }),\n  elements: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function elements(root) {\n    var options,\n      _iterator11,\n      _step11,\n      _step11$value,\n      node,\n      path,\n      _args5 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function elements$(_context32) {\n      while (1) switch (_context32.prev = _context32.next) {\n        case 0:\n          options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {};\n          _iterator11 = _createForOfIteratorHelper(Node.nodes(root, options));\n          _context32.prev = 2;\n          _iterator11.s();\n        case 4:\n          if ((_step11 = _iterator11.n()).done) {\n            _context32.next = 11;\n            break;\n          }\n          _step11$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step11.value, 2), node = _step11$value[0], path = _step11$value[1];\n          if (!Element.isElement(node)) {\n            _context32.next = 9;\n            break;\n          }\n          _context32.next = 9;\n          return [node, path];\n        case 9:\n          _context32.next = 4;\n          break;\n        case 11:\n          _context32.next = 16;\n          break;\n        case 13:\n          _context32.prev = 13;\n          _context32.t0 = _context32[\"catch\"](2);\n          _iterator11.e(_context32.t0);\n        case 16:\n          _context32.prev = 16;\n          _iterator11.f();\n          return _context32.finish(16);\n        case 19:\n        case \"end\":\n          return _context32.stop();\n      }\n    }, elements, null, [[2, 13, 16, 19]]);\n  }),\n  extractProps: function extractProps(node) {\n    if (Element.isAncestor(node)) {\n      var properties = _objectWithoutProperties(node, _excluded$3);\n      return properties;\n    } else {\n      var properties = _objectWithoutProperties(node, _excluded2$3);\n      return properties;\n    }\n  },\n  first: function first(root, path) {\n    var p = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path);\n    var n = Node.get(root, p);\n    while (n) {\n      if (Text.isText(n) || n.children.length === 0) {\n        break;\n      } else {\n        n = n.children[0];\n        p.push(0);\n      }\n    }\n    return [n, p];\n  },\n  fragment: function fragment(root, range) {\n    if (Text.isText(root)) {\n      throw new Error(\"Cannot get a fragment starting from a root text node: \".concat(Scrubber.stringify(root)));\n    }\n    var newRoot = (0,immer__WEBPACK_IMPORTED_MODULE_34__.produce)({\n      children: root.children\n    }, function (r) {\n      var _Range$edges15 = Range.edges(range),\n        _Range$edges16 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges15, 2),\n        start = _Range$edges16[0],\n        end = _Range$edges16[1];\n      var nodeEntries = Node.nodes(r, {\n        reverse: true,\n        pass: function pass(_ref) {\n          var _ref3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n            path = _ref3[1];\n          return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(Range).call(Range, range, path);\n        }\n      });\n      var _iterator12 = _createForOfIteratorHelper(nodeEntries),\n        _step12;\n      try {\n        for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n          var _step12$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step12.value, 2),\n            path = _step12$value[1];\n          if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(Range).call(Range, range, path)) {\n            var _context33;\n            var parent = Node.parent(r, path);\n            var index = path[path.length - 1];\n            _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_22___default()(_context33 = parent.children).call(_context33, index, 1);\n          }\n          if (Path.equals(path, end.path)) {\n            var _context34;\n            var leaf = Node.leaf(r, path);\n            leaf.text = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context34 = leaf.text).call(_context34, 0, end.offset);\n          }\n          if (Path.equals(path, start.path)) {\n            var _context35;\n            var _leaf = Node.leaf(r, path);\n            _leaf.text = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context35 = _leaf.text).call(_context35, start.offset);\n          }\n        }\n      } catch (err) {\n        _iterator12.e(err);\n      } finally {\n        _iterator12.f();\n      }\n      if (Editor.isEditor(r)) {\n        r.selection = null;\n      }\n    });\n    return newRoot.children;\n  },\n  get: function get(root, path) {\n    var node = root;\n    for (var i = 0; i < path.length; i++) {\n      var p = path[i];\n      if (Text.isText(node) || !node.children[p]) {\n        var _context36;\n        throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context36 = \"Cannot find a descendant at path [\".concat(path, \"] in node: \")).call(_context36, Scrubber.stringify(root)));\n      }\n      node = node.children[p];\n    }\n    return node;\n  },\n  has: function has(root, path) {\n    var node = root;\n    for (var i = 0; i < path.length; i++) {\n      var p = path[i];\n      if (Text.isText(node) || !node.children[p]) {\n        return false;\n      }\n      node = node.children[p];\n    }\n    return true;\n  },\n  isNode: function isNode(value) {\n    return Text.isText(value) || Element.isElement(value) || Editor.isEditor(value);\n  },\n  isNodeList: function isNodeList(value) {\n    if (!_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(value)) {\n      return false;\n    }\n    var cachedResult = IS_NODE_LIST_CACHE.get(value);\n    if (cachedResult !== undefined) {\n      return cachedResult;\n    }\n    var isNodeList = _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, function (val) {\n      return Node.isNode(val);\n    });\n    IS_NODE_LIST_CACHE.set(value, isNodeList);\n    return isNodeList;\n  },\n  last: function last(root, path) {\n    var p = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(path).call(path);\n    var n = Node.get(root, p);\n    while (n) {\n      if (Text.isText(n) || n.children.length === 0) {\n        break;\n      } else {\n        var i = n.children.length - 1;\n        n = n.children[i];\n        p.push(i);\n      }\n    }\n    return [n, p];\n  },\n  leaf: function leaf(root, path) {\n    var node = Node.get(root, path);\n    if (!Text.isText(node)) {\n      var _context37;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context37 = \"Cannot get the leaf node at path [\".concat(path, \"] because it refers to a non-leaf node: \")).call(_context37, Scrubber.stringify(node)));\n    }\n    return node;\n  },\n  levels: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function levels(root, path) {\n    var options,\n      _iterator13,\n      _step13,\n      p,\n      n,\n      _args6 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function levels$(_context38) {\n      while (1) switch (_context38.prev = _context38.next) {\n        case 0:\n          options = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : {};\n          _iterator13 = _createForOfIteratorHelper(Path.levels(path, options));\n          _context38.prev = 2;\n          _iterator13.s();\n        case 4:\n          if ((_step13 = _iterator13.n()).done) {\n            _context38.next = 11;\n            break;\n          }\n          p = _step13.value;\n          n = Node.get(root, p);\n          _context38.next = 9;\n          return [n, p];\n        case 9:\n          _context38.next = 4;\n          break;\n        case 11:\n          _context38.next = 16;\n          break;\n        case 13:\n          _context38.prev = 13;\n          _context38.t0 = _context38[\"catch\"](2);\n          _iterator13.e(_context38.t0);\n        case 16:\n          _context38.prev = 16;\n          _iterator13.f();\n          return _context38.finish(16);\n        case 19:\n        case \"end\":\n          return _context38.stop();\n      }\n    }, levels, null, [[2, 13, 16, 19]]);\n  }),\n  matches: function matches(node, props) {\n    return Element.isElement(node) && Element.isElementProps(props) && Element.matches(node, props) || Text.isText(node) && Text.isTextProps(props) && Text.matches(node, props);\n  },\n  nodes: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function nodes(root) {\n    var options,\n      pass,\n      _options$reverse5,\n      reverse,\n      _options$from,\n      from,\n      to,\n      visited,\n      p,\n      n,\n      nextIndex,\n      newPath,\n      _newPath,\n      _args7 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function nodes$(_context39) {\n      while (1) switch (_context39.prev = _context39.next) {\n        case 0:\n          options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};\n          pass = options.pass, _options$reverse5 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options), reverse = _options$reverse5 === void 0 ? false : _options$reverse5;\n          _options$from = options.from, from = _options$from === void 0 ? [] : _options$from, to = options.to;\n          visited = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n          p = [];\n          n = root;\n        case 6:\n          if (false) {}\n          if (!(to && (reverse ? Path.isBefore(p, to) : Path.isAfter(p, to)))) {\n            _context39.next = 9;\n            break;\n          }\n          return _context39.abrupt(\"break\", 37);\n        case 9:\n          if (visited.has(n)) {\n            _context39.next = 12;\n            break;\n          }\n          _context39.next = 12;\n          return [n, p];\n        case 12:\n          if (!(!visited.has(n) && !Text.isText(n) && n.children.length !== 0 && (pass == null || pass([n, p]) === false))) {\n            _context39.next = 19;\n            break;\n          }\n          visited.add(n);\n          nextIndex = reverse ? n.children.length - 1 : 0;\n          if (Path.isAncestor(p, from)) {\n            nextIndex = from[p.length];\n          }\n          p = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(p).call(p, nextIndex);\n          n = Node.get(root, p);\n          return _context39.abrupt(\"continue\", 6);\n        case 19:\n          if (!(p.length === 0)) {\n            _context39.next = 21;\n            break;\n          }\n          return _context39.abrupt(\"break\", 37);\n        case 21:\n          if (reverse) {\n            _context39.next = 27;\n            break;\n          }\n          newPath = Path.next(p);\n          if (!Node.has(root, newPath)) {\n            _context39.next = 27;\n            break;\n          }\n          p = newPath;\n          n = Node.get(root, p);\n          return _context39.abrupt(\"continue\", 6);\n        case 27:\n          if (!(reverse && p[p.length - 1] !== 0)) {\n            _context39.next = 32;\n            break;\n          }\n          _newPath = Path.previous(p);\n          p = _newPath;\n          n = Node.get(root, p);\n          return _context39.abrupt(\"continue\", 6);\n        case 32:\n          // Otherwise we're going upward...\n\n          p = Path.parent(p);\n          n = Node.get(root, p);\n          visited.add(n);\n          _context39.next = 6;\n          break;\n        case 37:\n        case \"end\":\n          return _context39.stop();\n      }\n    }, nodes);\n  }),\n  parent: function parent(root, path) {\n    var parentPath = Path.parent(path);\n    var p = Node.get(root, parentPath);\n    if (Text.isText(p)) {\n      throw new Error(\"Cannot get the parent of path [\".concat(path, \"] because it does not exist in the root.\"));\n    }\n    return p;\n  },\n  string: function string(node) {\n    if (Text.isText(node)) {\n      return node.text;\n    } else {\n      var _context40;\n      return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_26___default()(_context40 = node.children).call(_context40, Node.string).join('');\n    }\n  },\n  texts: /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function texts(root) {\n    var options,\n      _iterator14,\n      _step14,\n      _step14$value,\n      node,\n      path,\n      _args8 = arguments;\n    return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function texts$(_context41) {\n      while (1) switch (_context41.prev = _context41.next) {\n        case 0:\n          options = _args8.length > 1 && _args8[1] !== undefined ? _args8[1] : {};\n          _iterator14 = _createForOfIteratorHelper(Node.nodes(root, options));\n          _context41.prev = 2;\n          _iterator14.s();\n        case 4:\n          if ((_step14 = _iterator14.n()).done) {\n            _context41.next = 11;\n            break;\n          }\n          _step14$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step14.value, 2), node = _step14$value[0], path = _step14$value[1];\n          if (!Text.isText(node)) {\n            _context41.next = 9;\n            break;\n          }\n          _context41.next = 9;\n          return [node, path];\n        case 9:\n          _context41.next = 4;\n          break;\n        case 11:\n          _context41.next = 16;\n          break;\n        case 13:\n          _context41.prev = 13;\n          _context41.t0 = _context41[\"catch\"](2);\n          _iterator14.e(_context41.t0);\n        case 16:\n          _context41.prev = 16;\n          _iterator14.f();\n          return _context41.finish(16);\n        case 19:\n        case \"end\":\n          return _context41.stop();\n      }\n    }, texts, null, [[2, 13, 16, 19]]);\n  })\n};\nfunction ownKeys$c(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$c(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context42;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context42 = ownKeys$c(Object(source), true)).call(_context42, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context43;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context43 = ownKeys$c(Object(source))).call(_context43, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar Operation = {\n  isNodeOperation: function isNodeOperation(value) {\n    var _context44;\n    return Operation.isOperation(value) && _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default()(_context44 = value.type).call(_context44, '_node');\n  },\n  isOperation: function isOperation(value) {\n    if (!is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value)) {\n      return false;\n    }\n    switch (value.type) {\n      case 'insert_node':\n        return Path.isPath(value.path) && Node.isNode(value.node);\n      case 'insert_text':\n        return typeof value.offset === 'number' && typeof value.text === 'string' && Path.isPath(value.path);\n      case 'merge_node':\n        return typeof value.position === 'number' && Path.isPath(value.path) && is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.properties);\n      case 'move_node':\n        return Path.isPath(value.path) && Path.isPath(value.newPath);\n      case 'remove_node':\n        return Path.isPath(value.path) && Node.isNode(value.node);\n      case 'remove_text':\n        return typeof value.offset === 'number' && typeof value.text === 'string' && Path.isPath(value.path);\n      case 'set_node':\n        return Path.isPath(value.path) && is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.properties) && is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.newProperties);\n      case 'set_selection':\n        return value.properties === null && Range.isRange(value.newProperties) || value.newProperties === null && Range.isRange(value.properties) || is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.properties) && is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.newProperties);\n      case 'split_node':\n        return Path.isPath(value.path) && typeof value.position === 'number' && is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.properties);\n      default:\n        return false;\n    }\n  },\n  isOperationList: function isOperationList(value) {\n    return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(value) && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, function (val) {\n      return Operation.isOperation(val);\n    });\n  },\n  isSelectionOperation: function isSelectionOperation(value) {\n    var _context45;\n    return Operation.isOperation(value) && _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default()(_context45 = value.type).call(_context45, '_selection');\n  },\n  isTextOperation: function isTextOperation(value) {\n    var _context46;\n    return Operation.isOperation(value) && _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_27___default()(_context46 = value.type).call(_context46, '_text');\n  },\n  inverse: function inverse(op) {\n    switch (op.type) {\n      case 'insert_node':\n        {\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            type: 'remove_node'\n          });\n        }\n      case 'insert_text':\n        {\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            type: 'remove_text'\n          });\n        }\n      case 'merge_node':\n        {\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            type: 'split_node',\n            path: Path.previous(op.path)\n          });\n        }\n      case 'move_node':\n        {\n          var newPath = op.newPath,\n            path = op.path; // PERF: in this case the move operation is a no-op anyways.\n\n          if (Path.equals(newPath, path)) {\n            return op;\n          } // If the move happens completely within a single parent the path and\n          // newPath are stable with respect to each other.\n\n          if (Path.isSibling(path, newPath)) {\n            return _objectSpread$c(_objectSpread$c({}, op), {}, {\n              path: newPath,\n              newPath: path\n            });\n          } // If the move does not happen within a single parent it is possible\n          // for the move to impact the true path to the location where the node\n          // was removed from and where it was inserted. We have to adjust for this\n          // and find the original path. We can accomplish this (only in non-sibling)\n          // moves by looking at the impact of the move operation on the node\n          // after the original move path.\n\n          var inversePath = Path.transform(path, op);\n          var inverseNewPath = Path.transform(Path.next(path), op);\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            path: inversePath,\n            newPath: inverseNewPath\n          });\n        }\n      case 'remove_node':\n        {\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            type: 'insert_node'\n          });\n        }\n      case 'remove_text':\n        {\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            type: 'insert_text'\n          });\n        }\n      case 'set_node':\n        {\n          var properties = op.properties,\n            newProperties = op.newProperties;\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            properties: newProperties,\n            newProperties: properties\n          });\n        }\n      case 'set_selection':\n        {\n          var _properties = op.properties,\n            _newProperties = op.newProperties;\n          if (_properties == null) {\n            return _objectSpread$c(_objectSpread$c({}, op), {}, {\n              properties: _newProperties,\n              newProperties: null\n            });\n          } else if (_newProperties == null) {\n            return _objectSpread$c(_objectSpread$c({}, op), {}, {\n              properties: null,\n              newProperties: _properties\n            });\n          } else {\n            return _objectSpread$c(_objectSpread$c({}, op), {}, {\n              properties: _newProperties,\n              newProperties: _properties\n            });\n          }\n        }\n      case 'split_node':\n        {\n          return _objectSpread$c(_objectSpread$c({}, op), {}, {\n            type: 'merge_node',\n            path: Path.next(op.path)\n          });\n        }\n    }\n  }\n};\nvar IS_EDITOR_CACHE = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_10___default())();\nvar _isEditor = function isEditor(value) {\n  var cachedIsEditor = IS_EDITOR_CACHE.get(value);\n  if (cachedIsEditor !== undefined) {\n    return cachedIsEditor;\n  }\n  if (!is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value)) {\n    return false;\n  }\n  var isEditor = typeof value.addMark === 'function' && typeof value.apply === 'function' && typeof value.deleteFragment === 'function' && typeof value.insertBreak === 'function' && typeof value.insertSoftBreak === 'function' && typeof value.insertFragment === 'function' && typeof value.insertNode === 'function' && typeof value.insertText === 'function' && typeof value.isElementReadOnly === 'function' && typeof value.isInline === 'function' && typeof value.isSelectable === 'function' && typeof value.isVoid === 'function' && typeof value.normalizeNode === 'function' && typeof value.onChange === 'function' && typeof value.removeMark === 'function' && typeof value.getDirtyPaths === 'function' && (value.marks === null || is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value.marks)) && (value.selection === null || Range.isRange(value.selection)) && Node.isNodeList(value.children) && Operation.isOperationList(value.operations);\n  IS_EDITOR_CACHE.set(value, isEditor);\n  return isEditor;\n};\nvar Editor = {\n  above: function above(editor, options) {\n    return editor.above(options);\n  },\n  addMark: function addMark(editor, key, value) {\n    editor.addMark(key, value);\n  },\n  after: function after(editor, at, options) {\n    return editor.after(at, options);\n  },\n  before: function before(editor, at, options) {\n    return editor.before(at, options);\n  },\n  deleteBackward: function deleteBackward(editor) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var _options$unit = options.unit,\n      unit = _options$unit === void 0 ? 'character' : _options$unit;\n    editor.deleteBackward(unit);\n  },\n  deleteForward: function deleteForward(editor) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var _options$unit2 = options.unit,\n      unit = _options$unit2 === void 0 ? 'character' : _options$unit2;\n    editor.deleteForward(unit);\n  },\n  deleteFragment: function deleteFragment(editor, options) {\n    editor.deleteFragment(options);\n  },\n  edges: function edges(editor, at) {\n    return editor.edges(at);\n  },\n  elementReadOnly: function elementReadOnly(editor) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    return editor.elementReadOnly(options);\n  },\n  end: function end(editor, at) {\n    return editor.end(at);\n  },\n  first: function first(editor, at) {\n    return editor.first(at);\n  },\n  fragment: function fragment(editor, at) {\n    return editor.fragment(at);\n  },\n  hasBlocks: function hasBlocks(editor, element) {\n    return editor.hasBlocks(element);\n  },\n  hasInlines: function hasInlines(editor, element) {\n    return editor.hasInlines(element);\n  },\n  hasPath: function hasPath(editor, path) {\n    return editor.hasPath(path);\n  },\n  hasTexts: function hasTexts(editor, element) {\n    return editor.hasTexts(element);\n  },\n  insertBreak: function insertBreak(editor) {\n    editor.insertBreak();\n  },\n  insertFragment: function insertFragment(editor, fragment, options) {\n    editor.insertFragment(fragment, options);\n  },\n  insertNode: function insertNode(editor, node) {\n    editor.insertNode(node);\n  },\n  insertSoftBreak: function insertSoftBreak(editor) {\n    editor.insertSoftBreak();\n  },\n  insertText: function insertText(editor, text) {\n    editor.insertText(text);\n  },\n  isBlock: function isBlock(editor, value) {\n    return editor.isBlock(value);\n  },\n  isEdge: function isEdge(editor, point, at) {\n    return editor.isEdge(point, at);\n  },\n  isEditor: function isEditor(value) {\n    return _isEditor(value);\n  },\n  isElementReadOnly: function isElementReadOnly(editor, element) {\n    return editor.isElementReadOnly(element);\n  },\n  isEmpty: function isEmpty(editor, element) {\n    return editor.isEmpty(element);\n  },\n  isEnd: function isEnd(editor, point, at) {\n    return editor.isEnd(point, at);\n  },\n  isInline: function isInline(editor, value) {\n    return editor.isInline(value);\n  },\n  isNormalizing: function isNormalizing(editor) {\n    return editor.isNormalizing();\n  },\n  isSelectable: function isSelectable(editor, value) {\n    return editor.isSelectable(value);\n  },\n  isStart: function isStart(editor, point, at) {\n    return editor.isStart(point, at);\n  },\n  isVoid: function isVoid(editor, value) {\n    return editor.isVoid(value);\n  },\n  last: function last(editor, at) {\n    return editor.last(at);\n  },\n  leaf: function leaf(editor, at, options) {\n    return editor.leaf(at, options);\n  },\n  levels: function levels(editor, options) {\n    return editor.levels(options);\n  },\n  marks: function marks(editor) {\n    return editor.getMarks();\n  },\n  next: function next(editor, options) {\n    return editor.next(options);\n  },\n  node: function node(editor, at, options) {\n    return editor.node(at, options);\n  },\n  nodes: function nodes(editor, options) {\n    return editor.nodes(options);\n  },\n  normalize: function normalize(editor, options) {\n    editor.normalize(options);\n  },\n  parent: function parent(editor, at, options) {\n    return editor.parent(at, options);\n  },\n  path: function path(editor, at, options) {\n    return editor.path(at, options);\n  },\n  pathRef: function pathRef(editor, path, options) {\n    return editor.pathRef(path, options);\n  },\n  pathRefs: function pathRefs(editor) {\n    return editor.pathRefs();\n  },\n  point: function point(editor, at, options) {\n    return editor.point(at, options);\n  },\n  pointRef: function pointRef(editor, point, options) {\n    return editor.pointRef(point, options);\n  },\n  pointRefs: function pointRefs(editor) {\n    return editor.pointRefs();\n  },\n  positions: function positions(editor, options) {\n    return editor.positions(options);\n  },\n  previous: function previous(editor, options) {\n    return editor.previous(options);\n  },\n  range: function range(editor, at, to) {\n    return editor.range(at, to);\n  },\n  rangeRef: function rangeRef(editor, range, options) {\n    return editor.rangeRef(range, options);\n  },\n  rangeRefs: function rangeRefs(editor) {\n    return editor.rangeRefs();\n  },\n  removeMark: function removeMark(editor, key) {\n    editor.removeMark(key);\n  },\n  setNormalizing: function setNormalizing(editor, isNormalizing) {\n    editor.setNormalizing(isNormalizing);\n  },\n  start: function start(editor, at) {\n    return editor.start(at);\n  },\n  string: function string(editor, at, options) {\n    return editor.string(at, options);\n  },\n  unhangRange: function unhangRange(editor, range, options) {\n    return editor.unhangRange(range, options);\n  },\n  void: function _void(editor, options) {\n    return editor.void(options);\n  },\n  withoutNormalizing: function withoutNormalizing(editor, fn) {\n    editor.withoutNormalizing(fn);\n  }\n};\nvar Location = {\n  isLocation: function isLocation(value) {\n    return Path.isPath(value) || Point.isPoint(value) || Range.isRange(value);\n  }\n}; // eslint-disable-next-line no-redeclare\n\nvar Span = {\n  isSpan: function isSpan(value) {\n    return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(value) && value.length === 2 && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, Path.isPath);\n  }\n};\nfunction ownKeys$b(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$b(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context47;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context47 = ownKeys$b(Object(source), true)).call(_context47, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context48;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context48 = ownKeys$b(Object(source))).call(_context48, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar Point = {\n  compare: function compare(point, another) {\n    var result = Path.compare(point.path, another.path);\n    if (result === 0) {\n      if (point.offset < another.offset) return -1;\n      if (point.offset > another.offset) return 1;\n      return 0;\n    }\n    return result;\n  },\n  isAfter: function isAfter(point, another) {\n    return Point.compare(point, another) === 1;\n  },\n  isBefore: function isBefore(point, another) {\n    return Point.compare(point, another) === -1;\n  },\n  equals: function equals(point, another) {\n    // PERF: ensure the offsets are equal first since they are cheaper to check.\n    return point.offset === another.offset && Path.equals(point.path, another.path);\n  },\n  isPoint: function isPoint(value) {\n    return is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value) && typeof value.offset === 'number' && Path.isPath(value.path);\n  },\n  transform: function transform(point, op) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    return (0,immer__WEBPACK_IMPORTED_MODULE_34__.produce)(point, function (p) {\n      if (p === null) {\n        return null;\n      }\n      var _options$affinity3 = options.affinity,\n        affinity = _options$affinity3 === void 0 ? 'forward' : _options$affinity3;\n      var path = p.path,\n        offset = p.offset;\n      switch (op.type) {\n        case 'insert_node':\n        case 'move_node':\n          {\n            p.path = Path.transform(path, op, options);\n            break;\n          }\n        case 'insert_text':\n          {\n            if (Path.equals(op.path, path) && (op.offset < offset || op.offset === offset && affinity === 'forward')) {\n              p.offset += op.text.length;\n            }\n            break;\n          }\n        case 'merge_node':\n          {\n            if (Path.equals(op.path, path)) {\n              p.offset += op.position;\n            }\n            p.path = Path.transform(path, op, options);\n            break;\n          }\n        case 'remove_text':\n          {\n            if (Path.equals(op.path, path) && op.offset <= offset) {\n              p.offset -= Math.min(offset - op.offset, op.text.length);\n            }\n            break;\n          }\n        case 'remove_node':\n          {\n            if (Path.equals(op.path, path) || Path.isAncestor(op.path, path)) {\n              return null;\n            }\n            p.path = Path.transform(path, op, options);\n            break;\n          }\n        case 'split_node':\n          {\n            if (Path.equals(op.path, path)) {\n              if (op.position === offset && affinity == null) {\n                return null;\n              } else if (op.position < offset || op.position === offset && affinity === 'forward') {\n                p.offset -= op.position;\n                p.path = Path.transform(path, op, _objectSpread$b(_objectSpread$b({}, options), {}, {\n                  affinity: 'forward'\n                }));\n              }\n            } else {\n              p.path = Path.transform(path, op, options);\n            }\n            break;\n          }\n      }\n    });\n  }\n};\nvar _scrubber = undefined;\n/**\n * This interface implements a stringify() function, which is used by Slate\n * internally when generating exceptions containing end user data. Developers\n * using Slate may call Scrubber.setScrubber() to alter the behavior of this\n * stringify() function.\n *\n * For example, to prevent the cleartext logging of 'text' fields within Nodes:\n *\n *    import { Scrubber } from 'slate';\n *    Scrubber.setScrubber((key, val) => {\n *      if (key === 'text') return '...scrubbed...'\n *      return val\n *    });\n *\n */\n// eslint-disable-next-line no-redeclare\n\nvar Scrubber = {\n  setScrubber: function setScrubber(scrubber) {\n    _scrubber = scrubber;\n  },\n  stringify: function stringify(value) {\n    return _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_28___default()(value, _scrubber);\n  }\n};\nvar _excluded$2 = [\"text\"],\n  _excluded2$2 = [\"anchor\", \"focus\"];\nfunction ownKeys$a(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$a(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context49;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context49 = ownKeys$a(Object(source), true)).call(_context49, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context50;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context50 = ownKeys$a(Object(source))).call(_context50, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar Text = {\n  equals: function equals(text, another) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    var _options$loose = options.loose,\n      loose = _options$loose === void 0 ? false : _options$loose;\n    function omitText(obj) {\n      var rest = _objectWithoutProperties(obj, _excluded$2);\n      return rest;\n    }\n    return isDeepEqual(loose ? omitText(text) : text, loose ? omitText(another) : another);\n  },\n  isText: function isText(value) {\n    return is_plain_object__WEBPACK_IMPORTED_MODULE_33___default()(value) && typeof value.text === 'string';\n  },\n  isTextList: function isTextList(value) {\n    return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(value) && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, function (val) {\n      return Text.isText(val);\n    });\n  },\n  isTextProps: function isTextProps(props) {\n    return props.text !== undefined;\n  },\n  matches: function matches(text, props) {\n    for (var key in props) {\n      if (key === 'text') {\n        continue;\n      }\n      if (!text.hasOwnProperty(key) || text[key] !== props[key]) {\n        return false;\n      }\n    }\n    return true;\n  },\n  decorations: function decorations(node, _decorations) {\n    var leaves = [_objectSpread$a({}, node)];\n    var _iterator15 = _createForOfIteratorHelper(_decorations),\n      _step15;\n    try {\n      for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) {\n        var dec = _step15.value;\n        var rest = _objectWithoutProperties(dec, _excluded2$2);\n        var _Range$edges17 = Range.edges(dec),\n          _Range$edges18 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges17, 2),\n          start = _Range$edges18[0],\n          end = _Range$edges18[1];\n        var next = [];\n        var leafEnd = 0;\n        var decorationStart = start.offset;\n        var decorationEnd = end.offset;\n        var _iterator16 = _createForOfIteratorHelper(leaves),\n          _step16;\n        try {\n          for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) {\n            var leaf = _step16.value;\n            var length = leaf.text.length;\n            var leafStart = leafEnd;\n            leafEnd += length; // If the range encompasses the entire leaf, add the range.\n\n            if (decorationStart <= leafStart && leafEnd <= decorationEnd) {\n              (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(leaf, rest);\n              next.push(leaf);\n              continue;\n            } // If the range expanded and match the leaf, or starts after, or ends before it, continue.\n\n            if (decorationStart !== decorationEnd && (decorationStart === leafEnd || decorationEnd === leafStart) || decorationStart > leafEnd || decorationEnd < leafStart || decorationEnd === leafStart && leafStart !== 0) {\n              next.push(leaf);\n              continue;\n            } // Otherwise we need to split the leaf, at the start, end, or both,\n            // and add the range to the middle intersecting section. Do the end\n            // split first since we don't need to update the offset that way.\n\n            var middle = leaf;\n            var before = void 0;\n            var after = void 0;\n            if (decorationEnd < leafEnd) {\n              var _context51, _context52;\n              var off = decorationEnd - leafStart;\n              after = _objectSpread$a(_objectSpread$a({}, middle), {}, {\n                text: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context51 = middle.text).call(_context51, off)\n              });\n              middle = _objectSpread$a(_objectSpread$a({}, middle), {}, {\n                text: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context52 = middle.text).call(_context52, 0, off)\n              });\n            }\n            if (decorationStart > leafStart) {\n              var _context53, _context54;\n              var _off = decorationStart - leafStart;\n              before = _objectSpread$a(_objectSpread$a({}, middle), {}, {\n                text: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context53 = middle.text).call(_context53, 0, _off)\n              });\n              middle = _objectSpread$a(_objectSpread$a({}, middle), {}, {\n                text: _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context54 = middle.text).call(_context54, _off)\n              });\n            }\n            (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(middle, rest);\n            if (before) {\n              next.push(before);\n            }\n            next.push(middle);\n            if (after) {\n              next.push(after);\n            }\n          }\n        } catch (err) {\n          _iterator16.e(err);\n        } finally {\n          _iterator16.f();\n        }\n        leaves = next;\n      }\n    } catch (err) {\n      _iterator15.e(err);\n    } finally {\n      _iterator15.f();\n    }\n    return leaves;\n  }\n};\n\n/**\n * Get the default location to insert content into the editor.\n * By default, use the selection as the target location. But if there is\n * no selection, insert at the end of the document since that is such a\n * common use case when inserting from a non-selected state.\n */\n\nvar getDefaultInsertLocation = function getDefaultInsertLocation(editor) {\n  if (editor.selection) {\n    return editor.selection;\n  } else if (editor.children.length > 0) {\n    return Editor.end(editor, []);\n  } else {\n    return [0];\n  }\n};\nvar matchPath = function matchPath(editor, path) {\n  var _Editor$node = Editor.node(editor, path),\n    _Editor$node2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$node, 1),\n    node = _Editor$node2[0];\n  return function (n) {\n    return n === node;\n  };\n};\n\n// Character (grapheme cluster) boundaries are determined according to\n// the default grapheme cluster boundary specification, extended grapheme clusters variant[1].\n//\n// References:\n//\n// [1] https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table\n// [2] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt\n// [3] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.html\n// [4] https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakTest.txt\n\n/**\n * Get the distance to the end of the first character in a string of text.\n */\nvar getCharacterDistance = function getCharacterDistance(str) {\n  var isRTL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var isLTR = !isRTL;\n  var codepoints = isRTL ? codepointsIteratorRTL(str) : str;\n  var left = CodepointType.None;\n  var right = CodepointType.None;\n  var distance = 0; // Evaluation of these conditions are deferred.\n\n  var gb11 = null; // Is GB11 applicable?\n\n  var gb12Or13 = null; // Is GB12 or GB13 applicable?\n  var _iterator17 = _createForOfIteratorHelper(codepoints),\n    _step17;\n  try {\n    for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) {\n      var _char = _step17.value;\n      var code = _babel_runtime_corejs3_core_js_stable_instance_code_point_at__WEBPACK_IMPORTED_MODULE_29___default()(_char).call(_char, 0);\n      if (!code) break;\n      var type = getCodepointType(_char, code);\n      var _ref4 = isLTR ? [right, type] : [type, left];\n      var _ref5 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref4, 2);\n      left = _ref5[0];\n      right = _ref5[1];\n      if (intersects(left, CodepointType.ZWJ) && intersects(right, CodepointType.ExtPict)) {\n        if (isLTR) {\n          gb11 = endsWithEmojiZWJ(str.substring(0, distance));\n        } else {\n          gb11 = endsWithEmojiZWJ(str.substring(0, str.length - distance));\n        }\n        if (!gb11) break;\n      }\n      if (intersects(left, CodepointType.RI) && intersects(right, CodepointType.RI)) {\n        if (gb12Or13 !== null) {\n          gb12Or13 = !gb12Or13;\n        } else {\n          if (isLTR) {\n            gb12Or13 = true;\n          } else {\n            gb12Or13 = endsWithOddNumberOfRIs(str.substring(0, str.length - distance));\n          }\n        }\n        if (!gb12Or13) break;\n      }\n      if (left !== CodepointType.None && right !== CodepointType.None && isBoundaryPair(left, right)) {\n        break;\n      }\n      distance += _char.length;\n    }\n  } catch (err) {\n    _iterator17.e(err);\n  } finally {\n    _iterator17.f();\n  }\n  return distance || 1;\n};\nvar SPACE = /\\s/;\nvar PUNCTUATION = /[\\u0021-\\u0023\\u0025-\\u002A\\u002C-\\u002F\\u003A\\u003B\\u003F\\u0040\\u005B-\\u005D\\u005F\\u007B\\u007D\\u00A1\\u00A7\\u00AB\\u00B6\\u00B7\\u00BB\\u00BF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061E\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u0AF0\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166D\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E3B\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uFD3F\\uFE10-\\uFE19\\uFE30-\\uFE52\\uFE54-\\uFE61\\uFE63\\uFE68\\uFE6A\\uFE6B\\uFF01-\\uFF03\\uFF05-\\uFF0A\\uFF0C-\\uFF0F\\uFF1A\\uFF1B\\uFF1F\\uFF20\\uFF3B-\\uFF3D\\uFF3F\\uFF5B\\uFF5D\\uFF5F-\\uFF65]/;\nvar CHAMELEON = /['\\u2018\\u2019]/;\n/**\n * Get the distance to the end of the first word in a string of text.\n */\n\nvar getWordDistance = function getWordDistance(text) {\n  var isRTL = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var dist = 0;\n  var started = false;\n  while (text.length > 0) {\n    var charDist = getCharacterDistance(text, isRTL);\n    var _splitByCharacterDist = splitByCharacterDistance(text, charDist, isRTL),\n      _splitByCharacterDist2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_splitByCharacterDist, 2),\n      _char2 = _splitByCharacterDist2[0],\n      remaining = _splitByCharacterDist2[1];\n    if (isWordCharacter(_char2, remaining, isRTL)) {\n      started = true;\n      dist += charDist;\n    } else if (!started) {\n      dist += charDist;\n    } else {\n      break;\n    }\n    text = remaining;\n  }\n  return dist;\n};\n/**\n * Split a string in two parts at a given distance starting from the end when\n * `isRTL` is set to `true`.\n */\n\nvar splitByCharacterDistance = function splitByCharacterDistance(str, dist, isRTL) {\n  if (isRTL) {\n    var at = str.length - dist;\n    return [_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(str).call(str, at, str.length), _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(str).call(str, 0, at)];\n  }\n  return [_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(str).call(str, 0, dist), _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(str).call(str, dist)];\n};\n/**\n * Check if a character is a word character. The `remaining` argument is used\n * because sometimes you must read subsequent characters to truly determine it.\n */\n\nvar isWordCharacter = function isWordCharacter(_char3, remaining) {\n  var isRTL = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  if (SPACE.test(_char3)) {\n    return false;\n  } // Chameleons count as word characters as long as they're in a word, so\n  // recurse to see if the next one is a word character or not.\n\n  if (CHAMELEON.test(_char3)) {\n    var charDist = getCharacterDistance(remaining, isRTL);\n    var _splitByCharacterDist3 = splitByCharacterDistance(remaining, charDist, isRTL),\n      _splitByCharacterDist4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_splitByCharacterDist3, 2),\n      nextChar = _splitByCharacterDist4[0],\n      nextRemaining = _splitByCharacterDist4[1];\n    if (isWordCharacter(nextChar, nextRemaining, isRTL)) {\n      return true;\n    }\n  }\n  if (PUNCTUATION.test(_char3)) {\n    return false;\n  }\n  return true;\n};\n/**\n * Iterate on codepoints from right to left.\n */\n\nvar codepointsIteratorRTL = /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().mark(function codepointsIteratorRTL(str) {\n  var end, i, char1, char2;\n  return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function codepointsIteratorRTL$(_context55) {\n    while (1) switch (_context55.prev = _context55.next) {\n      case 0:\n        end = str.length - 1;\n        i = 0;\n      case 2:\n        if (!(i < str.length)) {\n          _context55.next = 16;\n          break;\n        }\n        char1 = str.charAt(end - i);\n        if (!isLowSurrogate(char1.charCodeAt(0))) {\n          _context55.next = 11;\n          break;\n        }\n        char2 = str.charAt(end - i - 1);\n        if (!isHighSurrogate(char2.charCodeAt(0))) {\n          _context55.next = 11;\n          break;\n        }\n        _context55.next = 9;\n        return char2 + char1;\n      case 9:\n        i++;\n        return _context55.abrupt(\"continue\", 13);\n      case 11:\n        _context55.next = 13;\n        return char1;\n      case 13:\n        i++;\n        _context55.next = 2;\n        break;\n      case 16:\n      case \"end\":\n        return _context55.stop();\n    }\n  }, codepointsIteratorRTL);\n});\n/**\n * Is `charCode` a high surrogate.\n *\n * https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\n */\n\nvar isHighSurrogate = function isHighSurrogate(charCode) {\n  return charCode >= 0xd800 && charCode <= 0xdbff;\n};\n/**\n * Is `charCode` a low surrogate.\n *\n * https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates\n */\n\nvar isLowSurrogate = function isLowSurrogate(charCode) {\n  return charCode >= 0xdc00 && charCode <= 0xdfff;\n};\nvar CodepointType;\n(function (CodepointType) {\n  CodepointType[CodepointType[\"None\"] = 0] = \"None\";\n  CodepointType[CodepointType[\"Extend\"] = 1] = \"Extend\";\n  CodepointType[CodepointType[\"ZWJ\"] = 2] = \"ZWJ\";\n  CodepointType[CodepointType[\"RI\"] = 4] = \"RI\";\n  CodepointType[CodepointType[\"Prepend\"] = 8] = \"Prepend\";\n  CodepointType[CodepointType[\"SpacingMark\"] = 16] = \"SpacingMark\";\n  CodepointType[CodepointType[\"L\"] = 32] = \"L\";\n  CodepointType[CodepointType[\"V\"] = 64] = \"V\";\n  CodepointType[CodepointType[\"T\"] = 128] = \"T\";\n  CodepointType[CodepointType[\"LV\"] = 256] = \"LV\";\n  CodepointType[CodepointType[\"LVT\"] = 512] = \"LVT\";\n  CodepointType[CodepointType[\"ExtPict\"] = 1024] = \"ExtPict\";\n  CodepointType[CodepointType[\"Any\"] = 2048] = \"Any\";\n})(CodepointType || (CodepointType = {}));\nvar reExtend = /^(?:[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09BE\\u09C1-\\u09C4\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3E\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE\\u0BC0\\u0BCD\\u0BD7\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCC\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D3E\\u0D41-\\u0D44\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DCF\\u0DD2-\\u0DD4\\u0DD6\\u0DDF\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B03\\u1B34-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200C\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDEAB\\uDEAC\\uDF46-\\uDF50]|\\uD804[\\uDC01\\uDC38-\\uDC46\\uDC7F-\\uDC81\\uDCB3-\\uDCB6\\uDCB9\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD2B\\uDD2D-\\uDD34\\uDD73\\uDD80\\uDD81\\uDDB6-\\uDDBE\\uDDC9-\\uDDCC\\uDDCF\\uDE2F-\\uDE31\\uDE34\\uDE36\\uDE37\\uDE3E\\uDEDF\\uDEE3-\\uDEEA\\uDF00\\uDF01\\uDF3B\\uDF3C\\uDF3E\\uDF40\\uDF57\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC38-\\uDC3F\\uDC42-\\uDC44\\uDC46\\uDC5E\\uDCB0\\uDCB3-\\uDCB8\\uDCBA\\uDCBD\\uDCBF\\uDCC0\\uDCC2\\uDCC3\\uDDAF\\uDDB2-\\uDDB5\\uDDBC\\uDDBD\\uDDBF\\uDDC0\\uDDDC\\uDDDD\\uDE33-\\uDE3A\\uDE3D\\uDE3F\\uDE40\\uDEAB\\uDEAD\\uDEB0-\\uDEB5\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF25\\uDF27-\\uDF2B]|\\uD806[\\uDC2F-\\uDC37\\uDC39\\uDC3A\\uDD30\\uDD3B\\uDD3C\\uDD3E\\uDD43\\uDDD4-\\uDDD7\\uDDDA\\uDDDB\\uDDE0\\uDE01-\\uDE0A\\uDE33-\\uDE38\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE56\\uDE59-\\uDE5B\\uDE8A-\\uDE96\\uDE98\\uDE99]|\\uD807[\\uDC30-\\uDC36\\uDC38-\\uDC3D\\uDC3F\\uDC92-\\uDCA7\\uDCAA-\\uDCB0\\uDCB2\\uDCB3\\uDCB5\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD45\\uDD47\\uDD90\\uDD91\\uDD95\\uDD97\\uDEF3\\uDEF4]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF4F\\uDF8F-\\uDF92\\uDFE4]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65\\uDD67-\\uDD69\\uDD6E-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD30-\\uDD36\\uDEEC-\\uDEEF]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF])$/;\nvar rePrepend = /^(?:[\\u0600-\\u0605\\u06DD\\u070F\\u0890\\u0891\\u08E2\\u0D4E]|\\uD804[\\uDCBD\\uDCCD\\uDDC2\\uDDC3]|\\uD806[\\uDD3F\\uDD41\\uDE3A\\uDE84-\\uDE89]|\\uD807\\uDD46)$/;\nvar reSpacingMark = /^(?:[\\u0903\\u093B\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u094F\\u0982\\u0983\\u09BF\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0\\u0CC1\\u0CC3\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0D02\\u0D03\\u0D3F\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D82\\u0D83\\u0DD0\\u0DD1\\u0DD8-\\u0DDE\\u0DF2\\u0DF3\\u0E33\\u0EB3\\u0F3E\\u0F3F\\u0F7F\\u1031\\u103B\\u103C\\u1056\\u1057\\u1084\\u1715\\u1734\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1A19\\u1A1A\\u1A55\\u1A57\\u1A6D-\\u1A72\\u1B04\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF7\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAAEB\\uAAEE\\uAAEF\\uAAF5\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]|\\uD804[\\uDC00\\uDC02\\uDC82\\uDCB0-\\uDCB2\\uDCB7\\uDCB8\\uDD2C\\uDD45\\uDD46\\uDD82\\uDDB3-\\uDDB5\\uDDBF\\uDDC0\\uDDCE\\uDE2C-\\uDE2E\\uDE32\\uDE33\\uDE35\\uDEE0-\\uDEE2\\uDF02\\uDF03\\uDF3F\\uDF41-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF62\\uDF63]|\\uD805[\\uDC35-\\uDC37\\uDC40\\uDC41\\uDC45\\uDCB1\\uDCB2\\uDCB9\\uDCBB\\uDCBC\\uDCBE\\uDCC1\\uDDB0\\uDDB1\\uDDB8-\\uDDBB\\uDDBE\\uDE30-\\uDE32\\uDE3B\\uDE3C\\uDE3E\\uDEAC\\uDEAE\\uDEAF\\uDEB6\\uDF26]|\\uD806[\\uDC2C-\\uDC2E\\uDC38\\uDD31-\\uDD35\\uDD37\\uDD38\\uDD3D\\uDD40\\uDD42\\uDDD1-\\uDDD3\\uDDDC-\\uDDDF\\uDDE4\\uDE39\\uDE57\\uDE58\\uDE97]|\\uD807[\\uDC2F\\uDC3E\\uDCA9\\uDCB1\\uDCB4\\uDD8A-\\uDD8E\\uDD93\\uDD94\\uDD96\\uDEF5\\uDEF6]|\\uD81B[\\uDF51-\\uDF87\\uDFF0\\uDFF1]|\\uD834[\\uDD66\\uDD6D])$/;\nvar reL = /^[\\u1100-\\u115F\\uA960-\\uA97C]$/;\nvar reV = /^[\\u1160-\\u11A7\\uD7B0-\\uD7C6]$/;\nvar reT = /^[\\u11A8-\\u11FF\\uD7CB-\\uD7FB]$/;\nvar reLV = /^[\\uAC00\\uAC1C\\uAC38\\uAC54\\uAC70\\uAC8C\\uACA8\\uACC4\\uACE0\\uACFC\\uAD18\\uAD34\\uAD50\\uAD6C\\uAD88\\uADA4\\uADC0\\uADDC\\uADF8\\uAE14\\uAE30\\uAE4C\\uAE68\\uAE84\\uAEA0\\uAEBC\\uAED8\\uAEF4\\uAF10\\uAF2C\\uAF48\\uAF64\\uAF80\\uAF9C\\uAFB8\\uAFD4\\uAFF0\\uB00C\\uB028\\uB044\\uB060\\uB07C\\uB098\\uB0B4\\uB0D0\\uB0EC\\uB108\\uB124\\uB140\\uB15C\\uB178\\uB194\\uB1B0\\uB1CC\\uB1E8\\uB204\\uB220\\uB23C\\uB258\\uB274\\uB290\\uB2AC\\uB2C8\\uB2E4\\uB300\\uB31C\\uB338\\uB354\\uB370\\uB38C\\uB3A8\\uB3C4\\uB3E0\\uB3FC\\uB418\\uB434\\uB450\\uB46C\\uB488\\uB4A4\\uB4C0\\uB4DC\\uB4F8\\uB514\\uB530\\uB54C\\uB568\\uB584\\uB5A0\\uB5BC\\uB5D8\\uB5F4\\uB610\\uB62C\\uB648\\uB664\\uB680\\uB69C\\uB6B8\\uB6D4\\uB6F0\\uB70C\\uB728\\uB744\\uB760\\uB77C\\uB798\\uB7B4\\uB7D0\\uB7EC\\uB808\\uB824\\uB840\\uB85C\\uB878\\uB894\\uB8B0\\uB8CC\\uB8E8\\uB904\\uB920\\uB93C\\uB958\\uB974\\uB990\\uB9AC\\uB9C8\\uB9E4\\uBA00\\uBA1C\\uBA38\\uBA54\\uBA70\\uBA8C\\uBAA8\\uBAC4\\uBAE0\\uBAFC\\uBB18\\uBB34\\uBB50\\uBB6C\\uBB88\\uBBA4\\uBBC0\\uBBDC\\uBBF8\\uBC14\\uBC30\\uBC4C\\uBC68\\uBC84\\uBCA0\\uBCBC\\uBCD8\\uBCF4\\uBD10\\uBD2C\\uBD48\\uBD64\\uBD80\\uBD9C\\uBDB8\\uBDD4\\uBDF0\\uBE0C\\uBE28\\uBE44\\uBE60\\uBE7C\\uBE98\\uBEB4\\uBED0\\uBEEC\\uBF08\\uBF24\\uBF40\\uBF5C\\uBF78\\uBF94\\uBFB0\\uBFCC\\uBFE8\\uC004\\uC020\\uC03C\\uC058\\uC074\\uC090\\uC0AC\\uC0C8\\uC0E4\\uC100\\uC11C\\uC138\\uC154\\uC170\\uC18C\\uC1A8\\uC1C4\\uC1E0\\uC1FC\\uC218\\uC234\\uC250\\uC26C\\uC288\\uC2A4\\uC2C0\\uC2DC\\uC2F8\\uC314\\uC330\\uC34C\\uC368\\uC384\\uC3A0\\uC3BC\\uC3D8\\uC3F4\\uC410\\uC42C\\uC448\\uC464\\uC480\\uC49C\\uC4B8\\uC4D4\\uC4F0\\uC50C\\uC528\\uC544\\uC560\\uC57C\\uC598\\uC5B4\\uC5D0\\uC5EC\\uC608\\uC624\\uC640\\uC65C\\uC678\\uC694\\uC6B0\\uC6CC\\uC6E8\\uC704\\uC720\\uC73C\\uC758\\uC774\\uC790\\uC7AC\\uC7C8\\uC7E4\\uC800\\uC81C\\uC838\\uC854\\uC870\\uC88C\\uC8A8\\uC8C4\\uC8E0\\uC8FC\\uC918\\uC934\\uC950\\uC96C\\uC988\\uC9A4\\uC9C0\\uC9DC\\uC9F8\\uCA14\\uCA30\\uCA4C\\uCA68\\uCA84\\uCAA0\\uCABC\\uCAD8\\uCAF4\\uCB10\\uCB2C\\uCB48\\uCB64\\uCB80\\uCB9C\\uCBB8\\uCBD4\\uCBF0\\uCC0C\\uCC28\\uCC44\\uCC60\\uCC7C\\uCC98\\uCCB4\\uCCD0\\uCCEC\\uCD08\\uCD24\\uCD40\\uCD5C\\uCD78\\uCD94\\uCDB0\\uCDCC\\uCDE8\\uCE04\\uCE20\\uCE3C\\uCE58\\uCE74\\uCE90\\uCEAC\\uCEC8\\uCEE4\\uCF00\\uCF1C\\uCF38\\uCF54\\uCF70\\uCF8C\\uCFA8\\uCFC4\\uCFE0\\uCFFC\\uD018\\uD034\\uD050\\uD06C\\uD088\\uD0A4\\uD0C0\\uD0DC\\uD0F8\\uD114\\uD130\\uD14C\\uD168\\uD184\\uD1A0\\uD1BC\\uD1D8\\uD1F4\\uD210\\uD22C\\uD248\\uD264\\uD280\\uD29C\\uD2B8\\uD2D4\\uD2F0\\uD30C\\uD328\\uD344\\uD360\\uD37C\\uD398\\uD3B4\\uD3D0\\uD3EC\\uD408\\uD424\\uD440\\uD45C\\uD478\\uD494\\uD4B0\\uD4CC\\uD4E8\\uD504\\uD520\\uD53C\\uD558\\uD574\\uD590\\uD5AC\\uD5C8\\uD5E4\\uD600\\uD61C\\uD638\\uD654\\uD670\\uD68C\\uD6A8\\uD6C4\\uD6E0\\uD6FC\\uD718\\uD734\\uD750\\uD76C\\uD788]$/;\nvar reLVT = /^[\\uAC01-\\uAC1B\\uAC1D-\\uAC37\\uAC39-\\uAC53\\uAC55-\\uAC6F\\uAC71-\\uAC8B\\uAC8D-\\uACA7\\uACA9-\\uACC3\\uACC5-\\uACDF\\uACE1-\\uACFB\\uACFD-\\uAD17\\uAD19-\\uAD33\\uAD35-\\uAD4F\\uAD51-\\uAD6B\\uAD6D-\\uAD87\\uAD89-\\uADA3\\uADA5-\\uADBF\\uADC1-\\uADDB\\uADDD-\\uADF7\\uADF9-\\uAE13\\uAE15-\\uAE2F\\uAE31-\\uAE4B\\uAE4D-\\uAE67\\uAE69-\\uAE83\\uAE85-\\uAE9F\\uAEA1-\\uAEBB\\uAEBD-\\uAED7\\uAED9-\\uAEF3\\uAEF5-\\uAF0F\\uAF11-\\uAF2B\\uAF2D-\\uAF47\\uAF49-\\uAF63\\uAF65-\\uAF7F\\uAF81-\\uAF9B\\uAF9D-\\uAFB7\\uAFB9-\\uAFD3\\uAFD5-\\uAFEF\\uAFF1-\\uB00B\\uB00D-\\uB027\\uB029-\\uB043\\uB045-\\uB05F\\uB061-\\uB07B\\uB07D-\\uB097\\uB099-\\uB0B3\\uB0B5-\\uB0CF\\uB0D1-\\uB0EB\\uB0ED-\\uB107\\uB109-\\uB123\\uB125-\\uB13F\\uB141-\\uB15B\\uB15D-\\uB177\\uB179-\\uB193\\uB195-\\uB1AF\\uB1B1-\\uB1CB\\uB1CD-\\uB1E7\\uB1E9-\\uB203\\uB205-\\uB21F\\uB221-\\uB23B\\uB23D-\\uB257\\uB259-\\uB273\\uB275-\\uB28F\\uB291-\\uB2AB\\uB2AD-\\uB2C7\\uB2C9-\\uB2E3\\uB2E5-\\uB2FF\\uB301-\\uB31B\\uB31D-\\uB337\\uB339-\\uB353\\uB355-\\uB36F\\uB371-\\uB38B\\uB38D-\\uB3A7\\uB3A9-\\uB3C3\\uB3C5-\\uB3DF\\uB3E1-\\uB3FB\\uB3FD-\\uB417\\uB419-\\uB433\\uB435-\\uB44F\\uB451-\\uB46B\\uB46D-\\uB487\\uB489-\\uB4A3\\uB4A5-\\uB4BF\\uB4C1-\\uB4DB\\uB4DD-\\uB4F7\\uB4F9-\\uB513\\uB515-\\uB52F\\uB531-\\uB54B\\uB54D-\\uB567\\uB569-\\uB583\\uB585-\\uB59F\\uB5A1-\\uB5BB\\uB5BD-\\uB5D7\\uB5D9-\\uB5F3\\uB5F5-\\uB60F\\uB611-\\uB62B\\uB62D-\\uB647\\uB649-\\uB663\\uB665-\\uB67F\\uB681-\\uB69B\\uB69D-\\uB6B7\\uB6B9-\\uB6D3\\uB6D5-\\uB6EF\\uB6F1-\\uB70B\\uB70D-\\uB727\\uB729-\\uB743\\uB745-\\uB75F\\uB761-\\uB77B\\uB77D-\\uB797\\uB799-\\uB7B3\\uB7B5-\\uB7CF\\uB7D1-\\uB7EB\\uB7ED-\\uB807\\uB809-\\uB823\\uB825-\\uB83F\\uB841-\\uB85B\\uB85D-\\uB877\\uB879-\\uB893\\uB895-\\uB8AF\\uB8B1-\\uB8CB\\uB8CD-\\uB8E7\\uB8E9-\\uB903\\uB905-\\uB91F\\uB921-\\uB93B\\uB93D-\\uB957\\uB959-\\uB973\\uB975-\\uB98F\\uB991-\\uB9AB\\uB9AD-\\uB9C7\\uB9C9-\\uB9E3\\uB9E5-\\uB9FF\\uBA01-\\uBA1B\\uBA1D-\\uBA37\\uBA39-\\uBA53\\uBA55-\\uBA6F\\uBA71-\\uBA8B\\uBA8D-\\uBAA7\\uBAA9-\\uBAC3\\uBAC5-\\uBADF\\uBAE1-\\uBAFB\\uBAFD-\\uBB17\\uBB19-\\uBB33\\uBB35-\\uBB4F\\uBB51-\\uBB6B\\uBB6D-\\uBB87\\uBB89-\\uBBA3\\uBBA5-\\uBBBF\\uBBC1-\\uBBDB\\uBBDD-\\uBBF7\\uBBF9-\\uBC13\\uBC15-\\uBC2F\\uBC31-\\uBC4B\\uBC4D-\\uBC67\\uBC69-\\uBC83\\uBC85-\\uBC9F\\uBCA1-\\uBCBB\\uBCBD-\\uBCD7\\uBCD9-\\uBCF3\\uBCF5-\\uBD0F\\uBD11-\\uBD2B\\uBD2D-\\uBD47\\uBD49-\\uBD63\\uBD65-\\uBD7F\\uBD81-\\uBD9B\\uBD9D-\\uBDB7\\uBDB9-\\uBDD3\\uBDD5-\\uBDEF\\uBDF1-\\uBE0B\\uBE0D-\\uBE27\\uBE29-\\uBE43\\uBE45-\\uBE5F\\uBE61-\\uBE7B\\uBE7D-\\uBE97\\uBE99-\\uBEB3\\uBEB5-\\uBECF\\uBED1-\\uBEEB\\uBEED-\\uBF07\\uBF09-\\uBF23\\uBF25-\\uBF3F\\uBF41-\\uBF5B\\uBF5D-\\uBF77\\uBF79-\\uBF93\\uBF95-\\uBFAF\\uBFB1-\\uBFCB\\uBFCD-\\uBFE7\\uBFE9-\\uC003\\uC005-\\uC01F\\uC021-\\uC03B\\uC03D-\\uC057\\uC059-\\uC073\\uC075-\\uC08F\\uC091-\\uC0AB\\uC0AD-\\uC0C7\\uC0C9-\\uC0E3\\uC0E5-\\uC0FF\\uC101-\\uC11B\\uC11D-\\uC137\\uC139-\\uC153\\uC155-\\uC16F\\uC171-\\uC18B\\uC18D-\\uC1A7\\uC1A9-\\uC1C3\\uC1C5-\\uC1DF\\uC1E1-\\uC1FB\\uC1FD-\\uC217\\uC219-\\uC233\\uC235-\\uC24F\\uC251-\\uC26B\\uC26D-\\uC287\\uC289-\\uC2A3\\uC2A5-\\uC2BF\\uC2C1-\\uC2DB\\uC2DD-\\uC2F7\\uC2F9-\\uC313\\uC315-\\uC32F\\uC331-\\uC34B\\uC34D-\\uC367\\uC369-\\uC383\\uC385-\\uC39F\\uC3A1-\\uC3BB\\uC3BD-\\uC3D7\\uC3D9-\\uC3F3\\uC3F5-\\uC40F\\uC411-\\uC42B\\uC42D-\\uC447\\uC449-\\uC463\\uC465-\\uC47F\\uC481-\\uC49B\\uC49D-\\uC4B7\\uC4B9-\\uC4D3\\uC4D5-\\uC4EF\\uC4F1-\\uC50B\\uC50D-\\uC527\\uC529-\\uC543\\uC545-\\uC55F\\uC561-\\uC57B\\uC57D-\\uC597\\uC599-\\uC5B3\\uC5B5-\\uC5CF\\uC5D1-\\uC5EB\\uC5ED-\\uC607\\uC609-\\uC623\\uC625-\\uC63F\\uC641-\\uC65B\\uC65D-\\uC677\\uC679-\\uC693\\uC695-\\uC6AF\\uC6B1-\\uC6CB\\uC6CD-\\uC6E7\\uC6E9-\\uC703\\uC705-\\uC71F\\uC721-\\uC73B\\uC73D-\\uC757\\uC759-\\uC773\\uC775-\\uC78F\\uC791-\\uC7AB\\uC7AD-\\uC7C7\\uC7C9-\\uC7E3\\uC7E5-\\uC7FF\\uC801-\\uC81B\\uC81D-\\uC837\\uC839-\\uC853\\uC855-\\uC86F\\uC871-\\uC88B\\uC88D-\\uC8A7\\uC8A9-\\uC8C3\\uC8C5-\\uC8DF\\uC8E1-\\uC8FB\\uC8FD-\\uC917\\uC919-\\uC933\\uC935-\\uC94F\\uC951-\\uC96B\\uC96D-\\uC987\\uC989-\\uC9A3\\uC9A5-\\uC9BF\\uC9C1-\\uC9DB\\uC9DD-\\uC9F7\\uC9F9-\\uCA13\\uCA15-\\uCA2F\\uCA31-\\uCA4B\\uCA4D-\\uCA67\\uCA69-\\uCA83\\uCA85-\\uCA9F\\uCAA1-\\uCABB\\uCABD-\\uCAD7\\uCAD9-\\uCAF3\\uCAF5-\\uCB0F\\uCB11-\\uCB2B\\uCB2D-\\uCB47\\uCB49-\\uCB63\\uCB65-\\uCB7F\\uCB81-\\uCB9B\\uCB9D-\\uCBB7\\uCBB9-\\uCBD3\\uCBD5-\\uCBEF\\uCBF1-\\uCC0B\\uCC0D-\\uCC27\\uCC29-\\uCC43\\uCC45-\\uCC5F\\uCC61-\\uCC7B\\uCC7D-\\uCC97\\uCC99-\\uCCB3\\uCCB5-\\uCCCF\\uCCD1-\\uCCEB\\uCCED-\\uCD07\\uCD09-\\uCD23\\uCD25-\\uCD3F\\uCD41-\\uCD5B\\uCD5D-\\uCD77\\uCD79-\\uCD93\\uCD95-\\uCDAF\\uCDB1-\\uCDCB\\uCDCD-\\uCDE7\\uCDE9-\\uCE03\\uCE05-\\uCE1F\\uCE21-\\uCE3B\\uCE3D-\\uCE57\\uCE59-\\uCE73\\uCE75-\\uCE8F\\uCE91-\\uCEAB\\uCEAD-\\uCEC7\\uCEC9-\\uCEE3\\uCEE5-\\uCEFF\\uCF01-\\uCF1B\\uCF1D-\\uCF37\\uCF39-\\uCF53\\uCF55-\\uCF6F\\uCF71-\\uCF8B\\uCF8D-\\uCFA7\\uCFA9-\\uCFC3\\uCFC5-\\uCFDF\\uCFE1-\\uCFFB\\uCFFD-\\uD017\\uD019-\\uD033\\uD035-\\uD04F\\uD051-\\uD06B\\uD06D-\\uD087\\uD089-\\uD0A3\\uD0A5-\\uD0BF\\uD0C1-\\uD0DB\\uD0DD-\\uD0F7\\uD0F9-\\uD113\\uD115-\\uD12F\\uD131-\\uD14B\\uD14D-\\uD167\\uD169-\\uD183\\uD185-\\uD19F\\uD1A1-\\uD1BB\\uD1BD-\\uD1D7\\uD1D9-\\uD1F3\\uD1F5-\\uD20F\\uD211-\\uD22B\\uD22D-\\uD247\\uD249-\\uD263\\uD265-\\uD27F\\uD281-\\uD29B\\uD29D-\\uD2B7\\uD2B9-\\uD2D3\\uD2D5-\\uD2EF\\uD2F1-\\uD30B\\uD30D-\\uD327\\uD329-\\uD343\\uD345-\\uD35F\\uD361-\\uD37B\\uD37D-\\uD397\\uD399-\\uD3B3\\uD3B5-\\uD3CF\\uD3D1-\\uD3EB\\uD3ED-\\uD407\\uD409-\\uD423\\uD425-\\uD43F\\uD441-\\uD45B\\uD45D-\\uD477\\uD479-\\uD493\\uD495-\\uD4AF\\uD4B1-\\uD4CB\\uD4CD-\\uD4E7\\uD4E9-\\uD503\\uD505-\\uD51F\\uD521-\\uD53B\\uD53D-\\uD557\\uD559-\\uD573\\uD575-\\uD58F\\uD591-\\uD5AB\\uD5AD-\\uD5C7\\uD5C9-\\uD5E3\\uD5E5-\\uD5FF\\uD601-\\uD61B\\uD61D-\\uD637\\uD639-\\uD653\\uD655-\\uD66F\\uD671-\\uD68B\\uD68D-\\uD6A7\\uD6A9-\\uD6C3\\uD6C5-\\uD6DF\\uD6E1-\\uD6FB\\uD6FD-\\uD717\\uD719-\\uD733\\uD735-\\uD74F\\uD751-\\uD76B\\uD76D-\\uD787\\uD789-\\uD7A3]$/;\nvar reExtPict = /^(?:[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u2388\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2605\\u2607-\\u2612\\u2614-\\u2685\\u2690-\\u2705\\u2708-\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2767\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC00-\\uDCFF\\uDD0D-\\uDD0F\\uDD2F\\uDD6C-\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDAD-\\uDDE5\\uDE01-\\uDE0F\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE3C-\\uDE3F\\uDE49-\\uDFFA]|\\uD83D[\\uDC00-\\uDD3D\\uDD46-\\uDE4F\\uDE80-\\uDEFF\\uDF74-\\uDF7F\\uDFD5-\\uDFFF]|\\uD83E[\\uDC0C-\\uDC0F\\uDC48-\\uDC4F\\uDC5A-\\uDC5F\\uDC88-\\uDC8F\\uDCAE-\\uDCFF\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDEFF]|\\uD83F[\\uDC00-\\uDFFD])$/;\nvar getCodepointType = function getCodepointType(_char4, code) {\n  var type = CodepointType.Any;\n  if (_char4.search(reExtend) !== -1) {\n    type |= CodepointType.Extend;\n  }\n  if (code === 0x200d) {\n    type |= CodepointType.ZWJ;\n  }\n  if (code >= 0x1f1e6 && code <= 0x1f1ff) {\n    type |= CodepointType.RI;\n  }\n  if (_char4.search(rePrepend) !== -1) {\n    type |= CodepointType.Prepend;\n  }\n  if (_char4.search(reSpacingMark) !== -1) {\n    type |= CodepointType.SpacingMark;\n  }\n  if (_char4.search(reL) !== -1) {\n    type |= CodepointType.L;\n  }\n  if (_char4.search(reV) !== -1) {\n    type |= CodepointType.V;\n  }\n  if (_char4.search(reT) !== -1) {\n    type |= CodepointType.T;\n  }\n  if (_char4.search(reLV) !== -1) {\n    type |= CodepointType.LV;\n  }\n  if (_char4.search(reLVT) !== -1) {\n    type |= CodepointType.LVT;\n  }\n  if (_char4.search(reExtPict) !== -1) {\n    type |= CodepointType.ExtPict;\n  }\n  return type;\n};\nfunction intersects(x, y) {\n  return (x & y) !== 0;\n}\nvar NonBoundaryPairs = [\n// GB6\n[CodepointType.L, CodepointType.L | CodepointType.V | CodepointType.LV | CodepointType.LVT],\n// GB7\n[CodepointType.LV | CodepointType.V, CodepointType.V | CodepointType.T],\n// GB8\n[CodepointType.LVT | CodepointType.T, CodepointType.T],\n// GB9\n[CodepointType.Any, CodepointType.Extend | CodepointType.ZWJ],\n// GB9a\n[CodepointType.Any, CodepointType.SpacingMark],\n// GB9b\n[CodepointType.Prepend, CodepointType.Any],\n// GB11\n[CodepointType.ZWJ, CodepointType.ExtPict],\n// GB12 and GB13\n[CodepointType.RI, CodepointType.RI]];\nfunction isBoundaryPair(left, right) {\n  return _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_30___default()(NonBoundaryPairs).call(NonBoundaryPairs, function (r) {\n    return intersects(left, r[0]) && intersects(right, r[1]);\n  }) === -1;\n}\nvar endingEmojiZWJ = /(?:[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u2388\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2605\\u2607-\\u2612\\u2614-\\u2685\\u2690-\\u2705\\u2708-\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763-\\u2767\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC00-\\uDCFF\\uDD0D-\\uDD0F\\uDD2F\\uDD6C-\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDAD-\\uDDE5\\uDE01-\\uDE0F\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE3C-\\uDE3F\\uDE49-\\uDFFA]|\\uD83D[\\uDC00-\\uDD3D\\uDD46-\\uDE4F\\uDE80-\\uDEFF\\uDF74-\\uDF7F\\uDFD5-\\uDFFF]|\\uD83E[\\uDC0C-\\uDC0F\\uDC48-\\uDC4F\\uDC5A-\\uDC5F\\uDC88-\\uDC8F\\uDCAE-\\uDCFF\\uDD0C-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDEFF]|\\uD83F[\\uDC00-\\uDFFD])(?:[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09BE\\u09C1-\\u09C4\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3E\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE\\u0BC0\\u0BCD\\u0BD7\\u0C00\\u0C04\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC2\\u0CC6\\u0CCC\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D3E\\u0D41-\\u0D44\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DCF\\u0DD2-\\u0DD4\\u0DD6\\u0DDF\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1AC0\\u1B00-\\u1B03\\u1B34-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u200C\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFF9E\\uFF9F]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD803[\\uDD24-\\uDD27\\uDEAB\\uDEAC\\uDF46-\\uDF50]|\\uD804[\\uDC01\\uDC38-\\uDC46\\uDC7F-\\uDC81\\uDCB3-\\uDCB6\\uDCB9\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD2B\\uDD2D-\\uDD34\\uDD73\\uDD80\\uDD81\\uDDB6-\\uDDBE\\uDDC9-\\uDDCC\\uDDCF\\uDE2F-\\uDE31\\uDE34\\uDE36\\uDE37\\uDE3E\\uDEDF\\uDEE3-\\uDEEA\\uDF00\\uDF01\\uDF3B\\uDF3C\\uDF3E\\uDF40\\uDF57\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDC38-\\uDC3F\\uDC42-\\uDC44\\uDC46\\uDC5E\\uDCB0\\uDCB3-\\uDCB8\\uDCBA\\uDCBD\\uDCBF\\uDCC0\\uDCC2\\uDCC3\\uDDAF\\uDDB2-\\uDDB5\\uDDBC\\uDDBD\\uDDBF\\uDDC0\\uDDDC\\uDDDD\\uDE33-\\uDE3A\\uDE3D\\uDE3F\\uDE40\\uDEAB\\uDEAD\\uDEB0-\\uDEB5\\uDEB7\\uDF1D-\\uDF1F\\uDF22-\\uDF25\\uDF27-\\uDF2B]|\\uD806[\\uDC2F-\\uDC37\\uDC39\\uDC3A\\uDD30\\uDD3B\\uDD3C\\uDD3E\\uDD43\\uDDD4-\\uDDD7\\uDDDA\\uDDDB\\uDDE0\\uDE01-\\uDE0A\\uDE33-\\uDE38\\uDE3B-\\uDE3E\\uDE47\\uDE51-\\uDE56\\uDE59-\\uDE5B\\uDE8A-\\uDE96\\uDE98\\uDE99]|\\uD807[\\uDC30-\\uDC36\\uDC38-\\uDC3D\\uDC3F\\uDC92-\\uDCA7\\uDCAA-\\uDCB0\\uDCB2\\uDCB3\\uDCB5\\uDCB6\\uDD31-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD45\\uDD47\\uDD90\\uDD91\\uDD95\\uDD97\\uDEF3\\uDEF4]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF4F\\uDF8F-\\uDF92\\uDFE4]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65\\uDD67-\\uDD69\\uDD6E-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD836[\\uDE00-\\uDE36\\uDE3B-\\uDE6C\\uDE75\\uDE84\\uDE9B-\\uDE9F\\uDEA1-\\uDEAF]|\\uD838[\\uDC00-\\uDC06\\uDC08-\\uDC18\\uDC1B-\\uDC21\\uDC23\\uDC24\\uDC26-\\uDC2A\\uDD30-\\uDD36\\uDEEC-\\uDEEF]|\\uD83A[\\uDCD0-\\uDCD6\\uDD44-\\uDD4A]|\\uD83C[\\uDFFB-\\uDFFF]|\\uDB40[\\uDC20-\\uDC7F\\uDD00-\\uDDEF])*\\u200D$/;\nvar endsWithEmojiZWJ = function endsWithEmojiZWJ(str) {\n  return str.search(endingEmojiZWJ) !== -1;\n};\nvar endingRIs = /(?:\\uD83C[\\uDDE6-\\uDDFF])+$/g;\nvar endsWithOddNumberOfRIs = function endsWithOddNumberOfRIs(str) {\n  var match = str.match(endingRIs);\n  if (match === null) {\n    return false;\n  } else {\n    // A RI is represented by a surrogate pair.\n    var numRIs = match[0].length / 2;\n    return numRIs % 2 === 1;\n  }\n};\nvar TextTransforms = {\n  delete: function _delete(editor, options) {\n    editor.delete(options);\n  },\n  insertFragment: function insertFragment(editor, fragment, options) {\n    editor.insertFragment(fragment, options);\n  },\n  insertText: function insertText(editor, text) {\n    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    Editor.withoutNormalizing(editor, function () {\n      var _options$voids = options.voids,\n        voids = _options$voids === void 0 ? false : _options$voids;\n      var _options$at = options.at,\n        at = _options$at === void 0 ? getDefaultInsertLocation(editor) : _options$at;\n      if (Path.isPath(at)) {\n        at = Editor.range(editor, at);\n      }\n      if (Range.isRange(at)) {\n        if (Range.isCollapsed(at)) {\n          at = at.anchor;\n        } else {\n          var end = Range.end(at);\n          if (!voids && Editor.void(editor, {\n            at: end\n          })) {\n            return;\n          }\n          var start = Range.start(at);\n          var startRef = Editor.pointRef(editor, start);\n          var endRef = Editor.pointRef(editor, end);\n          Transforms.delete(editor, {\n            at: at,\n            voids: voids\n          });\n          var startPoint = startRef.unref();\n          var endPoint = endRef.unref();\n          at = startPoint || endPoint;\n          Transforms.setSelection(editor, {\n            anchor: at,\n            focus: at\n          });\n        }\n      }\n      if (!voids && Editor.void(editor, {\n        at: at\n      }) || Editor.elementReadOnly(editor, {\n        at: at\n      })) {\n        return;\n      }\n      var _at = at,\n        path = _at.path,\n        offset = _at.offset;\n      if (text.length > 0) editor.apply({\n        type: 'insert_text',\n        path: path,\n        offset: offset,\n        text: text\n      });\n    });\n  }\n};\nfunction ownKeys$9(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$9(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context56;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context56 = ownKeys$9(Object(source), true)).call(_context56, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context57;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context57 = ownKeys$9(Object(source))).call(_context57, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar Transforms = _objectSpread$9(_objectSpread$9(_objectSpread$9(_objectSpread$9({}, GeneralTransforms), NodeTransforms), SelectionTransforms), TextTransforms);\nvar apply = function apply(editor, op) {\n  var _iterator18 = _createForOfIteratorHelper(Editor.pathRefs(editor)),\n    _step18;\n  try {\n    for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) {\n      var ref = _step18.value;\n      PathRef.transform(ref, op);\n    }\n  } catch (err) {\n    _iterator18.e(err);\n  } finally {\n    _iterator18.f();\n  }\n  var _iterator19 = _createForOfIteratorHelper(Editor.pointRefs(editor)),\n    _step19;\n  try {\n    for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) {\n      var _ref = _step19.value;\n      PointRef.transform(_ref, op);\n    }\n  } catch (err) {\n    _iterator19.e(err);\n  } finally {\n    _iterator19.f();\n  }\n  var _iterator20 = _createForOfIteratorHelper(Editor.rangeRefs(editor)),\n    _step20;\n  try {\n    for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) {\n      var _ref2 = _step20.value;\n      RangeRef.transform(_ref2, op);\n    }\n  } catch (err) {\n    _iterator20.e(err);\n  } finally {\n    _iterator20.f();\n  }\n  var oldDirtyPaths = DIRTY_PATHS.get(editor) || [];\n  var oldDirtyPathKeys = DIRTY_PATH_KEYS.get(editor) || new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n  var dirtyPaths;\n  var dirtyPathKeys;\n  var add = function add(path) {\n    if (path) {\n      var key = path.join(',');\n      if (!dirtyPathKeys.has(key)) {\n        dirtyPathKeys.add(key);\n        dirtyPaths.push(path);\n      }\n    }\n  };\n  if (Path.operationCanTransformPath(op)) {\n    dirtyPaths = [];\n    dirtyPathKeys = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n    var _iterator21 = _createForOfIteratorHelper(oldDirtyPaths),\n      _step21;\n    try {\n      for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) {\n        var path = _step21.value;\n        var newPath = Path.transform(path, op);\n        add(newPath);\n      }\n    } catch (err) {\n      _iterator21.e(err);\n    } finally {\n      _iterator21.f();\n    }\n  } else {\n    dirtyPaths = oldDirtyPaths;\n    dirtyPathKeys = oldDirtyPathKeys;\n  }\n  var newDirtyPaths = editor.getDirtyPaths(op);\n  var _iterator22 = _createForOfIteratorHelper(newDirtyPaths),\n    _step22;\n  try {\n    for (_iterator22.s(); !(_step22 = _iterator22.n()).done;) {\n      var _path = _step22.value;\n      add(_path);\n    }\n  } catch (err) {\n    _iterator22.e(err);\n  } finally {\n    _iterator22.f();\n  }\n  DIRTY_PATHS.set(editor, dirtyPaths);\n  DIRTY_PATH_KEYS.set(editor, dirtyPathKeys);\n  Transforms.transform(editor, op);\n  editor.operations.push(op);\n  Editor.normalize(editor, {\n    operation: op\n  }); // Clear any formats applied to the cursor if the selection changes.\n\n  if (op.type === 'set_selection') {\n    editor.marks = null;\n  }\n  if (!FLUSHING.get(editor)) {\n    FLUSHING.set(editor, true);\n    _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_31___default().resolve().then(function () {\n      FLUSHING.set(editor, false);\n      editor.onChange({\n        operation: op\n      });\n      editor.operations = [];\n    });\n  }\n};\n\n/**\n * Get the \"dirty\" paths generated from an operation.\n */\n\nvar getDirtyPaths = function getDirtyPaths(editor, op) {\n  switch (op.type) {\n    case 'insert_text':\n    case 'remove_text':\n    case 'set_node':\n      {\n        var path = op.path;\n        return Path.levels(path);\n      }\n    case 'insert_node':\n      {\n        var _context58;\n        var node = op.node,\n          _path = op.path;\n        var levels = Path.levels(_path);\n        var descendants = Text.isText(node) ? [] : _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(Node.nodes(node), function (_ref) {\n          var _ref6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n            p = _ref6[1];\n          return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_path).call(_path, p);\n        });\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context58 = []).call(_context58, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(levels), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(descendants));\n      }\n    case 'merge_node':\n      {\n        var _context59;\n        var _path2 = op.path;\n        var ancestors = Path.ancestors(_path2);\n        var previousPath = Path.previous(_path2);\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context59 = []).call(_context59, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ancestors), [previousPath]);\n      }\n    case 'move_node':\n      {\n        var _context60;\n        var _path3 = op.path,\n          newPath = op.newPath;\n        if (Path.equals(_path3, newPath)) {\n          return [];\n        }\n        var oldAncestors = [];\n        var newAncestors = [];\n        var _iterator23 = _createForOfIteratorHelper(Path.ancestors(_path3)),\n          _step23;\n        try {\n          for (_iterator23.s(); !(_step23 = _iterator23.n()).done;) {\n            var ancestor = _step23.value;\n            var p = Path.transform(ancestor, op);\n            oldAncestors.push(p);\n          }\n        } catch (err) {\n          _iterator23.e(err);\n        } finally {\n          _iterator23.f();\n        }\n        var _iterator24 = _createForOfIteratorHelper(Path.ancestors(newPath)),\n          _step24;\n        try {\n          for (_iterator24.s(); !(_step24 = _iterator24.n()).done;) {\n            var _ancestor = _step24.value;\n            var _p = Path.transform(_ancestor, op);\n            newAncestors.push(_p);\n          }\n        } catch (err) {\n          _iterator24.e(err);\n        } finally {\n          _iterator24.f();\n        }\n        var newParent = newAncestors[newAncestors.length - 1];\n        var newIndex = newPath[newPath.length - 1];\n        var resultPath = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(newParent).call(newParent, newIndex);\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context60 = []).call(_context60, oldAncestors, newAncestors, [resultPath]);\n      }\n    case 'remove_node':\n      {\n        var _path4 = op.path;\n        var _ancestors = Path.ancestors(_path4);\n        return (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ancestors);\n      }\n    case 'split_node':\n      {\n        var _context61;\n        var _path5 = op.path;\n        var _levels = Path.levels(_path5);\n        var nextPath = Path.next(_path5);\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context61 = []).call(_context61, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_levels), [nextPath]);\n      }\n    default:\n      {\n        return [];\n      }\n  }\n};\nvar getFragment = function getFragment(editor) {\n  var selection = editor.selection;\n  if (selection) {\n    return Node.fragment(editor, selection);\n  }\n  return [];\n};\nvar normalizeNode = function normalizeNode(editor, entry) {\n  var _entry2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entry, 2),\n    node = _entry2[0],\n    path = _entry2[1]; // There are no core normalizations for text nodes.\n\n  if (Text.isText(node)) {\n    return;\n  } // Ensure that block and inline nodes have at least one text child.\n\n  if (Element.isElement(node) && node.children.length === 0) {\n    var child = {\n      text: ''\n    };\n    Transforms.insertNodes(editor, child, {\n      at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, 0),\n      voids: true\n    });\n    return;\n  } // Determine whether the node should have block or inline children.\n\n  var shouldHaveInlines = Editor.isEditor(node) ? false : Element.isElement(node) && (editor.isInline(node) || node.children.length === 0 || Text.isText(node.children[0]) || editor.isInline(node.children[0])); // Since we'll be applying operations while iterating, keep track of an\n  // index that accounts for any added/removed nodes.\n\n  var n = 0;\n  for (var i = 0; i < node.children.length; i++, n++) {\n    var currentNode = Node.get(editor, path);\n    if (Text.isText(currentNode)) continue;\n    var _child = currentNode.children[n];\n    var prev = currentNode.children[n - 1];\n    var isLast = i === node.children.length - 1;\n    var isInlineOrText = Text.isText(_child) || Element.isElement(_child) && editor.isInline(_child); // Only allow block nodes in the top-level children and parent blocks\n    // that only contain block nodes. Similarly, only allow inline nodes in\n    // other inline nodes, or parent blocks that only contain inlines and\n    // text.\n\n    if (isInlineOrText !== shouldHaveInlines) {\n      Transforms.removeNodes(editor, {\n        at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, n),\n        voids: true\n      });\n      n--;\n    } else if (Element.isElement(_child)) {\n      // Ensure that inline nodes are surrounded by text nodes.\n      if (editor.isInline(_child)) {\n        if (prev == null || !Text.isText(prev)) {\n          var newChild = {\n            text: ''\n          };\n          Transforms.insertNodes(editor, newChild, {\n            at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, n),\n            voids: true\n          });\n          n++;\n        } else if (isLast) {\n          var _newChild = {\n            text: ''\n          };\n          Transforms.insertNodes(editor, _newChild, {\n            at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, n + 1),\n            voids: true\n          });\n          n++;\n        }\n      }\n    } else {\n      // Merge adjacent text nodes that are empty or match.\n      if (prev != null && Text.isText(prev)) {\n        if (Text.equals(_child, prev, {\n          loose: true\n        })) {\n          Transforms.mergeNodes(editor, {\n            at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, n),\n            voids: true\n          });\n          n--;\n        } else if (prev.text === '') {\n          Transforms.removeNodes(editor, {\n            at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, n - 1),\n            voids: true\n          });\n          n--;\n        } else if (_child.text === '') {\n          Transforms.removeNodes(editor, {\n            at: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(path).call(path, n),\n            voids: true\n          });\n          n--;\n        }\n      }\n    }\n  }\n};\nvar shouldNormalize = function shouldNormalize(editor, _ref) {\n  var iteration = _ref.iteration,\n    initialDirtyPathsLength = _ref.initialDirtyPathsLength;\n  var maxIterations = initialDirtyPathsLength * 42; // HACK: better way?\n\n  if (iteration > maxIterations) {\n    throw new Error(\"Could not completely normalize the editor after \".concat(maxIterations, \" iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\"));\n  }\n  return true;\n};\nvar above = function above(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var _options$voids2 = options.voids,\n    voids = _options$voids2 === void 0 ? false : _options$voids2,\n    _options$mode = options.mode,\n    mode = _options$mode === void 0 ? 'lowest' : _options$mode,\n    _options$at2 = options.at,\n    at = _options$at2 === void 0 ? editor.selection : _options$at2,\n    match = options.match;\n  if (!at) {\n    return;\n  }\n  var path = Editor.path(editor, at);\n  var reverse = mode === 'lowest';\n  var _iterator25 = _createForOfIteratorHelper(Editor.levels(editor, {\n      at: path,\n      voids: voids,\n      match: match,\n      reverse: reverse\n    })),\n    _step25;\n  try {\n    for (_iterator25.s(); !(_step25 = _iterator25.n()).done;) {\n      var _step25$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step25.value, 2),\n        n = _step25$value[0],\n        p = _step25$value[1];\n      if (Text.isText(n)) continue;\n      if (Range.isRange(at)) {\n        if (Path.isAncestor(p, at.anchor.path) && Path.isAncestor(p, at.focus.path)) {\n          return [n, p];\n        }\n      } else {\n        if (!Path.equals(path, p)) {\n          return [n, p];\n        }\n      }\n    }\n  } catch (err) {\n    _iterator25.e(err);\n  } finally {\n    _iterator25.f();\n  }\n};\nfunction ownKeys$8(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$8(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context62;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context62 = ownKeys$8(Object(source), true)).call(_context62, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context63;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context63 = ownKeys$8(Object(source))).call(_context63, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar addMark = function addMark(editor, key, value) {\n  var selection = editor.selection;\n  if (selection) {\n    var match = function match(node, path) {\n      if (!Text.isText(node)) {\n        return false; // marks can only be applied to text\n      }\n      var _Editor$parent = Editor.parent(editor, path),\n        _Editor$parent2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent, 2),\n        parentNode = _Editor$parent2[0],\n        parentPath = _Editor$parent2[1];\n      return !editor.isVoid(parentNode) || editor.markableVoid(parentNode);\n    };\n    var expandedSelection = Range.isExpanded(selection);\n    var markAcceptingVoidSelected = false;\n    if (!expandedSelection) {\n      var _Editor$node3 = Editor.node(editor, selection),\n        _Editor$node4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$node3, 2),\n        selectedNode = _Editor$node4[0],\n        selectedPath = _Editor$node4[1];\n      if (selectedNode && match(selectedNode, selectedPath)) {\n        var _Editor$parent3 = Editor.parent(editor, selectedPath),\n          _Editor$parent4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent3, 1),\n          parentNode = _Editor$parent4[0];\n        markAcceptingVoidSelected = parentNode && editor.markableVoid(parentNode);\n      }\n    }\n    if (expandedSelection || markAcceptingVoidSelected) {\n      Transforms.setNodes(editor, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, key, value), {\n        match: match,\n        split: true,\n        voids: true\n      });\n    } else {\n      var marks = _objectSpread$8(_objectSpread$8({}, Editor.marks(editor) || {}), {}, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, key, value));\n      editor.marks = marks;\n      if (!FLUSHING.get(editor)) {\n        editor.onChange();\n      }\n    }\n  }\n};\nfunction ownKeys$7(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$7(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context64;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context64 = ownKeys$7(Object(source), true)).call(_context64, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context65;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context65 = ownKeys$7(Object(source))).call(_context65, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar after = function after(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var anchor = Editor.point(editor, at, {\n    edge: 'end'\n  });\n  var focus = Editor.end(editor, []);\n  var range = {\n    anchor: anchor,\n    focus: focus\n  };\n  var _options$distance = options.distance,\n    distance = _options$distance === void 0 ? 1 : _options$distance;\n  var d = 0;\n  var target;\n  var _iterator26 = _createForOfIteratorHelper(Editor.positions(editor, _objectSpread$7(_objectSpread$7({}, options), {}, {\n      at: range\n    }))),\n    _step26;\n  try {\n    for (_iterator26.s(); !(_step26 = _iterator26.n()).done;) {\n      var p = _step26.value;\n      if (d > distance) {\n        break;\n      }\n      if (d !== 0) {\n        target = p;\n      }\n      d++;\n    }\n  } catch (err) {\n    _iterator26.e(err);\n  } finally {\n    _iterator26.f();\n  }\n  return target;\n};\nfunction ownKeys$6(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$6(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context66;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context66 = ownKeys$6(Object(source), true)).call(_context66, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context67;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context67 = ownKeys$6(Object(source))).call(_context67, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar before = function before(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var anchor = Editor.start(editor, []);\n  var focus = Editor.point(editor, at, {\n    edge: 'start'\n  });\n  var range = {\n    anchor: anchor,\n    focus: focus\n  };\n  var _options$distance2 = options.distance,\n    distance = _options$distance2 === void 0 ? 1 : _options$distance2;\n  var d = 0;\n  var target;\n  var _iterator27 = _createForOfIteratorHelper(Editor.positions(editor, _objectSpread$6(_objectSpread$6({}, options), {}, {\n      at: range,\n      reverse: true\n    }))),\n    _step27;\n  try {\n    for (_iterator27.s(); !(_step27 = _iterator27.n()).done;) {\n      var p = _step27.value;\n      if (d > distance) {\n        break;\n      }\n      if (d !== 0) {\n        target = p;\n      }\n      d++;\n    }\n  } catch (err) {\n    _iterator27.e(err);\n  } finally {\n    _iterator27.f();\n  }\n  return target;\n};\nvar deleteBackward = function deleteBackward(editor, unit) {\n  var selection = editor.selection;\n  if (selection && Range.isCollapsed(selection)) {\n    Transforms.delete(editor, {\n      unit: unit,\n      reverse: true\n    });\n  }\n};\nvar deleteForward = function deleteForward(editor, unit) {\n  var selection = editor.selection;\n  if (selection && Range.isCollapsed(selection)) {\n    Transforms.delete(editor, {\n      unit: unit\n    });\n  }\n};\nvar deleteFragment = function deleteFragment(editor) {\n  var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n    _ref7$direction = _ref7.direction,\n    direction = _ref7$direction === void 0 ? 'forward' : _ref7$direction;\n  var selection = editor.selection;\n  if (selection && Range.isExpanded(selection)) {\n    Transforms.delete(editor, {\n      reverse: direction === 'backward'\n    });\n  }\n};\nvar edges = function edges(editor, at) {\n  return [Editor.start(editor, at), Editor.end(editor, at)];\n};\nfunction ownKeys$5(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$5(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context68;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context68 = ownKeys$5(Object(source), true)).call(_context68, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context69;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context69 = ownKeys$5(Object(source))).call(_context69, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar elementReadOnly = function elementReadOnly(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Editor.above(editor, _objectSpread$5(_objectSpread$5({}, options), {}, {\n    match: function match(n) {\n      return Element.isElement(n) && Editor.isElementReadOnly(editor, n);\n    }\n  }));\n};\nvar end = function end(editor, at) {\n  return Editor.point(editor, at, {\n    edge: 'end'\n  });\n};\nvar first = function first(editor, at) {\n  var path = Editor.path(editor, at, {\n    edge: 'start'\n  });\n  return Editor.node(editor, path);\n};\nvar fragment = function fragment(editor, at) {\n  var range = Editor.range(editor, at);\n  return Node.fragment(editor, range);\n};\nfunction ownKeys$4(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$4(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context70;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context70 = ownKeys$4(Object(source), true)).call(_context70, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context71;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context71 = ownKeys$4(Object(source))).call(_context71, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar getVoid = function getVoid(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return Editor.above(editor, _objectSpread$4(_objectSpread$4({}, options), {}, {\n    match: function match(n) {\n      return Element.isElement(n) && Editor.isVoid(editor, n);\n    }\n  }));\n};\nvar hasBlocks = function hasBlocks(editor, element) {\n  var _context72;\n  return _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_32___default()(_context72 = element.children).call(_context72, function (n) {\n    return Element.isElement(n) && Editor.isBlock(editor, n);\n  });\n};\nvar hasInlines = function hasInlines(editor, element) {\n  var _context73;\n  return _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_32___default()(_context73 = element.children).call(_context73, function (n) {\n    return Text.isText(n) || Editor.isInline(editor, n);\n  });\n};\nvar hasPath = function hasPath(editor, path) {\n  return Node.has(editor, path);\n};\nvar hasTexts = function hasTexts(editor, element) {\n  var _context74;\n  return _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_12___default()(_context74 = element.children).call(_context74, function (n) {\n    return Text.isText(n);\n  });\n};\nvar insertBreak = function insertBreak(editor) {\n  Transforms.splitNodes(editor, {\n    always: true\n  });\n};\nvar insertNode = function insertNode(editor, node, options) {\n  Transforms.insertNodes(editor, node, options);\n};\nvar insertSoftBreak = function insertSoftBreak(editor) {\n  Transforms.splitNodes(editor, {\n    always: true\n  });\n};\nfunction ownKeys$3(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$3(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context75;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context75 = ownKeys$3(Object(source), true)).call(_context75, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context76;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context76 = ownKeys$3(Object(source))).call(_context76, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar insertText = function insertText(editor, text) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var selection = editor.selection,\n    marks = editor.marks;\n  if (selection) {\n    if (marks) {\n      var node = _objectSpread$3({\n        text: text\n      }, marks);\n      Transforms.insertNodes(editor, node, {\n        at: options.at,\n        voids: options.voids\n      });\n    } else {\n      Transforms.insertText(editor, text, options);\n    }\n    editor.marks = null;\n  }\n};\nvar isBlock = function isBlock(editor, value) {\n  return !editor.isInline(value);\n};\nvar isEdge = function isEdge(editor, point, at) {\n  return Editor.isStart(editor, point, at) || Editor.isEnd(editor, point, at);\n};\nvar isEmpty = function isEmpty(editor, element) {\n  var children = element.children;\n  var _children = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children, 1),\n    first = _children[0];\n  return children.length === 0 || children.length === 1 && Text.isText(first) && first.text === '' && !editor.isVoid(element);\n};\nvar isEnd = function isEnd(editor, point, at) {\n  var end = Editor.end(editor, at);\n  return Point.equals(point, end);\n};\nvar isNormalizing = function isNormalizing(editor) {\n  var isNormalizing = NORMALIZING.get(editor);\n  return isNormalizing === undefined ? true : isNormalizing;\n};\nvar isStart = function isStart(editor, point, at) {\n  // PERF: If the offset isn't `0` we know it's not the start.\n  if (point.offset !== 0) {\n    return false;\n  }\n  var start = Editor.start(editor, at);\n  return Point.equals(point, start);\n};\nvar last = function last(editor, at) {\n  var path = Editor.path(editor, at, {\n    edge: 'end'\n  });\n  return Editor.node(editor, path);\n};\nvar leaf = function leaf(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var path = Editor.path(editor, at, options);\n  var node = Node.leaf(editor, path);\n  return [node, path];\n};\nfunction levels(editor) {\n  var options,\n    _options$at3,\n    at,\n    _options$reverse6,\n    reverse,\n    _options$voids3,\n    voids,\n    match,\n    levels,\n    path,\n    _iterator28,\n    _step28,\n    _step28$value,\n    n,\n    p,\n    _args10 = arguments;\n  return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function levels$(_context77) {\n    while (1) switch (_context77.prev = _context77.next) {\n      case 0:\n        options = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {};\n        _options$at3 = options.at, at = _options$at3 === void 0 ? editor.selection : _options$at3, _options$reverse6 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options), reverse = _options$reverse6 === void 0 ? false : _options$reverse6, _options$voids3 = options.voids, voids = _options$voids3 === void 0 ? false : _options$voids3;\n        match = options.match;\n        if (match == null) {\n          match = function match() {\n            return true;\n          };\n        }\n        if (at) {\n          _context77.next = 6;\n          break;\n        }\n        return _context77.abrupt(\"return\");\n      case 6:\n        levels = [];\n        path = Editor.path(editor, at);\n        _iterator28 = _createForOfIteratorHelper(Node.levels(editor, path));\n        _context77.prev = 9;\n        _iterator28.s();\n      case 11:\n        if ((_step28 = _iterator28.n()).done) {\n          _context77.next = 20;\n          break;\n        }\n        _step28$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step28.value, 2), n = _step28$value[0], p = _step28$value[1];\n        if (match(n, p)) {\n          _context77.next = 15;\n          break;\n        }\n        return _context77.abrupt(\"continue\", 18);\n      case 15:\n        levels.push([n, p]);\n        if (!(!voids && Element.isElement(n) && Editor.isVoid(editor, n))) {\n          _context77.next = 18;\n          break;\n        }\n        return _context77.abrupt(\"break\", 20);\n      case 18:\n        _context77.next = 11;\n        break;\n      case 20:\n        _context77.next = 25;\n        break;\n      case 22:\n        _context77.prev = 22;\n        _context77.t0 = _context77[\"catch\"](9);\n        _iterator28.e(_context77.t0);\n      case 25:\n        _context77.prev = 25;\n        _iterator28.f();\n        return _context77.finish(25);\n      case 28:\n        if (reverse) {\n          _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(levels).call(levels);\n        }\n        return _context77.delegateYield(levels, \"t1\", 30);\n      case 30:\n      case \"end\":\n        return _context77.stop();\n    }\n  }, _marked, null, [[9, 22, 25, 28]]);\n}\nvar _excluded$1 = [\"text\"],\n  _excluded2$1 = [\"text\"];\nvar marks = function marks(editor) {\n  var marks = editor.marks,\n    selection = editor.selection;\n  if (!selection) {\n    return null;\n  }\n  if (marks) {\n    return marks;\n  }\n  if (Range.isExpanded(selection)) {\n    var _Editor$nodes = Editor.nodes(editor, {\n        match: Text.isText\n      }),\n      _Editor$nodes2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes, 1),\n      match = _Editor$nodes2[0];\n    if (match) {\n      var _match = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(match, 1),\n        _node = _match[0];\n      var _rest = _objectWithoutProperties(_node, _excluded$1);\n      return _rest;\n    } else {\n      return {};\n    }\n  }\n  var anchor = selection.anchor;\n  var path = anchor.path;\n  var _Editor$leaf = Editor.leaf(editor, path),\n    _Editor$leaf2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$leaf, 1),\n    node = _Editor$leaf2[0];\n  if (anchor.offset === 0) {\n    var prev = Editor.previous(editor, {\n      at: path,\n      match: Text.isText\n    });\n    var markedVoid = Editor.above(editor, {\n      match: function match(n) {\n        return Element.isElement(n) && Editor.isVoid(editor, n) && editor.markableVoid(n);\n      }\n    });\n    if (!markedVoid) {\n      var block = Editor.above(editor, {\n        match: function match(n) {\n          return Element.isElement(n) && Editor.isBlock(editor, n);\n        }\n      });\n      if (prev && block) {\n        var _prev2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(prev, 2),\n          prevNode = _prev2[0],\n          prevPath = _prev2[1];\n        var _block = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(block, 2),\n          blockPath = _block[1];\n        if (Path.isAncestor(blockPath, prevPath)) {\n          node = prevNode;\n        }\n      }\n    }\n  }\n  var rest = _objectWithoutProperties(node, _excluded2$1);\n  return rest;\n};\nvar next = function next(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var _options$mode2 = options.mode,\n    mode = _options$mode2 === void 0 ? 'lowest' : _options$mode2,\n    _options$voids4 = options.voids,\n    voids = _options$voids4 === void 0 ? false : _options$voids4;\n  var match = options.match,\n    _options$at4 = options.at,\n    at = _options$at4 === void 0 ? editor.selection : _options$at4;\n  if (!at) {\n    return;\n  }\n  var pointAfterLocation = Editor.after(editor, at, {\n    voids: voids\n  });\n  if (!pointAfterLocation) return;\n  var _Editor$last = Editor.last(editor, []),\n    _Editor$last2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$last, 2),\n    to = _Editor$last2[1];\n  var span = [pointAfterLocation.path, to];\n  if (Path.isPath(at) && at.length === 0) {\n    throw new Error(\"Cannot get the next node from the root node!\");\n  }\n  if (match == null) {\n    if (Path.isPath(at)) {\n      var _Editor$parent5 = Editor.parent(editor, at),\n        _Editor$parent6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent5, 1),\n        parent = _Editor$parent6[0];\n      match = function match(n) {\n        var _context78;\n        return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(_context78 = parent.children).call(_context78, n);\n      };\n    } else {\n      match = function match() {\n        return true;\n      };\n    }\n  }\n  var _Editor$nodes3 = Editor.nodes(editor, {\n      at: span,\n      match: match,\n      mode: mode,\n      voids: voids\n    }),\n    _Editor$nodes4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes3, 1),\n    next = _Editor$nodes4[0];\n  return next;\n};\nvar node = function node(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var path = Editor.path(editor, at, options);\n  var node = Node.get(editor, path);\n  return [node, path];\n};\nfunction nodes(editor) {\n  var options,\n    _options$at5,\n    at,\n    _options$mode3,\n    mode,\n    _options$universal,\n    universal,\n    _options$reverse7,\n    reverse,\n    _options$voids5,\n    voids,\n    _options$ignoreNonSel,\n    ignoreNonSelectable,\n    match,\n    from,\n    to,\n    first,\n    last,\n    nodeEntries,\n    matches,\n    hit,\n    _iterator29,\n    _step29,\n    _step29$value,\n    node,\n    path,\n    isLower,\n    emit,\n    _args11 = arguments;\n  return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function nodes$(_context79) {\n    while (1) switch (_context79.prev = _context79.next) {\n      case 0:\n        options = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};\n        _options$at5 = options.at, at = _options$at5 === void 0 ? editor.selection : _options$at5, _options$mode3 = options.mode, mode = _options$mode3 === void 0 ? 'all' : _options$mode3, _options$universal = options.universal, universal = _options$universal === void 0 ? false : _options$universal, _options$reverse7 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options), reverse = _options$reverse7 === void 0 ? false : _options$reverse7, _options$voids5 = options.voids, voids = _options$voids5 === void 0 ? false : _options$voids5, _options$ignoreNonSel = options.ignoreNonSelectable, ignoreNonSelectable = _options$ignoreNonSel === void 0 ? false : _options$ignoreNonSel;\n        match = options.match;\n        if (!match) {\n          match = function match() {\n            return true;\n          };\n        }\n        if (at) {\n          _context79.next = 6;\n          break;\n        }\n        return _context79.abrupt(\"return\");\n      case 6:\n        if (Span.isSpan(at)) {\n          from = at[0];\n          to = at[1];\n        } else {\n          first = Editor.path(editor, at, {\n            edge: 'start'\n          });\n          last = Editor.path(editor, at, {\n            edge: 'end'\n          });\n          from = reverse ? last : first;\n          to = reverse ? first : last;\n        }\n        nodeEntries = Node.nodes(editor, {\n          reverse: reverse,\n          from: from,\n          to: to,\n          pass: function pass(_ref) {\n            var _ref8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 1),\n              node = _ref8[0];\n            if (!Element.isElement(node)) return false;\n            if (!voids && (Editor.isVoid(editor, node) || Editor.isElementReadOnly(editor, node))) return true;\n            if (ignoreNonSelectable && !Editor.isSelectable(editor, node)) return true;\n            return false;\n          }\n        });\n        matches = [];\n        _iterator29 = _createForOfIteratorHelper(nodeEntries);\n        _context79.prev = 10;\n        _iterator29.s();\n      case 12:\n        if ((_step29 = _iterator29.n()).done) {\n          _context79.next = 39;\n          break;\n        }\n        _step29$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step29.value, 2), node = _step29$value[0], path = _step29$value[1];\n        if (!(ignoreNonSelectable && Element.isElement(node) && !Editor.isSelectable(editor, node))) {\n          _context79.next = 16;\n          break;\n        }\n        return _context79.abrupt(\"continue\", 37);\n      case 16:\n        isLower = hit && Path.compare(path, hit[1]) === 0; // In highest mode any node lower than the last hit is not a match.\n        if (!(mode === 'highest' && isLower)) {\n          _context79.next = 19;\n          break;\n        }\n        return _context79.abrupt(\"continue\", 37);\n      case 19:\n        if (match(node, path)) {\n          _context79.next = 25;\n          break;\n        }\n        if (!(universal && !isLower && Text.isText(node))) {\n          _context79.next = 24;\n          break;\n        }\n        return _context79.abrupt(\"return\");\n      case 24:\n        return _context79.abrupt(\"continue\", 37);\n      case 25:\n        if (!(mode === 'lowest' && isLower)) {\n          _context79.next = 28;\n          break;\n        }\n        hit = [node, path];\n        return _context79.abrupt(\"continue\", 37);\n      case 28:\n        // In lowest mode we emit the last hit, once it's guaranteed lowest.\n        emit = mode === 'lowest' ? hit : [node, path];\n        if (!emit) {\n          _context79.next = 36;\n          break;\n        }\n        if (!universal) {\n          _context79.next = 34;\n          break;\n        }\n        matches.push(emit);\n        _context79.next = 36;\n        break;\n      case 34:\n        _context79.next = 36;\n        return emit;\n      case 36:\n        hit = [node, path];\n      case 37:\n        _context79.next = 12;\n        break;\n      case 39:\n        _context79.next = 44;\n        break;\n      case 41:\n        _context79.prev = 41;\n        _context79.t0 = _context79[\"catch\"](10);\n        _iterator29.e(_context79.t0);\n      case 44:\n        _context79.prev = 44;\n        _iterator29.f();\n        return _context79.finish(44);\n      case 47:\n        if (!(mode === 'lowest' && hit)) {\n          _context79.next = 54;\n          break;\n        }\n        if (!universal) {\n          _context79.next = 52;\n          break;\n        }\n        matches.push(hit);\n        _context79.next = 54;\n        break;\n      case 52:\n        _context79.next = 54;\n        return hit;\n      case 54:\n        if (!universal) {\n          _context79.next = 56;\n          break;\n        }\n        return _context79.delegateYield(matches, \"t1\", 56);\n      case 56:\n      case \"end\":\n        return _context79.stop();\n    }\n  }, _marked2, null, [[10, 41, 44, 47]]);\n}\nvar normalize = function normalize(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var _options$force = options.force,\n    force = _options$force === void 0 ? false : _options$force,\n    operation = options.operation;\n  var getDirtyPaths = function getDirtyPaths(editor) {\n    return DIRTY_PATHS.get(editor) || [];\n  };\n  var getDirtyPathKeys = function getDirtyPathKeys(editor) {\n    return DIRTY_PATH_KEYS.get(editor) || new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n  };\n  var popDirtyPath = function popDirtyPath(editor) {\n    var path = getDirtyPaths(editor).pop();\n    var key = path.join(',');\n    getDirtyPathKeys(editor).delete(key);\n    return path;\n  };\n  if (!Editor.isNormalizing(editor)) {\n    return;\n  }\n  if (force) {\n    var allPaths = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(Node.nodes(editor), function (_ref) {\n      var _ref9 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        p = _ref9[1];\n      return p;\n    });\n    var allPathKeys = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_26___default()(allPaths).call(allPaths, function (p) {\n      return p.join(',');\n    }));\n    DIRTY_PATHS.set(editor, allPaths);\n    DIRTY_PATH_KEYS.set(editor, allPathKeys);\n  }\n  if (getDirtyPaths(editor).length === 0) {\n    return;\n  }\n  Editor.withoutNormalizing(editor, function () {\n    /*\n      Fix dirty elements with no children.\n      editor.normalizeNode() does fix this, but some normalization fixes also require it to work.\n      Running an initial pass avoids the catch-22 race condition.\n    */\n    var _iterator30 = _createForOfIteratorHelper(getDirtyPaths(editor)),\n      _step30;\n    try {\n      for (_iterator30.s(); !(_step30 = _iterator30.n()).done;) {\n        var dirtyPath = _step30.value;\n        if (Node.has(editor, dirtyPath)) {\n          var entry = Editor.node(editor, dirtyPath);\n          var _entry3 = entry,\n            _entry4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_entry3, 2),\n            node = _entry4[0],\n            _ = _entry4[1];\n          /*\n            The default normalizer inserts an empty text node in this scenario, but it can be customised.\n            So there is some risk here.\n                     As long as the normalizer only inserts child nodes for this case it is safe to do in any order;\n            by definition adding children to an empty node can't cause other paths to change.\n          */\n\n          if (Element.isElement(node) && node.children.length === 0) {\n            editor.normalizeNode(entry, {\n              operation: operation\n            });\n          }\n        }\n      }\n    } catch (err) {\n      _iterator30.e(err);\n    } finally {\n      _iterator30.f();\n    }\n    var dirtyPaths = getDirtyPaths(editor);\n    var initialDirtyPathsLength = dirtyPaths.length;\n    var iteration = 0;\n    while (dirtyPaths.length !== 0) {\n      if (!editor.shouldNormalize({\n        dirtyPaths: dirtyPaths,\n        iteration: iteration,\n        initialDirtyPathsLength: initialDirtyPathsLength,\n        operation: operation\n      })) {\n        return;\n      }\n      var _dirtyPath = popDirtyPath(editor); // If the node doesn't exist in the tree, it does not need to be normalized.\n\n      if (Node.has(editor, _dirtyPath)) {\n        var _entry = Editor.node(editor, _dirtyPath);\n        editor.normalizeNode(_entry, {\n          operation: operation\n        });\n      }\n      iteration++;\n      dirtyPaths = getDirtyPaths(editor);\n    }\n  });\n};\nvar parent = function parent(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var path = Editor.path(editor, at, options);\n  var parentPath = Path.parent(path);\n  var entry = Editor.node(editor, parentPath);\n  return entry;\n};\nvar pathRef = function pathRef(editor, path) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var _options$affinity4 = options.affinity,\n    affinity = _options$affinity4 === void 0 ? 'forward' : _options$affinity4;\n  var ref = {\n    current: path,\n    affinity: affinity,\n    unref: function unref() {\n      var current = ref.current;\n      var pathRefs = Editor.pathRefs(editor);\n      pathRefs.delete(ref);\n      ref.current = null;\n      return current;\n    }\n  };\n  var refs = Editor.pathRefs(editor);\n  refs.add(ref);\n  return ref;\n};\nvar pathRefs = function pathRefs(editor) {\n  var refs = PATH_REFS.get(editor);\n  if (!refs) {\n    refs = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n    PATH_REFS.set(editor, refs);\n  }\n  return refs;\n};\nvar path = function path(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var depth = options.depth,\n    edge = options.edge;\n  if (Path.isPath(at)) {\n    if (edge === 'start') {\n      var _Node$first = Node.first(editor, at),\n        _Node$first2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Node$first, 2),\n        firstPath = _Node$first2[1];\n      at = firstPath;\n    } else if (edge === 'end') {\n      var _Node$last = Node.last(editor, at),\n        _Node$last2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Node$last, 2),\n        lastPath = _Node$last2[1];\n      at = lastPath;\n    }\n  }\n  if (Range.isRange(at)) {\n    if (edge === 'start') {\n      at = Range.start(at);\n    } else if (edge === 'end') {\n      at = Range.end(at);\n    } else {\n      at = Path.common(at.anchor.path, at.focus.path);\n    }\n  }\n  if (Point.isPoint(at)) {\n    at = at.path;\n  }\n  if (depth != null) {\n    at = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(at).call(at, 0, depth);\n  }\n  return at;\n};\nvar pointRef = function pointRef(editor, point) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var _options$affinity5 = options.affinity,\n    affinity = _options$affinity5 === void 0 ? 'forward' : _options$affinity5;\n  var ref = {\n    current: point,\n    affinity: affinity,\n    unref: function unref() {\n      var current = ref.current;\n      var pointRefs = Editor.pointRefs(editor);\n      pointRefs.delete(ref);\n      ref.current = null;\n      return current;\n    }\n  };\n  var refs = Editor.pointRefs(editor);\n  refs.add(ref);\n  return ref;\n};\nvar pointRefs = function pointRefs(editor) {\n  var refs = POINT_REFS.get(editor);\n  if (!refs) {\n    refs = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n    POINT_REFS.set(editor, refs);\n  }\n  return refs;\n};\nvar point = function point(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var _options$edge = options.edge,\n    edge = _options$edge === void 0 ? 'start' : _options$edge;\n  if (Path.isPath(at)) {\n    var path;\n    if (edge === 'end') {\n      var _Node$last3 = Node.last(editor, at),\n        _Node$last4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Node$last3, 2),\n        lastPath = _Node$last4[1];\n      path = lastPath;\n    } else {\n      var _Node$first3 = Node.first(editor, at),\n        _Node$first4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Node$first3, 2),\n        firstPath = _Node$first4[1];\n      path = firstPath;\n    }\n    var node = Node.get(editor, path);\n    if (!Text.isText(node)) {\n      var _context80, _context81;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context80 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context81 = \"Cannot get the \".concat(edge, \" point in the node at path [\")).call(_context81, at, \"] because it has no \")).call(_context80, edge, \" text node.\"));\n    }\n    return {\n      path: path,\n      offset: edge === 'end' ? node.text.length : 0\n    };\n  }\n  if (Range.isRange(at)) {\n    var _Range$edges19 = Range.edges(at),\n      _Range$edges20 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges19, 2),\n      start = _Range$edges20[0],\n      end = _Range$edges20[1];\n    return edge === 'start' ? start : end;\n  }\n  return at;\n};\nfunction positions(editor) {\n  var options,\n    _options$at6,\n    at,\n    _options$unit3,\n    unit,\n    _options$reverse8,\n    reverse,\n    _options$voids6,\n    voids,\n    _options$ignoreNonSel2,\n    ignoreNonSelectable,\n    range,\n    _Range$edges21,\n    _Range$edges22,\n    start,\n    end,\n    first,\n    isNewBlock,\n    blockText,\n    distance,\n    leafTextRemaining,\n    leafTextOffset,\n    _iterator31,\n    _step31,\n    _step31$value,\n    node,\n    path,\n    e,\n    s,\n    isFirst,\n    calcDistance,\n    _args12 = arguments;\n  return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_6___default().wrap(function positions$(_context82) {\n    while (1) switch (_context82.prev = _context82.next) {\n      case 0:\n        calcDistance = function _calcDistance(text, unit, reverse) {\n          if (unit === 'character') {\n            return getCharacterDistance(text, reverse);\n          } else if (unit === 'word') {\n            return getWordDistance(text, reverse);\n          } else if (unit === 'line' || unit === 'block') {\n            return text.length;\n          }\n          return 1;\n        };\n        options = _args12.length > 1 && _args12[1] !== undefined ? _args12[1] : {};\n        _options$at6 = options.at, at = _options$at6 === void 0 ? editor.selection : _options$at6, _options$unit3 = options.unit, unit = _options$unit3 === void 0 ? 'offset' : _options$unit3, _options$reverse8 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options), reverse = _options$reverse8 === void 0 ? false : _options$reverse8, _options$voids6 = options.voids, voids = _options$voids6 === void 0 ? false : _options$voids6, _options$ignoreNonSel2 = options.ignoreNonSelectable, ignoreNonSelectable = _options$ignoreNonSel2 === void 0 ? false : _options$ignoreNonSel2;\n        if (at) {\n          _context82.next = 5;\n          break;\n        }\n        return _context82.abrupt(\"return\");\n      case 5:\n        /**\n         * Algorithm notes:\n         *\n         * Each step `distance` is dynamic depending on the underlying text\n         * and the `unit` specified.  Each step, e.g., a line or word, may\n         * span multiple text nodes, so we iterate through the text both on\n         * two levels in step-sync:\n         *\n         * `leafText` stores the text on a text leaf level, and is advanced\n         * through using the counters `leafTextOffset` and `leafTextRemaining`.\n         *\n         * `blockText` stores the text on a block level, and is shortened\n         * by `distance` every time it is advanced.\n         *\n         * We only maintain a window of one blockText and one leafText because\n         * a block node always appears before all of its leaf nodes.\n         */\n        range = Editor.range(editor, at);\n        _Range$edges21 = Range.edges(range), _Range$edges22 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges21, 2), start = _Range$edges22[0], end = _Range$edges22[1];\n        first = reverse ? end : start;\n        isNewBlock = false;\n        blockText = '';\n        distance = 0; // Distance for leafText to catch up to blockText.\n        leafTextRemaining = 0;\n        leafTextOffset = 0; // Iterate through all nodes in range, grabbing entire textual content\n        // of block nodes in blockText, and text nodes in leafText.\n        // Exploits the fact that nodes are sequenced in such a way that we first\n        // encounter the block node, then all of its text nodes, so when iterating\n        // through the blockText and leafText we just need to remember a window of\n        // one block node and leaf node, respectively.\n        _iterator31 = _createForOfIteratorHelper(Editor.nodes(editor, {\n          at: at,\n          reverse: reverse,\n          voids: voids,\n          ignoreNonSelectable: ignoreNonSelectable\n        }));\n        _context82.prev = 14;\n        _iterator31.s();\n      case 16:\n        if ((_step31 = _iterator31.n()).done) {\n          _context82.next = 51;\n          break;\n        }\n        _step31$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step31.value, 2), node = _step31$value[0], path = _step31$value[1];\n        if (!Element.isElement(node)) {\n          _context82.next = 26;\n          break;\n        }\n        if (!(!voids && (editor.isVoid(node) || editor.isElementReadOnly(node)))) {\n          _context82.next = 23;\n          break;\n        }\n        _context82.next = 22;\n        return Editor.start(editor, path);\n      case 22:\n        return _context82.abrupt(\"continue\", 49);\n      case 23:\n        if (!editor.isInline(node)) {\n          _context82.next = 25;\n          break;\n        }\n        return _context82.abrupt(\"continue\", 49);\n      case 25:\n        // Block element node - set `blockText` to its text content.\n\n        if (Editor.hasInlines(editor, node)) {\n          // We always exhaust block nodes before encountering a new one:\n          //   console.assert(blockText === '',\n          //     `blockText='${blockText}' - `+\n          //     `not exhausted before new block node`, path)\n          // Ensure range considered is capped to `range`, in the\n          // start/end edge cases where block extends beyond range.\n          // Equivalent to this, but presumably more performant:\n          //   blockRange = Editor.range(editor, ...Editor.edges(editor, path))\n          //   blockRange = Range.intersection(range, blockRange) // intersect\n          //   blockText = Editor.string(editor, blockRange, { voids })\n          e = Path.isAncestor(path, end.path) ? end : Editor.end(editor, path);\n          s = Path.isAncestor(path, start.path) ? start : Editor.start(editor, path);\n          blockText = Editor.string(editor, {\n            anchor: s,\n            focus: e\n          }, {\n            voids: voids\n          });\n          isNewBlock = true;\n        }\n      case 26:\n        if (!Text.isText(node)) {\n          _context82.next = 49;\n          break;\n        }\n        isFirst = Path.equals(path, first.path); // Proof that we always exhaust text nodes before encountering a new one:\n        //   console.assert(leafTextRemaining <= 0,\n        //     `leafTextRemaining=${leafTextRemaining} - `+\n        //     `not exhausted before new leaf text node`, path)\n        // Reset `leafText` counters for new text node.\n        if (isFirst) {\n          leafTextRemaining = reverse ? first.offset : node.text.length - first.offset;\n          leafTextOffset = first.offset; // Works for reverse too.\n        } else {\n          leafTextRemaining = node.text.length;\n          leafTextOffset = reverse ? leafTextRemaining : 0;\n        } // Yield position at the start of node (potentially).\n        if (!(isFirst || isNewBlock || unit === 'offset')) {\n          _context82.next = 33;\n          break;\n        }\n        _context82.next = 32;\n        return {\n          path: path,\n          offset: leafTextOffset\n        };\n      case 32:\n        isNewBlock = false;\n      case 33:\n        if (false) {}\n        if (!(distance === 0)) {\n          _context82.next = 39;\n          break;\n        }\n        if (!(blockText === '')) {\n          _context82.next = 37;\n          break;\n        }\n        return _context82.abrupt(\"break\", 49);\n      case 37:\n        distance = calcDistance(blockText, unit, reverse); // Split the string at the previously found distance and use the\n        // remaining string for the next iteration.\n\n        blockText = splitByCharacterDistance(blockText, distance, reverse)[1];\n      case 39:\n        // Advance `leafText` by the current `distance`.\n\n        leafTextOffset = reverse ? leafTextOffset - distance : leafTextOffset + distance;\n        leafTextRemaining = leafTextRemaining - distance; // If `leafText` is exhausted, break to get a new leaf node\n        // and set distance to the overflow amount, so we'll (maybe)\n        // catch up to blockText in the next leaf text node.\n        if (!(leafTextRemaining < 0)) {\n          _context82.next = 44;\n          break;\n        }\n        distance = -leafTextRemaining;\n        return _context82.abrupt(\"break\", 49);\n      case 44:\n        // Successfully walked `distance` offsets through `leafText`\n        // to catch up with `blockText`, so we can reset `distance`\n        // and yield this position in this node.\n\n        distance = 0;\n        _context82.next = 47;\n        return {\n          path: path,\n          offset: leafTextOffset\n        };\n      case 47:\n        _context82.next = 33;\n        break;\n      case 49:\n        _context82.next = 16;\n        break;\n      case 51:\n        _context82.next = 56;\n        break;\n      case 53:\n        _context82.prev = 53;\n        _context82.t0 = _context82[\"catch\"](14);\n        _iterator31.e(_context82.t0);\n      case 56:\n        _context82.prev = 56;\n        _iterator31.f();\n        return _context82.finish(56);\n      case 59:\n      case \"end\":\n        return _context82.stop();\n    }\n  }, _marked3, null, [[14, 53, 56, 59]]);\n}\nvar previous = function previous(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var _options$mode4 = options.mode,\n    mode = _options$mode4 === void 0 ? 'lowest' : _options$mode4,\n    _options$voids7 = options.voids,\n    voids = _options$voids7 === void 0 ? false : _options$voids7;\n  var match = options.match,\n    _options$at7 = options.at,\n    at = _options$at7 === void 0 ? editor.selection : _options$at7;\n  if (!at) {\n    return;\n  }\n  var pointBeforeLocation = Editor.before(editor, at, {\n    voids: voids\n  });\n  if (!pointBeforeLocation) {\n    return;\n  }\n  var _Editor$first = Editor.first(editor, []),\n    _Editor$first2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$first, 2),\n    to = _Editor$first2[1]; // The search location is from the start of the document to the path of\n  // the point before the location passed in\n\n  var span = [pointBeforeLocation.path, to];\n  if (Path.isPath(at) && at.length === 0) {\n    throw new Error(\"Cannot get the previous node from the root node!\");\n  }\n  if (match == null) {\n    if (Path.isPath(at)) {\n      var _Editor$parent7 = Editor.parent(editor, at),\n        _Editor$parent8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent7, 1),\n        parent = _Editor$parent8[0];\n      match = function match(n) {\n        var _context83;\n        return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(_context83 = parent.children).call(_context83, n);\n      };\n    } else {\n      match = function match() {\n        return true;\n      };\n    }\n  }\n  var _Editor$nodes5 = Editor.nodes(editor, {\n      reverse: true,\n      at: span,\n      match: match,\n      mode: mode,\n      voids: voids\n    }),\n    _Editor$nodes6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes5, 1),\n    previous = _Editor$nodes6[0];\n  return previous;\n};\nvar rangeRef = function rangeRef(editor, range) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var _options$affinity6 = options.affinity,\n    affinity = _options$affinity6 === void 0 ? 'forward' : _options$affinity6;\n  var ref = {\n    current: range,\n    affinity: affinity,\n    unref: function unref() {\n      var current = ref.current;\n      var rangeRefs = Editor.rangeRefs(editor);\n      rangeRefs.delete(ref);\n      ref.current = null;\n      return current;\n    }\n  };\n  var refs = Editor.rangeRefs(editor);\n  refs.add(ref);\n  return ref;\n};\nvar rangeRefs = function rangeRefs(editor) {\n  var refs = RANGE_REFS.get(editor);\n  if (!refs) {\n    refs = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_25___default())();\n    RANGE_REFS.set(editor, refs);\n  }\n  return refs;\n};\nvar range = function range(editor, at, to) {\n  if (Range.isRange(at) && !to) {\n    return at;\n  }\n  var start = Editor.start(editor, at);\n  var end = Editor.end(editor, to || at);\n  return {\n    anchor: start,\n    focus: end\n  };\n};\nfunction ownKeys$2(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context84;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context84 = ownKeys$2(Object(source), true)).call(_context84, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context85;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context85 = ownKeys$2(Object(source))).call(_context85, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar removeMark = function removeMark(editor, key) {\n  var selection = editor.selection;\n  if (selection) {\n    var match = function match(node, path) {\n      if (!Text.isText(node)) {\n        return false; // marks can only be applied to text\n      }\n      var _Editor$parent9 = Editor.parent(editor, path),\n        _Editor$parent10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent9, 2),\n        parentNode = _Editor$parent10[0],\n        parentPath = _Editor$parent10[1];\n      return !editor.isVoid(parentNode) || editor.markableVoid(parentNode);\n    };\n    var expandedSelection = Range.isExpanded(selection);\n    var markAcceptingVoidSelected = false;\n    if (!expandedSelection) {\n      var _Editor$node5 = Editor.node(editor, selection),\n        _Editor$node6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$node5, 2),\n        selectedNode = _Editor$node6[0],\n        selectedPath = _Editor$node6[1];\n      if (selectedNode && match(selectedNode, selectedPath)) {\n        var _Editor$parent11 = Editor.parent(editor, selectedPath),\n          _Editor$parent12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent11, 1),\n          parentNode = _Editor$parent12[0];\n        markAcceptingVoidSelected = parentNode && editor.markableVoid(parentNode);\n      }\n    }\n    if (expandedSelection || markAcceptingVoidSelected) {\n      Transforms.unsetNodes(editor, key, {\n        match: match,\n        split: true,\n        voids: true\n      });\n    } else {\n      var marks = _objectSpread$2({}, Editor.marks(editor) || {});\n      delete marks[key];\n      editor.marks = marks;\n      if (!FLUSHING.get(editor)) {\n        editor.onChange();\n      }\n    }\n  }\n};\nvar setNormalizing = function setNormalizing(editor, isNormalizing) {\n  NORMALIZING.set(editor, isNormalizing);\n};\nvar start = function start(editor, at) {\n  return Editor.point(editor, at, {\n    edge: 'start'\n  });\n};\nvar string = function string(editor, at) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var _options$voids8 = options.voids,\n    voids = _options$voids8 === void 0 ? false : _options$voids8;\n  var range = Editor.range(editor, at);\n  var _Range$edges23 = Range.edges(range),\n    _Range$edges24 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges23, 2),\n    start = _Range$edges24[0],\n    end = _Range$edges24[1];\n  var text = '';\n  var _iterator32 = _createForOfIteratorHelper(Editor.nodes(editor, {\n      at: range,\n      match: Text.isText,\n      voids: voids\n    })),\n    _step32;\n  try {\n    for (_iterator32.s(); !(_step32 = _iterator32.n()).done;) {\n      var _step32$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step32.value, 2),\n        node = _step32$value[0],\n        path = _step32$value[1];\n      var t = node.text;\n      if (Path.equals(path, end.path)) {\n        t = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(t).call(t, 0, end.offset);\n      }\n      if (Path.equals(path, start.path)) {\n        t = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(t).call(t, start.offset);\n      }\n      text += t;\n    }\n  } catch (err) {\n    _iterator32.e(err);\n  } finally {\n    _iterator32.f();\n  }\n  return text;\n};\nvar unhangRange = function unhangRange(editor, range) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var _options$voids9 = options.voids,\n    voids = _options$voids9 === void 0 ? false : _options$voids9;\n  var _Range$edges25 = Range.edges(range),\n    _Range$edges26 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges25, 2),\n    start = _Range$edges26[0],\n    end = _Range$edges26[1]; // PERF: exit early if we can guarantee that the range isn't hanging.\n\n  if (start.offset !== 0 || end.offset !== 0 || Range.isCollapsed(range) || Path.hasPrevious(end.path)) {\n    return range;\n  }\n  var endBlock = Editor.above(editor, {\n    at: end,\n    match: function match(n) {\n      return Element.isElement(n) && Editor.isBlock(editor, n);\n    },\n    voids: voids\n  });\n  var blockPath = endBlock ? endBlock[1] : [];\n  var first = Editor.start(editor, start);\n  var before = {\n    anchor: first,\n    focus: end\n  };\n  var skip = true;\n  var _iterator33 = _createForOfIteratorHelper(Editor.nodes(editor, {\n      at: before,\n      match: Text.isText,\n      reverse: true,\n      voids: voids\n    })),\n    _step33;\n  try {\n    for (_iterator33.s(); !(_step33 = _iterator33.n()).done;) {\n      var _step33$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step33.value, 2),\n        node = _step33$value[0],\n        path = _step33$value[1];\n      if (skip) {\n        skip = false;\n        continue;\n      }\n      if (node.text !== '' || Path.isBefore(path, blockPath)) {\n        end = {\n          path: path,\n          offset: node.text.length\n        };\n        break;\n      }\n    }\n  } catch (err) {\n    _iterator33.e(err);\n  } finally {\n    _iterator33.f();\n  }\n  return {\n    anchor: start,\n    focus: end\n  };\n};\nvar withoutNormalizing = function withoutNormalizing(editor, fn) {\n  var value = Editor.isNormalizing(editor);\n  Editor.setNormalizing(editor, false);\n  try {\n    fn();\n  } finally {\n    Editor.setNormalizing(editor, value);\n  }\n  Editor.normalize(editor);\n};\nvar deleteText = function deleteText(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _context87, _context88, _context89;\n    var _Editor$void, _Editor$void2;\n    var _options$reverse9 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options),\n      reverse = _options$reverse9 === void 0 ? false : _options$reverse9,\n      _options$unit4 = options.unit,\n      unit = _options$unit4 === void 0 ? 'character' : _options$unit4,\n      _options$distance3 = options.distance,\n      distance = _options$distance3 === void 0 ? 1 : _options$distance3,\n      _options$voids10 = options.voids,\n      voids = _options$voids10 === void 0 ? false : _options$voids10;\n    var _options$at8 = options.at,\n      at = _options$at8 === void 0 ? editor.selection : _options$at8,\n      _options$hanging = options.hanging,\n      hanging = _options$hanging === void 0 ? false : _options$hanging;\n    if (!at) {\n      return;\n    }\n    var isCollapsed = false;\n    if (Range.isRange(at) && Range.isCollapsed(at)) {\n      isCollapsed = true;\n      at = at.anchor;\n    }\n    if (Point.isPoint(at)) {\n      var furthestVoid = Editor.void(editor, {\n        at: at,\n        mode: 'highest'\n      });\n      if (!voids && furthestVoid) {\n        var _furthestVoid = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(furthestVoid, 2),\n          voidPath = _furthestVoid[1];\n        at = voidPath;\n      } else {\n        var opts = {\n          unit: unit,\n          distance: distance\n        };\n        var target = reverse ? Editor.before(editor, at, opts) || Editor.start(editor, []) : Editor.after(editor, at, opts) || Editor.end(editor, []);\n        at = {\n          anchor: at,\n          focus: target\n        };\n        hanging = true;\n      }\n    }\n    if (Path.isPath(at)) {\n      Transforms.removeNodes(editor, {\n        at: at,\n        voids: voids\n      });\n      return;\n    }\n    if (Range.isCollapsed(at)) {\n      return;\n    }\n    if (!hanging) {\n      var _Range$edges27 = Range.edges(at),\n        _Range$edges28 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges27, 2),\n        _end = _Range$edges28[1];\n      var endOfDoc = Editor.end(editor, []);\n      if (!Point.equals(_end, endOfDoc)) {\n        at = Editor.unhangRange(editor, at, {\n          voids: voids\n        });\n      }\n    }\n    var _Range$edges29 = Range.edges(at),\n      _Range$edges30 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges29, 2),\n      start = _Range$edges30[0],\n      end = _Range$edges30[1];\n    var startBlock = Editor.above(editor, {\n      match: function match(n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      },\n      at: start,\n      voids: voids\n    });\n    var endBlock = Editor.above(editor, {\n      match: function match(n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      },\n      at: end,\n      voids: voids\n    });\n    var isAcrossBlocks = startBlock && endBlock && !Path.equals(startBlock[1], endBlock[1]);\n    var isSingleText = Path.equals(start.path, end.path);\n    var startNonEditable = voids ? null : (_Editor$void = Editor.void(editor, {\n      at: start,\n      mode: 'highest'\n    })) !== null && _Editor$void !== void 0 ? _Editor$void : Editor.elementReadOnly(editor, {\n      at: start,\n      mode: 'highest'\n    });\n    var endNonEditable = voids ? null : (_Editor$void2 = Editor.void(editor, {\n      at: end,\n      mode: 'highest'\n    })) !== null && _Editor$void2 !== void 0 ? _Editor$void2 : Editor.elementReadOnly(editor, {\n      at: end,\n      mode: 'highest'\n    }); // If the start or end points are inside an inline void, nudge them out.\n\n    if (startNonEditable) {\n      var before = Editor.before(editor, start);\n      if (before && startBlock && Path.isAncestor(startBlock[1], before.path)) {\n        start = before;\n      }\n    }\n    if (endNonEditable) {\n      var after = Editor.after(editor, end);\n      if (after && endBlock && Path.isAncestor(endBlock[1], after.path)) {\n        end = after;\n      }\n    } // Get the highest nodes that are completely inside the range, as well as\n    // the start and end nodes.\n\n    var matches = [];\n    var lastPath;\n    var _iterator34 = _createForOfIteratorHelper(Editor.nodes(editor, {\n        at: at,\n        voids: voids\n      })),\n      _step34;\n    try {\n      for (_iterator34.s(); !(_step34 = _iterator34.n()).done;) {\n        var entry = _step34.value;\n        var _entry5 = entry,\n          _entry6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_entry5, 2),\n          node = _entry6[0],\n          path = _entry6[1];\n        if (lastPath && Path.compare(path, lastPath) === 0) {\n          continue;\n        }\n        if (!voids && Element.isElement(node) && (Editor.isVoid(editor, node) || Editor.isElementReadOnly(editor, node)) || !Path.isCommon(path, start.path) && !Path.isCommon(path, end.path)) {\n          matches.push(entry);\n          lastPath = path;\n        }\n      }\n    } catch (err) {\n      _iterator34.e(err);\n    } finally {\n      _iterator34.f();\n    }\n    var pathRefs = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(matches, function (_ref) {\n      var _ref10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        p = _ref10[1];\n      return Editor.pathRef(editor, p);\n    });\n    var startRef = Editor.pointRef(editor, start);\n    var endRef = Editor.pointRef(editor, end);\n    var removedText = '';\n    if (!isSingleText && !startNonEditable) {\n      var _context86;\n      var _point = startRef.current;\n      var _Editor$leaf3 = Editor.leaf(editor, _point),\n        _Editor$leaf4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$leaf3, 1),\n        _node = _Editor$leaf4[0];\n      var _path = _point.path;\n      var _start = start,\n        offset = _start.offset;\n      var text = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context86 = _node.text).call(_context86, offset);\n      if (text.length > 0) {\n        editor.apply({\n          type: 'remove_text',\n          path: _path,\n          offset: offset,\n          text: text\n        });\n        removedText = text;\n      }\n    }\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context87 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(_context88 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_26___default()(_context89 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(pathRefs).call(pathRefs)).call(_context89, function (r) {\n      return r.unref();\n    })).call(_context88, function (r) {\n      return r !== null;\n    })).call(_context87, function (p) {\n      return Transforms.removeNodes(editor, {\n        at: p,\n        voids: voids\n      });\n    });\n    if (!endNonEditable) {\n      var _context90;\n      var _point2 = endRef.current;\n      var _Editor$leaf5 = Editor.leaf(editor, _point2),\n        _Editor$leaf6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$leaf5, 1),\n        _node2 = _Editor$leaf6[0];\n      var _path2 = _point2.path;\n      var _offset = isSingleText ? start.offset : 0;\n      var _text = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context90 = _node2.text).call(_context90, _offset, end.offset);\n      if (_text.length > 0) {\n        editor.apply({\n          type: 'remove_text',\n          path: _path2,\n          offset: _offset,\n          text: _text\n        });\n        removedText = _text;\n      }\n    }\n    if (!isSingleText && isAcrossBlocks && endRef.current && startRef.current) {\n      Transforms.mergeNodes(editor, {\n        at: endRef.current,\n        hanging: true,\n        voids: voids\n      });\n    } // For Thai script, deleting N character(s) backward should delete\n    // N code point(s) instead of an entire grapheme cluster.\n    // Therefore, the remaining code points should be inserted back.\n\n    if (isCollapsed && reverse && unit === 'character' && removedText.length > 1 && removedText.match(/[\\u0E00-\\u0E7F]+/)) {\n      Transforms.insertText(editor, _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(removedText).call(removedText, 0, removedText.length - distance));\n    }\n    var startUnref = startRef.unref();\n    var endUnref = endRef.unref();\n    var point = reverse ? startUnref || endUnref : endUnref || startUnref;\n    if (options.at == null && point) {\n      Transforms.select(editor, point);\n    }\n  });\n};\nvar insertFragment = function insertFragment(editor, fragment) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _options$hanging2 = options.hanging,\n      hanging = _options$hanging2 === void 0 ? false : _options$hanging2,\n      _options$voids11 = options.voids,\n      voids = _options$voids11 === void 0 ? false : _options$voids11;\n    var _options$at9 = options.at,\n      at = _options$at9 === void 0 ? getDefaultInsertLocation(editor) : _options$at9;\n    if (!fragment.length) {\n      return;\n    }\n    if (Range.isRange(at)) {\n      if (!hanging) {\n        at = Editor.unhangRange(editor, at, {\n          voids: voids\n        });\n      }\n      if (Range.isCollapsed(at)) {\n        at = at.anchor;\n      } else {\n        var _Range$edges31 = Range.edges(at),\n          _Range$edges32 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges31, 2),\n          end = _Range$edges32[1];\n        if (!voids && Editor.void(editor, {\n          at: end\n        })) {\n          return;\n        }\n        var pointRef = Editor.pointRef(editor, end);\n        Transforms.delete(editor, {\n          at: at\n        });\n        at = pointRef.unref();\n      }\n    } else if (Path.isPath(at)) {\n      at = Editor.start(editor, at);\n    }\n    if (!voids && Editor.void(editor, {\n      at: at\n    })) {\n      return;\n    } // If the insert point is at the edge of an inline node, move it outside\n    // instead since it will need to be split otherwise.\n\n    var inlineElementMatch = Editor.above(editor, {\n      at: at,\n      match: function match(n) {\n        return Element.isElement(n) && Editor.isInline(editor, n);\n      },\n      mode: 'highest',\n      voids: voids\n    });\n    if (inlineElementMatch) {\n      var _inlineElementMatch = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(inlineElementMatch, 2),\n        _inlinePath = _inlineElementMatch[1];\n      if (Editor.isEnd(editor, at, _inlinePath)) {\n        var after = Editor.after(editor, _inlinePath);\n        at = after;\n      } else if (Editor.isStart(editor, at, _inlinePath)) {\n        var before = Editor.before(editor, _inlinePath);\n        at = before;\n      }\n    }\n    var blockMatch = Editor.above(editor, {\n      match: function match(n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      },\n      at: at,\n      voids: voids\n    });\n    var _blockMatch = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(blockMatch, 2),\n      blockPath = _blockMatch[1];\n    var isBlockStart = Editor.isStart(editor, at, blockPath);\n    var isBlockEnd = Editor.isEnd(editor, at, blockPath);\n    var isBlockEmpty = isBlockStart && isBlockEnd;\n    var mergeStart = !isBlockStart || isBlockStart && isBlockEnd;\n    var mergeEnd = !isBlockEnd;\n    var _Node$first5 = Node.first({\n        children: fragment\n      }, []),\n      _Node$first6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Node$first5, 2),\n      firstPath = _Node$first6[1];\n    var _Node$last5 = Node.last({\n        children: fragment\n      }, []),\n      _Node$last6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Node$last5, 2),\n      lastPath = _Node$last6[1];\n    var matches = [];\n    var matcher = function matcher(_ref) {\n      var _ref11 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        n = _ref11[0],\n        p = _ref11[1];\n      var isRoot = p.length === 0;\n      if (isRoot) {\n        return false;\n      }\n      if (isBlockEmpty) {\n        return true;\n      }\n      if (mergeStart && Path.isAncestor(p, firstPath) && Element.isElement(n) && !editor.isVoid(n) && !editor.isInline(n)) {\n        return false;\n      }\n      if (mergeEnd && Path.isAncestor(p, lastPath) && Element.isElement(n) && !editor.isVoid(n) && !editor.isInline(n)) {\n        return false;\n      }\n      return true;\n    };\n    var _iterator35 = _createForOfIteratorHelper(Node.nodes({\n        children: fragment\n      }, {\n        pass: matcher\n      })),\n      _step35;\n    try {\n      for (_iterator35.s(); !(_step35 = _iterator35.n()).done;) {\n        var entry = _step35.value;\n        if (matcher(entry)) {\n          matches.push(entry);\n        }\n      }\n    } catch (err) {\n      _iterator35.e(err);\n    } finally {\n      _iterator35.f();\n    }\n    var starts = [];\n    var middles = [];\n    var ends = [];\n    var starting = true;\n    var hasBlocks = false;\n    for (var _i = 0, _matches = matches; _i < _matches.length; _i++) {\n      var _matches$_i = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_matches[_i], 1),\n        node = _matches$_i[0];\n      if (Element.isElement(node) && !editor.isInline(node)) {\n        starting = false;\n        hasBlocks = true;\n        middles.push(node);\n      } else if (starting) {\n        starts.push(node);\n      } else {\n        ends.push(node);\n      }\n    }\n    var _Editor$nodes7 = Editor.nodes(editor, {\n        at: at,\n        match: function match(n) {\n          return Text.isText(n) || Editor.isInline(editor, n);\n        },\n        mode: 'highest',\n        voids: voids\n      }),\n      _Editor$nodes8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes7, 1),\n      inlineMatch = _Editor$nodes8[0];\n    var _inlineMatch = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(inlineMatch, 2),\n      inlinePath = _inlineMatch[1];\n    var isInlineStart = Editor.isStart(editor, at, inlinePath);\n    var isInlineEnd = Editor.isEnd(editor, at, inlinePath);\n    var middleRef = Editor.pathRef(editor, isBlockEnd && !ends.length ? Path.next(blockPath) : blockPath);\n    var endRef = Editor.pathRef(editor, isInlineEnd ? Path.next(inlinePath) : inlinePath);\n    Transforms.splitNodes(editor, {\n      at: at,\n      match: function match(n) {\n        return hasBlocks ? Element.isElement(n) && Editor.isBlock(editor, n) : Text.isText(n) || Editor.isInline(editor, n);\n      },\n      mode: hasBlocks ? 'lowest' : 'highest',\n      always: hasBlocks && (!isBlockStart || starts.length > 0) && (!isBlockEnd || ends.length > 0),\n      voids: voids\n    });\n    var startRef = Editor.pathRef(editor, !isInlineStart || isInlineStart && isInlineEnd ? Path.next(inlinePath) : inlinePath);\n    Transforms.insertNodes(editor, starts, {\n      at: startRef.current,\n      match: function match(n) {\n        return Text.isText(n) || Editor.isInline(editor, n);\n      },\n      mode: 'highest',\n      voids: voids\n    });\n    if (isBlockEmpty && !starts.length && middles.length && !ends.length) {\n      Transforms.delete(editor, {\n        at: blockPath,\n        voids: voids\n      });\n    }\n    Transforms.insertNodes(editor, middles, {\n      at: middleRef.current,\n      match: function match(n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      },\n      mode: 'lowest',\n      voids: voids\n    });\n    Transforms.insertNodes(editor, ends, {\n      at: endRef.current,\n      match: function match(n) {\n        return Text.isText(n) || Editor.isInline(editor, n);\n      },\n      mode: 'highest',\n      voids: voids\n    });\n    if (!options.at) {\n      var path;\n      if (ends.length > 0 && endRef.current) {\n        path = Path.previous(endRef.current);\n      } else if (middles.length > 0 && middleRef.current) {\n        path = Path.previous(middleRef.current);\n      } else if (startRef.current) {\n        path = Path.previous(startRef.current);\n      }\n      if (path) {\n        var _end = Editor.end(editor, path);\n        Transforms.select(editor, _end);\n      }\n    }\n    startRef.unref();\n    middleRef.unref();\n    endRef.unref();\n  });\n};\nvar collapse = function collapse(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var _options$edge2 = options.edge,\n    edge = _options$edge2 === void 0 ? 'anchor' : _options$edge2;\n  var selection = editor.selection;\n  if (!selection) {\n    return;\n  } else if (edge === 'anchor') {\n    Transforms.select(editor, selection.anchor);\n  } else if (edge === 'focus') {\n    Transforms.select(editor, selection.focus);\n  } else if (edge === 'start') {\n    var _Range$edges33 = Range.edges(selection),\n      _Range$edges34 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges33, 1),\n      start = _Range$edges34[0];\n    Transforms.select(editor, start);\n  } else if (edge === 'end') {\n    var _Range$edges35 = Range.edges(selection),\n      _Range$edges36 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges35, 2),\n      end = _Range$edges36[1];\n    Transforms.select(editor, end);\n  }\n};\nvar deselect = function deselect(editor) {\n  var selection = editor.selection;\n  if (selection) {\n    editor.apply({\n      type: 'set_selection',\n      properties: selection,\n      newProperties: null\n    });\n  }\n};\nvar move = function move(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var selection = editor.selection;\n  var _options$distance4 = options.distance,\n    distance = _options$distance4 === void 0 ? 1 : _options$distance4,\n    _options$unit5 = options.unit,\n    unit = _options$unit5 === void 0 ? 'character' : _options$unit5,\n    _options$reverse10 = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(options),\n    reverse = _options$reverse10 === void 0 ? false : _options$reverse10;\n  var _options$edge3 = options.edge,\n    edge = _options$edge3 === void 0 ? null : _options$edge3;\n  if (!selection) {\n    return;\n  }\n  if (edge === 'start') {\n    edge = Range.isBackward(selection) ? 'focus' : 'anchor';\n  }\n  if (edge === 'end') {\n    edge = Range.isBackward(selection) ? 'anchor' : 'focus';\n  }\n  var anchor = selection.anchor,\n    focus = selection.focus;\n  var opts = {\n    distance: distance,\n    unit: unit,\n    ignoreNonSelectable: true\n  };\n  var props = {};\n  if (edge == null || edge === 'anchor') {\n    var point = reverse ? Editor.before(editor, anchor, opts) : Editor.after(editor, anchor, opts);\n    if (point) {\n      props.anchor = point;\n    }\n  }\n  if (edge == null || edge === 'focus') {\n    var _point = reverse ? Editor.before(editor, focus, opts) : Editor.after(editor, focus, opts);\n    if (_point) {\n      props.focus = _point;\n    }\n  }\n  Transforms.setSelection(editor, props);\n};\nvar select = function select(editor, target) {\n  var selection = editor.selection;\n  target = Editor.range(editor, target);\n  if (selection) {\n    Transforms.setSelection(editor, target);\n    return;\n  }\n  if (!Range.isRange(target)) {\n    throw new Error(\"When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: \".concat(Scrubber.stringify(target)));\n  }\n  editor.apply({\n    type: 'set_selection',\n    properties: selection,\n    newProperties: target\n  });\n};\nfunction ownKeys$1(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread$1(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context91;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context91 = ownKeys$1(Object(source), true)).call(_context91, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context92;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context92 = ownKeys$1(Object(source))).call(_context92, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar setPoint = function setPoint(editor, props) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  var selection = editor.selection;\n  var _options$edge4 = options.edge,\n    edge = _options$edge4 === void 0 ? 'both' : _options$edge4;\n  if (!selection) {\n    return;\n  }\n  if (edge === 'start') {\n    edge = Range.isBackward(selection) ? 'focus' : 'anchor';\n  }\n  if (edge === 'end') {\n    edge = Range.isBackward(selection) ? 'anchor' : 'focus';\n  }\n  var anchor = selection.anchor,\n    focus = selection.focus;\n  var point = edge === 'anchor' ? anchor : focus;\n  Transforms.setSelection(editor, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, edge === 'anchor' ? 'anchor' : 'focus', _objectSpread$1(_objectSpread$1({}, point), props)));\n};\nvar setSelection = function setSelection(editor, props) {\n  var selection = editor.selection;\n  var oldProps = {};\n  var newProps = {};\n  if (!selection) {\n    return;\n  }\n  for (var k in props) {\n    if (k === 'anchor' && props.anchor != null && !Point.equals(props.anchor, selection.anchor) || k === 'focus' && props.focus != null && !Point.equals(props.focus, selection.focus) || k !== 'anchor' && k !== 'focus' && props[k] !== selection[k]) {\n      oldProps[k] = selection[k];\n      newProps[k] = props[k];\n    }\n  }\n  if (_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(oldProps).length > 0) {\n    editor.apply({\n      type: 'set_selection',\n      properties: oldProps,\n      newProperties: newProps\n    });\n  }\n};\nvar insertNodes = function insertNodes(editor, nodes) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _options$hanging3 = options.hanging,\n      hanging = _options$hanging3 === void 0 ? false : _options$hanging3,\n      _options$voids12 = options.voids,\n      voids = _options$voids12 === void 0 ? false : _options$voids12,\n      _options$mode5 = options.mode,\n      mode = _options$mode5 === void 0 ? 'lowest' : _options$mode5;\n    var at = options.at,\n      match = options.match,\n      select = options.select;\n    if (Node.isNode(nodes)) {\n      nodes = [nodes];\n    }\n    if (nodes.length === 0) {\n      return;\n    }\n    var _nodes = nodes,\n      _nodes2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_nodes, 1),\n      node = _nodes2[0];\n    if (!at) {\n      at = getDefaultInsertLocation(editor);\n      select = true;\n    }\n    if (select == null) {\n      select = false;\n    }\n    if (Range.isRange(at)) {\n      if (!hanging) {\n        at = Editor.unhangRange(editor, at, {\n          voids: voids\n        });\n      }\n      if (Range.isCollapsed(at)) {\n        at = at.anchor;\n      } else {\n        var _Range$edges37 = Range.edges(at),\n          _Range$edges38 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges37, 2),\n          end = _Range$edges38[1];\n        var pointRef = Editor.pointRef(editor, end);\n        Transforms.delete(editor, {\n          at: at\n        });\n        at = pointRef.unref();\n      }\n    }\n    if (Point.isPoint(at)) {\n      if (match == null) {\n        if (Text.isText(node)) {\n          match = function match(n) {\n            return Text.isText(n);\n          };\n        } else if (editor.isInline(node)) {\n          match = function match(n) {\n            return Text.isText(n) || Editor.isInline(editor, n);\n          };\n        } else {\n          match = function match(n) {\n            return Element.isElement(n) && Editor.isBlock(editor, n);\n          };\n        }\n      }\n      var _Editor$nodes9 = Editor.nodes(editor, {\n          at: at.path,\n          match: match,\n          mode: mode,\n          voids: voids\n        }),\n        _Editor$nodes10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes9, 1),\n        entry = _Editor$nodes10[0];\n      if (entry) {\n        var _entry7 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entry, 2),\n          matchPath = _entry7[1];\n        var pathRef = Editor.pathRef(editor, matchPath);\n        var isAtEnd = Editor.isEnd(editor, at, matchPath);\n        Transforms.splitNodes(editor, {\n          at: at,\n          match: match,\n          mode: mode,\n          voids: voids\n        });\n        var path = pathRef.unref();\n        at = isAtEnd ? Path.next(path) : path;\n      } else {\n        return;\n      }\n    }\n    var parentPath = Path.parent(at);\n    var index = at[at.length - 1];\n    if (!voids && Editor.void(editor, {\n      at: parentPath\n    })) {\n      return;\n    }\n    var _iterator36 = _createForOfIteratorHelper(nodes),\n      _step36;\n    try {\n      for (_iterator36.s(); !(_step36 = _iterator36.n()).done;) {\n        var _node = _step36.value;\n        var _path = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(parentPath).call(parentPath, index);\n        index++;\n        editor.apply({\n          type: 'insert_node',\n          path: _path,\n          node: _node\n        });\n        at = Path.next(at);\n      }\n    } catch (err) {\n      _iterator36.e(err);\n    } finally {\n      _iterator36.f();\n    }\n    at = Path.previous(at);\n    if (select) {\n      var point = Editor.end(editor, at);\n      if (point) {\n        Transforms.select(editor, point);\n      }\n    }\n  });\n};\nvar liftNodes = function liftNodes(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _options$at10 = options.at,\n      at = _options$at10 === void 0 ? editor.selection : _options$at10,\n      _options$mode6 = options.mode,\n      mode = _options$mode6 === void 0 ? 'lowest' : _options$mode6,\n      _options$voids13 = options.voids,\n      voids = _options$voids13 === void 0 ? false : _options$voids13;\n    var match = options.match;\n    if (match == null) {\n      match = Path.isPath(at) ? matchPath(editor, at) : function (n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      };\n    }\n    if (!at) {\n      return;\n    }\n    var matches = Editor.nodes(editor, {\n      at: at,\n      match: match,\n      mode: mode,\n      voids: voids\n    });\n    var pathRefs = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(matches, function (_ref) {\n      var _ref12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        p = _ref12[1];\n      return Editor.pathRef(editor, p);\n    });\n    var _iterator37 = _createForOfIteratorHelper(pathRefs),\n      _step37;\n    try {\n      for (_iterator37.s(); !(_step37 = _iterator37.n()).done;) {\n        var pathRef = _step37.value;\n        var path = pathRef.unref();\n        if (path.length < 2) {\n          throw new Error(\"Cannot lift node at a path [\".concat(path, \"] because it has a depth of less than `2`.\"));\n        }\n        var parentNodeEntry = Editor.node(editor, Path.parent(path));\n        var _parentNodeEntry = parentNodeEntry,\n          _parentNodeEntry2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_parentNodeEntry, 2),\n          parent = _parentNodeEntry2[0],\n          parentPath = _parentNodeEntry2[1];\n        var index = path[path.length - 1];\n        var length = parent.children.length;\n        if (length === 1) {\n          var toPath = Path.next(parentPath);\n          Transforms.moveNodes(editor, {\n            at: path,\n            to: toPath,\n            voids: voids\n          });\n          Transforms.removeNodes(editor, {\n            at: parentPath,\n            voids: voids\n          });\n        } else if (index === 0) {\n          Transforms.moveNodes(editor, {\n            at: path,\n            to: parentPath,\n            voids: voids\n          });\n        } else if (index === length - 1) {\n          var _toPath = Path.next(parentPath);\n          Transforms.moveNodes(editor, {\n            at: path,\n            to: _toPath,\n            voids: voids\n          });\n        } else {\n          var splitPath = Path.next(path);\n          var _toPath2 = Path.next(parentPath);\n          Transforms.splitNodes(editor, {\n            at: splitPath,\n            voids: voids\n          });\n          Transforms.moveNodes(editor, {\n            at: path,\n            to: _toPath2,\n            voids: voids\n          });\n        }\n      }\n    } catch (err) {\n      _iterator37.e(err);\n    } finally {\n      _iterator37.f();\n    }\n  });\n};\nvar _excluded = [\"text\"],\n  _excluded2 = [\"children\"];\nvar hasSingleChildNest = function hasSingleChildNest(editor, node) {\n  if (Element.isElement(node)) {\n    var element = node;\n    if (Editor.isVoid(editor, node)) {\n      return true;\n    } else if (element.children.length === 1) {\n      return hasSingleChildNest(editor, element.children[0]);\n    } else {\n      return false;\n    }\n  } else if (Editor.isEditor(node)) {\n    return false;\n  } else {\n    return true;\n  }\n};\nvar mergeNodes = function mergeNodes(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _context94, _context95;\n    var match = options.match,\n      _options$at11 = options.at,\n      at = _options$at11 === void 0 ? editor.selection : _options$at11;\n    var _options$hanging4 = options.hanging,\n      hanging = _options$hanging4 === void 0 ? false : _options$hanging4,\n      _options$voids14 = options.voids,\n      voids = _options$voids14 === void 0 ? false : _options$voids14,\n      _options$mode7 = options.mode,\n      mode = _options$mode7 === void 0 ? 'lowest' : _options$mode7;\n    if (!at) {\n      return;\n    }\n    if (match == null) {\n      if (Path.isPath(at)) {\n        var _Editor$parent13 = Editor.parent(editor, at),\n          _Editor$parent14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent13, 1),\n          parent = _Editor$parent14[0];\n        match = function match(n) {\n          var _context93;\n          return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(_context93 = parent.children).call(_context93, n);\n        };\n      } else {\n        match = function match(n) {\n          return Element.isElement(n) && Editor.isBlock(editor, n);\n        };\n      }\n    }\n    if (!hanging && Range.isRange(at)) {\n      at = Editor.unhangRange(editor, at, {\n        voids: voids\n      });\n    }\n    if (Range.isRange(at)) {\n      if (Range.isCollapsed(at)) {\n        at = at.anchor;\n      } else {\n        var _Range$edges39 = Range.edges(at),\n          _Range$edges40 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges39, 2),\n          end = _Range$edges40[1];\n        var pointRef = Editor.pointRef(editor, end);\n        Transforms.delete(editor, {\n          at: at\n        });\n        at = pointRef.unref();\n        if (options.at == null) {\n          Transforms.select(editor, at);\n        }\n      }\n    }\n    var _Editor$nodes11 = Editor.nodes(editor, {\n        at: at,\n        match: match,\n        voids: voids,\n        mode: mode\n      }),\n      _Editor$nodes12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes11, 1),\n      current = _Editor$nodes12[0];\n    var prev = Editor.previous(editor, {\n      at: at,\n      match: match,\n      voids: voids,\n      mode: mode\n    });\n    if (!current || !prev) {\n      return;\n    }\n    var _current = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(current, 2),\n      node = _current[0],\n      path = _current[1];\n    var _prev3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(prev, 2),\n      prevNode = _prev3[0],\n      prevPath = _prev3[1];\n    if (path.length === 0 || prevPath.length === 0) {\n      return;\n    }\n    var newPath = Path.next(prevPath);\n    var commonPath = Path.common(path, prevPath);\n    var isPreviousSibling = Path.isSibling(path, prevPath);\n    var levels = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context94 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context95 = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(Editor.levels(editor, {\n      at: path\n    }), function (_ref) {\n      var _ref13 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 1),\n        n = _ref13[0];\n      return n;\n    })).call(_context95, commonPath.length)).call(_context94, 0, -1); // Determine if the merge will leave an ancestor of the path empty as a\n    // result, in which case we'll want to remove it after merging.\n\n    var emptyAncestor = Editor.above(editor, {\n      at: path,\n      mode: 'highest',\n      match: function match(n) {\n        return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(levels).call(levels, n) && hasSingleChildNest(editor, n);\n      }\n    });\n    var emptyRef = emptyAncestor && Editor.pathRef(editor, emptyAncestor[1]);\n    var properties;\n    var position; // Ensure that the nodes are equivalent, and figure out what the position\n    // and extra properties of the merge will be.\n\n    if (Text.isText(node) && Text.isText(prevNode)) {\n      var rest = _objectWithoutProperties(node, _excluded);\n      position = prevNode.text.length;\n      properties = rest;\n    } else if (Element.isElement(node) && Element.isElement(prevNode)) {\n      var rest = _objectWithoutProperties(node, _excluded2);\n      position = prevNode.children.length;\n      properties = rest;\n    } else {\n      var _context96, _context97;\n      throw new Error(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context96 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context97 = \"Cannot merge the node at path [\".concat(path, \"] with the previous sibling because it is not the same kind: \")).call(_context97, Scrubber.stringify(node), \" \")).call(_context96, Scrubber.stringify(prevNode)));\n    } // If the node isn't already the next sibling of the previous node, move\n    // it so that it is before merging.\n\n    if (!isPreviousSibling) {\n      Transforms.moveNodes(editor, {\n        at: path,\n        to: newPath,\n        voids: voids\n      });\n    } // If there was going to be an empty ancestor of the node that was merged,\n    // we remove it from the tree.\n\n    if (emptyRef) {\n      Transforms.removeNodes(editor, {\n        at: emptyRef.current,\n        voids: voids\n      });\n    } // If the target node that we're merging with is empty, remove it instead\n    // of merging the two. This is a common rich text editor behavior to\n    // prevent losing formatting when deleting entire nodes when you have a\n    // hanging selection.\n    // if prevNode is first child in parent,don't remove it.\n\n    if (Element.isElement(prevNode) && Editor.isEmpty(editor, prevNode) || Text.isText(prevNode) && prevNode.text === '' && prevPath[prevPath.length - 1] !== 0) {\n      Transforms.removeNodes(editor, {\n        at: prevPath,\n        voids: voids\n      });\n    } else {\n      editor.apply({\n        type: 'merge_node',\n        path: newPath,\n        position: position,\n        properties: properties\n      });\n    }\n    if (emptyRef) {\n      emptyRef.unref();\n    }\n  });\n};\nvar moveNodes = function moveNodes(editor, options) {\n  Editor.withoutNormalizing(editor, function () {\n    var to = options.to,\n      _options$at12 = options.at,\n      at = _options$at12 === void 0 ? editor.selection : _options$at12,\n      _options$mode8 = options.mode,\n      mode = _options$mode8 === void 0 ? 'lowest' : _options$mode8,\n      _options$voids15 = options.voids,\n      voids = _options$voids15 === void 0 ? false : _options$voids15;\n    var match = options.match;\n    if (!at) {\n      return;\n    }\n    if (match == null) {\n      match = Path.isPath(at) ? matchPath(editor, at) : function (n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      };\n    }\n    var toRef = Editor.pathRef(editor, to);\n    var targets = Editor.nodes(editor, {\n      at: at,\n      match: match,\n      mode: mode,\n      voids: voids\n    });\n    var pathRefs = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(targets, function (_ref) {\n      var _ref14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        p = _ref14[1];\n      return Editor.pathRef(editor, p);\n    });\n    var _iterator38 = _createForOfIteratorHelper(pathRefs),\n      _step38;\n    try {\n      for (_iterator38.s(); !(_step38 = _iterator38.n()).done;) {\n        var pathRef = _step38.value;\n        var path = pathRef.unref();\n        var newPath = toRef.current;\n        if (path.length !== 0) {\n          editor.apply({\n            type: 'move_node',\n            path: path,\n            newPath: newPath\n          });\n        }\n        if (toRef.current && Path.isSibling(newPath, path) && Path.isAfter(newPath, path)) {\n          // When performing a sibling move to a later index, the path at the destination is shifted\n          // to before the insertion point instead of after. To ensure our group of nodes are inserted\n          // in the correct order we increment toRef to account for that\n          toRef.current = Path.next(toRef.current);\n        }\n      }\n    } catch (err) {\n      _iterator38.e(err);\n    } finally {\n      _iterator38.f();\n    }\n    toRef.unref();\n  });\n};\nvar removeNodes = function removeNodes(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _options$hanging5 = options.hanging,\n      hanging = _options$hanging5 === void 0 ? false : _options$hanging5,\n      _options$voids16 = options.voids,\n      voids = _options$voids16 === void 0 ? false : _options$voids16,\n      _options$mode9 = options.mode,\n      mode = _options$mode9 === void 0 ? 'lowest' : _options$mode9;\n    var _options$at13 = options.at,\n      at = _options$at13 === void 0 ? editor.selection : _options$at13,\n      match = options.match;\n    if (!at) {\n      return;\n    }\n    if (match == null) {\n      match = Path.isPath(at) ? matchPath(editor, at) : function (n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      };\n    }\n    if (!hanging && Range.isRange(at)) {\n      at = Editor.unhangRange(editor, at, {\n        voids: voids\n      });\n    }\n    var depths = Editor.nodes(editor, {\n      at: at,\n      match: match,\n      mode: mode,\n      voids: voids\n    });\n    var pathRefs = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(depths, function (_ref) {\n      var _ref15 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        p = _ref15[1];\n      return Editor.pathRef(editor, p);\n    });\n    var _iterator39 = _createForOfIteratorHelper(pathRefs),\n      _step39;\n    try {\n      for (_iterator39.s(); !(_step39 = _iterator39.n()).done;) {\n        var pathRef = _step39.value;\n        var path = pathRef.unref();\n        if (path) {\n          var _Editor$node7 = Editor.node(editor, path),\n            _Editor$node8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$node7, 1),\n            node = _Editor$node8[0];\n          editor.apply({\n            type: 'remove_node',\n            path: path,\n            node: node\n          });\n        }\n      }\n    } catch (err) {\n      _iterator39.e(err);\n    } finally {\n      _iterator39.f();\n    }\n  });\n};\nvar setNodes = function setNodes(editor, props) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var match = options.match,\n      _options$at14 = options.at,\n      at = _options$at14 === void 0 ? editor.selection : _options$at14,\n      compare = options.compare,\n      merge = options.merge;\n    var _options$hanging6 = options.hanging,\n      hanging = _options$hanging6 === void 0 ? false : _options$hanging6,\n      _options$mode10 = options.mode,\n      mode = _options$mode10 === void 0 ? 'lowest' : _options$mode10,\n      _options$split = options.split,\n      split = _options$split === void 0 ? false : _options$split,\n      _options$voids17 = options.voids,\n      voids = _options$voids17 === void 0 ? false : _options$voids17;\n    if (!at) {\n      return;\n    }\n    if (match == null) {\n      match = Path.isPath(at) ? matchPath(editor, at) : function (n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      };\n    }\n    if (!hanging && Range.isRange(at)) {\n      at = Editor.unhangRange(editor, at, {\n        voids: voids\n      });\n    }\n    if (split && Range.isRange(at)) {\n      if (Range.isCollapsed(at) && Editor.leaf(editor, at.anchor)[0].text.length > 0) {\n        // If the range is collapsed in a non-empty node and 'split' is true, there's nothing to\n        // set that won't get normalized away\n        return;\n      }\n      var rangeRef = Editor.rangeRef(editor, at, {\n        affinity: 'inward'\n      });\n      var _Range$edges41 = Range.edges(at),\n        _Range$edges42 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges41, 2),\n        start = _Range$edges42[0],\n        end = _Range$edges42[1];\n      var splitMode = mode === 'lowest' ? 'lowest' : 'highest';\n      var endAtEndOfNode = Editor.isEnd(editor, end, end.path);\n      Transforms.splitNodes(editor, {\n        at: end,\n        match: match,\n        mode: splitMode,\n        voids: voids,\n        always: !endAtEndOfNode\n      });\n      var startAtStartOfNode = Editor.isStart(editor, start, start.path);\n      Transforms.splitNodes(editor, {\n        at: start,\n        match: match,\n        mode: splitMode,\n        voids: voids,\n        always: !startAtStartOfNode\n      });\n      at = rangeRef.unref();\n      if (options.at == null) {\n        Transforms.select(editor, at);\n      }\n    }\n    if (!compare) {\n      compare = function compare(prop, nodeProp) {\n        return prop !== nodeProp;\n      };\n    }\n    var _iterator40 = _createForOfIteratorHelper(Editor.nodes(editor, {\n        at: at,\n        match: match,\n        mode: mode,\n        voids: voids\n      })),\n      _step40;\n    try {\n      for (_iterator40.s(); !(_step40 = _iterator40.n()).done;) {\n        var _step40$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step40.value, 2),\n          node = _step40$value[0],\n          path = _step40$value[1];\n        var properties = {};\n        var newProperties = {}; // You can't set properties on the editor node.\n\n        if (path.length === 0) {\n          continue;\n        }\n        var hasChanges = false;\n        for (var k in props) {\n          if (k === 'children' || k === 'text') {\n            continue;\n          }\n          if (compare(props[k], node[k])) {\n            hasChanges = true; // Omit new properties from the old properties list\n\n            if (node.hasOwnProperty(k)) properties[k] = node[k]; // Omit properties that have been removed from the new properties list\n\n            if (merge) {\n              if (props[k] != null) newProperties[k] = merge(node[k], props[k]);\n            } else {\n              if (props[k] != null) newProperties[k] = props[k];\n            }\n          }\n        }\n        if (hasChanges) {\n          editor.apply({\n            type: 'set_node',\n            path: path,\n            properties: properties,\n            newProperties: newProperties\n          });\n        }\n      }\n    } catch (err) {\n      _iterator40.e(err);\n    } finally {\n      _iterator40.f();\n    }\n  });\n};\n\n/**\n * Convert a range into a point by deleting it's content.\n */\n\nvar deleteRange = function deleteRange(editor, range) {\n  if (Range.isCollapsed(range)) {\n    return range.anchor;\n  } else {\n    var _Range$edges43 = Range.edges(range),\n      _Range$edges44 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges43, 2),\n      end = _Range$edges44[1];\n    var pointRef = Editor.pointRef(editor, end);\n    Transforms.delete(editor, {\n      at: range\n    });\n    return pointRef.unref();\n  }\n};\nvar splitNodes = function splitNodes(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _options$mode11 = options.mode,\n      mode = _options$mode11 === void 0 ? 'lowest' : _options$mode11,\n      _options$voids18 = options.voids,\n      voids = _options$voids18 === void 0 ? false : _options$voids18;\n    var match = options.match,\n      _options$at15 = options.at,\n      at = _options$at15 === void 0 ? editor.selection : _options$at15,\n      _options$height = options.height,\n      height = _options$height === void 0 ? 0 : _options$height,\n      _options$always = options.always,\n      always = _options$always === void 0 ? false : _options$always;\n    if (match == null) {\n      match = function match(n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      };\n    }\n    if (Range.isRange(at)) {\n      at = deleteRange(editor, at);\n    } // If the target is a path, the default height-skipping and position\n    // counters need to account for us potentially splitting at a non-leaf.\n\n    if (Path.isPath(at)) {\n      var path = at;\n      var point = Editor.point(editor, path);\n      var _Editor$parent15 = Editor.parent(editor, path),\n        _Editor$parent16 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$parent15, 1),\n        parent = _Editor$parent16[0];\n      match = function match(n) {\n        return n === parent;\n      };\n      height = point.path.length - path.length + 1;\n      at = point;\n      always = true;\n    }\n    if (!at) {\n      return;\n    }\n    var beforeRef = Editor.pointRef(editor, at, {\n      affinity: 'backward'\n    });\n    var afterRef;\n    try {\n      var _context98;\n      var _Editor$nodes13 = Editor.nodes(editor, {\n          at: at,\n          match: match,\n          mode: mode,\n          voids: voids\n        }),\n        _Editor$nodes14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$nodes13, 1),\n        highest = _Editor$nodes14[0];\n      if (!highest) {\n        return;\n      }\n      var voidMatch = Editor.void(editor, {\n        at: at,\n        mode: 'highest'\n      });\n      var nudge = 0;\n      if (!voids && voidMatch) {\n        var _voidMatch = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(voidMatch, 2),\n          voidNode = _voidMatch[0],\n          voidPath = _voidMatch[1];\n        if (Element.isElement(voidNode) && editor.isInline(voidNode)) {\n          var after = Editor.after(editor, voidPath);\n          if (!after) {\n            var text = {\n              text: ''\n            };\n            var afterPath = Path.next(voidPath);\n            Transforms.insertNodes(editor, text, {\n              at: afterPath,\n              voids: voids\n            });\n            after = Editor.point(editor, afterPath);\n          }\n          at = after;\n          always = true;\n        }\n        var siblingHeight = at.path.length - voidPath.length;\n        height = siblingHeight + 1;\n        always = true;\n      }\n      afterRef = Editor.pointRef(editor, at);\n      var depth = at.path.length - height;\n      var _highest = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(highest, 2),\n        highestPath = _highest[1];\n      var lowestPath = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context98 = at.path).call(_context98, 0, depth);\n      var position = height === 0 ? at.offset : at.path[depth] + nudge;\n      var _iterator41 = _createForOfIteratorHelper(Editor.levels(editor, {\n          at: lowestPath,\n          reverse: true,\n          voids: voids\n        })),\n        _step41;\n      try {\n        for (_iterator41.s(); !(_step41 = _iterator41.n()).done;) {\n          var _step41$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step41.value, 2),\n            node = _step41$value[0],\n            _path = _step41$value[1];\n          var split = false;\n          if (_path.length < highestPath.length || _path.length === 0 || !voids && Element.isElement(node) && Editor.isVoid(editor, node)) {\n            break;\n          }\n          var _point = beforeRef.current;\n          var isEnd = Editor.isEnd(editor, _point, _path);\n          if (always || !beforeRef || !Editor.isEdge(editor, _point, _path)) {\n            split = true;\n            var properties = Node.extractProps(node);\n            editor.apply({\n              type: 'split_node',\n              path: _path,\n              position: position,\n              properties: properties\n            });\n          }\n          position = _path[_path.length - 1] + (split || isEnd ? 1 : 0);\n        }\n      } catch (err) {\n        _iterator41.e(err);\n      } finally {\n        _iterator41.f();\n      }\n      if (options.at == null) {\n        var _point2 = afterRef.current || Editor.end(editor, []);\n        Transforms.select(editor, _point2);\n      }\n    } finally {\n      var _afterRef;\n      beforeRef.unref();\n      (_afterRef = afterRef) === null || _afterRef === void 0 ? void 0 : _afterRef.unref();\n    }\n  });\n};\nvar unsetNodes = function unsetNodes(editor, props) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  if (!_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_7___default()(props)) {\n    props = [props];\n  }\n  var obj = {};\n  var _iterator42 = _createForOfIteratorHelper(props),\n    _step42;\n  try {\n    for (_iterator42.s(); !(_step42 = _iterator42.n()).done;) {\n      var key = _step42.value;\n      obj[key] = null;\n    }\n  } catch (err) {\n    _iterator42.e(err);\n  } finally {\n    _iterator42.f();\n  }\n  Transforms.setNodes(editor, obj, options);\n};\nvar unwrapNodes = function unwrapNodes(editor) {\n  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _context99;\n    var _options$mode12 = options.mode,\n      mode = _options$mode12 === void 0 ? 'lowest' : _options$mode12,\n      _options$split2 = options.split,\n      split = _options$split2 === void 0 ? false : _options$split2,\n      _options$voids19 = options.voids,\n      voids = _options$voids19 === void 0 ? false : _options$voids19;\n    var _options$at16 = options.at,\n      at = _options$at16 === void 0 ? editor.selection : _options$at16,\n      match = options.match;\n    if (!at) {\n      return;\n    }\n    if (match == null) {\n      match = Path.isPath(at) ? matchPath(editor, at) : function (n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      };\n    }\n    if (Path.isPath(at)) {\n      at = Editor.range(editor, at);\n    }\n    var rangeRef = Range.isRange(at) ? Editor.rangeRef(editor, at) : null;\n    var matches = Editor.nodes(editor, {\n      at: at,\n      match: match,\n      mode: mode,\n      voids: voids\n    });\n    var pathRefs = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_11___default()(_context99 = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(matches, function (_ref) {\n      var _ref16 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_ref, 2),\n        p = _ref16[1];\n      return Editor.pathRef(editor, p);\n    } // unwrapNode will call liftNode which does not support splitting the node when nested.\n    // If we do not reverse the order and call it from top to the bottom, it will remove all blocks\n    // that wrap target node. So we reverse the order.\n    )).call(_context99);\n    var _loop = function _loop(pathRef) {\n      var path = pathRef.unref();\n      var _Editor$node9 = Editor.node(editor, path),\n        _Editor$node10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Editor$node9, 1),\n        node = _Editor$node10[0];\n      var range = Editor.range(editor, path);\n      if (split && rangeRef) {\n        range = Range.intersection(rangeRef.current, range);\n      }\n      Transforms.liftNodes(editor, {\n        at: range,\n        match: function match(n) {\n          var _context100;\n          return Element.isAncestor(node) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(_context100 = node.children).call(_context100, n);\n        },\n        voids: voids\n      });\n    };\n    var _iterator43 = _createForOfIteratorHelper(pathRefs),\n      _step43;\n    try {\n      for (_iterator43.s(); !(_step43 = _iterator43.n()).done;) {\n        var pathRef = _step43.value;\n        _loop(pathRef);\n      }\n    } catch (err) {\n      _iterator43.e(err);\n    } finally {\n      _iterator43.f();\n    }\n    if (rangeRef) {\n      rangeRef.unref();\n    }\n  });\n};\nfunction ownKeys(object, enumerableOnly) {\n  var keys = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(object);\n  if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default())) {\n    var symbols = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_16___default()(object);\n    if (enumerableOnly) {\n      symbols = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_17___default()(symbols).call(symbols, function (sym) {\n        return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(object, sym).enumerable;\n      });\n    }\n    keys.push.apply(keys, symbols);\n  }\n  return keys;\n}\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n    if (i % 2) {\n      var _context101;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context101 = ownKeys(Object(source), true)).call(_context101, function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default())) {\n      _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_21___default()(target, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_20___default()(source));\n    } else {\n      var _context102;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_19___default()(_context102 = ownKeys(Object(source))).call(_context102, function (key) {\n        _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_14___default()(target, key, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_18___default()(source, key));\n      });\n    }\n  }\n  return target;\n}\nvar wrapNodes = function wrapNodes(editor, element) {\n  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  Editor.withoutNormalizing(editor, function () {\n    var _options$mode13 = options.mode,\n      mode = _options$mode13 === void 0 ? 'lowest' : _options$mode13,\n      _options$split3 = options.split,\n      split = _options$split3 === void 0 ? false : _options$split3,\n      _options$voids20 = options.voids,\n      voids = _options$voids20 === void 0 ? false : _options$voids20;\n    var match = options.match,\n      _options$at17 = options.at,\n      at = _options$at17 === void 0 ? editor.selection : _options$at17;\n    if (!at) {\n      return;\n    }\n    if (match == null) {\n      if (Path.isPath(at)) {\n        match = matchPath(editor, at);\n      } else if (editor.isInline(element)) {\n        match = function match(n) {\n          return Element.isElement(n) && Editor.isInline(editor, n) || Text.isText(n);\n        };\n      } else {\n        match = function match(n) {\n          return Element.isElement(n) && Editor.isBlock(editor, n);\n        };\n      }\n    }\n    if (split && Range.isRange(at)) {\n      var _Range$edges45 = Range.edges(at),\n        _Range$edges46 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_Range$edges45, 2),\n        start = _Range$edges46[0],\n        end = _Range$edges46[1];\n      var rangeRef = Editor.rangeRef(editor, at, {\n        affinity: 'inward'\n      });\n      Transforms.splitNodes(editor, {\n        at: end,\n        match: match,\n        voids: voids\n      });\n      Transforms.splitNodes(editor, {\n        at: start,\n        match: match,\n        voids: voids\n      });\n      at = rangeRef.unref();\n      if (options.at == null) {\n        Transforms.select(editor, at);\n      }\n    }\n    var roots = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(Editor.nodes(editor, {\n      at: at,\n      match: editor.isInline(element) ? function (n) {\n        return Element.isElement(n) && Editor.isBlock(editor, n);\n      } : function (n) {\n        return Editor.isEditor(n);\n      },\n      mode: 'lowest',\n      voids: voids\n    }));\n    var _iterator44 = _createForOfIteratorHelper(roots),\n      _step44;\n    try {\n      for (_iterator44.s(); !(_step44 = _iterator44.n()).done;) {\n        var _step44$value = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_step44.value, 2),\n          rootPath = _step44$value[1];\n        var a = Range.isRange(at) ? Range.intersection(at, Editor.range(editor, rootPath)) : at;\n        if (!a) {\n          continue;\n        }\n        var matches = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_9___default()(Editor.nodes(editor, {\n          at: a,\n          match: match,\n          mode: mode,\n          voids: voids\n        }));\n        if (matches.length > 0) {\n          var _ret = function () {\n            var _matches2 = matches,\n              _matches3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_matches2, 1),\n              first = _matches3[0];\n            var last = matches[matches.length - 1];\n            var _first = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(first, 2),\n              firstPath = _first[1];\n            var _last = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(last, 2),\n              lastPath = _last[1];\n            if (firstPath.length === 0 && lastPath.length === 0) {\n              // if there's no matching parent - usually means the node is an editor - don't do anything\n              return \"continue\";\n            }\n            var commonPath = Path.equals(firstPath, lastPath) ? Path.parent(firstPath) : Path.common(firstPath, lastPath);\n            var range = Editor.range(editor, firstPath, lastPath);\n            var commonNodeEntry = Editor.node(editor, commonPath);\n            var _commonNodeEntry = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(commonNodeEntry, 1),\n              commonNode = _commonNodeEntry[0];\n            var depth = commonPath.length + 1;\n            var wrapperPath = Path.next(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(lastPath).call(lastPath, 0, depth));\n            var wrapper = _objectSpread(_objectSpread({}, element), {}, {\n              children: []\n            });\n            Transforms.insertNodes(editor, wrapper, {\n              at: wrapperPath,\n              voids: voids\n            });\n            Transforms.moveNodes(editor, {\n              at: range,\n              match: function match(n) {\n                var _context103;\n                return Element.isAncestor(commonNode) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_24___default()(_context103 = commonNode.children).call(_context103, n);\n              },\n              to: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(wrapperPath).call(wrapperPath, 0),\n              voids: voids\n            });\n          }();\n          if (_ret === \"continue\") continue;\n        }\n      }\n    } catch (err) {\n      _iterator44.e(err);\n    } finally {\n      _iterator44.f();\n    }\n  });\n};\n\n/**\n * Create a new Slate `Editor` object.\n */\n\nvar createEditor = function createEditor() {\n  var editor = {\n    children: [],\n    operations: [],\n    selection: null,\n    marks: null,\n    isElementReadOnly: function isElementReadOnly() {\n      return false;\n    },\n    isInline: function isInline() {\n      return false;\n    },\n    isSelectable: function isSelectable() {\n      return true;\n    },\n    isVoid: function isVoid() {\n      return false;\n    },\n    markableVoid: function markableVoid() {\n      return false;\n    },\n    onChange: function onChange() {},\n    // Core\n    apply: function apply$1() {\n      var _context104;\n      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n        args[_key] = arguments[_key];\n      }\n      return apply.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context104 = [editor]).call(_context104, args));\n    },\n    // Editor\n    addMark: function addMark$1() {\n      var _context105;\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n      return addMark.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context105 = [editor]).call(_context105, args));\n    },\n    deleteBackward: function deleteBackward$1() {\n      var _context106;\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n      return deleteBackward.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context106 = [editor]).call(_context106, args));\n    },\n    deleteForward: function deleteForward$1() {\n      var _context107;\n      for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n        args[_key4] = arguments[_key4];\n      }\n      return deleteForward.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context107 = [editor]).call(_context107, args));\n    },\n    deleteFragment: function deleteFragment$1() {\n      var _context108;\n      for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n        args[_key5] = arguments[_key5];\n      }\n      return deleteFragment.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context108 = [editor]).call(_context108, args));\n    },\n    getFragment: function getFragment$1() {\n      var _context109;\n      for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n        args[_key6] = arguments[_key6];\n      }\n      return getFragment.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context109 = [editor]).call(_context109, args));\n    },\n    insertBreak: function insertBreak$1() {\n      var _context110;\n      for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n        args[_key7] = arguments[_key7];\n      }\n      return insertBreak.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context110 = [editor]).call(_context110, args));\n    },\n    insertSoftBreak: function insertSoftBreak$1() {\n      var _context111;\n      for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n        args[_key8] = arguments[_key8];\n      }\n      return insertSoftBreak.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context111 = [editor]).call(_context111, args));\n    },\n    insertFragment: function insertFragment$1() {\n      var _context112;\n      for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n        args[_key9] = arguments[_key9];\n      }\n      return insertFragment.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context112 = [editor]).call(_context112, args));\n    },\n    insertNode: function insertNode$1() {\n      var _context113;\n      for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\n        args[_key10] = arguments[_key10];\n      }\n      return insertNode.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context113 = [editor]).call(_context113, args));\n    },\n    insertText: function insertText$1() {\n      var _context114;\n      for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {\n        args[_key11] = arguments[_key11];\n      }\n      return insertText.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context114 = [editor]).call(_context114, args));\n    },\n    normalizeNode: function normalizeNode$1() {\n      var _context115;\n      for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {\n        args[_key12] = arguments[_key12];\n      }\n      return normalizeNode.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context115 = [editor]).call(_context115, args));\n    },\n    removeMark: function removeMark$1() {\n      var _context116;\n      for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {\n        args[_key13] = arguments[_key13];\n      }\n      return removeMark.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context116 = [editor]).call(_context116, args));\n    },\n    getDirtyPaths: function getDirtyPaths$1() {\n      var _context117;\n      for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {\n        args[_key14] = arguments[_key14];\n      }\n      return getDirtyPaths.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context117 = [editor]).call(_context117, args));\n    },\n    shouldNormalize: function shouldNormalize$1() {\n      var _context118;\n      for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {\n        args[_key15] = arguments[_key15];\n      }\n      return shouldNormalize.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context118 = [editor]).call(_context118, args));\n    },\n    // Editor interface\n    above: function above$1() {\n      var _context119;\n      for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {\n        args[_key16] = arguments[_key16];\n      }\n      return above.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context119 = [editor]).call(_context119, args));\n    },\n    after: function after$1() {\n      var _context120;\n      for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) {\n        args[_key17] = arguments[_key17];\n      }\n      return after.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context120 = [editor]).call(_context120, args));\n    },\n    before: function before$1() {\n      var _context121;\n      for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) {\n        args[_key18] = arguments[_key18];\n      }\n      return before.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context121 = [editor]).call(_context121, args));\n    },\n    collapse: function collapse$1() {\n      var _context122;\n      for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) {\n        args[_key19] = arguments[_key19];\n      }\n      return collapse.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context122 = [editor]).call(_context122, args));\n    },\n    delete: function _delete() {\n      var _context123;\n      for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) {\n        args[_key20] = arguments[_key20];\n      }\n      return deleteText.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context123 = [editor]).call(_context123, args));\n    },\n    deselect: function deselect$1() {\n      var _context124;\n      for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) {\n        args[_key21] = arguments[_key21];\n      }\n      return deselect.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context124 = [editor]).call(_context124, args));\n    },\n    edges: function edges$1() {\n      var _context125;\n      for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) {\n        args[_key22] = arguments[_key22];\n      }\n      return edges.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context125 = [editor]).call(_context125, args));\n    },\n    elementReadOnly: function elementReadOnly$1() {\n      var _context126;\n      for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) {\n        args[_key23] = arguments[_key23];\n      }\n      return elementReadOnly.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context126 = [editor]).call(_context126, args));\n    },\n    end: function end$1() {\n      var _context127;\n      for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) {\n        args[_key24] = arguments[_key24];\n      }\n      return end.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context127 = [editor]).call(_context127, args));\n    },\n    first: function first$1() {\n      var _context128;\n      for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) {\n        args[_key25] = arguments[_key25];\n      }\n      return first.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context128 = [editor]).call(_context128, args));\n    },\n    fragment: function fragment$1() {\n      var _context129;\n      for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) {\n        args[_key26] = arguments[_key26];\n      }\n      return fragment.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context129 = [editor]).call(_context129, args));\n    },\n    getMarks: function getMarks() {\n      var _context130;\n      for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) {\n        args[_key27] = arguments[_key27];\n      }\n      return marks.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context130 = [editor]).call(_context130, args));\n    },\n    hasBlocks: function hasBlocks$1() {\n      var _context131;\n      for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) {\n        args[_key28] = arguments[_key28];\n      }\n      return hasBlocks.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context131 = [editor]).call(_context131, args));\n    },\n    hasInlines: function hasInlines$1() {\n      var _context132;\n      for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) {\n        args[_key29] = arguments[_key29];\n      }\n      return hasInlines.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context132 = [editor]).call(_context132, args));\n    },\n    hasPath: function hasPath$1() {\n      var _context133;\n      for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) {\n        args[_key30] = arguments[_key30];\n      }\n      return hasPath.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context133 = [editor]).call(_context133, args));\n    },\n    hasTexts: function hasTexts$1() {\n      var _context134;\n      for (var _len31 = arguments.length, args = new Array(_len31), _key31 = 0; _key31 < _len31; _key31++) {\n        args[_key31] = arguments[_key31];\n      }\n      return hasTexts.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context134 = [editor]).call(_context134, args));\n    },\n    insertNodes: function insertNodes$1() {\n      var _context135;\n      for (var _len32 = arguments.length, args = new Array(_len32), _key32 = 0; _key32 < _len32; _key32++) {\n        args[_key32] = arguments[_key32];\n      }\n      return insertNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context135 = [editor]).call(_context135, args));\n    },\n    isBlock: function isBlock$1() {\n      var _context136;\n      for (var _len33 = arguments.length, args = new Array(_len33), _key33 = 0; _key33 < _len33; _key33++) {\n        args[_key33] = arguments[_key33];\n      }\n      return isBlock.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context136 = [editor]).call(_context136, args));\n    },\n    isEdge: function isEdge$1() {\n      var _context137;\n      for (var _len34 = arguments.length, args = new Array(_len34), _key34 = 0; _key34 < _len34; _key34++) {\n        args[_key34] = arguments[_key34];\n      }\n      return isEdge.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context137 = [editor]).call(_context137, args));\n    },\n    isEmpty: function isEmpty$1() {\n      var _context138;\n      for (var _len35 = arguments.length, args = new Array(_len35), _key35 = 0; _key35 < _len35; _key35++) {\n        args[_key35] = arguments[_key35];\n      }\n      return isEmpty.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context138 = [editor]).call(_context138, args));\n    },\n    isEnd: function isEnd$1() {\n      var _context139;\n      for (var _len36 = arguments.length, args = new Array(_len36), _key36 = 0; _key36 < _len36; _key36++) {\n        args[_key36] = arguments[_key36];\n      }\n      return isEnd.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context139 = [editor]).call(_context139, args));\n    },\n    isNormalizing: function isNormalizing$1() {\n      var _context140;\n      for (var _len37 = arguments.length, args = new Array(_len37), _key37 = 0; _key37 < _len37; _key37++) {\n        args[_key37] = arguments[_key37];\n      }\n      return isNormalizing.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context140 = [editor]).call(_context140, args));\n    },\n    isStart: function isStart$1() {\n      var _context141;\n      for (var _len38 = arguments.length, args = new Array(_len38), _key38 = 0; _key38 < _len38; _key38++) {\n        args[_key38] = arguments[_key38];\n      }\n      return isStart.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context141 = [editor]).call(_context141, args));\n    },\n    last: function last$1() {\n      var _context142;\n      for (var _len39 = arguments.length, args = new Array(_len39), _key39 = 0; _key39 < _len39; _key39++) {\n        args[_key39] = arguments[_key39];\n      }\n      return last.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context142 = [editor]).call(_context142, args));\n    },\n    leaf: function leaf$1() {\n      var _context143;\n      for (var _len40 = arguments.length, args = new Array(_len40), _key40 = 0; _key40 < _len40; _key40++) {\n        args[_key40] = arguments[_key40];\n      }\n      return leaf.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context143 = [editor]).call(_context143, args));\n    },\n    levels: function levels$1() {\n      var _context144;\n      for (var _len41 = arguments.length, args = new Array(_len41), _key41 = 0; _key41 < _len41; _key41++) {\n        args[_key41] = arguments[_key41];\n      }\n      return levels.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context144 = [editor]).call(_context144, args));\n    },\n    liftNodes: function liftNodes$1() {\n      var _context145;\n      for (var _len42 = arguments.length, args = new Array(_len42), _key42 = 0; _key42 < _len42; _key42++) {\n        args[_key42] = arguments[_key42];\n      }\n      return liftNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context145 = [editor]).call(_context145, args));\n    },\n    mergeNodes: function mergeNodes$1() {\n      var _context146;\n      for (var _len43 = arguments.length, args = new Array(_len43), _key43 = 0; _key43 < _len43; _key43++) {\n        args[_key43] = arguments[_key43];\n      }\n      return mergeNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context146 = [editor]).call(_context146, args));\n    },\n    move: function move$1() {\n      var _context147;\n      for (var _len44 = arguments.length, args = new Array(_len44), _key44 = 0; _key44 < _len44; _key44++) {\n        args[_key44] = arguments[_key44];\n      }\n      return move.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context147 = [editor]).call(_context147, args));\n    },\n    moveNodes: function moveNodes$1() {\n      var _context148;\n      for (var _len45 = arguments.length, args = new Array(_len45), _key45 = 0; _key45 < _len45; _key45++) {\n        args[_key45] = arguments[_key45];\n      }\n      return moveNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context148 = [editor]).call(_context148, args));\n    },\n    next: function next$1() {\n      var _context149;\n      for (var _len46 = arguments.length, args = new Array(_len46), _key46 = 0; _key46 < _len46; _key46++) {\n        args[_key46] = arguments[_key46];\n      }\n      return next.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context149 = [editor]).call(_context149, args));\n    },\n    node: function node$1() {\n      var _context150;\n      for (var _len47 = arguments.length, args = new Array(_len47), _key47 = 0; _key47 < _len47; _key47++) {\n        args[_key47] = arguments[_key47];\n      }\n      return node.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context150 = [editor]).call(_context150, args));\n    },\n    nodes: function nodes$1() {\n      var _context151;\n      for (var _len48 = arguments.length, args = new Array(_len48), _key48 = 0; _key48 < _len48; _key48++) {\n        args[_key48] = arguments[_key48];\n      }\n      return nodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context151 = [editor]).call(_context151, args));\n    },\n    normalize: function normalize$1() {\n      var _context152;\n      for (var _len49 = arguments.length, args = new Array(_len49), _key49 = 0; _key49 < _len49; _key49++) {\n        args[_key49] = arguments[_key49];\n      }\n      return normalize.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context152 = [editor]).call(_context152, args));\n    },\n    parent: function parent$1() {\n      var _context153;\n      for (var _len50 = arguments.length, args = new Array(_len50), _key50 = 0; _key50 < _len50; _key50++) {\n        args[_key50] = arguments[_key50];\n      }\n      return parent.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context153 = [editor]).call(_context153, args));\n    },\n    path: function path$1() {\n      var _context154;\n      for (var _len51 = arguments.length, args = new Array(_len51), _key51 = 0; _key51 < _len51; _key51++) {\n        args[_key51] = arguments[_key51];\n      }\n      return path.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context154 = [editor]).call(_context154, args));\n    },\n    pathRef: function pathRef$1() {\n      var _context155;\n      for (var _len52 = arguments.length, args = new Array(_len52), _key52 = 0; _key52 < _len52; _key52++) {\n        args[_key52] = arguments[_key52];\n      }\n      return pathRef.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context155 = [editor]).call(_context155, args));\n    },\n    pathRefs: function pathRefs$1() {\n      var _context156;\n      for (var _len53 = arguments.length, args = new Array(_len53), _key53 = 0; _key53 < _len53; _key53++) {\n        args[_key53] = arguments[_key53];\n      }\n      return pathRefs.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context156 = [editor]).call(_context156, args));\n    },\n    point: function point$1() {\n      var _context157;\n      for (var _len54 = arguments.length, args = new Array(_len54), _key54 = 0; _key54 < _len54; _key54++) {\n        args[_key54] = arguments[_key54];\n      }\n      return point.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context157 = [editor]).call(_context157, args));\n    },\n    pointRef: function pointRef$1() {\n      var _context158;\n      for (var _len55 = arguments.length, args = new Array(_len55), _key55 = 0; _key55 < _len55; _key55++) {\n        args[_key55] = arguments[_key55];\n      }\n      return pointRef.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context158 = [editor]).call(_context158, args));\n    },\n    pointRefs: function pointRefs$1() {\n      var _context159;\n      for (var _len56 = arguments.length, args = new Array(_len56), _key56 = 0; _key56 < _len56; _key56++) {\n        args[_key56] = arguments[_key56];\n      }\n      return pointRefs.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context159 = [editor]).call(_context159, args));\n    },\n    positions: function positions$1() {\n      var _context160;\n      for (var _len57 = arguments.length, args = new Array(_len57), _key57 = 0; _key57 < _len57; _key57++) {\n        args[_key57] = arguments[_key57];\n      }\n      return positions.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context160 = [editor]).call(_context160, args));\n    },\n    previous: function previous$1() {\n      var _context161;\n      for (var _len58 = arguments.length, args = new Array(_len58), _key58 = 0; _key58 < _len58; _key58++) {\n        args[_key58] = arguments[_key58];\n      }\n      return previous.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context161 = [editor]).call(_context161, args));\n    },\n    range: function range$1() {\n      var _context162;\n      for (var _len59 = arguments.length, args = new Array(_len59), _key59 = 0; _key59 < _len59; _key59++) {\n        args[_key59] = arguments[_key59];\n      }\n      return range.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context162 = [editor]).call(_context162, args));\n    },\n    rangeRef: function rangeRef$1() {\n      var _context163;\n      for (var _len60 = arguments.length, args = new Array(_len60), _key60 = 0; _key60 < _len60; _key60++) {\n        args[_key60] = arguments[_key60];\n      }\n      return rangeRef.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context163 = [editor]).call(_context163, args));\n    },\n    rangeRefs: function rangeRefs$1() {\n      var _context164;\n      for (var _len61 = arguments.length, args = new Array(_len61), _key61 = 0; _key61 < _len61; _key61++) {\n        args[_key61] = arguments[_key61];\n      }\n      return rangeRefs.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context164 = [editor]).call(_context164, args));\n    },\n    removeNodes: function removeNodes$1() {\n      var _context165;\n      for (var _len62 = arguments.length, args = new Array(_len62), _key62 = 0; _key62 < _len62; _key62++) {\n        args[_key62] = arguments[_key62];\n      }\n      return removeNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context165 = [editor]).call(_context165, args));\n    },\n    select: function select$1() {\n      var _context166;\n      for (var _len63 = arguments.length, args = new Array(_len63), _key63 = 0; _key63 < _len63; _key63++) {\n        args[_key63] = arguments[_key63];\n      }\n      return select.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context166 = [editor]).call(_context166, args));\n    },\n    setNodes: function setNodes$1() {\n      var _context167;\n      for (var _len64 = arguments.length, args = new Array(_len64), _key64 = 0; _key64 < _len64; _key64++) {\n        args[_key64] = arguments[_key64];\n      }\n      return setNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context167 = [editor]).call(_context167, args));\n    },\n    setNormalizing: function setNormalizing$1() {\n      var _context168;\n      for (var _len65 = arguments.length, args = new Array(_len65), _key65 = 0; _key65 < _len65; _key65++) {\n        args[_key65] = arguments[_key65];\n      }\n      return setNormalizing.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context168 = [editor]).call(_context168, args));\n    },\n    setPoint: function setPoint$1() {\n      var _context169;\n      for (var _len66 = arguments.length, args = new Array(_len66), _key66 = 0; _key66 < _len66; _key66++) {\n        args[_key66] = arguments[_key66];\n      }\n      return setPoint.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context169 = [editor]).call(_context169, args));\n    },\n    setSelection: function setSelection$1() {\n      var _context170;\n      for (var _len67 = arguments.length, args = new Array(_len67), _key67 = 0; _key67 < _len67; _key67++) {\n        args[_key67] = arguments[_key67];\n      }\n      return setSelection.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context170 = [editor]).call(_context170, args));\n    },\n    splitNodes: function splitNodes$1() {\n      var _context171;\n      for (var _len68 = arguments.length, args = new Array(_len68), _key68 = 0; _key68 < _len68; _key68++) {\n        args[_key68] = arguments[_key68];\n      }\n      return splitNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context171 = [editor]).call(_context171, args));\n    },\n    start: function start$1() {\n      var _context172;\n      for (var _len69 = arguments.length, args = new Array(_len69), _key69 = 0; _key69 < _len69; _key69++) {\n        args[_key69] = arguments[_key69];\n      }\n      return start.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context172 = [editor]).call(_context172, args));\n    },\n    string: function string$1() {\n      var _context173;\n      for (var _len70 = arguments.length, args = new Array(_len70), _key70 = 0; _key70 < _len70; _key70++) {\n        args[_key70] = arguments[_key70];\n      }\n      return string.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context173 = [editor]).call(_context173, args));\n    },\n    unhangRange: function unhangRange$1() {\n      var _context174;\n      for (var _len71 = arguments.length, args = new Array(_len71), _key71 = 0; _key71 < _len71; _key71++) {\n        args[_key71] = arguments[_key71];\n      }\n      return unhangRange.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context174 = [editor]).call(_context174, args));\n    },\n    unsetNodes: function unsetNodes$1() {\n      var _context175;\n      for (var _len72 = arguments.length, args = new Array(_len72), _key72 = 0; _key72 < _len72; _key72++) {\n        args[_key72] = arguments[_key72];\n      }\n      return unsetNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context175 = [editor]).call(_context175, args));\n    },\n    unwrapNodes: function unwrapNodes$1() {\n      var _context176;\n      for (var _len73 = arguments.length, args = new Array(_len73), _key73 = 0; _key73 < _len73; _key73++) {\n        args[_key73] = arguments[_key73];\n      }\n      return unwrapNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context176 = [editor]).call(_context176, args));\n    },\n    void: function _void() {\n      var _context177;\n      for (var _len74 = arguments.length, args = new Array(_len74), _key74 = 0; _key74 < _len74; _key74++) {\n        args[_key74] = arguments[_key74];\n      }\n      return getVoid.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context177 = [editor]).call(_context177, args));\n    },\n    withoutNormalizing: function withoutNormalizing$1() {\n      var _context178;\n      for (var _len75 = arguments.length, args = new Array(_len75), _key75 = 0; _key75 < _len75; _key75++) {\n        args[_key75] = arguments[_key75];\n      }\n      return withoutNormalizing.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context178 = [editor]).call(_context178, args));\n    },\n    wrapNodes: function wrapNodes$1() {\n      var _context179;\n      for (var _len76 = arguments.length, args = new Array(_len76), _key76 = 0; _key76 < _len76; _key76++) {\n        args[_key76] = arguments[_key76];\n      }\n      return wrapNodes.apply(void 0, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context179 = [editor]).call(_context179, args));\n    }\n  };\n  return editor;\n};\n\n\n//# sourceURL=webpack://print-designer/./src/components/common/slate.ts?");

/***/ }),

/***/ 27692:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(92192);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6908);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(82044);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(41232);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(21980);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(84945);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(32064);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(98092);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(14772);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _hooks_useCompare__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(37888);\n\n\n\n\nvar _excluded = [\"key\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// import * as Comlink from 'comlink'\n// import GridWorker from '../../utils/gridWorker.worker.ts'\n\n\n\n\nvar getFrontOrBehindIndex = function getFrontOrBehindIndex(index) {\n  var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'up';\n  return direction === 'up' ? index : index + 1;\n};\nvar getDataSourceNode = function getDataSourceNode(globalConfig, dataSource) {\n  return (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_27__.getDataSourceNodeBy)(globalConfig.definition, function (node) {\n    if (node.dataSource === dataSource) return true;\n  });\n};\nvar clearMergeConfig = function clearMergeConfig(mergeConfig, rowStart, rowLength, columnStart, columnLength, originCells, getCellIdx) {\n  for (var i = rowStart; i <= rowStart + rowLength - 1; i++) {\n    for (var j = columnStart; j <= columnStart + columnLength - 1; j++) {\n      var _originCells$getCellI, _context2;\n      // 不只是当前，当前合并的也要拆分\n      if ((_originCells$getCellI = originCells[getCellIdx(i, j)]) !== null && _originCells$getCellI !== void 0 && _originCells$getCellI.mergeConfig) {\n        var _context;\n        var _originCells$getCellI2 = originCells[getCellIdx(i, j)].mergeConfig,\n          _rowStart = _originCells$getCellI2.rowStart,\n          _columnStart = _originCells$getCellI2.columnStart;\n        mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context = \"\".concat(_rowStart, \"_\")).call(_context, _columnStart)] = undefined;\n      }\n      mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context2 = \"\".concat(i, \"_\")).call(_context2, j)] = undefined;\n    }\n  }\n};\nvar EMPTY_ARRAY = [];\n// TODO:\n// 动态数据修改太多了\nvar KDGrid = function KDGrid(props) {\n  var data = props.data;\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_21__.useContext)(_context__WEBPACK_IMPORTED_MODULE_25__.CanvasSelectContext);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_21__.useContext)(_context__WEBPACK_IMPORTED_MODULE_25__.PrintRootContext);\n  var activedSelectId = canvasSelectContext.activedSelectId;\n  // const previousLastedSelectedId = usePrevious(activedSelectId)\n  // 这里items应该只需要id\n  // 这里item应该从所有data中计算获取\n  var _data$mergeConfig = data.mergeConfig,\n    mergeConfig = _data$mergeConfig === void 0 ? {} : _data$mergeConfig,\n    id = data.id,\n    fixedRowAtPage = data.fixedRowAtPage,\n    _data$fixedRowCount = data.fixedRowCount,\n    templateRowCount = _data$fixedRowCount === void 0 ? 1 : _data$fixedRowCount,\n    height = data.height,\n    width = data.width,\n    x = data.x,\n    y = data.y,\n    gridBorderType = data.borderType,\n    subGridId = data.subGridId,\n    dataSource = data.dataSource;\n  var dataKey = data.key,\n    componentData = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(data, _excluded);\n  var globalConfig = context.globalConfig,\n    dataContext = context.dataContext;\n  var isDataGridType = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.isDataGrid)(data);\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_21__.useState)(function () {\n      var _getDataSourceNode;\n      return isDataGridType && !fixedRowAtPage && !!dataSource && !!((_getDataSourceNode = getDataSourceNode(globalConfig, dataSource)) !== null && _getDataSourceNode !== void 0 && (_getDataSourceNode = _getDataSourceNode.SubEntryList) !== null && _getDataSourceNode !== void 0 && _getDataSourceNode.length);\n    }),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState, 2),\n    isShowAddSubGridBtn = _useState2[0],\n    setIsShowAddSubGridBtn = _useState2[1];\n  // const [isShowAddSubGridBtn, setIsShowAddSubGridBtn] = useState(true)\n  (0,react__WEBPACK_IMPORTED_MODULE_21__.useEffect)(function () {\n    var _getDataSourceNode2;\n    var isShow = isDataGridType && !fixedRowAtPage && !!dataSource && !!((_getDataSourceNode2 = getDataSourceNode(globalConfig, dataSource)) !== null && _getDataSourceNode2 !== void 0 && (_getDataSourceNode2 = _getDataSourceNode2.SubEntryList) !== null && _getDataSourceNode2 !== void 0 && _getDataSourceNode2.length);\n    if (isShow !== isShowAddSubGridBtn) {\n      setIsShowAddSubGridBtn(isShow);\n    }\n  }, [isShowAddSubGridBtn, dataSource, globalConfig, (0,_utils__WEBPACK_IMPORTED_MODULE_23__.isPrintModelIsTemplate)(dataContext), isDataGridType, language, fixedRowAtPage]);\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_29__.useSelected)(_objectSpread(_objectSpread({}, context), {}, {\n      activedSelectId: activedSelectId\n    }), id),\n    handleMouseDown = _useSelected.handleMouseDown,\n    isSelected = _useSelected.isSelected,\n    isLastSelected = _useSelected.isLastSelected;\n  // const { setMessage } = useContext(PrintDesignerContext)\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    selectionContext = context.selectionContext,\n    setMessage = context.setMessage,\n    pageWidth = context.pageWidth,\n    pageHeight = context.pageHeight,\n    dataFactory = context.dataFactory;\n  var meta = dataContext.getMeta();\n  var _getGridItems = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.getGridItems)(dataContext, id),\n    items = _getGridItems.items,\n    allItems = _getGridItems.allItems;\n  // TODO: 表格大于纸张的情况\n  var maxLimitWidthChange = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageWidth - width - x, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION) >= 0 ? (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageWidth - width - x, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION) : (_babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_13___default());\n  var maxLimitHeightChange = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageHeight - height - y, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION) >= 0 ? (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageHeight - height - y, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION) : (_babel_runtime_corejs3_core_js_stable_number_max_safe_integer__WEBPACK_IMPORTED_MODULE_13___default());\n  var createData = dataFactory;\n  // [id] ? [{id}] ?\n  // items.map(item => dataContext.findControl(item))\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.log('KDgrid', items);\n  var collectProps = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.getCollectProps)(items);\n  // const [collectProps, setCollectProps] = useState({})\n\n  // console.log('KDgrid after', items, collectProps)\n  var _collectProps$rows = collectProps.rows,\n    rows = _collectProps$rows === void 0 ? [] : _collectProps$rows,\n    _collectProps$columns = collectProps.columns,\n    columns = _collectProps$columns === void 0 ? [] : _collectProps$columns,\n    _collectProps$cells = collectProps.cells,\n    cells = _collectProps$cells === void 0 ? [] : _collectProps$cells,\n    rowItemData = collectProps.rowData,\n    columnItemData = collectProps.columnData;\n  var isCellChange = (0,_hooks_useCompare__WEBPACK_IMPORTED_MODULE_31__[\"default\"])(cells);\n  var isDataChange = (0,_hooks_useCompare__WEBPACK_IMPORTED_MODULE_31__[\"default\"])(data);\n  var isAllItemsChange = (0,_hooks_useCompare__WEBPACK_IMPORTED_MODULE_31__[\"default\"])(allItems);\n  // 兼容网格不刷新的问题\n  var cellItems = (0,react__WEBPACK_IMPORTED_MODULE_21__.useMemo)(function () {\n    return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.isLayoutGrid)(data) ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(cells).call(cells, function (_ref) {\n      var id = _ref.id;\n      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(allItems).call(allItems, function (item) {\n        return item.parentId === id;\n      });\n    }) : EMPTY_ARRAY;\n  }, [isDataChange, isCellChange, isAllItemsChange]);\n  var cellItemIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(cellItems).call(cellItems, function (_ref2) {\n    var id = _ref2.id;\n    return id;\n  });\n  var cellIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(cells).call(cells, function (_ref3) {\n    var id = _ref3.id;\n    return id;\n  });\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_21__.useState)(function () {\n      var _context3;\n      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context3 = selectionContext.getSelection()).call(_context3, function (id) {\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(cellIds).call(cellIds, id) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(cellItemIds).call(cellItemIds, id)) return id;\n      });\n    }),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState3, 2),\n    cellItemsSelection = _useState4[0],\n    setCellItemsSelection = _useState4[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_21__.useEffect)(function () {\n    var callback = function callback() {\n      var _context4;\n      var newIds = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context4 = selectionContext.getSelection()).call(_context4, function (id) {\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(cellIds).call(cellIds, id) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(cellItemIds).call(cellItemIds, id)) return id;\n      });\n      if (_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_16___default()(newIds).call(newIds) !== _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_16___default()(cellItemsSelection).call(cellItemsSelection)) {\n        setCellItemsSelection(newIds);\n      }\n    };\n    var sub = selectionContext.addSelectChangeListener(callback);\n    return function () {\n      sub && sub();\n    };\n  }, [cellItemsSelection, cellItemIds, cellIds]);\n  var _getRowData = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.getRowData)({\n      columns: columns,\n      rows: rows,\n      cells: cells,\n      mergeConfig: mergeConfig,\n      templateRowCount: templateRowCount,\n      fixedRowAtPage: fixedRowAtPage,\n      allItems: allItems,\n      gridData: data\n    }),\n    templateRowData = _getRowData.templateRowData,\n    originCells = _getRowData.originCells,\n    rowData = _getRowData.rowData,\n    templateRowHeight = _getRowData.templateRowHeight,\n    templateRowIndex = _getRowData.templateRowIndex,\n    templateRowY = _getRowData.templateRowY,\n    rowCount = _getRowData.rowCount,\n    columnCount = _getRowData.columnCount;\n  var rowsStr = _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_17___default()(rows);\n  var columnsStr = _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_17___default()(columns);\n  var getCellPosition = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.getCellPosition)({\n    rows: rows,\n    columns: columns\n  }), [rowsStr, columnsStr]);\n  var getCellIdx = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.getCellIdx)(columnCount), [columnCount]);\n  // TODO:\n  /**\n   * addRow\n   * deleteRow\n   * getRowIndexlocateByPosition\n   * getColumnIndexlocateByPosition\n   * addMerge\n   * removeMerge\n   * addBorder\n   * addColumn\n   * deleteColumn\n   * changeColumn columnWidth\n   * changeRow rowHeight\n   * changeCell ? value ? children ? border\n   * selectionDoSomething UI event\n   *\n   */\n  var ROW_TYPE = 'DataRow';\n  var addRow = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (rowIndex) {\n    var appendDirection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'up';\n    var rowType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_NORMAL;\n    var isExsitRow = arguments.length > 3 ? arguments[3] : undefined;\n    var rowCount = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\n    var needSelect = arguments.length > 5 ? arguments[5] : undefined;\n    var _dataContext$getData = dataContext.getData(),\n      allItems = _dataContext$getData.items;\n    // const rowItem = allItems.find(item => item.parentId === id && item.rowType === rowType)\n    var index = rowIndex;\n    var direction = appendDirection;\n    if (isExsitRow === false) {\n      if (rowType === _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_NORMAL) {\n        index = 0;\n        direction = 'up';\n      } else if (rowType === _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_STATISTIC) {\n        index = rows.length - 1;\n        direction = 'down';\n      }\n    }\n    var rowItem = rows[index];\n    var copyData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(rowItem);\n    // 类型\n    var rowId = copyData.id;\n    // 如果不存在无法找到数据\n    var nameMap = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_NORMAL, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0043')), _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_DETAIL, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0044')), _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_STATISTIC, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0045')), _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_LAYOUT, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0046')), _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_GROUP, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0047'));\n    var gridData = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (item) {\n      return item.id === id;\n    });\n    var newControls = [];\n    var rowAddIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_19___default()(allItems).call(allItems, function (item) {\n      return item.id === rowId;\n    });\n    for (var i = 0; i < rowCount; i++) {\n      var _rowData = createData({\n        type: ROW_TYPE,\n        parentId: id,\n        transferData: {\n          name: nameMap[rowType],\n          rowType: rowType\n        }\n      });\n      newControls.push(_rowData);\n    }\n    dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createAddAction)(newControls, {\n      index: getFrontOrBehindIndex(rowAddIndex, direction),\n      rowIndex: index,\n      direction: direction\n    })).then(function (actions) {\n      if (needSelect) {\n        var _cells = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(actions).call(actions, function (action) {\n          return action.value[0].type === 'DataCell';\n        }).value;\n        selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_cells).call(_cells, function (item) {\n          return item.id;\n        }));\n      }\n    });\n  }, [rowsStr, id]);\n  var deleteRow = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (index) {\n    var rowItem = rows[index];\n    var rowId = rowItem.id,\n      rowType = rowItem.rowType;\n    if (rowType === 'Detail') {\n      // TODO:\n      setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0048'));\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.error((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.getLangMsg)('printd.components.key0048'));\n      return;\n    }\n    if (rows.length === 1) {\n      if (index !== 0) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.error('unreachable error deleteRow action');\n      }\n      dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createDeleteAction)(id)).then(function () {\n        selectionContext.setSelect([]);\n      });\n      return;\n    }\n    selectionContext.setSelect([id]);\n    dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createDeleteAction)(rowId)).then(function () {\n      // 这个工具箱先触发更新, 导致这里还是原来选中先\n      // selectionContext.setSelect([id])\n    });\n  }, [rowsStr, id]);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.log('maxLimitWidthChange max', [maxLimitWidthChange, pageWidth, width, x], [maxLimitHeightChange, pageHeight, height, y]);\n  var addColumn = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (index) {\n    var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'up';\n    var columnCount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n    var columnItem = columns[index];\n    var copyData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(columnItem);\n    // 类型\n    var type = copyData.type,\n      columnId = copyData.id;\n    var items = [];\n    var _dataContext$getData2 = dataContext.getData(),\n      allItems = _dataContext$getData2.items;\n    var gridData = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (item) {\n      return item.id === id;\n    });\n    var currentMaxLimitWidthChange = maxLimitWidthChange;\n    var newControls = [];\n    var columnIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_19___default()(allItems).call(allItems, function (item) {\n      return item.id === columnId;\n    });\n    var _loop = function _loop() {\n        var columnData = createData({\n          type: type,\n          parentId: id\n        });\n        newControls.push(columnData);\n        // 1. 列，还有空间就延申表格空间，余量往后面挤压，\n        // 这里一般情况是两列均分\n        // 需求不要了\n        if (false) { var _currentLeaveWidth, changeColumnWidths, currentAverageDecreaseWidth, currentLeaveWidth, sumColumnWidth, aboveColumns, currentIdx, _loop2, isCanAddColumn, leaveWidth, getAverageColumnSplitWidth, isCanAverageColumnSplit; }\n      },\n      _ret;\n    for (var i = 0; i < columnCount; i++) {\n      _ret = _loop();\n      if (_ret) return _ret.v;\n    }\n    dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createAddAction)(newControls, {\n      index: getFrontOrBehindIndex(columnIndex, direction),\n      columnIndex: index,\n      direction: direction\n    }));\n  }, [columnsStr, id]);\n  var deleteColumn = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (index) {\n    var columnItem = columns[index];\n    var columnId = columnItem.id;\n    if (columns.length === 1) {\n      if (index !== 0) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.error('unreachable error deleteRow action');\n      }\n      dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createDeleteAction)(id)).then(function () {\n        selectionContext.setSelect([]);\n      });\n      return;\n    }\n    selectionContext.setSelect([id]);\n    dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createDeleteAction)(columnId)).then(function () {\n      // selectionContext.setSelect([id])\n    });\n  }, [columnsStr, id]);\n  var change = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (type) {\n    // 三个入参prop都是px单位\n    return function (index, changeProp, actualChangeProp, realChangeProp) {\n      var item = type === 'row' ? rows : columns;\n      var itemId = item[index].id;\n      var propName = type === 'row' ? 'rowHeight' : 'columnWidth';\n      var gridPropName = type === 'row' ? 'height' : 'width';\n      var gridData = dataContext.findControl(id);\n      var currentGridProp = gridData[gridPropName];\n      var currentProp = item[index][propName];\n      var _dataContext$getData3 = dataContext.getData(),\n        allItems = _dataContext$getData3.items;\n      var changes = [];\n      // 行列改变时，\n      // 主要是列\n      // 如果是减少，占满时走挤压逻辑，没有则不进入该分支\n      // 如果是增加，占满时走挤压，没有则要判断空间够不够 ？ 不了，直接外层判断，也不进入该分支\n      var isMaxLimitedzero = type === 'row' ? maxLimitHeightChange === 0 : maxLimitWidthChange === 0;\n      if (realChangeProp && isMaxLimitedzero) {\n        if (index !== item.length - 1) {\n          // const changes = []\n          // 必改变，不加判断变量\n          if (isMaxLimitedzero) {\n            var minSize = type === 'row' ? _constants__WEBPACK_IMPORTED_MODULE_28__.GRID_ROW_MIN_SIZE : _constants__WEBPACK_IMPORTED_MODULE_28__.GRID_COLUMN_MIN_SIZE;\n            if (realChangeProp > 0) {\n              var rightSides = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_20___default()(item).call(item, index + 1);\n              var rightSideSum = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.countLength)(rightSides);\n              // 这里如果不能再减少，需要提示？\n              var increaseProp = Math.min((0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorPxtoMM)(realChangeProp, scale), rightSideSum - minSize * rightSides.length);\n              // let changeType = 'extreme'\n              // if(increaseProp === realChangeProp) {\n              //   changeType = 'average'\n              // } else {\n              //   changeType = 'extreme'\n              // }\n              // let currentLeaveProp = increaseProp\n              var itemData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (data) {\n                return data.id === item[index].id;\n              }));\n              itemData[propName] = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(itemData[propName] + increaseProp, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n              changes.push([itemData.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, itemData[propName])]);\n              var _loop3 = function _loop3(i) {\n                if (increaseProp === 0) return 1; // break\n                var itemData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (data) {\n                  return data.id === item[i].id;\n                }));\n                if (itemData[propName] - minSize >= increaseProp) {\n                  itemData[propName] = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(itemData[propName] - increaseProp, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n                  changes.push([itemData.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, itemData[propName])]);\n                  increaseProp -= increaseProp;\n                } else {\n                  increaseProp = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(increaseProp - itemData[propName] + minSize, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n                  itemData[propName] = minSize;\n                  changes.push([itemData.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, itemData[propName])]);\n                }\n              };\n              for (var i = index + 1; i < item.length; i++) {\n                if (_loop3(i)) break;\n              }\n            } else {\n              // const leftSides = item.slice(0, index)\n              // const leftSideSum = countLength(leftSides)\n              var _itemData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (data) {\n                return data.id === item[index].id;\n              }));\n              var finallyProp = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(Math.max(_itemData[propName] + (0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorPxtoMM)(realChangeProp, scale), minSize), _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n              var decreaseProp = _itemData[propName] - finallyProp;\n              _itemData[propName] = finallyProp;\n              changes.push([_itemData.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, _itemData[propName])]);\n              // 其实只要下一个加上即可\n              var nextItemData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (data) {\n                return data.id === item[index + 1].id;\n              }));\n              nextItemData[propName] = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(nextItemData[propName] + decreaseProp, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n              changes.push([nextItemData.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, nextItemData[propName])]);\n              // for (let i = index; i >= 0; i--) {\n              //   const itemData = allItems.find(data => data.id === item[i].id)\n              //   if (decreaseProp === 0) break\n              //   itemData[propName] = toRoundFix(itemData[propName] + decreaseProp, 2)\n              //   decreaseProp -= decreaseProp\n              // }\n            }\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createUpdateAction)(changes));\n            return;\n          }\n        }\n      }\n      // TODO:\n      // 改变列宽时，余量加在列上\n      // 不需要了\n      // const detailRowChange = []\n      // if (type === 'row') {\n      //   const { rowType } = item[index]\n      //   if (rowType === 'Detail') {\n      //     detailRowChange.push([\n      //       id, {\n      //         detailRowHeight: currentProp + calculatorPxtoMM(changeProp, scale)\n      //       }\n      //     ])\n      //   }\n      // }\n      // 不走预处理与其他统一\n      // const changes = [\n      //   [itemId, {\n      //     [propName]: currentProp + calculatorPxtoMM(changeProp, scale)\n      //   }],\n      //   [id, {\n      //     [gridPropName]: currentGridProp + calculatorPxtoMM(actualChangeProp || changeProp, scale)\n      //   }]\n      // ]\n      // dataContext.batchUpdateControlPropertyValues(changes)\n      var changeItem = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(allItems).call(allItems, function (item) {\n        return item.id === itemId;\n      }));\n      changeItem[propName] = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(currentProp + (0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorPxtoMM)(changeProp, scale), _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n      changes.push([changeItem.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, changeItem[propName])]);\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createUpdateAction)(changes));\n    };\n  }, [id, scale, maxLimitHeightChange, maxLimitWidthChange, rowsStr, columnsStr]);\n  var changeRow = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(change('row'), [change]);\n  var changeColumn = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(change('column'), [change]);\n\n  // TODO: 大数据时采用二分查找\n  var getRowIndexlocateByPosition = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (y, templateY) {\n    var templateRowHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n    var rowPreviousHeight = 0;\n    var realTemplateY = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorMMtoPx)(templateY, scale);\n    var realTemplateRowHeight = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorMMtoPx)(templateRowHeight, scale);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.log('getRowIndexlocateByPosition', y, rows, collectProps, items, dataContext.getData());\n    var detailRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_19___default()(rows).call(rows, function (row) {\n      return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_28__.ROW_TYPE_DETAIL;\n    });\n    for (var index = 0; index < rows.length; index++) {\n      var rowHeight = rows[index].rowHeight;\n      var realRowHeight = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorMMtoPx)(rowHeight, scale);\n      if (realTemplateY > -1 && realTemplateRowHeight > 0) {\n        if (y > realTemplateY && y < realTemplateY + realTemplateRowHeight) return -1;\n        if (index > detailRowIndex) {\n          if (y >= rowPreviousHeight + realTemplateRowHeight && y <= realRowHeight + rowPreviousHeight + realTemplateRowHeight) {\n            return index;\n          }\n        } else {\n          if (y >= rowPreviousHeight && y <= realRowHeight + rowPreviousHeight) {\n            return index;\n          }\n        }\n      } else {\n        if (y >= rowPreviousHeight && y <= realRowHeight + rowPreviousHeight) {\n          return index;\n        }\n      }\n      rowPreviousHeight += realRowHeight;\n    }\n    // -1 ?\n    return -1;\n  }, [scale, rowsStr]);\n  var getColumnIndexlocateByPosition = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (x) {\n    var columnPreviousWidth = 0;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.log('getRowIndexlocateByPosition getColumnIndexlocateByPosition', x);\n    for (var index = 0; index < columns.length; index++) {\n      var columnWidth = columns[index].columnWidth;\n      var realColumnWidth = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.calculatorMMtoPx)(columnWidth, scale);\n      if (x >= columnPreviousWidth && x <= realColumnWidth + columnPreviousWidth) {\n        return index;\n      }\n      columnPreviousWidth += realColumnWidth;\n    }\n    // -1 ?\n    return -1;\n  }, [scale, columnsStr]);\n  var addMerge = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (_ref12) {\n    var _context5;\n    var rowStart = _ref12.rowStart,\n      rowLength = _ref12.rowLength,\n      columnStart = _ref12.columnStart,\n      columnLength = _ref12.columnLength;\n    var gridData = dataContext.findControl(id);\n    var _dataContext$getData4 = dataContext.getData(),\n      items = _dataContext$getData4.items;\n    var newMergeConfig = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(gridData.mergeConfig || {});\n    clearMergeConfig(newMergeConfig, rowStart, rowLength, columnStart, columnLength, originCells, getCellIdx);\n    var changeProp = {\n      mergeConfig: (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, newMergeConfig, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context5 = \"\".concat(rowStart, \"_\")).call(_context5, columnStart), {\n        rowStart: rowStart,\n        rowLength: rowLength,\n        columnStart: columnStart,\n        columnLength: columnLength\n      }))\n    };\n    changeProp.mergeConfig = lodash__WEBPACK_IMPORTED_MODULE_30___default().omitBy(changeProp.mergeConfig, (lodash__WEBPACK_IMPORTED_MODULE_30___default().isUndefined));\n    var realGridData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(items).call(items, function (item) {\n      return item.id === id;\n    }));\n    realGridData.mergeConfig = changeProp.mergeConfig;\n    var changes = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.changeItemsBorderByMergeConfig)(realGridData, items);\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(changes).call(changes, [[id, changeProp]]))).then(function () {\n      // 不能用rowData 因为rowData是实际的行列数据\n      // 得用originCells\n      selectionContext.setSelect([originCells[getCellIdx(rowStart, columnStart)].id]); // rowData[rowStart].cells[columnStart].id\n    });\n  }, [rowData, id, originCells, getCellIdx]);\n  var removeMerge = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (_ref13) {\n    var rowStart = _ref13.rowStart,\n      rowLength = _ref13.rowLength,\n      columnStart = _ref13.columnStart,\n      columnLength = _ref13.columnLength;\n    var gridData = dataContext.findControl(id);\n    var _dataContext$getData5 = dataContext.getData(),\n      items = _dataContext$getData5.items;\n    var newMergeConfig = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(gridData.mergeConfig || {});\n    clearMergeConfig(newMergeConfig, rowStart, rowLength, columnStart, columnLength, originCells, getCellIdx);\n    var realGridData = lodash__WEBPACK_IMPORTED_MODULE_30___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(items).call(items, function (item) {\n      return item.id === id;\n    }));\n    var changeProps = {\n      mergeConfig: lodash__WEBPACK_IMPORTED_MODULE_30___default().omitBy((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, gridData.mergeConfig, newMergeConfig), (lodash__WEBPACK_IMPORTED_MODULE_30___default().isUndefined))\n    };\n    realGridData.mergeConfig = changeProps.mergeConfig;\n    var changes = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.changeItemsBorderByMergeConfig)(realGridData, items, true);\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(changes).call(changes, [[id, changeProps]])));\n  }, [id, originCells]);\n\n  // const addBorder = (borderType) => {\n\n  // }\n  // console.log(`collectProps`, collectProps)\n  // return null\n\n  var addSubDataGrid = (0,react__WEBPACK_IMPORTED_MODULE_21__.useCallback)(function (type) {\n    var pageWidth = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.getPaperSize)(dataContext).width;\n    var halfPageWidth = (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageWidth / 2, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION);\n    // 如果主表格宽度占满纸张宽度，则子表格的宽度为纸张宽度的一半\n    var isNeedHalfPageWidth = x === 0 && pageWidth - width < 1;\n    var pos = type === 'right' ? {\n      x: isNeedHalfPageWidth ? halfPageWidth : (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(x + width, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION),\n      y: y,\n      width: isNeedHalfPageWidth ? halfPageWidth : (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageWidth - x - width, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION)\n    } : {\n      x: x,\n      y: (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(y + height, _constants__WEBPACK_IMPORTED_MODULE_28__.PRECISION),\n      width: width\n    };\n    var transferData = _objectSpread(_objectSpread({\n      parentGridId: id\n    }, pos), {}, {\n      subGridDirection: type\n    });\n    var newControl = createData({\n      type: _constants__WEBPACK_IMPORTED_MODULE_28__.SUB_GRID_TYPE,\n      parentId: dataContext.getRootId(),\n      transferData: transferData\n    });\n    dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.createAddAction)(newControl, {\n      transferData: transferData\n    })).then(function (actions) {\n      var _actions$;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_26__.console.log('addSubDataGrid', actions);\n      ((_actions$ = actions[0]) === null || _actions$ === void 0 || (_actions$ = _actions$.value) === null || _actions$ === void 0 || (_actions$ = _actions$[0]) === null || _actions$ === void 0 ? void 0 : _actions$.id) && selectionContext.setSelect([actions[0].value[0].id]);\n      // return actions[0].value\n    });\n  }, [id, x, y, height, width]);\n  var GridComp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_21___default().createElement(_grid__WEBPACK_IMPORTED_MODULE_22__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, collectProps, componentData, {\n    gridBorderType: gridBorderType,\n    templateRowData: templateRowData,\n    rowItemData: rowItemData,\n    columnItemData: columnItemData,\n    addRow: addRow,\n    originCells: originCells,\n    rowCount: rowCount,\n    columnCount: columnCount,\n    rowData: rowData,\n    templateRowHeight: templateRowHeight,\n    templateRowIndex: templateRowIndex,\n    getCellPosition: getCellPosition,\n    getCellIdx: getCellIdx,\n    templateRowY: templateRowY,\n    changeRow: changeRow,\n    deleteRow: deleteRow,\n    addColumn: addColumn,\n    changeColumn: changeColumn,\n    deleteColumn: deleteColumn,\n    removeMerge: removeMerge,\n    addMerge: addMerge,\n    getRowIndexlocateByPosition: getRowIndexlocateByPosition,\n    getColumnIndexlocateByPosition: getColumnIndexlocateByPosition,\n    maxLimitWidthChange: maxLimitWidthChange,\n    maxLimitHeightChange: maxLimitHeightChange,\n    handleMouseDown: handleMouseDown,\n    isSelected: isSelected,\n    isLastSelected: isLastSelected,\n    cellItems: cellItems,\n    subGridId: subGridId,\n    addSubDataGrid: addSubDataGrid,\n    isShowAddSubGridBtn: isShowAddSubGridBtn\n    // 这是React的bug? grid.tsx用了这个context，但是并没有导致内部scale变化, TODO\n    ,\n    scale: scale,\n    cellItemsSelection: cellItemsSelection\n  }));\n  return GridComp;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDGrid);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/KDGrid.tsx?");

/***/ }),

/***/ 38620:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _factory_parseUIControl__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23312);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84945);\n/* harmony import */ var _KDTextField__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(94028);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\nvar Cell = function Cell(props) {\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_9__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_11__.PrintRootContext);\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    dataContext = context.dataContext;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_9__.useRef)(null);\n  var x = props.x,\n    y = props.y,\n    id = props.id,\n    width = props.width,\n    height = props.height,\n    config = props.config,\n    isTemplate = props.isTemplate,\n    cellBackColor = props.cellBackColor,\n    backColor = props.backColor;\n  var childItems = !isTemplate ? dataContext.findControlByCondition(function (item) {\n    return item.parentId === id;\n  }) || [] : [];\n  // childItems = childItems.map(item => ({\n  //   ...item, x: 0, y: 0, width, height\n  // }))\n  // const childItems = items ? (items || []).map(item => ({\n  //   ...item, x: 0, y: 0, width, height\n  // })) : undefined\n  // console.log('cell--------items', childItems)\n  var hasChildItems = isTemplate ? false : !!childItems && !!childItems.length;\n  // 这里可以直接复用\n  // 去除选中状态即可\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_KDTextField__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n    data: _objectSpread(_objectSpread({}, props), {}, {\n      isCell: true,\n      hasChildItems: hasChildItems,\n      isTemplate: isTemplate,\n      backColor: cellBackColor || backColor,\n      childItems: childItems\n    })\n  }, childItems && (0,_factory_parseUIControl__WEBPACK_IMPORTED_MODULE_10__.parseUIControl)(childItems, true));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Cell);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/cell.tsx?");

/***/ }),

/***/ 10076:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _hooks_useContainer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(82104);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(98092);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21980);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n// @ts-nocheck\n\n\n\n\n\n\nvar classPrefix = 'grid-context-menu';\nvar UP = 'up';\nvar BOTTOM = 'bottom';\n// TODO: 需要重构\nvar GridContextMenu = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_4__.forwardRef)(function (_ref, forwardedRef) {\n  var x = _ref.x,\n    y = _ref.y,\n    portalRef = _ref.portalRef,\n    rowData = _ref.rowData,\n    gridType = _ref.gridType,\n    originCells = _ref.originCells,\n    getCellIdx = _ref.getCellIdx,\n    mergeConfig = _ref.mergeConfig,\n    gridSelectionContext = _ref.gridSelectionContext,\n    hideContextMenu = _ref.hideContextMenu,\n    addRow = _ref.addRow,\n    addColumn = _ref.addColumn,\n    deleteRow = _ref.deleteRow,\n    deleteColumn = _ref.deleteColumn,\n    addMerge = _ref.addMerge,\n    removeMerge = _ref.removeMerge,\n    calcSelectionCanMerge = _ref.calcSelectionCanMerge,\n    rowCount = _ref.rowCount,\n    columnCount = _ref.columnCount,\n    rows = _ref.rows,\n    subGridId = _ref.subGridId,\n    dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext;\n  var isSingleCell = selectionContext.getSelection().length === 1 && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isGridRelativeControl)(dataContext.findControl(selectionContext.getSelection()[0]));\n  // const ref = useRef(null)\n  // useOnClickOutside([ref], () => {\n  //   ref.current.style.display = 'none'\n  // })\n  // 数据行的策略得讨论下\n  // 置灰。。。\n  // 这里还要设置跨不同行不能合并\n  var calcSelectionRect = calcSelectionCanMerge();\n  var isHideMenu = !isSingleCell && !calcSelectionRect;\n  var calcIsMerge = function calcIsMerge() {\n    var _gridSelectionContext = gridSelectionContext.selection,\n      minRowNum = _gridSelectionContext.minRowNum,\n      maxRowNum = _gridSelectionContext.maxRowNum,\n      minColumnNum = _gridSelectionContext.minColumnNum,\n      maxColumnNum = _gridSelectionContext.maxColumnNum;\n    if (minRowNum === undefined || maxRowNum === undefined || minColumnNum === undefined || maxColumnNum === undefined) {\n      // TODO:\n      // 不是通过框选，就通过选择\n      if (!calcSelectionRect) return false;\n      var isSameRowType = calcSelectionRect.isSameRowType,\n        isOnlyOneRowData = calcSelectionRect.isOnlyOneRowData;\n      return isSameRowType && !isOnlyOneRowData;\n    }\n    // 同一类型\n    var rowIndex = originCells[getCellIdx(minRowNum, 0)].row;\n    var rowType = rows[rowIndex].rowType;\n    for (var i = minRowNum + 1; i <= maxRowNum; i++) {\n      var _rowIndex = originCells[getCellIdx(i, 0)].row;\n      if (rowType !== rows[_rowIndex].rowType) {\n        return false;\n      }\n    }\n    var firstMergeConfig = originCells[getCellIdx(minRowNum, minColumnNum)].mergeConfig;\n    if (firstMergeConfig) {\n      for (var _i = minRowNum; _i <= maxRowNum; _i++) {\n        for (var j = minColumnNum; j <= maxColumnNum; j++) {\n          var _mergeConfig = originCells[getCellIdx(_i, j)].mergeConfig;\n          if (!lodash__WEBPACK_IMPORTED_MODULE_5___default().isEqual(_mergeConfig, firstMergeConfig)) {\n            return true;\n          }\n        }\n      }\n      return false;\n    }\n    return true;\n  };\n  var calcIsSplit = function calcIsSplit() {\n    var _context, _originCells$getCellI;\n    var rowIndex = gridSelectionContext.contextRowIndex,\n      columnIndex = gridSelectionContext.contextColumnIndex,\n      operationRowIndex = gridSelectionContext.operationRowIndex,\n      operationColumnIndex = gridSelectionContext.operationColumnIndex;\n    var _gridSelectionContext2 = gridSelectionContext.selection,\n      minRowNum = _gridSelectionContext2.minRowNum,\n      maxRowNum = _gridSelectionContext2.maxRowNum,\n      minColumnNum = _gridSelectionContext2.minColumnNum,\n      maxColumnNum = _gridSelectionContext2.maxColumnNum;\n    if (!(minRowNum === undefined || maxRowNum === undefined || minColumnNum === undefined || maxColumnNum === undefined)) {\n      for (var i = minRowNum; i <= maxRowNum; i++) {\n        for (var j = minColumnNum; j <= maxColumnNum; j++) {\n          var _mergeConfig2 = originCells[getCellIdx(i, j)].mergeConfig;\n          if (_mergeConfig2) {\n            return true;\n          }\n        }\n      }\n      return false;\n    }\n    if (operationRowIndex !== undefined) {\n      // 单行\n      for (var _j = 0; _j < columnCount; _j++) {\n        var _mergeConfig3 = originCells[getCellIdx(operationRowIndex, _j)].mergeConfig;\n        if (_mergeConfig3) {\n          return true;\n        }\n      }\n      return false;\n    }\n    if (operationColumnIndex !== undefined) {\n      // 单列\n      for (var _i2 = 0; _i2 < rowCount; _i2++) {\n        var _mergeConfig4 = originCells[getCellIdx(_i2, operationColumnIndex)].mergeConfig;\n        if (_mergeConfig4) {\n          return true;\n        }\n      }\n      return false;\n    }\n    if (rowIndex === undefined || columnIndex === undefined) return false;\n    return !!mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context = \"\".concat(rowIndex, \"_\")).call(_context, columnIndex)] || !!((_originCells$getCellI = originCells[getCellIdx(rowIndex, columnIndex)]) !== null && _originCells$getCellI !== void 0 && _originCells$getCellI.mergeConfig);\n  };\n  var isCanMerge = calcIsMerge();\n  var isCanSplit = calcIsSplit();\n  var getRowIndex = function getRowIndex(direction) {\n    if (calcSelectionRect) {\n      if (direction === UP) {\n        return calcSelectionRect.minRowNum;\n      } else {\n        return calcSelectionRect.maxRowNum;\n      }\n    }\n    if (isCanSplit && gridSelectionContext.operationType === 'cell') {\n      var _context2, _originCells$getCellI2;\n      var rowIndex = gridSelectionContext.contextRowIndex,\n        columnIndex = gridSelectionContext.contextColumnIndex;\n      var config = mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context2 = \"\".concat(rowIndex, \"_\")).call(_context2, columnIndex)] || ((_originCells$getCellI2 = originCells[getCellIdx(rowIndex, columnIndex)]) === null || _originCells$getCellI2 === void 0 ? void 0 : _originCells$getCellI2.mergeConfig);\n      if (direction === UP && config) {\n        return config.rowStart;\n      } else if (config) {\n        return config.rowStart + config.rowLength - 1;\n      }\n    }\n    return gridSelectionContext.operationType === 'cell' ? gridSelectionContext.contextRowIndex : gridSelectionContext.operationRowIndex;\n  };\n  var getColumnIndex = function getColumnIndex(direction) {\n    if (calcSelectionRect) {\n      if (direction === UP) {\n        return calcSelectionRect.minColumnNum;\n      } else {\n        return calcSelectionRect.maxColumnNum;\n      }\n    }\n    if (isCanSplit && gridSelectionContext.operationType === 'cell') {\n      var _context3, _originCells$getCellI3;\n      var rowIndex = gridSelectionContext.contextRowIndex,\n        columnIndex = gridSelectionContext.contextColumnIndex;\n      var config = mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context3 = \"\".concat(rowIndex, \"_\")).call(_context3, columnIndex)] || ((_originCells$getCellI3 = originCells[getCellIdx(rowIndex, columnIndex)]) === null || _originCells$getCellI3 === void 0 ? void 0 : _originCells$getCellI3.mergeConfig);\n      if (direction === UP && config) {\n        return config.columnStart;\n      } else if (config) {\n        return config.columnStart + config.columnLength - 1;\n      }\n    }\n    return gridSelectionContext.operationType === 'cell' ? gridSelectionContext.contextColumnIndex : gridSelectionContext.operationColumnIndex;\n  };\n  var getAddRowType = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (rowIndex, direction) {\n    if (gridType === 'LayoutGrid' || gridType === 'CardGrid') {\n      return _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_LAYOUT;\n    } else {\n      var detailRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default()(rowData).call(rowData, function (row) {\n        return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isDetailRow)(row.row);\n      });\n      if (detailRowIndex === -1) {\n        return _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_NORMAL;\n      } else {\n        if (rowIndex < detailRowIndex) {\n          return _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_NORMAL;\n        } else if (rowIndex > detailRowIndex) {\n          return _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_STATISTIC;\n        } else {\n          if (direction === UP) {\n            return _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_NORMAL;\n          } else {\n            return _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_STATISTIC;\n          }\n        }\n      }\n    }\n  }, [gridType, rowData]);\n  var isExsitNormalRow = !!_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(rowData).call(rowData, function (row) {\n    return row.row.rowType === _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_NORMAL || row.row.rowType === _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_LAYOUT;\n  }).length;\n  var isExsitStatisticRow = !!_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(rowData).call(rowData, function (row) {\n    return row.row.rowType === _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_STATISTIC;\n  }).length;\n  var isExsitLayoutRow = !!_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(rowData).call(rowData, function (row) {\n    return row.row.rowType === _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_LAYOUT;\n  }).length;\n  var hasMergeSummaryField = !!_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(rowData).call(rowData, function (row) {\n    var _dataRow$mergeSummary;\n    var dataRow = row.row;\n    return dataRow.rowType === _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_DETAIL && ((_dataRow$mergeSummary = dataRow.mergeSummaryField) === null || _dataRow$mergeSummary === void 0 ? void 0 : _dataRow$mergeSummary.length);\n  }).length;\n  var isNormalRowOperation = gridSelectionContext.operationType !== 'column' && !isExsitNormalRow;\n  var isStatisticRowOperation = gridSelectionContext.operationType !== 'column' && !isExsitStatisticRow && !isExsitLayoutRow;\n  var isDeleteRow = gridSelectionContext.operationType === 'row';\n  var isDeleteColumn = gridSelectionContext.operationType === 'column';\n  var showAddGroupRow = gridType === 'DataGrid' && !_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(rowData).call(rowData, function (row) {\n    return row.row.rowType === _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_GROUP;\n  }).length && !(subGridId !== null && subGridId !== void 0 && subGridId.length) && !hasMergeSummaryField;\n  var isColumnOperation = !isHideMenu && true; // gridSelectionContext.operationType !== 'row'\n  var isRowOperation = !isHideMenu && true; // gridSelectionContext.operationType !== 'column'\n  var isOperationMultiple = !!gridSelectionContext.operationMultiple;\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.console.log(x, y, 'GridContextMenu', isCanMerge, isCanSplit, gridSelectionContext);\n  var getSpanStyle = function getSpanStyle() {\n    var someCase = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n    return someCase && (isCanMerge || isCanSplit) ? {\n      borderBottom: '1px solid #D9D9D9'\n    } : {};\n  };\n  var isHide = isHideMenu && gridSelectionContext.operationType === 'cell';\n  var pos = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    var winHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;\n    if (isOperationMultiple) {\n      return {\n        top: y,\n        left: x\n      };\n    }\n    var panelHeight = 16;\n    if (isRowOperation) panelHeight += showAddGroupRow ? 96 : 64;\n    if (isColumnOperation) panelHeight += 64;\n    if (isDeleteRow) panelHeight += 32;\n    if (isDeleteColumn) panelHeight += 32;\n    if (isCanMerge) panelHeight += 32;\n    if (isCanSplit) panelHeight += 32;\n    if (y + panelHeight > winHeight) {\n      return {\n        top: y - panelHeight,\n        left: x\n      };\n    }\n    return {\n      top: y,\n      left: x\n    };\n  }, [isDeleteRow, isDeleteColumn, isCanMerge, isCanSplit, isOperationMultiple]);\n  (0,_hooks_useContainer__WEBPACK_IMPORTED_MODULE_6__.useContainer)({\n    portalRef: portalRef,\n    position: 'fixed',\n    children: !isHide && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      className: classPrefix,\n      ref: forwardedRef,\n      style: pos\n    }, isOperationMultiple ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      onClick: function onClick() {\n        hideContextMenu();\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0031'))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, isRowOperation && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      onClick: function onClick() {\n        var detailRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default()(rowData).call(rowData, function (row) {\n          return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isDetailRow)(row.row);\n        });\n        var groupRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default()(rowData).call(rowData, function (row) {\n          return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isGroupRow)(row.row);\n        });\n        var rowIndex = getRowIndex(UP);\n        hideContextMenu();\n        if (groupRowIndex > -1 && rowIndex === detailRowIndex) {\n          rowIndex = groupRowIndex;\n        }\n        addRow(rowIndex, UP, getAddRowType(rowIndex, UP));\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0032')), isRowOperation && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      // style={getSpanStyle(!isColumnOperation)}\n      onClick: function onClick() {\n        var groupRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default()(rowData).call(rowData, function (row) {\n          return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isGroupRow)(row.row);\n        });\n        var rowIndex = getRowIndex(BOTTOM);\n        var detailRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default()(rowData).call(rowData, function (row) {\n          return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isDetailRow)(row.row);\n        });\n        hideContextMenu();\n        if (groupRowIndex === rowIndex) {\n          // 分组行下方插入行：数据行下方插入合计行\n          addRow(detailRowIndex, BOTTOM, _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_STATISTIC);\n        } else {\n          addRow(getRowIndex(BOTTOM), BOTTOM, getAddRowType(rowIndex, BOTTOM));\n        }\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0033')), isRowOperation && showAddGroupRow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      // style={getSpanStyle(!isColumnOperation)}\n      onClick: function onClick() {\n        // 分组行，插入在数据行上方\n        var rowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_2___default()(rowData).call(rowData, function (row) {\n          return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isDetailRow)(row.row);\n        });\n        hideContextMenu();\n        addRow(rowIndex, UP, _constants__WEBPACK_IMPORTED_MODULE_7__.ROW_TYPE_GROUP, false, 1, true);\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0034')), isDeleteRow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      onClick: function onClick() {\n        hideContextMenu();\n        deleteRow(getRowIndex());\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0035')), isColumnOperation && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      onClick: function onClick() {\n        hideContextMenu();\n        addColumn(getColumnIndex(UP));\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0036')), isColumnOperation && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      style: getSpanStyle(!isDeleteColumn),\n      onClick: function onClick() {\n        hideContextMenu();\n        addColumn(getColumnIndex(BOTTOM), BOTTOM);\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0037')), isDeleteColumn && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      style: getSpanStyle(),\n      onClick: function onClick() {\n        hideContextMenu();\n        deleteColumn(getColumnIndex());\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0038')), isCanMerge && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      onClick: function onClick() {\n        hideContextMenu();\n        var mergeRes = {};\n        if (lodash__WEBPACK_IMPORTED_MODULE_5___default().isObject(calcSelectionRect)) {\n          var mergeInfo = calcSelectionRect;\n          (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mergeRes, mergeInfo);\n        } else {\n          (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(mergeRes, gridSelectionContext.selection);\n        }\n        var minRowNum = mergeRes.minRowNum,\n          maxRowNum = mergeRes.maxRowNum,\n          minColumnNum = mergeRes.minColumnNum,\n          maxColumnNum = mergeRes.maxColumnNum;\n        addMerge({\n          rowStart: minRowNum,\n          rowLength: maxRowNum - minRowNum + 1,\n          columnStart: minColumnNum,\n          columnLength: maxColumnNum - minColumnNum + 1\n        });\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0039')), isCanSplit && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n      onClick: function onClick() {\n        var _context4;\n        hideContextMenu();\n        //\n        var _gridSelectionContext3 = gridSelectionContext.selection,\n          minRowNum = _gridSelectionContext3.minRowNum,\n          maxRowNum = _gridSelectionContext3.maxRowNum,\n          minColumnNum = _gridSelectionContext3.minColumnNum,\n          maxColumnNum = _gridSelectionContext3.maxColumnNum;\n        var rowIndex = gridSelectionContext.contextRowIndex,\n          columnIndex = gridSelectionContext.contextColumnIndex;\n        var operationRowIndex = gridSelectionContext.operationRowIndex,\n          operationColumnIndex = gridSelectionContext.operationColumnIndex;\n        // 优先全局抹除合并单元格\n        if (!(minRowNum === undefined || maxRowNum === undefined || minColumnNum === undefined || maxColumnNum === undefined)) {\n          removeMerge({\n            rowStart: minRowNum,\n            rowLength: maxRowNum - minRowNum + 1,\n            columnStart: minColumnNum,\n            columnLength: maxColumnNum - minColumnNum + 1\n          });\n        } else if (operationRowIndex !== undefined) {\n          // 单行操作\n          removeMerge({\n            rowStart: operationRowIndex,\n            rowLength: 1,\n            // rowCount - operationRowIndex,\n            columnStart: 0,\n            columnLength: columnCount\n          });\n        } else if (operationColumnIndex !== undefined) {\n          // 单列操作\n          removeMerge({\n            rowStart: 0,\n            rowLength: rowCount,\n            columnStart: operationColumnIndex,\n            columnLength: 1\n          });\n        } else if (lodash__WEBPACK_IMPORTED_MODULE_5___default().isObject(calcSelectionRect)) {\n          var _minRowNum = calcSelectionRect.minRowNum,\n            _maxRowNum = calcSelectionRect.maxRowNum,\n            _minColumnNum = calcSelectionRect.minColumnNum,\n            _maxColumnNum = calcSelectionRect.maxColumnNum;\n          removeMerge({\n            rowStart: _minRowNum,\n            rowLength: _maxRowNum - _minRowNum + 1,\n            columnStart: _minColumnNum,\n            columnLength: _maxColumnNum - _minColumnNum + 1\n          });\n        } else if (mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context4 = \"\".concat(rowIndex, \"_\")).call(_context4, columnIndex)]) {\n          var _context5;\n          var _mergeConfig5 = mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context5 = \"\".concat(rowIndex, \"_\")).call(_context5, columnIndex)],\n            rowLength = _mergeConfig5.rowLength,\n            columnLength = _mergeConfig5.columnLength;\n          removeMerge({\n            rowStart: minRowNum === undefined ? gridSelectionContext.contextRowIndex : minRowNum,\n            rowLength: minRowNum === undefined ? rowLength : maxRowNum - minRowNum + 1,\n            columnStart: minColumnNum === undefined ? gridSelectionContext.contextColumnIndex : minColumnNum,\n            columnLength: minColumnNum === undefined ? columnLength : maxColumnNum - minColumnNum + 1\n          });\n        } else if (originCells[getCellIdx(rowIndex, columnIndex)].mergeConfig) {\n          var _originCells$getCellI4 = originCells[getCellIdx(rowIndex, columnIndex)].mergeConfig,\n            rowStart = _originCells$getCellI4.rowStart,\n            columnStart = _originCells$getCellI4.columnStart,\n            _rowLength = _originCells$getCellI4.rowLength,\n            _columnLength = _originCells$getCellI4.columnLength;\n          removeMerge({\n            rowStart: minRowNum === undefined ? rowStart : minRowNum,\n            rowLength: minRowNum === undefined ? _rowLength : maxRowNum - minRowNum + 1,\n            columnStart: minColumnNum === undefined ? columnStart : minColumnNum,\n            columnLength: minColumnNum === undefined ? _columnLength : maxColumnNum - minColumnNum + 1\n          });\n        }\n      }\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.components.key0040'))))\n  });\n  return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (GridContextMenu);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/contextMenu.tsx?");

/***/ }),

/***/ 82044:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30479);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(1508);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(98092);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84945);\n/* harmony import */ var _hooks_useCache__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(48524);\n/* harmony import */ var _hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(37520);\n/* harmony import */ var _hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(88904);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useDragMove__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(86020);\n/* harmony import */ var _hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(5668);\n/* harmony import */ var _hooks_useHover__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(89140);\n/* harmony import */ var _hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(88972);\n/* harmony import */ var _hooks_useTransform__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(71420);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(21980);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(41232);\n/* harmony import */ var _utils_scu__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(20100);\n/* harmony import */ var _common_controlTransformer__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(2680);\n/* harmony import */ var _contextMenu__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(10076);\n/* harmony import */ var _gridActionGuide__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(79844);\n/* harmony import */ var _gridTitle__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(40064);\n/* harmony import */ var _row__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(68340);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// TODO: Picker取KDGridProps\n\nvar calcGridItemSelectionState = function calcGridItemSelectionState(data) {\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_4___default()(data).call(data, function (res, row, idx) {\n    res[row.id] = {\n      id: row.id,\n      visible: false,\n      index: idx,\n      data: row\n    };\n    return res;\n  }, {});\n};\nvar mapCellsFromRow = function mapCellsFromRow(rowData) {\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_4___default()(rowData).call(rowData, function (res, row) {\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(res).apply(res, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(row.cells));\n  }, []);\n};\nvar isSequenceNumber = function isSequenceNumber(array) {\n  if (array.length === 0) return false;\n  if (array.length === 1) return true;\n  for (var index = 0; index < array.length - 1; index++) {\n    var preElement = array[index];\n    var nextElement = array[index + 1];\n    if (preElement !== nextElement - 1) {\n      return false;\n    }\n  }\n  return true;\n};\nvar Grid = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_19__.memo)(function (props) {\n  var _dataContext$findCont, _context16, _context17, _context18, _context19, _context20, _context21, _context22, _context24, _context25, _context27, _React$createElement;\n  console.log('grid----------props', props);\n  // 不能根据borderType来描述整体表格与独立单个单元格的联系\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(_constants__WEBPACK_IMPORTED_MODULE_21__.GRID_NORMAL_STATE),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState, 2),\n    gridState = _useState2[0],\n    setGridState = _useState2[1];\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(_context__WEBPACK_IMPORTED_MODULE_22__.PrintRootContext);\n  var contextStrokeEnabled = context.contextStrokeEnabled;\n  var shapeRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  var transformRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  var strokeRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  var contextMenuRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  var gridAcitonGuideRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  var selectionRectRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  (0,_hooks_useStopDrag__WEBPACK_IMPORTED_MODULE_30__.useStopDrag)({\n    shapeRef: shapeRef\n  });\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState3, 2),\n    showContextMenu = _useState4[0],\n    setShowContextMenu = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)({}),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState5, 2),\n    contextMenuProps = _useState6[0],\n    setContextMenuProps = _useState6[1];\n  var hideContextMenu = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function () {\n    showContextMenu && setShowContextMenu(false);\n  }, [showContextMenu]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    window.addEventListener('resize', hideContextMenu);\n    return function () {\n      window.removeEventListener('resize', hideContextMenu);\n    };\n  }, [hideContextMenu]);\n  var _context$scale = context.scale,\n    scale = _context$scale === void 0 ? 1 : _context$scale,\n    canvasAbsolutePosRef = context.canvasAbsolutePosRef,\n    selectionContext = context.selectionContext,\n    dataContext = context.dataContext,\n    marginLeft = context.marginLeft,\n    marginTop = context.marginTop,\n    getContainerDomScroll = context.getContainerDomScroll,\n    scrollCallbackRef = context.scrollCallbackRef,\n    getRedundancyXY = context.getRedundancyXY,\n    controlGroupRef = context.controlGroupRef,\n    pixelRatio = context.pixelRatio,\n    sizeAndPixelRatioChangeCbRef = context.sizeAndPixelRatioChangeCbRef,\n    isFirstUseGrid = context.isFirstUseGrid;\n  var selection = selectionContext.getSelection();\n  var rootId = dataContext.getRootId();\n  var _getContainerDomScrol = getContainerDomScroll(),\n    scrollTop = _getContainerDomScrol.scrollTop,\n    scrollLeft = _getContainerDomScrol.scrollLeft;\n  // TODO: hook\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    var _scrollCallbackRef$cu;\n    (_scrollCallbackRef$cu = scrollCallbackRef.current) === null || _scrollCallbackRef$cu === void 0 || _scrollCallbackRef$cu.push(hideContextMenu);\n    return function () {\n      var _context;\n      // splice ?\n      scrollCallbackRef.current = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context = scrollCallbackRef.current).call(_context, function (cb) {\n        return cb !== hideContextMenu;\n      });\n    };\n  }, [showContextMenu, hideContextMenu]);\n  var id = props.id,\n    _props$rows = props.rows,\n    rows = _props$rows === void 0 ? [] : _props$rows,\n    _props$columns = props.columns,\n    columns = _props$columns === void 0 ? [] : _props$columns,\n    _props$cells = props.cells,\n    cells = _props$cells === void 0 ? [] : _props$cells,\n    _props$mergeConfig = props.mergeConfig,\n    mergeConfig = _props$mergeConfig === void 0 ? {} : _props$mergeConfig,\n    width = props.width,\n    height = props.height,\n    x = props.x,\n    y = props.y,\n    gridType = props.type,\n    border = props.border,\n    templateRowData = props.templateRowData,\n    originCells = props.originCells,\n    rowCount = props.rowCount,\n    columnCount = props.columnCount,\n    rowData = props.rowData,\n    templateRowHeight = props.templateRowHeight,\n    templateRowIndex = props.templateRowIndex,\n    getCellPosition = props.getCellPosition,\n    getCellIdx = props.getCellIdx,\n    templateRowY = props.templateRowY,\n    addRow = props.addRow,\n    getRowIndexlocateByPosition = props.getRowIndexlocateByPosition,\n    getColumnIndexlocateByPosition = props.getColumnIndexlocateByPosition,\n    addColumn = props.addColumn,\n    changeRow = props.changeRow,\n    deleteRow = props.deleteRow,\n    changeColumn = props.changeColumn,\n    deleteColumn = props.deleteColumn,\n    addMerge = props.addMerge,\n    removeMerge = props.removeMerge,\n    maxLimitWidthChange = props.maxLimitWidthChange,\n    maxLimitHeightChange = props.maxLimitHeightChange,\n    gridBorderType = props.gridBorderType,\n    handleMouseDown = props.handleMouseDown,\n    isSelected = props.isSelected,\n    isLastSelected = props.isLastSelected,\n    subGridId = props.subGridId,\n    addSubDataGrid = props.addSubDataGrid,\n    isShowAddSubGridBtn = props.isShowAddSubGridBtn;\n  // const hoverShapeRef = useRef([])\n\n  var tableTailId = (_dataContext$findCont = dataContext.findControl(id)) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont.tableTailId;\n  var TableTailField = dataContext.findControl(props.parentId);\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(function () {\n      return calcGridItemSelectionState(rows);\n    }),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState7, 2),\n    rowGridSelectionState = _useState8[0],\n    setRowGridSelectionState = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(function () {\n      return calcGridItemSelectionState(columns);\n    }),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState9, 2),\n    columnGridSelectionState = _useState10[0],\n    setColumnGridSelectionState = _useState10[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    if (_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7___default()(rowGridSelectionState).length !== rows.length) {\n      setRowGridSelectionState(calcGridItemSelectionState(rows));\n    }\n  }, [props]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    if (_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7___default()(columnGridSelectionState).length !== columns.length) {\n      setColumnGridSelectionState(calcGridItemSelectionState(columns));\n    }\n  }, [props]);\n  var containerWidth = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_28__.useGetControlRenderSizeProp)(width, scale);\n  var containerHeight = (0,_hooks_useGetControlRenderSizeProp__WEBPACK_IMPORTED_MODULE_28__.useGetControlRenderSizeProp)(height, scale);\n  var xPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(x, scale);\n  var yPos = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(y, scale);\n  console.log('grid, xPos, yPos', xPos, yPos, marginLeft, marginTop);\n  var _useControlStroke = (0,_hooks_useControlStroke__WEBPACK_IMPORTED_MODULE_25__.useControlStroke)({\n      x: x,\n      y: y,\n      id: id,\n      width: width,\n      height: height,\n      border: border,\n      scale: scale,\n      contextStrokeEnabled: contextStrokeEnabled,\n      isSelected: isSelected\n    }),\n    stroke = _useControlStroke.stroke,\n    strokeWidth = _useControlStroke.strokeWidth,\n    strokeEnabled = _useControlStroke.strokeEnabled,\n    dashEnabled = _useControlStroke.dashEnabled,\n    defaultDash = _useControlStroke.defaultDash,\n    customedStrokeElement = _useControlStroke.customedStrokeElement,\n    controlStrokeRef = _useControlStroke.controlStrokeRef;\n  // 这个还不一样\n  // 所有子元素要考虑isSelected\n  (0,_hooks_useCache__WEBPACK_IMPORTED_MODULE_23__.useCache)({\n    isSelected: isSelected,\n    refs: [shapeRef],\n    pixelRatio: pixelRatio,\n    scale: scale,\n    currentProp: {\n      id: id,\n      width: width,\n      height: height,\n      x: x,\n      y: y,\n      gridState: gridState,\n      templateRowData: templateRowData,\n      gridBorderType: gridBorderType,\n      rowData: rowData,\n      stroke: stroke,\n      dashEnabled: dashEnabled,\n      strokeWidth: strokeWidth,\n      rowGridSelectionState: rowGridSelectionState,\n      columnGridSelectionState: columnGridSelectionState\n    }\n  });\n  var _useHover = (0,_hooks_useHover__WEBPACK_IMPORTED_MODULE_29__.useHover)({\n      shapeRef: strokeRef,\n      // isSelected: activedSelectId === id || gridState === GRID_EDITOR_STATE,\n      isSelected: isLastSelected,\n      shapeRefStroke: '#fff',\n      // 这里比较特殊\n      strokeEnabled: false,\n      controlStrokeRef: controlStrokeRef\n    }),\n    onMouseOut = _useHover.onMouseOut,\n    onMouseOver = _useHover.onMouseOver;\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    var _shapeRef$current;\n    var previousZIndex = (_shapeRef$current = shapeRef.current) === null || _shapeRef$current === void 0 ? void 0 : _shapeRef$current.zIndex();\n    var isChangeZIndex = false;\n    if (gridState === _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE && !lodash__WEBPACK_IMPORTED_MODULE_18___default().isUndefined(previousZIndex)) {\n      var _shapeRef$current2, _controlGroupRef$curr, _context2, _shapeRef$current3;\n      // 顶层\n      (_shapeRef$current2 = shapeRef.current) === null || _shapeRef$current2 === void 0 || _shapeRef$current2.zIndex((((_controlGroupRef$curr = controlGroupRef.current) === null || _controlGroupRef$curr === void 0 ? void 0 : _controlGroupRef$curr.children.length) || _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(_context2 = dataContext.getData().items).call(_context2, function (item) {\n        return item.parentId === rootId;\n      }).length) - 2);\n      // shapeRef.current?.getLayer()?.batchDraw()\n      (_shapeRef$current3 = shapeRef.current) === null || _shapeRef$current3 === void 0 || _shapeRef$current3.draw();\n      isChangeZIndex = true;\n    }\n    return function () {\n      if (isChangeZIndex && !lodash__WEBPACK_IMPORTED_MODULE_18___default().isUndefined(previousZIndex)) {\n        var _shapeRef$current4;\n        (_shapeRef$current4 = shapeRef.current) === null || _shapeRef$current4 === void 0 || _shapeRef$current4.zIndex(previousZIndex);\n      }\n    };\n  }, [gridState, rootId]);\n  var onDragEndAction = (0,_hooks_useControlDragEnd__WEBPACK_IMPORTED_MODULE_24__.useControlDragEnd)(props, context);\n  var onDragMoveAction = (0,_hooks_useDragMove__WEBPACK_IMPORTED_MODULE_27__.useDragMove)({\n    id: id,\n    refLineRef: context.refLineRef\n  });\n  var onTransformEndAction = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (_ref) {\n    var x = _ref.x,\n      y = _ref.y,\n      scaleX = _ref.scaleX,\n      scaleY = _ref.scaleY,\n      width = _ref.width,\n      height = _ref.height;\n    var dataContext = context.dataContext;\n    var realWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorPxtoMM)(width, scale);\n    var realHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorPxtoMM)(height, scale);\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.createUpdateAction)([[id, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorPxtoMM)(x, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorPxtoMM)(y, scale),\n      width: realWidth,\n      height: realHeight\n    }]]));\n  }, [id, scale]);\n  var _useDragDrop = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_26__.useDragDrop)({\n      id: id,\n      shapeRef: shapeRef,\n      refLineRef: context.refLineRef,\n      context: context,\n      onDragEnd: onDragEndAction,\n      onDragMove: onDragMoveAction,\n      parentId: props.parentId,\n      scale: scale\n    }),\n    onDragStart = _useDragDrop.onDragStart,\n    onDragMove = _useDragDrop.onDragMove,\n    onDragEnd = _useDragDrop.onDragEnd,\n    dragBoundFunc = _useDragDrop.dragBoundFunc;\n  // 缩放有误差，可能是ControlTransformer组件导致\n  // TODO：修复\n  var _useTransform = (0,_hooks_useTransform__WEBPACK_IMPORTED_MODULE_31__.useTransform)({\n      id: id,\n      shapeRef: transformRef,\n      // currentShapeRef: transformRef,\n      refLineRef: context.refLineRef,\n      onTransformEnd: onTransformEndAction,\n      context: context\n    }),\n    onTransform = _useTransform.onTransform,\n    onTransformEnd = _useTransform.onTransformEnd;\n  // TODO: 悬浮需求需要帧计算鼠标位置? 也可以定时器延时 // 完善非选中状态\n  var trRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  var transformerProps = {\n    stageRef: context.stageRef,\n    rootControlRef: context.rootControlRef,\n    // 这里 gridState === GRID_SELECT_STATE 会导致多选失效\n    selectedId: gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE && id,\n    id: id,\n    dataContext: dataContext,\n    ref: trRef,\n    // 这里应该从context获取并作判断\n    isSelected: gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE && isSelected && !isLastSelected\n    // 这里一开始添加 gridState === GRID_SELECT_STATE\n    // isLastSelected: id === activedSelectId\n  };\n  var onContextMenu = function onContextMenu(evt) {\n    var event = evt.evt || evt;\n    event.preventDefault();\n    if (gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE) return;\n    var language = dataContext.findControl(rootId).language;\n    var clientX = event.pageX,\n      clientY = event.pageY;\n    console.log('onContextMenu', evt, clientX, clientY);\n    // 这个逻辑还是放在textField控件中 不然需要拓展 getRowIndexlocateByPosition 而且也跟左键不一致\n    // const { layerX, layerY } = evt.evt\n    // const { x: redundancyX, y: redundancyY } = getRedundancyXY()\n    // const locateRowIndex = getRowIndexlocateByPosition(layerY - yPos - redundancyY, templateRowY, templateRowHeight)\n    // const locateColumnIndex = getColumnIndexlocateByPosition(layerX - xPos - redundancyX)\n    // gridSelectionRef.current.contextRowIndex = locateRowIndex\n    // gridSelectionRef.current.contextColumnIndex = locateColumnIndex\n\n    // const { scrollLeft, scrollTop } = getContainerDomScroll()\n    // const { x: redundancyX, y: redundancyY } = getRedundancyXY()\n    setContextMenuProps({\n      // x: clientX - redundancyX + marginLeft, y: clientY - redundancyY + marginTop,\n      x: clientX,\n      y: clientY\n    });\n    if (!showContextMenu) {\n      setShowContextMenu(true);\n      // 还不能简单判断\n      if (evt.evt) {\n        // handleGridItemSelection({\n        //   reset: true\n        // })\n        resetGridItemSelection();\n      }\n    }\n  };\n  // const [gridSelection, setGridSelection] = useState([])\n  // const gridIsSelectionRef = useRef(false)\n  var gridSelectionRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)({\n    isSelection: false,\n    rowIndex: -1,\n    columnIndex: -1,\n    selection: {},\n    operationType: 'cell',\n    operationMultiple: false,\n    contextRowIndex: undefined,\n    contextColumnIndex: undefined,\n    operationRowIndex: undefined,\n    operationColumnIndex: undefined\n  });\n  var clearContextIndex = function clearContextIndex(gridSelectionRef) {\n    gridSelectionRef.current.contextRowIndex = undefined;\n    gridSelectionRef.current.contextColumnIndex = undefined;\n  };\n  var handleGridMouseDown = function handleGridMouseDown(evt) {\n    console.log('handleGridMouseDown', evt, gridState);\n    // 不是左键\n    // 左键 2\n    // 这里不能判断selection是否为空 当初的逻辑应该是没自测完整场景\n    if (evt.evt.button !== 0 && evt.evt.button !== 2) {\n      return;\n    }\n    var target = evt === null || evt === void 0 ? void 0 : evt.target;\n    if (gridState === _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE) {\n      var _target$id$split, _selectionRectRef$cur, _selectionRectRef$cur2;\n      var targetId = (_target$id$split = target.id().split('_')) === null || _target$id$split === void 0 ? void 0 : _target$id$split[0];\n      if (targetId && !(0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.isGridRelativeControl)(dataContext.findControl(targetId))) {\n        return;\n      }\n      var _evt$evt = evt.evt,\n        layerX = _evt$evt.layerX,\n        layerY = _evt$evt.layerY;\n      var _getRedundancyXY = getRedundancyXY(),\n        redundancyX = _getRedundancyXY.x,\n        redundancyY = _getRedundancyXY.y;\n      var tableTailY = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)((TableTailField === null || TableTailField === void 0 ? void 0 : TableTailField.y) || 0, scale);\n      var locateRowIndex = getRowIndexlocateByPosition(layerY - yPos - redundancyY - tableTailY, templateRowY, templateRowHeight);\n      var locateColumnIndex = getColumnIndexlocateByPosition(layerX - xPos - redundancyX);\n      if (locateRowIndex === -1 || locateColumnIndex === -1) return;\n      if (evt.evt.button === 2) {\n        // const selection = gridSelectionRef.current.selection\n        gridSelectionRef.current.contextRowIndex = locateRowIndex;\n        gridSelectionRef.current.contextColumnIndex = locateColumnIndex;\n        return;\n      }\n      clearContextIndex(gridSelectionRef);\n      gridSelectionRef.current.isSelection = true;\n      // 相对表格的真正x, y\n      console.log('handleGridMouseDown', evt);\n      var _selection = gridSelectionRef.current.selection;\n      gridSelectionRef.current.rowIndex = locateRowIndex;\n      gridSelectionRef.current.columnIndex = locateColumnIndex;\n      _selection.rowStart = gridSelectionRef.current.rowIndex;\n      _selection.columnStart = gridSelectionRef.current.columnIndex;\n      _selection.minRowNum = undefined;\n      _selection.maxRowNum = undefined;\n      _selection.minColumnNum = undefined;\n      _selection.maxColumnNum = undefined;\n      gridSelectionRef.current.operationType = 'cell';\n      gridSelectionRef.current.operationMultiple = false;\n      (_selectionRectRef$cur = selectionRectRef.current) === null || _selectionRectRef$cur === void 0 || _selectionRectRef$cur.visible(false);\n      (_selectionRectRef$cur2 = selectionRectRef.current) === null || _selectionRectRef$cur2 === void 0 || _selectionRectRef$cur2.draw();\n      handleGridItemSelection({\n        reset: true\n      });\n    }\n  };\n  // setState 渲染？\n  var handleGridMouseMove = function handleGridMouseMove(evt) {\n    if (gridSelectionRef.current.isSelection) {\n      var _evt$evt2 = evt.evt,\n        layerX = _evt$evt2.layerX,\n        layerY = _evt$evt2.layerY;\n      var _getRedundancyXY2 = getRedundancyXY(),\n        redundancyX = _getRedundancyXY2.x,\n        redundancyY = _getRedundancyXY2.y;\n      var tableTailY = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)((TableTailField === null || TableTailField === void 0 ? void 0 : TableTailField.y) || 0, scale);\n      var locateRowIndex = getRowIndexlocateByPosition(layerY - yPos - redundancyY - tableTailY, templateRowY, templateRowHeight);\n      var locateColumnIndex = getColumnIndexlocateByPosition(layerX - xPos - redundancyX);\n      console.log('handleGridMouseMove', locateRowIndex, locateColumnIndex);\n      if (locateRowIndex === -1 || locateColumnIndex === -1) return;\n      var _selection2 = gridSelectionRef.current.selection;\n      var currentRowEnd = locateRowIndex;\n      var currentColumnEnd = locateColumnIndex;\n      if (currentRowEnd === _selection2.rowEnd && currentColumnEnd === _selection2.columnEnd) return;\n      _selection2.rowEnd = currentRowEnd;\n      _selection2.columnEnd = currentColumnEnd;\n      // rowStart columnStart可能为undefined，没找到原因\n      var _selection2$rowStart = _selection2.rowStart,\n        rowStart = _selection2$rowStart === void 0 ? 0 : _selection2$rowStart,\n        _selection2$columnSta = _selection2.columnStart,\n        columnStart = _selection2$columnSta === void 0 ? 0 : _selection2$columnSta,\n        _selection2$rowEnd = _selection2.rowEnd,\n        rowEnd = _selection2$rowEnd === void 0 ? 0 : _selection2$rowEnd,\n        _selection2$columnEnd = _selection2.columnEnd,\n        columnEnd = _selection2$columnEnd === void 0 ? 0 : _selection2$columnEnd;\n      if (rowStart === rowEnd && columnStart === columnEnd) {\n        var _selectionRectRef$cur3, _selectionRectRef$cur4;\n        (_selectionRectRef$cur3 = selectionRectRef.current) === null || _selectionRectRef$cur3 === void 0 || _selectionRectRef$cur3.visible(false);\n        (_selectionRectRef$cur4 = selectionRectRef.current) === null || _selectionRectRef$cur4 === void 0 || _selectionRectRef$cur4.draw();\n        return;\n      }\n      var minRowNum = Math.min(rowStart, rowEnd);\n      var minColumnNum = Math.min(columnStart, columnEnd);\n      var maxRowNum = Math.max(rowStart, rowEnd);\n      var maxColumnNum = Math.max(columnStart, columnEnd);\n      var newMinRowNum = minRowNum;\n      var newMaxRowNum = maxRowNum;\n      var newMinColumnNum = minColumnNum;\n      var newMaxColumnNum = maxColumnNum;\n      for (var i = minRowNum; i <= maxRowNum; i++) {\n        for (var j = minColumnNum; j <= maxColumnNum; j++) {\n          var cell = originCells[getCellIdx(i, j)];\n          var _mergeConfig = cell.mergeConfig;\n          console.log(\"newMinRowNum\", i, j, cell);\n          if (_mergeConfig) {\n            var _rowStart = _mergeConfig.rowStart,\n              _columnStart = _mergeConfig.columnStart,\n              rowLength = _mergeConfig.rowLength,\n              columnLength = _mergeConfig.columnLength;\n            // const cell = originCells[getCellIdx(rowStart, columnStart)]\n            newMinRowNum = Math.min(newMinRowNum, _rowStart);\n            newMaxRowNum = Math.max(newMaxRowNum, _rowStart + rowLength - 1);\n            newMinColumnNum = Math.min(newMinColumnNum, _columnStart);\n            newMaxColumnNum = Math.max(newMaxColumnNum, _columnStart + columnLength - 1);\n          }\n        }\n      }\n      console.log(\"newMinRowNum\", {\n        minRowNum: newMinRowNum,\n        minColumnNum: newMinColumnNum,\n        maxRowNum: newMaxRowNum,\n        maxColumnNum: newMaxColumnNum\n      });\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_selection2, {\n        minRowNum: newMinRowNum,\n        minColumnNum: newMinColumnNum,\n        maxRowNum: newMaxRowNum,\n        maxColumnNum: newMaxColumnNum\n      });\n      handleGridSelection(_selection2);\n    }\n  };\n  var calcSelectionCanMerge = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function () {\n    var selection = selectionContext.getSelection();\n    var selectItems = dataContext.findControl(selection);\n    if (_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_9___default()(selectItems).call(selectItems, function (item) {\n      return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.isGridRelativeControl)(item);\n    }) && selection.length > 1) {\n      var _context3;\n      var exsitSingleCellList = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_4___default()(rowData).call(rowData, function (res, row) {\n        var cells = row.cells;\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(res).call(res, _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(cells).call(cells, function (_ref2) {\n          var cellId = _ref2.id;\n          return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(selection).call(selection, cellId);\n        }));\n      }, []);\n      var isOnlyOneRowData = false;\n      if (exsitSingleCellList.length === 1) {\n        isOnlyOneRowData = true;\n      }\n      // if()\n      // 判断是否一个连续的矩形\n      // const rowIds = new Set()\n      var rowIndexs = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())();\n      // const columnIds = new Set()\n      var columnIndexs = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())();\n      var regionCellSet = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())();\n      var currentRowTypeSet = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())();\n      var selectionFindedSet = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())();\n      var isSameRowType = true;\n      for (var i = 0; i < originCells.length; i++) {\n        var _originCells$i = originCells[i],\n          cellId = _originCells$i.id,\n          rowId = _originCells$i.rowId,\n          columnId = _originCells$i.columnId,\n          row = _originCells$i.row,\n          column = _originCells$i.column,\n          _mergeConfig2 = _originCells$i.mergeConfig;\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(selection).call(selection, cellId)) {\n          selectionFindedSet.add(cellId);\n          rowIndexs.add(row);\n          currentRowTypeSet.add(rows[row].rowType);\n          // 不同行类型\n          if (currentRowTypeSet.size > 1) {\n            isSameRowType = false;\n            // return false\n          }\n          columnIndexs.add(column);\n          regionCellSet.add(cellId);\n          if (_mergeConfig2) {\n            var rowStart = _mergeConfig2.rowStart,\n              columnStart = _mergeConfig2.columnStart,\n              rowLength = _mergeConfig2.rowLength,\n              columnLength = _mergeConfig2.columnLength;\n            for (var _i = rowStart; _i <= rowStart + rowLength - 1; _i++) {\n              for (var j = columnStart; j <= columnStart + columnLength - 1; j++) {\n                var cell = originCells[getCellIdx(_i, j)];\n                console.log('calcSelectionCanMerge cell', cell);\n                if (cell) {\n                  var _id = cell.id,\n                    _row = cell.row,\n                    _column = cell.column;\n                  regionCellSet.add(_id);\n                  rowIndexs.add(_row);\n                  columnIndexs.add(_column);\n                }\n              }\n            }\n          }\n        }\n        if (selectionFindedSet.size === selection.length) {\n          // 不让空转\n          break;\n        }\n      }\n      var rowIdxArr = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rowIndexs);\n      var columnIdxArr = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(columnIndexs);\n      if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_12___default()(_context3 = [rowIdxArr, columnIdxArr]).call(_context3, function (arr) {\n        return !isSequenceNumber(arr);\n      })) {\n        return false;\n      }\n      if (rowIdxArr.length * columnIdxArr.length === (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(regionCellSet).length && rowIdxArr.length * columnIdxArr.length !== 1) {\n        return {\n          minRowNum: Math.min.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rowIdxArr)),\n          minColumnNum: Math.min.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(columnIndexs)),\n          maxRowNum: Math.max.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rowIdxArr)),\n          maxColumnNum: Math.max.apply(Math, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(columnIndexs)),\n          isSameRowType: isSameRowType,\n          isOnlyOneRowData: isOnlyOneRowData\n        };\n      }\n    }\n    return false;\n  }, [id, originCells, rows, rowData]);\n  var handleGridSelection = function handleGridSelection(_ref3) {\n    var _context4, _selectionRectRef$cur5, _selectionRectRef$cur6, _selectionRectRef$cur7, _selectionRectRef$cur8, _selectionRectRef$cur9;\n    var minRowNum = _ref3.minRowNum,\n      maxRowNum = _ref3.maxRowNum,\n      minColumnNum = _ref3.minColumnNum,\n      maxColumnNum = _ref3.maxColumnNum;\n    var _scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scale;\n    if (minRowNum === undefined || maxRowNum === undefined || minColumnNum === undefined || maxColumnNum === undefined) return;\n    (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(gridSelectionRef.current.selection, {\n      minRowNum: minRowNum,\n      maxRowNum: maxRowNum,\n      minColumnNum: minColumnNum,\n      maxColumnNum: maxColumnNum\n    });\n    // 这里应该持有的是\n    var _originCells$getCellI = originCells[getCellIdx(minRowNum, minColumnNum)],\n      row = _originCells$getCellI.row,\n      cellId = _originCells$getCellI.id;\n    // 这里不该出错\n    var _rowData$row$cells$fi = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default()(_context4 = rowData[row].cells).call(_context4, function (_ref4) {\n        var id = _ref4.id;\n        return id === cellId;\n      }),\n      x = _rowData$row$cells$fi.x,\n      y = _rowData$row$cells$fi.y;\n    // const { x, y } = originCells[getCellIdx(minRowNum, minColumnNum)]\n    // console.log('handleGridMouseMove', minRowNum, minColumnNum, originCells)\n    // console.log('handleGridMouseMove', rowData, x, y)\n    var width = 0;\n    var height = 0;\n    for (var i = minRowNum; i <= maxRowNum; i++) {\n      var _getCellPosition = getCellPosition({\n          row: i,\n          column: minColumnNum\n        }),\n        w = _getCellPosition.width,\n        h = _getCellPosition.height;\n      height += h;\n    }\n    for (var j = minColumnNum; j <= maxColumnNum; j++) {\n      var _getCellPosition2 = getCellPosition({\n          row: minRowNum,\n          column: j\n        }),\n        _w = _getCellPosition2.width,\n        _h = _getCellPosition2.height;\n      width += _w;\n    }\n    width = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(width, _scale);\n    height = (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(height, _scale);\n    console.log(\"handleGridMouseMove\", width, height, {\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(x, _scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(y, _scale)\n    });\n    (_selectionRectRef$cur5 = selectionRectRef.current) === null || _selectionRectRef$cur5 === void 0 || _selectionRectRef$cur5.position({\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(x, _scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(y, _scale)\n    });\n    (_selectionRectRef$cur6 = selectionRectRef.current) === null || _selectionRectRef$cur6 === void 0 || _selectionRectRef$cur6.width(width);\n    (_selectionRectRef$cur7 = selectionRectRef.current) === null || _selectionRectRef$cur7 === void 0 || _selectionRectRef$cur7.height(height);\n    (_selectionRectRef$cur8 = selectionRectRef.current) === null || _selectionRectRef$cur8 === void 0 || _selectionRectRef$cur8.visible(true);\n    (_selectionRectRef$cur9 = selectionRectRef.current) === null || _selectionRectRef$cur9 === void 0 || (_selectionRectRef$cur9 = _selectionRectRef$cur9.getLayer()) === null || _selectionRectRef$cur9 === void 0 || _selectionRectRef$cur9.batchDraw();\n  };\n  var resetGridItemSelection = function resetGridItemSelection() {\n    var newRowState = calcGridItemSelectionState(rows);\n    var newColumnState = calcGridItemSelectionState(columns);\n    var isReset = false;\n    gridSelectionRef.current.operationType = 'cell';\n    gridSelectionRef.current.operationRowIndex = undefined;\n    gridSelectionRef.current.operationColumnIndex = undefined;\n    if (!lodash__WEBPACK_IMPORTED_MODULE_18___default().isEqual(newRowState, rowGridSelectionState)) {\n      setRowGridSelectionState(newRowState);\n      isReset = true;\n    }\n    if (!lodash__WEBPACK_IMPORTED_MODULE_18___default().isEqual(newColumnState, columnGridSelectionState)) {\n      setColumnGridSelectionState(newColumnState);\n      isReset = true;\n    }\n    return isReset;\n  };\n  var handleGridItemSelection = function handleGridItemSelection(_ref5) {\n    var type = _ref5.type,\n      index = _ref5.index,\n      isMult = _ref5.isMult,\n      _ref5$reset = _ref5.reset,\n      reset = _ref5$reset === void 0 ? false : _ref5$reset,\n      _ref5$isSelectedGrid = _ref5.isSelectedGrid,\n      isSelectedGrid = _ref5$isSelectedGrid === void 0 ? false : _ref5$isSelectedGrid;\n    console.log('handleGridItemSelection', reset, type, index, isMult, isSelectedGrid);\n    clearContextIndex(gridSelectionRef);\n    if (reset) {\n      // 判断\n      // removeGridSelection()\n      var isReset = resetGridItemSelection();\n      // const selections = selectionContext.getSelection()\n      if (isReset && isSelectedGrid) {\n        selectionContext.setSelect([id]);\n      }\n      return;\n    }\n    hideContextMenu();\n    removeGridSelection();\n    var ids = [];\n    var notSelectedIds = [];\n    var visible = false;\n    if (type === 'row') {\n      var _context5, _context6;\n      gridSelectionRef.current.operationType = 'row';\n      gridSelectionRef.current.operationRowIndex = index;\n      gridSelectionRef.current.operationColumnIndex = undefined;\n      if (isMult) {\n        setRowGridSelectionState(function (state) {\n          visible = !state[rows[index].id].visible;\n          state[rows[index].id].visible = visible;\n          return lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(state);\n        });\n      } else {\n        setRowGridSelectionState(function () {\n          var state = calcGridItemSelectionState(rows);\n          visible = !state[rows[index].id].visible;\n          state[rows[index].id].visible = visible;\n          return lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(state);\n        });\n        setColumnGridSelectionState(calcGridItemSelectionState(columns));\n      }\n      ids = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14___default()(_context6 = new Array(columnCount)).call(_context6, 0)).call(_context5, function (n, idx) {\n        return originCells[getCellIdx(index, idx)].id;\n      });\n    } else {\n      var _context7, _context8;\n      gridSelectionRef.current.operationType = 'column';\n      gridSelectionRef.current.operationColumnIndex = index;\n      gridSelectionRef.current.operationRowIndex = undefined;\n      if (isMult) {\n        setColumnGridSelectionState(function (state) {\n          visible = !state[columns[index].id].visible;\n          state[columns[index].id].visible = visible;\n          return lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(state);\n        });\n      } else {\n        setColumnGridSelectionState(function () {\n          var state = calcGridItemSelectionState(columns);\n          visible = !state[columns[index].id].visible;\n          state[columns[index].id].visible = visible;\n          return lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(state);\n        });\n        setRowGridSelectionState(calcGridItemSelectionState(rows));\n      }\n      ids = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(_context7 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_14___default()(_context8 = new Array(rowCount)).call(_context8, 0)).call(_context7, function (n, idx) {\n        return originCells[getCellIdx(idx, index)].id;\n      });\n    }\n    if (!isMult) {\n      gridSelectionRef.current.operationMultiple = false;\n      var selections = selectionContext.getSelection();\n      notSelectedIds = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(selections).call(selections, function (selectedId) {\n        return selectedId !== id;\n      });\n    } else {\n      gridSelectionRef.current.operationMultiple = true;\n    }\n\n    // 不包含id\n    if (visible) {\n      var _context9, _context10;\n      var _selections = selectionContext.getSelection();\n      var newSelections = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context9 = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context10 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_selections).call(_selections, function (id) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(notSelectedIds).call(notSelectedIds, id);\n      })).call(_context10, ids)))).call(_context9, function (itemId) {\n        return itemId !== id;\n      });\n      // selectionContext.appendSelect(ids)\n      selectionContext.setSelect(newSelections);\n    } else {\n      var _context11, _context12;\n      var _rootId = dataContext.getRootId();\n      var _selections2 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context11 = selectionContext.getSelection()).call(_context11, function (id) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(notSelectedIds).call(notSelectedIds, id);\n      });\n      var _newSelections = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context12 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_selections2).call(_selections2, function (id) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(ids).call(ids, id);\n      })).call(_context12, function (itemId) {\n        return itemId !== id;\n      });\n      selectionContext.setSelect(_newSelections.length > 0 ? _newSelections : [_rootId]);\n    }\n  };\n  var removeGridSelection = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function () {\n    var _selectionRectRef$cur10, _selectionRectRef$cur11;\n    var isClearSelection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n    // 修复合并之后不能马上拆分的问题\n    if (isClearSelection) {\n      gridSelectionRef.current.selection = {};\n    }\n    (_selectionRectRef$cur10 = selectionRectRef.current) === null || _selectionRectRef$cur10 === void 0 || _selectionRectRef$cur10.visible(false);\n    (_selectionRectRef$cur11 = selectionRectRef.current) === null || _selectionRectRef$cur11 === void 0 || _selectionRectRef$cur11.draw();\n    gridSelectionRef.current.isSelection = false; // 不再能mouseMove\n    // selectionRectRef.current?.getLayer()?.batchDraw()\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    var cb = function cb(scale) {\n      // removeGridSelection()\n      // 不能重新绘制 只能直接抹除掉\n      removeGridSelection(false);\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_15___default()(function () {\n        var selection = gridSelectionRef.current.selection;\n        handleGridSelection(selection, scale);\n      });\n    };\n    sizeAndPixelRatioChangeCbRef.current.push(cb);\n    return function () {\n      var _context13;\n      sizeAndPixelRatioChangeCbRef.current = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context13 = sizeAndPixelRatioChangeCbRef.current).call(_context13, function (fn) {\n        return fn !== cb;\n      });\n    };\n  }, [handleGridSelection, removeGridSelection, scale]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    var selectionCallback = function selectionCallback(_ref6) {\n      var value = _ref6.value;\n      // 含需要包含parentId是单元格的情况\n      // 这里选择集为空则进入但是也有问题，不能再设置为空，否则死循环\n      if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, function (itemId) {\n        var _dataContext$findCont2 = dataContext.findControl(itemId),\n          parentId = _dataContext$findCont2.parentId;\n        var currentItemId = itemId;\n        while (parentId) {\n          if (parentId === id || id === currentItemId) return false;\n          if (parentId === rootId) return true;\n          var item = dataContext.findControl(parentId);\n          parentId = item === null || item === void 0 ? void 0 : item.parentId;\n          currentItemId = item === null || item === void 0 ? void 0 : item.id;\n        }\n        return false;\n      }) || value.length === 0) {\n        if (gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_NORMAL_STATE) {\n          setGridState(_constants__WEBPACK_IMPORTED_MODULE_21__.GRID_NORMAL_STATE);\n          removeGridSelection();\n        }\n        handleGridItemSelection({\n          reset: true\n        });\n        return;\n      }\n      // 还是放在onContextMenu里特殊处理 由于时机问题，放在textField中\n      // if() {\n\n      // }\n    };\n    var callback = function callback() {\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_15___default()(function () {\n        // 这里拿的是旧的数据在画\n        // handleGridSelection(gridSelectionRef.current.selection, true)\n        removeGridSelection(false);\n      });\n    };\n    var selectionListener = selectionContext.addSelectChangeListener(selectionCallback);\n    var listener = dataContext.addDataChangeListener(callback);\n    return function () {\n      listener();\n      selectionListener();\n    };\n  }, [id, gridState, handleGridItemSelection, props, rootId, handleGridSelection, removeGridSelection]);\n  var handleGridMouseUp = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function () {\n    if (gridSelectionRef.current.isSelection) {\n      var _context14;\n      var cellIds = [];\n      var _gridSelectionRef$cur = gridSelectionRef.current.selection,\n        minRowNum = _gridSelectionRef$cur.minRowNum,\n        maxRowNum = _gridSelectionRef$cur.maxRowNum,\n        minColumnNum = _gridSelectionRef$cur.minColumnNum,\n        maxColumnNum = _gridSelectionRef$cur.maxColumnNum;\n      if (_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_9___default()(_context14 = [minRowNum, maxRowNum, minColumnNum, maxColumnNum]).call(_context14, function (num) {\n        return !lodash__WEBPACK_IMPORTED_MODULE_18___default().isUndefined(num);\n      })) {\n        //如果当前的最后一列单元格是合并单元格，且超出了maxColumnNum，需向后继续匹配\n        var curMaxColumnNum = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.getNextMaxColumnNum)(minRowNum, maxRowNum, maxColumnNum, originCells, getCellIdx);\n\n        //如果当前第一列是合并单元格，且超出minColumnNum,需向前继续匹配\n        var curMinColumnNum = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.getNextMinColumnNum)(minRowNum, maxRowNum, minColumnNum, originCells, getCellIdx);\n        for (var i = minRowNum; i <= maxRowNum; i++) {\n          for (var j = curMinColumnNum; j <= curMaxColumnNum; j++) {\n            cellIds.push(originCells[getCellIdx(i, j)].id);\n          }\n        }\n        if (!lodash__WEBPACK_IMPORTED_MODULE_18___default().isEqual(cellIds, selectionContext.getSelection())) {\n          selectionContext.setSelect(cellIds);\n        }\n      }\n    }\n    // 一定要设置为false\n    gridSelectionRef.current.isSelection = false;\n  }, [originCells]);\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.useOnClickOutside)([contextMenuRef], function () {\n    hideContextMenu();\n  }, false);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    var callback = function callback() {\n      handleGridMouseUp();\n    };\n    window.addEventListener('mouseup', callback);\n    return function () {\n      window.removeEventListener('mouseup', callback);\n    };\n  }, [handleGridMouseUp]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    if (gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE) {\n      removeGridSelection();\n    }\n    if (gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_NORMAL_STATE) {\n      var _gridAcitonGuideRef$c;\n      (_gridAcitonGuideRef$c = gridAcitonGuideRef.current) === null || _gridAcitonGuideRef$c === void 0 || _gridAcitonGuideRef$c.handlePassGridActionGuide();\n    }\n  }, [gridState]);\n\n  // TODO: 挺多问题\n  var changeRowProxy = function changeRowProxy(index, distance, gridDistance, realDistance) {\n    // not remove just rerender\n    changeRow(index, distance, gridDistance, realDistance);\n    removeGridSelection();\n    // reRenderGridSelection('row', distance)\n  };\n  var changeColumnProxy = function changeColumnProxy(index, distance, gridDistance, realDistance) {\n    changeColumn(index, distance, gridDistance, realDistance);\n    removeGridSelection();\n    // reRenderGridSelection('column', distance)\n  };\n  var addMergeProxy = function addMergeProxy() {\n    addMerge.apply(void 0, arguments);\n    removeGridSelection(true);\n  };\n  var removeMergeProxy = function removeMergeProxy() {\n    removeMerge.apply(void 0, arguments);\n    removeGridSelection();\n  };\n  var renderTemplateRowComp = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(templateRowData).call(templateRowData, function (row, i) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_row__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {\n      key: \"tempalte_row_\".concat(i),\n      cells: row,\n      isTemplate: true,\n      cellBackColor: \"#F5F8FC\"\n    });\n  });\n  var renderRowComp = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(rowData).call(rowData, function (row, i) {\n    var _context15;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_row__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context15 = \"\".concat(row.row.id, \"_row_\")).call(_context15, i),\n      cells: row.cells,\n      row: row.row\n    });\n  });\n  var gridContextValue = (0,react__WEBPACK_IMPORTED_MODULE_19__.useMemo)(function () {\n    return {\n      gridState: gridState,\n      gridX: xPos,\n      gridY: yPos,\n      gridBorderType: gridBorderType,\n      isEditorGridState: gridState === _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE,\n      removeGridSelection: removeGridSelection\n    };\n  }, [gridState, xPos, yPos, gridBorderType, removeGridSelection]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement((react__WEBPACK_IMPORTED_MODULE_19___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Group, {\n    draggable: gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE,\n    width: containerWidth,\n    height: containerHeight,\n    x: xPos,\n    y: yPos,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    onDragStart: onDragStart,\n    onDragMove: onDragMove,\n    onDragEnd: onDragEnd,\n    onMouseOver: onMouseOver,\n    onMouseOut: onMouseOut,\n    onContextMenu: onContextMenu,\n    onDblClick: function onDblClick(e) {\n      console.log('grid onDblClick', gridState);\n      if (gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE) {\n        setGridState(_constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE);\n        e.cancelBubble = true;\n      }\n      // select a cell ?\n    },\n    onMouseDown: function onMouseDown(e) {\n      // TODO\n      // 状态\n      console.log('grid onMouseDown', gridState);\n      hideContextMenu();\n      gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE && setGridState(_constants__WEBPACK_IMPORTED_MODULE_21__.GRID_SELECT_STATE);\n      // 这个会导致拖拽不了\n      // gridState === GRID_SELECT_STATE && setGridState(GRID_EDITOR_STATE)\n      gridState !== _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE && handleMouseDown(e);\n      handleGridMouseDown(e);\n    },\n    onMouseMove: handleGridMouseMove,\n    onMouseUp: handleGridMouseUp,\n    ref: shapeRef,\n    id: id,\n    dragBoundFunc: dragBoundFunc,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context16 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context17 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context18 = \"\".concat(_constants__WEBPACK_IMPORTED_MODULE_21__.GRID_NAME, \" \")).call(_context18, _constants__WEBPACK_IMPORTED_MODULE_21__.CONTAINER_NODE_CLASSNAME, \" \")).call(_context17, _constants__WEBPACK_IMPORTED_MODULE_21__.SCALE_NODE_CLASSNAME, \" \")).call(_context16, _constants__WEBPACK_IMPORTED_MODULE_21__.NORMAL_NODE_CLASSNAME)\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Rect, {\n    width: containerWidth,\n    height: containerHeight,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    onTransform: onTransform,\n    onTransformEnd: onTransformEnd,\n    ref: transformRef,\n    strokeEnabled: false\n    // stroke={'#fff'}\n    // strokeWidth={1}\n    ,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context19 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context20 = \"\".concat(id, \" \")).call(_context20, _constants__WEBPACK_IMPORTED_MODULE_21__.SCALE_NODE_CLASSNAME, \" \")).call(_context19, _constants__WEBPACK_IMPORTED_MODULE_21__.NORMAL_NODE_CLASSNAME)\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_context__WEBPACK_IMPORTED_MODULE_22__.DataGridContext.Provider, {\n    value: gridContextValue\n  }, renderTemplateRowComp, templateRowData.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Text, {\n    key: \"grid-template-text\",\n    name: \"grid-template-text\",\n    listening: false,\n    verticalAlign: \"middle\",\n    align: \"center\",\n    text: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.components.key0041'),\n    opacity: 1,\n    fill: \"#E45D5D\",\n    fontSize: 18,\n    x: 0,\n    y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(templateRowY, scale),\n    width: containerWidth,\n    height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(templateRowHeight, scale),\n    onContextMenu: function onContextMenu(e) {\n      if (e.currentTarget.getType() === 'Text') {\n        e.cancelBubble = true;\n      }\n    }\n  }), renderRowComp), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Rect, {\n    key: \"grid-selection-rect\",\n    name: \"grid-selection-rect \".concat(_constants__WEBPACK_IMPORTED_MODULE_21__.NOT_CACHE_CLASSNAME),\n    ref: selectionRectRef,\n    listening: false,\n    visible: false,\n    x: 0,\n    y: 0,\n    width: 0,\n    height: 0,\n    fill: \"#99CCFF\",\n    strokeEnabled: true,\n    stroke: \"#0E5FD8\",\n    strokeWidth: 1,\n    hitStrokeWidth: 0,\n    opacity: .4,\n    strokeHitEnabled: false\n  }), _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context21 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(_context22 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7___default()(rowGridSelectionState)).call(_context22, function (rowKey) {\n    var _context23;\n    var _rowGridSelectionStat = rowGridSelectionState[rowKey],\n      id = _rowGridSelectionStat.id,\n      visible = _rowGridSelectionStat.visible,\n      index = _rowGridSelectionStat.index,\n      data = _rowGridSelectionStat.data;\n    var key = \"grid-selection-row-\".concat(id);\n    // TODO:\n    if (!rows[index]) return null;\n    var addRowHeight = 0;\n    if (templateRowIndex > -1 && index > templateRowIndex && templateRowHeight) {\n      addRowHeight = templateRowHeight;\n    }\n    var rectProps = {\n      x: 0,\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(index && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.countLength)(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(rows).call(rows, 0, index)), scale) + (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(addRowHeight, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.countLength)(columns), scale),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(rows[index].rowHeight, scale)\n    };\n    return visible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Rect, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n      key: key,\n      name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context23 = \"\".concat(key, \" \")).call(_context23, _constants__WEBPACK_IMPORTED_MODULE_21__.NOT_CACHE_CLASSNAME),\n      listening: false,\n      visible: visible\n    }, rectProps, {\n      fill: \"#99CCFF\",\n      strokeEnabled: true,\n      stroke: \"#0E5FD8\",\n      strokeWidth: 1,\n      hitStrokeWidth: 0,\n      opacity: .4,\n      strokeHitEnabled: false\n    }));\n  })).call(_context21, Boolean), _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context24 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(_context25 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_7___default()(columnGridSelectionState)).call(_context25, function (columnKey) {\n    var _context26;\n    var _columnGridSelectionS = columnGridSelectionState[columnKey],\n      id = _columnGridSelectionS.id,\n      visible = _columnGridSelectionS.visible,\n      index = _columnGridSelectionS.index,\n      data = _columnGridSelectionS.data;\n    var key = \"grid-selection-column-\".concat(id);\n    if (!columns[index]) return null;\n    var rectProps = {\n      y: 0,\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(index && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.countLength)(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(columns).call(columns, 0, index)), scale),\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.countLength)(rows), scale) + (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(templateRowHeight, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(columns[index].columnWidth, scale)\n    };\n    // console.log(`columnGridSelectionState`, index && countLength(rows.slice(0, index)), countLength(rows), visible, columns[index].columnWidth)\n    return visible && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Rect, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n      key: key,\n      name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context26 = \"\".concat(key, \" \")).call(_context26, _constants__WEBPACK_IMPORTED_MODULE_21__.NOT_CACHE_CLASSNAME),\n      listening: false,\n      visible: visible\n    }, rectProps, {\n      fill: \"#99CCFF\",\n      strokeEnabled: true,\n      stroke: \"#0E5FD8\",\n      strokeWidth: 1,\n      hitStrokeWidth: 0,\n      opacity: .4,\n      strokeHitEnabled: false\n    }));\n  })).call(_context24, Boolean), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_20__.Rect, {\n    width: containerWidth,\n    height: containerHeight,\n    visible: true,\n    listening: false,\n    scale: {\n      x: 1,\n      y: 1\n    },\n    dash: defaultDash,\n    ref: strokeRef,\n    stroke: stroke,\n    dashEnabled: dashEnabled,\n    strokeWidth: strokeWidth,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    strokeEnabled: !customedStrokeElement,\n    name: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context27 = \" \".concat(_constants__WEBPACK_IMPORTED_MODULE_21__.NORMAL_NODE_CLASSNAME, \" \")).call(_context27, _constants__WEBPACK_IMPORTED_MODULE_21__.HOVER_NODE_CLASSNAME)\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_common_controlTransformer__WEBPACK_IMPORTED_MODULE_35__[\"default\"], transformerProps), gridState === _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE /** || gridState === GRID_SELECT_STATE */ && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_gridTitle__WEBPACK_IMPORTED_MODULE_38__[\"default\"], (_React$createElement = {\n    gridType: gridType,\n    maxLimitWidthChange: maxLimitWidthChange,\n    maxLimitHeightChange: maxLimitHeightChange,\n    x: true\n  }, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$createElement, \"x\", marginLeft + xPos + ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.isGridFooter)(TableTailField) ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(TableTailField.x, scale) : 0)), \"y\", marginTop + yPos + ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_32__.isGridFooter)(TableTailField) ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_33__.calculatorMMtoPx)(TableTailField.y, scale) : 0)), \"containerWidth\", containerWidth), \"containerHeight\", containerHeight), \"templateRowData\", templateRowData), \"templateRowHeight\", templateRowHeight), \"scrollTop\", scrollLeft), \"scrollLeft\", scrollTop), \"rowTitleSelection\", rowGridSelectionState), \"columnTitleSelection\", columnGridSelectionState), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$createElement, \"changeRow\", changeRowProxy), \"tableTailId\", tableTailId), \"changeColumn\", changeColumnProxy), \"handleGridSelection\", handleGridItemSelection), \"onContextMenu\", onContextMenu), \"portalRef\", canvasAbsolutePosRef), \"scale\", scale), \"rows\", rows), \"columns\", columns), \"subGridId\", subGridId), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_React$createElement, \"addSubDataGrid\", addSubDataGrid), \"gridState\", gridState), \"isShowAddSubGridBtn\", isShowAddSubGridBtn))), isFirstUseGrid && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_gridActionGuide__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {\n    x: marginLeft + xPos,\n    y: marginTop + yPos,\n    portalRef: canvasAbsolutePosRef,\n    ref: gridAcitonGuideRef\n  }), gridState === _constants__WEBPACK_IMPORTED_MODULE_21__.GRID_EDITOR_STATE && showContextMenu && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_contextMenu__WEBPACK_IMPORTED_MODULE_36__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    ref: contextMenuRef\n  }, contextMenuProps, {\n    gridSelectionContext: gridSelectionRef.current,\n    addRow: addRow,\n    hideContextMenu: hideContextMenu,\n    addColumn: addColumn,\n    mergeConfig: mergeConfig,\n    gridType: gridType,\n    rowData: rowData,\n    deleteRow: deleteRow,\n    deleteColumn: deleteColumn,\n    originCells: originCells,\n    getCellIdx: getCellIdx,\n    changeRow: changeRowProxy,\n    changeColumn: changeColumnProxy,\n    addMerge: addMergeProxy,\n    removeMerge: removeMergeProxy,\n    calcSelectionCanMerge: calcSelectionCanMerge,\n    rowCount: rowCount,\n    columnCount: columnCount,\n    rows: rows,\n    subGridId: subGridId,\n    selectionContext: selectionContext,\n    dataContext: dataContext\n    // portalRef={canvasAbsolutePosRef}\n  })));\n}, function (p, n) {\n  return (0,_utils_scu__WEBPACK_IMPORTED_MODULE_34__[\"default\"])(p, n);\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Grid);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/grid.tsx?");

/***/ }),

/***/ 79844:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hooks_useContainer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82104);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84945);\n/* harmony import */ var _gridHooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3588);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n\n// 内存里\nvar isOnlyOnePass = false;\nvar GridActionGuide = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function (_ref, forwardedRef) {\n  var _canvasBoxRef$current, _canvasBoxRef$current2, _canvasBoxRef$current3, _canvasBoxRef$current4, _context, _containerDomRef$curr, _containerDomRef$curr2, _containerDomRef$curr3, _containerDomRef$curr4;\n  var gridX = _ref.x,\n    gridY = _ref.y,\n    portalRef = _ref.portalRef;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(isOnlyOnePass),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    pass = _useState2[0],\n    setPass = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    isMount = _useState4[0],\n    setIsMount = _useState4[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    setIsMount(true);\n  }, []);\n  // 所有表格只有一个\n  isOnlyOnePass = true;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_4__.PrintRootContext);\n  var scrollCallbackRef = context.scrollCallbackRef,\n    containerDomRef = context.containerDomRef,\n    pageHeight = context.pageHeight,\n    canvasBoxRef = context.canvasBoxRef,\n    rulerWidth = context.rulerWidth,\n    pageWidth = context.pageWidth,\n    canvasResizeCallbackRef = context.canvasResizeCallbackRef,\n    handlePassGridActionGuide = context.handlePassGridActionGuide;\n  var x = gridX + ((_canvasBoxRef$current = (_canvasBoxRef$current2 = canvasBoxRef.current) === null || _canvasBoxRef$current2 === void 0 ? void 0 : _canvasBoxRef$current2.offsetLeft) !== null && _canvasBoxRef$current !== void 0 ? _canvasBoxRef$current : 0) + rulerWidth;\n  var y = gridY + ((_canvasBoxRef$current3 = (_canvasBoxRef$current4 = canvasBoxRef.current) === null || _canvasBoxRef$current4 === void 0 ? void 0 : _canvasBoxRef$current4.offsetTop) !== null && _canvasBoxRef$current3 !== void 0 ? _canvasBoxRef$current3 : 0) + rulerWidth;\n  var toolTipRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  (0,_gridHooks__WEBPACK_IMPORTED_MODULE_5__.gridPortalScrollHooks)({\n    scrollCallbackRef: scrollCallbackRef,\n    refs: [toolTipRef],\n    canvasResizeCallbackRef: canvasResizeCallbackRef\n  });\n  var handlePassGridActionGuideProxy = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n    if (pass) {\n      return;\n    }\n    handlePassGridActionGuide && handlePassGridActionGuide();\n    // 不管返回 与后端约定\n    setPass(true);\n  }, [handlePassGridActionGuide, pass]);\n  var ToolTip = isMount && !pass && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n    onClick: handlePassGridActionGuideProxy,\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_6__.getLangMsg)('printd.components.key0042'),\n    className: \"print-grid-action-guide\",\n    ref: toolTipRef,\n    style: {\n      position: 'absolute',\n      transform: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context = \"translate(\".concat(((_containerDomRef$curr = -((_containerDomRef$curr2 = containerDomRef.current) === null || _containerDomRef$curr2 === void 0 ? void 0 : _containerDomRef$curr2.scrollLeft)) !== null && _containerDomRef$curr !== void 0 ? _containerDomRef$curr : 0) + 'px', \", \")).call(_context, ((_containerDomRef$curr3 = -((_containerDomRef$curr4 = containerDomRef.current) === null || _containerDomRef$curr4 === void 0 ? void 0 : _containerDomRef$curr4.scrollTop)) !== null && _containerDomRef$curr3 !== void 0 ? _containerDomRef$curr3 : 0) + 'px', \")\"),\n      left: x,\n      top: y - 44\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_6__.getLangMsg)('printd.components.key0066'));\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      handlePassGridActionGuide: handlePassGridActionGuideProxy\n    };\n  }, [handlePassGridActionGuideProxy]);\n  (0,_hooks_useContainer__WEBPACK_IMPORTED_MODULE_3__.useContainer)({\n    portalRef: portalRef,\n    children: ToolTip,\n    style: {\n      width: '1000px'\n    }\n  });\n  return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (GridActionGuide);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/gridActionGuide.tsx?");

/***/ }),

/***/ 3588:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   gridPortalScrollHooks: function() { return /* binding */ gridPortalScrollHooks; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nvar gridPortalScrollHooks = function gridPortalScrollHooks(_ref) {\n  var scrollCallbackRef = _ref.scrollCallbackRef,\n    refs = _ref.refs,\n    canvasResizeCallbackRef = _ref.canvasResizeCallbackRef;\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {\n    var _canvasResizeCallback, _scrollCallbackRef$cu;\n    var callback = function callback(_ref2) {\n      var _context, _context2;\n      var scrollLeft = _ref2.scrollLeft,\n        scrollTop = _ref2.scrollTop;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_0___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(refs).call(refs, function (ref) {\n        return ref.current;\n      })).call(_context2, Boolean)).call(_context, function (node) {\n        var _context3;\n        node.style.transform = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context3 = \"translate(\".concat(-scrollLeft + 'px', \", \")).call(_context3, -scrollTop + 'px', \")\");\n      });\n    };\n    // { offsetLeft, offsetTop }\n    var canvasResizeCallback = function canvasResizeCallback() {\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    };\n    (_canvasResizeCallback = canvasResizeCallbackRef.current) === null || _canvasResizeCallback === void 0 || _canvasResizeCallback.push(canvasResizeCallback);\n    (_scrollCallbackRef$cu = scrollCallbackRef.current) === null || _scrollCallbackRef$cu === void 0 || _scrollCallbackRef$cu.push(callback);\n    return function () {\n      var _context4, _context5;\n      // splice ?\n      scrollCallbackRef.current = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(_context4 = scrollCallbackRef.current).call(_context4, function (cb) {\n        return cb !== callback;\n      });\n      canvasResizeCallbackRef.current = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(_context5 = canvasResizeCallbackRef.current).call(_context5, function (cb) {\n        return cb !== canvasResizeCallback;\n      });\n    };\n  }, [scrollCallbackRef]);\n};\n\n//# sourceURL=webpack://print-designer/./src/components/grid/gridHooks.ts?");

/***/ }),

/***/ 40064:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   GridTitleCell: function() { return /* binding */ GridTitleCell; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _context_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(84945);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n/* harmony import */ var _hooks_useContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(82104);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41232);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21980);\n/* harmony import */ var _utils_client__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(77168);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _gridHooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(3588);\n\n\n\n\n// @ts-nocheck\n\n\n\n\n\n\n\n\n\n\n\nvar classPrefix = 'grid-title';\nvar MAGIC_NUMBER_1 = 1;\nvar MAGIC_NUMBER_2 = 0;\nvar TRANSLATE_X = 0;\nvar TRANSLATE_Y_HEIGHT = 0;\n/**\n * @param {number} n\n * @return {string}\n */\nvar convertToTitle = function convertToTitle(n) {\n  if (n <= 0) return '';\n  var res = [];\n  while (n) {\n    // if(n % 26 === 0) remain = 26;\n    // else remain = n % 26;\n\n    // 上面两行可以简写为下面一行\n    var remain = n % 26 ? n % 26 : 26;\n    res.unshift(String.fromCharCode(remain + 64));\n    n = Math.floor((n - remain) / 26);\n  }\n  return res.join('');\n};\nvar GridTitle = function GridTitle(_ref) {\n  var _canvasBoxRef$current, _canvasBoxRef$current2, _canvasBoxRef$current3, _canvasBoxRef$current4, _context, _containerDomRef$curr, _containerDomRef$curr2, _containerDomRef$curr3, _containerDomRef$curr4, _context2, _containerDomRef$curr5, _containerDomRef$curr6, _containerDomRef$curr7, _containerDomRef$curr8, _context3, _containerDomRef$curr9, _containerDomRef$curr10, _containerDomRef$curr11, _containerDomRef$curr12, _context4, _containerDomRef$curr13, _containerDomRef$curr14, _containerDomRef$curr15, _containerDomRef$curr16;\n  var columns = _ref.columns,\n    scale = _ref.scale,\n    gridX = _ref.x,\n    gridY = _ref.y,\n    portalRef = _ref.portalRef,\n    rows = _ref.rows,\n    scrollTop = _ref.scrollTop,\n    scrollLeft = _ref.scrollLeft,\n    gridType = _ref.gridType,\n    templateRowData = _ref.templateRowData,\n    maxLimitWidthChange = _ref.maxLimitWidthChange,\n    maxLimitHeightChange = _ref.maxLimitHeightChange,\n    changeRow = _ref.changeRow,\n    changeColumn = _ref.changeColumn,\n    handleGridSelection = _ref.handleGridSelection,\n    onContextMenu = _ref.onContextMenu,\n    rowTitleSelection = _ref.rowTitleSelection,\n    columnTitleSelection = _ref.columnTitleSelection,\n    templateRowHeight = _ref.templateRowHeight,\n    containerHeight = _ref.containerHeight,\n    containerWidth = _ref.containerWidth,\n    subGridId = _ref.subGridId,\n    addSubDataGrid = _ref.addSubDataGrid,\n    gridState = _ref.gridState,\n    isShowAddSubGridBtn = _ref.isShowAddSubGridBtn,\n    tableTailId = _ref.tableTailId;\n  // 这里是px\n  var columnWidth = 60 * scale;\n  var rowHeight = 25 * scale;\n  var rightSubGridWidth = 104 * scale;\n  var bottomSubGridHeight = 40 * scale;\n  var subGridAddContainerSpacing = 2 * scale;\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var columnLineRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var rowLineRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var rowRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var columnRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var rightSubGridAddBtnRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var bottomSubGridAddBtnRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_4__.useContext)(_context_index__WEBPACK_IMPORTED_MODULE_5__.PrintRootContext);\n  var scrollCallbackRef = context.scrollCallbackRef,\n    containerDomRef = context.containerDomRef,\n    pageHeight = context.pageHeight,\n    canvasBoxRef = context.canvasBoxRef,\n    rulerWidth = context.rulerWidth,\n    pageWidth = context.pageWidth,\n    canvasResizeCallbackRef = context.canvasResizeCallbackRef;\n  var x = gridX + ((_canvasBoxRef$current = (_canvasBoxRef$current2 = canvasBoxRef.current) === null || _canvasBoxRef$current2 === void 0 ? void 0 : _canvasBoxRef$current2.offsetLeft) !== null && _canvasBoxRef$current !== void 0 ? _canvasBoxRef$current : 0) + rulerWidth;\n  var y = gridY + ((_canvasBoxRef$current3 = (_canvasBoxRef$current4 = canvasBoxRef.current) === null || _canvasBoxRef$current4 === void 0 ? void 0 : _canvasBoxRef$current4.offsetTop) !== null && _canvasBoxRef$current3 !== void 0 ? _canvasBoxRef$current3 : 0) + rulerWidth;\n  // const preScale = usePrevious(scale)\n  (0,_gridHooks__WEBPACK_IMPORTED_MODULE_14__.gridPortalScrollHooks)({\n    scrollCallbackRef: scrollCallbackRef,\n    refs: [columnRef, rowRef, rightSubGridAddBtnRef, bottomSubGridAddBtnRef],\n    canvasResizeCallbackRef: canvasResizeCallbackRef\n  });\n  var hasGroupRow = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(rows).call(rows, function (row) {\n    return row.rowType === 'Group';\n  });\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.console.log('gridTitle', x, y, rowHeight, (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_10__.countLength)(rows, templateRowHeight), scale));\n  var isShowGridRowColumnTitle = gridState === _constants__WEBPACK_IMPORTED_MODULE_6__.GRID_EDITOR_STATE;\n  var isShowGridAddSubGridBtn = !!isShowAddSubGridBtn && gridType === _constants__WEBPACK_IMPORTED_MODULE_6__.DATAGRID_TYPE && (gridState === _constants__WEBPACK_IMPORTED_MODULE_6__.GRID_SELECT_STATE || gridState === _constants__WEBPACK_IMPORTED_MODULE_6__.GRID_EDITOR_STATE) && !(subGridId !== null && subGridId !== void 0 && subGridId.length); // TODO: 先禁用掉\n  var getSelected = function getSelected(titleSelection, id, idx, items) {\n    var _titleSelection$id;\n    var isSelected = !!((_titleSelection$id = titleSelection[id]) !== null && _titleSelection$id !== void 0 && _titleSelection$id.visible);\n    var isNextSelected = !isSelected;\n    if (idx < items.length - 1) {\n      var _titleSelection$nextI;\n      var nextId = items[idx + 1].id;\n      isNextSelected = isNextSelected && !!((_titleSelection$nextI = titleSelection[nextId]) !== null && _titleSelection$nextI !== void 0 && _titleSelection$nextI.visible);\n    } else {\n      isNextSelected = false;\n    }\n    return {\n      isSelected: isSelected,\n      isNextSelected: isNextSelected\n    };\n  };\n  (0,_hooks_useContainer__WEBPACK_IMPORTED_MODULE_7__.useContainer)({\n    portalRef: portalRef,\n    children: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement((react__WEBPACK_IMPORTED_MODULE_4___default().Fragment), null, isShowGridRowColumnTitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      tabIndex: -1,\n      className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(\"\".concat(classPrefix, \"-column\"), classPrefix),\n      ref: columnRef,\n      style: {\n        // width: calculatorMMtoPx(countLength(columns), scale),\n        // width: 'auto',\n        width: containerWidth,\n        height: rowHeight + TRANSLATE_Y_HEIGHT,\n        transform: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = \"translate(\".concat(((_containerDomRef$curr = -((_containerDomRef$curr2 = containerDomRef.current) === null || _containerDomRef$curr2 === void 0 ? void 0 : _containerDomRef$curr2.scrollLeft)) !== null && _containerDomRef$curr !== void 0 ? _containerDomRef$curr : 0) + 'px', \", \")).call(_context, ((_containerDomRef$curr3 = -((_containerDomRef$curr4 = containerDomRef.current) === null || _containerDomRef$curr4 === void 0 ? void 0 : _containerDomRef$curr4.scrollTop)) !== null && _containerDomRef$curr3 !== void 0 ? _containerDomRef$curr3 : 0) + 'px', \")\"),\n        // transform: `translate(${(-scrollLeft) + 'px'}, ${(-scrollTop) + 'px'})`,\n        left: x + MAGIC_NUMBER_1,\n        top: y - rowHeight\n      }\n    }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(columns).call(columns, function (column, idx) {\n      // A B C\n      var title = convertToTitle(idx + 1);\n      var id = column.id;\n      var _getSelected = getSelected(columnTitleSelection, id, idx, columns),\n        isSelected = _getSelected.isSelected,\n        isNextSelected = _getSelected.isNextSelected;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(GridTitleCell, {\n        maxLimitWidthChange: maxLimitWidthChange,\n        maxLimitHeightChange: maxLimitHeightChange,\n        scale: scale,\n        onContextMenu: onContextMenu,\n        isSelected: isSelected,\n        isNextSelected: isNextSelected,\n        handleGridSelection: handleGridSelection,\n        length: rows.length,\n        index: idx,\n        change: changeColumn,\n        key: \"grid-column-\".concat(column.id),\n        text: title,\n        lineRef: columnLineRef,\n        type: \"column\",\n        width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)(column.columnWidth, scale),\n        height: rowHeight\n      });\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      ref: columnLineRef,\n      className: \"\".concat(classPrefix, \"-column-drag-line\"),\n      style: {\n        height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_10__.countLength)(rows, templateRowHeight), scale) + rowHeight\n      }\n    })), isShowGridRowColumnTitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      tabIndex: -1,\n      className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(\"\".concat(classPrefix, \"-row\"), classPrefix),\n      ref: rowRef,\n      style: {\n        width: columnWidth,\n        // height: calculatorMMtoPx(countLength(rows, templateRowHeight), scale) + rowHeight + MAGIC_NUMBER_2,\n        height: containerHeight + rowHeight,\n        transform: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = \"translate(\".concat(((_containerDomRef$curr5 = -((_containerDomRef$curr6 = containerDomRef.current) === null || _containerDomRef$curr6 === void 0 ? void 0 : _containerDomRef$curr6.scrollLeft)) !== null && _containerDomRef$curr5 !== void 0 ? _containerDomRef$curr5 : 0) + 'px', \", \")).call(_context2, ((_containerDomRef$curr7 = -((_containerDomRef$curr8 = containerDomRef.current) === null || _containerDomRef$curr8 === void 0 ? void 0 : _containerDomRef$curr8.scrollTop)) !== null && _containerDomRef$curr7 !== void 0 ? _containerDomRef$curr7 : 0) + 'px', \")\"),\n        left: x - columnWidth + MAGIC_NUMBER_1 + TRANSLATE_X,\n        top: y - rowHeight\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      className: \"\".concat(classPrefix, \"-frozen-cell\"),\n      style: {\n        width: columnWidth,\n        height: rowHeight\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      className: \"\".concat(classPrefix, \"-frozen-cell-line\"),\n      style: {\n        width: 60 * scale\n      }\n    })), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(rows).call(rows, function (row, idx) {\n      // 如果是网格，行标题显示索引\n      // const title = (gridType === 'LayoutGrid' || gridType === 'CardGrid') ? (idx + 1) : row.name\n      var title = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_10__.getGridTitleContent)(row, gridType, idx);\n      var id = row.id,\n        rowType = row.rowType,\n        rowHeight = row.rowHeight;\n      var height = (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)(rowHeight, scale);\n      if (rowType === _constants__WEBPACK_IMPORTED_MODULE_6__.ROW_TYPE_DETAIL && templateRowData.length) {\n        height += templateRowData.length * height;\n      }\n      var _getSelected2 = getSelected(rowTitleSelection, id, idx, rows),\n        isSelected = _getSelected2.isSelected,\n        _isNextSelected = _getSelected2.isNextSelected;\n      // const isNextSelected = rowType === ROW_TYPE_DETAIL ? false : _isNextSelected\n      var isNextSelected = _isNextSelected;\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(GridTitleCell, {\n        maxLimitWidthChange: maxLimitWidthChange,\n        templateRowHeight: templateRowHeight,\n        maxLimitHeightChange: maxLimitHeightChange,\n        scale: scale,\n        onContextMenu: onContextMenu,\n        templateRowData: rowType === _constants__WEBPACK_IMPORTED_MODULE_6__.ROW_TYPE_DETAIL && templateRowData,\n        isSelected: isSelected,\n        isNextSelected: isNextSelected,\n        handleGridSelection: handleGridSelection,\n        length: columns.length,\n        index: idx,\n        change: changeRow,\n        key: \"grid-row-\".concat(row.id),\n        text: title,\n        type: \"row\",\n        lineRef: rowLineRef,\n        width: columnWidth,\n        height: height\n      });\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      ref: rowLineRef,\n      className: \"\".concat(classPrefix, \"-row-drag-line\"),\n      style: {\n        width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)((0,_utils_grid__WEBPACK_IMPORTED_MODULE_10__.countLength)(columns), scale) + columnWidth\n      }\n    })), isShowGridAddSubGridBtn && !hasGroupRow && !tableTailId && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      className: \"\".concat(classPrefix, \"-subgrid-right\"),\n      ref: rightSubGridAddBtnRef,\n      style: {\n        width: rightSubGridWidth,\n        height: containerHeight + 1,\n        transform: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = \"translate(\".concat(((_containerDomRef$curr9 = -((_containerDomRef$curr10 = containerDomRef.current) === null || _containerDomRef$curr10 === void 0 ? void 0 : _containerDomRef$curr10.scrollLeft)) !== null && _containerDomRef$curr9 !== void 0 ? _containerDomRef$curr9 : 0) + 'px', \", \")).call(_context3, ((_containerDomRef$curr11 = -((_containerDomRef$curr12 = containerDomRef.current) === null || _containerDomRef$curr12 === void 0 ? void 0 : _containerDomRef$curr12.scrollTop)) !== null && _containerDomRef$curr11 !== void 0 ? _containerDomRef$curr11 : 0) + 'px', \")\"),\n        left: x + containerWidth + MAGIC_NUMBER_1 + TRANSLATE_X + subGridAddContainerSpacing,\n        top: y\n      },\n      onClick: function onClick() {\n        addSubDataGrid('right');\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.Icon, {\n      type: \"add\"\n    }), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.grid.key0032')), isShowGridAddSubGridBtn && !hasGroupRow && !tableTailId && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n      className: \"\".concat(classPrefix, \"-subgrid-bottom\"),\n      ref: bottomSubGridAddBtnRef,\n      style: {\n        width: containerWidth,\n        height: bottomSubGridHeight + 1,\n        transform: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = \"translate(\".concat(((_containerDomRef$curr13 = -((_containerDomRef$curr14 = containerDomRef.current) === null || _containerDomRef$curr14 === void 0 ? void 0 : _containerDomRef$curr14.scrollLeft)) !== null && _containerDomRef$curr13 !== void 0 ? _containerDomRef$curr13 : 0) + 'px', \", \")).call(_context4, ((_containerDomRef$curr15 = -((_containerDomRef$curr16 = containerDomRef.current) === null || _containerDomRef$curr16 === void 0 ? void 0 : _containerDomRef$curr16.scrollTop)) !== null && _containerDomRef$curr15 !== void 0 ? _containerDomRef$curr15 : 0) + 'px', \")\"),\n        left: x + MAGIC_NUMBER_1 + TRANSLATE_X,\n        top: y + containerHeight + subGridAddContainerSpacing\n      },\n      onClick: function onClick() {\n        addSubDataGrid('bottom');\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.Icon, {\n      type: \"add\"\n    }), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.getLangMsg)('printd.grid.key0032')))\n  });\n  return null;\n};\nvar MOUSE_DRAG_FLAG_DISTANCE = 8;\n// TODO: 这里状态太多了\nvar GridTitleCell = function GridTitleCell(_ref2) {\n  var _context6;\n  var text = _ref2.text,\n    width = _ref2.width,\n    height = _ref2.height,\n    type = _ref2.type,\n    lineRef = _ref2.lineRef,\n    index = _ref2.index,\n    change = _ref2.change,\n    handleGridSelection = _ref2.handleGridSelection,\n    length = _ref2.length,\n    isSelected = _ref2.isSelected,\n    onContextMenu = _ref2.onContextMenu,\n    templateRowData = _ref2.templateRowData,\n    templateRowHeight = _ref2.templateRowHeight,\n    scale = _ref2.scale,\n    maxLimitWidthChange = _ref2.maxLimitWidthChange,\n    maxLimitHeightChange = _ref2.maxLimitHeightChange,\n    isNextSelected = _ref2.isNextSelected;\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)(null);\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.useOnClickOutside)([ref], function (evt) {\n    // dep ?\n    var lineNode = lineRef.current;\n    var canDrag = lineNode.dataset.canDrag;\n    if (canDrag && JSON.parse(canDrag)) return;\n  }, false);\n  var handleMouseDown = function handleMouseDown(e) {\n    var lineNode = lineRef.current;\n    var node = ref.current;\n    var canDrag = lineNode.dataset.canDrag;\n    if (lineNode && canDrag && JSON.parse(canDrag) && node) {\n      node.dataset.dragging = true;\n      lineNode.dataset[\"\".concat(type, \"DragStart\")] = type !== 'row' ? e.clientX : e.clientY;\n      lineNode.style[type === 'row' ? 'top' : 'left'] = \"\".concat(node[type === 'row' ? 'offsetTop' : 'offsetLeft'] + node[type === 'row' ? 'offsetHeight' : 'offsetWidth'], \"px\");\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.console.log('handleMouseDown', lineNode, ref.current);\n      lineNode.style[type === 'row' ? 'top' : 'left'] = type === 'row' ? e.clientX : e.clientY;\n      lineNode.style.display = 'block';\n      e === null || e === void 0 || e.stopPropagation();\n    } else {\n      // 多选功能\n      if ((0,_utils_client__WEBPACK_IMPORTED_MODULE_11__.isMultiKeyActive)(e)) {\n        handleGridSelection({\n          type: type,\n          index: index,\n          isMult: true\n        });\n      } else {\n        handleGridSelection({\n          type: type,\n          index: index,\n          isMult: false\n        });\n      }\n\n      // handleGridSelection(type === 'row' ? {\n      //   minRowNum: index,\n      //   maxRowNum: index,\n      //   minColumnNum: 0,\n      //   maxColumnNum: length - 1\n      // } : {\n      //     minRowNum: 0,\n      //     maxRowNum: length - 1,\n      //     minColumnNum: index,\n      //     maxColumnNum: index\n      //   })\n      // return\n    }\n  };\n  var handleMouseMove = function handleMouseMove(e) {\n    var node = ref.current;\n    var lineNode = lineRef.current;\n    if (node && lineNode) {\n      var offsetDistance = type === 'row' ? e.nativeEvent.offsetY : e.nativeEvent.offsetX;\n      var nodeDistance = type === 'row' ? node.offsetHeight : node.offsetWidth;\n      // const {offsetWidth, offsetHeight} = node\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.console.log('handleMouseMove', offsetDistance, MOUSE_DRAG_FLAG_DISTANCE, nodeDistance, offsetDistance + MOUSE_DRAG_FLAG_DISTANCE >= nodeDistance);\n      if (node.dataset.dragging && JSON.parse(node.dataset.dragging)) {} else {\n        if (offsetDistance + MOUSE_DRAG_FLAG_DISTANCE >= nodeDistance) {\n          lineNode.dataset.canDrag = true;\n          node.style.cursor = type === 'row' ? 'ns-resize' : 'ew-resize';\n        } else {\n          lineNode.dataset.canDrag = false;\n          // 这里不记忆之前的cursor\n          node.style.cursor = '';\n        }\n      }\n    }\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {\n    var callback = function callback(e) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.console.log('e.ctrlKe shapeRef.current?.stopDrag()');\n      var node = ref.current;\n      var lineNode = lineRef.current;\n      if (node) {\n        node.dataset.dragging = false;\n      }\n      if (lineNode) {\n        lineNode.style.display = 'none';\n        lineNode.style.transform = '';\n        lineNode.dataset.canDrag = false;\n      }\n    };\n    document.addEventListener('keydown', callback);\n    return function () {\n      document.removeEventListener('keydown', callback);\n    };\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {\n    var handleMouseMove = function handleMouseMove(e) {\n      var node = ref.current;\n      var lineNode = lineRef.current;\n      if (node && lineNode) {\n        if (node.dataset.dragging && JSON.parse(node.dataset.dragging)) {\n          var _context5;\n          var start = lineNode.dataset[\"\".concat(type, \"DragStart\")];\n          // const limited\n          var distance = (type !== 'row' ? e.clientX : e.clientY) - +start;\n          lineNode.style.transform = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = \"translate\".concat(type === 'row' ? 'Y' : 'X', \"(\")).call(_context5, distance, \"px)\");\n        }\n      }\n    };\n    window.addEventListener('mousemove', handleMouseMove);\n    return function () {\n      window.removeEventListener('mousemove', handleMouseMove);\n    };\n  }, []);\n  // height width 是px\n  var minLimitedChange = type === 'row' ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)(_constants__WEBPACK_IMPORTED_MODULE_6__.GRID_ROW_MIN_SIZE, scale) - height : (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)(_constants__WEBPACK_IMPORTED_MODULE_6__.GRID_COLUMN_MIN_SIZE, scale) - width;\n  // x , y为px pageHeight为mm\n  var maxLimitedChange = type === 'row' ? (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)(maxLimitHeightChange, scale) : (0,_utils_index__WEBPACK_IMPORTED_MODULE_8__.calculatorMMtoPx)(maxLimitWidthChange, scale);\n  (0,react__WEBPACK_IMPORTED_MODULE_4__.useEffect)(function () {\n    var handleMouseUp = function handleMouseUp(e) {\n      var lineNode = lineRef.current;\n      var node = ref.current;\n      if (lineNode && node) {\n        var dragging = node.dataset.dragging;\n        if (dragging && JSON.parse(dragging)) {\n          var start = lineNode.dataset[\"\".concat(type, \"DragStart\")];\n          var distance = (type !== 'row' ? e.clientX : e.clientY) - +start;\n          lineNode.style.display = 'none';\n          lineNode.style.transform = '';\n          // TODO dispatch action\n          // 不改变线的轨迹，通过这里约束\n          // + 1是本身一行\n          if (!isNaN(distance)) {\n            var realDistance = distance > maxLimitedChange ? maxLimitedChange : distance < minLimitedChange ? minLimitedChange : distance;\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_9__.console.log('handleMouseUp', distance, e.clientX, e.clientY, +start, [realDistance, maxLimitedChange, minLimitedChange]);\n            change(index, templateRowData ? realDistance / (templateRowData.length + 1) : realDistance, realDistance, distance);\n          }\n        }\n        lineNode.dataset.canDrag = false;\n        node.dataset.dragging = false;\n      }\n    };\n    window.addEventListener('mouseup', handleMouseUp);\n    return function () {\n      window.removeEventListener('mouseup', handleMouseUp);\n    };\n  }, [change, templateRowData]);\n  // 适配样式:\n  var _MAGIC_NUMBER_2 = 0;\n  var _MAGIC_NUMBER_1 = 0;\n\n  // const cellStyle = templateRowData ? {\n  //   // flexGrow: 1\n  // } : {\n  //     height: isSelected ? height + _MAGIC_NUMBER_1 : height\n  //   }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"div\", {\n    ref: ref,\n    className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(\"\".concat(classPrefix, \"-cell\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(classPrefix, \"-cell-selectable\"), isSelected), _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context6 = \"\".concat(classPrefix, \"-cell-\")).call(_context6, type, \"-next-selectable\"), isNextSelected)),\n    style: {\n      // width: Math.ceil(!isSelected ? width : width + _MAGIC_NUMBER_2),\n      // width: !isSelected ? width : width + _MAGIC_NUMBER_2,\n      width: type === 'row' ? width : width + (index === 0 ? 1 : 0),\n      fontSize: 12 * scale,\n      lineHeight: 1.5,\n      // 行高换成倍数不用乘scale\n      // height: Math.ceil(isSelected ? height + _MAGIC_NUMBER_1 : height),\n      height: type !== 'row' ? height : height + (index === 0 ? 1 : 0)\n      // height: isSelected ? height + _MAGIC_NUMBER_1 : height,\n      // ...cellStyle\n      // height: height + (templateRowData ? calculatorMMtoPx(templateRowHeight, scale) : 0)\n    },\n    onContextMenu: onContextMenu,\n    onMouseMove: handleMouseMove,\n    onMouseDown: handleMouseDown\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(\"span\", {\n    className: \"\".concat(classPrefix, \"-cell-text\")\n  }, text));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (GridTitle);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/gridTitle.tsx?");

/***/ }),

/***/ 68340:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(38620);\n\n\n\n// @ts-nocheck\n\n\n\n// TODO Picker\n\nvar Row = function Row(_ref) {\n  var row = _ref.row,\n    cells = _ref.cells,\n    isTemplate = _ref.isTemplate,\n    cellBackColor = _ref.cellBackColor;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement((react__WEBPACK_IMPORTED_MODULE_3___default().Fragment), null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(cells).call(cells, function (cell) {\n    var _context, _context2;\n    var row = cell.row,\n      column = cell.column,\n      cellKey = cell.cellKey,\n      id = cell.id;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_cell__WEBPACK_IMPORTED_MODULE_4__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, cell, {\n      isTemplate: isTemplate,\n      key: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = \"\".concat(isTemplate ? 'tempalte_' : '')).call(_context2, cellKey, \"_\")).call(_context, id),\n      cellBackColor: cellBackColor\n    }));\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Row);\n\n//# sourceURL=webpack://print-designer/./src/components/grid/row.tsx?");

/***/ }),

/***/ 57812:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   createContainer: function() { return /* binding */ createContainer; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _resource_control_png__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(89920);\n/* harmony import */ var _resource_datasource_png__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(1024);\n/* harmony import */ var _resource_printsetting_png__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(99652);\n/* harmony import */ var _resource_property_png__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(38188);\n/* harmony import */ var _resource_toolbar_png__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(97744);\n/* harmony import */ var driver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(44820);\n/* harmony import */ var driver_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(driver_js__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var driver_js_dist_driver_min_css__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(35176);\n/* harmony import */ var driver_js_dist_driver_min_css__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(driver_js_dist_driver_min_css__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _hooks_useGlobalGuideState__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18916);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// import { useFirstMountState } from 'react-use'\n\nvar SETUP_DRIVER_DELAY = 500;\n// TODO:\n// 重构：通用重构, 可以考虑fork社区已有的\nvar repositionContainerChlid = function repositionContainerChlid(parent, child) {\n  var _parent$getBoundingCl = parent.getBoundingClientRect(),\n    left = _parent$getBoundingCl.left,\n    top = _parent$getBoundingCl.top;\n  child.style.top = top + 'px'; // '0px'\n  child.style.left = left + 'px'; // '0px'\n};\nvar createContainer = function createContainer(_ref) {\n  var _parent = _ref._parent,\n    element = _ref.element,\n    _isMount = _ref._isMount,\n    _image = _ref._image;\n  if (_isMount) {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('createContainer isMount', _parent, element, _isMount, _image);\n    return;\n  }\n  var parent = document.querySelector(_parent);\n  if (!parent) {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('createContainer parent', _parent, element, _isMount, _image);\n    return;\n  }\n  var containerEl = document.createElement('div');\n  repositionContainerChlid(parent, containerEl);\n  containerEl.style.zIndex = '1050';\n  containerEl.style.position = 'fixed';\n  containerEl.classList.add(element.substring(1));\n  parent.appendChild(containerEl);\n  var originPosition = parent.style.position;\n  parent.style.position = 'relative';\n  var imgContainerDiv = document.createElement('div');\n  var img = document.createElement('img');\n  img.src = _image;\n  imgContainerDiv.classList.add('print-guide-mock-image');\n  imgContainerDiv.appendChild(img);\n  containerEl.appendChild(imgContainerDiv);\n  hideElement(containerEl);\n  return {\n    _parentDom: parent,\n    _container: containerEl,\n    _unmountContainer: function _unmountContainer() {\n      parent === null || parent === void 0 || parent.removeChild(containerEl);\n      parent.style.position = originPosition || 'static';\n    }\n  };\n};\nvar hideElement = function hideElement(node) {\n  node.style.opacity = 0;\n  node.style.visibility = 'hidden';\n};\n\n// 这里应该不会有重复状态更新导致重复DOM\nvar createStepDiv = function createStepDiv(element, effect) {\n  if (effect) {\n    var unMountEffect = effect();\n    return function () {\n      unMountEffect && unMountEffect();\n    };\n  }\n  var node = document.querySelector(element);\n  node.style.opacity = 1;\n  node.style.visibility = 'visible';\n  return function () {\n    hideElement(node);\n  };\n};\nvar createProgressText = function createProgressText(className, childCls, callback) {\n  var node = document.querySelector(\".\".concat(childCls));\n  if (node) return;\n  var parent = document.querySelector(className);\n  var progressTextNode = document.createElement('span');\n  progressTextNode.classList.add(childCls);\n  // FireFox偶发\n  if (!parent) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2___default()(function () {\n      // 不递归\n      var parent = document.querySelector(className);\n      if (parent) {\n        parent.insertBefore(progressTextNode, parent.firstElementChild);\n        callback && callback();\n      } else {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('createProgressText fail', className, childCls, callback);\n      }\n    });\n  } else {\n    parent.insertBefore(progressTextNode, parent.firstElementChild);\n    callback && callback();\n  }\n};\nvar changeProgressText = function changeProgressText(className, numerator, denominator) {\n  var _context;\n  var node = document.querySelector(\".\".concat(className));\n  node.textContent = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context = \"\".concat(numerator, \" / \")).call(_context, denominator);\n};\nvar appendLineBallShape = function appendLineBallShape(className, lineCls, ballCls) {\n  var _context2;\n  var node = document.querySelector(\".\".concat(className));\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = [lineCls, ballCls]).call(_context2, function (cls) {\n    var div = document.createElement('div');\n    div.classList.add(cls);\n    node === null || node === void 0 || node.appendChild(div);\n  });\n  // const imgContainerDiv = document.createElement('div')\n};\n// 单例\nvar driver = {\n  current: null\n};\nvar StaticActionGuide = function StaticActionGuide(_ref2) {\n  var handlePassPrintActionGuide = _ref2.handlePassPrintActionGuide;\n  // const isMount = useFirstMountState()\n  var _useGlobalGuideState = (0,_hooks_useGlobalGuideState__WEBPACK_IMPORTED_MODULE_17__.useGlobalGuideState)(),\n    _useGlobalGuideState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useGlobalGuideState, 2),\n    isInnerFirstVisit = _useGlobalGuideState2[0],\n    setIsInnerFirstVisit = _useGlobalGuideState2[1];\n  var currentStepNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(null);\n  var previousUnmoutRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(function () {});\n  var currentStepRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(0);\n  var titleClassName = 'print-guide-title';\n  var contentClassName = 'print-guide-content';\n  var skipClassName = 'print-guide-skip';\n  var progressClassName = 'print-guide-progress';\n  var cardClassName = 'print-guide-card';\n  var firstCardClassName = 'print-guide-first-card';\n  var maskClassName = 'print-guide-mask';\n  var printSettingPngClassName = '.print-guide-mock-image-print-setting';\n  var ballClassName = 'print-guide-ball-shape';\n  var lineClassName = 'print-guide-line-shape';\n  var layerClassName = 'print-guide-layer-mask';\n  var createTextDiv = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function (text, className) {\n    var _context3;\n    // return <div className={className}>{text}</div>\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context3 = \"<div class='\".concat(className, \"'>\")).call(_context3, text, \"</div>\");\n  }, []);\n  var createOverlay = function createOverlay() {\n    var maskNode = document.querySelector(\".\".concat(layerClassName));\n    if (maskNode) {\n      return;\n    }\n    var mask = document.createElement('div');\n    mask.classList.add(layerClassName);\n    document.body.appendChild(mask);\n  };\n  var removeOverlay = function removeOverlay() {\n    var mask = document.querySelector(\".\".concat(layerClassName));\n    if (mask) {\n      document.body.removeChild(mask);\n    }\n  };\n  var steps = (0,react__WEBPACK_IMPORTED_MODULE_8__.useMemo)(function () {\n    var _context4;\n    return [{\n      element: printSettingPngClassName,\n      // element: () => {\n      //   return document.querySelector('.print-guide-mock-image')\n      // },\n      // element: '.kdesigner-right-view',\n      // title: getLangMsg('printd.grid.key0107'),\n      title: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0107'), titleClassName),\n      _image: _resource_printsetting_png__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n      // _parent: '.kdesigner-right-view',\n      _parent: '[data-portalid=\"print-designer-top-view-right\"]',\n      // parent: '.print-guide-mock-image',\n      // position: 'top-left-aligned',\n      position: 'left-center',\n      intro: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0050'), contentClassName)\n      // intro: getLangMsg('printd.components.key0050')\n      // offset: {\n      //   x: 20\n      // },\n    }, {\n      element: '.print-guide-mock-image-control',\n      // title: getLangMsg('printd.components.key0051'),\n      title: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0051'), titleClassName),\n      _image: _resource_control_png__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n      // _parent: '.kdesigner-left-view',\n      _parent: '[data-portalid=\"print-designer-top-view-left\"]',\n      // parent: '.print-guide-mock-image',\n      // position: 'top-right-aligned',\n      position: 'right-center',\n      intro: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0052'), contentClassName)\n      // intro: getLangMsg('printd.components.key0052')'\n    }, {\n      element: '.print-guide-mock-image-datasource',\n      title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0013'),\n      // title: createTextDiv(getLangMsg('printd.components.key0013'), titleClassName),\n      _image: _resource_datasource_png__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n      // _parent: '.kdesigner-left-view',\n      _parent: '[data-portalid=\"print-designer-top-view-left\"]',\n      parent: '.print-guide-mock-image',\n      // position: 'right-top',\n      // position: 'top-right-aligned',\n      position: 'right-center',\n      // intro: '<div>1、字段过多时，支持搜索字段\\n2、数据源字段可直接拖动至画布</div>',\n      intro: // <div>\n      //   {createTextDiv(getLangMsg('printd.components.key0053'), contentClassName)}\n      //   {createTextDiv(getLangMsg('printd.components.key0054'), contentClassName)}\n      // </div>\n      _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context4 = \"\\n          <div>\\n           \".concat(createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0053'), contentClassName), \"\\n           \")).call(_context4, createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0054'), contentClassName), \"\\n          </div>\\n          \")\n    }, {\n      element: '.print-guide-mock-image-property',\n      // title: getLangMsg('printd.grid.key0108'),\n      title: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0108'), titleClassName),\n      _image: _resource_property_png__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n      // _parent: '.kdesigner-right-view',\n      _parent: '[data-portalid=\"print-designer-top-view-right\"]',\n      // parent: '.print-guide-mock-image',\n      // position: 'top-left-aligned',\n      position: 'left-center',\n      // position: 'left-top',\n      intro: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0055'), contentClassName)\n      // intro: getLangMsg('printd.components.key0055'),\n    }, {\n      element: '#kdesigner-top-view-main',\n      // element: '[data-portalid=\"print-designer-top-view-main\"]',\n      // title: getLangMsg('printd.components.key0056'),\n      _isDynamic: true,\n      title: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0056'), titleClassName),\n      _image: _resource_toolbar_png__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n      _parent: '#kdesigner-top-view-main',\n      // parent: '.print-guide-mock-image',\n      position: 'bottom',\n      intro: createTextDiv((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0057'), contentClassName)\n      // intro: getLangMsg('printd.components.key0055'),\n    }];\n  }, []);\n  var bodyOverFlow = document.body.style.overflow;\n  var unMountEffects = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)({});\n  var unMount = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function () {\n    var _context5, _document$querySelect;\n    // 清除\n    document.body.style.overflow = bodyOverFlow;\n    currentStepNodeRef.current = null;\n    previousUnmoutRef.current = null;\n    previousUnmoutRef.current = null;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(steps).call(steps, function (step) {\n      var _unmountContainer = step._unmountContainer;\n      if (_unmountContainer) {\n        _unmountContainer();\n        step._unmountContainer = null;\n        step._container = null;\n        step._parentDom = null;\n      }\n    });\n    setIsInnerFirstVisit(false);\n    // 应该cardChangeEffect 所以需要显示remove\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context5 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_5___default()(unMountEffects.current)).call(_context5, function (cb) {\n      return cb && cb();\n    });\n    (_document$querySelect = document.querySelector(\".\".concat(cardClassName))) === null || _document$querySelect === void 0 || _document$querySelect.remove();\n    handlePassPrintActionGuide && handlePassPrintActionGuide();\n    removeOverlay();\n  }, []);\n  var repositionSteps = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function () {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(steps).call(steps, function (step) {\n      var _parentDom = step._parentDom,\n        _container = step._container;\n      if (_parentDom && _container) {\n        repositionContainerChlid(_parentDom, _container);\n      }\n    });\n  }, []);\n  var beforeChange = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function (nextIndex) {\n    previousUnmoutRef.current && previousUnmoutRef.current();\n    currentStepRef.current = nextIndex;\n    var _steps$currentStepRef = steps[currentStepRef.current],\n      element = _steps$currentStepRef.element,\n      _isDynamic = _steps$currentStepRef._isDynamic;\n    if (_isDynamic) {\n      var callback = function callback() {\n        var node = document.querySelector(element);\n        if (node) {\n          var previousPointerEvents = node.style.pointerEvents;\n          node.style.pointerEvents = 'none';\n          var cb = function cb() {\n            node.style.pointerEvents = previousPointerEvents;\n          };\n          unMountEffects.current.removeDynamicEffect = cb;\n          return cb;\n        }\n      };\n      previousUnmoutRef.current = createStepDiv(element, callback);\n    } else {\n      previousUnmoutRef.current = createStepDiv(element);\n    }\n  }, []);\n  var cardChangeEffect = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function (driver) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2___default()(function () {\n      createProgressText('.driver-popover-footer', progressClassName, function () {\n        changeProgressText(progressClassName, driver.currentStep + 1, steps.length);\n        appendLineBallShape(cardClassName, lineClassName, ballClassName);\n      });\n    }, 150);\n  }, []);\n  var isFirstCardChangeRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(false);\n  (0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(function () {\n    if (!isInnerFirstVisit) return;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(steps).call(steps, function (step) {\n      var element = step.element,\n        _parent = step._parent,\n        _image = step._image,\n        _isMount = step._isMount,\n        _isDynamic = step._isDynamic;\n      if (_isDynamic) return;\n      var ret = createContainer({\n        element: element,\n        _parent: _parent,\n        _isMount: _isMount,\n        _image: _image\n      });\n      if (ret) {\n        step._isMount = true;\n      }\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(step, ret);\n    });\n    // setTimeout(() => {\n    //   setIsMounted(true)\n    // })\n    if (!driver.current) {\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2___default()(function () {\n        driver.current = new (driver_js__WEBPACK_IMPORTED_MODULE_14___default())({\n          // className: cardClassName,\n          animate: false,\n          // 动画的话要看三方库定时器参数多少，不开启\n          doneBtnText: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0058'),\n          closeBtnText: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0059'),\n          nextBtnText: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0060'),\n          prevBtnText: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.components.key0061'),\n          keyboardControl: true,\n          overlayClickNext: false,\n          padding: 0,\n          allowClose: false,\n          onNext: function onNext(ele) {\n            var options = ele.options;\n            var element = options.element;\n            var idx = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_6___default()(steps).call(steps, function (step) {\n              return element === step.element;\n            });\n            if (idx === steps.length - 1) {\n              unMount();\n            } else {\n              beforeChange(idx + 1);\n            }\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('onNext', ele);\n          },\n          onPrevious: function onPrevious(ele) {\n            var options = ele.options;\n            var element = options.element;\n            var idx = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_6___default()(steps).call(steps, function (step) {\n              return element === step.element;\n            });\n            idx !== 0 && beforeChange(idx - 1);\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('onPrevious', ele);\n          },\n          onDeselected: function onDeselected(ele) {\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('onDeselected', ele);\n            if (!driver.current.isActivated) {\n              unMount();\n              removeOverlay();\n            }\n          },\n          // onResize\n          onHighlighted: function onHighlighted() {\n            cardChangeEffect(driver.current);\n            document.body.style.overflow = 'hidden';\n            createOverlay();\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('driver', driver.current);\n          },\n          onHighlightStarted: function onHighlightStarted() {\n            if (!isFirstCardChangeRef.current) {\n              beforeChange(0);\n              isFirstCardChangeRef.current = true;\n            }\n          }\n        });\n        driver.current.defineSteps(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(steps).call(steps, function (step) {\n          var _context6, _context7;\n          var element = step.element,\n            title = step.title,\n            intro = step.intro,\n            position = step.position;\n          var className = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context6 = \"\".concat(element.substring(1), \"-card \")).call(_context6, element !== printSettingPngClassName ? cardClassName : _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context7 = \"\".concat(cardClassName, \" \")).call(_context7, firstCardClassName));\n          return {\n            element: element,\n            popover: {\n              className: className,\n              title: title,\n              description: intro,\n              position: position\n            }\n          };\n        }));\n        // 偶发启动不了\n        // 还不如自己写一个\n        // 里面是有定时器，但是不该影响才对- -\n        _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_2___default()(function () {\n          var _driver$current;\n          (_driver$current = driver.current) === null || _driver$current === void 0 || _driver$current.start(0);\n        }, SETUP_DRIVER_DELAY);\n      });\n    }\n    var callback = function callback() {\n      var _driver$current2;\n      repositionSteps();\n      (_driver$current2 = driver.current) === null || _driver$current2 === void 0 || _driver$current2.refresh();\n      cardChangeEffect(driver.current);\n    };\n    window.addEventListener('resize', callback);\n    return function () {\n      window.removeEventListener('resize', callback);\n    };\n  }, []);\n  return null;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (StaticActionGuide);\n\n//# sourceURL=webpack://print-designer/./src/components/guide/index.tsx?");

/***/ }),

/***/ 96432:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   controls: function() { return /* binding */ controls; },\n/* harmony export */   controlsMap: function() { return /* binding */ controlsMap; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _KDTextField__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94028);\n/* harmony import */ var _KDImage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4496);\n/* harmony import */ var _KDQrCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47944);\n/* harmony import */ var _KDBarCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(64492);\n/* harmony import */ var _views_center_KDRoot__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87052);\n/* harmony import */ var _grid_KDGrid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27692);\n/* harmony import */ var _KDHeader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68432);\n/* harmony import */ var _KDFooter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10420);\n/* harmony import */ var _KDRichText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(59812);\n/* harmony import */ var _KDGridFooter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21191);\n/* harmony import */ var _KDLine__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(61376);\n\n\n\n\n\n\n\n\n\n\n\n\nvar controlsMap = {\n  Text: _KDTextField__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n  RichText: _KDRichText__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n  Image: _KDImage__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n  Barcode: _KDBarCode__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n  QRCode: _KDQrCode__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n  PrintTemplate: _views_center_KDRoot__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  PrintForm: _views_center_KDRoot__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  Paper: _views_center_KDRoot__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n  DataGrid: _grid_KDGrid__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  CardGrid: _grid_KDGrid__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  LayoutGrid: _grid_KDGrid__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  Header: _KDHeader__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n  Footer: _KDFooter__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n  SubDataGrid: _grid_KDGrid__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n  TableTail: _KDGridFooter__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n  Line: _KDLine__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n};\nvar controls = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(controlsMap);\n\n//# sourceURL=webpack://print-designer/./src/components/index.ts?");

/***/ }),

/***/ 20008:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _defaultConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65612);\n/**\n * 提供外层注入属性的context\n */\n\n\nvar ConfigContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(_defaultConfig__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (ConfigContext);\n\n//# sourceURL=webpack://print-designer/./src/config-provider/ConfigContext.tsx?");

/***/ }),

/***/ 65612:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36932);\n\n\nvar defaultConfig = {\n  getPrefixCls: function getPrefixCls(configPrefixCls, suffixCls, customizePrefixCls) {\n    var _context;\n    // 获取样式前缀方法\n    if (customizePrefixCls) return customizePrefixCls;\n    configPrefixCls = configPrefixCls || 'kdesigner';\n    return suffixCls ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context = \"\".concat(configPrefixCls, \"-\")).call(_context, suffixCls) : configPrefixCls;\n  },\n  prefixCls: 'kdesigner',\n  // 样式前缀\n  locale: {\n    getLangMsg: _locale__WEBPACK_IMPORTED_MODULE_1__.getLangMsg,\n    getCompLangMsg: _locale__WEBPACK_IMPORTED_MODULE_1__.getCompLangMsg\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (defaultConfig);\n\n//# sourceURL=webpack://print-designer/./src/config-provider/defaultConfig.tsx?");

/***/ }),

/***/ 66416:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   BEFORE_SAVE: function() { return /* binding */ BEFORE_SAVE; }\n/* harmony export */ });\n/**\n * 声明控件方法\n */\nvar BEFORE_SAVE = 'beforeSave';\n\n//# sourceURL=webpack://print-designer/./src/constants/ctrlMethodName.ts?");

/***/ }),

/***/ 98092:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ALIGN: function() { return /* binding */ ALIGN; },\n/* harmony export */   ALL_BORDER: function() { return /* binding */ ALL_BORDER; },\n/* harmony export */   ARROW_KEYS_STEP_MM: function() { return /* binding */ ARROW_KEYS_STEP_MM; },\n/* harmony export */   BACKGROUDCOLOR: function() { return /* binding */ BACKGROUDCOLOR; },\n/* harmony export */   BARCODE: function() { return /* binding */ BARCODE; },\n/* harmony export */   BOLD: function() { return /* binding */ BOLD; },\n/* harmony export */   BORDER: function() { return /* binding */ BORDER; },\n/* harmony export */   BORDER_PROPS: function() { return /* binding */ BORDER_PROPS; },\n/* harmony export */   BORDER_TYPE: function() { return /* binding */ BORDER_TYPE; },\n/* harmony export */   BOTTOM_BORDER: function() { return /* binding */ BOTTOM_BORDER; },\n/* harmony export */   CANNOT_COPY_CONTORLS: function() { return /* binding */ CANNOT_COPY_CONTORLS; },\n/* harmony export */   CANNOT_DELETE_CONTORLS: function() { return /* binding */ CANNOT_DELETE_CONTORLS; },\n/* harmony export */   CANNOT_FORMAT_CONTORLS: function() { return /* binding */ CANNOT_FORMAT_CONTORLS; },\n/* harmony export */   CANNOT_OPERATE_SHAPESALIGN: function() { return /* binding */ CANNOT_OPERATE_SHAPESALIGN; },\n/* harmony export */   CANVAS_PADDING: function() { return /* binding */ CANVAS_PADDING; },\n/* harmony export */   CARD_GRID_TYPE: function() { return /* binding */ CARD_GRID_TYPE; },\n/* harmony export */   CELL_ITEM_NODE_CLASSNAME: function() { return /* binding */ CELL_ITEM_NODE_CLASSNAME; },\n/* harmony export */   CELL_NODE_CLASSNAME: function() { return /* binding */ CELL_NODE_CLASSNAME; },\n/* harmony export */   COLUMN_ID: function() { return /* binding */ COLUMN_ID; },\n/* harmony export */   COLUMN_WIDTH: function() { return /* binding */ COLUMN_WIDTH; },\n/* harmony export */   COMMON_CONTROL_TYPE_MAP: function() { return /* binding */ COMMON_CONTROL_TYPE_MAP; },\n/* harmony export */   CONTAINER_NODE_CLASSNAME: function() { return /* binding */ CONTAINER_NODE_CLASSNAME; },\n/* harmony export */   COPY_GRIDCELL_KEY: function() { return /* binding */ COPY_GRIDCELL_KEY; },\n/* harmony export */   COPY_LOCALSTORAGE_KEY: function() { return /* binding */ COPY_LOCALSTORAGE_KEY; },\n/* harmony export */   DASH_CU: function() { return /* binding */ DASH_CU; },\n/* harmony export */   DASH_XI: function() { return /* binding */ DASH_XI; },\n/* harmony export */   DATAGRID_TYPE: function() { return /* binding */ DATAGRID_TYPE; },\n/* harmony export */   DATASOURCE: function() { return /* binding */ DATASOURCE; },\n/* harmony export */   DEFALUT_PADDING: function() { return /* binding */ DEFALUT_PADDING; },\n/* harmony export */   DEFAULT_ALPHA: function() { return /* binding */ DEFAULT_ALPHA; },\n/* harmony export */   DEFAULT_BACKGROUND_COLOR: function() { return /* binding */ DEFAULT_BACKGROUND_COLOR; },\n/* harmony export */   DEFAULT_BORDER_COLOR: function() { return /* binding */ DEFAULT_BORDER_COLOR; },\n/* harmony export */   DEFAULT_FONT_COLOR: function() { return /* binding */ DEFAULT_FONT_COLOR; },\n/* harmony export */   DEFAULT_FONT_SIZE: function() { return /* binding */ DEFAULT_FONT_SIZE; },\n/* harmony export */   DEFAULT_HOVER_BORDER_COLOR: function() { return /* binding */ DEFAULT_HOVER_BORDER_COLOR; },\n/* harmony export */   DEFAULT_LETTER_SPACING: function() { return /* binding */ DEFAULT_LETTER_SPACING; },\n/* harmony export */   DEFAULT_LINE_COLOR: function() { return /* binding */ DEFAULT_LINE_COLOR; },\n/* harmony export */   DEFAULT_NONOE_BORDER_COLOR: function() { return /* binding */ DEFAULT_NONOE_BORDER_COLOR; },\n/* harmony export */   DEFAULT_PERFECTDRAWENABLED: function() { return /* binding */ DEFAULT_PERFECTDRAWENABLED; },\n/* harmony export */   DEFAULT_TOOL_BORDER_COLOR: function() { return /* binding */ DEFAULT_TOOL_BORDER_COLOR; },\n/* harmony export */   DEFAULT_TRANSFORMER_BORDER_COLOR: function() { return /* binding */ DEFAULT_TRANSFORMER_BORDER_COLOR; },\n/* harmony export */   DEFUALT_BORDER_DATA: function() { return /* binding */ DEFUALT_BORDER_DATA; },\n/* harmony export */   EMPTY_CELL_TEXT: function() { return /* binding */ EMPTY_CELL_TEXT; },\n/* harmony export */   FONTCOLOR: function() { return /* binding */ FONTCOLOR; },\n/* harmony export */   FONTNAME: function() { return /* binding */ FONTNAME; },\n/* harmony export */   FONTSIZE: function() { return /* binding */ FONTSIZE; },\n/* harmony export */   FONT_FAMILY_MAP: function() { return /* binding */ FONT_FAMILY_MAP; },\n/* harmony export */   FOOTER: function() { return /* binding */ FOOTER; },\n/* harmony export */   FORMAT_PROP_LIST: function() { return /* binding */ FORMAT_PROP_LIST; },\n/* harmony export */   GRID_BORDER_TYPE: function() { return /* binding */ GRID_BORDER_TYPE; },\n/* harmony export */   GRID_COLUMN_MIN_SIZE: function() { return /* binding */ GRID_COLUMN_MIN_SIZE; },\n/* harmony export */   GRID_COLUMN_TYPES: function() { return /* binding */ GRID_COLUMN_TYPES; },\n/* harmony export */   GRID_EDITOR_STATE: function() { return /* binding */ GRID_EDITOR_STATE; },\n/* harmony export */   GRID_LIST_TYPE: function() { return /* binding */ GRID_LIST_TYPE; },\n/* harmony export */   GRID_NAME: function() { return /* binding */ GRID_NAME; },\n/* harmony export */   GRID_NORMAL_STATE: function() { return /* binding */ GRID_NORMAL_STATE; },\n/* harmony export */   GRID_RELATIVE_TYPES: function() { return /* binding */ GRID_RELATIVE_TYPES; },\n/* harmony export */   GRID_ROW_MIN_SIZE: function() { return /* binding */ GRID_ROW_MIN_SIZE; },\n/* harmony export */   GRID_ROW_TYPES: function() { return /* binding */ GRID_ROW_TYPES; },\n/* harmony export */   GRID_SELECT_STATE: function() { return /* binding */ GRID_SELECT_STATE; },\n/* harmony export */   GRID_TEMPLATE_TYPE: function() { return /* binding */ GRID_TEMPLATE_TYPE; },\n/* harmony export */   GRID_TYPES: function() { return /* binding */ GRID_TYPES; },\n/* harmony export */   HEADER: function() { return /* binding */ HEADER; },\n/* harmony export */   HEIGHT: function() { return /* binding */ HEIGHT; },\n/* harmony export */   HORIZONTAL: function() { return /* binding */ HORIZONTAL; },\n/* harmony export */   HOVER_NODE_CLASSNAME: function() { return /* binding */ HOVER_NODE_CLASSNAME; },\n/* harmony export */   ID: function() { return /* binding */ ID; },\n/* harmony export */   IDENTITY_CELL_PROP: function() { return /* binding */ IDENTITY_CELL_PROP; },\n/* harmony export */   IDENTITY_ITEM_PROP: function() { return /* binding */ IDENTITY_ITEM_PROP; },\n/* harmony export */   INNER_BORDER: function() { return /* binding */ INNER_BORDER; },\n/* harmony export */   INPUT_QUERY_UPDATE_TYPE: function() { return /* binding */ INPUT_QUERY_UPDATE_TYPE; },\n/* harmony export */   INSTALL_FONT_FAMILY_MAP: function() { return /* binding */ INSTALL_FONT_FAMILY_MAP; },\n/* harmony export */   ITALIC: function() { return /* binding */ ITALIC; },\n/* harmony export */   KD_ACCOUNT_KEY: function() { return /* binding */ KD_ACCOUNT_KEY; },\n/* harmony export */   KEY: function() { return /* binding */ KEY; },\n/* harmony export */   LEFT_BORDER: function() { return /* binding */ LEFT_BORDER; },\n/* harmony export */   LINE: function() { return /* binding */ LINE; },\n/* harmony export */   LINE_CU: function() { return /* binding */ LINE_CU; },\n/* harmony export */   LINE_HEIGHT: function() { return /* binding */ LINE_HEIGHT; },\n/* harmony export */   LINE_JIACU: function() { return /* binding */ LINE_JIACU; },\n/* harmony export */   LINE_NORMAL: function() { return /* binding */ LINE_NORMAL; },\n/* harmony export */   MAX_LINE_HEIGHT_MM: function() { return /* binding */ MAX_LINE_HEIGHT_MM; },\n/* harmony export */   MERGE_CELL_PROP_LIST: function() { return /* binding */ MERGE_CELL_PROP_LIST; },\n/* harmony export */   MIN_SHAPE_SIZE_PROP: function() { return /* binding */ MIN_SHAPE_SIZE_PROP; },\n/* harmony export */   NAVTOOL_SELECT_ICON: function() { return /* binding */ NAVTOOL_SELECT_ICON; },\n/* harmony export */   NONE_BORDER: function() { return /* binding */ NONE_BORDER; },\n/* harmony export */   NONE_BORDER_DATA: function() { return /* binding */ NONE_BORDER_DATA; },\n/* harmony export */   NORMAL_NODE_CLASSNAME: function() { return /* binding */ NORMAL_NODE_CLASSNAME; },\n/* harmony export */   NOT_CACHE_CLASSNAME: function() { return /* binding */ NOT_CACHE_CLASSNAME; },\n/* harmony export */   NOT_REF_TYPES: function() { return /* binding */ NOT_REF_TYPES; },\n/* harmony export */   OUT_BORDER: function() { return /* binding */ OUT_BORDER; },\n/* harmony export */   OUT_BORDER_BLOD: function() { return /* binding */ OUT_BORDER_BLOD; },\n/* harmony export */   OUT_BORDER_PROPS: function() { return /* binding */ OUT_BORDER_PROPS; },\n/* harmony export */   PRECISION: function() { return /* binding */ PRECISION; },\n/* harmony export */   QR_CODE: function() { return /* binding */ QR_CODE; },\n/* harmony export */   QR_CODE_IMAGE: function() { return /* binding */ QR_CODE_IMAGE; },\n/* harmony export */   QR_CODE_RATIO: function() { return /* binding */ QR_CODE_RATIO; },\n/* harmony export */   REDUNDANCY_TEXT_HEIGHT: function() { return /* binding */ REDUNDANCY_TEXT_HEIGHT; },\n/* harmony export */   RIGHT_BORDER: function() { return /* binding */ RIGHT_BORDER; },\n/* harmony export */   ROTATE: function() { return /* binding */ ROTATE; },\n/* harmony export */   ROW_HEIGHT: function() { return /* binding */ ROW_HEIGHT; },\n/* harmony export */   ROW_ID: function() { return /* binding */ ROW_ID; },\n/* harmony export */   ROW_TYPE_DETAIL: function() { return /* binding */ ROW_TYPE_DETAIL; },\n/* harmony export */   ROW_TYPE_GROUP: function() { return /* binding */ ROW_TYPE_GROUP; },\n/* harmony export */   ROW_TYPE_LAYOUT: function() { return /* binding */ ROW_TYPE_LAYOUT; },\n/* harmony export */   ROW_TYPE_NORMAL: function() { return /* binding */ ROW_TYPE_NORMAL; },\n/* harmony export */   ROW_TYPE_STATISTIC: function() { return /* binding */ ROW_TYPE_STATISTIC; },\n/* harmony export */   RULER_FONT_COLOR: function() { return /* binding */ RULER_FONT_COLOR; },\n/* harmony export */   RULER_REDUNDANCY: function() { return /* binding */ RULER_REDUNDANCY; },\n/* harmony export */   RULER_WIDTH: function() { return /* binding */ RULER_WIDTH; },\n/* harmony export */   SCALE_NODE_CLASSNAME: function() { return /* binding */ SCALE_NODE_CLASSNAME; },\n/* harmony export */   SHAPE_ALIGN_BOTTOM: function() { return /* binding */ SHAPE_ALIGN_BOTTOM; },\n/* harmony export */   SHAPE_ALIGN_CENTER: function() { return /* binding */ SHAPE_ALIGN_CENTER; },\n/* harmony export */   SHAPE_ALIGN_HORIZONTAL_CENTER: function() { return /* binding */ SHAPE_ALIGN_HORIZONTAL_CENTER; },\n/* harmony export */   SHAPE_ALIGN_HORIZONTAL_DISTRIBUTION: function() { return /* binding */ SHAPE_ALIGN_HORIZONTAL_DISTRIBUTION; },\n/* harmony export */   SHAPE_ALIGN_LEFT: function() { return /* binding */ SHAPE_ALIGN_LEFT; },\n/* harmony export */   SHAPE_ALIGN_RIGHT: function() { return /* binding */ SHAPE_ALIGN_RIGHT; },\n/* harmony export */   SHAPE_ALIGN_TOP: function() { return /* binding */ SHAPE_ALIGN_TOP; },\n/* harmony export */   SHAPE_ALIGN_VERTICAL_CENTER: function() { return /* binding */ SHAPE_ALIGN_VERTICAL_CENTER; },\n/* harmony export */   SHAPE_ALIGN_VERTICAL_DISTRIBUTION: function() { return /* binding */ SHAPE_ALIGN_VERTICAL_DISTRIBUTION; },\n/* harmony export */   SPECIAL_BORDER_TYPES: function() { return /* binding */ SPECIAL_BORDER_TYPES; },\n/* harmony export */   STRIKE: function() { return /* binding */ STRIKE; },\n/* harmony export */   SUBDATAGRID: function() { return /* binding */ SUBDATAGRID; },\n/* harmony export */   SUB_GRID_RELATIVE_TYPES: function() { return /* binding */ SUB_GRID_RELATIVE_TYPES; },\n/* harmony export */   SUB_GRID_TYPE: function() { return /* binding */ SUB_GRID_TYPE; },\n/* harmony export */   TABLE_TAIL: function() { return /* binding */ TABLE_TAIL; },\n/* harmony export */   TEXT_NODE_CLASSNAME: function() { return /* binding */ TEXT_NODE_CLASSNAME; },\n/* harmony export */   TEXT_WRAP_TYPE: function() { return /* binding */ TEXT_WRAP_TYPE; },\n/* harmony export */   TOP_BORDER: function() { return /* binding */ TOP_BORDER; },\n/* harmony export */   TRANSPARENT_STROKE_COLOR: function() { return /* binding */ TRANSPARENT_STROKE_COLOR; },\n/* harmony export */   TWO_DECIMAL: function() { return /* binding */ TWO_DECIMAL; },\n/* harmony export */   UNDERLINE: function() { return /* binding */ UNDERLINE; },\n/* harmony export */   VERTICAL: function() { return /* binding */ VERTICAL; },\n/* harmony export */   VERTICAL_ALIGN: function() { return /* binding */ VERTICAL_ALIGN; },\n/* harmony export */   WIDTH: function() { return /* binding */ WIDTH; },\n/* harmony export */   X: function() { return /* binding */ X; },\n/* harmony export */   Y: function() { return /* binding */ Y; },\n/* harmony export */   getFontFamily: function() { return /* binding */ getFontFamily; },\n/* harmony export */   makeFontFamily: function() { return /* binding */ makeFontFamily; },\n/* harmony export */   setConstantFontName: function() { return /* binding */ setConstantFontName; },\n/* harmony export */   setFontNameMap: function() { return /* binding */ setFontNameMap; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n\n\n\n\n\n\n\n\n\nvar _context, _context3, _context5, _context6, _context7, _context8;\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context10 = ownKeys(Object(t))).call(_context10, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\nvar CONTAINER_NODE_CLASSNAME = 'container_node_cls';\nvar SCALE_NODE_CLASSNAME = 'scale_node_cls';\nvar NORMAL_NODE_CLASSNAME = 'normal_node_cls';\nvar HOVER_NODE_CLASSNAME = 'hover_node_cls';\nvar TEXT_NODE_CLASSNAME = 'text_node_cls';\nvar CELL_NODE_CLASSNAME = 'cell_node_cls';\nvar NOT_CACHE_CLASSNAME = 'not_cache_node_cls';\n// TODO:\n// 这里单元格子控件是否采用name来标识还是父子节点关系 ?\nvar CELL_ITEM_NODE_CLASSNAME = 'cell_item_node_cls';\n// export const TYPE = 'T'\nvar RULER_WIDTH = 17;\nvar RULER_REDUNDANCY = 20;\nvar ALIGN = 'horAlignment';\nvar LINE_HEIGHT = 'lineSpace';\nvar VERTICAL_ALIGN = 'verAlignment';\nvar FONTNAME = 'fontName';\nvar FONTSIZE = 'fontSize';\nvar BOLD = 'bold';\nvar ITALIC = 'italic';\nvar UNDERLINE = 'underLine';\nvar STRIKE = 'strike';\nvar FONTCOLOR = 'foreColor';\nvar BACKGROUDCOLOR = 'backColor';\n// SPECAIL\nvar BORDER = 'border';\nvar ROTATE = 'rotate';\nvar DATASOURCE = 'dataSource';\nvar SHAPE_ALIGN_LEFT = 'left';\nvar SHAPE_ALIGN_RIGHT = 'right';\nvar SHAPE_ALIGN_CENTER = 'center';\nvar SHAPE_ALIGN_BOTTOM = 'bottom';\nvar SHAPE_ALIGN_TOP = 'top';\nvar SHAPE_ALIGN_VERTICAL_CENTER = 'vertical_center';\nvar SHAPE_ALIGN_HORIZONTAL_CENTER = 'horizontal_center';\nvar SHAPE_ALIGN_HORIZONTAL_DISTRIBUTION = 'horizontal_distribution';\nvar SHAPE_ALIGN_VERTICAL_DISTRIBUTION = 'vertical_distribution';\nvar X = 'x';\nvar Y = 'y';\nvar WIDTH = 'width';\nvar HEIGHT = 'height';\nvar ID = 'id';\nvar KEY = 'key';\nvar FORMAT_PROP_LIST = [\n// 那些属性可以被格式刷\nALIGN, VERTICAL_ALIGN, FONTNAME, FONTSIZE, BOLD, ITALIC, UNDERLINE, FONTCOLOR, BACKGROUDCOLOR, BORDER, STRIKE, LINE_HEIGHT];\n// 合并单元格之后，如果左上角为空，遇到有值的需要把属性也带上\n// 排除 BACKGROUDCOLOR BORDER\nvar MERGE_CELL_PROP_LIST = [BOLD, FONTSIZE, FONTNAME, ALIGN, VERTICAL_ALIGN, UNDERLINE, FONTCOLOR, BACKGROUDCOLOR, ITALIC, STRIKE, LINE_HEIGHT];\n\n// export const DEFAULT_BORDER_COLOR = '#B2B2B2'\nvar DEFAULT_FONT_COLOR = '#000000';\nvar DEFAULT_BACKGROUND_COLOR = '#ffffff';\nvar DEFAULT_NONOE_BORDER_COLOR = '#B2B2B2';\nvar DEFAULT_BORDER_COLOR = '#666666';\nvar DEFAULT_HOVER_BORDER_COLOR = '#5582F3';\nvar DEFAULT_TRANSFORMER_BORDER_COLOR = '#0E5FD8';\nvar BORDER_PROPS = ['top', 'bottom', 'left', 'right', 'inner'];\nvar OUT_BORDER_PROPS = ['top', 'bottom', 'left', 'right'];\nvar DEFUALT_BORDER_DATA = {\n  color: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(BORDER_PROPS).call(BORDER_PROPS, function (res, prop) {\n    res[prop] = '';\n    return res;\n  }, {}),\n  width: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(BORDER_PROPS).call(BORDER_PROPS, function (res, prop) {\n    res[prop] = 0;\n    return res;\n  }, {}),\n  style: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(BORDER_PROPS).call(BORDER_PROPS, function (res, prop) {\n    res[prop] = '';\n    return res;\n  }, {})\n};\nvar NONE_BORDER_DATA = {\n  width: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(BORDER_PROPS).call(BORDER_PROPS, function (res, prop) {\n    res[prop] = 0;\n    return res;\n  }, {})\n};\nvar GRID_NORMAL_STATE = '1';\nvar GRID_SELECT_STATE = '2';\nvar GRID_EDITOR_STATE = '3';\nvar GRID_NAME = 'grid';\nvar DEFAULT_ALPHA = 1;\nvar SUB_GRID_TYPE = 'SubDataGrid';\nvar TABLE_TAIL = 'TableTail';\nvar DATAGRID_TYPE = 'DataGrid';\nvar CARD_GRID_TYPE = 'CardGrid';\nvar GRID_TYPES = ['DataGrid', 'LayoutGrid', SUB_GRID_TYPE, 'CardGrid'];\nvar GRID_ROW_TYPES = ['DataRow'];\nvar GRID_COLUMN_TYPES = ['DataColumn'];\nvar GRID_RELATIVE_TYPES = ['DataCell', 'LayoutCell'];\nvar SUB_GRID_RELATIVE_TYPES = ['SubDataCell'];\nvar GRID_LIST_TYPE = 'list';\nvar GRID_TEMPLATE_TYPE = 'template';\nvar ROW_TYPE_DETAIL = 'Detail';\nvar ROW_TYPE_NORMAL = 'Normal';\nvar ROW_TYPE_STATISTIC = 'Statistic';\nvar ROW_TYPE_LAYOUT = 'Layout';\nvar ROW_TYPE_GROUP = 'Group';\nvar EMPTY_CELL_TEXT = {\n  bindField: '',\n  bindText: '',\n  viewText: '',\n  dataSource: '',\n  dsType: '',\n  formulaData: null\n};\nvar PARENTID = 'parentId';\nvar IDENTITY_ITEM_PROP = [ID, KEY, PARENTID];\nvar ROW_ID = 'rowId';\nvar COLUMN_ID = 'columnId';\nvar IDENTITY_CELL_PROP = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context = []).call(_context, IDENTITY_ITEM_PROP, [ROW_ID, COLUMN_ID, BORDER]);\nvar RULER_FONT_COLOR = '#999999';\nvar GRID_ROW_MIN_SIZE = 3;\nvar GRID_COLUMN_MIN_SIZE = 5;\nvar DEFALUT_PADDING = {\n  left: 0,\n  right: 0,\n  top: 0,\n  bottom: 0\n};\nvar DEFAULT_PERFECTDRAWENABLED = false;\nvar BORDER_TYPE = 'borderType';\nvar GRID_BORDER_TYPE = 'borderType';\n// 精度，几位小数\nvar PRECISION = 1;\nvar TWO_DECIMAL = 2;\nvar INNER_BORDER = 'innerBorder';\nvar OUT_BORDER = 'outBorder';\nvar OUT_BORDER_BLOD = 'outBorderBlod';\nvar ALL_BORDER = 'allBorder';\nvar NONE_BORDER = 'noneBorder';\nvar LEFT_BORDER = 'left';\nvar TOP_BORDER = 'top';\nvar RIGHT_BORDER = 'right';\nvar BOTTOM_BORDER = 'bottom';\n\n// 废弃\nvar SPECIAL_BORDER_TYPES = [ALL_BORDER, OUT_BORDER, INNER_BORDER];\nvar ROW_HEIGHT = 'rowHeight';\nvar COLUMN_WIDTH = 'columnWidth';\nvar CANVAS_PADDING = 10;\nvar INPUT_QUERY_UPDATE_TYPE = 'input-query';\nvar BACKUP_FONT_FAMILY = 'arial, sans-serif';\nvar makeFontFamily = function makeFontFamily(fontFamily) {\n  var _context2;\n  return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context2 = \"\".concat(fontFamily, \", \")).call(_context2, BACKUP_FONT_FAMILY);\n};\nvar INSTALL_FONT_FAMILY_MAP = {\n  思源宋体: ['SourceHanSerifSC-Regular', 'otf'],\n  思源黑体: ['SourceHanSansSC-Regular', 'otf'],\n  方正细圆简体: ['FZXiYuan-M01S', 'ttf'],\n  方正兰亭黑简体: ['FZLanTingHeiS-R-GB', 'ttf'],\n  阿里巴巴普惠体: ['Alibaba-PuHuiTi-Regular', 'otf']\n};\nvar FONT_FAMILY_MAP = _objectSpread({}, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(INSTALL_FONT_FAMILY_MAP)).call(_context3, function (res, font) {\n  var _INSTALL_FONT_FAMILY_ = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(INSTALL_FONT_FAMILY_MAP[font], 1),\n    fontName = _INSTALL_FONT_FAMILY_[0];\n  res[font] = makeFontFamily(fontName);\n  return res;\n}, {}));\n\n// const FONT_FAMILY_SET = []\n\n// export const set\n// 根据后端来\nvar CONSTANT_FONT_NAME = '思源宋体 CN';\nvar setConstantFontName = function setConstantFontName(fontName) {\n  if (CONSTANT_FONT_NAME !== fontName) {\n    CONSTANT_FONT_NAME = fontName;\n  }\n};\nvar FONT_FAMILY_NAME_CODE_MAP = {};\nvar setFontNameMap = function setFontNameMap(map) {\n  if (FONT_FAMILY_NAME_CODE_MAP !== map) {\n    FONT_FAMILY_NAME_CODE_MAP = map;\n  }\n};\nvar getFontFamily = function getFontFamily(fontName) {\n  var _context4;\n  // 宋体是第一备选字体\n  // || fontName去除，是因为fontMapping会把自定义也返回，为了处理删除自定义情况显示默认情况，所以这里这样处理\n  var definedFontName = FONT_FAMILY_NAME_CODE_MAP[fontName];\n  return makeFontFamily(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context4 = \"\".concat((definedFontName || '') + (definedFontName ? ', ' : ''))).call(_context4, CONSTANT_FONT_NAME));\n  // return FONT_FAMILY_MAP[key] || FONT_FAMILY_MAP.思源宋体\n};\n\n// px\nvar REDUNDANCY_TEXT_HEIGHT = 10;\nvar HEADER = 'Header';\nvar FOOTER = 'Footer';\nvar SUBDATAGRID = 'SubDataGrid';\nvar LINE = 'Line';\nvar BARCODE = 'Barcode';\nvar QR_CODE = 'QRCode';\nvar CANNOT_COPY_CONTORLS = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context5 = [HEADER, FOOTER, SUBDATAGRID]).call(_context5, GRID_RELATIVE_TYPES, [TABLE_TAIL]);\nvar CANNOT_OPERATE_SHAPESALIGN = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context6 = [HEADER, FOOTER, SUBDATAGRID]).call(_context6, GRID_RELATIVE_TYPES);\n\n// 不能使用格式刷的控件\nvar CANNOT_FORMAT_CONTORLS = [HEADER, FOOTER, SUBDATAGRID];\nvar CANNOT_DELETE_CONTORLS = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context7 = []).call(_context7, GRID_RELATIVE_TYPES);\nvar NAVTOOL_SELECT_ICON = 'arrow-down';\nvar NOT_REF_TYPES = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context8 = []).call(_context8, GRID_RELATIVE_TYPES);\n\n// 字体\nvar DEFAULT_FONT_SIZE = 12;\nvar LINE_NORMAL = '.5';\nvar LINE_CU = '1';\nvar LINE_JIACU = '2';\nvar DEFAULT_TOOL_BORDER_COLOR = '#000000';\nvar DEFAULT_LETTER_SPACING = 0;\nvar TRANSPARENT_STROKE_COLOR = '#fff';\nvar ARROW_KEYS_STEP_MM = 1;\nvar COPY_LOCALSTORAGE_KEY = 'cq-print-designer-copy';\nvar COPY_GRIDCELL_KEY = 'cq-print-designer-gridcell-copy';\nvar MIN_SHAPE_SIZE_PROP = 0.1; // 为了transform问题(宽高不能为0，不然会导致NaN)而设置\n\n// 0:按文字换行 1:自动换行 3:不换行 2:溢出显示\n// 2024 0724产品要求按char换行; konva只有两种换行方式\nvar TEXT_WRAP_TYPE = ['char', 'char', 'char', 'none'];\nvar HORIZONTAL = 'H';\nvar VERTICAL = 'V';\nvar DEFAULT_LINE_COLOR = '#000';\nvar DASH_CU = 'dotted';\nvar DASH_XI = 'dashed';\nvar COMMON_CONTROL_TYPE_MAP = {\n  text: 'Text',\n  richText: 'RichText'\n};\nvar KD_ACCOUNT_KEY = 'kdcdc';\n\n// 限制直线最大宽度为3mm\nvar MAX_LINE_HEIGHT_MM = 3;\nvar ratio417 = 66 / 130;\nvar QR_CODE_RATIO = {\n  QR_CODE: 1,\n  PDF417: ratio417,\n  Truncated_PDF417: ratio417,\n  MicroPDF417: ratio417,\n  Data_Matrix: 1,\n  GS1_Data_Matrix: 1\n};\nvar QR_CODE_IMAGE = {\n  QR_CODE: 'QRCode',\n  PDF417: 'PDF417',\n  Truncated_PDF417: 'PDF417',\n  MicroPDF417: 'PDF417',\n  Data_Matrix: 'DataMatrix',\n  GS1_Data_Matrix: 'DataMatrix'\n};\n\n//# sourceURL=webpack://print-designer/./src/constants/index.ts?");

/***/ }),

/***/ 84945:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CanvasSelectContext: function() { return /* binding */ CanvasSelectContext; },\n/* harmony export */   DataGridContext: function() { return /* binding */ DataGridContext; },\n/* harmony export */   LeftViewContext: function() { return /* binding */ LeftViewContext; },\n/* harmony export */   PrintDesignerContext: function() { return /* binding */ PrintDesignerContext; },\n/* harmony export */   PrintRootContext: function() { return /* binding */ PrintRootContext; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar PrintRootContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);\nPrintRootContext.displayName = 'PrintRootContext';\nvar PrintDesignerContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);\nPrintDesignerContext.displayName = 'PrintDesignerContext';\nvar LeftViewContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});\nPrintDesignerContext.displayName = 'DataSourceViewContext';\n\nvar DataGridContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});\nDataGridContext.displayName = 'DataGridContext';\n\nvar CanvasSelectContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});\nCanvasSelectContext.displayName = 'CanvasSelectContext';\n\n\n//# sourceURL=webpack://print-designer/./src/context/index.tsx?");

/***/ }),

/***/ 54620:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* binding */ InputQuery; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _inputQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27136);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77620);\n\n\n\n\n\nvar InputQuery = function InputQuery(props) {\n  var _props$editor;\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (definition) {\n    definition = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(definition).call(definition, function (def) {\n      return def.DsType !== 'Sys';\n    });\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__.filterTreeByOmitType)(definition, 'Image');\n  }, []);\n  var filterExpressionTreeData = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (definition) {\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__.filterTreeByOmitType)(definition, 'Image');\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_inputQuery__WEBPACK_IMPORTED_MODULE_3__.InputQuery, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n    filterTreeData: filterTreeData,\n    filterExpressionTreeData: filterExpressionTreeData,\n    modalType: (props === null || props === void 0 || (_props$editor = props.editor) === null || _props$editor === void 0 ? void 0 : _props$editor.SupportFx) && 'expression'\n  }));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/barcode/index.tsx?");

/***/ }),

/***/ 16188:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* binding */ InputQuery; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(84945);\n/* harmony import */ var _inputQuery__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(27136);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(32064);\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context8 = ownKeys(Object(t), !0)).call(_context8, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context9 = ownKeys(Object(t))).call(_context9, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\nvar dsTypeMap = {\n  // Statistic: ['Sys', 'Entry', 'Approveline', 'Approveactivit', 'Attach'], // 合计行不做限制\n  // Detail: ['Entry', 'Approveline', 'Workflow', 'Attach', 'Custom'], // 数据行\n  Normal: ['Sys', 'Head', 'Import', 'Main'] // 标题行\n};\nvar InputQuery = function InputQuery(props) {\n  var _context, _context2, _context3;\n  var Name = props.Name,\n    id = props.id,\n    propName = props.propName,\n    DataSourceInfo = props.DataSourceInfo,\n    dataContext = props.dataContext,\n    RelationKey = props.RelationKey,\n    RelationViewText = props.RelationViewText,\n    RelationDataSource = props.RelationDataSource,\n    value = props.value,\n    field = props.field,\n    className = props.className;\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('datacell------', props);\n  var errorRef = (0,react__WEBPACK_IMPORTED_MODULE_13__.useRef)(null);\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_13__.useContext)(_context__WEBPACK_IMPORTED_MODULE_16__.PrintDesignerContext);\n  var statType = field.statType || '';\n  var dsType = field.dsType,\n    cellType = field.cellType;\n  var isFormulaMode = dsType === 'Formula';\n  var parentControl = dataContext.findControl(field.parentId);\n  var parentId = parentControl.id,\n    parentDataSource = parentControl.dataSource,\n    parentType = parentControl.type;\n  var dataSourceFilter = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(_context = ['Detail', 'Group']).call(_context, cellType) ? parentDataSource : '';\n  var dataSourceKey = dataSourceFilter.replace(/^(\\S+\\.)?(\\S+)$/g, '$2');\n  var expandedKeys = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = ['Detail', 'Group']).call(_context2, cellType) ? [_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context3 = \"\".concat(parentDataSource, \"-\")).call(_context3, dataSourceKey)] : [];\n  var meta = context.meta,\n    definition = context.definition;\n  var prefixCls = 'left-datasource';\n  var modalType = parentType === 'SubDataGrid' && cellType === 'Detail' ? null : 'expression';\n  var handleChange = function handleChange(val, showErrorDiv) {\n    if (val !== value) {\n      if (isFormulaMode) {\n        return dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, val), \"viewText\", ''))]]));\n      }\n      var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.isBindFieldMode)(value),\n        isBindField = _isBindFieldMode.isBindField,\n        bindField = _isBindFieldMode.bindField;\n      if (isBindField) {\n        var _context4;\n        // 由于基础资料也是用.连接, 所以不能用.分割\n        // 需要模式匹配\n        var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.queryDataSourceAndAncestorByName)(bindField, definition);\n        if (!res) {\n          showErrorDiv(true);\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, val), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationKey), ''), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationDataSource), ''), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationViewText), ''), \"dsType\", ''))]]));\n          designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.error('queryDataSourceAndAncestorByName has no res', bindField, definition);\n          return;\n        }\n        showErrorDiv(false);\n        var dataSource = res.dataSource,\n          key = res.key,\n          viewText = res.viewText,\n          dataSourceText = res.dataSourceText,\n          _dsType = res.dsType;\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('bindField, definition, res');\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log(bindField, definition, res);\n        // TODO: 先暂时兼容for 演示\n        var asignProp = cellType === 'Statistic' ? (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationViewText), _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context4 = \"=\".concat(statType, \"(\")).call(_context4, viewText, \")\")) : (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationViewText), \"=$\".concat(viewText));\n        var batchUpdateValue;\n        if (DataSourceInfo) {\n          batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, val), DataSourceInfo, ''))]];\n        } else {\n          batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, val), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationKey), key), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationDataSource), dataSource), \"dsType\", _dsType), asignProp))]];\n        }\n        if (!parentDataSource) {\n          batchUpdateValue.push([parentId, {\n            dataSource: dataSource,\n            dataSourceText: dataSourceText\n          }]);\n        }\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)(batchUpdateValue));\n      } else {\n        showErrorDiv(false);\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, val)]]));\n      }\n    }\n  };\n  var onExpressionSelect = function onExpressionSelect(setVisible, data) {\n    if (!data) {\n      var args = {\n        bindField: '',\n        bindText: '',\n        dataSource: '',\n        dsType: '',\n        formulaData: [],\n        viewText: ''\n      };\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, args]]));\n    } else if (data.curTab === '2') {\n      var formulaData = data.formulaData;\n      var updateValues = isFormulaMode ? {\n        formulaData: formulaData\n      } : (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0003')), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationKey), ''), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationDataSource), ''), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationViewText), ''), \"dsType\", 'Formula'), \"formulaData\", formulaData);\n      var _args;\n      if (!(formulaData !== null && formulaData !== void 0 && formulaData[0]) && (formulaData === null || formulaData === void 0 ? void 0 : formulaData.length) === 1) {\n        _args = _objectSpread(_objectSpread({}, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)(updateValues)), {}, {\n          bindText: '',\n          dsType: ''\n        });\n      } else {\n        _args = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)(updateValues);\n      }\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, _args]]));\n    } else {\n      var node = data.selectNode;\n      onSelectNode(node);\n    }\n    setVisible(false);\n  };\n  var onSelectNode = function onSelectNode(node) {\n    var _context5;\n    var key = node.key,\n      _node$InitAttr = node.InitAttr,\n      InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr;\n    var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.queryDataSourceAndAncestorByKey)(key, definition);\n    if (!res) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n      return;\n    }\n    var dataSource = res.dataSource,\n      ancestorTitle = res.ancestorTitle,\n      relationKey = res.key,\n      title = res.title,\n      dsType = res.dsType,\n      IgnoreZero = res.IgnoreZero,\n      IgnoreTailZero = res.IgnoreTailZero;\n    var propValue = \"=$\".concat(ancestorTitle);\n    var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_context5 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_8___default()(InitAttr)).call(_context5, function (prop, key) {\n      prop[lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(key)] = InitAttr[key];\n      return prop;\n    }, {});\n    asignProp.ignoreZero = IgnoreZero;\n    asignProp.ignoreTailZero = IgnoreTailZero;\n    var batchUpdateValue;\n    if (DataSourceInfo) {\n      var _context6;\n      batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, propValue), DataSourceInfo, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationKey), relationKey), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationDataSource), dataSource), \"viewText\", cellType === 'Statistic' && statType !== 'noStat' ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context6 = \"=\".concat(statType, \"(\")).call(_context6, title, \")\") : \"=$\".concat(title)), \"dsType\", dsType), asignProp))))]];\n    } else {\n      var _context7;\n      batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_18__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, propName, propValue), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationKey), relationKey), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationDataSource), dataSource), \"viewText\", cellType === 'Statistic' && statType !== 'noStat' ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context7 = \"=\".concat(statType, \"(\")).call(_context7, title, \")\") : \"=$\".concat(title)), \"dsType\", dsType), asignProp))]];\n    }\n    if (!parentDataSource) {\n      batchUpdateValue.push([parentId, {\n        dataSource: dataSource,\n        dataSourceText: propValue ? propValue.replace(/(\\S+)\\.(\\S+)(\\.\\S+)$/g, '$2') : ''\n      }]);\n    }\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)(batchUpdateValue));\n  };\n  var onDataSourceSelect = function onDataSourceSelect(setVisible, node) {\n    onSelectNode(node);\n    setVisible(false);\n  };\n  // filterTreeData---grid\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_13__.useCallback)(function (definition) {\n    // if (['Detail', 'Group'].includes(cellType)) {\n    //   const dataSourceFilter = ['Detail', 'Group'].includes(cellType) ? parentDataSource : ''\n    //   const dsTypeFilter = dsTypeMap[cellType]\n    //   if (dsTypeFilter) {\n    //     definition = filterTreeByDsType(definition, dsTypeFilter)\n    //   }\n    //   if (dataSourceFilter) {\n    //     // 应该根据DataCell 或者 SubDataCell来比较好?\n    //     definition = isSubDataGrid(parentControl) ? filterSubGridDataSource(definition) : filterGridDataSource(definition)\n    //     // const dataSource = dataSourceFilter.replace(/^(\\S+\\.)?(\\S+)$/g, '$2')\n    //     definition = filterTreeByDataSource(definition, parentDataSource)\n    //   }\n    //   return definition\n    // }\n\n    definition = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (def) {\n      return def.DsType !== 'Sys';\n    });\n    return definition;\n  }, [cellType, parentDataSource, field]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default().createElement(_inputQuery__WEBPACK_IMPORTED_MODULE_17__.InputQuery, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, props, {\n    modalType: modalType,\n    filterTreeData: filterTreeData,\n    expandedKeys: expandedKeys,\n    onSelect: modalType === 'expression' ? onExpressionSelect : onDataSourceSelect,\n    handleInputChange: handleChange\n  }));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/dataCell/index.tsx?");

/***/ }),

/***/ 28852:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   GridCheckBox: function() { return /* binding */ GridCheckBox; },\n/* harmony export */   Query: function() { return /* binding */ Query; },\n/* harmony export */   SortSettings: function() { return /* binding */ SortSettings; },\n/* harmony export */   filterSetting: function() { return /* binding */ filterSetting; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(84945);\n/* harmony import */ var _components_common_gridGuide__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(90588);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(32064);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(21980);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Query = function Query(props) {\n  var _context;\n  var Name = props.Name,\n    id = props.id,\n    dataContext = props.dataContext,\n    value = props.value,\n    field = props.field,\n    className = props.className,\n    selectionContext = props.selectionContext,\n    name = props.Name,\n    nameTips = props.Tips,\n    _props$Editor = props.Editor,\n    Editor = _props$Editor === void 0 ? {} : _props$Editor;\n  var nameHidden = Editor.NameHidden;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState, 2),\n    visible = _useState2[0],\n    setVisible = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)([]),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState3, 2),\n    checkedKeys = _useState4[0],\n    setCheckedKeys = _useState4[1];\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(_context__WEBPACK_IMPORTED_MODULE_21__.PrintDesignerContext);\n  console.log('dataGrid--------props', props);\n  var meta = context.meta,\n    definition = context.definition,\n    setMessage = context.setMessage;\n  var rootId = dataContext.getRootId();\n  var lastSelectedId = lodash__WEBPACK_IMPORTED_MODULE_18___default().last(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context = [rootId]).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(selectionContext.getSelection())));\n  var onSelect = function onSelect(checkedNodes, controlType) {\n    if (controlType === 'CardGrid') {\n      var key = (checkedNodes === null || checkedNodes === void 0 ? void 0 : checkedNodes.key) || [];\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByKey)(key === null || key === void 0 ? void 0 : key[0], definition);\n      if (!res) {\n        console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n        return;\n      }\n      var _dataSource = res.dataSource,\n        dataSourceText = res.dataSourceText,\n        dsType = res.dsType,\n        IgnoreZero = res.IgnoreZero,\n        IgnoreTailZero = res.IgnoreTailZero;\n      var updateValue = [id, {\n        dataSource: _dataSource,\n        dataSourceText: dataSourceText,\n        dsType: dsType,\n        methodName: 'switchDataSource',\n        ignoreZero: IgnoreZero,\n        ignoreTailZero: IgnoreTailZero\n      }];\n      var tableTailId = field.tableTailId;\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createCustomUpdateAction)(updateValue)).then(function () {\n        tableTailId && dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(tableTailId));\n      });\n      setVisible(false);\n      return;\n    }\n    // 删除原先的表格，后添加一个新的\n    var rootControl = dataContext.findControl(rootId);\n    var width = rootControl.width,\n      marginLeft = rootControl.marginLeft,\n      marginRight = rootControl.marginRight;\n    var gridWidth = width - marginLeft - marginRight;\n    var colWidth = gridWidth / checkedNodes.length;\n    if (colWidth < 5) return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0004'));\n    var dataSource = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(checkedNodes).call(checkedNodes, function (node) {\n      var _context2;\n      var key = node.key,\n        _node$InitAttr = node.InitAttr,\n        InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr;\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByKey)(key, definition);\n      if (!res) {\n        console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n        return {};\n      }\n      var dataSource = res.dataSource,\n        ancestorTitle = res.ancestorTitle,\n        relationKey = res.key,\n        title = res.title,\n        dsType = res.dsType,\n        IgnoreZero = res.IgnoreZero,\n        IgnoreTailZero = res.IgnoreTailZero;\n      var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(InitAttr)).call(_context2, function (prop, key) {\n        prop[lodash__WEBPACK_IMPORTED_MODULE_18___default().camelCase(key)] = InitAttr[key];\n        return prop;\n      }, {});\n      asignProp.ignoreZero = IgnoreZero;\n      asignProp.ignoreTailZero = IgnoreTailZero;\n      return _objectSpread({\n        bindText: \"=$\".concat(ancestorTitle),\n        bindField: relationKey,\n        dataSource: dataSource,\n        viewText: \"=$\".concat(title),\n        dsType: dsType\n      }, asignProp);\n    });\n    var isArrayEqual = function isArrayEqual(arr1, arr2) {\n      return arr1.join('') === arr2.join('');\n    };\n    var keys = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(dataSource).call(dataSource, function (item) {\n      return (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.createDataSourceNodeKey)(item.dataSource, item.bindField);\n    });\n    var isEqual = isArrayEqual(keys, checkedKeys);\n    if (!isEqual) {\n      selectionContext.setSelect([]);\n      var _tableTailId = field.tableTailId;\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createCustomUpdateAction)([id, {\n        dataSource: dataSource\n      }])).then(function (actions) {\n        _tableTailId && dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(_tableTailId));\n        var realNewControlData = actions[1].value;\n        selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default()(realNewControlData) ? [realNewControlData[0].id] : [realNewControlData.id]);\n      });\n    }\n    setVisible(false);\n  };\n  var handleShowDataSource = function handleShowDataSource() {\n    var _context3;\n    var gridId = field.id;\n    var dataCells = dataContext.findControlByCondition(function (item) {\n      return item.parentId === gridId && item.cellType === 'Detail';\n    });\n    var checkedKeys = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(dataCells).call(dataCells, function (cell) {\n      var key = cell.bindField,\n        dataSource = cell.dataSource;\n      return (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.createDataSourceNodeKey)(dataSource, key);\n    })).call(_context3, Boolean);\n    setCheckedKeys(checkedKeys);\n    console.log('dataCells----------', checkedKeys);\n    setVisible(true);\n  };\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: nameTips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query\"),\n    onClick: handleShowDataSource\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_19___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !value)])\n  }, value || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0008')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: 'pointer'\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_components_common_gridGuide__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n    activedSelectId: id,\n    meta: meta,\n    definition: definition,\n    visible: visible,\n    onCancel: function onCancel() {\n      return setVisible(false);\n    },\n    onSelect: onSelect,\n    checkedKeys: checkedKeys,\n    controlType: field.type,\n    transferData: field\n  }));\n};\nvar SortSettings = function SortSettings(props) {\n  var Name = props.Name,\n    id = props.id,\n    dataContext = props.dataContext,\n    value = props.value,\n    field = props.field,\n    className = props.className,\n    name = props.Name,\n    nameTips = props.Tips,\n    _props$Editor2 = props.Editor,\n    Editor = _props$Editor2 === void 0 ? {} : _props$Editor2;\n  var nameHidden = Editor.NameHidden;\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    handleOpenDGridSortSettingEdModal = _useContext2.handleOpenDGridSortSettingEdModal;\n  var handleShowDataSource = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function () {\n    var detailCells = dataContext.findControlByCondition(function (control) {\n      return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_24__.isDetailCell)(control) && control.parentId === field.id;\n    });\n    var dsList = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(detailCells).call(detailCells, function (field) {\n      var dataSource = field.dataSource,\n        bindField = field.bindField;\n      return {\n        dataSource: dataSource,\n        bindField: bindField\n      };\n    });\n    // dataContext.batchUpdateControlPropertyValues(createUpdateAction([[id, { sortSettingsText: value }]]))\n    handleOpenDGridSortSettingEdModal === null || handleOpenDGridSortSettingEdModal === void 0 || handleOpenDGridSortSettingEdModal(_objectSpread(_objectSpread({}, field), {}, {\n      sortSettingsText: value,\n      dsList: dsList\n    }));\n  }, [handleOpenDGridSortSettingEdModal, field, value]);\n  var _useContext3 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext3.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: nameTips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query\"),\n    onClick: handleShowDataSource\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_19___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !value)])\n  }, value || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0008')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: 'pointer'\n    }\n  }))));\n};\nvar filterSetting = function filterSetting(props) {\n  var _context4;\n  var Name = props.Name,\n    id = props.id,\n    dataContext = props.dataContext,\n    value = props.value,\n    field = props.field,\n    className = props.className,\n    name = props.Name,\n    nameTips = props.Tips,\n    _props$Editor3 = props.Editor,\n    Editor = _props$Editor3 === void 0 ? {} : _props$Editor3;\n  var nameHidden = Editor.NameHidden;\n  var _useContext4 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    handleOpenDGridFilterSettingEdModal = _useContext4.handleOpenDGridFilterSettingEdModal;\n  var handleShowDataSource = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function () {\n    handleOpenDGridFilterSettingEdModal === null || handleOpenDGridFilterSettingEdModal === void 0 || handleOpenDGridFilterSettingEdModal(_objectSpread({}, field));\n  }, [handleOpenDGridFilterSettingEdModal, field, value]);\n  var printDesignerContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(_context__WEBPACK_IMPORTED_MODULE_21__.PrintDesignerContext);\n  var _printDesignerContext = printDesignerContext.definition,\n    definition = _printDesignerContext === void 0 ? {} : _printDesignerContext;\n  var dataSource = field.dataSource;\n  var DsType = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.getDsTypeByDataSource)(dataSource)(definition);\n  var hideFilterSetting = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(_context4 = ['ReportEntry', 'Approveline', 'Approveactivity', 'Custom', 'Workflow', 'Ref', 'Attach']).call(_context4, DsType);\n  var _useContext5 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext5.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, !hideFilterSetting && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: nameTips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query\"),\n    onClick: handleShowDataSource\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_19___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !(value || field.filterSettingValue))])\n  }, value || field.filterSettingValue ? (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0001') : (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0009')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: 'pointer'\n    }\n  })))));\n};\nvar GridCheckBox = function GridCheckBox(props) {\n  var _field$subGridId;\n  var id = props.id,\n    locked = props.locked,\n    className = props.className,\n    editor = props.editor,\n    name = props.Name,\n    tips = props.Tips,\n    dataContext = props.dataContext,\n    field = props.field;\n  var nameHidden = editor.NameHidden,\n    required = editor.Required;\n  var handleChange = function handleChange(val) {\n    var updateValue = [[id, {\n      hasTableTail: val\n    }]];\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(updateValue));\n  };\n  if (((_field$subGridId = field.subGridId) === null || _field$subGridId === void 0 ? void 0 : _field$subGridId.length) > 0) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null);\n  var _useContext6 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext6.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_16__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement((react__WEBPACK_IMPORTED_MODULE_16___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Checkbox, {\n    checked: !!field.tableTailId,\n    disabled: locked,\n    onChange: function onChange(evt) {\n      handleChange(evt.target.checked);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: tips,\n    required: required,\n    onLinkClick: handleLinkClick\n  })));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/dataGrid/index.tsx?");

/***/ }),

/***/ 3436:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   MergeByField: function() { return /* binding */ MergeByField; },\n/* harmony export */   MergeSummaryField: function() { return /* binding */ MergeSummaryField; },\n/* harmony export */   Query: function() { return /* binding */ Query; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(84945);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(77620);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(32064);\n/* harmony import */ var _inputQuery__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(27136);\n/* harmony import */ var _components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(53828);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(21980);\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context17, _context18; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context17 = ownKeys(Object(t), !0)).call(_context17, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context18 = ownKeys(Object(t))).call(_context18, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Query = function Query(props) {\n  var _context, _context2;\n  var id = props.id,\n    propName = props.propName,\n    dataContext = props.dataContext,\n    RelationKey = props.RelationKey,\n    value = props.value,\n    field = props.field;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_17__.useContext)(_context__WEBPACK_IMPORTED_MODULE_21__.PrintDesignerContext);\n  var parentId = field.parentId,\n    groupField = field.groupField;\n  var parentControl = dataContext.findControl(parentId);\n  var parentDataSource = parentControl.dataSource;\n  var dataSourceKey = parentDataSource.replace(/^(\\S+\\.)?(\\S+)$/g, '$2');\n  var expandedKeys = [_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context = \"\".concat(parentDataSource, \"-\")).call(_context, dataSourceKey)];\n  var selectedKey = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context2 = \"\".concat(parentDataSource, \"-\")).call(_context2, groupField);\n  var definition = context.definition;\n  var handleChange = function handleChange(val, showErrorDiv) {\n    if (val !== value) {\n      var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.isBindFieldMode)(val),\n        isBindField = _isBindFieldMode.isBindField,\n        bindField = _isBindFieldMode.bindField;\n      if (isBindField) {\n        // 由于基础资料也是用.连接, 所以不能用.分割\n        // 需要模式匹配\n        var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByName)(bindField, definition);\n        if (!res) {\n          showErrorDiv(true);\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, val), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), ''), \"dsType\", ''))]]));\n          console.error('queryDataSourceAndAncestorByName has no res', bindField, definition);\n          return;\n        }\n        showErrorDiv(false);\n        var key = res.key,\n          dsType = res.dsType;\n        var batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, val), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), key), \"dsType\", dsType))]];\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(batchUpdateValue));\n      } else {\n        showErrorDiv(false);\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, val), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), ''), \"dsType\", '')]]));\n      }\n    }\n  };\n  var onSelect = function onSelect(setVisible, node) {\n    var _context3;\n    var key = node.key,\n      _node$InitAttr = node.InitAttr,\n      InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr;\n    var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByKey)(key, definition);\n    if (!res) {\n      console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n      return;\n    }\n    var ancestorTitle = res.ancestorTitle,\n      relationKey = res.key,\n      dsType = res.dsType,\n      IgnoreZero = res.IgnoreZero,\n      IgnoreTailZero = res.IgnoreTailZero;\n    var propValue = \"=$\".concat(ancestorTitle);\n    var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13___default()(_context3 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(InitAttr)).call(_context3, function (prop, key) {\n      prop[(0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(key)] = InitAttr[key];\n      return prop;\n    }, {});\n    asignProp.ignoreZero = IgnoreZero;\n    asignProp.ignoreTailZero = IgnoreTailZero;\n    var batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, propValue), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), relationKey), \"dsType\", dsType), asignProp))]];\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(batchUpdateValue));\n    setVisible(false);\n    // 这里需要标记，并且用户修改后的交互应该是怎么样的\n  };\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function (definition) {\n    definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterGridDataSource)(definition);\n    definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterTreeByDataSource)(definition, parentDataSource);\n    return definition;\n  }, [parentDataSource]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_inputQuery__WEBPACK_IMPORTED_MODULE_24__.InputQuery, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, props, {\n    readOnly: true,\n    filterTreeData: filterTreeData,\n    selectedKey: selectedKey,\n    expandedKeys: expandedKeys,\n    onSelect: onSelect,\n    handleInputChange: handleChange\n  }));\n};\n\n// 合并依据字段\nvar MergeByField = function MergeByField(props) {\n  var _context4, _context5;\n  var id = props.id,\n    propName = props.propName,\n    className = props.className,\n    Name = props.Name,\n    dataContext = props.dataContext,\n    RelationKey = props.RelationKey,\n    value = props.value,\n    field = props.field;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_17__.useContext)(_context__WEBPACK_IMPORTED_MODULE_21__.PrintDesignerContext);\n  var definition = context.definition;\n  var parentId = field.parentId,\n    mergeByField = field.mergeByField,\n    mergeSummaryField = field.mergeSummaryField;\n  var parentControl = dataContext.findControl(parentId);\n  var gridId = parentControl.id,\n    parentDataSource = parentControl.dataSource;\n  var dataSourceKey = parentDataSource.replace(/^(\\S+\\.)?(\\S+)$/g, '$2');\n  var expandedKeys = [_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context4 = \"\".concat(parentDataSource, \"-\")).call(_context4, dataSourceKey)];\n  var dataCells = dataContext.findControlByCondition(function (item) {\n    return item.parentId === gridId && item.cellType === 'Detail';\n  });\n  var hasGroupRow = !!dataContext.findControlByCondition(function (control) {\n    return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_27__.isGroupRow)(control) && control.parentId === parentId;\n  }).length;\n  var entryEntityKeys = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14___default())(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(dataCells).call(dataCells, function (cell) {\n    var key = cell.bindField,\n      dataSource = cell.dataSource;\n    return (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.createDataSourceNodeKey)(dataSource, key);\n  })).call(_context5, Boolean)));\n  var checkedKeys = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    var _context6;\n    var _definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterTreeByDataSourceKeys)(definition, entryEntityKeys);\n    var _checkedKeys = mergeByField ? mergeByField === null || mergeByField === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_context6 = mergeByField.split(';')).call(_context6, function (field) {\n      var _context7;\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context7 = \"\".concat(parentDataSource, \"-\")).call(_context7, field);\n    }) : [];\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_checkedKeys).call(_checkedKeys, function (checkedKey) {\n      var mergeByField = checkedKey;\n      if (!isExit(_definition, checkedKey)) {\n        getBindFieldAndDataSource(_definition, checkedKey.split('-')[1], function (_ref2) {\n          var _context8;\n          var dataSource = _ref2.dataSource,\n            bindField = _ref2.bindField;\n          mergeByField = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context8 = \"\".concat(dataSource, \"-\")).call(_context8, bindField);\n        });\n      }\n      return mergeByField;\n    });\n  }, [entryEntityKeys, mergeByField, parentDataSource]);\n  var handleChange = function handleChange(val, showErrorDiv) {\n    if (val !== value) {\n      var _isBindFieldMode2 = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.isBindFieldMode)(val),\n        isBindField = _isBindFieldMode2.isBindField,\n        bindField = _isBindFieldMode2.bindField;\n      if (isBindField) {\n        // 由于基础资料也是用.连接, 所以不能用.分割\n        // 需要模式匹配\n        var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByName)(bindField, definition);\n        if (!res) {\n          showErrorDiv(true);\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, val), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), ''))]]));\n          console.error('queryDataSourceAndAncestorByName has no res', bindField, definition);\n          return;\n        }\n        showErrorDiv(false);\n        var key = res.key;\n        var batchUpdateValue = [[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, val), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), key))]];\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(batchUpdateValue));\n      } else {\n        showErrorDiv(false);\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, val), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), '')]]));\n      }\n    }\n  };\n  var onSelect = function onSelect(setVisible, checkedNodes) {\n    var dataSources = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(checkedNodes).call(checkedNodes, function (node) {\n      var _context9;\n      var key = node.key,\n        _node$InitAttr2 = node.InitAttr,\n        InitAttr = _node$InitAttr2 === void 0 ? {} : _node$InitAttr2;\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByKey)(key, definition);\n      if (!res) {\n        console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n        return {};\n      }\n      var dataSource = res.dataSource,\n        ancestorTitle = res.ancestorTitle,\n        relationKey = res.key,\n        title = res.title,\n        dsType = res.dsType,\n        IgnoreZero = res.IgnoreZero,\n        IgnoreTailZero = res.IgnoreTailZero;\n      var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13___default()(_context9 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(InitAttr)).call(_context9, function (prop, key) {\n        prop[(0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(key)] = InitAttr[key];\n        return prop;\n      }, {});\n      asignProp.ignoreZero = IgnoreZero;\n      asignProp.ignoreTailZero = IgnoreTailZero;\n      return _objectSpread({\n        bindText: \"=$\".concat(ancestorTitle),\n        bindField: relationKey,\n        dataSource: dataSource,\n        viewText: \"=$\".concat(title),\n        title: title,\n        dsType: dsType\n      }, asignProp);\n    });\n    var updateValues = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(dataSources).call(dataSources, function (item) {\n      return item.title;\n    }).join(';')), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(dataSources).call(dataSources, function (item) {\n      return item.bindField;\n    }).join(';')));\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, updateValues]]));\n    setVisible(false);\n    // 这里需要标记，并且用户修改后的交互应该是怎么样的\n  };\n  var onClear = function onClear() {\n    var otherUpdates = mergeSummaryField.length ? {\n      mergeSummaryField: [],\n      mergeSummaryFieldText: ''\n    } : {};\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, ''), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), ''), otherUpdates))]]));\n  };\n  var filterTreeData = function filterTreeData(definition) {\n    if (!parentDataSource) return [];\n    definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterTreeByDataSourceKeys)(definition, entryEntityKeys);\n    return definition;\n  };\n  if (hasGroupRow || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_27__.isSubDataGrid)(parentControl)) return null;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_inputQuery__WEBPACK_IMPORTED_MODULE_24__.InputQuery, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, props, {\n    readOnly: true,\n    clearable: true,\n    modalTitle: Name,\n    filterTreeData: filterTreeData,\n    expandedKeys: expandedKeys,\n    checkedKeys: checkedKeys,\n    onSelect: onSelect,\n    onClear: onClear,\n    handleInputChange: handleChange,\n    checkable: true\n  }));\n};\n\n// 合并汇总字段\nvar MergeSummaryField = function MergeSummaryField(props) {\n  var _context10, _context11;\n  var Name = props.Name,\n    id = props.id,\n    propName = props.propName,\n    dataContext = props.dataContext,\n    RelationKey = props.RelationKey,\n    value = props.value,\n    field = props.field,\n    className = props.className,\n    selectionContext = props.selectionContext;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_17__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_useState, 2),\n    showClear = _useState2[0],\n    setShowClear = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_17__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_useState3, 2),\n    visible = _useState4[0],\n    setVisible = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_17__.useState)([]),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_useState5, 2),\n    checkedKeys = _useState6[0],\n    setCheckedKeys = _useState6[1];\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_17__.useContext)(_context__WEBPACK_IMPORTED_MODULE_21__.PrintDesignerContext);\n  var mergeSummaryField = field.mergeSummaryField,\n    parentId = field.parentId,\n    mergeByField = field.mergeByField;\n  var parentControl = dataContext.findControl(parentId);\n  var gridId = parentControl.id,\n    parentDataSource = parentControl.dataSource,\n    parentType = parentControl.type;\n  var dataSourceKey = parentDataSource.replace(/^(\\S+\\.)?(\\S+)$/g, '$2');\n  var expandedKeys = [_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context10 = \"\".concat(parentDataSource, \"-\")).call(_context10, dataSourceKey)];\n  var dataCells = dataContext.findControlByCondition(function (item) {\n    return item.parentId === gridId && item.cellType === 'Detail';\n  });\n  var entryEntityKeys = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14___default())(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(_context11 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(dataCells).call(dataCells, function (cell) {\n    var key = cell.bindField,\n      dataSource = cell.dataSource;\n    return (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.createDataSourceNodeKey)(dataSource, key);\n  })).call(_context11, Boolean)));\n  var disabled = !mergeByField;\n  var hasGroupRow = !!dataContext.findControlByCondition(function (control) {\n    return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_27__.isGroupRow)(control) && control.parentId === parentId;\n  }).length;\n  var meta = context.meta,\n    definition = context.definition;\n  var omitKeys = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    var _context12;\n    var _definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterTreeByDataSourceKeys)(definition, entryEntityKeys);\n    var _checkedKeys = mergeByField ? mergeByField === null || mergeByField === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_context12 = mergeByField.split(';')).call(_context12, function (field) {\n      var _context13;\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context13 = \"\".concat(parentDataSource, \"-\")).call(_context13, field);\n    }) : [];\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_checkedKeys).call(_checkedKeys, function (checkedKey) {\n      var mergeByField = checkedKey;\n      if (!isExit(_definition, checkedKey)) {\n        getBindFieldAndDataSource(_definition, checkedKey.split('-')[1], function (_ref4) {\n          var _context14;\n          var dataSource = _ref4.dataSource,\n            bindField = _ref4.bindField;\n          mergeByField = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context14 = \"\".concat(dataSource, \"-\")).call(_context14, bindField);\n        });\n      }\n      return mergeByField;\n    });\n  }, [entryEntityKeys, mergeByField, parentDataSource]);\n  var onSelect = function onSelect(checkedNodes) {\n    var dataSources = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(checkedNodes).call(checkedNodes, function (node) {\n      var _context15;\n      var key = node.key,\n        _node$InitAttr3 = node.InitAttr,\n        InitAttr = _node$InitAttr3 === void 0 ? {} : _node$InitAttr3;\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.queryDataSourceAndAncestorByKey)(key, definition);\n      if (!res) {\n        console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n        return {};\n      }\n      var dataSource = res.dataSource,\n        ancestorTitle = res.ancestorTitle,\n        relationKey = res.key,\n        title = res.title,\n        dsType = res.dsType,\n        IgnoreZero = res.IgnoreZero,\n        IgnoreTailZero = res.IgnoreTailZero;\n      var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_13___default()(_context15 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(InitAttr)).call(_context15, function (prop, key) {\n        prop[_.camelCase(key)] = InitAttr[key];\n        return prop;\n      }, {});\n      asignProp.ignoreZero = IgnoreZero;\n      asignProp.ignoreTailZero = IgnoreTailZero;\n      return _objectSpread({\n        bindText: \"=$\".concat(ancestorTitle),\n        bindField: relationKey,\n        dataSource: dataSource,\n        viewText: \"=$\".concat(title),\n        title: title,\n        dsType: dsType\n      }, asignProp);\n    });\n    var updateValues = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(dataSources).call(dataSources, function (item) {\n      return item.title;\n    }).join(';')), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(dataSources).call(dataSources, function (item) {\n      return item.bindField;\n    }));\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, updateValues]]));\n    setVisible(false);\n  };\n  var onMouseOver = function onMouseOver(e) {\n    if (value) {\n      setShowClear(true);\n    }\n  };\n  var onMouseLeave = function onMouseLeave(e) {\n    if (showClear) {\n      setShowClear(false);\n    }\n  };\n  var onClear = function onClear(e) {\n    e.stopPropagation();\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_23__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, propName, ''), (0,lodash__WEBPACK_IMPORTED_MODULE_18__.camelCase)(RelationKey), []))]]));\n  };\n  var handleShowDataSource = function handleShowDataSource() {\n    if (disabled) return;\n    var selectedKeys = mergeSummaryField ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(mergeSummaryField).call(mergeSummaryField, function (key) {\n      var _context16;\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context16 = \"\".concat(parentDataSource, \"-\")).call(_context16, key);\n    }) : [];\n    setCheckedKeys(selectedKeys);\n    setVisible(true);\n  };\n  var filterTreeData = function filterTreeData(definition) {\n    if (!parentDataSource) return [];\n    // definition = filterTreeByDataSource(definition, parentDataSource)\n    definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterTreeByDataSourceKeys)(definition, entryEntityKeys);\n    definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_22__.filterTreeByOmitKeys)(definition, omitKeys);\n    // definition = filterTreeByOmitType(definition, 'Image') // 过滤掉图片字段\n    return definition;\n  };\n  if (hasGroupRow || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_27__.isSubDataGrid)(parentControl)) return null;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement((react__WEBPACK_IMPORTED_MODULE_17___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-title\")\n  }, Name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()([\"\".concat(className, \"-query\"), {\n      'is-disabled': disabled\n    }]),\n    onMouseOver: onMouseOver,\n    onMouseLeave: onMouseLeave,\n    onClick: handleShowDataSource\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !value)])\n  }, value || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0008')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, !disabled && showClear && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    type: \"close\",\n    style: {\n      cursor: 'pointer'\n    },\n    onClick: onClear\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_19__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: disabled ? 'not-allowed' : 'pointer'\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_25__[\"default\"], {\n    checkable: true,\n    className: \"left-datasource\",\n    activedSelectId: id,\n    modalTitle: Name,\n    meta: meta,\n    definition: definition,\n    visible: visible,\n    onCancel: function onCancel() {\n      return setVisible(false);\n    },\n    onSelect: onSelect,\n    expandedKeys: expandedKeys,\n    checkedKeys: checkedKeys,\n    filterTreeData: filterTreeData\n  }));\n};\nfunction isExit(definition, str) {\n  return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(definition).call(definition, function (def) {\n    var bindField = def.bindField,\n      dataSource = def.dataSource,\n      Items = def.Items;\n    return dataSource + '-' + bindField === str || (Items === null || Items === void 0 ? void 0 : Items.length) && isExit(Items, str);\n  });\n}\nfunction getBindFieldAndDataSource(definition, str, callback) {\n  return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(definition).call(definition, function (def) {\n    var bindField = def.bindField,\n      Items = def.Items;\n    var isEqual = bindField === str;\n    isEqual && callback(def);\n    return isEqual || Items && getBindFieldAndDataSource(Items, str, callback);\n  });\n}\n\n//# sourceURL=webpack://print-designer/./src/editorControls/dataRow/index.tsx?");

/***/ }),

/***/ 21064:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ImageUpload: function() { return /* binding */ ImageUpload; },\n/* harmony export */   Query: function() { return /* binding */ Query; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(84945);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(36324);\n/* harmony import */ var _components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53828);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(32064);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(77620);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Query = function Query(props) {\n  var id = props.id,\n    propName = props.propName,\n    dataContext = props.dataContext,\n    value = props.value,\n    className = props.className,\n    activedSelectId = props.activedSelectId;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useState, 2),\n    visible = _useState2[0],\n    setVisible = _useState2[1];\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_8__.useContext)(_context__WEBPACK_IMPORTED_MODULE_10__.PrintDesignerContext);\n  var definition = context.definition;\n  var prefixCls = 'left-datasource';\n  var onSelect = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function (node) {\n    if (!node) setVisible(false);\n    var Key = node.key;\n    var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_14__.queryDataSourceAndAncestorByKey)(Key, definition);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('onSelect-----', node, res);\n    if (!res) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.error('queryDataSourceAndAncestorByKey has no res', Key, definition);\n      return;\n    }\n    var dataSource = res.dataSource,\n      ancestorTitle = res.ancestorTitle,\n      relationKey = res.key,\n      dsType = res.dsType;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, propName, \"=$\".concat(ancestorTitle)), \"dsType\", dsType), \"bindField\", relationKey), \"dataSource\", dataSource)]]));\n    setVisible(false);\n    // 这里需要标记，并且用户修改后的交互应该是怎么样的\n  }, [id, propName, definition]);\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function (definition) {\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_16__.filterTreeByControlType)(definition, 'Image');\n  }, []);\n  var onCancel = (0,react__WEBPACK_IMPORTED_MODULE_8__.useCallback)(function () {\n    setVisible(false);\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement((react__WEBPACK_IMPORTED_MODULE_8___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query\"),\n    onClick: function onClick() {\n      return setVisible(true);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_11___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !value)])\n  }, value || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0010')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_9__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: 'pointer'\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(_components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_13__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    activedSelectId: id,\n    visible: visible,\n    filterTreeData: filterTreeData\n  }, context, {\n    setVisible: setVisible,\n    onSelect: onSelect,\n    onCancel: onCancel,\n    className: prefixCls,\n    emptyNode: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(EmptyDataSource, {\n      className: \"left-datasource\"\n    })\n  })));\n};\nfunction EmptyDataSource(_ref3) {\n  var className = _ref3.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0011')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0011')));\n}\nvar ImageUpload = function ImageUpload(props) {\n  var _context;\n  var id = props.id,\n    handleChange = props.handleChange,\n    value = props.value,\n    className = props.className,\n    rootId = props.rootId,\n    field = props.field,\n    dataContext = props.dataContext,\n    locked = props.locked,\n    propName = props.propName;\n  var prefixCls = 'kdesigner-image-upload';\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_8__.useState)([]),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useState3, 2),\n    fileList = _useState4[0],\n    setFileList = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_8__.useState)(''),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useState5, 2),\n    status = _useState6[0],\n    setStatus = _useState6[1];\n  var errorRef = (0,react__WEBPACK_IMPORTED_MODULE_8__.useRef)(null);\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_8__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.GlobalConfigContext),\n    uploadImageUrl = _useContext.uploadImageUrl;\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_8__.useContext)(_context__WEBPACK_IMPORTED_MODULE_10__.PrintDesignerContext),\n    setMessage = _useContext2.setMessage;\n  var templateId = dataContext.getData().id || '';\n  var showErrorDiv = function showErrorDiv(show) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4___default()(function () {\n      if (show) {\n        var _errorRef$current;\n        (_errorRef$current = errorRef.current) === null || _errorRef$current === void 0 || _errorRef$current.show();\n      } else {\n        var _errorRef$current2;\n        (_errorRef$current2 = errorRef.current) === null || _errorRef$current2 === void 0 || _errorRef$current2.hide();\n      }\n    }, 0);\n  };\n  var onUploadChange = function onUploadChange(info) {\n    var uploadStatus = info.file.status;\n    var fileList = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(info.fileList);\n    fileList = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5___default()(fileList).call(fileList, -1);\n    fileList = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(fileList).call(fileList, function (file) {\n      var response = file.response;\n      if (response) {\n        var rcId = response.rcId,\n          fileName = response.fileName,\n          _status = response.status,\n          message = response.message;\n        if (_status === '1') {\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, propName, fileName), \"bindField\", rcId), \"dataSource\", '')]]));\n          uploadStatus = 'success';\n        } else {\n          uploadStatus = 'error';\n          setMessage(message || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0012'));\n        }\n      }\n      return file;\n    });\n    setFileList(fileList);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.console.log('upload------', uploadStatus);\n    setStatus(function () {\n      return uploadStatus === 'error' ? 'error' : 'success';\n    });\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(function () {\n    showErrorDiv(status === 'error');\n  }, [status]);\n  (0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(function () {\n    var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_14__.isBindFieldMode)(value),\n      isBindField = _isBindFieldMode.isBindField;\n    if (isBindField) {\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, propName, ''), \"bindField\", ''), \"dataSource\", '')]]));\n    }\n  }, []);\n  var action = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7___default()(_context = \"\".concat(uploadImageUrl)).call(_context, templateId);\n  // const action = 'https://www.mocky.io/v2/5cc8019d300000980a055e76'\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_9__.Upload, {\n    disabled: locked,\n    action: action,\n    className: \"\".concat(prefixCls, \"-wrapper\"),\n    accept: \".jpg,.jpeg,.png,.bmp\",\n    fileList: fileList,\n    onChange: onUploadChange\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: prefixCls\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_11___default()([\"\".concat(prefixCls, \"-value\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, \"\".concat(prefixCls, \"-value-empty\"), !value)])\n  }, value || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0013')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_9__.Icon, {\n    type: \"shangchuan\",\n    prefix: \"designericon\",\n    className: \"\".concat(prefixCls, \"-icon\")\n  })));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/image/index.tsx?");

/***/ }),

/***/ 16980:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _textField__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55924);\n/* harmony import */ var _dataCell__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(16188);\n/* harmony import */ var _dataGrid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28852);\n/* harmony import */ var _qrCode_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(34356);\n/* harmony import */ var _barcode_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54620);\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21064);\n/* harmony import */ var _root__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31384);\n/* harmony import */ var _richText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(57472);\n/* harmony import */ var _subDataCell__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(67852);\n/* harmony import */ var _subDataGrid__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(70544);\n/* harmony import */ var _dataRow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(3436);\n/* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(87744);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar getPropertyEditors = function getPropertyEditors() {\n  var list = [];\n  var editorMapList = [[_textField__WEBPACK_IMPORTED_MODULE_3__, 'Text'], [_dataGrid__WEBPACK_IMPORTED_MODULE_5__, 'CardGrid'], [_textField__WEBPACK_IMPORTED_MODULE_3__, 'LayoutCell'], [_textField__WEBPACK_IMPORTED_MODULE_3__, 'CardCell'], [_richText__WEBPACK_IMPORTED_MODULE_10__, 'RichText'], [_dataCell__WEBPACK_IMPORTED_MODULE_4__, 'DataCell'], [_dataGrid__WEBPACK_IMPORTED_MODULE_5__, 'DataGrid'], [_subDataGrid__WEBPACK_IMPORTED_MODULE_12__, 'SubDataGrid'], [_subDataCell__WEBPACK_IMPORTED_MODULE_11__, 'SubDataCell'], [_qrCode_index__WEBPACK_IMPORTED_MODULE_6__, 'QRCode'], [_barcode_index__WEBPACK_IMPORTED_MODULE_7__, 'Barcode'], [_image__WEBPACK_IMPORTED_MODULE_8__, 'Image'], [_root__WEBPACK_IMPORTED_MODULE_9__, 'Paper'], [_dataRow__WEBPACK_IMPORTED_MODULE_13__, 'DataRow'], [_input__WEBPACK_IMPORTED_MODULE_14__]];\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(editorMapList).call(editorMapList, function (_ref) {\n    var _context;\n    var _ref2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, 2),\n      editorMap = _ref2[0],\n      controlType = _ref2[1];\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_2___default()(editorMap)).call(_context, function (editorType) {\n      list.push([editorType, editorMap[editorType], controlType]);\n    });\n  });\n  return list;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (getPropertyEditors);\n\n//# sourceURL=webpack://print-designer/./src/editorControls/index.ts?");

/***/ }),

/***/ 87744:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   FileNameInput: function() { return /* binding */ FileNameInput; },\n/* harmony export */   Input: function() { return /* binding */ Input; },\n/* harmony export */   Radio: function() { return /* binding */ Radio; },\n/* harmony export */   Select: function() { return /* binding */ Select; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58496);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(84945);\n/* harmony import */ var _components_common_fileName_jsx__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(2248);\n/* harmony import */ var _src_utils_treeUtil__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(77620);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Input = function Input(props) {\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var inputStyle = {};\n  var onChange = props.handleChange,\n    value = props.value,\n    propName = props.Id,\n    className = props.className,\n    locked = props.locked,\n    Editor = props.Editor,\n    name = props.Name,\n    tips = props.Tips,\n    dataContext = props.dataContext,\n    field = props.field,\n    Id = props.Id;\n  var nameHidden = Editor.NameHidden,\n    _Editor$DataScope = Editor.DataScope,\n    DataScope = _Editor$DataScope === void 0 ? [] : _Editor$DataScope,\n    Tips = Editor.Tips,\n    MaxLength = Editor.MaxLength,\n    Min = Editor.Min,\n    Max = Editor.Max;\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.GlobalConfigContext),\n    setMessage = _useContext.showMessage;\n  // TODO\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(value),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState, 2),\n    innerValue = _useState2[0],\n    setInnerValue = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(''),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState3, 2),\n    focusValue = _useState4[0],\n    setFocusValue = _useState4[1];\n  var type = Editor.DataType === 'String' ? 'string' : 'number';\n  var inputProps = {\n    style: inputStyle,\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.getLangMsg)('printd.grid.key0002'),\n    borderType: \"bordered\",\n    suffix: props.Unit\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {\n    setInnerValue(value);\n  }, [value]);\n  var handleChange = function handleChange(val) {\n    if (type === 'number' && !val) {\n      onChange(0);\n    } else {\n      onChange(val);\n    }\n  };\n  var handleFocus = function handleFocus(e) {\n    // 数字类型的要选中全部\n    if (type === 'number') {\n      inputRef.current.select();\n    }\n    setFocusValue(type === 'string' ? e.target.value : e.target.value === '' ? '' : +e.target.value);\n  };\n  var handleBlur = function handleBlur(evt) {\n    var newValue = type === 'string' ? evt.target.value : evt.target.value === '' ? '' : +evt.target.value;\n    if (value === newValue) {\n      return;\n    }\n    if (newValue === '' && type === 'number') {\n      setInnerValue(value);\n      return;\n    }\n    var _DataScope = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(DataScope, 1),\n      min = _DataScope[0];\n    if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isEmpty(DataScope) && !lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(min) && newValue < min) {\n      setMessage(Tips.DataScope);\n      newValue = min;\n    } else if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(Min) && newValue < Min) {\n      setMessage(Tips.Min);\n      newValue = Min;\n    }\n    if (Id === 'X' || Id === 'Y' || Id === 'Height' || Id === 'Width') {\n      var parentId = field.parentId;\n      var parentField = dataContext.findControl(parentId) || {};\n      var isTableTail = parentField.type === 'TableTail';\n      if (isTableTail) {\n        var parentWidth = parentField.width,\n          parentHeight = parentField.height;\n        var width = field.width,\n          height = field.height;\n        if (Id === 'X' && newValue + width > parentWidth) {\n          newValue = parentWidth - width;\n          setInnerValue(newValue);\n        }\n        if (Id === 'Y' && newValue + height > parentHeight) {\n          newValue = parentHeight - height;\n          setInnerValue(newValue);\n        }\n\n        // 表尾容器中的控件，高度不允许超过表尾容器\n        if (Id === 'Height' && newValue > parentHeight) {\n          newValue = parentHeight;\n          setInnerValue(newValue);\n        }\n        if (Id === 'Width' && newValue > parentWidth) {\n          newValue = parentWidth;\n          setInnerValue(newValue);\n        }\n      }\n    }\n\n    // setInnerValue(newValue)\n    handleChange(newValue);\n  };\n  var inputLimitedProp = {};\n  if (type === 'number') {\n    if (DataScope.length) {\n      var _DataScope2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(DataScope, 2),\n        min = _DataScope2[0],\n        max = _DataScope2[1];\n      inputLimitedProp.min = min;\n      inputLimitedProp.max = max;\n    }\n    if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(Min)) {\n      inputLimitedProp.min = Min;\n    }\n    if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(Max)) {\n      inputLimitedProp.max = Max;\n    }\n\n    // 直线限制最大宽度为3mm\n    if (field.type === _constants_index__WEBPACK_IMPORTED_MODULE_20__.LINE) {\n      if (field.direction === _constants_index__WEBPACK_IMPORTED_MODULE_20__.HORIZONTAL && propName === 'Height') {\n        inputLimitedProp.max = _constants_index__WEBPACK_IMPORTED_MODULE_20__.MAX_LINE_HEIGHT_MM;\n      }\n      if (field.direction === _constants_index__WEBPACK_IMPORTED_MODULE_20__.VERTICAL && propName === 'Width') {\n        inputLimitedProp.max = _constants_index__WEBPACK_IMPORTED_MODULE_20__.MAX_LINE_HEIGHT_MM;\n      }\n    }\n  }\n  var onInputChange = function onInputChange(evt) {\n    var targetValue = evt.target.value;\n    // 空串\n    if (targetValue === '') return setInnerValue(targetValue);\n    var newValue = type === 'string' ? targetValue : +targetValue;\n    if (MaxLength && newValue.length > MaxLength) {\n      setMessage(Tips.MaxLength);\n      newValue = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_5___default()(newValue).call(newValue, 0, MaxLength);\n    }\n    if (innerValue === newValue) return;\n\n    // 如果输入类型是字符串，不需要走下面的最大值判断逻辑\n    if (type === 'string') return setInnerValue(newValue);\n\n    // 直线类型后台不能动态设置，所以下面区分了三种情况， 即后台给的Max、DataScope的Max以及上面前端动态设置的inputLimitedProp.max\n    var max = DataScope[1];\n    if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(max) && newValue > max) {\n      setMessage(Tips.DataScope);\n      setInnerValue(max);\n    } else if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(Max) && newValue > Max) {\n      setMessage(Tips.Max);\n      setInnerValue(Max);\n    } else if (newValue > inputLimitedProp.max && field.type === _constants_index__WEBPACK_IMPORTED_MODULE_20__.LINE) {\n      // 添加新的直线高度规则， 由于后台不能动态设置，所以直线的高度由前端设置\n      setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.getLangMsg)('printd.grid.key0130'));\n      setInnerValue(inputLimitedProp.max);\n    } else {\n      setInnerValue(newValue);\n    }\n  };\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext2.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement((react__WEBPACK_IMPORTED_MODULE_12___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: tips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14__.Input, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, inputProps, {\n    type: type,\n    ref: inputRef,\n    value: innerValue,\n    onKeyPress: function onKeyPress(event) {\n      // 字符串不做限制\n      if (type === 'string') return;\n      var invalidChars = ['-', '+', 'e', 'E'];\n      if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_6___default()(invalidChars).call(invalidChars, event.key) !== -1) {\n        event.preventDefault();\n      }\n    },\n    onChange: onInputChange,\n    onFocus: function onFocus(e) {\n      return handleFocus(e);\n    },\n    onPressEnter: function onPressEnter() {/** 里面会自己触发blur */},\n    onBlur: handleBlur,\n    onClick: function onClick(e) {\n      var _inputRef$current;\n      (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();\n      handleBlur(e);\n    },\n    disabled: locked\n  }, inputLimitedProp)));\n};\nvar Select = function Select(props) {\n  var _Enum$0$Value, _Enum$, _Enum$2;\n  var handleChange = props.handleChange,\n    value = props.value,\n    className = props.className,\n    editor = props.editor,\n    locked = props.locked,\n    field = props.field;\n  var Enum = editor.Enum,\n    Default = editor.Default,\n    nameHidden = editor.NameHidden;\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(false),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState5, 2),\n    visible = _useState6[0],\n    setVisible = _useState6[1];\n  var selectValue = Default || Enum && ((_Enum$0$Value = (_Enum$ = Enum[0]) === null || _Enum$ === void 0 ? void 0 : _Enum$.Value) !== null && _Enum$0$Value !== void 0 ? _Enum$0$Value : (_Enum$2 = Enum[0]) === null || _Enum$2 === void 0 ? void 0 : _Enum$2.Id);\n  if (selectValue === undefined || selectValue === null) return \"selectValue: \".concat(selectValue);\n  var options = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(Enum).call(Enum, function (option) {\n    var _option$Value;\n    return {\n      value: (_option$Value = option.Value) !== null && _option$Value !== void 0 ? _option$Value : option.Id,\n      label: option.Name,\n      disabled: option.Visible === false\n    };\n  });\n  var name = props.Name,\n    tips = props.Tips;\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {\n    var cb = function cb(evt) {\n      var target = evt.target;\n      while (target && target !== document) {\n        if (target.classList.contains('kds-scroll-select-panel')) {\n          return;\n        }\n        target = target.parentNode;\n      }\n      setVisible(false);\n    };\n    document.addEventListener('scroll', cb, true);\n    return function () {\n      document.removeEventListener('scroll', cb, true);\n    };\n  }, []);\n  var _useContext3 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext3.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement((react__WEBPACK_IMPORTED_MODULE_12___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: tips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14__.Select, {\n    disabled: locked,\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.getLangMsg)('printd.grid.key0002'),\n    borderType: \"bordered\",\n    value: lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(value) ? selectValue : value,\n    onChange: function onChange(val) {\n      console.log(val);\n      setVisible(false);\n      handleChange(val);\n    },\n    options: options,\n    visible: visible,\n    onVisibleChange: function onVisibleChange(_visible) {\n      setVisible(_visible);\n    },\n    popperClassName: \"kds-scroll-select-panel\"\n  }));\n};\nvar Group = _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14__.Radio.Group;\nvar Radio = function Radio(props) {\n  var handleChange = props.handleChange,\n    value = props.value,\n    className = props.className,\n    editor = props.editor,\n    locked = props.locked,\n    Id = props.Id,\n    field = props.field;\n  var Enum = editor.Enum,\n    nameHidden = editor.NameHidden,\n    DataType = editor.DataType,\n    required = editor.Required;\n  var name = props.Name,\n    tips = props.Tips;\n  var printDesignerContext = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(_context__WEBPACK_IMPORTED_MODULE_17__.PrintDesignerContext);\n  var definition = printDesignerContext.definition;\n  if (Id === 'MergePrint') {\n    var _context, _def$, _context2;\n    var dataSource = field.dataSource;\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8___default()(_context = dataSource.split('.')).call(_context, 'workflow')) return null;\n    var def = (0,_src_utils_treeUtil__WEBPACK_IMPORTED_MODULE_19__.getDefinition)(definition, dataSource);\n    var datasourceType = def === null || def === void 0 || (_def$ = def[0]) === null || _def$ === void 0 ? void 0 : _def$.DsType;\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8___default()(_context2 = ['Ref', 'Custom']).call(_context2, datasourceType)) return null;\n  }\n  var _useContext4 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext4.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n\n  // none square\n  if ((0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Enum[0]) === 'object') {\n    var options = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(Enum).call(Enum, function (option) {\n      return {\n        label: option.Name,\n        value: option.Value\n      };\n    });\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement((react__WEBPACK_IMPORTED_MODULE_12___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.NameTipWrapper, {\n      nameHidden: nameHidden,\n      className: className,\n      name: name,\n      tips: tips,\n      required: required,\n      onLinkClick: handleLinkClick\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(Group, {\n      disabled: locked,\n      value: value === null || value === void 0 ? void 0 : value.toString(),\n      onChange: function onChange(evt) {\n        if (DataType === 'Boolean') {\n          if (evt.target.value === 'false') {\n            handleChange(false);\n          } else {\n            handleChange(true);\n          }\n        } else {\n          handleChange(evt.target.value);\n        }\n      },\n      options: options\n    }));\n  } else {\n    // checkBox\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.CheckboxPropertyEditor, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, props, {\n      onLinkClick: handleLinkClick\n    }));\n  }\n};\nvar FileNameInput = function FileNameInput(props) {\n  var id = props.id,\n    field = props.field,\n    className = props.className,\n    name = props.Name,\n    nameTips = props.Tips,\n    _props$Editor = props.Editor,\n    Editor = _props$Editor === void 0 ? {} : _props$Editor;\n  var printDesignerContext = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(_context__WEBPACK_IMPORTED_MODULE_17__.PrintDesignerContext);\n  var definition = printDesignerContext.definition;\n  var DsTypes = ['Entry', 'ReportEntry', 'Attach', 'Custom', 'Ref', 'Subentry', 'Workflow', 'Head', 'Report', 'Approveline', 'Sys'];\n  var selectList = (0,react__WEBPACK_IMPORTED_MODULE_12__.useMemo)(function () {\n    var _context3;\n    var mainDefinition = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (_ref) {\n      var DsType = _ref.DsType;\n      return DsType === 'Main';\n    });\n    var fileNameList = mainDefinition ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_7___default()(_context3 = getDefinition([mainDefinition], DsTypes)).call(_context3, function (_ref2) {\n      var _context4;\n      var bindField = _ref2.bindField,\n        Name = _ref2.Name,\n        ViewName = _ref2.ViewName;\n      return {\n        name: ViewName || Name,\n        key: bindField,\n        fileViewName: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_10___default()(_context4 = \"\".concat(ViewName || Name, \"(\")).call(_context4, bindField, \")\")\n      };\n    }) : [];\n    fileNameList.push({\n      name: '打印人',\n      key: '$sys.printer',\n      fileViewName: '打印人(sys.printer)'\n    });\n    fileNameList.push({\n      name: '打印时间',\n      key: '$sys.printTime',\n      fileViewName: '打印时间(sys.printTime)'\n    });\n    return fileNameList;\n  }, [definition]);\n  var fileName = field.fileName;\n  var nameHidden = Editor.NameHidden;\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(false),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState7, 2),\n    visible = _useState8[0],\n    setVisible = _useState8[1];\n  var onCancel = function onCancel() {\n    setVisible(false);\n  };\n  var onConfirm = function onConfirm() {\n    setVisible(false);\n  };\n  var nameText = (0,react__WEBPACK_IMPORTED_MODULE_12__.useMemo)(function () {\n    if (!(fileName !== null && fileName !== void 0 && fileName.length)) return;\n    return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11___default()(fileName).call(fileName, function (data, item) {\n      if (typeof item === 'string') {\n        data.push(item);\n      } else if (item.name) {\n        data.push(\"{\".concat(item.name, \"}\"));\n      }\n      return data;\n    }, []).join('');\n  }, [fileName, fileName === null || fileName === void 0 ? void 0 : fileName.length]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement((react__WEBPACK_IMPORTED_MODULE_12___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: nameTips\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query\"),\n    onClick: function onClick() {\n      setVisible(!visible);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_15___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !nameText)])\n  }, nameText || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_13__.getLangMsg)('printd.grid.key0002')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_14__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: 'pointer'\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_components_common_fileName_jsx__WEBPACK_IMPORTED_MODULE_18__[\"default\"], {\n    visible: visible,\n    selectList: selectList,\n    onCancel: onCancel,\n    onConfirm: onConfirm,\n    fileName: fileName,\n    id: id\n  }));\n};\nfunction getDefinition(definition, DsTypes) {\n  var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11___default()(definition).call(definition, function (filteredData, def) {\n    if (!def) return [];\n    var Items = def.Items,\n      DsType = def.DsType,\n      Type = def.Type,\n      Icon = def.Icon;\n    if (!Items && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8___default()(DsTypes).call(DsTypes, DsType) && Type !== 'Image' && Icon !== 'fujian') {\n      filteredData.push(def);\n    }\n    if (Items && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_8___default()(DsTypes).call(DsTypes, DsType) && Type !== 'Image' && Icon !== 'fujian') {\n      filteredData.push.apply(filteredData, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(getDefinition(Items, DsTypes)));\n    }\n    return filteredData;\n  }, []);\n  return data;\n}\n\n//# sourceURL=webpack://print-designer/./src/editorControls/input.tsx?");

/***/ }),

/***/ 27136:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* binding */ InputQuery; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(37152);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84945);\n/* harmony import */ var _components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(53828);\n/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(46860);\n/* harmony import */ var _components_common_expressionModal_slate__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(48724);\n/* harmony import */ var _hooks_useInputQueryEvent__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(7028);\n/* harmony import */ var _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(36324);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(32064);\n/* harmony import */ var _constants_ctrlMethodName__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(66416);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(77620);\n/* harmony import */ var _utils_filterDataSource__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(34564);\n/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(20008);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\n\n\n\nvar _context;\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context4 = ownKeys(Object(t), !0)).call(_context4, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_3___default()(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SHOW_FORMULA_HELPER_TEXT_TYPES = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context = [_constants_index__WEBPACK_IMPORTED_MODULE_34__.COMMON_CONTROL_TYPE_MAP.text]).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_constants_index__WEBPACK_IMPORTED_MODULE_34__.GRID_RELATIVE_TYPES), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_constants_index__WEBPACK_IMPORTED_MODULE_34__.SUB_GRID_RELATIVE_TYPES));\nvar InputQuery = function InputQuery(props) {\n  var id = props.id,\n    propName = props.propName,\n    dataContext = props.dataContext,\n    activedSelectId = props.activedSelectId,\n    RelationKey = props.RelationKey,\n    RelationViewText = props.RelationViewText,\n    RelationDataSource = props.RelationDataSource,\n    DataSourceOption = props.DataSourceOption,\n    value = props.value,\n    className = props.className,\n    _props$Editor = props.Editor,\n    Editor = _props$Editor === void 0 ? {} : _props$Editor,\n    field = props.field,\n    readOnly = props.readOnly,\n    modalTitle = props.modalTitle,\n    _props$clearable = props.clearable,\n    clearable = _props$clearable === void 0 ? false : _props$clearable,\n    handleClear = props.onClear,\n    handleSelect = props.onSelect,\n    handleInputChange = props.handleInputChange,\n    filterTreeData = props.filterTreeData,\n    expandedKeys = props.expandedKeys,\n    checkedKeys = props.checkedKeys,\n    selectedKey = props.selectedKey,\n    modalType = props.modalType,\n    name = props.Name,\n    nameTips = props.Tips,\n    checkable = props.checkable,\n    filterExpressionTreeDataProps = props.filterExpressionTreeData,\n    DataSourceInfo = props.DataSourceInfo;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState, 2),\n    showClear = _useState2[0],\n    setShowClear = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState3, 2),\n    visible = _useState4[0],\n    setVisible = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(false),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState5, 2),\n    expressionModalVisible = _useState6[0],\n    setExpressionModalVisible = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)('1'),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState7, 2),\n    activeTab = _useState8[0],\n    setActiveTab = _useState8[1];\n  var errorRef = (0,react__WEBPACK_IMPORTED_MODULE_19__.useRef)(null);\n  // TODO: tip\n  var MaxLength = Editor.MaxLength,\n    Tips = Editor.Tips,\n    nameHidden = Editor.NameHidden;\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(_context__WEBPACK_IMPORTED_MODULE_22__.PrintDesignerContext);\n  var formulaData = field.formulaData,\n    dsType = field.dsType;\n  var isFormulaMode = dsType === 'Formula' && name === (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)({\n    key: 'printd.grid.key0128'\n  });\n  var meta = context.meta,\n    definition = context.definition,\n    setMessage = context.setMessage;\n  var prefixCls = 'left-datasource';\n  var filterSysBindFields = ['=now()', '=getUserName()'];\n  var showErrorDiv = function showErrorDiv(show) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      if (show) {\n        var _errorRef$current;\n        (_errorRef$current = errorRef.current) === null || _errorRef$current === void 0 || _errorRef$current.show();\n      } else {\n        var _errorRef$current2;\n        (_errorRef$current2 = errorRef.current) === null || _errorRef$current2 === void 0 || _errorRef$current2.hide();\n      }\n    }, 0);\n  };\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useState)(value),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState9, 2),\n    innerValue = _useState10[0],\n    setInnerValue = _useState10[1];\n  // const innerValueRef = useRef(innerValue)\n  // const valueRef = useRef(value)\n  (0,_hooks_useInputQueryEvent__WEBPACK_IMPORTED_MODULE_26__.useInputQueryEvent)(id, showErrorDiv);\n  // 不用effect?\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    setInnerValue(value);\n    // valueRef.current = value\n  }, [value]);\n  (0,react__WEBPACK_IMPORTED_MODULE_19__.useEffect)(function () {\n    var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.isBindFieldMode)(value),\n      isBindField = _isBindFieldMode.isBindField,\n      bindField = _isBindFieldMode.bindField;\n    if (isBindField && !isFormulaMode) {\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.queryDataSourceAndAncestorByName)(bindField, definition);\n      // dataSource  field\n      if (field.dataSource === '$DsKey=[System]') res = true;\n      if (!res) {\n        var _field$bindField, _field$bindField$inde;\n        // DONE: KEY查询兼容实体名称修改的情况\n        // TODO: 性能优化\n        // TODO: 后台获取正确值 -> alias别名\n        var keyRes;\n        if (!field.dataSource && !field.bindField && field.anchorField) {\n          var _field$anchorField = field.anchorField,\n            _bindField = _field$anchorField.bindField,\n            dataSource = _field$anchorField.dataSource;\n          keyRes = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.queryDataSourceAndAncestorByKey)((0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.createDataSourceNodeKey)(dataSource, _bindField), definition);\n        } else {\n          keyRes = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.queryDataSourceAndAncestorByKey)((0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.createDataSourceNodeKey)(field.dataSource, field.bindField), definition);\n        }\n        if (!keyRes && (field === null || field === void 0 || (_field$bindField = field.bindField) === null || _field$bindField === void 0 || (_field$bindField$inde = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_14___default()(_field$bindField)) === null || _field$bindField$inde === void 0 ? void 0 : _field$bindField$inde.call(_field$bindField, '.')) !== -1) {\n          var _bindField2 = field.bindField.match(/w?\\w*$/)[0];\n          keyRes = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.queryDataSourceAndAncestorByKey)((0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.createDataSourceNodeKey)(field.dataSource, _bindField2), definition);\n        }\n        if (keyRes) {\n          showErrorDiv(false);\n          handleValidate(false);\n        } else {\n          showErrorDiv(true);\n          handleValidate(true);\n        }\n      } else {\n        showErrorDiv(false);\n        handleValidate(false);\n      }\n      return;\n    }\n    showErrorDiv(false);\n    handleValidate(false);\n  }, [value, definition, isFormulaMode]);\n  var handleValidate = function handleValidate(value) {\n    var _context2;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.eventBus.emit(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context2 = \"\".concat(_constants_ctrlMethodName__WEBPACK_IMPORTED_MODULE_30__.BEFORE_SAVE, \"_\")).call(_context2, id), value);\n  };\n  var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (val) {\n    if (val !== value) {\n      if (isFormulaMode) {\n        return dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, val), \"viewText\", ''))]]));\n      }\n      var _isBindFieldMode2 = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.isBindFieldMode)(val),\n        isBindField = _isBindFieldMode2.isBindField,\n        bindField = _isBindFieldMode2.bindField;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.console.log('isBindField', isBindField);\n      var emptyValue;\n      if (DataSourceInfo) {\n        emptyValue = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, val), DataSourceInfo, ''));\n      } else {\n        emptyValue = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, val), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationKey), ''), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationDataSource), ''), \"viewText\", ''), \"dsType\", ''));\n      }\n      if (isBindField) {\n        // 由于基础资料也是用.连接, 所以不能用.分割\n        // 需要模式匹配\n        var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.queryDataSourceAndAncestorByName)(bindField, definition);\n        if (!res) {\n          showErrorDiv(true);\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, emptyValue]]));\n          designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.console.error('queryDataSourceAndAncestorByName has no res', bindField, definition);\n          return;\n        }\n        showErrorDiv(false);\n        var dataSource = res.dataSource,\n          key = res.key,\n          viewText = res.viewText,\n          _dsType = res.dsType;\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.console.log('bindField, definition, res');\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.console.log(bindField, definition, res);\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, val), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationKey), key), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationDataSource), dataSource), \"viewText\", \"=$\".concat(viewText)), \"dsType\", _dsType))]]));\n      } else {\n        showErrorDiv(false);\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, emptyValue]]));\n      }\n    }\n  }, [id, value, propName, RelationKey, RelationDataSource, definition, isFormulaMode]);\n  var onExpressionSelect = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (data) {\n    var curTab = data.curTab;\n    if (!data) {\n      var args = {\n        bindField: '',\n        bindText: '',\n        dataSource: '',\n        dsType: '',\n        formulaData: [],\n        viewText: ''\n      };\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, args]]));\n    } else if (curTab === '2') {\n      var _formulaData = data.formulaData;\n      var updateValues = isFormulaMode ? {\n        formulaData: _formulaData\n      } : (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0003')), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationKey), ''), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationDataSource), ''), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationViewText), ''), \"dsType\", 'Formula'), \"formulaData\", _formulaData);\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)(updateValues)]]));\n    } else {\n      var node = data.selectNode;\n      onSelectNode(node);\n    }\n    setExpressionModalVisible(false);\n  }, [id, propName, definition, RelationViewText, RelationDataSource, RelationKey, propName, modalType, isFormulaMode]);\n  var onSelectNode = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (node) {\n    var _context3;\n    if (!node) return;\n    var key = node.key,\n      _node$InitAttr = node.InitAttr,\n      InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr;\n    var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.queryDataSourceAndAncestorByKey)(key, definition);\n    if (!res) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n      return;\n    }\n    var dataSource = res.dataSource,\n      ancestorTitle = res.ancestorTitle,\n      relationKey = res.key,\n      title = res.title,\n      dsType = res.dsType,\n      IgnoreZero = res.IgnoreZero,\n      IgnoreTailZero = res.IgnoreTailZero;\n    var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_15___default()(_context3 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_11___default()(InitAttr)).call(_context3, function (prop, key) {\n      prop[lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(key)] = InitAttr[key];\n      return prop;\n    }, {});\n    asignProp.ignoreZero = IgnoreZero;\n    asignProp.ignoreTailZero = IgnoreTailZero;\n    if (DataSourceInfo) {\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, \"=$\".concat(ancestorTitle)), DataSourceInfo, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationKey), relationKey), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationDataSource), dataSource), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationViewText), \"=$\".concat(title)), \"dsType\", dsType))))]]));\n    } else {\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_29__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, \"=$\".concat(ancestorTitle)), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationKey), relationKey), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationDataSource), dataSource), lodash__WEBPACK_IMPORTED_MODULE_21___default().camelCase(RelationViewText), \"=$\".concat(title)), \"dsType\", dsType), \"formulaData\", null), asignProp))]]));\n    }\n\n    // 这里需要标记，并且用户修改后的交互应该是怎么样的\n  }, [id, propName, definition, RelationViewText, RelationDataSource, RelationKey, propName, DataSourceInfo]);\n  var onDataSourceSelect = function onDataSourceSelect(node) {\n    onSelectNode(node);\n    setVisible(false);\n  };\n  var onCancel = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function () {\n    setVisible(false);\n  }, []);\n  var handleShowModal = function handleShowModal() {\n    setActiveTab(function () {\n      return isFormulaMode ? '2' : '1';\n    });\n    modalType === 'expression' ? setExpressionModalVisible(true) : setVisible(true);\n  };\n  var handleInputClick = function handleInputClick() {\n    if (readOnly) {\n      handleShowModal();\n    }\n  };\n  var onMouseOver = function onMouseOver() {\n    if (clearable && innerValue) {\n      setShowClear(true);\n    }\n  };\n  var onMouseLeave = function onMouseLeave() {\n    if (showClear) {\n      setShowClear(false);\n    }\n  };\n\n  //  filterTreeData--grid\n  var filterExpressionTreeData = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (definition) {\n    if (typeof filterExpressionTreeDataProps === 'function') {\n      definition = filterExpressionTreeDataProps(definition);\n    }\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_31__.filterSysTreeData)(definition, filterSysBindFields);\n  }, [filterExpressionTreeDataProps]);\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  var customFilterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_19__.useCallback)(function (definition) {\n    return filterTreeData((0,_utils_filterDataSource__WEBPACK_IMPORTED_MODULE_32__[\"default\"])(definition, DataSourceOption));\n  }, [DataSourceOption]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement((react__WEBPACK_IMPORTED_MODULE_19___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: nameTips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {\n    ref: errorRef,\n    className: className\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    onMouseOver: onMouseOver,\n    onMouseLeave: onMouseLeave\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Input\n  // {...getInputLengthProp(props)}\n  , {\n    onChange: function onChange(evt) {\n      var newValue = evt.target.value || '';\n      // if (MaxLength) {\n      //   if (newValue.length > MaxLength) {\n      //     setMessage(Tips.MaxLength)\n      //     newValue = newValue.slice(0, MaxLength)\n      //   }\n      // }\n      setInnerValue(newValue);\n    },\n    readOnly: readOnly,\n    onPressEnter: function onPressEnter() {/** 里面会自己触发blur */},\n    onBlur: function onBlur(evt) {\n      var newValue = evt.target.value || '';\n      var change = handleInputChange || handleChange;\n      if (MaxLength) {\n        if (newValue.length > MaxLength) {\n          (Tips === null || Tips === void 0 ? void 0 : Tips.MaxLength) && setMessage(Tips.MaxLength);\n          newValue = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_16___default()(newValue).call(newValue, 0, MaxLength);\n          setInnerValue(newValue);\n        }\n      }\n      change(newValue, showErrorDiv);\n    },\n    value: innerValue,\n    title: value,\n    type: \"string\",\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0002'),\n    borderType: \"bordered\",\n    prefix: isFormulaMode ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"span\", {\n      className: \"formula-prefix\"\n    }, \"fx\") : null,\n    onClick: handleInputClick,\n    suffix: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement((react__WEBPACK_IMPORTED_MODULE_19___default().Fragment), null, showClear && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Icon, {\n      type: \"close\",\n      style: {\n        cursor: 'pointer'\n      },\n      onClick: handleClear\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_20__.Icon, {\n      type: \"more\",\n      style: {\n        cursor: 'pointer'\n      },\n      onClick: handleShowModal\n    }))\n  }), isFormulaMode && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_17___default()(SHOW_FORMULA_HELPER_TEXT_TYPES).call(SHOW_FORMULA_HELPER_TEXT_TYPES, field.type) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(FormulaHelperText, null) : null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_23__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n    activedSelectId: id,\n    visible: visible,\n    modalTitle: modalTitle\n  }, context, {\n    filterTreeData: filterTreeData,\n    expandedKeys: expandedKeys,\n    selectedKey: selectedKey,\n    checkedKeys: checkedKeys,\n    onSelect: handleSelect ? _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_18___default()(handleSelect).call(handleSelect, null, setVisible) : onDataSourceSelect,\n    onCancel: onCancel,\n    className: prefixCls,\n    emptyNode: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(EmptyDataSource, {\n      className: \"left-datasource\"\n    }),\n    checkable: checkable\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(_components_common_expressionModal_slate__WEBPACK_IMPORTED_MODULE_25__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n    activedSelectId: id,\n    visible: expressionModalVisible,\n    activeTab: activeTab,\n    formulaData: formulaData\n  }, context, {\n    filterTreeData: customFilterTreeData,\n    filterExpressionTreeData: filterExpressionTreeData,\n    expandedKeys: expandedKeys,\n    setVisible: setExpressionModalVisible,\n    onSelect: handleSelect ? _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_18___default()(handleSelect).call(handleSelect, null, setExpressionModalVisible) : onExpressionSelect,\n    className: prefixCls,\n    DataSourceOption: DataSourceOption\n  })));\n};\nfunction EmptyDataSource(_ref2) {\n  var className = _ref2.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_27__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0004')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0004')));\n}\nvar LINE_WRAP_SPACE = ' ';\nfunction FormulaHelperText() {\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_19__.useContext)(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_33__[\"default\"]),\n    getPrefixCls = _useContext2.getPrefixCls,\n    prefixCls = _useContext2.prefixCls;\n  var printDesignerPrefixCls = getPrefixCls ? getPrefixCls(prefixCls, 'print-designer') : '';\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-formula-helper-text\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"span\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0125') + LINE_WRAP_SPACE), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"a\", {\n    href: \"https://vip.kingdee.com/article/583309331983209728\",\n    target: \"_blank\",\n    rel: \"noreferrer\"\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0126')));\n}\n\n//# sourceURL=webpack://print-designer/./src/editorControls/inputQuery.tsx?");

/***/ }),

/***/ 88304:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _colorPicker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8020);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98092);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\nvar BackGroudColor = function BackGroudColor(_ref) {\n  var value = _ref.value,\n    handleChange = _ref.handleChange,\n    enable = _ref.enable,\n    setColorPickVisible = _ref.setColorPickVisible,\n    setMoreBarVisible = _ref.setMoreBarVisible;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    showPanel = _useState2[0],\n    setShowPanel = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_constants__WEBPACK_IMPORTED_MODULE_5__.NAVTOOL_SELECT_ICON),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    iconType = _useState4[0],\n    setIconType = _useState4[1];\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n  var colorPickerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n  var iconRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_6__.useOnClickOutside)([ref, iconRef, colorPickerRef], function () {\n    // setShowPanel(false)\n  });\n  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n    if (!enable) {\n      setShowPanel(false);\n      setColorPickVisible(false);\n      setMoreBarVisible(false);\n    }\n  }, [enable]);\n  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n    enable && showPanel && setColorPickVisible(true);\n  }, [showPanel, enable]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(\"svg\", {\n    ref: ref,\n    className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(['navtool-icon', {\n      'editor-panel-visible': showPanel\n    }]),\n    width: \"200\",\n    height: \"200\",\n    viewBox: \"0 0 20 20\",\n    version: \"1.1\",\n    xmlns: \"http://www.w3.org/2000/svg\",\n    onClick: function onClick() {\n      setShowPanel(false);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_6__.getLangMsg)('printd.grid.key0014')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(\"g\", {\n    id: \"\\u6CB9\\u6F06\\u6876\",\n    stroke: \"none\",\n    \"stroke-width\": \"1\",\n    fill: \"none\",\n    \"fill-rule\": \"evenodd\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(\"g\", {\n    id: \"\\u7F16\\u7EC4\",\n    transform: \"translate(2.810513, 0.777902)\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(\"rect\", {\n    id: \"\\u77E9\\u5F62\\u5907\\u4EFD-3\",\n    stroke: \"#D9D9D9\",\n    \"stroke-width\": \"0.5\",\n    fill: value,\n    x: \"-0.060513479\",\n    y: \"15.9720982\",\n    width: \"14.5\",\n    height: \"2.5\",\n    rx: \"1\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(\"path\", {\n    d: \"M7.35237743,0.219669914 L8.05948421,0.926776695 L8.06299995,0.931 L12.8033719,5.58910098 C13.6474203,6.41866449 13.6988871,7.75029176 12.9455484,8.64490829 L12.82651,8.7757058 L7.52324583,14.07897 C6.68640806,14.9158077 5.35438522,14.9556572 4.47038697,14.1985182 L4.34126532,14.07897 L0.658927543,10.3966322 C-0.177910225,9.55979443 -0.217759275,8.22777195 0.539946158,7.34320727 L0.659583703,7.21399633 L6.45599995,1.445 L6.29171726,1.28033009 C5.99882404,0.987436867 5.99882404,0.512563133 6.29171726,0.219669914 C6.58461048,-0.0732233047 7.05948421,-0.0732233047 7.35237743,0.219669914 Z M12.7772674,11.2000162 C12.8448732,11.2253684 12.8982166,11.2787118 12.9235688,11.3463177 L13.6628014,13.3176044 C13.8643815,13.8551514 13.5920265,14.4543322 13.0544796,14.6559123 C12.9377675,14.6996794 12.8141351,14.7220982 12.6894865,14.7220982 C12.1153861,14.7220982 11.6499858,14.2566979 11.6499858,13.6825975 C11.6499858,13.557949 11.6724047,13.4343165 11.7161717,13.3176044 L12.4554042,11.3463177 C12.5038843,11.2170376 12.6479873,11.1515362 12.7772674,11.2000162 Z M7.52128565,2.50147715 L2.77699995,7.222 L11.9757231,7.22266041 C11.9821309,7.05395544 11.9319029,6.8835921 11.8253092,6.74250292 L11.751965,6.65901613 L7.52128565,2.50147715 Z\",\n    id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n    fill: \"#404040\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_4__.Icon, {\n    ref: iconRef,\n    type: iconType,\n    className: classnames__WEBPACK_IMPORTED_MODULE_3___default()(['navtool-icon-arrow', {\n      'editor-panel-visible': showPanel\n    }]),\n    onClick: function onClick() {\n      if (enable) {\n        setShowPanel(!showPanel);\n        // setIconType('NAVTOOL_SELECT_ICON')\n      }\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_colorPicker__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n    colorPickerRef: colorPickerRef,\n    poperContainer: ref,\n    showPanel: showPanel && enable,\n    color: value,\n    onClosePanel: function onClosePanel() {\n      setShowPanel(false);\n      // setIconType('arrow-up-solid')\n    },\n    onChange: function onChange(_ref2) {\n      var color = _ref2.color;\n      if (value !== color) {\n        handleChange(color);\n      }\n      // setShowPanel(false)\n    }\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (BackGroudColor);\n\n//# sourceURL=webpack://print-designer/./src/editorControls/navTool/backGroudColorEditor.tsx?");

/***/ }),

/***/ 8020:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3460);\n/* harmony import */ var _babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27688);\n/* harmony import */ var _babel_runtime_corejs3_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54895);\n/* harmony import */ var _babel_runtime_corejs3_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89280);\n/* harmony import */ var _babel_runtime_corejs3_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50024);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(37152);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(49464);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(40900);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(71536);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_15__);\n\n\n\n\n\n\n\n\n\n\n\nfunction _callSuper(t, o, e) { return o = (0,_babel_runtime_corejs3_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(o), (0,_babel_runtime_corejs3_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(t, _isNativeReflectConstruct() ? _babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_0___default()(o, e || [], (0,_babel_runtime_corejs3_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(t).constructor) : o.apply(t, e)); }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_babel_runtime_corejs3_core_js_stable_reflect_construct__WEBPACK_IMPORTED_MODULE_0___default()(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\n\n\n\n\n\n\n\n// 去除颜色中的#\nvar getColorNoSymbol = function getColorNoSymbol(color) {\n  return \"\".concat(color).replace('#', '');\n};\nvar ColorPicker = /*#__PURE__*/function (_React$Component) {\n  (0,_babel_runtime_corejs3_helpers_inherits__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(ColorPicker, _React$Component);\n  function ColorPicker(props) {\n    var _context, _context2, _context3, _context4, _context5;\n    var _this;\n    (0,_babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, ColorPicker);\n    _this = _callSuper(this, ColorPicker, [props]);\n    _this.state = {\n      color: getColorNoSymbol(props.color),\n      alpha: props.alpha,\n      isCheck: false\n    };\n    _this.clickFunc = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7___default()(_context = _this.clickFunc).call(_context, (0,_babel_runtime_corejs3_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this));\n    // this.handleCheck = this.handleCheck.bind(this)\n    _this.changeColorFromItems = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7___default()(_context2 = _this.changeColorFromItems).call(_context2, (0,_babel_runtime_corejs3_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this));\n    _this.handleKeyDown = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7___default()(_context3 = _this.handleKeyDown).call(_context3, (0,_babel_runtime_corejs3_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this));\n    _this.handleChangeText = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7___default()(_context4 = _this.handleChangeText).call(_context4, (0,_babel_runtime_corejs3_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this));\n    _this.handleBlur = _babel_runtime_corejs3_core_js_stable_instance_bind__WEBPACK_IMPORTED_MODULE_7___default()(_context5 = _this.handleBlur).call(_context5, (0,_babel_runtime_corejs3_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this));\n    return _this;\n  }\n  (0,_babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ColorPicker, [{\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      document.removeEventListener('click', this.clickFunc);\n    }\n  }, {\n    key: \"componentWillReceiveProps\",\n    value: function componentWillReceiveProps(nextProps) {\n      // 颜色选择器显示的颜色应当跟随选中的控件的颜色（字体、前景色）\n      if (this.props.color !== nextProps.color) {\n        this.setState({\n          color: getColorNoSymbol(nextProps.color)\n        });\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      if (this.props.showPanel) {\n        document.addEventListener('click', this.clickFunc);\n      } else {\n        document.removeEventListener('click', this.clickFunc);\n      }\n    }\n  }, {\n    key: \"clickFunc\",\n    value: function clickFunc(e) {\n      var target = e.target;\n      while (target) {\n        if (target === react_dom__WEBPACK_IMPORTED_MODULE_12___default().findDOMNode(this)) {\n          return;\n        }\n        target = target.parentNode;\n      }\n      this.closePanel();\n    }\n  }, {\n    key: \"createColorItems\",\n    value: function createColorItems() {\n      var _this2 = this;\n      if (this.props.showPanel) {\n        var cs = lodash__WEBPACK_IMPORTED_MODULE_13___default().flatten(this.props.colors);\n        return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()((lodash__WEBPACK_IMPORTED_MODULE_13___default())).call((lodash__WEBPACK_IMPORTED_MODULE_13___default()), cs, function (color, idx) {\n          color = color === 'current' ? _this2.props.color || '#ffffff' : color;\n          var style = {\n            backgroundColor: color\n          };\n          return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"span\", {\n            key: idx,\n            className: classnames__WEBPACK_IMPORTED_MODULE_14___default()('colorItem', 'kd-cq-color-picker-color-block'),\n            title: color,\n            style: style,\n            onClick: function onClick(e) {\n              return _this2.changeColorFromItems({\n                color: color && (_babel_runtime_corejs3_core_js_stable_instance_starts_with__WEBPACK_IMPORTED_MODULE_9___default()(color).call(color, '#') ? _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_10___default()(color).call(color, 1) : color),\n                alpha: _this2.state.alpha\n              });\n            }\n          });\n        });\n      } else {\n        return null;\n      }\n    }\n\n    // openPanel() {\n    //   let isCheck = false; const { color } = this.props\n    //   if (color === 'themeColor') {\n    //     isCheck = true\n    //   }\n    //   this.setState({\n    //     isCheck\n    //   }, () => {\n\n    //   })\n    // }\n  }, {\n    key: \"closePanel\",\n    value: function closePanel() {\n      this.props.onClosePanel();\n    }\n  }, {\n    key: \"changeColorFromItems\",\n    value: function changeColorFromItems(_ref) {\n      var color = _ref.color,\n        alpha = _ref.alpha;\n      if (this.state.isCheck) return;\n      this.changeColor({\n        color: color,\n        alpha: alpha\n      });\n    }\n  }, {\n    key: \"changeColor\",\n    value: function changeColor(_ref2) {\n      var _this3 = this;\n      var color = _ref2.color,\n        alpha = _ref2.alpha;\n      this.setState({\n        color: color,\n        alpha: alpha\n      }, function () {\n        var pattern = /^([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/;\n        if (color.match(pattern)) {\n          _this3.props.onChange({\n            color: '#' + color,\n            alpha: alpha\n          });\n        } else if (/^themeColor/.test(color)) {\n          _this3.props.onChange({\n            color: color,\n            alpha: alpha\n          });\n        }\n        // this.props.setPoperVisible?.(false)\n      });\n    }\n  }, {\n    key: \"handleChangeText\",\n    value: function handleChangeText(e) {\n      var target = e.target;\n      var value = target.value;\n      this.setState({\n        color: value,\n        alpha: this.state.alpha\n      });\n    }\n  }, {\n    key: \"handleChangeAlpha\",\n    value: function handleChangeAlpha(e) {\n      var color = this.state.color;\n      var target = e.target;\n      var value = target.value;\n      // 透明度阈值是[0, 100], 超出则不修改当前值\n      if (value < 0 || value > 100) {\n        return;\n      }\n      this.changeColor({\n        color: color,\n        alpha: value\n      });\n    }\n\n    // handleCheck (e) {\n    //   let { isCheck, alpha } = this.state\n    //   isCheck = !isCheck\n    //   const color = isCheck ? 'themeColor' : ''\n    //   alpha = isCheck ? alpha : 100\n    //   this.setState({\n    //     isCheck,\n    //     color\n    //   }, () => {\n    //     this.props.onChange({ color, alpha })\n    //   })\n    // }\n  }, {\n    key: \"handleKeyDown\",\n    value: function handleKeyDown(e) {\n      if (e.keyCode === 13) {\n        this.changeColorFromItems({\n          color: this.state.color,\n          alpha: this.state.alpha\n        });\n      }\n    }\n  }, {\n    key: \"handleBlur\",\n    value: function handleBlur(e) {\n      this.changeColorFromItems({\n        color: this.state.color,\n        alpha: this.state.alpha\n      });\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _poperContainer$curre, _poperContainer$curre2;\n      var _this$props = this.props,\n        color = _this$props.color,\n        alpha = _this$props.alpha,\n        defaultColor = _this$props.defaultColor,\n        poperContainer = _this$props.poperContainer;\n      var isCheck = this.state.isCheck;\n      var opacity = 1;\n      if (alpha > -1) {\n        opacity = alpha / 100;\n      }\n      var dom = poperContainer === null || poperContainer === void 0 ? void 0 : poperContainer.current;\n      var _ref3 = (_poperContainer$curre = poperContainer === null || poperContainer === void 0 || (_poperContainer$curre2 = poperContainer.current) === null || _poperContainer$curre2 === void 0 ? void 0 : _poperContainer$curre2.getBoundingClientRect()) !== null && _poperContainer$curre !== void 0 ? _poperContainer$curre : {},\n        _ref3$left = _ref3.left,\n        left = _ref3$left === void 0 ? 0 : _ref3$left,\n        _ref3$top = _ref3.top,\n        top = _ref3$top === void 0 ? 0 : _ref3$top;\n      if (dom) {\n        return /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_12___default().createPortal( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          ref: this.props.colorPickerRef,\n          className: \"colorPicker\",\n          style: {\n            position: 'absolute',\n            top: top - 77 + 39,\n            left: left,\n            zIndex: 1050\n          }\n        }, this.props.showPanel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: classnames__WEBPACK_IMPORTED_MODULE_14___default()('colorPanel', 'kd-cq-color-picker kd-cq-printd-color-picker')\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"colors\"\n        }, this.createColorItems(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"footer\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: classnames__WEBPACK_IMPORTED_MODULE_14___default()('colorInfo', 'kd-cq-color-picker-color-block'),\n          style: {\n            backgroundColor: \"#\".concat(this.state.color)\n          }\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"span\", {\n          className: \"text\"\n        }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0015')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"customColorInput\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"span\", {\n          className: \"punctuation\"\n        }, \"#\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"input\", {\n          placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0016'),\n          value: this.state.color,\n          onChange: this.handleChangeText,\n          onKeyDown: this.handleKeyDown,\n          onBlur: this.handleBlur\n        }))))) : null), document.body);\n      } else {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"colorPicker\"\n        }, this.props.showPanel ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: classnames__WEBPACK_IMPORTED_MODULE_14___default()('colorPanel', 'kd-cq-color-picker kd-cq-printd-color-picker')\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"colors\"\n        }, this.createColorItems(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"footer\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: classnames__WEBPACK_IMPORTED_MODULE_14___default()('colorInfo', 'kd-cq-color-picker-color-block'),\n          style: {\n            backgroundColor: \"#\".concat(this.state.color)\n          }\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"span\", {\n          className: \"text\"\n        }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0015'), \" \"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"div\", {\n          className: \"customColorInput\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"span\", {\n          className: \"punctuation\"\n        }, \"#\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"input\", {\n          placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_15__.getLangMsg)('printd.grid.key0016'),\n          value: this.state.color,\n          onChange: this.handleChangeText,\n          onKeyDown: this.handleKeyDown,\n          onBlur: this.handleBlur\n        }))))) : null);\n      }\n    }\n  }]);\n  return ColorPicker;\n}((react__WEBPACK_IMPORTED_MODULE_11___default().Component));\nColorPicker.propTypes = {\n  color: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n  alpha: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().number),\n  defaultColor: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().string),\n  onChange: (prop_types__WEBPACK_IMPORTED_MODULE_16___default().func)\n};\nColorPicker.defaultProps = {\n  colors: [['#45cdff', '#3dccc0', '#40bd6e', '#99d92b', '#ffd52e', '#ffb44a', '#ff854d', '#ff5257', '#ff3b72', '#9a4dff', '#3987ed', '#5797ff'], ['#16b0f1', '#16b8b1', '#1ba854', '#77c404', '#fdc200', '#ff991c', '#ff5f1f', '#fb2323', '#f90d58', '#701df0', '#0e5fd8', '#276ff5'], ['#ffffff', '#fafafa', '#f5f5f5', '#f2f2f2', '#e5e5e5', '#d9d9d9', '#cccccc', '#999999', '#666666', '#404040', '#212121', '#000000']],\n  alpha: 100,\n  color: '#ffffff',\n  defaultColor: '#ffffff'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ColorPicker);\n\n//# sourceURL=webpack://print-designer/./src/editorControls/navTool/colorPicker.tsx?");

/***/ }),

/***/ 36372:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _colorPicker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8020);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\nvar TextColorEditor = function TextColorEditor(_ref) {\n  var value = _ref.value,\n    handleChange = _ref.handleChange,\n    enable = _ref.enable,\n    setColorPickVisible = _ref.setColorPickVisible,\n    setMoreBarVisible = _ref.setMoreBarVisible;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useState, 2),\n    showPanel = _useState2[0],\n    setShowPanel = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(_constants__WEBPACK_IMPORTED_MODULE_7__.NAVTOOL_SELECT_ICON),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useState3, 2),\n    iconType = _useState4[0],\n    setIconType = _useState4[1];\n  var colorPickerRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  var iconRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_6__.useOnClickOutside)([ref, iconRef, colorPickerRef], function () {\n    // setShowPanel(false)\n  });\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    if (!enable) {\n      setShowPanel(false);\n      setColorPickVisible(false);\n      setMoreBarVisible(false);\n    }\n  }, [enable]);\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    enable && showPanel && setColorPickVisible(true);\n  }, [showPanel, enable]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"svg\", (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    ref: ref,\n    className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(['navtool-icon', {\n      'editor-panel-visible': showPanel\n    }]),\n    width: \"200\",\n    height: \"200\",\n    viewBox: \"0 0 20 20\",\n    version: \"1.1\",\n    xmlns: \"http://www.w3.org/2000/svg\",\n    onClick: function onClick() {}\n  }, \"onClick\", function onClick() {\n    return setShowPanel(false);\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_6__.getLangMsg)('printd.grid.key0017')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"g\", {\n    id: \"\\u6587\\u5B57\\u989C\\u8272\",\n    stroke: \"none\",\n    \"stroke-width\": \"1\",\n    fill: \"none\",\n    \"fill-rule\": \"evenodd\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"g\", {\n    id: \"\\u7F16\\u7EC4\",\n    transform: \"translate(3.000000, 1.225936)\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"path\", {\n    d: \"M7.10199875,0.000488183945 C7.39408208,-0.0100860974 7.67791213,0.151661551 7.80920279,0.433215284 L7.80920279,0.433215284 L13.7258585,13.1215243 C13.9009127,13.4969293 13.7384963,13.9431646 13.3630913,14.1182188 C12.9876863,14.2932731 12.541451,14.1308567 12.3663968,13.7554517 L12.3663968,13.7554517 L10.2754569,9.274 L3.87745688,9.274 L1.7883667,13.7554517 C1.61331249,14.1308567 1.16707714,14.2932731 0.791672168,14.1182188 C0.416267191,13.9431646 0.253850808,13.4969293 0.428905024,13.1215243 L6.34556069,0.433215284 C6.48061111,0.143598729 6.77706251,-0.0192517453 7.07787471,0.00182180938 Z M7.07645688,2.413 L4.57645688,7.774 L9.57645688,7.774 L7.07645688,2.413 Z\",\n    id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n    fill: \"#404040\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"rect\", {\n    id: \"\\u77E9\\u5F62\\u5907\\u4EFD-2\",\n    stroke: \"#D9D9D9\",\n    \"stroke-width\": \"0.5\",\n    fill: value,\n    x: \"-0.25\",\n    y: \"15.5240643\",\n    width: \"14.5\",\n    height: \"2.5\",\n    rx: \"1\"\n  })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_5__.Icon, {\n    ref: iconRef,\n    type: iconType,\n    className: classnames__WEBPACK_IMPORTED_MODULE_4___default()(['navtool-icon-arrow', {\n      'editor-panel-visible': showPanel\n    }]),\n    onClick: function onClick() {\n      if (enable) {\n        setShowPanel(!showPanel);\n        // setIconType(NAVTOOL_SELECT_ICON)\n      }\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_colorPicker__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n    colorPickerRef: colorPickerRef,\n    poperContainer: ref,\n    showPanel: showPanel && enable,\n    color: value,\n    onClosePanel: function onClosePanel() {\n      setShowPanel(false);\n      // setIconType('arrow-up-solid')\n    },\n    onChange: function onChange(_ref2) {\n      var color = _ref2.color;\n      if (value !== color) {\n        handleChange(color);\n      }\n    }\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (TextColorEditor);\n\n//# sourceURL=webpack://print-designer/./src/editorControls/navTool/fontColorEditor.tsx?");

/***/ }),

/***/ 43272:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\n\n\nvar DEFAULT_SIZE = 6;\nvar prefixClassName = 'nav-tool-fontsize';\nvar FontSizeEditor = function FontSizeEditor(_ref) {\n  var options = _ref.options,\n    disabled = _ref.disabled,\n    className = _ref.className,\n    value = _ref.value,\n    onChange = _ref.onChange,\n    _ref$dropdownStyle = _ref.dropdownStyle,\n    dropdownStyle = _ref$dropdownStyle === void 0 ? {} : _ref$dropdownStyle,\n    bizType = _ref.bizType;\n  var ref = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n  var iconRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    visible = _useState2[0],\n    setVisible = _useState2[1];\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_8__.useOnClickOutside)([ref, iconRef], function (e) {\n    var node = e.target;\n    while (node) {\n      var _context;\n      if (node.classList && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_2___default()(node.classList)).call(_context, \"\".concat(prefixClassName, \"-dropdown\"))) {\n        return;\n      }\n      node = node.parentNode;\n    }\n    setVisible(false);\n  });\n  var menu = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(options).call(options, function (_ref2) {\n    var label = _ref2.label,\n      val = _ref2.value;\n    return {\n      key: val,\n      label: label,\n      selected: value === val\n    };\n  });\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);\n  (0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {\n    var _inputRef$current;\n    (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_4___default()(function () {\n      var _inputRef$current2;\n      (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.blur();\n    });\n  }, []);\n  var handleItemClick = function handleItemClick(key) {\n    onChange(key);\n    setVisible(false);\n  };\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(value),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    innerValue = _useState4[0],\n    setInnerValue = _useState4[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {\n    setInnerValue(value);\n  }, [value]);\n  var handleFocus = (0,react__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function () {\n    // 点击要选中全部\n    inputRef.current.select();\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(\"div\", {\n    ref: ref,\n    className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(prefixClassName, className)\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_7__.Dropdown, {\n    key: \"fontsize-dropdown-\".concat(value),\n    selectable: true,\n    defaultKey: value,\n    getTriggerElement: function getTriggerElement() {\n      return iconRef.current;\n    },\n    popperClassName: \"\".concat(prefixClassName, \"-dropdown\"),\n    className: \"\".concat(prefixClassName, \"-dropdown\"),\n    disabled: disabled,\n    dropdownStyle: dropdownStyle,\n    menu: menu,\n    onItemClick: handleItemClick,\n    visible: visible\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_7__.InputNumber, {\n    ref: inputRef,\n    disabled: disabled,\n    borderType: \"bordered\",\n    decimalLength: 2,\n    onFocus: handleFocus,\n    value: innerValue,\n    onChange: function onChange(e) {\n      if (bizType !== '1') {\n        var val = e.target.value;\n        setInnerValue(val || '');\n      }\n    },\n    onBlur: function onBlur(e) {\n      var val = e.target.value;\n      onChange(isNaN(+val) ? DEFAULT_SIZE : +val);\n    },\n    className: \"\".concat(prefixClassName, \"-input\"),\n    onPressEnter: function onPressEnter() {/** 里面会自己触发blur */}\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_7__.Icon, {\n    ref: iconRef,\n    type: _constants__WEBPACK_IMPORTED_MODULE_9__.NAVTOOL_SELECT_ICON,\n    onClick: function onClick() {\n      setVisible(!visible);\n    }\n  }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (FontSizeEditor);\n\n//# sourceURL=webpack://print-designer/./src/editorControls/navTool/fontSizeEditor.tsx?");

/***/ }),

/***/ 34356:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* binding */ InputQuery; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _inputQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27136);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77620);\n\n\n\n\n\nvar InputQuery = function InputQuery(props) {\n  var _props$editor;\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (definition) {\n    definition = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(definition).call(definition, function (def) {\n      return def.DsType !== 'Sys';\n    });\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__.filterTreeByOmitType)(definition, 'Image');\n  }, []);\n  var filterExpressionTreeData = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (definition) {\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__.filterTreeByOmitType)(definition, 'Image');\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_inputQuery__WEBPACK_IMPORTED_MODULE_3__.InputQuery, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    filterTreeData: filterTreeData,\n    filterExpressionTreeData: filterExpressionTreeData\n  }, props, {\n    modalType: (props === null || props === void 0 || (_props$editor = props.editor) === null || _props$editor === void 0 ? void 0 : _props$editor.SupportFx) && 'expression'\n  }));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/qrCode/index.tsx?");

/***/ }),

/***/ 57472:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* binding */ Query; },\n/* harmony export */   Query: function() { return /* binding */ Query; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(84945);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36324);\n/* harmony import */ var _components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(53828);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(32064);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(77620);\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default()(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default()(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Query = function Query(props) {\n  var id = props.id,\n    propName = props.propName,\n    dataContext = props.dataContext,\n    value = props.value,\n    className = props.className,\n    activedSelectId = props.activedSelectId,\n    RelationKey = props.RelationKey,\n    RelationDataSource = props.RelationDataSource,\n    RelationViewText = props.RelationViewText,\n    name = props.Name,\n    nameTips = props.Tips,\n    _props$Editor = props.Editor,\n    Editor = _props$Editor === void 0 ? {} : _props$Editor,\n    field = props.field;\n  var nameHidden = Editor.NameHidden;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useState, 2),\n    visible = _useState2[0],\n    setVisible = _useState2[1];\n  var context = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(_context__WEBPACK_IMPORTED_MODULE_15__.PrintDesignerContext);\n  var meta = context.meta,\n    definition = context.definition;\n  var prefixCls = 'left-datasource';\n  var onSelect = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (node) {\n    var _context;\n    if (!node) setVisible(false);\n    var key = node.key,\n      _node$InitAttr = node.InitAttr,\n      InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr;\n    var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_19__.queryDataSourceAndAncestorByKey)(key, definition);\n    if (!res) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n      return;\n    }\n    var dataSource = res.dataSource,\n      ancestorTitle = res.ancestorTitle,\n      relationKey = res.key,\n      title = res.title,\n      dsType = res.dsType,\n      IgnoreZero = res.IgnoreZero,\n      IgnoreTailZero = res.IgnoreTailZero;\n    var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_11___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(InitAttr)).call(_context, function (prop, key) {\n      prop[lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(key)] = InitAttr[key];\n      return prop;\n    }, {});\n    asignProp.ignoreZero = IgnoreZero;\n    asignProp.ignoreTailZero = IgnoreTailZero;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[id, (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_19__.filterKeyValueByNotUndefined)(_objectSpread((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propName, \"=$\".concat(ancestorTitle)), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationKey), relationKey), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationDataSource), dataSource), lodash__WEBPACK_IMPORTED_MODULE_14___default().camelCase(RelationViewText), \"=$\".concat(title)), \"dsType\", dsType), asignProp))]]));\n    setVisible(false);\n  }, [id, propName, definition, RelationViewText, RelationDataSource, RelationKey, propName]);\n  var onCancel = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function () {\n    setVisible(false);\n  }, []);\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (definition) {\n    if (field.type === 'RichText') {\n      definition = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_21__.filterTreeByCallbackValue)(definition, function () {}, 'Sys');\n    }\n    return (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_21__.filterTreeByTextFormat)(definition, ['Text', 'RichText']);\n  }, [field.type]);\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_12__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.GlobalConfigContext),\n    invokePrintDesignerCustomEvent = _useContext.invokePrintDesignerCustomEvent;\n  var handleLinkClick = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (code) {\n    invokePrintDesignerCustomEvent('clickTipsLink', code);\n  }, [invokePrintDesignerCustomEvent]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement((react__WEBPACK_IMPORTED_MODULE_12___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.NameTipWrapper, {\n    nameHidden: nameHidden,\n    className: className,\n    name: name,\n    tips: nameTips,\n    onLinkClick: handleLinkClick\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query\"),\n    onClick: function onClick() {\n      return setVisible(true);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_16___default()([\"\".concat(className, \"-query-text\"), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, \"\".concat(className, \"-query-text-empty\"), !value)])\n  }, value || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0014')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-query-btn\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.Icon, {\n    type: \"more\",\n    style: {\n      cursor: 'pointer'\n    }\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_components_common_dataSourceModal__WEBPACK_IMPORTED_MODULE_18__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    activedSelectId: id,\n    visible: visible,\n    filterTreeData: filterTreeData\n  }, context, {\n    onSelect: onSelect,\n    onCancel: onCancel,\n    className: prefixCls,\n    emptyNode: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(EmptyDataSource, {\n      className: \"left-datasource\"\n    })\n  })));\n};\nfunction EmptyDataSource(_ref2) {\n  var className = _ref2.className;\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"img\", {\n    className: \"\".concat(className, \"-empty-img\"),\n    src: _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_17__[\"default\"],\n    width: \"168\",\n    height: \"96\",\n    alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0014')\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-empty-text\")\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.getLangMsg)('printd.grid.key0014')));\n}\n\n\n//# sourceURL=webpack://print-designer/./src/editorControls/richText/index.tsx?");

/***/ }),

/***/ 24028:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ImageUpload: function() { return /* binding */ ImageUpload; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85640);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85344);\n/* harmony import */ var _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(84945);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(41232);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar ImageUpload = function ImageUpload(props) {\n  var _context5;\n  var handleChange = props.handleChange,\n    value = props.value,\n    className = props.className,\n    rootId = props.rootId,\n    Name = props.Name,\n    dataContext = props.dataContext,\n    propName = props.propName;\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_9__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_11__.GlobalConfigContext),\n    previewImageUrl = _useContext.previewImageUrl,\n    uploadImageUrl = _useContext.uploadImageUrl;\n  var prefixCls = 'editor';\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_9__.useState)([]),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useState, 2),\n    fileList = _useState2[0],\n    setFileList = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_9__.useState)(''),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useState3, 2),\n    status = _useState4[0],\n    setStatus = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_9__.useState)(function () {\n      var _context;\n      var rcId = value || '';\n      return rcId ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context = \"\".concat(previewImageUrl)).call(_context, rcId) : '';\n    }),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_useState5, 2),\n    imgSrc = _useState6[0],\n    setImgSrc = _useState6[1];\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_9__.useContext)(_context__WEBPACK_IMPORTED_MODULE_12__.PrintDesignerContext),\n    setMessage = _useContext2.setMessage;\n  var templateId = dataContext.getData().id || '';\n  var getImageSize = function getImageSize(src) {\n    return new (_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_6___default())(function (resolve, reject) {\n      var rootId = dataContext.getRootId();\n      var paper = dataContext.findControl(rootId);\n      var width = paper.width,\n        height = paper.height;\n      var image = new Image();\n      image.src = src;\n      var bgImageSize = {\n        width: 0,\n        height: 0\n      };\n      image.onload = function () {\n        var imageWidth = image.width,\n          imageHeight = image.height;\n        imageWidth = (0,_utils__WEBPACK_IMPORTED_MODULE_14__.calculatorPxtoMM)(imageWidth, 1);\n        imageHeight = (0,_utils__WEBPACK_IMPORTED_MODULE_14__.calculatorPxtoMM)(imageHeight, 1);\n        if (imageWidth > width) {\n          bgImageSize = {\n            width: width,\n            height: imageHeight * width / imageWidth\n          };\n        } else {\n          bgImageSize = {\n            width: imageWidth,\n            height: imageHeight\n          };\n        }\n        resolve(bgImageSize);\n      };\n    });\n  };\n  var onUploadChange = /*#__PURE__*/function () {\n    var _ref = (0,_babel_runtime_corejs3_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[\"default\"])( /*#__PURE__*/_babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4___default().mark(function _callee(info) {\n      var uploadStatus, fileList, uploadResult, _context2, _uploadResult, rcId, downloadUrl, _yield$getImageSize, width, height;\n      return _babel_runtime_corejs3_regenerator__WEBPACK_IMPORTED_MODULE_4___default().wrap(function _callee$(_context3) {\n        while (1) switch (_context3.prev = _context3.next) {\n          case 0:\n            uploadStatus = info.file.status;\n            fileList = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(info.fileList);\n            fileList = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_7___default()(fileList).call(fileList, -1);\n            fileList = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_8___default()(fileList).call(fileList, function (file) {\n              var response = file.response;\n              if (response) {\n                var rcId = response.rcId,\n                  fileName = response.fileName,\n                  _status = response.status,\n                  message = response.message;\n                // file.url = file.response.url\n                // handleChange(file.url)\n                if (_status === '1') {\n                  uploadResult = {\n                    rcId: rcId,\n                    name: fileName\n                  };\n                  uploadStatus = 'success';\n                } else {\n                  uploadStatus = 'error';\n                  setMessage(message || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_11__.getLangMsg)('printd.grid.key0019'));\n                }\n              }\n              return file;\n            });\n            if (!uploadResult) {\n              _context3.next = 14;\n              break;\n            }\n            _uploadResult = uploadResult, rcId = _uploadResult.rcId;\n            downloadUrl = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context2 = \"\".concat(previewImageUrl)).call(_context2, rcId);\n            _context3.next = 9;\n            return getImageSize(downloadUrl);\n          case 9:\n            _yield$getImageSize = _context3.sent;\n            width = _yield$getImageSize.width;\n            height = _yield$getImageSize.height;\n            setImgSrc(downloadUrl);\n            handleChange(rcId);\n          case 14:\n            setFileList(fileList);\n            console.log('upload------', uploadStatus);\n            setStatus(function () {\n              return uploadStatus === 'error' ? 'error' : 'success';\n            });\n          case 17:\n          case \"end\":\n            return _context3.stop();\n        }\n      }, _callee);\n    }));\n    return function onUploadChange(_x) {\n      return _ref.apply(this, arguments);\n    };\n  }();\n  var handleDeleteBackground = function handleDeleteBackground() {\n    setImgSrc('');\n    setFileList([]);\n    handleChange('');\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_9__.useEffect)(function () {\n    var _context4;\n    var rcId = value || '';\n    setImgSrc(rcId ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context4 = \"\".concat(previewImageUrl)).call(_context4, rcId) : '');\n  }, [value]);\n  var action = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_5___default()(_context5 = \"\".concat(uploadImageUrl)).call(_context5, templateId);\n  // const action = 'https://www.mocky.io/v2/5cc8019d300000980a055e76'\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement((react__WEBPACK_IMPORTED_MODULE_9___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_10___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(className, \"-title\"), true))\n  }, Name), !imgSrc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.Upload, {\n    className: \"\".concat(className, \"-background-upload\")\n    // style={{ width: '100%' }}\n    ,\n    action: action,\n    accept: \".jpg,.jpeg,.png,.bmp\",\n    fileList: fileList,\n    onChange: onUploadChange\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-upload\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.Icon, {\n    type: \"add\"\n  }))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-upload-preview\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"img\", {\n    src: imgSrc,\n    alt: \"\"\n  }), imgSrc && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-upload-preview-bg\"),\n    onClick: handleDeleteBackground\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"shanchu\"\n  }))));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/root/imageUpload.tsx?");

/***/ }),

/***/ 31384:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ImageUpload: function() { return /* reexport safe */ _imageUpload__WEBPACK_IMPORTED_MODULE_1__.ImageUpload; },\n/* harmony export */   PaperDirection: function() { return /* reexport safe */ _pageDirection__WEBPACK_IMPORTED_MODULE_0__.PaperDirection; }\n/* harmony export */ });\n/* harmony import */ var _pageDirection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39684);\n/* harmony import */ var _imageUpload__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24028);\n\n\n\n//# sourceURL=webpack://print-designer/./src/editorControls/root/index.tsx?");

/***/ }),

/***/ 39684:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   PaperDirection: function() { return /* binding */ PaperDirection; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\nvar PaperDirection = function PaperDirection(_ref) {\n  var className = _ref.className,\n    Editor = _ref.Editor,\n    value = _ref.value,\n    handleChange = _ref.handleChange;\n  if (!value) designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.console.error('PaperDirection value is null');\n  var Enum = Editor.Enum;\n  var prefixCls = 'editor';\n  // 这里怎么驱动还要商榷下\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n    style: {\n      opacity: 1,\n      visibility: 'hidden',\n      height: '16px'\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.getLangMsg)('printd.grid.key0020')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-page-direction\")\n  }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(Enum).call(Enum, function (_ref2) {\n    var Value = _ref2.Value;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-page-direction-enable\"), Value === value)),\n      onClick: function onClick() {\n        handleChange(Value);\n      },\n      title: Value === 'horizontal' ? (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.getLangMsg)('printd.grid.key0021') : (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.getLangMsg)('printd.grid.key0022'),\n      key: Value\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n      className: classnames__WEBPACK_IMPORTED_MODULE_3___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"\".concat(prefixCls, \"-page-direction-horizontal\"), Value === 'horizontal'), \"\".concat(prefixCls, \"-page-direction-veritical\"), Value === 'vertical'))\n    }));\n  })));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/root/pageDirection.tsx?");

/***/ }),

/***/ 67852:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* reexport safe */ _dataCell__WEBPACK_IMPORTED_MODULE_0__.InputQuery; }\n/* harmony export */ });\n/* harmony import */ var _dataCell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16188);\n\n\n//# sourceURL=webpack://print-designer/./src/editorControls/subDataCell/index.tsx?");

/***/ }),

/***/ 70544:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   Query: function() { return /* reexport safe */ _dataGrid__WEBPACK_IMPORTED_MODULE_0__.Query; }\n/* harmony export */ });\n/* harmony import */ var _dataGrid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28852);\n\n\n//# sourceURL=webpack://print-designer/./src/editorControls/subDataGrid/index.tsx?");

/***/ }),

/***/ 55924:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   InputQuery: function() { return /* binding */ InputQuery; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _inputQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27136);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(77620);\n\n\n\n\n\nvar InputQuery = function InputQuery(props) {\n  var _props$field;\n  var dataContext = props.dataContext,\n    field = props.field;\n  var type = props === null || props === void 0 || (_props$field = props.field) === null || _props$field === void 0 ? void 0 : _props$field.type;\n  var isNotLayoutCell = type !== 'LayoutCell';\n  var parentControl = dataContext.findControl(field.parentId);\n  var _ref = parentControl || {},\n    parentId = _ref.id,\n    parentDataSource = _ref.dataSource,\n    parentType = _ref.type;\n  var filterTreeData = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (definition) {\n    var PPControl = dataContext.findControl(parentId); // 单元格\n    var PPCellType = PPControl === null || PPControl === void 0 ? void 0 : PPControl.cellType;\n    var PPPControl = dataContext.findControl(PPControl === null || PPControl === void 0 ? void 0 : PPControl.parentId); // 表格\n    // if (parentType === 'DataCell' && PPPControl && ['Detail', 'Group'].includes(PPCellType)) {\n    //   const dataSourceFilter = PPPControl.dataSource\n    //   if (dataSourceFilter) {\n    //     definition = filterGridDataSource(definition)\n    //     definition = filterTreeByDataSource(definition, parentDataSource)\n    //   }\n    //   return definition\n    // }\n    definition = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(definition).call(definition, function (def) {\n      return def.DsType !== 'Sys';\n    });\n    return isNotLayoutCell ? (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__.filterTreeByOmitType)(definition, 'Image') : definition;\n  }, [type]);\n  var filterExpressionTreeData = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function (definition) {\n    return isNotLayoutCell ? (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_4__.filterTreeByOmitType)(definition, 'Image') : definition;\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_inputQuery__WEBPACK_IMPORTED_MODULE_3__.InputQuery, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n    modalType: \"expression\",\n    filterTreeData: filterTreeData,\n    filterExpressionTreeData: filterExpressionTreeData\n  }));\n};\n\n//# sourceURL=webpack://print-designer/./src/editorControls/textField/index.tsx?");

/***/ }),

/***/ 46860:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_use__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(52484);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71536);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\nvar CustomToolTip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function (_ref, forwardedRef) {\n  var _inputRef$current$get2, _inputRef$current2;\n  var className = _ref.className,\n    children = _ref.children,\n    tipText = _ref.tipText;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    visible = _useState2[0],\n    setVisible = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    isEffect = _useState4[0],\n    setIsEffect = _useState4[1];\n  // const [text, setText] = useState()\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      show: function show() {\n        !visible && setVisible(true);\n      },\n      hide: function hide() {\n        visible && setVisible(false);\n      }\n    };\n  }, [visible]);\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    var cb = function cb() {\n      // visible && setVisible(false)\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    };\n    window.addEventListener('scroll', cb);\n    window.addEventListener('resize', cb);\n    return function () {\n      window.removeEventListener('scroll', cb);\n      window.addEventListener('resize', cb);\n    };\n  }, [visible]);\n  var leftPosRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(0);\n  var topPosRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(0);\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  var errorDivRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  var node = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(children, {\n    ref: inputRef\n  });\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    setIsEffect(true);\n  }, [children]);\n  // children deps?\n  var updateErrorDivRef = function updateErrorDivRef(left, top) {\n    if (left - 1 === leftPosRef.current && topPosRef.current === top + 35) {\n      return;\n    }\n    leftPosRef.current = left - 1;\n    topPosRef.current = top + 35;\n    if (errorDivRef.current) {\n      errorDivRef.current.style.left = \"\".concat(left - 1, \"px\");\n      errorDivRef.current.style.top = \"\".concat(top + 35, \"px\");\n    }\n  };\n  var updateErrorDivVisible = function updateErrorDivVisible(intersectionRatioVisible) {\n    if (!intersectionRatioVisible) return;\n    if (visible) {\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_1___default()(function () {\n        // 与render区分开\n        if (errorDivRef.current) {\n          errorDivRef.current.style.display = intersectionRatioVisible ? 'flex' : 'none';\n        }\n      });\n    }\n  };\n  var intersectionObserverEntry = (0,react_use__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(inputRef, {\n    rootMargin: '0px',\n    threshold: 1.0\n  });\n  updateErrorDivVisible(intersectionObserverEntry === null || intersectionObserverEntry === void 0 ? void 0 : intersectionObserverEntry.isIntersecting);\n  var frameRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  var isUnmountRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n  var setPos = function setPos() {\n    if (visible && !isUnmountRef.current) {\n      if (errorDivRef.current && inputRef.current) {\n        var _inputRef$current$get, _inputRef$current;\n        var _ref2 = (_inputRef$current$get = (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.getBoundingClientRect()) !== null && _inputRef$current$get !== void 0 ? _inputRef$current$get : {\n            left: 0,\n            top: 0\n          },\n          _left = _ref2.left,\n          _top = _ref2.top;\n        updateErrorDivRef(_left, _top);\n      } else {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.console.error('miss errorDivRef or inputRef', errorDivRef, inputRef);\n      }\n      window.cancelAnimationFrame(frameRef.current);\n      frameRef.current = window.requestAnimationFrame(function () {\n        setPos();\n      });\n    }\n  };\n  if ((intersectionObserverEntry === null || intersectionObserverEntry === void 0 ? void 0 : intersectionObserverEntry.intersectionRatio) !== 0) {\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_1___default()(function () {\n      window.cancelAnimationFrame(frameRef.current);\n      setPos();\n    }, 0);\n  }\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    return function () {\n      window.cancelAnimationFrame(frameRef.current);\n      isUnmountRef.current = true;\n    };\n  }, []);\n  var _ref3 = (_inputRef$current$get2 = (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.getBoundingClientRect()) !== null && _inputRef$current$get2 !== void 0 ? _inputRef$current$get2 : {\n      left: 0,\n      top: 0\n    },\n    left = _ref3.left,\n    top = _ref3.top;\n  return isEffect && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement((react__WEBPACK_IMPORTED_MODULE_2___default().Fragment), null, node, inputRef.current && visible && /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_4___default().createPortal( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(\"div\", {\n    ref: errorDivRef,\n    className: \"\".concat(className, \"-tooltip\"),\n    style: {\n      display: visible ? 'flex' : 'none',\n      left: left - 1,\n      top: top + 35\n    }\n  }, tipText || (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getLangMsg)('printd.grid.key0005')), document.body));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (CustomToolTip);\n\n//# sourceURL=webpack://print-designer/./src/editorControls/tooltip.tsx?");

/***/ }),

/***/ 38508:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _components_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(96432);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n// 属性是否要从constant引入，先不用\n// import\n// 不用我进行组装?\nvar componentFactory = function componentFactory() {\n  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var children = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  var isItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var state = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  var type = arguments.length > 4 ? arguments[4] : undefined;\n  var moreProps = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n  // const { Type, Id, ...other } = data\n  // 在这里注入children应该就可以了\n  var componentType = type || data.type;\n  var component = _components_index__WEBPACK_IMPORTED_MODULE_9__.controlsMap[componentType];\n  if (!component) return null;\n  // const keyProps = isItems ? { key: data.id || data.key } : {}\n  var keyProps = {\n    key: data.id || data.key\n  };\n  // console.log('renderLog componentFactory', componentType, data, children, isItems)\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_10___default().createElement(component, _objectSpread({\n    data: data,\n    appState: state,\n    children: children\n  }, keyProps));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (componentFactory);\n\n//# sourceURL=webpack://print-designer/./src/factory/index.tsx?");

/***/ }),

/***/ 23312:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   parseUIControl: function() { return /* binding */ parseUIControl; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(21980);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(38508);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_14__);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n// import React from 'react'\n// import { controlsMap } from '../controls/index'\n\n\n\n// function isEmpty(obj) {\n//   for(let prop in obj) {\n//     if(obj.hasOwnProperty(prop)) {\n//       return tru\n//     }\n//   }\n// }\n\nvar parseUIControl = function parseUIControl() {\n  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var isItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var otherProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  // const { data } = props\n  // const { key, Id } = data\n  // 应该不会为空\n  if (lodash__WEBPACK_IMPORTED_MODULE_14___default().isEmpty(data)) {\n    return null;\n  }\n  if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_9___default()(data)) {\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(data).call(data, function (singleData) {\n      return parseUIControl(singleData, true);\n    });\n  } else {\n    var _context;\n    // 这里特殊处理下表格\n    if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_12__.isGridType)(data)) {\n      return (0,_index__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(_objectSpread(_objectSpread({}, data), otherProps));\n    }\n    var children = data.items && !lodash__WEBPACK_IMPORTED_MODULE_14___default().isEmpty(data.items) ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(_context = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_11___default()(data.items)).call(_context, function (itemData) {\n      return parseUIControl(itemData, true);\n    }) : [];\n    var Component = (0,_index__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(data, children, isItems, otherProps);\n    return Component;\n  }\n};\n\n//# sourceURL=webpack://print-designer/./src/factory/parseUIControl.tsx?");

/***/ }),

/***/ 69900:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useBeforeGridChildItemMouseDown: function() { return /* binding */ useBeforeGridChildItemMouseDown; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98092);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nvar useBeforeGridChildItemMouseDown = function useBeforeGridChildItemMouseDown(gridState) {\n  return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (e) {\n    var _context;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.console.log('grid cellItem onMouseDown', gridState);\n    // if (gridState && GRID_EDITOR_STATE !== gridState) {\n    //   return true\n    // }\n    if (gridState && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default()(_context = [_constants__WEBPACK_IMPORTED_MODULE_2__.GRID_NORMAL_STATE, _constants__WEBPACK_IMPORTED_MODULE_2__.GRID_SELECT_STATE]).call(_context, gridState) && (e === null || e === void 0 ? void 0 : e.type) !== 'dblclick') {\n      return true;\n    }\n  }, [gridState]);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useBeforeGridChildItemMouseDown.tsx?");

/***/ }),

/***/ 48524:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useCache: function() { return /* binding */ useCache; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n// 缓存的依据应该是自身不绘制，并且自身向上（到画布节点下）的父组件都不绘制\n// 也就是不更新\n// 重新梳理缓存策略,父子联动缓存的逻辑难于预测\n// 自身控件的缓存 实际图形， 文本不缓存 group 不缓存 hover\nvar useCache = function useCache(_ref) {\n  var isSelected = _ref.isSelected,\n    refs = _ref.refs,\n    pixelRatio = _ref.pixelRatio,\n    scale = _ref.scale,\n    currentProp = _ref.currentProp;\n  // 一般只传group\n  // 这里会不会有闭包风险\n  return;\n  // 由于不知道何时进行解缓存 clearCache and draw 不能每次进来都clearCache，这样反倒有性能问题！\n  // 暂时留待以后能够进行优化，现在应用scu即可\n  var shapeRefs = _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0___default()(refs) ? refs : [refs];\n  var previousProp = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.usePrevious)(currentProp);\n  (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n    var isCache = false;\n    // !isSelected &&\n    if (lodash__WEBPACK_IMPORTED_MODULE_4___default().isEqual(previousProp, currentProp)) {\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(shapeRefs).call(shapeRefs, function (ref) {\n        var _ref$current, _context;\n        (_ref$current = ref.current) === null || _ref$current === void 0 || _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _ref$current.getChildren(function (node) {\n          var names = node.name().split(' ');\n          var className = node.getClassName && node.getClassName();\n          if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(names).call(names, _constants__WEBPACK_IMPORTED_MODULE_6__.HOVER_NODE_CLASSNAME) && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(names).call(names, _constants__WEBPACK_IMPORTED_MODULE_6__.TEXT_NODE_CLASSNAME) && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(names).call(names, _constants__WEBPACK_IMPORTED_MODULE_6__.CONTAINER_NODE_CLASSNAME) && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(names).call(names, _constants__WEBPACK_IMPORTED_MODULE_6__.NOT_CACHE_CLASSNAME) && className !== 'Transformer') {\n            return true;\n          }\n          return false;\n        }).toArray()).call(_context, function (node) {\n          try {\n            node.cache({\n              pixelRatio: pixelRatio\n            });\n            isCache = true;\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.console.log('useCache cache', node);\n          } catch (error) {\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.console.error('node cache: ', error, node);\n          }\n        });\n      });\n    }\n    return function () {\n      // 删除就不需要了\n      if (isCache) {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(shapeRefs).call(shapeRefs, function (ref) {\n          var _ref$current2, _context2;\n          (_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context2 = _ref$current2.getChildren().toArray()).call(_context2, function (node) {\n            if (node.isCached()) {\n              node.clearCache();\n              designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.console.log('useCache clearCache', node);\n              // node.getLayer().batchDraw()\n              node.draw();\n            }\n          });\n        });\n      }\n    };\n    // ...(_.values(currentProp))\n  }, [pixelRatio, scale, lodash__WEBPACK_IMPORTED_MODULE_4___default().isEqual(previousProp, currentProp)]);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useCache.tsx?");

/***/ }),

/***/ 95356:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ useCommonModel; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(74741);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction useCommonModel(_ref) {\n  var selectionContext = _ref.selectionContext,\n    dataContext = _ref.dataContext,\n    meta = _ref.meta,\n    globalConfig = _ref.globalConfig;\n  var selection = selectionContext.getSelection();\n  var multiSelect = selection.length > 1;\n  var selectItems = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default()(selection).call(selection, function (id) {\n    return dataContext.findControl(id);\n  });\n  var selectItemTypes = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default()(selectItems).call(selectItems, function (item) {\n    return item.type;\n  });\n  var commonProp = (0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {\n    var commonProperties = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_3__.getCommonProperties)(selectItemTypes)(meta, globalConfig);\n    var commonNodes = _babel_runtime_corejs3_core_js_stable_instance_flat_map__WEBPACK_IMPORTED_MODULE_1___default()(commonProperties).call(commonProperties, function (prop) {\n      return prop.Nodes || [];\n    });\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_0___default()(commonNodes).call(commonNodes, function (node) {\n      return lodash__WEBPACK_IMPORTED_MODULE_4___default().camelCase(node.Id);\n    });\n  }, [selectItemTypes, meta]);\n  return {\n    commonProp: commonProp,\n    multiSelect: multiSelect,\n    selection: selection\n  };\n}\n\n//# sourceURL=webpack://print-designer/./src/hooks/useCommonProp.tsx?");

/***/ }),

/***/ 37888:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar useCompare = function useCompare(value) {\n  var valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n  if (!_.isEqual(value, valueRef.current)) {\n    return false;\n  }\n  return true;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (useCompare);\n\n//# sourceURL=webpack://print-designer/./src/hooks/useCompare.ts?");

/***/ }),

/***/ 82104:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useContainer: function() { return /* binding */ useContainer; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31408);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(71536);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nvar useContainer = function useContainer(_ref) {\n  var portalRef = _ref.portalRef,\n    children = _ref.children,\n    position = _ref.position,\n    style = _ref.style;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(document.createElement('div')),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 1),\n    containerEl = _useState2[0];\n  var isBodyRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);\n  var isHaveContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);\n  containerEl.style.position = position || 'absolute';\n  containerEl.style.top = '0px';\n  containerEl.style.left = '0px';\n  containerEl.style.zIndex = '1050';\n  if (style) {\n    var _context;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(style)).call(_context, function (_ref2) {\n      var _ref3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, 2),\n        key = _ref3[0],\n        value = _ref3[1];\n      containerEl.style[key] = value;\n    });\n  }\n  var unmountContainer = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function () {\n    if (!isHaveContainerRef.current) return;\n    react_dom__WEBPACK_IMPORTED_MODULE_4___default().unmountComponentAtNode(containerEl);\n    if (isBodyRef.current) {\n      document.body.removeChild(containerEl);\n    } else {\n      var _portalRef$current;\n      (_portalRef$current = portalRef.current) === null || _portalRef$current === void 0 || _portalRef$current.removeChild(containerEl);\n    }\n    isHaveContainerRef.current = false;\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n    isBodyRef.current = false;\n    if (portalRef !== null && portalRef !== void 0 && portalRef.current) {\n      portalRef.current.appendChild(containerEl);\n    } else {\n      document.body.appendChild(containerEl);\n      isBodyRef.current = true;\n    }\n    isHaveContainerRef.current = true;\n    return unmountContainer;\n  }, []);\n  if (children) {\n    react_dom__WEBPACK_IMPORTED_MODULE_4___default().render(children, containerEl);\n  } else {\n    unmountContainer();\n  }\n  // return unmountContainer\n  // return ReactDOM.createPortal(children, document.body);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useContainer.tsx?");

/***/ }),

/***/ 37520:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useControlDragEnd: function() { return /* binding */ useControlDragEnd; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(41232);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(21980);\n/* harmony import */ var _utils_control__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(87524);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_5___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_4___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_6___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\nvar pushRelatedGridControl = function pushRelatedGridControl(control, arr, dataContext) {\n  if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isDataGrid)(control) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isCardGrid)(control)) {\n    // 取子数据表格\n    var subGridId = control.subGridId,\n      tableTailId = control.tableTailId;\n    if (subGridId !== null && subGridId !== void 0 && subGridId.length) {\n      arr.push.apply(arr, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(dataContext.findControl(subGridId)));\n    }\n    if (tableTailId) {\n      arr.push(dataContext.findControl(tableTailId));\n    }\n  }\n  if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isSubDataGrid)(control) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isGridFooter)(control)) {\n    // 取主表格\n    var parentGridId = control.parentGridId;\n    if (parentGridId) {\n      arr.push(dataContext.findControl(parentGridId));\n    }\n  }\n};\nvar DIS_SUPPORT_TO_TABLE_TAIL_TPYES_NAME_MAP;\nfunction getDisSupportToTableTailTypesNameMap() {\n  if (!DIS_SUPPORT_TO_TABLE_TAIL_TPYES_NAME_MAP) {\n    DIS_SUPPORT_TO_TABLE_TAIL_TPYES_NAME_MAP = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_20__.DATAGRID_TYPE, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0031')), _constants__WEBPACK_IMPORTED_MODULE_20__.COMMON_CONTROL_TYPE_MAP.richText, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.components.key0062')), _constants__WEBPACK_IMPORTED_MODULE_20__.CARD_GRID_TYPE, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.components.key0063'));\n  }\n  return DIS_SUPPORT_TO_TABLE_TAIL_TPYES_NAME_MAP;\n}\n\n/**\n * 通用控件拖拽更新位置逻辑，涉及到与页眉、页脚交叉位置的计算，几种情况：\n * 1.鼠标进入页眉区域，更新控件为页眉子控件\n * 2.鼠标进入页脚区域，更新控件为页脚子控件\n * 3.鼠标没进入页眉，但x,y与页眉交叉，此时判定控件没进入页眉，当拖拽停止时需更新控件位置，让其保持在页眉之外\n * 4.鼠标没进入页脚，但x,y与页脚交叉，此时判定控件没进入页脚，当拖拽停止时需更新控件位置，让其保持在页脚之外\n * 5.正常位置更新\n *  */\nfunction useControlDragEnd(props, context) {\n  return function (_ref, e) {\n    var _stageRef$current, _stageRef$current2, _context;\n    var x = _ref.x,\n      y = _ref.y;\n    var batchUpdateValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n    var realChange = [];\n    var id = props.id,\n      parentId = props.parentId,\n      height = props.height,\n      width = props.width,\n      originX = props.x,\n      originY = props.y;\n    var dataContext = context.dataContext,\n      selectionContext = context.selectionContext,\n      getRedundancyXY = context.getRedundancyXY,\n      pageHeight = context.pageHeight,\n      stageRef = context.stageRef,\n      rootId = context.rootId,\n      scale = context.scale,\n      setMessage = context.setMessage,\n      forceUpdateTransformer = context.forceUpdateTransformer;\n    var mousePosition = (_stageRef$current = stageRef.current) === null || _stageRef$current === void 0 ? void 0 : _stageRef$current.getPointerPosition();\n    var shape = (_stageRef$current2 = stageRef.current) === null || _stageRef$current2 === void 0 ? void 0 : _stageRef$current2.findOne(\"#\".concat(id));\n    var selections = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_12___default()(_context = []).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(selectionContext.getSelection()), [id])));\n    var relatedGrids = [];\n    pushRelatedGridControl(props, relatedGrids, dataContext);\n    var originSelection = dataContext.findControlByCondition(function (item) {\n      return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(selections).call(selections, item.id);\n    });\n    var selectControls = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(originSelection);\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(originSelection).call(originSelection, function (control) {\n      pushRelatedGridControl(control, selectControls, dataContext);\n    });\n    var mouseX = mousePosition.x,\n      mouseY = mousePosition.y;\n    var _getRedundancyXY = getRedundancyXY(),\n      redundancyX = _getRedundancyXY.x,\n      redundancyY = _getRedundancyXY.y;\n    var commonControl = [\"Text\", \"Image\", \"QRCode\", \"Barcode\", \"LayoutGrid\", 'Line'];\n    mouseX = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(mouseX - redundancyX, scale);\n    mouseY = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(mouseY - redundancyY, scale);\n    x = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(x, scale);\n    y = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(y, scale);\n    var controlTop = (0,_utils_control__WEBPACK_IMPORTED_MODULE_19__.getControlTopPosition)(_objectSpread(_objectSpread({}, props), {}, {\n      x: x,\n      y: y\n    }), dataContext);\n    var controlBottom = (0,_utils_control__WEBPACK_IMPORTED_MODULE_19__.getControlBottomPosition)(_objectSpread(_objectSpread({}, props), {}, {\n      x: x,\n      y: y\n    }), dataContext);\n    var dragBoundTop = batchUpdateValue.length ? _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(batchUpdateValue).call(batchUpdateValue, function (top, change) {\n      var _change = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(change, 2),\n        updateId = _change[0],\n        _change$ = _change[1],\n        update = _change$ === void 0 ? {} : _change$;\n      var controlData = dataContext.findControl(updateId);\n      // const { y: updateY } = update\n      return Math.min((0,_utils_control__WEBPACK_IMPORTED_MODULE_19__.getControlTopPosition)(_objectSpread(_objectSpread({}, controlData), update), dataContext), top);\n    }, controlTop) : controlTop;\n    var dragBoundBottom = batchUpdateValue.length ? _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(batchUpdateValue).call(batchUpdateValue, function (bottom, change) {\n      var _change2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(change, 2),\n        updateId = _change2[0],\n        _change2$ = _change2[1],\n        update = _change2$ === void 0 ? {} : _change2$;\n      // const { y: updateY } = update\n      var controlData = dataContext.findControl(updateId);\n      return Math.max((0,_utils_control__WEBPACK_IMPORTED_MODULE_19__.getControlBottomPosition)(_objectSpread(_objectSpread({}, controlData), update), dataContext), bottom);\n    }, controlBottom) : controlBottom;\n    var headers = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Header';\n    });\n    var footers = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Footer';\n    });\n    var TableTails = dataContext.findControlByCondition(function (item) {\n      return item.type === 'TableTail';\n    });\n    var isTableTailsBatchDrag;\n    var _ref2 = headers[0] || {},\n      _ref2$width = _ref2.width,\n      headerWidth = _ref2$width === void 0 ? 0 : _ref2$width,\n      _ref2$height = _ref2.height,\n      headerHeight = _ref2$height === void 0 ? 0 : _ref2$height;\n    var _ref3 = footers[0] || {},\n      _ref3$width = _ref3.width,\n      footerWidth = _ref3$width === void 0 ? 0 : _ref3$width,\n      _ref3$height = _ref3.height,\n      footerHeight = _ref3$height === void 0 ? 0 : _ref3$height,\n      _ref3$y = _ref3.y,\n      footerY = _ref3$y === void 0 ? 0 : _ref3$y;\n    var backToOriginPos = function backToOriginPos() {\n      if (selections.length > 1) {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(selectControls).call(selectControls, function (control) {\n          var _stageRef$current3;\n          var controlShape = (_stageRef$current3 = stageRef.current) === null || _stageRef$current3 === void 0 ? void 0 : _stageRef$current3.findOne(\"#\".concat(control.id));\n          controlShape === null || controlShape === void 0 || controlShape.position({\n            x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.x, scale),\n            y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.y, scale)\n          });\n        });\n        forceUpdateTransformer();\n        setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0023'));\n        return true;\n      }\n      if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isDataGrid)(props) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isLayoutGrid)(props) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isSubDataGrid)(props) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isGridFooter)(props) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isCardGrid)(props)) {\n        // 表格、网格拖入页眉页脚，回到原位置，并给提示\n        shape === null || shape === void 0 || shape.position({\n          x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(originX, scale),\n          y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(originY, scale)\n        });\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(relatedGrids).call(relatedGrids, function (control) {\n          var _stageRef$current4;\n          var controlShape = (_stageRef$current4 = stageRef.current) === null || _stageRef$current4 === void 0 ? void 0 : _stageRef$current4.findOne(\"#\".concat(control.id));\n          controlShape === null || controlShape === void 0 || controlShape.position({\n            x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.x, scale),\n            y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.y, scale)\n          });\n        });\n        setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0024'));\n        return true;\n      }\n      if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isRichText)(props)) {\n        // 富文本拖入页眉页脚，回到原位置，并给提示\n        shape === null || shape === void 0 || shape.position({\n          x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(originX, scale),\n          y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(originY, scale)\n        });\n        setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0025'));\n        return true;\n      }\n    };\n    if (parentId === rootId) {\n      if (headers.length && mouseX < headerWidth && mouseY < headerHeight) {\n        var headerId = headers[0].id;\n        if (backToOriginPos()) return;\n        if (y + height > headerHeight) {\n          if (height >= headerHeight) {\n            // 高度不够，等比缩放\n            realChange.push([id, {\n              y: 0,\n              x: x,\n              height: headerHeight,\n              width: headerHeight / height * width,\n              parentId: headerId\n            }]);\n          } else {\n            realChange.push([id, {\n              y: headerHeight - height,\n              x: x,\n              parentId: headerId\n            }]);\n          }\n        } else {\n          realChange.push([id, {\n            x: x,\n            y: y,\n            parentId: headerId\n          }]);\n        }\n      } else if (footers.length && mouseX < footerWidth && mouseY > pageHeight - footerHeight) {\n        var footerId = footers[0].id;\n        if (backToOriginPos()) return;\n        if (mouseY - footerY + height > footerHeight && height >= footerHeight) {\n          // 高度不够，等比缩放\n          realChange.push([id, {\n            y: 0,\n            x: x,\n            height: footerHeight,\n            width: footerHeight / height * width,\n            parentId: footerId\n          }]);\n        } else {\n          realChange.push([id, {\n            y: y - footerY,\n            x: x,\n            parentId: footerId\n          }]);\n        }\n      } else if (headerHeight > 0 && dragBoundTop < headerHeight) {\n        // 鼠标没进入页眉，但x,y和页眉交叉，此时需让控件维持在页眉区域以外\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(selectControls).call(selectControls, function (control) {\n          var _stageRef$current5;\n          var controlShape = (_stageRef$current5 = stageRef.current) === null || _stageRef$current5 === void 0 ? void 0 : _stageRef$current5.findOne(\"#\".concat(control.id));\n          controlShape === null || controlShape === void 0 || controlShape.position({\n            x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.x, scale),\n            y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.y, scale)\n          });\n        });\n        forceUpdateTransformer();\n        return;\n        // realChange.push([id, { x, y: headerHeight }])\n        // shape?.position({\n        //   x: calculatorMMtoPx(x, scale),\n        //   y: calculatorMMtoPx(headerHeight, scale),\n        // })\n        // relatedGrids.forEach(control => {\n        //   const controlShape = stageRef.current?.findOne(`#${control.id}`)\n        //   controlShape?.position({\n        //     x: calculatorMMtoPx(control.x, scale),\n        //     y: calculatorMMtoPx(headerHeight, scale),\n        //   })\n        // })\n      } else if (footerY > 0 && dragBoundBottom > footerY) {\n        // 鼠标没进入页脚，但x,y和页脚交叉，此时需让控件维持在页脚区域以外\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(selectControls).call(selectControls, function (control) {\n          var _stageRef$current6;\n          var controlShape = (_stageRef$current6 = stageRef.current) === null || _stageRef$current6 === void 0 ? void 0 : _stageRef$current6.findOne(\"#\".concat(control.id));\n          controlShape === null || controlShape === void 0 || controlShape.position({\n            x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.x, scale),\n            y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.y, scale)\n          });\n        });\n        forceUpdateTransformer();\n        return;\n        // realChange.push([id, { x, y: (pageHeight - footerHeight - height) }])\n        // shape?.position({\n        //   x: calculatorMMtoPx(x, scale),\n        //   y: calculatorMMtoPx(pageHeight - footerHeight - height, scale),\n        // })\n        // relatedGrids.forEach(control => {\n        //   const controlShape = stageRef.current?.findOne(`#${control.id}`)\n        //   controlShape?.position({\n        //     x: calculatorMMtoPx(control.x, scale),\n        //     y: calculatorMMtoPx(pageHeight - footerHeight - height, scale),\n        //   })\n        // })\n      } else if (TableTails.length && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(commonControl).call(commonControl, props.type)) {\n        var currentTableTail = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(TableTails).call(TableTails, function (TableTail) {\n          var height = TableTail.height,\n            parentGridId = TableTail.parentGridId;\n          var parentField = dataContext.findControl(parentGridId);\n          var tableY = parentField.y,\n            tableHeight = parentField.height,\n            tableX = parentField.x,\n            tableWidth = parentField.width;\n          return tableHeight + tableY < mouseY && mouseY < tableHeight + tableY + height && tableX < mouseX && mouseX < tableWidth + tableX;\n        });\n        if (currentTableTail) {\n          var disSupportTypesSet = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(selections).call(selections, function (result, id) {\n            var _dataContext$findCont = dataContext.findControl(id),\n              type = _dataContext$findCont.type;\n            if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(commonControl).call(commonControl, type)) {\n              result.add(type);\n            }\n            return result;\n          }, new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_11___default())());\n          if (disSupportTypesSet.size) {\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(selectControls).call(selectControls, function (control) {\n              var _stageRef$current7;\n              var controlShape = (_stageRef$current7 = stageRef.current) === null || _stageRef$current7 === void 0 ? void 0 : _stageRef$current7.findOne(\"#\".concat(control.id));\n              controlShape === null || controlShape === void 0 || controlShape.position({\n                x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.x, scale),\n                y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorMMtoPx)(control.y, scale)\n              });\n            });\n            forceUpdateTransformer();\n            var disSupportTypes = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(disSupportTypesSet);\n            var disSupportToTableTailTypesNameMap = getDisSupportToTableTailTypesNameMap();\n            var typeNames = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(disSupportTypes).call(disSupportTypes, function (arr, type) {\n              if (disSupportToTableTailTypesNameMap[type]) {\n                arr.push(DIS_SUPPORT_TO_TABLE_TAIL_TPYES_NAME_MAP[type]);\n              }\n              return arr;\n            }, []);\n            setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)({\n              key: 'printd.grid.key0124',\n              variables: {\n                detail: typeNames.length ? \"\\uFF1A\".concat(typeNames.join(' ')) : ''\n              }\n            }));\n            return true;\n          }\n          isTableTailsBatchDrag = true;\n          var parentGridId = currentTableTail.parentGridId,\n            tableTailId = currentTableTail.id;\n          var parentField = dataContext.findControl(parentGridId);\n          var tableY = parentField.y,\n            tableX = parentField.x,\n            tableHeight = parentField.height;\n          var dragStartMousePos = stageRef.current.dragStartMousePos;\n          var dragStartMouseX = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(dragStartMousePos.x - redundancyX, scale);\n          var dragStartMouseY = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(dragStartMousePos.y - redundancyY, scale);\n          var dragEndMouseX = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(mousePosition.x - redundancyX, scale);\n          var dragEndMouseY = (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.calculatorPxtoMM)(mousePosition.y - redundancyY, scale);\n          if (selections.length === 1) {\n            realChange.push([id, {\n              x: x - tableX,\n              y: y - tableHeight - tableY,\n              parentId: tableTailId\n            }]);\n          } else {\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(selections).call(selections, function (id) {\n              var _dataContext$findCont2 = dataContext.findControl(id),\n                x = _dataContext$findCont2.x,\n                y = _dataContext$findCont2.y,\n                type = _dataContext$findCont2.type;\n              var diffX = dragStartMouseX - x;\n              var diffY = dragStartMouseY - y;\n              var newX = dragEndMouseX - diffX < 0 ? 0 : dragEndMouseX - diffX;\n              var newY = dragEndMouseY - diffY < 0 ? 0 : dragEndMouseY - diffY;\n              var _y = newY - tableHeight - tableY;\n              realChange.push([id, {\n                x: newX - tableX,\n                y: _y < 0 ? 0 : _y,\n                parentId: tableTailId\n              }]);\n            });\n          }\n        } else {\n          realChange.push([id, {\n            x: x,\n            y: y\n          }]);\n        }\n      } else {\n        realChange.push([id, {\n          x: x,\n          y: y\n        }]);\n      }\n    } else {\n      realChange.push([id, {\n        x: x,\n        y: y\n      }]);\n    }\n    if (!isTableTailsBatchDrag) {\n      realChange.push.apply(realChange, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(batchUpdateValue));\n      isTableTailsBatchDrag = false;\n    }\n    if (realChange.length === 1) {\n      var _realChange$ = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(realChange[0], 2),\n        _id = _realChange$[0],\n        change = _realChange$[1];\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.createUpdateAction)([[_id, change]]));\n    } else {\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.createUpdateAction)(realChange));\n    }\n  };\n}\n\n//# sourceURL=webpack://print-designer/./src/hooks/useControlDragEnd.tsx?");

/***/ }),

/***/ 88904:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useControlStroke: function() { return /* binding */ useControlStroke; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(98092);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(41232);\n/* harmony import */ var _views_center_navTool__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(12968);\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_4___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default()(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_9___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_8___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default()(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_10___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_6___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// test\n// function hexToOpacityOne (hex) {\n//   const opacity = 1\n// }\n// Shape还是Line?\nvar DEFAULT_LINE_COLOR = _constants__WEBPACK_IMPORTED_MODULE_14__.DEFAULT_BORDER_COLOR;\n// 几乎看不出啥区别\nvar INNTER_LINE_RENDERE_MODE = 'inner'; // 内侧渲染\nvar MIDDLE_LINE_RENDERE_MODE = 'middle'; // 两侧渲染\nvar LINE_RENDERE_MODE = MIDDLE_LINE_RENDERE_MODE;\nvar LINE_WIDTH_SCALE = LINE_RENDERE_MODE === MIDDLE_LINE_RENDERE_MODE ? 2 : 1;\nfunction getRealBorderWidth(borderType, widthData) {\n  // if (borderType === INNER_BORDER) {\n  //   // 这里特殊处理下，如果borderType为内边框，应该为没有边框\n  //   // return { top: 0, left: 0, right: 0, bottom: 0 }\n  // }\n  return widthData;\n}\nvar useControlStroke = function useControlStroke(_ref) {\n  var _ref$x = _ref.x,\n    x = _ref$x === void 0 ? 0 : _ref$x,\n    _ref$y = _ref.y,\n    y = _ref$y === void 0 ? 0 : _ref$y,\n    id = _ref.id,\n    width = _ref.width,\n    height = _ref.height,\n    _ref$border = _ref.border,\n    border = _ref$border === void 0 ? {} : _ref$border,\n    realBorderType = _ref.borderType,\n    isSelected = _ref.isSelected,\n    contextStrokeEnabled = _ref.contextStrokeEnabled,\n    scale = _ref.scale;\n  // TODO:\n  // 拖拽bug\n  // console.log(ColorTransform, 'ColorTransform', hexToRgba)\n  var _borderHandle = (0,_views_center_navTool__WEBPACK_IMPORTED_MODULE_16__.borderHandle)(border, realBorderType),\n    _borderHandle2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_borderHandle, 4),\n    borderTypes = _borderHandle2[0],\n    borderColor = _borderHandle2[1],\n    borderStyle = _borderHandle2[2],\n    borderWidth = _borderHandle2[3];\n  // 这里需要考虑表格的外、所有边框情况\n  var stroke = borderColor || _constants__WEBPACK_IMPORTED_MODULE_14__.DEFAULT_NONOE_BORDER_COLOR; // borderType === OUT_BORDER ? borderColor || DEFAULT_NONOE_BORDER_COLOR : DEFAULT_NONOE_BORDER_COLOR\n  var strokeWidth = borderWidth || 1; // borderType === OUT_BORDER ? borderWidth || 1 : 1\n  var strokeStyle = borderStyle || 'solid';\n  // 需要无边框\n  // const strokeEnabled = borderType === OUT_BORDER || borderType === NONE_BORDER\n  var strokeEnabled = !!contextStrokeEnabled && !(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(borderTypes).call(borderTypes, _constants__WEBPACK_IMPORTED_MODULE_14__.OUT_BORDER) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(borderTypes).call(borderTypes, _constants__WEBPACK_IMPORTED_MODULE_14__.ALL_BORDER));\n  var dashEnabled = !(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(borderTypes).call(borderTypes, _constants__WEBPACK_IMPORTED_MODULE_14__.OUT_BORDER) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(borderTypes).call(borderTypes, _constants__WEBPACK_IMPORTED_MODULE_14__.ALL_BORDER));\n  // const dashEnabled = false\n  var defaultDash = [3, 3]; // 虚线样式\n  var controlStrokeRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var _ref2 = border.width || {},\n    _ref2$top = _ref2.top,\n    topWidth = _ref2$top === void 0 ? 0 : _ref2$top,\n    _ref2$left = _ref2.left,\n    leftWidth = _ref2$left === void 0 ? 0 : _ref2$left,\n    _ref2$right = _ref2.right,\n    rightWidth = _ref2$right === void 0 ? 0 : _ref2$right,\n    _ref2$bottom = _ref2.bottom,\n    bottomWidth = _ref2$bottom === void 0 ? 0 : _ref2$bottom;\n  var _ref3 = border.color || {},\n    topColor = _ref3.top,\n    leftColor = _ref3.left,\n    rightColor = _ref3.right,\n    bottomColor = _ref3.bottom;\n  var _ref4 = border.style || {},\n    topStyle = _ref4.top,\n    leftStyle = _ref4.left,\n    rightStyle = _ref4.right,\n    bottomStyle = _ref4.bottom;\n  // const { top: topColor, left: leftColor, right: rightColor, bottom: bottomColor } = {\n  //   left: '#00D9D9D9',\n  //   right: '#00D9D9D9'\n  // }\n  // const {} = border.style\n  var widthMM = (0,_utils_index__WEBPACK_IMPORTED_MODULE_15__.calculatorMMtoPx)(width, scale);\n  var heightMM = (0,_utils_index__WEBPACK_IMPORTED_MODULE_15__.calculatorMMtoPx)(height, scale);\n  // TODO: 原点、线框宽度、裁剪问题\n  var topPointer = LINE_RENDERE_MODE === MIDDLE_LINE_RENDERE_MODE ? [0, 0, widthMM, 0] : [0, topWidth / 2, widthMM, topWidth / 2];\n  var leftPointer = LINE_RENDERE_MODE === MIDDLE_LINE_RENDERE_MODE ? [0, 0, 0, heightMM] : [leftWidth / 2, 0, leftWidth / 2, heightMM];\n  var rightPointer = LINE_RENDERE_MODE === MIDDLE_LINE_RENDERE_MODE ? [widthMM, 0, widthMM, heightMM] : [widthMM - rightWidth / 2, 0, widthMM - rightWidth / 2, heightMM];\n  var bottomPointer = LINE_RENDERE_MODE === MIDDLE_LINE_RENDERE_MODE ? [widthMM, heightMM, 0, heightMM] : [widthMM, heightMM - bottomWidth / 2, 0, heightMM - bottomWidth / 2];\n  var leftBorderRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var rightBorderRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var topBorderRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var bottomBorderRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useImperativeHandle)(controlStrokeRef, function () {\n    return {\n      mouseEnter: function mouseEnter(color) {\n        var _context;\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_7___default()(_context = [leftBorderRef, rightBorderRef, topBorderRef, bottomBorderRef]).call(_context, function (ref) {\n          var _ref$current, _ref$current2;\n          (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.stroke(color);\n          (_ref$current2 = ref.current) === null || _ref$current2 === void 0 || _ref$current2.draw();\n        });\n      },\n      mouseLeave: function mouseLeave() {\n        var _topBorderRef$current, _leftBorderRef$curren, _rightBorderRef$curre, _bottomBorderRef$curr;\n        (_topBorderRef$current = topBorderRef.current) === null || _topBorderRef$current === void 0 || _topBorderRef$current.stroke(topColor || DEFAULT_LINE_COLOR);\n        (_leftBorderRef$curren = leftBorderRef.current) === null || _leftBorderRef$curren === void 0 || _leftBorderRef$curren.stroke(leftColor || DEFAULT_LINE_COLOR);\n        (_rightBorderRef$curre = rightBorderRef.current) === null || _rightBorderRef$curre === void 0 || _rightBorderRef$curre.stroke(rightColor || DEFAULT_LINE_COLOR);\n        (_bottomBorderRef$curr = bottomBorderRef.current) === null || _bottomBorderRef$curr === void 0 || _bottomBorderRef$curr.stroke(bottomColor || DEFAULT_LINE_COLOR);\n        // 由外层batchDraw\n        // [leftBorderRef, rightBorderRef, topBorderRef, bottomBorderRef].forEach(ref => {\n        //   ref.current?.draw()\n        // })\n      }\n    };\n  }, [topColor, leftColor, rightColor, bottomColor]);\n  var strokeProps = {\n    borderTypes: borderTypes,\n    stroke: stroke,\n    strokeWidth: strokeWidth,\n    strokeEnabled: strokeEnabled,\n    dashEnabled: dashEnabled,\n    defaultDash: defaultDash,\n    controlStrokeRef: controlStrokeRef\n  };\n  var commonLineProps = {\n    listening: false,\n    draggable: false\n  };\n  var dash = (0,react__WEBPACK_IMPORTED_MODULE_12__.useMemo)(function () {\n    switch (borderStyle) {\n      case 'dashed':\n        return [3, 1];\n      case 'dotted':\n        return [2, 2];\n      default:\n        return defaultDash;\n    }\n  }, [borderStyle]);\n  var StrokeElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_13__.Group, commonLineProps, topWidth !== 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_13__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    key: \"\".concat(id, \"_top_stroke\"),\n    ref: topBorderRef,\n    name: \"\".concat(id, \"_top_border_line\")\n  }, commonLineProps, {\n    stroke: topColor || DEFAULT_LINE_COLOR,\n    strokeWidth: (topWidth || 1) * LINE_WIDTH_SCALE,\n    dashEnabled: topStyle !== 'solid',\n    dash: dash,\n    points: topPointer\n  })), leftWidth !== 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_13__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    key: \"\".concat(id, \"_left_stroke\"),\n    ref: leftBorderRef,\n    name: \"\".concat(id, \"_left_border_line\")\n  }, commonLineProps, {\n    stroke: leftColor || DEFAULT_LINE_COLOR,\n    strokeWidth: (leftWidth || 1) * LINE_WIDTH_SCALE,\n    dashEnabled: leftStyle !== 'solid',\n    dash: dash,\n    points: leftPointer\n  })), rightWidth !== 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_13__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    key: \"\".concat(id, \"_right_stroke\"),\n    ref: rightBorderRef,\n    name: \"\".concat(id, \"_right_border_line\")\n  }, commonLineProps, {\n    stroke: rightColor || DEFAULT_LINE_COLOR,\n    strokeWidth: (rightWidth || 1) * LINE_WIDTH_SCALE,\n    dashEnabled: rightStyle !== 'solid',\n    dash: dash,\n    points: rightPointer\n  })), bottomWidth !== 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_13__.Line, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n    key: \"\".concat(id, \"_bottom_stroke\"),\n    ref: bottomBorderRef,\n    name: \"\".concat(id, \"_bottom_border_line\")\n  }, commonLineProps, {\n    stroke: bottomColor || DEFAULT_LINE_COLOR,\n    strokeWidth: (bottomWidth || 1) * LINE_WIDTH_SCALE,\n    dashEnabled: bottomStyle !== 'solid',\n    dash: dash,\n    points: bottomPointer\n  })));\n  // TODO:\n  // lineJoin lineCap\n  // alpha={DEFAULT_ALPHA}\n  // const DEFAULT_LINE_OPACITY = 1\n  // 这里的线框 * 2是基于konva 线的画的中心是中心为准而不是左上角,设置,而且应用该线框的控件都需要clip裁剪外围\n  var isHaveOneEdgeWidth = topWidth !== 0 || leftWidth !== 0 || rightWidth !== 0 || bottomWidth !== 0;\n  return _objectSpread(_objectSpread({}, strokeProps), {}, {\n    customedStrokeElement: !isSelected && isHaveOneEdgeWidth && StrokeElement,\n    dashEnabled: strokeProps.dashEnabled && !(topWidth !== 0 && leftWidth !== 0 && rightWidth !== 0 && bottomWidth !== 0) && !isSelected\n  });\n};\n\n// export default useControlStroke\n\n//# sourceURL=webpack://print-designer/./src/hooks/useControlStroke.tsx?");

/***/ }),

/***/ 75252:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   getAbsolutePosition: function() { return /* binding */ getAbsolutePosition; },\n/* harmony export */   getPosition: function() { return /* binding */ getPosition; },\n/* harmony export */   moveBoundFunc: function() { return /* binding */ moveBoundFunc; },\n/* harmony export */   useDragDrop: function() { return /* binding */ useDragDrop; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(41232);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(21980);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(98092);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context7 = ownKeys(Object(t))).call(_context7, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\nvar ANIMATE_DELAY = 30;\nvar ANIMATE_END_DELAY = 30;\nfunction getPosition(shapeRef, redundancyXY) {\n  var _shapeRef$current;\n  var node = (_shapeRef$current = shapeRef === null || shapeRef === void 0 ? void 0 : shapeRef.current) !== null && _shapeRef$current !== void 0 ? _shapeRef$current : shapeRef;\n  if (!node) return null;\n  // const { x, y, height, width } = node.getClientRect()\n  // 这里都取绝对的比较好 加个新方法\n  var _ref = redundancyXY || {\n      x: 0,\n      y: 0\n    },\n    redundancyX = _ref.x,\n    redundancyY = _ref.y;\n  var rect = {\n    x: node.x() - redundancyX,\n    y: node.y() - redundancyY,\n    height: node.height(),\n    width: node.width()\n  };\n  var x = rect.x,\n    y = rect.y,\n    height = rect.height,\n    width = rect.width;\n  return (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.getCalcPosObj)({\n    x: Math.max(x, 0),\n    y: Math.max(y, 0),\n    left: Math.max(x, 0),\n    top: Math.max(y, 0),\n    width: width,\n    height: height,\n    right: x + width,\n    bottom: y + height\n  });\n}\n\n// 这里只给transform用\nfunction getAbsolutePosition(shapeRef) {\n  var _shapeRef$current2;\n  var redundancy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n    x: 0,\n    y: 0\n  };\n  var redundancyX = redundancy.x,\n    redundancyY = redundancy.y;\n  var node = (_shapeRef$current2 = shapeRef === null || shapeRef === void 0 ? void 0 : shapeRef.current) !== null && _shapeRef$current2 !== void 0 ? _shapeRef$current2 : shapeRef;\n  if (!node) return null;\n  // 慎用getClientRect\n  // const { height, width } = node.getClientRect()\n  var height = node.height();\n  var width = node.width();\n  // 这里都取绝对的比较好 加个新方法\n  var _node$getAbsolutePosi = _objectSpread({}, node.getAbsolutePosition()),\n    x = _node$getAbsolutePosi.x,\n    y = _node$getAbsolutePosi.y;\n  return (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.getCalcPosObj)({\n    x: Math.max(x - redundancyX, 0),\n    y: Math.max(y - redundancyY, 0),\n    left: Math.max(x - redundancyX, 0),\n    top: Math.max(y - redundancyY, 0),\n    width: width,\n    height: height,\n    right: x - redundancyX + width,\n    bottom: y - redundancyY + height\n  });\n}\nvar commonStopParentDrag = function commonStopParentDrag(e, id) {\n  var target = e.target;\n  if ((target === null || target === void 0 ? void 0 : target.id()) !== id) return true;\n};\nvar moveBoundFunc = function moveBoundFunc(_ref2) {\n  var pos = _ref2.position,\n    id = _ref2.id,\n    parentId = _ref2.parentId,\n    rootId = _ref2.rootId,\n    dataContext = _ref2.dataContext;\n  // 这里应该找父亲节点，但是实际上是没有父亲节点的说法，可以根据parentId找\n  // const { rootId, dataContext } = context\n  // const stage = stageRef.current\n  // const root = rootControlRef.current\n  // const parent = stage.findOne(`#${parentId}`)\n  var _getControlSize = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.getControlSize)(dataContext, id),\n    _getControlSize$width = _getControlSize.width,\n    width = _getControlSize$width === void 0 ? 0 : _getControlSize$width,\n    _getControlSize$heigh = _getControlSize.height,\n    height = _getControlSize$heigh === void 0 ? 0 : _getControlSize$heigh;\n  // 不会取到0\n  var _getPaperSize = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.getPaperSize)(dataContext),\n    rootWidth = _getPaperSize.width,\n    rootHeight = _getPaperSize.height;\n  var _getCalcPosObj = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.getCalcPosObj)(parentId !== rootId ? (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.getControlSize)(dataContext, parentId) : (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.getPaperSize)(dataContext)),\n    _getCalcPosObj$x = _getCalcPosObj.x,\n    left = _getCalcPosObj$x === void 0 ? 0 : _getCalcPosObj$x,\n    _getCalcPosObj$y = _getCalcPosObj.y,\n    top = _getCalcPosObj$y === void 0 ? 0 : _getCalcPosObj$y,\n    _getCalcPosObj$right = _getCalcPosObj.right,\n    right = _getCalcPosObj$right === void 0 ? rootWidth : _getCalcPosObj$right,\n    _getCalcPosObj$bottom = _getCalcPosObj.bottom,\n    bottom = _getCalcPosObj$bottom === void 0 ? rootHeight : _getCalcPosObj$bottom;\n  var x = pos.x,\n    y = pos.y;\n\n  // 拖拽当大于纸张时是自由的\n  if (width > rootWidth || height > rootHeight) {\n    return {\n      x: x,\n      y: y\n    };\n  }\n  // 都会靠着右下侧\n  // 看需求\n  if (x < left) {\n    x = left;\n  }\n  if (x + width > right) {\n    x = right - width;\n  }\n\n  // 兼容控件在页脚内的情况，此时y应该是相对页脚的高度，但是top是页脚的；导致计算错误\n  // 手动加上高度， 然后根据移动情况减去\n  var resultY = y + top;\n  if (y + top < top) {\n    resultY = 0;\n  }\n  if (y + top > top) {\n    resultY = resultY - top;\n  }\n  if (y + top + height > bottom) {\n    resultY = bottom - top - height;\n  }\n  return {\n    x: x,\n    y: resultY\n  };\n};\nvar useDragDrop = function useDragDrop(_ref3) {\n  var id = _ref3.id,\n    shapeRef = _ref3.shapeRef,\n    refLineRef = _ref3.refLineRef,\n    _onDragStart = _ref3.onDragStart,\n    _onDragMove = _ref3.onDragMove,\n    _onDragEnd = _ref3.onDragEnd,\n    parentId = _ref3.parentId,\n    context = _ref3.context,\n    _ref3$scale = _ref3.scale,\n    scale = _ref3$scale === void 0 ? 1 : _ref3$scale;\n  var mousePointChange = false;\n  var distanceInfo = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)({});\n  var boundaryInfo = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)({});\n  var excludeControlInfo = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)([]);\n  var dragBoundFunc = function dragBoundFunc(pos) {\n    // 这里应该找父亲节点，但是实际上是没有父亲节点的说法，可以根据parentId找\n    var stageRef = context.stageRef,\n      rootControlRef = context.rootControlRef,\n      rootId = context.rootId,\n      selectionContext = context.selectionContext;\n    var stage = stageRef.current;\n    var root = rootControlRef.current;\n    var parent = stage.findOne(\"#\".concat(parentId));\n    var _getPosition = getPosition(shapeRef),\n      _getPosition$width = _getPosition.width,\n      width = _getPosition$width === void 0 ? 0 : _getPosition$width,\n      _getPosition$height = _getPosition.height,\n      height = _getPosition$height === void 0 ? 0 : _getPosition$height;\n    var _boundaryInfo$current = boundaryInfo.current,\n      topDis = _boundaryInfo$current.topDis,\n      bottomDis = _boundaryInfo$current.bottomDis,\n      leftDis = _boundaryInfo$current.leftDis,\n      rightDis = _boundaryInfo$current.rightDis;\n    // 不会取到0\n    var rootWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.toRoundFix)(root.width(), _constants__WEBPACK_IMPORTED_MODULE_19__.PRECISION);\n    var rootHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.toRoundFix)(root.height(), _constants__WEBPACK_IMPORTED_MODULE_19__.PRECISION);\n    var _getCalcPosObj2 = (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.getCalcPosObj)(parent ? getAbsolutePosition(parent) : getAbsolutePosition(root)),\n      _getCalcPosObj2$x = _getCalcPosObj2.x,\n      left = _getCalcPosObj2$x === void 0 ? 0 : _getCalcPosObj2$x,\n      _getCalcPosObj2$y = _getCalcPosObj2.y,\n      top = _getCalcPosObj2$y === void 0 ? 0 : _getCalcPosObj2$y,\n      _getCalcPosObj2$right = _getCalcPosObj2.right,\n      right = _getCalcPosObj2$right === void 0 ? rootWidth : _getCalcPosObj2$right,\n      _getCalcPosObj2$botto = _getCalcPosObj2.bottom,\n      bottom = _getCalcPosObj2$botto === void 0 ? rootHeight : _getCalcPosObj2$botto;\n    var x = pos.x,\n      y = pos.y;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('xxx', x, y, {\n      topDis: topDis,\n      bottomDis: bottomDis,\n      leftDis: leftDis,\n      rightDis: rightDis\n    }, getPosition(parent));\n    // console.log(`left, top, right, bottom, x, y`, left, top, right, bottom, x, y, width, height)\n    // 拖拽当大于纸张时是自由的\n    if (leftDis + rightDis > rootWidth || bottomDis + topDis > rootHeight) {\n      // 一半自由 一半限制，不然x y 为负数\n      if (x - leftDis < left) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc x', x);\n        x = left + leftDis;\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc x', x, leftDis, left);\n      }\n      if (y - topDis < top) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc y', y);\n        y = top + topDis;\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc y', y, topDis, top);\n      }\n      return {\n        x: x,\n        y: y\n      };\n    }\n    // 都会靠着右下侧\n    // 看需求\n    if (x - leftDis < left) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc x', x);\n      x = left + leftDis;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc x', x, leftDis, left);\n    }\n    if (x + rightDis > right) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc x1', x);\n      x = right - rightDis;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc x1', x, rightDis, right);\n    }\n    if (y - topDis < top) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc y', y);\n      y = top + topDis;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc y', y, topDis, top);\n    }\n    if (y + bottomDis > bottom) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc y1', y);\n      y = bottom - bottomDis;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('dragBoundFunc y1', y, bottom, bottomDis);\n    }\n    // console.log('dragBoundFunc', { x, y }, left, top, right, bottom, x, y, width, height)\n    return {\n      x: x,\n      y: y\n    };\n  };\n  return {\n    dragBoundFunc: dragBoundFunc,\n    onDragStart: function onDragStart(e) {\n      var _context;\n      if (commonStopParentDrag(e, id)) {\n        return;\n      }\n      var target = e.target;\n      var stageRef = context.stageRef,\n        selectionContext = context.selectionContext,\n        dataContext = context.dataContext,\n        dragGroupRef = context.dragGroupRef;\n      var _target$attrs = target.attrs,\n        x = _target$attrs.x,\n        y = _target$attrs.y;\n      var _target$getAbsolutePo = target.getAbsolutePosition(),\n        absoluteX = _target$getAbsolutePo.x,\n        absoluteY = _target$getAbsolutePo.y;\n      var originSelection = selectionContext.getSelection();\n      var selection = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(originSelection);\n      var pushRelatedGridId = function pushRelatedGridId(controlData) {\n        if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isDataGrid)(controlData) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isCardGrid)(controlData)) {\n          var subGridId = controlData.subGridId,\n            tableTailId = controlData.tableTailId;\n          if (tableTailId) {\n            selection.push(tableTailId);\n            excludeControlInfo.current.push(tableTailId);\n          }\n          if (subGridId !== null && subGridId !== void 0 && subGridId.length) {\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(subGridId).call(subGridId, function (subId) {\n              if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9___default()(originSelection).call(originSelection, subId)) {\n                selection.push(subId);\n                excludeControlInfo.current.push(subId);\n              }\n            });\n          }\n        }\n        if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isSubDataGrid)(controlData)) {\n          var parentGridId = controlData.parentGridId;\n          if (parentGridId) {\n            if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9___default()(originSelection).call(originSelection, parentGridId)) {\n              selection.push(parentGridId);\n              excludeControlInfo.current.push(parentGridId);\n            }\n          }\n        }\n        if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_18__.isGridFooter)(controlData)) {\n          var _parentGridId = controlData.parentGridId;\n          selection.push(_parentGridId);\n          excludeControlInfo.current.push(_parentGridId);\n        }\n      };\n      pushRelatedGridId(dataContext.findControl(id));\n      // 数据表格 子数据表格 关联交互\n      // 这里不将值变化下发\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(originSelection).call(originSelection, function (selectId) {\n        var control = dataContext.findControl(selectId);\n        pushRelatedGridId(control);\n      });\n      var selectionShapes = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(selection).call(selection, function (id) {\n        var node = stageRef.current.findOne(\"#\".concat(id));\n        return (node === null || node === void 0 ? void 0 : node.draggable()) && node;\n      })).call(_context, Boolean);\n      // 计算选中的其它控件相对于当前drag控件的偏移量，记录在一个对象中\n      var otherSelection = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(selectionShapes).call(selectionShapes, function (item) {\n        return item !== e.target;\n      });\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.console.log('onDragStart', otherSelection);\n      stageRef.current.dragStartMousePos = stageRef.current.getPointerPosition();\n      var distanceObject = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(otherSelection).call(otherSelection, function (obj, shape) {\n        var _shape$attrs = shape.attrs,\n          id = _shape$attrs.id,\n          shapeX = _shape$attrs.x,\n          shapeY = _shape$attrs.y,\n          draggable = _shape$attrs.draggable;\n        var _shape$getAbsolutePos = shape.getAbsolutePosition(),\n          absoluteShapeX = _shape$getAbsolutePos.x,\n          absoluteShapeY = _shape$getAbsolutePos.y;\n        if (!draggable) return obj;\n        obj[id] = {\n          xDis: absoluteX - absoluteShapeX,\n          yDis: absoluteY - absoluteShapeY\n        };\n        return obj;\n      }, {});\n      distanceInfo.current = distanceObject;\n      // console.log('distanceInfo', distanceInfo.current, otherSelection)\n      var boundary = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(selectionShapes).call(selectionShapes, function (pos, shape) {\n        var _shape$attrs2 = shape.attrs,\n          curX = _shape$attrs2.x,\n          curY = _shape$attrs2.y,\n          width = _shape$attrs2.width,\n          height = _shape$attrs2.height;\n        var curTop = curY;\n        var curBottom = curY + height;\n        var curLeft = curX;\n        var curRight = curX + width;\n        if (!_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13___default()(pos).length) {\n          pos = {\n            top: curTop,\n            bottom: curBottom,\n            left: curLeft,\n            right: curRight\n          };\n        } else {\n          var _pos = pos,\n            top = _pos.top,\n            bottom = _pos.bottom,\n            left = _pos.left,\n            right = _pos.right;\n          pos = {\n            top: curTop < top ? curTop : top,\n            bottom: curBottom > bottom ? curBottom : bottom,\n            left: curLeft < left ? curLeft : left,\n            right: curRight > right ? curRight : right\n          };\n        }\n        return pos;\n      }, {});\n      boundaryInfo.current = {\n        topDis: y - boundary.top,\n        bottomDis: boundary.bottom - y,\n        leftDis: x - boundary.left,\n        rightDis: boundary.right - x\n      };\n      // console.log('boundaryInfo.current', boundary, boundaryInfo.current)\n      // shapeRef -> e.target ? x\n      var position = getPosition(shapeRef);\n      _onDragStart && _onDragStart(position, e);\n      // 无法阻止向父节点冒泡\n      // e.cancelBubble = true\n    },\n    onDragEnd: function onDragEnd(e) {\n      if (commonStopParentDrag(e, id)) {\n        return;\n      }\n      var target = e.target;\n      var _target$attrs2 = target.attrs,\n        x = _target$attrs2.x,\n        y = _target$attrs2.y;\n      var dataContext = context.dataContext,\n        selectionContext = context.selectionContext,\n        controlGroupRef = context.controlGroupRef,\n        stageRef = context.stageRef;\n      // const selection = selectionContext.getSelection()\n      // const selectionShapes = selection.map(id => {\n      //   const node = stageRef.current.findOne(`#${id}`)\n      //   return node?.draggable() && node\n      // }).filter(Boolean)\n      // stageRef.current.batchDraw()\n      // controlGroupRef.current && selectionShapes.forEach(node => node.moveTo)\n      var _ref4 = refLineRef.current || {},\n        hideRefLines = _ref4.hideRefLines;\n      // const selection = selectionContext.getSelection()\n      var position = getPosition(shapeRef);\n      hideRefLines && hideRefLines();\n      if (!lodash__WEBPACK_IMPORTED_MODULE_16___default().isEmpty(distanceInfo.current)) {\n        var _context2, _context3;\n        var batchUpdateValue = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(_context3 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13___default()(distanceInfo.current)).call(_context3, function (id) {\n          var _context4;\n          var _distanceInfo$current = distanceInfo.current[id],\n            xDis = _distanceInfo$current.xDis,\n            yDis = _distanceInfo$current.yDis;\n          if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_9___default()(_context4 = excludeControlInfo.current).call(_context4, id)) {\n            return;\n          }\n          return [id, {\n            x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(x - xDis, scale),\n            y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_17__.calculatorPxtoMM)(y - yDis, scale)\n          }];\n        })).call(_context2, Boolean);\n        _onDragEnd && _onDragEnd(position, e, batchUpdateValue);\n      } else {\n        // 这里需要添加数据处理, 由KD层管理并下发\n        _onDragEnd && _onDragEnd(position, e);\n      }\n      // if (!selection.includes(id)) {\n      //   selectionContext.setSelect([id])\n      // }\n      distanceInfo.current = {};\n      boundaryInfo.current = {};\n      excludeControlInfo.current = [];\n      // 这里需要添加数据处理, 由KD层管理并下发\n      if (mousePointChange) {\n        mousePointChange = false;\n        if (window.requestIdleCallback) {\n          window.requestIdleCallback(function () {\n            document.body.style.cursor = 'default';\n          }, {\n            timeout: ANIMATE_END_DELAY\n          });\n        } else {\n          _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14___default()(function () {\n            document.body.style.cursor = 'default';\n          }, ANIMATE_END_DELAY);\n        }\n      }\n    },\n    onDragMove: function onDragMove(e) {\n      var _context5;\n      if (commonStopParentDrag(e, id)) {\n        return;\n      }\n      var target = e.target;\n      var stageRef = context.stageRef,\n        selectionContext = context.selectionContext,\n        getRedundancyXY = context.getRedundancyXY,\n        rootControlRef = context.rootControlRef;\n      var _ref5 = context.rulerRef.current || {},\n        operateLine = _ref5.operateLine;\n      var pos = _onDragMove && _onDragMove(e, position, dragBoundFunc);\n      // const { x: targetX, y: targetY } = target.attrs\n      var _target$getAbsolutePo2 = target.getAbsolutePosition(),\n        targetAbsoluteX = _target$getAbsolutePo2.x,\n        targetAbsoluteY = _target$getAbsolutePo2.y;\n      var _Object$assign = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_5__[\"default\"])({}, pos || {}),\n        absoluteX = _Object$assign.x,\n        absoluteY = _Object$assign.y;\n      // const { x: redundancyX, y: redundancyY } = getRedundancyXY()\n      var x = lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(absoluteX) ? targetAbsoluteX : absoluteX; // - redundancyX)\n      var y = lodash__WEBPACK_IMPORTED_MODULE_16___default().isUndefined(absoluteY) ? targetAbsoluteY : absoluteY; // - redundancyY)\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context5 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_13___default()(distanceInfo.current)).call(_context5, function (id) {\n        var _distanceInfo$current2 = distanceInfo.current[id],\n          xDis = _distanceInfo$current2.xDis,\n          yDis = _distanceInfo$current2.yDis;\n        var node = stageRef.current.findOne(\"#\".concat(id));\n        if (node.draggable()) {\n          var _stageRef$current$fin;\n          // node.position({\n          //   x: x - xDis,\n          //   y: y - yDis\n          // })\n          // xDis存绝对, 这里也应用绝对\n          node.setAbsolutePosition({\n            x: x - xDis,\n            y: y - yDis\n          });\n          // TODO: 可能是Konva的bug, 暂时这样处理\n          (_stageRef$current$fin = stageRef.current.findOne(\"#transformer_\".concat(id))) === null || _stageRef$current$fin === void 0 || _stageRef$current$fin.forceUpdate();\n        }\n      });\n      if (!mousePointChange) {\n        mousePointChange = true;\n        if (window.requestIdleCallback) {\n          window.requestIdleCallback(function () {\n            document.body.style.cursor = 'move';\n          }, {\n            timeout: ANIMATE_DELAY\n          });\n        } else {\n          _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_14___default()(function () {\n            document.body.style.cursor = 'move';\n          }, ANIMATE_DELAY);\n        }\n      }\n      // 这里需要跟refLine关联\n      var position = getAbsolutePosition(shapeRef, getRedundancyXY());\n      operateLine && operateLine((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(position, {\n        top: position.y,\n        left: position.x\n      }));\n    }\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useDragDrop.tsx?");

/***/ }),

/***/ 86020:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useDragMove: function() { return /* binding */ useDragMove; }\n/* harmony export */ });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar useDragMove = function useDragMove(_ref) {\n  var id = _ref.id,\n    refLineRef = _ref.refLineRef;\n  return (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (_1, _2, dragBoundFunc) {\n    var _ref2 = refLineRef.current || {},\n      searchRefLines = _ref2.searchRefLines;\n    var res = searchRefLines && searchRefLines(id);\n    if (res && !lodash__WEBPACK_IMPORTED_MODULE_0___default().isEmpty(res)) {\n      var selectedNode = res.selectedNode,\n        originX = res.x,\n        originY = res.y,\n        refX = res.refX,\n        refY = res.refY;\n      var handlePos = {\n        x: !lodash__WEBPACK_IMPORTED_MODULE_0___default().isUndefined(refX) ? refX : originX,\n        y: !lodash__WEBPACK_IMPORTED_MODULE_0___default().isUndefined(refY) ? refY : originY\n      };\n      var _dragBoundFunc = dragBoundFunc(handlePos),\n        x = _dragBoundFunc.x,\n        y = _dragBoundFunc.y;\n      // const { x: nodeX, y: nodeY } = selectedNode.absolutePosition()\n      selectedNode.absolutePosition({\n        x: x,\n        y: y\n      });\n      return {\n        x: x,\n        y: y\n      };\n    }\n  }, []);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useDragMove.ts?");

/***/ }),

/***/ 88456:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(95992);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(32064);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(98092);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_16__);\n\n\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"getEditor\", \"dataContext\", \"definition\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\n\n\n\n\n// TODO: 节点计算从子节点一直回溯到根节点的位置计算（而不是自己传入）\n// 默认编辑器\nvar DefaultEditor = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_12__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_12__.forwardRef)(function () {\n  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var forwardedRef = arguments.length > 1 ? arguments[1] : undefined;\n  var _props$x = props.x,\n    x = _props$x === void 0 ? 0 : _props$x,\n    _props$y = props.y,\n    y = _props$y === void 0 ? 0 : _props$y,\n    _props$marginLeft = props.marginLeft,\n    marginLeft = _props$marginLeft === void 0 ? 0 : _props$marginLeft,\n    _props$offsetTop = props.offsetTop,\n    offsetTop = _props$offsetTop === void 0 ? 0 : _props$offsetTop,\n    _props$offsetLeft = props.offsetLeft,\n    offsetLeft = _props$offsetLeft === void 0 ? 0 : _props$offsetLeft,\n    _props$marginTop = props.marginTop,\n    marginTop = _props$marginTop === void 0 ? 0 : _props$marginTop,\n    height = props.height,\n    width = props.width,\n    value = props.value,\n    show = props.show,\n    id = props.id,\n    propertyName = props.propertyName,\n    onSave = props.onSave,\n    saveBySelf = props.saveBySelf,\n    hideEditor = props.hideEditor,\n    isWrap = props.isWrap,\n    _props$fontSize = props.fontSize,\n    fontSize = _props$fontSize === void 0 ? 12 : _props$fontSize,\n    _props$fontFamily = props.fontFamily,\n    fontFamily = _props$fontFamily === void 0 ? 'SimSun, arial, sans-serif' : _props$fontFamily,\n    fontWeight = props.fontWeight,\n    fontStyle = props.fontStyle,\n    textDecoration = props.textDecoration,\n    paddingTop = props.paddingTop,\n    paddingLeft = props.paddingLeft,\n    paddingRight = props.paddingRight,\n    paddingBottom = props.paddingBottom,\n    backgroundColor = props.backgroundColor,\n    color = props.color,\n    maxLength = props.maxLength,\n    align = props.align,\n    verAlignment = props.verAlignment,\n    lineSpace = props.lineSpace,\n    letterSpacing = props.letterSpacing,\n    save = props.save;\n  if (!show) return null;\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(value),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState, 2),\n    val = _useState2[0],\n    setVal = _useState2[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {\n    setVal(value);\n  }, [value]);\n  var saveAction = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function () {\n    if (!show || value === val) return;\n    setVal(val);\n    !saveBySelf ? onSave(id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_10__[\"default\"])({}, propertyName, val)) : saveBySelf(id, val);\n  }, [show, val, value]);\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      save: saveAction,\n      isInputShow: function isInputShow() {\n        return !!inputRef.current;\n      }\n    };\n  }, [show, val, value]);\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {\n    var _inputRef$current;\n    (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();\n  }, []);\n  // TODO: 排查位置误差哪里来的，先给值修复\n  var MAGIC_NUM = 0;\n  var MAGIC_NUM_1 = 0;\n  // const Component = !isWrap ? Input : TextArea\n  var divRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  (0,react__WEBPACK_IMPORTED_MODULE_12__.useEffect)(function () {\n    var saveAndHideInput = function saveAndHideInput() {\n      saveAction();\n      hideEditor && hideEditor();\n    };\n    var callback = function callback(e) {\n      if (!inputRef.current) return;\n      var node = e.target;\n      while (node) {\n        if (node === divRef.current) {\n          return;\n        }\n        node = node.parentNode;\n      }\n      saveAndHideInput();\n    };\n    document.addEventListener('mousedown', callback);\n    window.addEventListener('resize', saveAndHideInput);\n    return function () {\n      window.removeEventListener('resize', saveAndHideInput);\n      document.removeEventListener('mousedown', callback);\n    };\n  }, [saveAction]);\n  var valueRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(value);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    ref: divRef,\n    className: \"kdesigner-text-editor\",\n    style: {\n      left: x + _constants__WEBPACK_IMPORTED_MODULE_15__.CANVAS_PADDING,\n      top: y + _constants__WEBPACK_IMPORTED_MODULE_15__.CANVAS_PADDING,\n      position: 'absolute',\n      height: height,\n      width: width,\n      backgroundColor: backgroundColor || '#fff',\n      border: \"1px solid \".concat(_constants__WEBPACK_IMPORTED_MODULE_15__.DEFAULT_HOVER_BORDER_COLOR),\n      overflow: 'hidden',\n      boxSizing: 'border-box'\n      // overflowY: 'hidden',\n      // overflowX: 'hidden'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(\"div\", {\n    style: {\n      height: height,\n      width: width,\n      fontSize: fontSize,\n      fontFamily: fontFamily,\n      wordBreak: isWrap ? 'break-all' : 'normal',\n      fontWeight: fontWeight,\n      fontStyle: fontStyle,\n      textDecoration: textDecoration,\n      color: color,\n      paddingLeft: paddingLeft,\n      paddingTop: paddingTop,\n      paddingRight: paddingRight,\n      paddingBottom: paddingBottom,\n      boxSizing: 'border-box',\n      outline: 'none',\n      display: 'flex',\n      alignItems: 'flex-start'\n      // alignItems: verAlignment === 'middle' ? 'center' : verAlignment === 'bottom' ? 'end' : 'start'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_13__.TextArea, {\n    autoSize: true,\n    borderType: \"none\",\n    value: val,\n    className: \"kdesigner-text-editor\",\n    style: {\n      height: '100%',\n      width: '100%',\n      textAlign: align,\n      lineSpace: lineSpace,\n      letterSpacing: letterSpacing,\n      fontSize: fontSize,\n      fontFamily: fontFamily,\n      wordBreak: isWrap ? 'break-all' : 'normal',\n      fontWeight: fontWeight,\n      fontStyle: fontStyle,\n      textDecoration: textDecoration,\n      color: color,\n      paddingTop: 2,\n      //火狐特殊\n      paddingLeft: 2,\n      //火狐特殊\n      paddingRight: 0,\n      paddingBottom: 0,\n      backgroundColor: backgroundColor || '#fff'\n    },\n    onChange: function onChange(e) {\n      setVal(e.target.value || '');\n    },\n    maxLength: maxLength,\n    count: !!maxLength,\n    onBlur: function onBlur(e) {\n      saveAction();\n    },\n    ref: inputRef,\n    pressEnterSwitch: false,\n    onFocus: function onFocus(e) {\n      var _e$target;\n      (_e$target = e.target) === null || _e$target === void 0 || _e$target.setSelectionRange((val === null || val === void 0 ? void 0 : val.length) || 0, (val === null || val === void 0 ? void 0 : val.length) || 0);\n    }\n  })));\n}));\n// 传入默认编辑器\nvar useEditor = function useEditor(props) {\n  var _props$getEditor = props.getEditor,\n    getEditor = _props$getEditor === void 0 ? function () {\n      return DefaultEditor;\n    } : _props$getEditor,\n    dataContext = props.dataContext,\n    definition = props.definition,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(props, _excluded);\n  var onSave = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function (id, value) {\n    // TODO：\n    // 统一走\n    var _dataContext$findCont = dataContext.findControl(id),\n      dsType = _dataContext$findCont.dsType,\n      lineWrapRule = _dataContext$findCont.lineWrapRule;\n    if (lineWrapRule === 3 && value.bindText) {\n      value.bindText = value.bindText.replace(/[\\r\\n]/g, \"\");\n    }\n    if (dsType === 'Formula') {\n      return dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.createUpdateAction)([[id, _objectSpread(_objectSpread({}, value), {}, {\n        viewText: ''\n      })]]));\n    }\n    var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_14__.isBindFieldMode)(value),\n      isBindField = _isBindFieldMode.isBindField,\n      bindField = _isBindFieldMode.bindField;\n    var emptyChange = _objectSpread(_objectSpread({}, value), {}, {\n      bindField: '',\n      dataSource: '',\n      viewText: '',\n      dsType: ''\n    });\n    if (isBindField) {\n      // 由于基础资料也是用.连接, 所以不能用.分割\n      // 需要模式匹配\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_14__.queryDataSourceAndAncestorByName)(bindField, definition);\n      if (!res) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.emit('input-query', {\n          id: id,\n          value: true\n        });\n        console.error('queryDataSourceAndAncestorByName has no res', bindField, definition);\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.createUpdateAction)([[id, emptyChange]]));\n        return;\n      }\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.emit('input-query', {\n        id: id,\n        value: false\n      });\n      var dataSource = res.dataSource,\n        key = res.key,\n        viewText = res.viewText,\n        _dsType = res.dsType;\n      console.log('bindField, definition, res');\n      console.log(bindField, definition, res);\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.createUpdateAction)([[id, _objectSpread(_objectSpread({}, value), {}, {\n        bindField: key,\n        dataSource: dataSource,\n        viewText: \"=$\".concat(viewText),\n        dsType: _dsType\n      })]]));\n    } else {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.emit('input-query', {\n        id: id,\n        value: false\n      });\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.createUpdateAction)([[id, emptyChange]]));\n    }\n  }, [dataContext]);\n  // useEffect(() => {\n\n  // }, [])\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState3, 2),\n    isShowEditor = _useState4[0],\n    setShowEditor = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_12__.useState)({}),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(_useState5, 2),\n    position = _useState6[0],\n    setPosition = _useState6[1];\n  var inputNodeRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_12__.useRef)(null);\n  var showEditor = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function () {\n    setShowEditor(true);\n  }, []);\n  var hideEditor = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function () {\n    var _inputRef$current2;\n    // TODO\n    if ((_inputRef$current2 = inputRef.current) !== null && _inputRef$current2 !== void 0 && _inputRef$current2.isInputShow()) {\n      var _inputRef$current3;\n      (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.save();\n      setShowEditor(false);\n    }\n  }, []);\n  var setEditorPosition = (0,react__WEBPACK_IMPORTED_MODULE_12__.useCallback)(function () {\n    var pos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    var shapeRef = pos.shapeRef;\n    inputNodeRef.current = shapeRef === null || shapeRef === void 0 ? void 0 : shapeRef.current;\n    setPosition(pos);\n  }, []);\n  var Editor = getEditor();\n  var editorElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12___default().createElement(Editor, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n    ref: inputRef,\n    show: isShowEditor,\n    onSave: onSave,\n    hideEditor: hideEditor\n  }, rest, position));\n  return {\n    showEditor: showEditor,\n    hideEditor: hideEditor,\n    editorElement: editorElement,\n    setEditorPosition: setEditorPosition,\n    inputNodeRef: inputNodeRef\n  };\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (useEditor);\n\n//# sourceURL=webpack://print-designer/./src/hooks/useEditor.tsx?");

/***/ }),

/***/ 5668:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useGetControlRenderSizeProp: function() { return /* binding */ useGetControlRenderSizeProp; }\n/* harmony export */ });\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41232);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98092);\n// import {useCallback} from 'react'\n\n\n// 只做渲染用，计算不参与\nvar useGetControlRenderSizeProp = function useGetControlRenderSizeProp(propVal, scale, precision) {\n  return Math.max((0,_utils__WEBPACK_IMPORTED_MODULE_0__.calculatorMMtoPx)(propVal, scale, precision), _constants__WEBPACK_IMPORTED_MODULE_1__.MIN_SHAPE_SIZE_PROP);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useGetControlRenderSizeProp.tsx?");

/***/ }),

/***/ 18916:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useGlobalGuideState: function() { return /* binding */ useGlobalGuideState; }\n/* harmony export */ });\n/* harmony import */ var react_use__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39356);\n\nvar useGlobalGuideState = (0,react_use__WEBPACK_IMPORTED_MODULE_0__.createGlobalState)(true);\n\n//# sourceURL=webpack://print-designer/./src/hooks/useGlobalGuideState.ts?");

/***/ }),

/***/ 3260:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useGridChildItemDoubleClick: function() { return /* binding */ useGridChildItemDoubleClick; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98092);\n\n\nvar useGridChildItemDoubleClick = function useGridChildItemDoubleClick() {\n  return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (e, gridState, handleMouseDown) {\n    if (e.evt.button !== 0) return true;\n    if (gridState !== _constants__WEBPACK_IMPORTED_MODULE_1__.GRID_EDITOR_STATE) {\n      console.log('grid textField onDblClick', gridState, e);\n      // 但是因为是2，还是会被打断不进行\n      handleMouseDown(e);\n      return true;\n    }\n  }, []);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useGridChildItemDoubleClick.ts?");

/***/ }),

/***/ 89140:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useHover: function() { return /* binding */ useHover; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98092);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n// TODO 控件默认的悬浮效果hook\nvar helper = function helper(methodName) {\n  return function (shapeRef, color) {\n    if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0___default()(shapeRef.current)) {\n      var _context;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = shapeRef.current).call(_context, function (node) {\n        return node[methodName] && node[methodName](color);\n      });\n    } else {\n      shapeRef.current && shapeRef.current[methodName](color);\n    }\n  };\n};\nvar strokeEnabledHelper = helper('strokeEnabled');\nvar strokeHelper = helper('stroke');\nvar batchDrawHelper = function batchDrawHelper(shapeRef) {\n  var isBatchDraw = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_0___default()(shapeRef.current)) {\n    if (isBatchDraw) {\n      var _shapeRef$current$;\n      (_shapeRef$current$ = shapeRef.current[0]) === null || _shapeRef$current$ === void 0 || (_shapeRef$current$ = _shapeRef$current$.getLayer()) === null || _shapeRef$current$ === void 0 || _shapeRef$current$.batchDraw();\n    } else {\n      var _context2;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context2 = shapeRef.current).call(_context2, function (node) {\n        return node === null || node === void 0 ? void 0 : node.draw();\n      });\n    }\n  } else {\n    // shapeRef.current?.draw()\n    // shapeRef.current?.getParent()?.draw()\n    // Konva bug: 边框设置之后\n    if (isBatchDraw) {\n      var _shapeRef$current;\n      (_shapeRef$current = shapeRef.current) === null || _shapeRef$current === void 0 || _shapeRef$current.getLayer().batchDraw();\n    } else {\n      var _shapeRef$current2;\n      (_shapeRef$current2 = shapeRef.current) === null || _shapeRef$current2 === void 0 || _shapeRef$current2.draw();\n    }\n  }\n};\nvar useHover = function useHover(_ref) {\n  var shapeRef = _ref.shapeRef,\n    isSelected = _ref.isSelected,\n    _ref$shapeRefStroke = _ref.shapeRefStroke,\n    shapeRefStroke = _ref$shapeRefStroke === void 0 ? _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_BORDER_COLOR : _ref$shapeRefStroke,\n    controlStrokeRef = _ref.controlStrokeRef,\n    strokeEnabled = _ref.strokeEnabled;\n  // const visible = shapeRef.current?.visible()\n  var visible = false;\n  var onMouseOver = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n    if (!isSelected) {\n      var _controlStrokeRef$cur;\n      (_controlStrokeRef$cur = controlStrokeRef.current) === null || _controlStrokeRef$cur === void 0 || _controlStrokeRef$cur.mouseEnter(_constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_HOVER_BORDER_COLOR);\n      !strokeEnabled && strokeEnabledHelper(shapeRef, !strokeEnabled);\n      strokeHelper(shapeRef, _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_HOVER_BORDER_COLOR);\n      // if (!visible) {\n      //   shapeRef.current?.visible(true)\n      // }\n      // TODO\n      // 这个draw好废啊，得琢磨下如果更优处理，draw会导致图层比Transformer层级高,导致重叠图形hover时,\n      // 从一个图形hover到另一个图形会不能Transformer的现象\n      batchDrawHelper(shapeRef, true);\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.console.log('DEFAULT_HOVER_BORDER_COLOR', _constants__WEBPACK_IMPORTED_MODULE_3__.DEFAULT_HOVER_BORDER_COLOR, shapeRef);\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.console.log('DEFAULT_HOVER_BORDER_COLOR', shapeRef.current.stroke());\n    }\n    return true;\n  }, [isSelected, shapeRefStroke, strokeEnabled, visible]);\n  var onMouseOut = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n    if (!isSelected) {\n      var _controlStrokeRef$cur2, _shapeRef$current3;\n      !strokeEnabled && strokeEnabledHelper(shapeRef, strokeEnabled);\n      (_controlStrokeRef$cur2 = controlStrokeRef.current) === null || _controlStrokeRef$cur2 === void 0 || _controlStrokeRef$cur2.mouseLeave();\n      strokeHelper(shapeRef, '');\n      shapeRefStroke && strokeHelper(shapeRef, shapeRefStroke);\n      if (!visible) {\n        // shapeRef.current?.visible(false)\n      }\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_4__.console.log('onMouseOut', shapeRef, shapeRefStroke, (_shapeRef$current3 = shapeRef.current) === null || _shapeRef$current3 === void 0 ? void 0 : _shapeRef$current3.stroke());\n      batchDrawHelper(shapeRef, true);\n    }\n    return true;\n  }, [isSelected, shapeRefStroke, strokeEnabled, visible]);\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    if (shapeRefStroke) {\n      var _controlStrokeRef$cur3;\n      strokeEnabledHelper(shapeRef, strokeEnabled);\n      (_controlStrokeRef$cur3 = controlStrokeRef.current) === null || _controlStrokeRef$cur3 === void 0 || _controlStrokeRef$cur3.mouseLeave();\n      strokeHelper(shapeRef, shapeRefStroke);\n      // if (!visible) {\n      //   shapeRef.current?.visible(false)\n      // }\n      batchDrawHelper(shapeRef, true);\n    }\n  }, [isSelected, shapeRefStroke, strokeEnabled, visible]);\n  return {\n    onMouseOut: onMouseOut,\n    onMouseOver: onMouseOver\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useHover.tsx?");

/***/ }),

/***/ 7028:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useInputQueryEvent: function() { return /* binding */ useInputQueryEvent; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar useInputQueryEvent = function useInputQueryEvent(id, showErrorDiv) {\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    var callback = function callback(_ref) {\n      var itemId = _ref.id,\n        value = _ref.value;\n      if (itemId === id) {\n        showErrorDiv(value);\n      }\n    };\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.eventBus.on('input-query', callback);\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.eventBus.off('input-query', callback);\n    };\n  }, [id]);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useInputQueryEvent.tsx?");

/***/ }),

/***/ 42552:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useInstallFontFamilyOnline: function() { return /* binding */ useInstallFontFamilyOnline; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31408);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\n\n// import alibabaPHT from '../font/Alibaba-PuHuiTi-Regular.otf'\n// import lantinghei from '../font/FZLanTingHeiS-R-GB.otf'\n// import wsXiyuan from '../font/FZXiYuan-M01S.otf'\n// import sourceSong from '../font/SourceHanSansSC-Regular.otf'\n// import sourceHei from '../font/SourceHanSerifSC-Regular.otf'\n\n// const getFontSrc = (fontName: string) => {\n//   switch (fontName) {\n//     case 'SourceHanSerifSC-Regular': {\n//       return sourceHei\n//     }\n//     case 'SourceHanSansSC-Regular': {\n//       return sourceSong\n//     }\n//     case 'FZXiYuan-M01S': {\n//       return wsXiyuan\n//     }\n//     case 'FZLanTingHeiS-R-GB': {\n//       return lantinghei\n//     }\n//     case 'Alibaba-PuHuiTi-Regular': {\n//       return alibabaPHT\n//     }\n//     default: {\n//       return sourceHei\n//     }\n//   }\n// }\n// 后面可以由外界自己加载自定义字体？\n// TODO: 重试?\nvar isLoadFont = false;\nvar loadedFontMap = {};\nvar createDummyNode = function createDummyNode(fontNameMap) {\n  var _context;\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_1___default()(_context = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)).call(_context, function (_ref) {\n    var _ref2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref, 1),\n      _fontName = _ref2[0];\n    var fontName = _fontName === '阿里巴巴普惠体-R' ? '阿里巴巴普惠体' : _fontName;\n    var div = document.createElement('div');\n    div.style.position = 'fixed';\n    div.style.opacity = '0';\n    div.style.zIndex = '-1050';\n    div.classList.add('cq-font-family-install-dummy-node');\n    div.textContent = fontName;\n    div.style.fontFamily = (0,_constants__WEBPACK_IMPORTED_MODULE_8__.makeFontFamily)(fontName);\n    document.body.appendChild(div);\n  });\n};\nvar WAITTING_LOADING_FONT_LIMITED_TIME = 5000;\nvar useInstallFontFamilyOnline = function useInstallFontFamilyOnline() {\n  var fontNameMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_7__.useState)(!fontNameMap),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    isFontLoaded = _useState2[0],\n    setIsFontLoaded = _useState2[1];\n  // const keys = Object.keys(fontNameMap)\n  if (fontNameMap && !isFontLoaded && !isLoadFont) {\n    isLoadFont = true;\n    if (window.FontFace) {\n      var _context2;\n      //\n      _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default().allSettled(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)).call(_context2, function (_ref3) {\n        var _ref4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref3, 2),\n          _fontName = _ref4[0],\n          sourceSrc = _ref4[1];\n        var fontName = _fontName === '阿里巴巴普惠体-R' ? '阿里巴巴普惠体' : _fontName;\n        return new (_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default())(function (resolve, reject) {\n          _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_5___default()(function () {\n            resolve(\"not to wait loading font \".concat(fontName));\n          }, WAITTING_LOADING_FONT_LIMITED_TIME);\n          var loadingPromise = new FontFace(fontName, \"url(\".concat(sourceSrc, \")\")).load().then(function (font) {\n            if (font) {\n              loadedFontMap[fontName] = true;\n            }\n            // 因为allSettled所以不管直接add\n            document.fonts.add(font);\n            resolve(\"install resolve \".concat(fontName));\n          }).catch(function () {\n            reject(\"install reject \".concat(fontName));\n          });\n          console.log('loadingPromise', fontName, loadingPromise);\n        }).then(function (res) {\n          console.log(res);\n        }, function (err) {\n          console.log(err);\n        });\n      })).then(function (promiseRes) {\n        createDummyNode(fontNameMap);\n        console.log(\"getCustomFont promiseRes: \".concat(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)), fontNameMap, promiseRes, loadedFontMap);\n        setIsFontLoaded(true);\n        // return true\n      }).catch(function (promiseRes) {\n        // 按理说不会走进来\n        createDummyNode(fontNameMap);\n        console.log(\"getCustomFont promiseErr: \".concat(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)), fontNameMap, promiseRes, loadedFontMap);\n        setIsFontLoaded(true);\n      });\n    } else {\n      var _context3;\n      var corsOptions = {\n        method: 'GET',\n        mode: 'cors',\n        credentials: 'include',\n        headers: {\n          'Cache-Control': 'public, max-age=31536000'\n        }\n      };\n      _babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default().allSettled(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_4___default()(_context3 = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)).call(_context3, function (_ref5) {\n        var _ref6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref5, 2),\n          _fontName = _ref6[0],\n          sourceSrc = _ref6[1];\n        // src 可以取到相对路径? webpack应该处理不了\n        var fontName = _fontName === '阿里巴巴普惠体-R' ? '阿里巴巴普惠体' : _fontName;\n        return new (_babel_runtime_corejs3_core_js_stable_promise__WEBPACK_IMPORTED_MODULE_3___default())(function (resolve, reject) {\n          _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_5___default()(function () {\n            resolve(\"not to wait loading font \".concat(fontName));\n          }, WAITTING_LOADING_FONT_LIMITED_TIME);\n          var loadingPromise = window.fetch(sourceSrc, corsOptions).then(function (response) {\n            return response.text();\n          }).then(function (res) {\n            if (res) {\n              var _context4;\n              var style = document.createElement('style');\n              style.type = 'text/css';\n              // 为了正确获取所以需要加载两遍\n              // 缓存是个问题\n              var content = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_6___default()(_context4 = \"\\n              @font-face {\\n                font-family: \\\"\".concat(fontName, \"\\\";\\n                src: url(\")).call(_context4, sourceSrc, \");\\n              }\");\n              // url(\"/fonts/OpenSans-Regular-webfont.woff\") format(\"woff\");\n              if (style.styleSheet) {\n                // ie\n                // style.styleSheet.cssText = res\n                style.styleSheet.cssText = content;\n              } else {\n                // style.appendChild(document.createTextNode(res))\n                style.appendChild(document.createTextNode(content));\n              }\n              console.log(res);\n              loadedFontMap[fontName] = true;\n              document.head.appendChild(style);\n              resolve(\"install resolve \".concat(fontName));\n            }\n          }).catch(function (err) {\n            reject(\"install reject \".concat(fontName));\n            console.log(\"getCustomFont err: \".concat(err));\n          });\n          console.log('loadingPromise', fontName, loadingPromise);\n        }).then(function (res) {\n          console.log(res);\n        }, function (err) {\n          console.log(err);\n        });\n      })).then(function (promiseRes) {\n        createDummyNode(fontNameMap);\n        console.log(\"getCustomFont promiseRes: \".concat(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)), fontNameMap, promiseRes, loadedFontMap);\n        setIsFontLoaded(true);\n      }).catch(function () {\n        // 按理说不会走进来\n        createDummyNode(fontNameMap);\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n        console.log(\"getCustomFont promiseErr: \".concat(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_2___default()(fontNameMap)), fontNameMap, args, loadedFontMap);\n        setIsFontLoaded(true);\n      });\n      // 一定要fetch\n      // window.addEventListener('load', (event) => {\n      //   createDummyNode(fontNameMap)\n      //   console.log(`getCustomFont promiseRes: ${Object.entries(fontNameMap)}`, fontNameMap, promiseRes, loadedFontMap)\n      //   setIsFontLoaded(true)\n      //   // log.textContent = log.textContent + 'load\\n';\n      // })\n      // window.\n    }\n  }\n  return isFontLoaded;\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useInstallFontFamilyOnline.ts?");

/***/ }),

/***/ 64484:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useLastSelectedModal: function() { return /* binding */ useLastSelectedModal; }\n/* harmony export */ });\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_0__);\n\nvar useLastSelectedModal = function useLastSelectedModal(_ref) {\n  var selectionContext = _ref.selectionContext,\n    dataContext = _ref.dataContext,\n    meta = _ref.meta,\n    activedSelectId = _ref.activedSelectId,\n    modelFactory = _ref.modelFactory;\n  // const { activedSelectId } = useSelected({ selectionContext, dataContext, activedSelectId:  })\n  var rootId = dataContext.getRootId();\n  var selectItem = dataContext.findControl(activedSelectId || rootId);\n  if (!selectItem) {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_0__.console.log('useLastSelectedModal', activedSelectId, selectionContext.getSelection());\n  }\n  var selectItemType = selectItem.type;\n  var selectModel = modelFactory({\n    type: selectItemType\n  });\n  var modelData = selectModel.Properties;\n  return {\n    modelData: modelData,\n    selectModel: selectModel,\n    activedSelectId: activedSelectId,\n    selectItem: selectItem,\n    rootId: rootId,\n    isRootId: rootId === activedSelectId\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useLastSelectedModal.tsx?");

/***/ }),

/***/ 99252:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useMeasureDirty: function() { return /* binding */ useMeasure; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82504);\n/* harmony import */ var react_use__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97584);\n\n\n\n\nvar noop = function noop() {};\nvar defaultState = {\n  x: 0,\n  y: 0,\n  width: 0,\n  height: 0,\n  top: 0,\n  left: 0,\n  bottom: 0,\n  right: 0\n};\nfunction useMeasure() {\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    element = _useState2[0],\n    ref = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultState),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState3, 2),\n    rect = _useState4[0],\n    setRect = _useState4[1];\n  var observer = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {\n    return new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_2__[\"default\"](function (entries) {\n      if (entries[0]) {\n        var _entries$0$contentRec = entries[0].contentRect,\n          x = _entries$0$contentRec.x,\n          y = _entries$0$contentRec.y,\n          width = _entries$0$contentRec.width,\n          height = _entries$0$contentRec.height,\n          top = _entries$0$contentRec.top,\n          left = _entries$0$contentRec.left,\n          bottom = _entries$0$contentRec.bottom,\n          right = _entries$0$contentRec.right;\n        setRect({\n          x: x,\n          y: y,\n          width: width,\n          height: height,\n          top: top,\n          left: left,\n          bottom: bottom,\n          right: right\n        });\n      }\n    });\n  }, []);\n  (0,react_use__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(function () {\n    if (!element) return;\n    observer.observe(element);\n    return function () {\n      observer.disconnect();\n    };\n  }, [element]);\n  return [ref, rect];\n}\n\n\n//# sourceURL=webpack://print-designer/./src/hooks/useMeasureDirty.ts?");

/***/ }),

/***/ 98724:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useScrollKey: function() { return /* binding */ useScrollKey; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _useLastSelectedModal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64484);\n\n\n\nvar useScrollKey = function useScrollKey(_ref) {\n  var dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    meta = _ref.meta,\n    activedSelectId = _ref.activedSelectId,\n    modelFactory = _ref.modelFactory;\n  var _useLastSelectedModal = (0,_useLastSelectedModal__WEBPACK_IMPORTED_MODULE_2__.useLastSelectedModal)({\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      meta: meta,\n      activedSelectId: activedSelectId,\n      modelFactory: modelFactory\n    }),\n    selectItem = _useLastSelectedModal.selectItem,\n    isRootId = _useLastSelectedModal.isRootId;\n  // selectItem.type === 'Text'\n  if (!isRootId && selectItem && selectItem.dataSource && selectItem.bindField) {\n    var _context;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.console.log('selectItem useScrollKey', selectItem);\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context = \"\".concat(selectItem.dataSource, \"-\")).call(_context, selectItem.bindField);\n  }\n  return '';\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useScrollKey.ts?");

/***/ }),

/***/ 14772:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useSelected: function() { return /* binding */ useSelected; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n/* harmony import */ var _utils_client__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(77168);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21980);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\n\n\n\nvar useSelected = function useSelected(_ref, id) {\n  var selectionContext = _ref.selectionContext,\n    activedSelectId = _ref.activedSelectId,\n    dataContext = _ref.dataContext,\n    rulerRef = _ref.rulerRef,\n    navToolRef = _ref.navToolRef,\n    beforeMouseDown = _ref.beforeMouseDown;\n  var rootId = dataContext.getRootId();\n  var isRootId = rootId === id;\n  var selection = selectionContext.getSelection();\n  var controlData = dataContext.findControl(id);\n  var parentId = controlData === null || controlData === void 0 ? void 0 : controlData.parentId;\n  var canvasSelectContext = (0,react__WEBPACK_IMPORTED_MODULE_5__.useContext)(_context__WEBPACK_IMPORTED_MODULE_11__.CanvasSelectContext);\n  var _ref2 = canvasSelectContext || {},\n    _ref2$isMultiKeyActiv = _ref2.isMultiKeyActiveWhenSelectedRef,\n    isMultiKeyActiveWhenSelectedRef = _ref2$isMultiKeyActiv === void 0 ? (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(false) : _ref2$isMultiKeyActiv;\n  var formatControl = (0,react__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (id) {\n    var _navToolRef$current$f, _navToolRef$current;\n    var ref = (_navToolRef$current$f = (_navToolRef$current = navToolRef.current) === null || _navToolRef$current === void 0 ? void 0 : _navToolRef$current.formatControlInfoRef) !== null && _navToolRef$current$f !== void 0 ? _navToolRef$current$f : {};\n    var _ref3 = ref.current || {},\n      item = _ref3.selectItem,\n      isDoubleClick = _ref3.isDoubleClick;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('formatControl', id, rootId, item, navToolRef);\n    if (item) {\n      if (rootId === id) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.eventBus.emit('format-done');\n        return;\n      }\n      // 哪些属性应该是可以格式刷的\n      // 现在先更新一个\n      var idItem = dataContext.findControl(id);\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('formatControl', (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, item, idItem), item, idItem);\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.createUpdateAction)([[id, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n        formatBrush: true\n      }, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1___default()(_constants_index__WEBPACK_IMPORTED_MODULE_6__.FORMAT_PROP_LIST).call(_constants_index__WEBPACK_IMPORTED_MODULE_6__.FORMAT_PROP_LIST, function (res, prop) {\n        var _context;\n        // 单元格格式刷规则：一般单元格只有上边框与左边框，格式刷其他控件时不能仅复制左上，\n        // 当左上边框样式相同且右下没有样式时（没有样式指宽度为0）右下样式复制左上样式，否则使用原本的样式\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(_context = ['DataCell', 'LayoutCell']).call(_context, item.type) && prop === 'border') {\n          if ('border' in item && 'border' in idItem) {\n            var oldBorder = lodash__WEBPACK_IMPORTED_MODULE_9___default().cloneDeep(item.border);\n            var isEqual = oldBorder.width.left && oldBorder.width.top && oldBorder.color.left === oldBorder.color.top && oldBorder.width.left === oldBorder.width.top && oldBorder.style.left === oldBorder.style.top;\n            if (isEqual) {\n              var rightBottom = ['right', 'bottom'];\n              var newBorder = {\n                color: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1___default()(_constants_index__WEBPACK_IMPORTED_MODULE_6__.OUT_BORDER_PROPS).call(_constants_index__WEBPACK_IMPORTED_MODULE_6__.OUT_BORDER_PROPS, function (res, prop) {\n                  var isExist = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(rightBottom).call(rightBottom, prop) && oldBorder.width[prop];\n                  res[prop] = isExist ? oldBorder.color[prop] : oldBorder.color.top;\n                  return res;\n                }, {}),\n                width: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1___default()(_constants_index__WEBPACK_IMPORTED_MODULE_6__.OUT_BORDER_PROPS).call(_constants_index__WEBPACK_IMPORTED_MODULE_6__.OUT_BORDER_PROPS, function (res, prop) {\n                  var isExist = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(rightBottom).call(rightBottom, prop) && oldBorder.width[prop];\n                  res[prop] = isExist ? oldBorder.width[prop] : oldBorder.width.top;\n                  return res;\n                }, {}),\n                style: _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_1___default()(_constants_index__WEBPACK_IMPORTED_MODULE_6__.OUT_BORDER_PROPS).call(_constants_index__WEBPACK_IMPORTED_MODULE_6__.OUT_BORDER_PROPS, function (res, prop) {\n                  var isExist = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(rightBottom).call(rightBottom, prop) && oldBorder.width[prop];\n                  designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log(oldBorder.style.top);\n                  res[prop] = isExist ? oldBorder.style[prop] : oldBorder.style.top;\n                  return res;\n                }, {})\n              };\n              res.border = newBorder;\n            } else {\n              res.border = item.border;\n            }\n          }\n        } else if (prop in item && prop in idItem) {\n          res[prop] = item[prop];\n        }\n        return res;\n      }, {}))]]));\n    }\n  }, [rootId]);\n  var isLastSelected = id === activedSelectId;\n  var isSelected = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(selection).call(selection, id);\n  // TODO\n  // 多选、选中增删\n  var handleMouseDown = (0,react__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (currentTarget) {\n    var isMulti = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    var e = arguments.length > 2 ? arguments[2] : undefined;\n    // 不强制cancelBubble\n    // 延时就改变\n    // const target = e.currentTarget\n    var target = currentTarget;\n    // 兼容文本、单元格、图片\n    // target?.getParent() 兼容stage\n    if (target.id().split('_')[0] !== id && target.id() !== id && target !== null && target !== void 0 && target.getParent()) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('handleMouseDown', id, target);\n      return;\n    }\n    // e.cancelBubble = true\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('handleMouseDown');\n    if (beforeMouseDown && beforeMouseDown(e)) {\n      return;\n    }\n    if (id) {\n      var _navToolRef$current$f2, _navToolRef$current2;\n      var ref = (_navToolRef$current$f2 = (_navToolRef$current2 = navToolRef.current) === null || _navToolRef$current2 === void 0 ? void 0 : _navToolRef$current2.formatControlInfoRef) !== null && _navToolRef$current$f2 !== void 0 ? _navToolRef$current$f2 : {};\n      var _ref4 = ref.current || {},\n        item = _ref4.selectItem,\n        isDoubleClick = _ref4.isDoubleClick;\n      // TODO: formatControlInfoRef\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('isMulti', isMulti, id);\n      var ids = selectionContext.getSelection();\n      if (isMulti) {\n        if (isRootId) {\n          // e.cancelBubble = true\n          if (rulerRef) {\n            var _rulerRef$current;\n            (_rulerRef$current = rulerRef.current) === null || _rulerRef$current === void 0 || _rulerRef$current.hideLine();\n          }\n          // 复制整个模板的需求?\n          designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.eventBus.emit('format-done');\n          return;\n        } else {\n          if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(ids).call(ids, id)) {\n            // 取消\n            var newIds = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(ids).call(ids, function (idsId) {\n              return idsId !== id;\n            });\n            selectionContext.setSelect(newIds);\n          } else {\n            var selectionParentId = ids.length ? dataContext.findControl(ids[0]).parentId : '';\n            if (!parentId || parentId === selectionParentId) {\n              selectionContext.appendSelect([id]);\n            } else {\n              selectionContext.setSelect([id]);\n            }\n          }\n          formatControl(id);\n        }\n      } else {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('id--------------', isLastSelected, id);\n        // 这里不应该这样判断\n        // 但是一改动会改变批量拖拽\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_2___default()(ids).call(ids, id)) {\n          // 单元格不会被拖拽\n          if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_8__.isGridRelativeControl)(dataContext.findControl(id))) {\n            selectionContext.setSelect([id]);\n          } else {\n            var _context2;\n            selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(ids).call(ids, function (itemId) {\n              return id !== itemId;\n            })).call(_context2, id));\n          }\n          return;\n        } else if (!isLastSelected || ids.length > 1) {\n          selectionContext.setSelect(isRootId ? [] : [id]);\n          formatControl(id);\n        }\n      }\n      isDoubleClick === false && designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.eventBus.emit('format-done');\n      // e.cancelBubble = true\n    }\n  }, [isRootId, id, isLastSelected, rootId, beforeMouseDown]);\n  var handleMouseDownProxy = (0,react__WEBPACK_IMPORTED_MODULE_5__.useCallback)(function (e) {\n    var _e$evt;\n    var currentTarget = e.currentTarget;\n    if (((_e$evt = e.evt) === null || _e$evt === void 0 ? void 0 : _e$evt.button) === 0 || e.button === 0) {\n      var isMulti = (0,_utils_client__WEBPACK_IMPORTED_MODULE_7__.isMultiKeyActive)(e.evt);\n      // setTimeout(() => {\n      //   handleMouseDown(currentTarget, isMulti)\n      // })\n      // 渲染性能考虑\n      window.requestAnimationFrame(function () {\n        handleMouseDown(currentTarget, isMulti, e);\n        isMultiKeyActiveWhenSelectedRef.current = isMulti;\n      });\n    }\n  }, [handleMouseDown, isRootId, id, isLastSelected, rootId, beforeMouseDown]);\n  return {\n    isRootId: isRootId,\n    selection: selection,\n    isSelected: isSelected,\n    activedSelectId: activedSelectId,\n    isLastSelected: isLastSelected,\n    handleMouseDown: handleMouseDownProxy\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useSelected.tsx?");

/***/ }),

/***/ 88972:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useStopDrag: function() { return /* binding */ useStopDrag; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar useStopDrag = function useStopDrag(_ref) {\n  var shapeRef = _ref.shapeRef,\n    isNotNeed = _ref.isNotNeed;\n  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n    // 不做判断\n    var callback = function callback(e) {\n      var _shapeRef$current;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.console.log('e.ctrlKe shapeRef.current?.stopDrag()');\n      if ((_shapeRef$current = shapeRef.current) !== null && _shapeRef$current !== void 0 && _shapeRef$current.isDragging()) {\n        var _shapeRef$current2;\n        (_shapeRef$current2 = shapeRef.current) === null || _shapeRef$current2 === void 0 || _shapeRef$current2.stopDrag();\n      }\n    };\n    !isNotNeed && document.addEventListener('keydown', callback);\n    return function () {\n      !isNotNeed && document.removeEventListener('keydown', callback);\n    };\n  }, [isNotNeed]);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useStopDrag.tsx?");

/***/ }),

/***/ 71420:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useTransform: function() { return /* binding */ useTransform; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_6___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_5___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_7___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_3___default()(t, r)); }); } return e; }\n\nfunction getPosition(shapeRef) {\n  var _shapeRef$current;\n  var isAbsolute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  var isEnd = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var node = (_shapeRef$current = shapeRef.current) !== null && _shapeRef$current !== void 0 ? _shapeRef$current : shapeRef;\n  // const { x, y } = node.getClientRect({\n  //   skipStroke: true,\n  //   skipShadow: true\n  // })\n  var scaleX = node === null || node === void 0 ? void 0 : node.scaleX();\n  var scaleY = node === null || node === void 0 ? void 0 : node.scaleY();\n  var posInfo = isAbsolute ? node.getAbsolutePosition() : {\n    x: Math.max(node.x() + node.getParent().x(), 0),\n    y: Math.max(node.y() + node.getParent().y(), 0)\n  };\n  var _posInfo$width$height = _objectSpread(_objectSpread({}, posInfo), {}, {\n      width: node.width() * scaleX,\n      // Math.max(5, node.width() * scaleX),\n      height: node.height() * scaleY // Math.max(node.height() * scaleY),\n    }),\n    height = _posInfo$width$height.height,\n    width = _posInfo$width$height.width,\n    x = _posInfo$width$height.x,\n    y = _posInfo$width$height.y;\n  if (isEnd) {\n    node.scaleX(1);\n    node.scaleY(1);\n    node.x(0);\n    node.y(0);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log(node);\n    // return {\n    //   x: Math.max(x + node.getParent().x(), 0),\n    //   y: Math.max(y + node.getParent().y(), 0),\n    //   width,\n    //   height,\n    //   right: x + width,\n    //   bottom: y + height,\n    //   scaleX,\n    //   scaleY\n    // }\n  }\n  return {\n    x: Math.max(x, 0),\n    y: Math.max(y, 0),\n    width: width,\n    height: height,\n    right: x + width,\n    bottom: y + height,\n    scaleX: scaleX,\n    scaleY: scaleY\n  };\n}\n\n// 这里需要跟refLine功能相关联\nvar useTransform = function useTransform(_ref) {\n  var shapeRef = _ref.shapeRef,\n    refLineRef = _ref.refLineRef,\n    _onTransform = _ref.onTransform,\n    _onTransformEnd = _ref.onTransformEnd,\n    context = _ref.context,\n    id = _ref.id;\n  return {\n    onTransform: function onTransform(e) {\n      var _ref2 = refLineRef.current || {},\n        searchRefLines = _ref2.searchRefLines;\n      var _ref3 = context.rulerRef.current || {},\n        operateLine = _ref3.operateLine;\n      var getRedundancyXY = context.getRedundancyXY;\n      var _getRedundancyXY = getRedundancyXY(),\n        redundancyX = _getRedundancyXY.x,\n        redundancyY = _getRedundancyXY.y;\n      // TODO: 采用boundBoxFunc来限制\n      // searchRefLines && searchRefLines(id, true, { x: redundancyX, y: redundancyY })\n      var positionInfo = getPosition(shapeRef, true);\n      var scaleX = positionInfo.scaleX,\n        scaleY = positionInfo.scaleY,\n        x = positionInfo.x,\n        y = positionInfo.y,\n        width = positionInfo.width,\n        height = positionInfo.height;\n      // console.log('onTransform', {\n      //   x: Math.max(x, 0),\n      //   y: Math.max(y, 0),\n      //   width,\n      //   height,\n      //   right: x + width,\n      //   bottom: y + height,\n      //   scaleX,\n      //   scaleY\n      // })\n      var relativeX = positionInfo.x - redundancyX;\n      var relativeY = positionInfo.y - redundancyY;\n      operateLine && operateLine((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(positionInfo, {\n        top: relativeY,\n        left: relativeX,\n        x: relativeX,\n        y: relativeY\n      }));\n      _onTransform && _onTransform(positionInfo, e);\n    },\n    onTransformEnd: function onTransformEnd(e) {\n      var _ref4 = refLineRef.current || {},\n        hideRefLines = _ref4.hideRefLines;\n      var getRedundancyXY = context.getRedundancyXY,\n        marginLeft = context.marginLeft,\n        marginTop = context.marginTop;\n      var _x$y = {\n          x: 0,\n          y: 0\n        },\n        redundancyX = _x$y.x,\n        redundancyY = _x$y.y; // getRedundancyXY()\n      var positionInfo = getPosition(shapeRef, false, true);\n      // const positionInfo = getAbsolutePosition(shapeRef, { x: redundancyX, y: redundancyY })\n      var scaleX = positionInfo.scaleX,\n        scaleY = positionInfo.scaleY,\n        x = positionInfo.x,\n        y = positionInfo.y,\n        width = positionInfo.width,\n        height = positionInfo.height;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_10__.console.log('onTransformEnd', {\n        x: Math.max(x, 0),\n        y: Math.max(y, 0),\n        width: width,\n        height: height,\n        right: x + width,\n        bottom: y + height,\n        scaleX: scaleX,\n        scaleY: scaleY\n      }, e);\n      var relativeX = positionInfo.x - redundancyX;\n      var relativeY = positionInfo.y - redundancyY;\n      // const relativeX = positionInfo.x\n      // const relativeY = positionInfo.y\n      _onTransformEnd && _onTransformEnd((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(positionInfo, {\n        top: relativeY,\n        left: relativeX,\n        x: relativeX,\n        y: relativeY\n      }), e);\n      hideRefLines && hideRefLines();\n      // hideLine && hideLine()\n    }\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useTransform.tsx?");

/***/ }),

/***/ 95568:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useValidateBindField: function() { return /* binding */ useValidateBindField; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(32064);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\nvar useValidateBindField = function useValidateBindField(source, eventBusName) {\n  var dataSource = source.dataSource,\n    value = source.value,\n    isFormulaMode = source.isFormulaMode,\n    id = source.id,\n    onValid = source.onValid,\n    bindField = source.bindField,\n    dataContext = source.dataContext;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_useState, 2),\n    showValidateStoke = _useState2[0],\n    setShowValidateStoke = _useState2[1];\n  var readyRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false);\n  var validateBindField = (0,react__WEBPACK_IMPORTED_MODULE_3__.useCallback)(function (definition) {\n    var _isBindFieldMode = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_4__.isBindFieldMode)(value),\n      isBindField = _isBindFieldMode.isBindField,\n      bindText = _isBindFieldMode.bindField;\n    if (isBindField && !isFormulaMode) {\n      var field = dataContext.findControl(id);\n      if (!field) {\n        setShowValidateStoke(false);\n        return;\n      }\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_4__.queryDataSourceAndAncestorByName)(bindText, definition);\n      if ((field === null || field === void 0 ? void 0 : field.dataSource) === '$DsKey=[System]') res = true;\n      if (!res) {\n        var _bindField$indexOf;\n        var keyRes = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_4__.queryDataSourceAndAncestorByKey)((0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_4__.createDataSourceNodeKey)(dataSource, bindField), definition);\n        if (!keyRes && (bindField === null || bindField === void 0 || (_bindField$indexOf = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_1___default()(bindField)) === null || _bindField$indexOf === void 0 ? void 0 : _bindField$indexOf.call(bindField, '.')) !== -1) {\n          var _bindField = field.bindField.match(/w?\\w*$/)[0];\n          keyRes = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_4__.queryDataSourceAndAncestorByKey)((0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_4__.createDataSourceNodeKey)(field.dataSource, _bindField), definition);\n        }\n        if (keyRes) {\n          setShowValidateStoke(false);\n        } else {\n          setShowValidateStoke(true);\n        }\n      } else {\n        setShowValidateStoke(false);\n      }\n      return;\n    }\n    setShowValidateStoke(false);\n  }, [dataSource, value, isFormulaMode, bindField]);\n  (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n    var _context, _context2;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.eventBus.on(eventBusName, validateBindField);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.eventBus.on(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = \"\".concat(eventBusName, \"_\")).call(_context, id), setShowValidateStoke);\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.eventBus.on(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = \"\".concat(eventBusName, \"_\")).call(_context2, id, \"_init\"), validateBindField);\n    readyRef.current = true;\n    return function () {\n      var _context3, _context4;\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.eventBus.off(eventBusName, validateBindField); // 保存时校验数据源是否存在\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.eventBus.off(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context3 = \"\".concat(eventBusName, \"_\")).call(_context3, id), setShowValidateStoke); // 右侧编辑器改变时在editor已经计算过一次数据源是否存在了，这里直接调用即可\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.eventBus.off(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = \"\".concat(eventBusName, \"_\")).call(_context4, id, \"_init\"), validateBindField);\n    };\n  }, [validateBindField, id, eventBusName]);\n  (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n    var _context5;\n    readyRef.current && (onValid === null || onValid === void 0 ? void 0 : onValid(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = \"\".concat(eventBusName, \"_\")).call(_context5, id, \"_init\"))); // 首次进入执行一次校验\n  }, [readyRef.current]);\n  return [showValidateStoke, setShowValidateStoke];\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useValidateBindField.tsx?");

/***/ }),

/***/ 82872:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useValidateWarningIcon: function() { return /* binding */ useValidateWarningIcon; }\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41232);\n/* harmony import */ var _components_common_baseImage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9172);\n/* harmony import */ var _print_assets_images_warning_solid_png__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8565);\n/**\n * 保存时给不存在数据源的字段添加红色边框\n */\n\n\n\n\nvar defaultOffsetLeft = 3;\nvar ratio = 2.54;\nvar useValidateWarningIcon = function useValidateWarningIcon(_ref) {\n  var height = _ref.height,\n    scale = _ref.scale,\n    _ref$offsetLeft = _ref.offsetLeft,\n    offsetLeft = _ref$offsetLeft === void 0 ? defaultOffsetLeft : _ref$offsetLeft,\n    scaledFontSize = _ref.scaledFontSize;\n  var getImageSize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n    return {\n      width: scaledFontSize / ratio,\n      height: scaledFontSize / ratio\n    };\n  }, [scaledFontSize]);\n  var y = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {\n    return ((0,_utils_index__WEBPACK_IMPORTED_MODULE_1__.calculatorMMtoPx)(height, scale) - scaledFontSize * 1.5) / 2;\n  }, [height, scale, scaledFontSize]);\n  var warningIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_common_baseImage__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n    getImageSize: getImageSize,\n    src: _print_assets_images_warning_solid_png__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n    scale: scale,\n    x: offsetLeft,\n    y: y\n  });\n  return [warningIcon, offsetLeft, scaledFontSize / ratio];\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useValidateWarningIcon.tsx?");

/***/ }),

/***/ 78992:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   useWindowZoom: function() { return /* binding */ useWindowZoom; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(77168);\n/* harmony import */ var _utils_keyCode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(48008);\n\n\n\n\n// 改自https://developer.mozilla.org/zh-CN/docs/Web/API/Element/wheel_event\n// creates a global \"addWheelListener\" method\n// example: addWheelListener( elem, function( e ) { console.log( e.deltaY ); e.preventDefault(); } );\n(function (window, document) {})(window, document);\nvar prefix = '';\nvar _addEventListener;\nvar onwheel;\nvar support;\nvar _removeEventListener;\n// detect event model\nif (window.addEventListener) {\n  _addEventListener = 'addEventListener';\n  _removeEventListener = 'removeEventListener';\n} else {\n  _addEventListener = 'attachEvent';\n  _removeEventListener = 'detachEvent';\n  prefix = 'on';\n}\n\n// detect available wheel event\nsupport = 'onwheel' in document.createElement('div') ? 'wheel' // 各个厂商的高版本浏览器都支持\"wheel\"\n: document.onmousewheel !== undefined ? 'mousewheel' // Webkit 和 IE一定支持\"mousewheel\"\n: 'DOMMouseScroll'; // 低版本firefox\n\nvar addWheelListener = function addWheelListener(elem, callback, useCapture) {\n  // handle MozMousePixelScroll in older Firefox\n  if (support == 'DOMMouseScroll') {\n    return _addWheelListener(elem, 'MozMousePixelScroll', callback, useCapture);\n  } else {\n    return _addWheelListener(elem, support, callback, useCapture);\n  }\n};\nvar createCallback = function createCallback(callback) {\n  return function (originalEvent) {\n    !originalEvent && (originalEvent = window.event);\n\n    // create a normalized event object\n    var event = {\n      // keep a ref to the original event object\n      originalEvent: originalEvent,\n      target: originalEvent.target || originalEvent.srcElement,\n      type: 'wheel',\n      deltaMode: originalEvent.type == 'MozMousePixelScroll' ? 0 : 1,\n      deltaX: 0,\n      deltaZ: 0,\n      preventDefault: function preventDefault() {\n        originalEvent.preventDefault ? originalEvent.preventDefault() : originalEvent.returnValue = false;\n      }\n    };\n\n    // calculate deltaY (and deltaX) according to the event\n    if (support == 'mousewheel') {\n      event.deltaY = -1 / 40 * originalEvent.wheelDelta;\n      // Webkit also support wheelDeltaX\n      originalEvent.wheelDeltaX && (event.deltaX = -1 / 40 * originalEvent.wheelDeltaX);\n    } else {\n      event.deltaY = originalEvent.detail;\n    }\n\n    // it's time to fire the callback\n    return callback(event);\n  };\n};\nfunction _addWheelListener(elem, eventName, callback, useCapture) {\n  var cb = createCallback(callback);\n  elem[_addEventListener](prefix + eventName, support == 'wheel' ? callback : cb, useCapture || false);\n  return function () {\n    elem[_removeEventListener](prefix + eventName, support == 'wheel' ? callback : cb, useCapture || false);\n  };\n}\nvar useWindowZoom = function useWindowZoom(dependencies, callback) {\n  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n    callback();\n    var cb = function cb(e) {\n      // 监测滚轮事件中是否按下了Ctrl键\n      if ((0,_utils_client__WEBPACK_IMPORTED_MODULE_2__.isMultiKeyActive)(e)) {\n        callback();\n      }\n    };\n    var removeHandler = addWheelListener(document, cb);\n    var keyToZoomCb = function keyToZoomCb(e) {\n      var _context;\n      // 按下Ctrl 以及以下任意一键：+ - 或 0\n      var key = e.keyCode || e.which;\n      if ((0,_utils_client__WEBPACK_IMPORTED_MODULE_2__.isMultiKeyActive)(e) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default()(_context = [_utils_keyCode__WEBPACK_IMPORTED_MODULE_3__.KEYS[0], _utils_keyCode__WEBPACK_IMPORTED_MODULE_3__.KEYS['+'], _utils_keyCode__WEBPACK_IMPORTED_MODULE_3__.KEYS['-']]).call(_context, key)) {\n        callback();\n      }\n    };\n    // c2  键盘快捷键缩放\n    document.addEventListener('keydown', keyToZoomCb);\n    return function () {\n      // match.removeEventListener('change', updatePixelRatio)\n      removeHandler && removeHandler();\n      document.removeEventListener('keydown', keyToZoomCb);\n    };\n  }, dependencies);\n};\n\n//# sourceURL=webpack://print-designer/./src/hooks/useWindowZoom.ts?");

/***/ }),

/***/ 90236:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_polyfill__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(87964);\n/* harmony import */ var _babel_polyfill__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_polyfill__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _action__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(88584);\n/* harmony import */ var _components_guide__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(57812);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(98092);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(84945);\n/* harmony import */ var _editorControls_index__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(16980);\n/* harmony import */ var _hooks_useGlobalGuideState__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(18916);\n/* harmony import */ var _utils_activateTab__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(46976);\n/* harmony import */ var _utils_control__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(87524);\n/* harmony import */ var _utils_createData__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(76000);\n/* harmony import */ var _utils_filterEditorProperty__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(68116);\n/* harmony import */ var _utils_getValue__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(97332);\n/* harmony import */ var _utils_preHandle__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(69168);\n/* harmony import */ var _utils_url__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(98400);\n/* harmony import */ var _views_left_dataSourceView__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(49008);\n/* harmony import */ var _views_left_printOutline__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(26364);\n/* harmony import */ var _views_PrintDesignerCore__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(87600);\n/* harmony import */ var _views_right_printSettingView__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(19268);\n/* harmony import */ var _views_right_propertyView__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(3192);\n/* harmony import */ var _constants_ctrlMethodName__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(66416);\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_8___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(_context5 = ownKeys(Object(t), !0)).call(_context5, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(_context6 = ownKeys(Object(t))).call(_context6, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// 测试\n\n\n\n\n\n// TODO 加个context\n// _.memoize.Cache = WeakMap\n// DsType: 只找到第一个祖先节点的DsType作为当前的DsTypeKey，后面字段绑定需要引用\n\n/**\n * @argument\n */\n\nvar dealTreeData = function dealTreeData(definition, ancestorKey, parentIsDs, fieldKey, ancestorDsType, ancestorName) {\n  var _context;\n  return definition === null || definition === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_8___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(definition).call(definition, function (def) {\n    var Name = def.Name,\n      Type = def.Type,\n      Items = def.Items,\n      Key = def.Key,\n      DsType = def.DsType,\n      Tag = def.Tag,\n      IsDs = def.IsDs;\n    var currentFieldKey = fieldKey;\n    // 字段为父IsDs为false，又当前IsDs为false则拼两者key，若父为true，则判断当前是否为true，true则不懈怠，传空串，否则带当前key\n    var currentDsType = ancestorDsType;\n    if (DsType) {\n      currentDsType = DsType;\n    }\n    if (IsDs || parentIsDs) {\n      // 不能为空串\n      currentFieldKey = Key;\n    } else if (!parentIsDs && !IsDs) {\n      var _context2;\n      currentFieldKey = currentFieldKey ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context2 = \"\".concat(currentFieldKey, \".\")).call(_context2, Key) : Key;\n    }\n    // 数据源根据当前IsDs来判断\n    var dataSourceKey = ancestorKey;\n    var dataSourceText = ancestorName || Name;\n    if (IsDs) {\n      var _context3;\n      dataSourceText = Name;\n      dataSourceKey = ancestorKey ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context3 = \"\".concat(ancestorKey, \".\")).call(_context3, Key) : Key;\n    }\n    var children = Items ? {\n      Items: dealTreeData(Items, dataSourceKey, IsDs, currentFieldKey, currentDsType, dataSourceText)\n    } : {};\n    // const currentDataSource = parentIsDs && parentKey\n    // 这里怎么表示第一层，没有字段只能用层级了\n    return _objectSpread(_objectSpread({\n      // key: ancestorKey ? `${ancestorKey}.${Key}` : Key,\n      dataSource: dataSourceKey,\n      dataSourceText: dataSourceText,\n      bindField: currentFieldKey,\n      dsTypeKey: ancestorDsType\n    }, def), children);\n  })).call(_context, Boolean);\n};\nvar noop = function noop() {\n  return void 0;\n};\nvar PrintDesigner = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_17__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_17__.forwardRef)(function (props, forwardedRef) {\n  var accountId = (0,_utils_url__WEBPACK_IMPORTED_MODULE_30__.getAccountId)();\n  var _props$data = props.data,\n    data = _props$data === void 0 ? {} : _props$data,\n    _props$meta = props.meta,\n    meta = _props$meta === void 0 ? {} : _props$meta,\n    onData = props.onData,\n    _props$showMessage = props.showMessage,\n    showMessage = _props$showMessage === void 0 ? function (msg) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log('showMessage-------', msg);\n    } : _props$showMessage,\n    def = props.definition,\n    _props$handleOpenCust = props.handleOpenCustomDsModal,\n    handleOpenCustomDsModal = _props$handleOpenCust === void 0 ? noop : _props$handleOpenCust,\n    _props$handleOpenRefD = props.handleOpenRefDsModal,\n    handleOpenRefDsModal = _props$handleOpenRefD === void 0 ? noop : _props$handleOpenRefD,\n    _props$handleChangePL = props.handleChangePLang,\n    handleChangePLang = _props$handleChangePL === void 0 ? noop : _props$handleChangePL,\n    pageManage = props.pageManage,\n    scaleRef = props.scaleRef,\n    asistantBorderRef = props.asistantBorderRef,\n    dataRef = props.dataRef,\n    _props$uploadImageUrl = props.uploadImageUrl,\n    uploadImageUrl = _props$uploadImageUrl === void 0 ? (0,_utils_url__WEBPACK_IMPORTED_MODULE_30__.splicingPramsToURL)('api/print/upload.do', [[_constants__WEBPACK_IMPORTED_MODULE_20__.KD_ACCOUNT_KEY, accountId], ['printtplid', '']]) : _props$uploadImageUrl,\n    _props$previewImageUr = props.previewImageUrl,\n    previewImageUrl = _props$previewImageUr === void 0 ? (0,_utils_url__WEBPACK_IMPORTED_MODULE_30__.splicingPramsToURL)('api/print/download.do', [[_constants__WEBPACK_IMPORTED_MODULE_20__.KD_ACCOUNT_KEY, accountId], ['rcId', '']]) : _props$previewImageUr,\n    _props$handlePassGrid = props.handlePassGridActionGuide,\n    handlePassGridActionGuide = _props$handlePassGrid === void 0 ? noop : _props$handlePassGrid,\n    _props$handlePassPrin = props.handlePassPrintActionGuide,\n    handlePassPrintActionGuide = _props$handlePassPrin === void 0 ? noop : _props$handlePassPrin,\n    _props$handleOpenDGri = props.handleOpenDGridSortSettingEdModal,\n    handleOpenDGridSortSettingEdModal = _props$handleOpenDGri === void 0 ? noop : _props$handleOpenDGri,\n    _props$handleOpenDGri2 = props.handleOpenDGridFilterSettingEdModal,\n    handleOpenDGridFilterSettingEdModal = _props$handleOpenDGri2 === void 0 ? noop : _props$handleOpenDGri2,\n    _props$invokePrintDes = props.invokePrintDesignerCustomEvent,\n    invokePrintDesignerCustomEvent = _props$invokePrintDes === void 0 ? noop : _props$invokePrintDes,\n    handleChangeFileName = props.handleChangeFileName,\n    isFirstUseGrid = props.isFirstUseGrid,\n    isFirstVisit = props.isFirstVisit,\n    _props$expressions = props.expressions,\n    expressions = _props$expressions === void 0 ? [] : _props$expressions,\n    getLangMsg = props.getLangMsg;\n  // 这里需要注意 createGridWorker.worker\n  // 废弃\n  // const dataFactory = useMemo(() => {\n  //   return createControlDataOrModel(meta, false)\n  // }, [meta])\n  var prefixCls = 'print-designer';\n  var backupDataRef = (0,react__WEBPACK_IMPORTED_MODULE_17__.useRef)([]);\n  var definition = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    return dealTreeData(def);\n  }, [def]);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_17__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_useState, 2),\n    isMounted = _useState2[0],\n    setIsMounted = _useState2[1];\n  // const DataSource = useCallback((props) => {\n  //   return <DataSourceView {...props} />\n  // }, [])\n  // DataSource.tabKey = 'dataSource'\n  // DataSource.tabName = '数据源'\n  // const RootProperty = (props) => {\n  //   return <PrintSettingView {...props} definition={definition} />\n  // }\n  // RootProperty.tabKey = 'print-setting'\n  // RootProperty.tabName = '打印设置'\n  var fontMapping = meta.FontMapping;\n  if (fontMapping) {\n    var _fontMapping$, _fontMapping$2;\n    var fontName = ((_fontMapping$ = fontMapping[0]) === null || _fontMapping$ === void 0 ? void 0 : _fontMapping$.Code) || ((_fontMapping$2 = fontMapping[0]) === null || _fontMapping$2 === void 0 ? void 0 : _fontMapping$2.Name);\n    if (fontName) {\n      (0,_constants__WEBPACK_IMPORTED_MODULE_20__.setConstantFontName)(fontName);\n    }\n    (0,_constants__WEBPACK_IMPORTED_MODULE_20__.setFontNameMap)(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(fontMapping).call(fontMapping, function (res, _ref) {\n      var Name = _ref.Name,\n        Code = _ref.Code;\n      res[Name] = Code;\n      return res;\n    }, {}));\n  }\n  var beforeSave = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.emit(_constants_ctrlMethodName__WEBPACK_IMPORTED_MODULE_36__.BEFORE_SAVE, definition);\n  }, [definition]);\n  var onValid = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function (eventName) {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.emit(eventName, definition);\n  }, [definition]);\n  var setProperty = function setProperty(args, type) {\n    try {\n      var _kdesignerRef$current;\n      var getSortSettingsText = function getSortSettingsText(sortSettings) {\n        var _sortSettings$map;\n        return (_sortSettings$map = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(sortSettings).call(sortSettings, function (item) {\n          return item.bindName || item.bindField;\n        })) === null || _sortSettings$map === void 0 ? void 0 : _sortSettings$map.join(';');\n      };\n      var arg = args[0];\n      var dataContext = (_kdesignerRef$current = kdesignerRef.current) === null || _kdesignerRef$current === void 0 ? void 0 : _kdesignerRef$current.dataContext;\n      var option;\n      if (!arg) return;\n      if (type === 'filterSetting') {\n        if (JSON.parse(arg.condition).filterRow.length) {\n          option = {\n            filterSettingValue: _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13___default()(arg),\n            filterSettingText: getLangMsg('printd.grid.key0001')\n          };\n        } else {\n          option = {\n            filterSettingValue: '',\n            filterSettingText: ''\n          };\n        }\n      } else if (type === 'fileName') {\n        option = {\n          fileName: arg.fileNameK\n        };\n      } else {\n        option = {\n          sortSettings: arg.sortSettings,\n          sortSettingsText: getSortSettingsText(arg.sortSettings)\n        };\n      }\n      var action = [[arg.dataGridId || arg.id, option]];\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.createUpdateAction)(action));\n    } catch (error) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.error(error);\n    }\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_17__.useImperativeHandle)(forwardedRef, function () {\n    var _kdesignerRef$current2, _kdesignerRef$current3;\n    return {\n      pagesManageRef: pagesManageRef,\n      attrActions: (_kdesignerRef$current2 = kdesignerRef.current) === null || _kdesignerRef$current2 === void 0 ? void 0 : _kdesignerRef$current2.attrActions,\n      resetPatches: (_kdesignerRef$current3 = kdesignerRef.current) === null || _kdesignerRef$current3 === void 0 || (_kdesignerRef$current3 = _kdesignerRef$current3.dataContext) === null || _kdesignerRef$current3 === void 0 ? void 0 : _kdesignerRef$current3.resetPatches,\n      beforeSave: beforeSave,\n      setProperty: setProperty\n    };\n  });\n  var positionRecordsRef = (0,react__WEBPACK_IMPORTED_MODULE_17__.useRef)({});\n  var getViews = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function (viewName) {\n    switch (viewName) {\n      case 'main':\n        {\n          return {\n            main: _views_PrintDesignerCore__WEBPACK_IMPORTED_MODULE_33__[\"default\"]\n          };\n        }\n      case 'left':\n        {\n          return {\n            control: _views_left_printOutline__WEBPACK_IMPORTED_MODULE_32__[\"default\"],\n            definition: _views_left_dataSourceView__WEBPACK_IMPORTED_MODULE_31__[\"default\"]\n          };\n        }\n      case 'right':\n        {\n          return {\n            property: _views_right_propertyView__WEBPACK_IMPORTED_MODULE_35__[\"default\"],\n            rootProperty: _views_right_printSettingView__WEBPACK_IMPORTED_MODULE_34__[\"default\"]\n          };\n        }\n      default:\n        {\n          return {};\n        }\n    }\n  }, []);\n  var commonPropertyHandler = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function (properties) {\n    var groups = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_8___default()(properties).call(properties, function (item) {\n      return item.Id === 'CommonGroup';\n    }) || [];\n    return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(groups).call(groups, function (group) {\n      return _objectSpread(_objectSpread({}, group), {}, {\n        Visible: true\n      });\n    });\n  }, []);\n  var globalConfig = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    return {\n      definition: definition,\n      getViews: getViews,\n      getPropertyEditors: _editorControls_index__WEBPACK_IMPORTED_MODULE_22__[\"default\"],\n      getCustomActions: _action__WEBPACK_IMPORTED_MODULE_18__[\"default\"],\n      getValue: _utils_getValue__WEBPACK_IMPORTED_MODULE_28__.getValue,\n      preHandle: _utils_preHandle__WEBPACK_IMPORTED_MODULE_29__[\"default\"],\n      filterProperty: _utils_filterEditorProperty__WEBPACK_IMPORTED_MODULE_27__.filterEditorProperty,\n      activateTab: _utils_activateTab__WEBPACK_IMPORTED_MODULE_24__[\"default\"],\n      handleOpenCustomDsModal: handleOpenCustomDsModal,\n      handleOpenRefDsModal: handleOpenRefDsModal,\n      handleChangePLang: handleChangePLang,\n      handleOpenDGridSortSettingEdModal: handleOpenDGridSortSettingEdModal,\n      handleOpenDGridFilterSettingEdModal: handleOpenDGridFilterSettingEdModal,\n      handleChangeFileName: handleChangeFileName,\n      invokePrintDesignerCustomEvent: invokePrintDesignerCustomEvent,\n      showMessage: showMessage,\n      getOutlineItemIcon: _utils_control__WEBPACK_IMPORTED_MODULE_25__.getControlIcon,\n      enableSearch: false,\n      positionRecordsRef: positionRecordsRef,\n      dataRef: dataRef || backupDataRef,\n      uploadImageUrl: uploadImageUrl,\n      previewImageUrl: previewImageUrl,\n      keywordMapping: {\n        // 所有meta和data属性名大小写默认配置\n        id: 'id',\n        type: 'type',\n        name: 'name',\n        key: 'key',\n        parentId: 'parentId',\n        items: 'items'\n      },\n      enableDiffDefaultData: false,\n      isRootPropertyEmpty: true,\n      commonPropertyHandler: commonPropertyHandler,\n      getLangMsg: getLangMsg\n    };\n  }, [definition, getViews, _editorControls_index__WEBPACK_IMPORTED_MODULE_22__[\"default\"], _action__WEBPACK_IMPORTED_MODULE_18__[\"default\"], _utils_getValue__WEBPACK_IMPORTED_MODULE_28__.getValue, _utils_activateTab__WEBPACK_IMPORTED_MODULE_24__[\"default\"], handleOpenCustomDsModal, handleOpenRefDsModal, handleOpenDGridSortSettingEdModal, handleOpenDGridFilterSettingEdModal, handleChangeFileName, invokePrintDesignerCustomEvent, handleChangePLang, showMessage, _utils_control__WEBPACK_IMPORTED_MODULE_25__.getControlIcon, dataRef, uploadImageUrl, previewImageUrl]);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.console.log(props, globalConfig);\n  // console.log('renderLog', 'print-designer', props, globalConfig)\n  var pagesManageRef = (0,react__WEBPACK_IMPORTED_MODULE_17__.useRef)(null);\n  var kuiConfig = {\n    prefixCls: 'kdesigner'\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_17__.useEffect)(function () {\n    var callback = function callback(value, saveFlag) {\n      handleChangePLang(value, saveFlag);\n    };\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.on('change-lang', callback);\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.eventBus.off('change-lang', callback);\n    };\n  }, [handleChangePLang]);\n  var kdesignerRef = (0,react__WEBPACK_IMPORTED_MODULE_17__.useRef)(null);\n  var showMsg = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function (msg) {\n    // TODO:\n    // 优化点\n    showMessage && showMessage(msg);\n  }, []);\n  var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    return {\n      prefixCls: prefixCls,\n      definition: definition,\n      setMessage: showMsg,\n      meta: meta,\n      pagesManageRef: pagesManageRef,\n      globalConfig: globalConfig,\n      pageManage: pageManage,\n      scaleRef: scaleRef,\n      asistantBorderRef: asistantBorderRef,\n      handlePassGridActionGuide: handlePassGridActionGuide,\n      isFirstUseGrid: isFirstUseGrid,\n      expressions: expressions,\n      beforeSave: beforeSave,\n      onValid: onValid\n    };\n  }, [definition, showMessage, meta, globalConfig, pageManage, showMsg, handlePassGridActionGuide, isFirstUseGrid, expressions, beforeSave, onValid]);\n  var onDataProxy = (0,react__WEBPACK_IMPORTED_MODULE_17__.useCallback)(function (data, event) {\n    var _ref2 = data || {},\n      _ref2$items = _ref2.items,\n      items = _ref2$items === void 0 ? [] : _ref2$items;\n    //\n    positionRecordsRef.current = {};\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(items).call(items, function (item) {\n      var _ref3 = item || {},\n        x = _ref3.x,\n        y = _ref3.y,\n        parentId = _ref3.parentId;\n      var record = positionRecordsRef.current;\n      if (parentId) {\n        record[parentId] = record[parentId] || [];\n        record[parentId].push([x, y].join('-'));\n      }\n    });\n    onData && onData(data, event);\n  }, [onData]);\n  var modelFactory = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    return (0,_utils_createData__WEBPACK_IMPORTED_MODULE_26__.createControlDataOrModel)(meta, true);\n  }, [meta]);\n  var dataFactory = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    return (0,_utils_createData__WEBPACK_IMPORTED_MODULE_26__.createControlDataOrModel)(meta, false);\n  }, [meta]);\n  var kdesignerConfig = (0,react__WEBPACK_IMPORTED_MODULE_17__.useMemo)(function () {\n    return {\n      prefixCls: 'print-designer',\n      getPrefixCls: function getPrefixCls(configPrefixCls, suffixCls, customizePrefixCls) {\n        var _context4;\n        // 获取样式前缀方法\n        if (customizePrefixCls) return customizePrefixCls;\n        configPrefixCls = configPrefixCls || 'print-designer';\n        return suffixCls ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_11___default()(_context4 = \"\".concat(configPrefixCls, \"-\")).call(_context4, suffixCls) : configPrefixCls;\n      }\n    };\n  }, []);\n\n  // 不用hash，每次都进,内部判断\n  (0,react__WEBPACK_IMPORTED_MODULE_17__.useEffect)(function () {\n    var _kdesignerRef$current4;\n    if ((_kdesignerRef$current4 = kdesignerRef.current) !== null && _kdesignerRef$current4 !== void 0 && _kdesignerRef$current4.dataContext) {\n      kdesignerRef.current.dataContext.resetData(data, false);\n    }\n  }, [data]);\n  (0,react__WEBPACK_IMPORTED_MODULE_17__.useEffect)(function () {\n    setIsMounted(true);\n  }, []);\n  var _useGlobalGuideState = (0,_hooks_useGlobalGuideState__WEBPACK_IMPORTED_MODULE_23__.useGlobalGuideState)(),\n    _useGlobalGuideState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_useGlobalGuideState, 1),\n    isInnerFirstVisit = _useGlobalGuideState2[0];\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement((react__WEBPACK_IMPORTED_MODULE_17___default().Fragment), null, isMounted && isFirstVisit && isInnerFirstVisit && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_components_guide__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {\n    handlePassPrintActionGuide: handlePassPrintActionGuide\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__.ConfigProvider, {\n    value: kuiConfig\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(_context__WEBPACK_IMPORTED_MODULE_21__.PrintDesignerContext.Provider, {\n    value: contextValue\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_16__.ConfigContext.Provider, {\n    value: kdesignerConfig\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().createElement(MemoDesigner, {\n    ref: kdesignerRef,\n    globalConfig: globalConfig,\n    onData: onDataProxy,\n    meta: meta,\n    data: data,\n    prefixCls: prefixCls,\n    dataFactory: dataFactory,\n    modelFactory: modelFactory\n  })))));\n}));\n\n// 函数返回true, 不渲染; 函数返回false, 重新渲染\nvar MemoDesigner = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default().memo((designer_base_Main__WEBPACK_IMPORTED_MODULE_16___default()), function () {\n  return true;\n});\nPrintDesigner.displayName = 'PrintDesigner';\n/* harmony default export */ __webpack_exports__[\"default\"] = (PrintDesigner);\n\n//# sourceURL=webpack://print-designer/./src/index.tsx?");

/***/ }),

/***/ 36932:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   CompLangMsgParams: function() { return /* reexport safe */ _locale__WEBPACK_IMPORTED_MODULE_0__.CompLangMsgParams; },\n/* harmony export */   ComponentType: function() { return /* reexport safe */ _locale__WEBPACK_IMPORTED_MODULE_0__.ComponentType; },\n/* harmony export */   LocaleConfigType: function() { return /* reexport safe */ _locale__WEBPACK_IMPORTED_MODULE_0__.LocaleConfigType; },\n/* harmony export */   LocaleDataType: function() { return /* reexport safe */ _locale__WEBPACK_IMPORTED_MODULE_0__.LocaleDataType; },\n/* harmony export */   getCompLangMsg: function() { return /* reexport safe */ _locale__WEBPACK_IMPORTED_MODULE_0__.getCompLangMsg; },\n/* harmony export */   getLangMsg: function() { return /* reexport safe */ _locale__WEBPACK_IMPORTED_MODULE_0__.getLangMsg; }\n/* harmony export */ });\n/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13216);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_locale__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://print-designer/./src/locale/index.ts?");

/***/ }),

/***/ 13216:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   getCompLangMsg: function() { return /* binding */ getCompLangMsg; },\n/* harmony export */   getLangMsg: function() { return /* binding */ getLangMsg; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(58496);\n/* harmony import */ var _babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3460);\n/* harmony import */ var _babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(27688);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _zh_CN__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(16944);\n\n\n\n\n\n\n\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_1___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_2___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_3___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context3; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(_context3 = Object.prototype.toString.call(o)).call(_context3, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_0___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\n\n\n\n\nvar LocaleCache = /*#__PURE__*/function () {\n  function LocaleCache(localesData, locale) {\n    (0,_babel_runtime_corejs3_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(this, LocaleCache);\n    (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this, \"localesData\", void 0);\n    (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(this, \"locale\", void 0);\n    this.locale = locale || _zh_CN__WEBPACK_IMPORTED_MODULE_12__[\"default\"].locale;\n    this.localesData = localesData;\n  }\n\n  /**\n   * 设置语言包并切换当前语言\n   * @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型\n   * @returns 设置后的语言对应的语言包\n   */\n  (0,_babel_runtime_corejs3_helpers_createClass__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(LocaleCache, [{\n    key: \"setLocalesData\",\n    value: function setLocalesData(locale, localeData) {\n      var newLocaleData = localeData || this.localesData[locale];\n      if (!newLocaleData) {\n        console.error(\"\\u7F3A\\u5C11\\u8BED\\u8A00\".concat(locale, \"\\u5BF9\\u5E94\\u7684\\u8BED\\u8A00\\u5305\\uFF0C\\u8BF7\\u68C0\\u67E5\\u540E\\u91CD\\u65B0\\u8BBE\\u7F6E\"));\n        return;\n      }\n      this.locale = locale;\n      this.localesData[locale] = newLocaleData;\n      return localeData;\n    }\n\n    /**\n     * 获取当前语言包数据\n     */\n  }, {\n    key: \"getLocalData\",\n    value: function getLocalData() {\n      return this.localesData[this.locale];\n    }\n\n    /**\n     * 获取当前语言类型\n     */\n  }, {\n    key: \"getLocal\",\n    value: function getLocal() {\n      return this.locale;\n    }\n\n    /**\n     * 获取所有语言包数据\n     */\n  }, {\n    key: \"getLocalesData\",\n    value: function getLocalesData() {\n      return this.localesData;\n    }\n  }]);\n  return LocaleCache;\n}();\nvar localeCacher = new LocaleCache((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, _zh_CN__WEBPACK_IMPORTED_MODULE_12__[\"default\"].locale, _zh_CN__WEBPACK_IMPORTED_MODULE_12__[\"default\"]));\n/* harmony default export */ __webpack_exports__[\"default\"] = (localeCacher);\nvar getLangMsg = function getLangMsg(componentName, labelName, params) {\n  var _context;\n  var localData = localeCacher.getLocalData();\n  var msg = localData[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_9___default()(_context = \"\".concat(componentName, \".\")).call(_context, labelName)] || localData[\"global.\".concat(labelName)] || '';\n  return analysVariables(msg, params);\n};\n\n/**\n * 解析模板字符串中的变量\n * @param {*} msg\n * @param {*} variables\n */\nfunction analysVariables(msg, variables) {\n  var reg = /{[\\w\\W]*?}/g;\n  var matchArr = msg.match(reg) || [];\n  var isObject = function isObject(value) {\n    return (0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(value) === 'object' || typeof value === 'function';\n  };\n  var getVarName = function getVarName(str) {\n    var len = str.length;\n    return _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_8___default()(str).call(str, 1, len - 1);\n  };\n  var stringVar = [];\n  var eleVar = [];\n  var _iterator = _createForOfIteratorHelper(matchArr),\n    _step;\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var item = _step.value;\n      var varName = getVarName(item);\n      var value = variables[varName];\n      if (isObject(value)) {\n        eleVar.push({\n          k: varName,\n          v: value\n        });\n      } else {\n        stringVar.push({\n          k: varName,\n          v: value\n        });\n      }\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n  msg = formatText(msg, stringVar);\n  var msgArr = [];\n  if (eleVar.length > 0) {\n    msgArr = formatElement(msg, variables);\n  }\n  return eleVar.length > 0 ? msgArr : msg;\n}\n\n/**\n * 替换基本类型的变量\n * @param {*} msg\n * @param {*} stringVar\n */\nfunction formatText(msg, stringVar) {\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(stringVar).call(stringVar, function (item) {\n    var k = item.k,\n      v = item.v;\n    var reg = new RegExp('{' + k + '}', 'g');\n    msg = msg.replace(reg, v);\n  });\n  return msg;\n}\n\n/**\n * 替换React元素类型的变量\n * @param {*} msg\n * @param {*} eleVar\n * @param {*} variables\n */\nfunction formatElement(msg, variables) {\n  var splitByElement = function splitByElement(msg) {\n    var _context2;\n    var array = [];\n    var item = {\n      t: 0,\n      v: ''\n    }; // 0-string 1-react\n    var len = msg.length;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = msg.split('')).call(_context2, function (c, i) {\n      if (c === '{') {\n        array.push(item);\n        item = {\n          t: 1,\n          v: ''\n        };\n      } else if (c === '}') {\n        array.push(item);\n        item = {\n          t: 0,\n          v: ''\n        };\n      } else {\n        item.v = item.v + c;\n      }\n      if (i === len - 1) {\n        array.push(item);\n      }\n    });\n    return array;\n  };\n  var elements = [];\n  var eleArr = splitByElement(msg);\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(eleArr).call(eleArr, function (item, index) {\n    var t = item.t,\n      v = item.v;\n    if (t === 0 && v !== '') {\n      elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().createElement(\"span\", {\n        key: index\n      }, v));\n    } else if (t === 1) {\n      elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11___default().cloneElement(variables[v], {\n        key: index\n      }));\n    }\n  });\n  return elements;\n}\nvar getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg, localeDate) {\n  var componentName = compLangMsgParams.componentName,\n    labels = compLangMsgParams.labels,\n    labelParams = compLangMsgParams.labelParams;\n  labels = labels || [];\n  labelParams = labelParams || {};\n  localeDate = localeDate || _zh_CN__WEBPACK_IMPORTED_MODULE_12__[\"default\"];\n  if (!labels.length) {\n    for (var _key in localeDate) {\n      var componentNameAndLabel = _key.split('.');\n      if (componentName === componentNameAndLabel[0] && componentNameAndLabel[1]) {\n        labels.push(componentNameAndLabel[1]);\n      }\n    }\n  }\n  var componentLangMsg = {};\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_10___default()(labels).call(labels, function (label) {\n    if (customGetLangMsg && typeof customGetLangMsg === 'function') {\n      componentLangMsg[label] = customGetLangMsg(componentName, label, labelParams[label] || {});\n    } else {\n      componentLangMsg[label] = getLangMsg(componentName, label, labelParams[label] || {});\n    }\n  });\n  return componentLangMsg;\n};\n\n//# sourceURL=webpack://print-designer/./src/locale/locale.tsx?");

/***/ }),

/***/ 16944:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar locale = {\n  locale: 'zh-CN',\n  'global.selectholder': '请选择',\n  'global.placeholder': '请输入...',\n  'global.cancel': '取消',\n  'global.confirm': '确定'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (locale);\n\n//# sourceURL=webpack://print-designer/./src/locale/zh-CN.tsx?");

/***/ }),

/***/ 46976:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* export default binding */ __WEBPACK_DEFAULT_EXPORT__; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(_ref, position) {\n  var dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext;\n  if (position === 'right') {\n    var _context;\n    var rootId = dataContext.getRootId();\n    var lastSelectId = lodash__WEBPACK_IMPORTED_MODULE_2___default().last(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_1___default()(_context = [rootId]).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(selectionContext.getSelection())));\n    if (lastSelectId === rootId) {\n      return 'PrintSetting';\n    } else {\n      return 'PropertyView';\n    }\n  }\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/activateTab.ts?");

/***/ }),

/***/ 66256:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar buildTree = function buildTree(list, treeConfig) {\n  var fn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (val) {\n    return val;\n  };\n  treeConfig = treeConfig || {};\n  var children = treeConfig.children;\n  var parent = treeConfig.parent;\n  var name = treeConfig.id;\n  var temp = {};\n  var tree = {};\n  children = children || 'children';\n  parent = parent || 'parent';\n  if (!lodash__WEBPACK_IMPORTED_MODULE_1___default().isObject(list) && !lodash__WEBPACK_IMPORTED_MODULE_1___default().isArray(list)) return;\n  for (var j in list) {\n    if (lodash__WEBPACK_IMPORTED_MODULE_1___default().has(list, j) && list[j]) {\n      temp[list[j][name]] = list[j];\n    } // 新增分页时，执行redo\\undo list[j]可能为null\n  }\n  for (var i in temp) {\n    if (!lodash__WEBPACK_IMPORTED_MODULE_1___default().has(temp, i)) continue;\n    if (temp[i][parent]) {\n      var p = temp[i][parent];\n      if (temp[p] && !temp[p][children]) {\n        temp[p][children] = {};\n      }\n      if (temp[p] && !temp[p][parent]) {\n        temp[p] && p !== temp[i][name] && (temp[p][children][temp[i][name]] = fn(temp[i]));\n      } else {\n        var _context;\n        temp[p] && p !== temp[i][name] && temp[p][parent] && _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_0___default()(_context = temp[p][parent]).call(_context, temp[i][name]) == -1 && (temp[p][children][temp[i][name]] = fn(temp[i]));\n      }\n    } else {\n      tree[temp[i][name]] = temp[i];\n    }\n  }\n  return tree;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (buildTree);\n\n//# sourceURL=webpack://print-designer/./src/utils/buildTree.ts?");

/***/ }),

/***/ 77168:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   isMac: function() { return /* binding */ isMac; },\n/* harmony export */   isMultiKeyActive: function() { return /* binding */ isMultiKeyActive; }\n/* harmony export */ });\nfunction isMac() {\n  return window.navigator.platform == 'Mac68K' || window.navigator.platform == 'MacPPC' || window.navigator.platform == 'Macintosh' || window.navigator.platform == 'MacIntel';\n}\nfunction isMultiKeyActive(e) {\n  return isMac() ? e.metaKey : e.ctrlKey;\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/client.ts?");

/***/ }),

/***/ 87524:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   batchChangeControlValue: function() { return /* binding */ batchChangeControlValue; },\n/* harmony export */   createDataGridModal: function() { return /* binding */ createDataGridModal; },\n/* harmony export */   createLayoutGridModal: function() { return /* binding */ createLayoutGridModal; },\n/* harmony export */   getControlBottomPosition: function() { return /* binding */ getControlBottomPosition; },\n/* harmony export */   getControlIcon: function() { return /* binding */ getControlIcon; },\n/* harmony export */   getControlRelativeHeight: function() { return /* binding */ getControlRelativeHeight; },\n/* harmony export */   getControlTopPosition: function() { return /* binding */ getControlTopPosition; },\n/* harmony export */   handleDropInTextInDataCell: function() { return /* binding */ handleDropInTextInDataCell; },\n/* harmony export */   handleDropTextInLayoutCell: function() { return /* binding */ handleDropTextInLayoutCell; },\n/* harmony export */   handlePasteTextInGridCell: function() { return /* binding */ handlePasteTextInGridCell; },\n/* harmony export */   needReverseSize: function() { return /* binding */ needReverseSize; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(1508);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(97552);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(41232);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(98092);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21980);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(32064);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(77620);\n\n\n\n\nvar _excluded = [\"Id\", \"Count\", \"CellType\", \"Name\"],\n  _excluded2 = [\"Id\", \"Count\", \"CellType\", \"Name\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context14, _context15; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context14 = ownKeys(Object(t), !0)).call(_context14, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context15 = ownKeys(Object(t))).call(_context15, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar DefaultIcon = function DefaultIcon() {\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n    className: \"icon\",\n    width: \"200\",\n    height: \"200\",\n    viewBox: \"0 0 28 28\",\n    version: \"1.1\",\n    xmlns: \"http://www.w3.org/2000/svg\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0026')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n    id: \"\\u6587\\u672C\\u5907\\u4EFD\",\n    stroke: \"none\",\n    \"stroke-width\": \"1\",\n    fill: \"none\",\n    \"fill-rule\": \"evenodd\"\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n    d: \"M5.5,24 L22.5,24 L22.5,22.5 L23.999,22.5 L24,5.5 L22.5,5.5 L22.5,4 L5.5,4 L5.5,5.5 L4,5.5 L3.999,22.5 L5.5,22.5 L5.5,24 Z M4.5,23.5 L2.5,23.5 L2.5,25.5 L4.5,25.5 L4.5,23.5 Z M25.5,23.5 L23.5,23.5 L23.5,25.5 L25.5,25.5 L25.5,23.5 Z M4.5,2.5 L2.5,2.5 L2.5,4.5 L4.5,4.5 L4.5,2.5 Z M25.5,2.5 L23.5,2.5 L23.5,4.5 L25.5,4.5 L25.5,2.5 Z M5.5,26.5 L1.5,26.5 L1.5,22.5 L2.999,22.5 L3,5.5 L1.5,5.5 L1.5,1.5 L5.5,1.5 L5.5,3 L22.5,3 L22.5,1.5 L26.5,1.5 L26.5,5.5 L25,5.5 L24.999,22.5 L26.5,22.5 L26.5,26.5 L22.5,26.5 L22.5,25 L5.5,25 L5.5,26.5 Z\",\n    id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n    fill: \"#404040\",\n    \"fill-rule\": \"nonzero\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n    d: \"M20.5234375,19.924 C20.7995799,19.924 21.0234375,20.1478576 21.0234375,20.424 C21.0234375,20.6694599 20.8465623,20.8736084 20.6133131,20.9159443 L20.5234375,20.924 L7.55200195,20.924 C7.27585958,20.924 7.05200195,20.7001424 7.05200195,20.424 C7.05200195,20.1785401 7.22887711,19.9743916 7.46212632,19.9320557 L7.55200195,19.924 L20.5234375,19.924 Z M20.5,17.424 C20.7761424,17.424 21,17.6478576 21,17.924 C21,18.1694599 20.8231248,18.3736084 20.5898756,18.4159443 L20.5,18.424 L15.5,18.424 C15.2238576,18.424 15,18.2001424 15,17.924 C15,17.6785401 15.1768752,17.4743916 15.4101244,17.4320557 L15.5,17.424 L20.5,17.424 Z M20.5,14.424 C20.7761424,14.424 21,14.6478576 21,14.924 C21,15.1694599 20.8231248,15.3736084 20.5898756,15.4159443 L20.5,15.424 L15.5,15.424 C15.2238576,15.424 15,15.2001424 15,14.924 C15,14.6785401 15.1768752,14.4743916 15.4101244,14.4320557 L15.5,14.424 L20.5,14.424 Z\",\n    id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n    fill: \"#979797\",\n    \"fill-rule\": \"nonzero\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n    d: \"M12.6,17.6699621 L12.6,8.03204346 L12.6,8.03204346 L16.1159783,8.03204346 C16.4009692,8.03204346 16.632,7.80101266 16.632,7.51602173 C16.632,7.2310308 16.4009692,7 16.1159783,7 L7.78802173,7 C7.5030308,7 7.272,7.2310308 7.272,7.51602173 C7.272,7.80101266 7.5030308,8.03204346 7.78802173,8.03204346 L11.304,8.03204346 L11.304,8.03204346 L11.304,17.7739187 C11.304,18.1053028 11.57264,18.3739428 11.9040241,18.3739428 C11.9200353,18.3739428 11.9360401,18.3733019 11.952,18.3720217 C12.3179691,18.3426661 12.6,18.0371067 12.6,17.6699621 Z\",\n    id: \"T\",\n    fill: \"#404040\",\n    \"fill-rule\": \"nonzero\"\n  })))\n  // <svg width='26px' height='26px' viewBox='0 0 26 26' version='1.1' xmlns='http://www.w3.org/2000/svg' xlink='http://www.w3.org/1999/xlink'>\n  //   <title>文本</title>\n  //   <g id='页面交互' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'>\n  //     <g id='添加控件-文本' transform='translate(-33.000000, -183.000000)'>\n  //       <g id='编组-25' transform='translate(0.000000, 85.000000)'>\n  //         <g id='编组-2' transform='translate(16.000000, 93.000000)'>\n  //           <g id='编组' transform='translate(16.000000, 4.000000)'>\n  //             <rect id='矩形' fill='#FFFFFF' x='4' y='4' width='20' height='20' />\n  //             <path d='' id='形状结合' stroke='#404040' />\n  //             <path d='M12.6,17.776 L12.6,8.136 L12.6,8.136 L16.064,8.136 C16.3776977,8.136 16.632,7.88169774 16.632,7.568 C16.632,7.25430226 16.3776977,7 16.064,7 L7.84,7 C7.52630226,7 7.272,7.25430226 7.272,7.568 C7.272,7.88169774 7.52630226,8.136 7.84,8.136 L11.304,8.136 L11.304,8.136 L11.304,17.776 C11.304,18.1338805 11.5941195,18.424 11.952,18.424 C12.3098805,18.424 12.6,18.1338805 12.6,17.776 Z' id='T' fill='#404040' fill-rule='nonzero' />\n  //             <path d='M20.5234375,19.924 C20.7995799,19.924 21.0234375,20.1478576 21.0234375,20.424 C21.0234375,20.6694599 20.8465623,20.8736084 20.6133131,20.9159443 L20.5234375,20.924 L7.55200195,20.924 C7.27585958,20.924 7.05200195,20.7001424 7.05200195,20.424 C7.05200195,20.1785401 7.22887711,19.9743916 7.46212632,19.9320557 L7.55200195,19.924 L20.5234375,19.924 Z M20.5,17.424 C20.7761424,17.424 21,17.6478576 21,17.924 C21,18.1694599 20.8231248,18.3736084 20.5898756,18.4159443 L20.5,18.424 L15.5,18.424 C15.2238576,18.424 15,18.2001424 15,17.924 C15,17.6785401 15.1768752,17.4743916 15.4101244,17.4320557 L15.5,17.424 L20.5,17.424 Z M20.5,14.424 C20.7761424,14.424 21,14.6478576 21,14.924 C21,15.1694599 20.8231248,15.3736084 20.5898756,15.4159443 L20.5,15.424 L15.5,15.424 C15.2238576,15.424 15,15.2001424 15,14.924 C15,14.6785401 15.1768752,14.4743916 15.4101244,14.4320557 L15.5,14.424 L20.5,14.424 Z' id='形状结合' fill='#979797' fill-rule='nonzero' />\n  //             <path d='' id='矩形' stroke='#404040' />\n  //             <path d='' id='矩形备份-4' stroke='#404040' />\n  //             <path d='' id='矩形' stroke='#404040' transform='translate(24.500000, 14.250000) rotate(-270.000000) translate(-24.500000, -14.250000) ' />\n  //             <path d='' id='矩形备份-5' stroke='#404040' transform='translate(3.500000, 14.250000) rotate(-270.000000) translate(-3.500000, -14.250000) ' />\n  //           </g>\n  //         </g>\n  //       </g>\n  //     </g>\n  //   </g>\n  // </svg>\n  ;\n};\n\n// TODO: 模型中声明\nvar getControlIcon = function getControlIcon(type) {\n  switch (type) {\n    case 'Text':\n      {\n        // return <DesignerIcon type='wenben' />\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0026')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u6587\\u672C\\u5907\\u4EFD\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M5.5,24 L22.5,24 L22.5,22.5 L23.999,22.5 L24,5.5 L22.5,5.5 L22.5,4 L5.5,4 L5.5,5.5 L4,5.5 L3.999,22.5 L5.5,22.5 L5.5,24 Z M4.5,23.5 L2.5,23.5 L2.5,25.5 L4.5,25.5 L4.5,23.5 Z M25.5,23.5 L23.5,23.5 L23.5,25.5 L25.5,25.5 L25.5,23.5 Z M4.5,2.5 L2.5,2.5 L2.5,4.5 L4.5,4.5 L4.5,2.5 Z M25.5,2.5 L23.5,2.5 L23.5,4.5 L25.5,4.5 L25.5,2.5 Z M5.5,26.5 L1.5,26.5 L1.5,22.5 L2.999,22.5 L3,5.5 L1.5,5.5 L1.5,1.5 L5.5,1.5 L5.5,3 L22.5,3 L22.5,1.5 L26.5,1.5 L26.5,5.5 L25,5.5 L24.999,22.5 L26.5,22.5 L26.5,26.5 L22.5,26.5 L22.5,25 L5.5,25 L5.5,26.5 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M20.5234375,19.924 C20.7995799,19.924 21.0234375,20.1478576 21.0234375,20.424 C21.0234375,20.6694599 20.8465623,20.8736084 20.6133131,20.9159443 L20.5234375,20.924 L7.55200195,20.924 C7.27585958,20.924 7.05200195,20.7001424 7.05200195,20.424 C7.05200195,20.1785401 7.22887711,19.9743916 7.46212632,19.9320557 L7.55200195,19.924 L20.5234375,19.924 Z M20.5,17.424 C20.7761424,17.424 21,17.6478576 21,17.924 C21,18.1694599 20.8231248,18.3736084 20.5898756,18.4159443 L20.5,18.424 L15.5,18.424 C15.2238576,18.424 15,18.2001424 15,17.924 C15,17.6785401 15.1768752,17.4743916 15.4101244,17.4320557 L15.5,17.424 L20.5,17.424 Z M20.5,14.424 C20.7761424,14.424 21,14.6478576 21,14.924 C21,15.1694599 20.8231248,15.3736084 20.5898756,15.4159443 L20.5,15.424 L15.5,15.424 C15.2238576,15.424 15,15.2001424 15,14.924 C15,14.6785401 15.1768752,14.4743916 15.4101244,14.4320557 L15.5,14.424 L20.5,14.424 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#979797\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M12.6,17.6699621 L12.6,8.03204346 L12.6,8.03204346 L16.1159783,8.03204346 C16.4009692,8.03204346 16.632,7.80101266 16.632,7.51602173 C16.632,7.2310308 16.4009692,7 16.1159783,7 L7.78802173,7 C7.5030308,7 7.272,7.2310308 7.272,7.51602173 C7.272,7.80101266 7.5030308,8.03204346 7.78802173,8.03204346 L11.304,8.03204346 L11.304,8.03204346 L11.304,17.7739187 C11.304,18.1053028 11.57264,18.3739428 11.9040241,18.3739428 C11.9200353,18.3739428 11.9360401,18.3733019 11.952,18.3720217 C12.3179691,18.3426661 12.6,18.0371067 12.6,17.6699621 Z\",\n          id: \"T\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        })));\n      }\n    case 'RichText':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 1024 1024\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M821.428571 107.142857C860.877482 107.142857 892.857143 139.122518 892.857143 178.571429L892.857143 821.428571C892.857143 860.877482 860.877482 892.857143 821.428571 892.857143L178.571429 892.857143C139.122518 892.857143 107.142857 860.877482 107.142857 821.428571L107.142857 178.571429C107.142857 139.122518 139.122518 107.142857 178.571429 107.142857L821.428571 107.142857zM821.428571 142.857143L178.571429 142.857143C160.255863 142.857143 145.160459 156.644293 143.097419 174.406388L142.857143 178.571429L142.857143 821.428571C142.857143 839.744136 156.644293 854.839543 174.406388 856.902582L178.571429 857.142857L821.428571 857.142857C839.744136 857.142857 854.839543 843.355707 856.902582 825.593611L857.142857 821.428571L857.142857 178.571429C857.142857 160.255863 843.355707 145.160459 825.593611 143.097419L821.428571 142.857143zM742.093161 706.857143C751.955389 706.857143 759.950304 714.852057 759.950304 724.714286C759.950304 733.480711 753.633332 740.771729 745.303004 742.283725L742.093161 742.571429L267.857143 742.571429C257.994915 742.571429 250 734.576514 250 724.714286C250 715.947861 256.31697 708.656843 264.647299 707.144846L267.857143 706.857143L742.093161 706.857143zM742.093161 564C751.955389 564 759.950304 571.994914 759.950304 581.857143C759.950304 590.623568 753.633332 597.914586 745.303004 599.426582L742.093161 599.714286L563.521732 599.714286C553.659504 599.714286 545.664589 591.719371 545.664589 581.857143C545.664589 573.090718 551.981557 565.7997 560.311886 564.287704L563.521732 564L742.093161 564zM364.307446 267.857143C370.307446 267.857143 375.164589 269.214286 378.878875 271.928571C381.664589 273.964286 383.807446 276.522321 385.307446 279.602679L386.593161 282.857143L477.021732 545.571429C479.307446 552.428571 479.450304 558.214286 477.450304 562.928571C475.450304 567.642857 470.736018 570 463.307446 570C458.450304 570.285714 454.521732 568.928571 451.521732 565.928571C449.271732 563.678571 447.463696 560.90625 446.097625 557.611607L444.878875 554.142857L421.307446 488.571429L307.736017 488.571429L290.164589 537.857143C288.736017 541.857143 287.307446 545.714286 285.878874 549.428571C284.450303 553.142857 282.807446 556.571429 280.950303 559.714286C279.09316 562.857143 276.950303 565.357143 274.521731 567.214286C272.09316 569.071429 269.307446 570 266.164589 570C260.450303 570 256.021731 568.214286 252.878874 564.642857C250.184997 561.581632 249.800157 556.26385 251.724355 548.689504L252.878874 544.714286L342.878874 282.857143C344.307446 278.285714 346.807446 274.642857 350.378874 271.928571C353.950303 269.214286 358.593161 267.857143 364.307446 267.857143zM364.736018 311.571429L315.878874 458.571429L413.593161 458.571429L364.736018 311.571429zM742.093161 421.142857C751.955389 421.142857 759.950304 429.137771 759.950304 439C759.950304 447.766425 753.633332 455.057443 745.303004 456.569439L742.093161 456.857143L563.521732 456.857143C553.659504 456.857143 545.664589 448.862229 545.664589 439C545.664589 430.233575 551.981557 422.942557 560.311886 421.430561L563.521732 421.142857L742.093161 421.142857zM742.093161 278.285714C751.955389 278.285714 759.950304 286.28063 759.950304 296.142857C759.950304 304.909282 753.633332 312.200299 745.303004 313.712298L742.093161 314L563.521732 314C553.659504 314 545.664589 306.005085 545.664589 296.142857C545.664589 287.376433 551.981557 280.085415 560.311886 278.573417L563.521732 278.285714L742.093161 278.285714z\"\n        }));\n      }\n    case 'Image':\n      {\n        // return <DesignerIcon type='tupian' />\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0027')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u56FE\\u7247\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M19.0635867,11.8647461 C20.8536504,11.8647461 22.8005418,13.7442816 24.9042609,17.5033525 L25.2664347,18.1661764 C25.5089081,18.6203335 25.7534299,19.0990397 26,19.6022949 L26,23 C26,24.1045695 25.1045695,25 24,25 L4,25 C2.8954305,25 2,24.1045695 2,23 L2,17.8845201 C4.66666667,15.29484 6.66666667,14 8,14 C10,14 10.8910175,16.4140625 12.9127329,16.4140625 C13.6708761,16.4140625 14.2999834,15.7743149 14.9497399,14.9746304 L15.6119234,14.1394043 C16.5187958,13.0020752 17.5510805,11.8647461 19.0635867,11.8647461 Z M19.0635867,12.8647461 C18.2328992,12.8647461 17.5590201,13.3424069 16.5714275,14.5433547 L15.7888437,15.5273213 L15.5490143,15.8193286 C15.5112838,15.8641349 15.474257,15.9074927 15.4373086,15.9501251 C14.6063027,16.9089708 13.8692177,17.4140625 12.9127329,17.4140625 C11.8290264,17.4140625 11.1560903,17.0708566 10.03841,16.1646156 L9.78761095,15.9582593 C8.89476212,15.2155435 8.5141519,15 8,15 C7.33313035,15 6.2739504,15.5469592 4.88524327,16.6528567 L4.43582359,17.0206811 L3.96493565,17.4257486 C3.88468972,17.4963682 3.80356758,17.568543 3.72157839,17.6422748 L3.21931187,18.1033643 L3,18.309 L3,23 C3,23.5128358 3.38604019,23.9355072 3.88337887,23.9932723 L4,24 L24,24 C24.5128358,24 24.9355072,23.6139598 24.9932723,23.1166211 L25,23 L25,19.838 L24.9249973,19.6846648 C22.6893998,15.2138574 20.6966562,12.9807295 19.1821547,12.8691495 L19.0635867,12.8647461 Z\",\n          id: \"\\u77E9\\u5F62\",\n          fill: \"#979797\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M24,3 C25.1045695,3 26,3.8954305 26,5 L26,23 C26,24.1045695 25.1045695,25 24,25 L4,25 C2.8954305,25 2,24.1045695 2,23 L2,5 C2,3.8954305 2.8954305,3 4,3 L24,3 Z M24,4 L4,4 C3.48716416,4 3.06449284,4.38604019 3.00672773,4.88337887 L3,5 L3,23 C3,23.5128358 3.38604019,23.9355072 3.88337887,23.9932723 L4,24 L24,24 C24.5128358,24 24.9355072,23.6139598 24.9932723,23.1166211 L25,23 L25,5 C25,4.48716416 24.6139598,4.06449284 24.1166211,4.00672773 L24,4 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M8,6.5 C6.61928813,6.5 5.5,7.61928813 5.5,9 C5.5,10.3807119 6.61928813,11.5 8,11.5 C9.38071187,11.5 10.5,10.3807119 10.5,9 C10.5,7.61928813 9.38071187,6.5 8,6.5 Z M8,7.5 C8.82842712,7.5 9.5,8.17157288 9.5,9 C9.5,9.82842712 8.82842712,10.5 8,10.5 C7.17157288,10.5 6.5,9.82842712 6.5,9 C6.5,8.17157288 7.17157288,7.5 8,7.5 Z\",\n          id: \"\\u692D\\u5706\\u5F62\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        })));\n      }\n    case 'Barcode':\n      {\n        // return <DesignerIcon type='tiaoxingma' />\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0028')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u6761\\u5F62\\u7801\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M2.45361328,18.5048828 C2.72975566,18.5048828 2.95361328,18.7287404 2.95361328,19.0048828 L2.95361328,19.0048828 L2.95361328,21.3505859 L2.96047986,21.4950459 C3.0331646,22.2556979 3.67391716,22.8505859 4.45361328,22.8505859 L4.45361328,22.8505859 L7,22.8505859 L7.08987563,22.8586416 C7.32312484,22.9009776 7.5,23.105126 7.5,23.3505859 C7.5,23.6267283 7.27614237,23.8505859 7,23.8505859 L7,23.8505859 L4.45361328,23.8505859 L4.28923759,23.8452683 C2.98514922,23.7606246 1.95361328,22.6760693 1.95361328,21.3505859 L1.95361328,21.3505859 L1.95361328,19.0048828 L1.96166895,18.9150072 C2.00400491,18.681758 2.20815339,18.5048828 2.45361328,18.5048828 Z M26,18.5048828 C26.2454599,18.5048828 26.4496084,18.681758 26.4919443,18.9150072 L26.5,19.0048828 L26.5,21.3505859 C26.5,22.6760693 25.4684641,23.7606246 24.1643757,23.8452683 L24,23.8505859 L21.4536133,23.8505859 C21.1774709,23.8505859 20.9536133,23.6267283 20.9536133,23.3505859 C20.9536133,23.105126 21.1304884,22.9009776 21.3637376,22.8586416 L21.4536133,22.8505859 L24,22.8505859 C24.7796961,22.8505859 25.4204487,22.2556979 25.4931334,21.4950459 L25.5,21.3505859 L25.5,19.0048828 C25.5,18.7287404 25.7238576,18.5048828 26,18.5048828 Z M7,4.50488281 C7.27614237,4.50488281 7.5,4.72874044 7.5,5.00488281 C7.5,5.2503427 7.32312484,5.45449118 7.08987563,5.49682714 L7,5.50488281 L4.45361328,5.50488281 C3.67391716,5.50488281 3.0331646,6.0997709 2.96047986,6.8604228 L2.95361328,7.00488281 L2.95361328,9.35058594 C2.95361328,9.62672831 2.72975566,9.85058594 2.45361328,9.85058594 C2.20815339,9.85058594 2.00400491,9.67371078 1.96166895,9.44046157 L1.95361328,9.35058594 L1.95361328,7.00488281 C1.95361328,5.67939941 2.98514922,4.59484414 4.28923759,4.51020049 L4.45361328,4.50488281 L7,4.50488281 Z M24,4.50488281 L24.1643757,4.51020049 C25.4684641,4.59484414 26.5,5.67939941 26.5,7.00488281 L26.5,7.00488281 L26.5,9.35058594 L26.4919443,9.44046157 C26.4496084,9.67371078 26.2454599,9.85058594 26,9.85058594 C25.7238576,9.85058594 25.5,9.62672831 25.5,9.35058594 L25.5,9.35058594 L25.5,7.00488281 L25.4931334,6.8604228 C25.4204487,6.0997709 24.7796961,5.50488281 24,5.50488281 L24,5.50488281 L21.4536133,5.50488281 L21.3637376,5.49682714 C21.1304884,5.45449118 20.9536133,5.2503427 20.9536133,5.00488281 C20.9536133,4.72874044 21.1774709,4.50488281 21.4536133,4.50488281 L21.4536133,4.50488281 L24,4.50488281 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M18,15 C18.2761424,15 18.5,15.2238576 18.5,15.5 L18.5,18.5 C18.5,18.7761424 18.2761424,19 18,19 C17.7238576,19 17.5,18.7761424 17.5,18.5 L17.5,15.5 C17.5,15.2238576 17.7238576,15 18,15 Z M6,13 C6.27614237,13 6.5,13.2238576 6.5,13.5 L6.5,18.5 C6.5,18.7761424 6.27614237,19 6,19 C5.72385763,19 5.5,18.7761424 5.5,18.5 L5.5,13.5 C5.5,13.2238576 5.72385763,13 6,13 Z M10,15 C10.2761424,15 10.5,15.2238576 10.5,15.5 L10.5,18.5 C10.5,18.7761424 10.2761424,19 10,19 C9.72385763,19 9.5,18.7761424 9.5,18.5 L9.5,15.5 C9.5,15.2238576 9.72385763,15 10,15 Z M22,17 C22.2761424,17 22.5,17.2238576 22.5,17.5 L22.5,18.5 C22.5,18.7761424 22.2761424,19 22,19 C21.7238576,19 21.5,18.7761424 21.5,18.5 L21.5,17.5 C21.5,17.2238576 21.7238576,17 22,17 Z M14,13 C14.2761424,13 14.5,13.2238576 14.5,13.5 L14.5,18.5 C14.5,18.7761424 14.2761424,19 14,19 C13.7238576,19 13.5,18.7761424 13.5,18.5 L13.5,13.5 C13.5,13.2238576 13.7238576,13 14,13 Z M22,9 C22.2761424,9 22.5,9.22385763 22.5,9.5 L22.5,15.5 C22.5,15.7761424 22.2761424,16 22,16 C21.7238576,16 21.5,15.7761424 21.5,15.5 L21.5,9.5 C21.5,9.22385763 21.7238576,9 22,9 Z M10,9 C10.2761424,9 10.5,9.22385763 10.5,9.5 L10.5,13.5 C10.5,13.7761424 10.2761424,14 10,14 C9.72385763,14 9.5,13.7761424 9.5,13.5 L9.5,9.5 C9.5,9.22385763 9.72385763,9 10,9 Z M18,9 C18.2761424,9 18.5,9.22385763 18.5,9.5 L18.5,13.5 C18.5,13.7761424 18.2761424,14 18,14 C17.7238576,14 17.5,13.7761424 17.5,13.5 L17.5,9.5 C17.5,9.22385763 17.7238576,9 18,9 Z M6,9 C6.27614237,9 6.5,9.22385763 6.5,9.5 L6.5,11.5 C6.5,11.7761424 6.27614237,12 6,12 C5.72385763,12 5.5,11.7761424 5.5,11.5 L5.5,9.5 C5.5,9.22385763 5.72385763,9 6,9 Z M14,9 C14.2761424,9 14.5,9.22385763 14.5,9.5 L14.5,11.5 C14.5,11.7761424 14.2761424,12 14,12 C13.7238576,12 13.5,11.7761424 13.5,11.5 L13.5,9.5 C13.5,9.22385763 13.7238576,9 14,9 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"rect\", {\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-21\",\n          x: \"16.5\",\n          y: \"18\",\n          width: \"1\",\n          height: \"1\",\n          rx: \"0.5\"\n        })));\n      }\n    case 'QRCode':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0029')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u4E8C\\u7EF4\\u7801\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M11,3 C12.1045695,3 13,3.8954305 13,5 L13,11 C13,12.1045695 12.1045695,13 11,13 L5,13 C3.8954305,13 3,12.1045695 3,11 L3,5 C3,3.8954305 3.8954305,3 5,3 L11,3 Z M11,4 L5,4 C4.48716416,4 4.06449284,4.38604019 4.00672773,4.88337887 L4,5 L4,11 C4,11.5128358 4.38604019,11.9355072 4.88337887,11.9932723 L5,12 L11,12 C11.5128358,12 11.9355072,11.6139598 11.9932723,11.1166211 L12,11 L12,5 C12,4.48716416 11.6139598,4.06449284 11.1166211,4.00672773 L11,4 Z\",\n          id: \"\\u77E9\\u5F62\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M11,15 C12.1045695,15 13,15.8954305 13,17 L13,23 C13,24.1045695 12.1045695,25 11,25 L5,25 C3.8954305,25 3,24.1045695 3,23 L3,17 C3,15.8954305 3.8954305,15 5,15 L11,15 Z M11,16 L5,16 C4.48716416,16 4.06449284,16.3860402 4.00672773,16.8833789 L4,17 L4,23 C4,23.5128358 4.38604019,23.9355072 4.88337887,23.9932723 L5,24 L11,24 C11.5128358,24 11.9355072,23.6139598 11.9932723,23.1166211 L12,23 L12,17 C12,16.4871642 11.6139598,16.0644928 11.1166211,16.0067277 L11,16 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-2\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M23,3 C24.1045695,3 25,3.8954305 25,5 L25,11 C25,12.1045695 24.1045695,13 23,13 L17,13 C15.8954305,13 15,12.1045695 15,11 L15,5 C15,3.8954305 15.8954305,3 17,3 L23,3 Z M23,4 L17,4 C16.4871642,4 16.0644928,4.38604019 16.0067277,4.88337887 L16,5 L16,11 C16,11.5128358 16.3860402,11.9355072 16.8833789,11.9932723 L17,12 L23,12 C23.5128358,12 23.9355072,11.6139598 23.9932723,11.1166211 L24,11 L24,5 C24,4.48716416 23.6139598,4.06449284 23.1166211,4.00672773 L23,4 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M9,5.5 L7,5.5 C6.17157288,5.5 5.5,6.17157288 5.5,7 L5.5,9 C5.5,9.82842712 6.17157288,10.5 7,10.5 L9,10.5 C9.82842712,10.5 10.5,9.82842712 10.5,9 L10.5,7 C10.5,6.17157288 9.82842712,5.5 9,5.5 Z M7,6.5 L9,6.5 C9.27614237,6.5 9.5,6.72385763 9.5,7 L9.5,9 C9.5,9.27614237 9.27614237,9.5 9,9.5 L7,9.5 C6.72385763,9.5 6.5,9.27614237 6.5,9 L6.5,7 C6.5,6.72385763 6.72385763,6.5 7,6.5 Z\",\n          id: \"\\u77E9\\u5F62\",\n          fill: \"#979797\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M21,5.5 L19,5.5 C18.1715729,5.5 17.5,6.17157288 17.5,7 L17.5,9 C17.5,9.82842712 18.1715729,10.5 19,10.5 L21,10.5 C21.8284271,10.5 22.5,9.82842712 22.5,9 L22.5,7 C22.5,6.17157288 21.8284271,5.5 21,5.5 Z M19,6.5 L21,6.5 C21.2761424,6.5 21.5,6.72385763 21.5,7 L21.5,9 C21.5,9.27614237 21.2761424,9.5 21,9.5 L19,9.5 C18.7238576,9.5 18.5,9.27614237 18.5,9 L18.5,7 C18.5,6.72385763 18.7238576,6.5 19,6.5 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-3\",\n          fill: \"#979797\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M9,17.5 L7,17.5 C6.17157288,17.5 5.5,18.1715729 5.5,19 L5.5,21 C5.5,21.8284271 6.17157288,22.5 7,22.5 L9,22.5 C9.82842712,22.5 10.5,21.8284271 10.5,21 L10.5,19 C10.5,18.1715729 9.82842712,17.5 9,17.5 Z M7,18.5 L9,18.5 C9.27614237,18.5 9.5,18.7238576 9.5,19 L9.5,21 C9.5,21.2761424 9.27614237,21.5 9,21.5 L7,21.5 C6.72385763,21.5 6.5,21.2761424 6.5,21 L6.5,19 C6.5,18.7238576 6.72385763,18.5 7,18.5 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-4\",\n          fill: \"#979797\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M15.5,18 C15.7761424,18 16,18.2238576 16,18.5 L16,24.5 C16,24.7761424 15.7761424,25 15.5,25 C15.2238576,25 15,24.7761424 15,24.5 L15,18.5 C15,18.2238576 15.2238576,18 15.5,18 Z M18.5,19 C18.7761424,19 19,19.2238576 19,19.5 L19,24.5 C19,24.7761424 18.7761424,25 18.5,25 C18.2238576,25 18,24.7761424 18,24.5 L18,19.5 C18,19.2238576 18.2238576,19 18.5,19 Z M21.5,21 C21.7761424,21 22,21.2238576 22,21.5 L22,24.5 C22,24.7761424 21.7761424,25 21.5,25 C21.2238576,25 21,24.7761424 21,24.5 L21,21.5 C21,21.2238576 21.2238576,21 21.5,21 Z M24.5,19 C24.7761424,19 25,19.2238576 25,19.5 L25,24.5 C25,24.7761424 24.7761424,25 24.5,25 C24.2238576,25 24,24.7761424 24,24.5 L24,19.5 C24,19.2238576 24.2238576,19 24.5,19 Z M21.5,15 C21.7761424,15 22,15.2238576 22,15.5 L22,19.5 C22,19.7761424 21.7761424,20 21.5,20 C21.2238576,20 21,19.7761424 21,19.5 L21,15.5 C21,15.2238576 21.2238576,15 21.5,15 Z M18.5,15 C18.7761424,15 19,15.2238576 19,15.5 L19,17.5 C19,17.7761424 18.7761424,18 18.5,18 C18.2238576,18 18,17.7761424 18,17.5 L18,15.5 C18,15.2238576 18.2238576,15 18.5,15 Z M24.5,15 C24.7761424,15 25,15.2238576 25,15.5 L25,17.5 C25,17.7761424 24.7761424,18 24.5,18 C24.2238576,18 24,17.7761424 24,17.5 L24,15.5 C24,15.2238576 24.2238576,15 24.5,15 Z M15.5,15 C15.7761424,15 16,15.2238576 16,15.5 L16,16.5 C16,16.7761424 15.7761424,17 15.5,17 C15.2238576,17 15,16.7761424 15,16.5 L15,15.5 C15,15.2238576 15.2238576,15 15.5,15 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        })));\n      }\n    case 'Footer':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0030')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u9875\\u811A\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u7F16\\u7EC4\",\n          transform: \"translate(4.000000, 1.967985)\",\n          \"fill-rule\": \"nonzero\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M1,19.532015 L2.70000005,19.532015 L2.70000005,18.532015 L1,18.532015 L1,19.532015 Z M4.4000001,19.532015 L6.10000014,19.532015 L6.10000014,18.532015 L4.4000001,18.532015 L4.4000001,19.532015 Z M7.80000019,19.532015 L9.50000024,19.532015 L9.50000024,18.532015 L7.80000019,18.532015 L7.80000019,19.532015 Z M11.2000003,19.532015 L12.9000003,19.532015 L12.9000003,18.532015 L11.2000003,18.532015 L11.2000003,19.532015 Z M14.6000004,19.532015 L16.3000004,19.532015 L16.3000004,18.532015 L14.6000004,18.532015 L14.6000004,19.532015 Z M18.0000005,19.532015 L19.5361328,19.532015 L19.5361328,18.532015 L18.0000005,18.532015 L18.0000005,19.532015 Z\",\n          id: \"\\u8DEF\\u5F84-20\\u5907\\u4EFD-3\",\n          fill: \"#404040\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M12.947418,0 L19.9931943,8.10498047 L19.938,8.152 L20,8.15262042 L20,22.032015 C20,23.1365845 19.1045695,24.032015 18,24.032015 L2,24.032015 C0.8954305,24.032015 0,23.1365845 0,22.032015 L0,2.03201496 C0,0.927445456 0.8954305,0.0320149557 2,0.0320149557 L12.91,0.032 L12.947418,0 Z M11.958,1.03201496 L2,1.03201496 C1.48716416,1.03201496 1.06449284,1.41805515 1.00672773,1.91539383 L1,2.03201496 L1,22.032015 C1,22.5448508 1.38604019,22.9675221 1.88337887,23.0252872 L2,23.032015 L18,23.032015 C18.5128358,23.032015 18.9355072,22.6459748 18.9932723,22.1486361 L19,22.032015 L19,9.15201496 L14.9587268,9.15262042 C13.3610459,9.15262042 12.0550659,7.90370046 11.9638195,6.32889321 L11.9587268,6.15262042 L11.958,1.03201496 Z M18.709,8.152 L12.958,1.537 L12.9587268,6.15262042 C12.9587268,7.25718992 13.8541573,8.15262042 14.9587268,8.15262042 L18.709,8.152 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"rect\", {\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-24\",\n          fill: \"#979797\",\n          transform: \"translate(10.000000, 15.532015) scale(1, -1) rotate(-180.000000) translate(-10.000000, -15.532015) \",\n          x: \"5\",\n          y: \"15.032015\",\n          width: \"10\",\n          height: \"1\",\n          rx: \"0.5\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"rect\", {\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-25\",\n          fill: \"#979797\",\n          transform: \"translate(10.000000, 11.532015) scale(1, -1) rotate(-180.000000) translate(-10.000000, -11.532015) \",\n          x: \"5\",\n          y: \"11.032015\",\n          width: \"10\",\n          height: \"1\",\n          rx: \"0.5\"\n        }))));\n      }\n    case 'DataGrid':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0031')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u6570\\u636E\\u8868\\u683C\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u7F16\\u7EC4\\u5907\\u4EFD-5\",\n          transform: \"translate(3.000000, 3.000000)\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M7.5,7.5 L7.5,12 L14.5,11.999 L14.5,7.5 L15.5,7.5 L15.5,11.999 L21,12 L21,13 L15.5,12.999 L15.5,16.999 L21,17 L21,18 L15.5,17.999 L15.5,21.5 L14.5,21.5 L14.5,17.999 L7.5,18 L7.5,21.5 L6.5,21.5 L6.5,18 L1,18 L1,17 L6.5,17 L6.5,13 L1,13 L1,12 L6.5,12 L6.5,7.5 L7.5,7.5 Z M14.5,12.999 L7.5,13 L7.5,17 L14.5,16.999 L14.5,12.999 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#979797\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M20,0 C21.1045695,0 22,0.8954305 22,2 L22,20 C22,21.1045695 21.1045695,22 20,22 L2,22 C0.8954305,22 0,21.1045695 0,20 L0,2 C0,0.8954305 0.8954305,0 2,0 L20,0 Z M1,8 L1,20 C1,20.5128358 1.38604019,20.9355072 1.88337887,20.9932723 L2,21 L20,21 C20.5128358,21 20.9355072,20.6139598 20.9932723,20.1166211 L21,20 L21,8 L1,8 Z M1,7 L21,7 L21,2 C21,1.48716416 20.6139598,1.06449284 20.1166211,1.00672773 L20,1 L2,1 C1.48716416,1 1.06449284,1.38604019 1.00672773,1.88337887 L1,2 L1,7 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }))));\n      }\n    case 'SubDateGrid':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0032')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u5B50\\u6570\\u636E\\u8868\\u683C\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u7F16\\u7EC4\",\n          transform: \"translate(3.000000, 3.000000)\",\n          \"fill-rule\": \"nonzero\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M20,0 C21.1045695,0 22,0.8954305 22,2 L22,20 C22,21.1045695 21.1045695,22 20,22 L2,22 C0.8954305,22 0,21.1045695 0,20 L0,2 C0,0.8954305 0.8954305,0 2,0 L20,0 Z M20,1 L2,1 C1.48716416,1 1.06449284,1.38604019 1.00672773,1.88337887 L1,2 L1,20 C1,20.5128358 1.38604019,20.9355072 1.88337887,20.9932723 L2,21 L20,21 C20.5128358,21 20.9355072,20.6139598 20.9932723,20.1166211 L21,20 L21,2 C21,1.48716416 20.6139598,1.06449284 20.1166211,1.00672773 L20,1 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD\",\n          fill: \"#404040\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M18,4.5 L4,4.5 C3.17157288,4.5 2.5,5.17157288 2.5,6 L2.5,8 C2.5,8.82842712 3.17157288,9.5 4,9.5 L18,9.5 C18.8284271,9.5 19.5,8.82842712 19.5,8 L19.5,6 C19.5,5.17157288 18.8284271,4.5 18,4.5 Z M4,5.5 L18,5.5 C18.2761424,5.5 18.5,5.72385763 18.5,6 L18.5,8 C18.5,8.27614237 18.2761424,8.5 18,8.5 L4,8.5 C3.72385763,8.5 3.5,8.27614237 3.5,8 L3.5,6 C3.5,5.72385763 3.72385763,5.5 4,5.5 Z\",\n          id: \"\\u77E9\\u5F62\",\n          fill: \"#979797\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M7,12.5 C7.82842712,12.5 8.5,13.1715729 8.5,14 L8.5,14 L8.5,17 C8.5,17.8284271 7.82842712,18.5 7,18.5 L7,18.5 L4,18.5 C3.17157288,18.5 2.5,17.8284271 2.5,17 L2.5,17 L2.5,14 C2.5,13.1715729 3.17157288,12.5 4,12.5 L4,12.5 Z M18.5,17 C18.7761424,17 19,17.2238576 19,17.5 C19,17.7761424 18.7761424,18 18.5,18 L18.5,18 L11.5,18 C11.2238576,18 11,17.7761424 11,17.5 C11,17.2238576 11.2238576,17 11.5,17 L11.5,17 Z M7,13.5 L4,13.5 C3.72385763,13.5 3.5,13.7238576 3.5,14 L3.5,14 L3.5,17 C3.5,17.2761424 3.72385763,17.5 4,17.5 L4,17.5 L7,17.5 C7.27614237,17.5 7.5,17.2761424 7.5,17 L7.5,17 L7.5,14 C7.5,13.7238576 7.27614237,13.5 7,13.5 L7,13.5 Z M18.5,13 C18.7761424,13 19,13.2238576 19,13.5 C19,13.7761424 18.7761424,14 18.5,14 L18.5,14 L11.5,14 C11.2238576,14 11,13.7761424 11,13.5 C11,13.2238576 11.2238576,13 11.5,13 L11.5,13 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\"\n        }))));\n      }\n    case 'Header':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0033')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u9875\\u7709\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M16.947418,1.96798504 L23.9931943,10.0729655 L23.938,10.119985 L24,10.1206055 L24,24 C24,25.1045695 23.1045695,26 22,26 L6,26 C4.8954305,26 4,25.1045695 4,24 L4,4 C4,2.8954305 4.8954305,2 6,2 L16.91,1.99998504 L16.947418,1.96798504 Z M15.958,3 L6,3 C5.48716416,3 5.06449284,3.38604019 5.00672773,3.88337887 L5,4 L5,24 C5,24.5128358 5.38604019,24.9355072 5.88337887,24.9932723 L6,25 L22,25 C22.5128358,25 22.9355072,24.6139598 22.9932723,24.1166211 L23,24 L23,11.12 L18.9587268,11.1206055 C17.3610459,11.1206055 16.0550659,9.8716855 15.9638195,8.29687826 L15.9587268,8.12060547 L15.958,3 Z M22.709,10.119985 L16.958,3.50498504 L16.9587268,8.12060547 C16.9587268,9.22517497 17.8541573,10.1206055 18.9587268,10.1206055 L22.709,10.119985 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"rect\", {\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-9\",\n          fill: \"#979797\",\n          transform: \"translate(14.000000, 17.500000) scale(1, -1) rotate(-180.000000) translate(-14.000000, -17.500000) \",\n          x: \"9\",\n          y: \"17\",\n          width: \"10\",\n          height: \"1\",\n          rx: \"0.5\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"rect\", {\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD-10\",\n          fill: \"#979797\",\n          transform: \"translate(14.000000, 13.500000) scale(1, -1) rotate(-180.000000) translate(-14.000000, -13.500000) \",\n          x: \"9\",\n          y: \"13\",\n          width: \"10\",\n          height: \"1\",\n          rx: \"0.5\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M5,7.5 L6.5,7.5 L6.5,6.5 L5,6.5 L5,7.5 Z M8,7.5 L9.5,7.5 L9.5,6.5 L8,6.5 L8,7.5 Z M11,7.5 L12.5,7.5 L12.5,6.5 L11,6.5 L11,7.5 Z M14,7.5 L15.5,7.5 L15.5,6.5 L14,6.5 L14,7.5 Z\",\n          id: \"\\u8DEF\\u5F84-20\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        })));\n      }\n    case 'LayoutGrid':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"200\",\n          height: \"200\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0034')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u7F51\\u683C\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"rect\", {\n          id: \"\\u77E9\\u5F62\",\n          stroke: \"#404040\",\n          x: \"3.5\",\n          y: \"3.5\",\n          width: \"21\",\n          height: \"21\",\n          rx: \"2\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M11,4 L11,10 L24,10 L24,11 L11,11 L11,24 L10,24 L10,11 L4,11 L4,10 L10,10 L10,4 L11,4 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M11,4 L11,10 L24,10 L24,11 L11,11 L11,24 L10,24 L10,11 L4,11 L4,10 L10,10 L10,4 L11,4 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#979797\",\n          transform: \"translate(14.000000, 14.000000) scale(-1, -1) translate(-14.000000, -14.000000) \"\n        })));\n      }\n    case 'CardGrid':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"28px\",\n          height: \"28px\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0112')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u5E03\\u5C40\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          transform: \"translate(4.000000, 4.000000)\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M19,14 L13,14 C11.8954305,14 11,14.8954305 11,16 L11,19 C11,20.1045695 11.8954305,21 13,21 L19,21 C20.1045695,21 21,20.1045695 21,19 L21,16 C21,14.8954305 20.1045695,14 19,14 Z M19,15 C19.5522847,15 20,15.4477153 20,16 L20,19 C20,19.5522847 19.5522847,20 19,20 L13,20 C12.4477153,20 12,19.5522847 12,19 L12,16 C12,15.4477153 12.4477153,15 13,15 L19,15 Z M7,-1 L1,-1 C-0.1045695,-1 -1,-0.1045695 -1,1 L-1,7 C-1,8.1045695 -0.1045695,9 1,9 L7,9 C8.1045695,9 9,8.1045695 9,7 L9,1 C9,-0.1045695 8.1045695,-1 7,-1 Z M7,0 C7.55228475,0 8,0.44771525 8,1 L8,7 C8,7.55228475 7.55228475,8 7,8 L1,8 C0.44771525,8 0,7.55228475 0,7 L0,1 C0,0.44771525 0.44771525,0 1,0 L7,0 Z M19,-1 L13,-1 C11.8954305,-1 11,-0.1045695 11,1 L11,10 C11,11.1045695 11.8954305,12 13,12 L19,12 C20.1045695,12 21,11.1045695 21,10 L21,1 C21,-0.1045695 20.1045695,-1 19,-1 Z M19,0 C19.5522847,0 20,0.44771525 20,1 L20,10 C20,10.5522847 19.5522847,11 19,11 L13,11 C12.4477153,11 12,10.5522847 12,10 L12,1 C12,0.44771525 12.4477153,0 13,0 L19,0 Z M7,11 L1,11 C-0.1045695,11 -1,11.8954305 -1,13 L-1,19 C-1,20.1045695 -0.1045695,21 1,21 L7,21 C8.1045695,21 9,20.1045695 9,19 L9,13 C9,11.8954305 8.1045695,11 7,11 Z M7,12 C7.55228475,12 8,12.4477153 8,13 L8,19 C8,19.5522847 7.55228475,20 7,20 L1,20 C0.44771525,20 0,19.5522847 0,19 L0,13 C0,12.4477153 0.44771525,12 1,12 L7,12 Z\"\n        }))));\n      }\n    case 'Line':\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"svg\", {\n          className: \"icon\",\n          width: \"28px\",\n          height: \"28px\",\n          viewBox: \"0 0 28 28\",\n          version: \"1.1\",\n          xmlns: \"http://www.w3.org/2000/svg\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"title\", null, \"\\u76F4\\u7EBF\"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"g\", {\n          id: \"\\u76F4\\u7EBF\",\n          stroke: \"none\",\n          \"stroke-width\": \"1\",\n          fill: \"none\",\n          \"fill-rule\": \"evenodd\"\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M6.5,15.5046212 C5.67157288,15.5046212 5,14.8330483 5,14.0046212 C5,13.1761941 5.67157288,12.5046212 6.5,12.5046212 C7.15321869,12.5046212 7.70891488,12.9221647 7.91475048,13.5049137 L20.0852495,13.5049137 C20.2910851,12.9221647 20.8467813,12.5046212 21.5,12.5046212 C22.3284271,12.5046212 23,13.1761941 23,14.0046212 C23,14.8330483 22.3284271,15.5046212 21.5,15.5046212 C20.8471533,15.5046212 20.2917181,15.0875531 20.0856015,14.5053242 L7.91439849,14.5053242 C7.70828193,15.0875531 7.1528467,15.5046212 6.5,15.5046212 Z M21.5,13.5046212 C21.2238576,13.5046212 21,13.7284788 21,14.0046212 C21,14.2807636 21.2238576,14.5046212 21.5,14.5046212 C21.7761424,14.5046212 22,14.2807636 22,14.0046212 C22,13.7284788 21.7761424,13.5046212 21.5,13.5046212 Z M6.5,13.5046212 C6.22385763,13.5046212 6,13.7284788 6,14.0046212 C6,14.2807636 6.22385763,14.5046212 6.5,14.5046212 C6.77614237,14.5046212 7,14.2807636 7,14.0046212 C7,13.7284788 6.77614237,13.5046212 6.5,13.5046212 Z\",\n          id: \"\\u5F62\\u72B6\\u7ED3\\u5408\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\",\n          transform: \"translate(14, 14.0046) rotate(-45) translate(-14, -14.0046)\"\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(\"path\", {\n          d: \"M23,3 C24.1045695,3 25,3.8954305 25,5 L25,23 C25,24.1045695 24.1045695,25 23,25 L5,25 C3.8954305,25 3,24.1045695 3,23 L3,5 C3,3.8954305 3.8954305,3 5,3 L23,3 Z M23,4 L5,4 C4.48716416,4 4.06449284,4.38604019 4.00672773,4.88337887 L4,5 L4,23 C4,23.5128358 4.38604019,23.9355072 4.88337887,23.9932723 L5,24 L23,24 C23.5128358,24 23.9355072,23.6139598 23.9932723,23.1166211 L24,23 L24,5 C24,4.48716416 23.6139598,4.06449284 23.1166211,4.00672773 L23,4 Z\",\n          id: \"\\u77E9\\u5F62\\u5907\\u4EFD\",\n          fill: \"#404040\",\n          \"fill-rule\": \"nonzero\"\n        })));\n      }\n    default:\n      {\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default().createElement(DefaultIcon, null);\n      }\n  }\n};\nvar batchChangeControlValue = function batchChangeControlValue(controls, prop, value) {\n  if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(controls)) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(controls).call(controls, function (control) {\n      control[prop] = value;\n    });\n  } else {\n    controls[prop] = value;\n  }\n};\nfunction createDataGridModal(dataFactory, modelFactory) {\n  return function (_ref) {\n    var type = _ref.type,\n      parentId = _ref.parentId,\n      transferData = _ref.transferData,\n      _ref$cellData = _ref.cellData,\n      cellData = _ref$cellData === void 0 ? [] : _ref$cellData,\n      parentItem = _ref.parentItem;\n    var itemData = dataFactory({\n      type: type,\n      parentId: parentId,\n      transferData: transferData,\n      parentItem: parentItem\n    });\n    var dataTemplate = modelFactory({\n      type: type\n    });\n    console.log('itemData-------', itemData, dataTemplate);\n\n    // 应该所有表格相关都在这里处理\n    if (dataTemplate.Id === 'DataGrid' || dataTemplate.Id === _constants__WEBPACK_IMPORTED_MODULE_21__.SUB_GRID_TYPE) {\n      var Default = dataTemplate.Default;\n      // let rowCount = 0\n      var currentRow = 0;\n      // let columnCount = 0\n      var rows = [];\n      var columns = [];\n      var cells = [];\n      // TODO:\n      // 如何用享元模式优化？\n      itemData.items = _.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(Default).call(Default, function (modelItem) {\n        var _context, _context2, _context3;\n        // 这里数据行还得加个参数\n        var Id = modelItem.Id,\n          Count = modelItem.Count,\n          CellType = modelItem.CellType,\n          Name = modelItem.Name,\n          rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(modelItem, _excluded);\n        var cellWidthProps = {};\n        // 传了宽度，按比例分割单元格宽度\n        if (transferData && transferData.width) {\n          cellWidthProps = {\n            columnWidth: (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(transferData.width / cellData.length, _constants__WEBPACK_IMPORTED_MODULE_21__.PRECISION)\n          };\n          console.log('cellWidthProps', cellWidthProps);\n        }\n        var typeProps = !_.isEmpty(rest) ? _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(rest)).call(_context, function (res, key) {\n          res[_.camelCase(key)] = rest[key];\n          return res;\n        }, {}) : rest;\n        var items = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_15___default()(_context3 = new Array(Id !== 'DataRow' ? cellData.length : Count)).call(_context3, 0)).call(_context2, function (num, idx) {\n          console.log(num, idx);\n          var detailCellData = cellData[idx] || {};\n          var _detailCellData$viewT = detailCellData.viewText,\n            viewText = _detailCellData$viewT === void 0 ? '' : _detailCellData$viewT;\n          var normalCellData = {\n            bindText: viewText ? viewText.replace(/=\\$(.+)$/g, '$1') : ''\n          };\n          var cellDataMap = {\n            Detail: detailCellData,\n            Normal: normalCellData\n          };\n          return dataFactory({\n            type: Id,\n            parentId: itemData.id,\n            transferData: Id === 'DataCell' ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({\n              rowId: rows[currentRow].id,\n              columnId: columns[idx].id,\n              width: columns[idx].columnWidth,\n              height: rows[currentRow].rowHeight,\n              cellType: CellType\n            }, typeProps), Name ? {\n              name: Name\n            } : {}), cellDataMap[CellType] || {}), cellWidthProps) : _objectSpread(_objectSpread(_objectSpread({}, typeProps), Name ? {\n              name: Name\n            } : {}), Id === 'DataColumn' ? cellWidthProps : {})\n          });\n        });\n\n        // 单元格如何给它标明位置\n        if (Id === 'DataRow') {\n          rows.push.apply(rows, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(items));\n        } else if (Id === 'DataColumn') {\n          columns.push.apply(columns, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(items));\n        }\n        if (Id === 'DataCell') {\n          currentRow++;\n          cells.push.apply(cells, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(items));\n        }\n        return items;\n      }));\n    }\n    if (transferData) {\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(itemData, transferData);\n    }\n    if (transferData !== null && transferData !== void 0 && transferData.width) {\n      itemData.width = (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)((0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(transferData.width / cellData.length, _constants__WEBPACK_IMPORTED_MODULE_21__.PRECISION) * cellData.length, _constants__WEBPACK_IMPORTED_MODULE_21__.PRECISION);\n    }\n    return dealItemData(itemData);\n  };\n}\nfunction createLayoutGridModal(dataFactory, modelFactory) {\n  return function (_ref2) {\n    var type = _ref2.type,\n      parentId = _ref2.parentId,\n      transferData = _ref2.transferData,\n      _ref2$gridInfo = _ref2.gridInfo,\n      gridInfo = _ref2$gridInfo === void 0 ? {} : _ref2$gridInfo,\n      parentItem = _ref2.parentItem;\n    var itemData = dataFactory({\n      type: type,\n      parentId: parentId,\n      transferData: transferData,\n      parentItem: parentItem\n    });\n    var dataTemplate = modelFactory({\n      type: type\n    });\n    var _gridInfo$row = gridInfo.row,\n      rowNum = _gridInfo$row === void 0 ? 1 : _gridInfo$row,\n      _gridInfo$column = gridInfo.column,\n      colNum = _gridInfo$column === void 0 ? 1 : _gridInfo$column;\n    rowNum = _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_16___default()(rowNum);\n    colNum = _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_16___default()(colNum);\n    console.log('itemData-------', itemData, dataTemplate, rowNum, colNum);\n    // 应该所有表格相关都在这里处理\n    if (dataTemplate.Id === 'LayoutGrid' || dataTemplate.Id === 'CardGrid') {\n      var Default = dataTemplate.Default;\n      var rows = [];\n      var columns = [];\n      itemData.items = _.flatten(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(Default).call(Default, function (modelItem) {\n        var _context4, _context5, _context6;\n        // 这里数据行还得加个参数\n        var Id = modelItem.Id,\n          Count = modelItem.Count,\n          CellType = modelItem.CellType,\n          Name = modelItem.Name,\n          rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(modelItem, _excluded2);\n        var cellWidthProps = {};\n        // 传了宽度，按比例分割单元格宽度\n        if (transferData && transferData.width) {\n          cellWidthProps = {\n            columnWidth: (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(transferData.width / colNum, _constants__WEBPACK_IMPORTED_MODULE_21__.PRECISION)\n          };\n          console.log('cellWidthProps', cellWidthProps);\n        }\n        var typeProps = !_.isEmpty(rest) ? _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(_context4 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(rest)).call(_context4, function (res, key) {\n          res[_.camelCase(key)] = rest[key];\n          return res;\n        }, {}) : rest;\n        var getArrayNum = function getArrayNum(Id) {\n          if (Id === 'DataRow') return rowNum;\n          if (Id === 'DataColumn') return colNum;\n          if (Id === 'LayoutCell') return rowNum * colNum;\n        };\n        var items = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_15___default()(_context6 = new Array(getArrayNum(Id))).call(_context6, 0)).call(_context5, function (num, idx) {\n          return dataFactory({\n            type: Id,\n            parentId: itemData.id,\n            transferData: Id === 'LayoutCell' ? _objectSpread(_objectSpread({\n              rowId: rows[Math.floor(idx / colNum)].id,\n              columnId: columns[idx % colNum].id,\n              width: columns[idx % colNum].columnWidth,\n              height: rows[Math.floor(idx / colNum)].rowHeight,\n              cellType: CellType\n            }, typeProps), cellWidthProps) : _objectSpread(_objectSpread(_objectSpread({}, typeProps), Name ? {\n              name: Name\n            } : {}), Id === 'DataColumn' ? cellWidthProps : {})\n          });\n        });\n\n        // 单元格如何给它标明位置\n        if (Id === 'DataRow') {\n          rows.push.apply(rows, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(items));\n        } else if (Id === 'DataColumn') {\n          columns.push.apply(columns, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(items));\n        }\n        return items;\n      }));\n    }\n    if (transferData) {\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(itemData, transferData);\n    }\n    if (transferData !== null && transferData !== void 0 && transferData.width) {\n      itemData.width = (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)((0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(transferData.width / colNum, _constants__WEBPACK_IMPORTED_MODULE_21__.PRECISION) * colNum, _constants__WEBPACK_IMPORTED_MODULE_21__.PRECISION);\n    }\n    return dealItemData(itemData);\n  };\n}\nfunction dealItemData(itemData) {\n  if (itemData.items) {\n    var _context7;\n    var moreItems = itemData.items;\n    itemData.items = undefined;\n    (0,_grid__WEBPACK_IMPORTED_MODULE_22__.changeItemsBorder)(itemData, moreItems, true);\n    // 不需要\n    // itemData.items = itemData.items.map(item => item.id)\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context7 = [itemData]).call(_context7, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(moreItems));\n  }\n  return itemData;\n}\nfunction needReverseSize(data, rotate) {\n  var oldRotate = data.rotate;\n  return Math.abs(rotate - oldRotate) % 180 === 90;\n}\nfunction handleDropTextInLayoutCell(id, dataContext, updateProperties) {\n  var childItems = dataContext.findControlByCondition(function (item) {\n    return item.parentId === id;\n  });\n  if (!childItems.length) {\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.createUpdateAction)([[id, updateProperties]]));\n  }\n}\nvar dsTypeMap = {\n  // Statistic: ['Sys', 'Entry', 'Approveline', 'Approveactivit', 'Attach'], // 合计行不做限制\n  // Detail: ['Entry', 'Approveline', 'Workflow', 'Attach', 'Custom'], // 数据行\n  Normal: ['Sys', 'Head', 'Import', 'Main', 'Entry'] // 标题行\n};\nfunction handleDropInTextInDataCell(node, selectControl, dataContext, dataSourceObj, setMessage, definition) {\n  var _context8, _context10;\n  var isDataGridDs = node.isDataGridDs,\n    dsType = node.dsType,\n    isSubDataGridDs = node.isSubDataGridDs,\n    dataSource = node.dataSource,\n    bindField = node.bindField;\n  var statType = selectControl.statType,\n    cellType = selectControl.cellType,\n    parentId = selectControl.parentId,\n    id = selectControl.id;\n  var initAttr = dataSourceObj.initAttr,\n    title = dataSourceObj.title;\n  var dsTypes = dsTypeMap[cellType];\n  var _dataContext$findCont = dataContext.findControl(parentId),\n    parentType = _dataContext$findCont.type,\n    parentControl = _dataContext$findCont.parentControl;\n  if (dsType === 'Sys' && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context8 = ['=getGroupRowNumber()', '=getRowNumber()']).call(_context8, bindField)) {\n    return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0113'));\n  }\n  var gridDataSource = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_24__.geGridDataSource)(dataContext, id, 'DataGrid') || (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_24__.geGridDataSource)(dataContext, id, 'SubDataGrid');\n  if (!(0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_25__.includeDataSource)(definition, gridDataSource)) {\n    return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0035'));\n  }\n  if (cellType === 'Normal' && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(dsTypes).call(dsTypes, dsType)) {\n    return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0036'));\n  }\n  if (cellType === 'Normal' || cellType === 'Statistic') {\n    var _context9;\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.createUpdateAction)([[id, _objectSpread(_objectSpread({}, initAttr), {}, {\n      viewText: cellType === 'Statistic' && statType !== 'noStat' ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context9 = \"=\".concat(statType, \"(\")).call(_context9, title, \")\") : \"=$\".concat(title)\n    })]]));\n  }\n  if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context10 = ['Detail', 'Group']).call(_context10, cellType)) {\n    var _context11;\n    var _parentControl = dataContext.findControl(parentId);\n    var _dataSource = _parentControl.dataSource;\n    /**\n     * 可以添加至数据行中的字段\n     * 1.系统字段-当前行行号（bindField = `=getRowNumber()`）\n     * 2.同一数据源下的(initAttr.dataSource === dataSource)\n     * 3.如果数据表格数据源为空，则判断isDataGridDs= true\n     */\n    var DsTypes = ['Entry', 'ReportEntry', 'Subentry', 'Workflow', 'Report', 'Approveline'];\n    if (parentType === 'DataGrid' && !(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context11 = ['=getGroupRowNumber()', '=getRowNumber()']).call(_context11, initAttr.bindField) || _dataSource && (initAttr.dataSource === _dataSource || !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(DsTypes).call(DsTypes, initAttr.dsType)) || !_dataSource && isDataGridDs)) {\n      return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0037'));\n    }\n    if (parentType === 'SubDataGrid' && !(initAttr.bindField === \"=getRowNumber()\" || _dataSource && initAttr.dataSource === _dataSource || !_dataSource && isSubDataGridDs)) {\n      return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0038'));\n    }\n    var batchUpdateValue = [[id, _objectSpread(_objectSpread({}, initAttr), {}, {\n      viewText: \"=$\".concat(title)\n    })]];\n    if (!_dataSource) {\n      batchUpdateValue.push([parentId, {\n        dataSource: initAttr.dataSource,\n        dataSourceText: initAttr.dataSourceText\n      }]);\n    }\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.createUpdateAction)(batchUpdateValue));\n  }\n}\nvar handlePasteTextInGridCell = function handlePasteTextInGridCell(node, selectControl, dataContext, pasteObj, setMessage) {\n  var isDataGridDs = node.isDataGridDs,\n    dsType = node.dsType,\n    isSubDataGridDs = node.isSubDataGridDs,\n    ViewName = node.ViewName,\n    Name = node.Name,\n    bindField = node.bindField,\n    dataSource = node.dataSource,\n    dataSourceText = node.dataSourceText;\n  var statType = selectControl.statType,\n    cellType = selectControl.cellType,\n    parentId = selectControl.parentId,\n    id = selectControl.id;\n  var viewText = pasteObj.viewText;\n  var title = ViewName || Name;\n  var dsTypes = dsTypeMap[cellType];\n  var parentControl = dataContext.findControl(parentId);\n  var _dataContext$findCont2 = dataContext.findControl(parentId),\n    parentType = _dataContext$findCont2.type,\n    parentDataSource = _dataContext$findCont2.dataSource;\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isDataGrid)(parentControl) || (0,_grid__WEBPACK_IMPORTED_MODULE_22__.isSubDataGrid)(parentControl)) {\n    var _context13;\n    if (cellType === 'Normal' && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(dsTypes).call(dsTypes, dsType)) {\n      return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0039'));\n    }\n    if (cellType === 'Normal' || cellType === 'Statistic') {\n      var _context12;\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.createUpdateAction)([[id, _objectSpread(_objectSpread({}, pasteObj), {}, {\n        viewText: cellType === 'Statistic' && statType !== 'noStat' ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context12 = \"=\".concat(statType, \"(\")).call(_context12, title, \")\") : viewText\n      })]]));\n    }\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context13 = ['Detail', 'Group']).call(_context13, cellType)) {\n      if (parentType === 'DataGrid' && !(bindField === \"=getRowNumber()\" || parentDataSource && dataSource === parentDataSource || !parentDataSource && isDataGridDs)) {\n        return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0040'));\n      }\n      if (parentType === 'SubDataGrid' && !(bindField === \"=getRowNumber()\" || parentDataSource && dataSource === parentDataSource || !parentDataSource && isSubDataGridDs)) {\n        return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.getLangMsg)('printd.grid.key0041'));\n      }\n      var batchUpdateValue = [[id, pasteObj]];\n      if (!parentDataSource) {\n        batchUpdateValue.push([parentId, {\n          dataSource: dataSource,\n          dataSourceText: dataSourceText\n        }]);\n      }\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.createUpdateAction)(batchUpdateValue));\n    }\n    return;\n  }\n  dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_23__.createUpdateAction)([[id, pasteObj]]));\n};\nvar getControlBottomPosition = function getControlBottomPosition(control, dataContext) {\n  var y = control.y,\n    height = control.height,\n    subGridId = control.subGridId,\n    tableTailId = control.tableTailId;\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isDataGrid)(control) && subGridId !== null && subGridId !== void 0 && subGridId.length) {\n    var _dataContext$findCont3 = dataContext.findControl(subGridId[0]),\n      subGridDirection = _dataContext$findCont3.subGridDirection,\n      subGridHeight = _dataContext$findCont3.height;\n    if (subGridDirection === 'bottom') {\n      return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(y + height + subGridHeight, 1);\n    } else if (subGridDirection === 'right') {\n      return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(y + Math.max(height, subGridHeight), 1);\n    }\n  }\n  if (((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isDataGrid)(control) || (0,_grid__WEBPACK_IMPORTED_MODULE_22__.isCardGrid)(control)) && tableTailId) {\n    var _dataContext$findCont4 = dataContext.findControl(tableTailId),\n      tableTailHeight = _dataContext$findCont4.height;\n    return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(y + height + tableTailHeight, 1);\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isSubDataGrid)(control)) {\n    var _subGridDirection = control.subGridDirection,\n      parentGridId = control.parentGridId;\n    if (_subGridDirection === 'right') {\n      var _dataContext$findCont5 = dataContext.findControl(parentGridId),\n        parentGridHeight = _dataContext$findCont5.height;\n      return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(y + Math.max(height, parentGridHeight), 1);\n    }\n  }\n  return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(y + height, 1);\n};\nvar getControlTopPosition = function getControlTopPosition(control, dataContext) {\n  var y = control.y;\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isSubDataGrid)(control)) {\n    var subGridDirection = control.subGridDirection,\n      parentGridId = control.parentGridId;\n    if (subGridDirection === 'bottom') {\n      var _dataContext$findCont6 = dataContext.findControl(parentGridId),\n        parentGridHeight = _dataContext$findCont6.height;\n      return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(y - parentGridHeight, 1);\n    }\n  }\n  return y;\n};\nvar getControlRelativeHeight = function getControlRelativeHeight(control, dataContext) {\n  var height = control.height,\n    subGridId = control.subGridId;\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isDataGrid)(control) && subGridId !== null && subGridId !== void 0 && subGridId.length) {\n    var _dataContext$findCont7 = dataContext.findControl(subGridId[0]),\n      subGridDirection = _dataContext$findCont7.subGridDirection,\n      subGridHeight = _dataContext$findCont7.height;\n    if (subGridDirection === 'bottom') {\n      return (0,_index__WEBPACK_IMPORTED_MODULE_20__.toFloorFix)(height + subGridHeight, 1);\n    } else if (subGridDirection === 'right') {\n      return Math.max(height, subGridHeight);\n    }\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_22__.isSubDataGrid)(control)) {\n    var _subGridDirection2 = control.subGridDirection,\n      parentGridId = control.parentGridId;\n    var _dataContext$findCont8 = dataContext.findControl(parentGridId),\n      parentGridHeight = _dataContext$findCont8.height;\n    if (_subGridDirection2 === 'right') {\n      return Math.max(height, parentGridHeight);\n    }\n  }\n  return height;\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/control.tsx?");

/***/ }),

/***/ 98600:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   NEST_CONTROL_TYPES: function() { return /* binding */ NEST_CONTROL_TYPES; },\n/* harmony export */   dealParentItem: function() { return /* binding */ dealParentItem; },\n/* harmony export */   isBarCode: function() { return /* binding */ isBarCode; },\n/* harmony export */   isContainerControl: function() { return /* binding */ isContainerControl; },\n/* harmony export */   isFooter: function() { return /* binding */ isFooter; },\n/* harmony export */   isHeader: function() { return /* binding */ isHeader; },\n/* harmony export */   isLine: function() { return /* binding */ isLine; },\n/* harmony export */   isTextField: function() { return /* binding */ isTextField; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21980);\n\n\nvar NEST_CONTROL_TYPES = ['Text', 'Barcode', 'QRCode', 'Image'];\nvar isHeader = function isHeader(control) {\n  var type = control.type;\n  return type === 'Header';\n};\nvar isFooter = function isFooter(control) {\n  var type = control.type;\n  return type === 'Footer';\n};\nvar isBarCode = function isBarCode(control) {\n  var type = control.type;\n  return type === 'Barcode';\n};\nvar isLine = function isLine(control) {\n  var type = control.type;\n  return type === 'Line';\n};\nvar isTextField = function isTextField(control) {\n  if (!control) return false;\n  var type = control.type;\n  return type === 'Text';\n};\nvar isContainerControl = function isContainerControl(control) {\n  if (!control) return false;\n  return isHeader(control) || isFooter(control) || (0,_grid__WEBPACK_IMPORTED_MODULE_1__.isLayoutCell)(control);\n};\nvar dealParentItem = function dealParentItem(control) {\n  if (!control) return control;\n  return !control.parentId ? (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, control, {\n    width: Math.max(control.width - (control.marginLeft + control.marginRight), control.marginLeft + control.marginRight),\n    height: Math.max(control.height - (control.marginTop + control.marginBottom), control.marginTop + control.marginBottom),\n    x: 0,\n    y: 0\n  }) : control;\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/controlType.ts?");

/***/ }),

/***/ 76000:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ClearPreviousAddKeys: function() { return /* binding */ ClearPreviousAddKeys; },\n/* harmony export */   createControlDataOrModel: function() { return /* binding */ createControlDataOrModel; },\n/* harmony export */   createUUid: function() { return /* binding */ createUUid; },\n/* harmony export */   createUniqueKey: function() { return /* binding */ createUniqueKey; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58496);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n\n// import { IControlItem } from '../type'\n\nvar _window = (typeof self === \"undefined\" ? \"undefined\" : (0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self)) == 'object' && self.self === self && self || (typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : (0,_babel_runtime_corejs3_helpers_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(__webpack_require__.g)) == 'object' && __webpack_require__.g.global === __webpack_require__.g && __webpack_require__.g || undefined || {};\n/**\n * Base 64 characters\n */\nvar BASE64 = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\n/**\n * Make a Uint8Array into a string\n * @param {Uint8Array}\n * @returns {String}\n * @api private\n */\nfunction tostr(bytes) {\n  var r, i;\n  r = [];\n  for (i = 0; i < bytes.length; i++) {\n    r.push(BASE64[bytes[i] % 62]);\n  }\n  return r.join('');\n}\n\n/**\n * Generate an unique id\n * @param {Number} The number of chars of the uid\n * @api public\n */\nfunction uid() {\n  var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;\n  if (typeof _window.crypto !== 'undefined') {\n    return tostr(_window.crypto.getRandomValues(new Uint8Array(length)));\n  } else {\n    var a = new Array(length);\n    for (var i = 0; i < length; i++) {\n      a[i] = Math.floor(Math.random() * 256);\n    }\n    return tostr(a);\n  }\n}\nvar createUUid = uid;\nfunction defaultValue(type) {\n  switch (type) {\n    case 'String':\n      {\n        return '';\n      }\n    case 'Integer':\n      {\n        return 0;\n      }\n    case 'Boolean':\n      {\n        return false;\n      }\n    default:\n      {\n        return '';\n      }\n  }\n}\nvar getDefaultValue = function getDefaultValue(Default, Enum, DataType) {\n  var _Enum$;\n  if (!lodash__WEBPACK_IMPORTED_MODULE_8___default().isUndefined(Default)) {\n    return Default;\n  } else if (!lodash__WEBPACK_IMPORTED_MODULE_8___default().isUndefined(Enum === null || Enum === void 0 || (_Enum$ = Enum[0]) === null || _Enum$ === void 0 ? void 0 : _Enum$.Value)) {\n    return Enum[0].Value;\n  } else {\n    return defaultValue(DataType);\n  }\n};\nvar getMetaDetail = function getMetaDetail(meta, type) {\n  var dataTemplate = {};\n  for (var index = 0; index < meta.Categories.length; index++) {\n    var _context;\n    var elements = meta.Categories[index];\n    var controlData = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_2___default()(_context = elements.Controls).call(_context, function (control) {\n      return control.Id === type;\n    });\n    if (controlData) {\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dataTemplate, controlData);\n    }\n  }\n  return dataTemplate;\n};\nvar getMetaDetailMemo = lodash__WEBPACK_IMPORTED_MODULE_8___default().memoize(getMetaDetail, function (meta, type) {\n  return _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_3___default()({\n    meta: meta,\n    type: type\n  });\n});\nvar getPropertyDefaultValue = function getPropertyDefaultValue(property) {\n  var data = {};\n  var nodes = property.Nodes;\n  if (nodes) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(nodes).call(nodes, function (innerProperty) {\n      var escapeProperty = lodash__WEBPACK_IMPORTED_MODULE_8___default().camelCase(innerProperty.Id);\n      var editor = innerProperty.Editor;\n      if (!editor) {\n        data[escapeProperty] = 'not editor property: err';\n      } else {\n        var DataType = editor.DataType,\n          Default = editor.Default,\n          Min = editor.Min,\n          Enum = editor.Enum;\n        data[escapeProperty] = getDefaultValue(Default, Enum, DataType);\n      }\n    });\n  } else {\n    var editor = property.Editor;\n    var DataType = editor.DataType,\n      Default = editor.Default,\n      Min = editor.Min,\n      Enum = editor.Enum;\n    var escapeProperty = lodash__WEBPACK_IMPORTED_MODULE_8___default().camelCase(property.Id);\n    if (!editor) {\n      data[escapeProperty] = 'not editor property: err';\n    } else {\n      data[escapeProperty] = getDefaultValue(Default, Enum, DataType);\n    }\n  }\n  return data;\n};\nvar getPropertyDefaultValueMemo = lodash__WEBPACK_IMPORTED_MODULE_8___default().memoize(getPropertyDefaultValue);\n// let timer: any = null\nvar previousTimerAddKeys = [];\n// const nextTickClearAddKeys = (timer: any, previousTimerAddKeys: Array<string>) => {\n//   if (timer) {\n//     clearTimeout(timer)\n//   } else {\n//     timer = setTimeout(() => {\n//       previousTimerAddKeys.length = 0\n//     })\n//   }\n// }\n\nvar ClearPreviousAddKeys = function ClearPreviousAddKeys() {\n  previousTimerAddKeys.length = 0;\n};\nvar createUniqueKey = function createUniqueKey(transferDataKey, type) {\n  var appendData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n  // nextTickClearAddKeys(timer, previousTimerAddKeys)\n  var allKeySet = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_5___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(appendData).call(appendData, function (data) {\n    return data.key;\n  }));\n  // previousTimerAddKeys.forEach(key => allKeySet.add(key))\n  var idx = 0;\n  var key = transferDataKey && !allKeySet.has(transferDataKey) ? transferDataKey : type;\n  while (allKeySet.has(key)) {\n    var _context2;\n    key = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7___default()(_context2 = \"\".concat(type)).call(_context2, ++idx);\n  }\n  previousTimerAddKeys.push(key);\n  return key;\n};\n// TODO: 将套打层的抽出来做传入参数,不影响通用层设计器数据构建过程\n// TODO: 功能单一解耦\nfunction createControlDataOrModel(meta) {\n  var isGetModalData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  return function (_ref) {\n    var _context3;\n    var type = _ref.type,\n      parentId = _ref.parentId,\n      transferData = _ref.transferData;\n    // 这里需要注意都是浅拷贝，可能有问题\n    var itemData = {};\n    var dataTemplate = {};\n    if (isGetModalData && transferData) {\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dataTemplate, transferData);\n    } else {\n      var value = getMetaDetailMemo(meta, type);\n      if (value) {\n        (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(dataTemplate, value);\n      }\n    }\n    if (isGetModalData) {\n      // 这里应该遵循模型的命名习惯比较好\n      return dataTemplate;\n    }\n    if (parentId) {\n      itemData.parentId = parentId;\n    }\n    // 提取方法\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(_context3 = dataTemplate.Properties).call(_context3, function (property) {\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(itemData, getPropertyDefaultValueMemo(property));\n    });\n    // id 应该交由哪边管理\n    // TODO: 加个config\n    itemData.id = createUUid();\n    itemData.name = dataTemplate.Name;\n    itemData.type = dataTemplate.Id;\n    if (!isGetModalData && transferData) {\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(itemData, transferData);\n    }\n    return itemData;\n  };\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/createData.ts?");

/***/ }),

/***/ 32064:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   createDataSourceNodeKey: function() { return /* binding */ createDataSourceNodeKey; },\n/* harmony export */   filterKeyValueByNotUndefined: function() { return /* binding */ filterKeyValueByNotUndefined; },\n/* harmony export */   geGridDataSource: function() { return /* binding */ geGridDataSource; },\n/* harmony export */   getDataSourceNodeBy: function() { return /* binding */ getDataSourceNodeBy; },\n/* harmony export */   getDsTypeByDataSource: function() { return /* binding */ getDsTypeByDataSource; },\n/* harmony export */   getFieldKeysByNode: function() { return /* binding */ getFieldKeysByNode; },\n/* harmony export */   isBindField: function() { return /* binding */ isBindField; },\n/* harmony export */   isBindFieldMode: function() { return /* binding */ isBindFieldMode; },\n/* harmony export */   queryDataSourceAndAncestorByKey: function() { return /* binding */ queryDataSourceAndAncestorByKey; },\n/* harmony export */   queryDataSourceAndAncestorByName: function() { return /* binding */ queryDataSourceAndAncestorByName; },\n/* harmony export */   queryDataSourceNodeByKey: function() { return /* binding */ queryDataSourceNodeByKey; },\n/* harmony export */   specialHandle: function() { return /* binding */ specialHandle; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n\n/**\n *\n * @param key 选中节点的key\n * @param items 所有数据源信息\n * @param ancestorKey 数据源key，连接的是IsDs为true的节点\n * @param ancestorTitle 连接之前的title\n * @param fieldKey 数据字段key，连接的是IsDs为false的节点\n * @param parentIsDs 父节点的IsDs\n */\n\n// 判断字段上绑定的数据源是否存在\nvar queryDataSourceAndAncestorByKey = function queryDataSourceAndAncestorByKey(key) {\n  var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  var ancestorTitle = arguments.length > 2 ? arguments[2] : undefined;\n  for (var i = 0; i < items.length; i++) {\n    var ele = items[i];\n    var isReportEntryGroup = ele.isReportEntryGroup,\n      Key = ele.Key,\n      Name = ele.Name,\n      ViewName = ele.ViewName,\n      Items = ele.Items,\n      IsDs = ele.IsDs,\n      IgnoreZero = ele.IgnoreZero,\n      IgnoreTailZero = ele.IgnoreTailZero,\n      dataSourceKey = ele.dataSource,\n      currentFieldKey = ele.bindField,\n      dsTypeKey = ele.dsTypeKey,\n      dataSourceText = ele.dataSourceText;\n    var title = \"\".concat(ancestorTitle ? ancestorTitle + '.' + Name : Name);\n    // const title = isReportEntryGroup ? ancestorTitle : `${ancestorTitle ? ancestorTitle + '.' + Name : Name}`\n    // 这里不能简单一个key判断, 因为现在平铺下来，key会重复\n    if (key === createDataSourceNodeKey(dataSourceKey, currentFieldKey)) {\n      return {\n        // dataSource: ancestorKey,\n        dataSource: dataSourceKey,\n        ancestorTitle: title,\n        dataSourceText: dataSourceText,\n        key: currentFieldKey,\n        dsType: dsTypeKey,\n        title: ViewName || Name,\n        // 基础资料，后端拼接了父节点的名称\n        IgnoreZero: IgnoreZero,\n        IgnoreTailZero: IgnoreTailZero\n      };\n    }\n    var res = queryDataSourceAndAncestorByKey(key, Items || [], title);\n    if (res) {\n      return res;\n    }\n  }\n};\nvar createDataSourceNodeKey = function createDataSourceNodeKey(dataSourceKey, currentFieldKey) {\n  var _context, _context2;\n  var dataSourceNodeKey = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context2 = \"\".concat(dataSourceKey || '')).call(_context2, dataSourceKey && currentFieldKey && '-')).call(_context, currentFieldKey || '');\n  if (isReportEntryDataSource(dataSourceNodeKey)) {\n    var _context3;\n    var dataSourceNodeKeyArr = dataSourceNodeKey.split('.');\n    var bindFieldKey = '';\n    var newDataSourceNodeKeyArr = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(dataSourceNodeKeyArr).call(dataSourceNodeKeyArr, function (newDataSourceNodeKeyArr, dataSourceKey, i) {\n      if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_3___default()(dataSourceKey).call(dataSourceKey, '-') !== -1 && isReportEntryDataSource(dataSourceKey)) {\n        var _context4;\n        bindFieldKey = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(dataSourceNodeKeyArr).call(dataSourceNodeKeyArr, function (key, j) {\n          return !isReportEntryDataSource(key) && j > i;\n        });\n        newDataSourceNodeKeyArr.push(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_0___default()(_context4 = \"\".concat(dataSourceKey.split('-')[0], \"-\")).call(_context4, bindFieldKey));\n      } else if (!isReportEntryDataSource(dataSourceKey)) {\n        newDataSourceNodeKeyArr.push(dataSourceKey);\n      }\n      return newDataSourceNodeKeyArr;\n    }, [])).call(_context3, function (key) {\n      return key !== bindFieldKey;\n    });\n    dataSourceNodeKey = newDataSourceNodeKeyArr.join('.');\n  }\n  return dataSourceNodeKey;\n};\nvar isReportEntryDataSource = function isReportEntryDataSource(key) {\n  return typeof key === 'string' && _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_3___default()(key).call(key, 'reportEntryGroup') !== -1;\n};\n\n/**\n *\n * @param name 输入的字符串\n * @param items 所有数据源信息\n * @param ancestorKey 数据源key，连接的是IsDs为true的节点\n * @param ancestorTitle 连接之前的title\n * @param fieldKey 数据字段key，连接的是IsDs为false的节点\n * @param parentIsDs 父节点的IsDs\n */\nvar queryDataSourceAndAncestorByName = function queryDataSourceAndAncestorByName(name) {\n  var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  var innerName = name;\n  for (var i = 0; i < items.length; i++) {\n    var ele = items[i];\n    var Key = ele.Key,\n      Name = ele.Name,\n      Items = ele.Items,\n      IsDs = ele.IsDs,\n      dataSource = ele.dataSource,\n      bindField = ele.bindField,\n      dsTypeKey = ele.dsTypeKey,\n      dataSourceText = ele.dataSourceText,\n      ViewName = ele.ViewName;\n    var nameWithSeperator = Name;\n    if (_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_3___default()(innerName).call(innerName, nameWithSeperator) !== 0) continue;\n    // 这里仍会存在相同名称，不同数量节点时优先取迭代到的第一个\n    var replaceName = innerName.replace(Name, '');\n    // 防止最后只匹配字符前缀的情况, eg: innerName: 时间日期 Name: 时间\n    if (replaceName !== '') {\n      // 下一个连接节点\n      if (replaceName[0] !== '.') {\n        continue;\n      } else {\n        innerName = replaceName.substring(1);\n      }\n    } else {\n      innerName = '';\n    }\n    // 这里应该不会重复, 后端说不带点\n    if (innerName === '') {\n      // 这里通过是否有Items还是IsDs为true来判断？还是两者都要\n      // if (!Items || !IsDs)\n      if (!Items) {\n        return {\n          // dataSource: ancestorKey,\n          dsType: dsTypeKey,\n          dataSource: dataSource,\n          viewText: ViewName || Name,\n          key: bindField,\n          dataSourceText: dataSourceText\n          // key: currentFieldKey\n        };\n      } else {\n        return null;\n      }\n    }\n    var res = queryDataSourceAndAncestorByName(innerName, Items);\n    if (res) {\n      return res;\n    }\n  }\n};\nvar isBindFieldMode = function isBindFieldMode(val) {\n  if (!val) {\n    return {\n      isBindField: false,\n      bindField: val\n    };\n  }\n  var isBindField = /^\\=\\$.?/g.test(val);\n  return {\n    isBindField: isBindField,\n    bindField: isBindField ? val.replace(/^\\=\\$/, '') : val\n  };\n};\nvar isBindField = function isBindField(val) {\n  return val ? /^\\=\\$.?/g.test(val) : false;\n};\nvar filterKeyValueByNotUndefined = function filterKeyValueByNotUndefined(obj) {\n  var _context5, _context6;\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_1___default()(_context6 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default()(obj)).call(_context6, function (key) {\n    return key !== 'undefined';\n  })).call(_context5, function (res, key) {\n    res[key] = obj[key];\n    return res;\n  }, {});\n};\nvar queryDataSourceNodeByKey = function queryDataSourceNodeByKey(key) {\n  var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n  for (var i = 0; i < items.length; i++) {\n    var ele = items[i];\n    var Key = ele.Key,\n      Name = ele.Name,\n      Items = ele.Items,\n      IsDs = ele.IsDs,\n      dataSourceKey = ele.dataSource,\n      currentFieldKey = ele.bindField;\n    // 这里不能简单一个key判断, 因为现在平铺下来，key会重复\n    if (key === createDataSourceNodeKey(dataSourceKey, currentFieldKey)) {\n      return ele;\n    }\n    var res = queryDataSourceNodeByKey(key, Items || []);\n    if (res) {\n      return res;\n    }\n  }\n};\nvar specialHandle = function specialHandle(_ref, Items) {\n  var type = _ref.type,\n    key = _ref.key;\n  var res = queryDataSourceAndAncestorByKey(key, Items);\n  if (res) {\n    var ancestorTitle = res.ancestorTitle,\n      _key = res.key,\n      dataSource = res.dataSource,\n      dataSourceText = res.dataSourceText,\n      title = res.title,\n      dsType = res.dsType,\n      IgnoreZero = res.IgnoreZero,\n      IgnoreTailZero = res.IgnoreTailZero;\n    return type === 'Text' ? {\n      bindText: \"=$\".concat(ancestorTitle),\n      bindField: _key,\n      dataSource: dataSource,\n      dataSourceText: dataSourceText,\n      dsType: dsType,\n      title: title,\n      ignoreZero: IgnoreZero,\n      ignoreTailZero: IgnoreTailZero\n    } : {\n      bindText: \"=$\".concat(ancestorTitle),\n      bindField: _key,\n      dataSource: dataSource,\n      dsType: dsType,\n      title: title,\n      ignoreZero: IgnoreZero,\n      ignoreTailZero: IgnoreTailZero\n    };\n  }\n  return {};\n};\nvar getDataSourceNodeBy = function getDataSourceNodeBy() {\n  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  var callback = arguments.length > 1 ? arguments[1] : undefined;\n  for (var i = 0; i < items.length; i++) {\n    var item = items[i];\n    if (callback(item)) {\n      return item;\n    }\n    var Items = item.Items;\n    var res = getDataSourceNodeBy(Items, callback);\n    if (res) return res;\n  }\n};\nvar getFieldKeysByNode = function getFieldKeysByNode(node) {\n  var keys = [];\n  var getKey = function getKey(item, arr) {\n    var key = item.key,\n      Items = item.Items,\n      IsField = item.IsField,\n      dataSourceKey = item.dataSource,\n      currentFieldKey = item.bindField;\n    key = key || createDataSourceNodeKey(dataSourceKey, currentFieldKey);\n    if (IsField || !(Items && Items.length)) {\n      arr.push(key);\n    }\n    Items && _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_6___default()(Items).call(Items, function (i) {\n      return getKey(i, arr);\n    });\n  };\n  getKey(node, keys);\n  return keys;\n};\nvar geGridDataSource = function geGridDataSource(dataContext, id, type) {\n  var data = dataContext.findControl(id) || {};\n  var commonControl = ['Text', 'Barcode', 'QRCode', 'Image'];\n  var parentData = dataContext.findControl(data.parentId) || {};\n  if (data !== null && data !== void 0 && data.parentId && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_7___default()(commonControl).call(commonControl, data.type)) {\n    var rootData = dataContext.findControl(parentData.parentId) || {};\n    if (rootData.type === type) {\n      return rootData.dataSource;\n    }\n  } else if (parentData.type === type) {\n    return parentData.dataSource;\n  }\n};\nvar getDsTypeByDataSource = function getDsTypeByDataSource(dataSource) {\n  var DsType;\n  return function filterFunc(definition) {\n    _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_8___default()(definition).call(definition, function (def) {\n      var isFind = def.dataSource === dataSource;\n      DsType = isFind && def.DsType;\n      return isFind || def.Items && filterFunc(def.Items);\n    });\n    return DsType;\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/dataSource.ts?");

/***/ }),

/***/ 89160:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nfunction dealPosition(itemData, parentItem, parentId, positionRecords) {\n  var _context4;\n  var position = [itemData.x, itemData.y].join('-');\n  var DISTANCE = 5;\n  var excludeTypes = ['DataCell', 'LayoutCell', 'DataRow', 'DataColumn', 'Header'];\n  while ((_positionRecords$pare = positionRecords[parentId]) !== null && _positionRecords$pare !== void 0 && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(_positionRecords$pare).call(_positionRecords$pare, position) && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(excludeTypes).call(excludeTypes, itemData.type)) {\n    var _positionRecords$pare, _positionRecords$pare2, _context, _context2;\n    if (!((_positionRecords$pare2 = positionRecords[parentId]) !== null && _positionRecords$pare2 !== void 0 && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(_positionRecords$pare2).call(_positionRecords$pare2, position))) {\n      break;\n    }\n    position = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(_context = position.split('-')).call(_context, function (pos) {\n      return +pos + DISTANCE;\n    }).join('-');\n    // 这里如果是复制的话，不走这样的逻辑\n    var _position$split$map = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = position.split('-')).call(_context2, function (n) {\n        return +n;\n      }),\n      _position$split$map2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_position$split$map, 2),\n      _xPos = _position$split$map2[0],\n      _yPos = _position$split$map2[1];\n    // 这里需要算parent, 传进来? && parentId !== rootId?\n    // TODO: 传的话就里面干净，外面肮脏，不传就反过来\n    // 这里父子是相对关系，不用加上父的xy\n    if (parentItem && parentId) {\n      var _context3;\n      var dealX = _xPos;\n      var dealY = _yPos;\n      var isDealX = false;\n      var isDealY = false;\n      if (_xPos + itemData.width > parentItem.width) {\n        isDealX = true;\n        dealX = Math.max(parentItem.width - itemData.width, 0);\n      }\n      if (_yPos + itemData.height > parentItem.height) {\n        isDealY = true;\n        dealY = Math.max(parentItem.height - itemData.height, 0);\n      }\n      position = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context3 = \"\".concat(dealX, \"-\")).call(_context3, dealY);\n      // 防止死循环\n      if (isDealX && isDealY) {\n        break;\n      }\n    }\n  }\n  var _position$split$map3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_2___default()(_context4 = position.split('-')).call(_context4, function (n) {\n      return +n;\n    }),\n    _position$split$map4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_position$split$map3, 2),\n    xPos = _position$split$map4[0],\n    yPos = _position$split$map4[1];\n  itemData.x = xPos;\n  itemData.y = yPos;\n  // fix: 复制粘贴的控件会留在原地\n  // 复制多次时，例如五个控件（连续偏移的）复制粘贴\n  positionRecords[parentId] = positionRecords[parentId] || [];\n  positionRecords[parentId].push([itemData.x, itemData.y].join('-'));\n  return itemData;\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (dealPosition);\n\n//# sourceURL=webpack://print-designer/./src/utils/dealPosition.ts?");

/***/ }),

/***/ 34564:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ filterTreeDataByOption; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_8__);\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_1___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_2___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_2___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_4___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_6___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_7___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_6___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_5___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_8___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_4___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\nfunction filterTreeDataByOption(definition, DataSourceOption) {\n  if (!DataSourceOption) return definition;\n  var ShowType = DataSourceOption.ShowType,\n    DsType = DataSourceOption.DsType,\n    FieldType = DataSourceOption.FieldType;\n  var hideDsType = DsType.Hide,\n    onlyShowDsType = DsType.OnlyShow;\n  var hideField = FieldType.Hide,\n    onlyShowField = FieldType.OnlyShow;\n  if ((hideDsType === null || hideDsType === void 0 ? void 0 : hideDsType.length) > 0) {\n    definition = filterTreeDataByHideDsType(definition, hideDsType);\n  }\n  if ((onlyShowField === null || onlyShowField === void 0 ? void 0 : onlyShowField.length) > 0) {\n    definition = filterTreeDataByOnlyShowField(definition, onlyShowField);\n  }\n  return definition;\n}\nfunction filterTreeDataByOnlyShowField(definition, onlyShowFieldType) {\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n    var _def = def,\n      Items = _def.Items,\n      Type = _def.Type;\n    var isShow = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(onlyShowFieldType).call(onlyShowFieldType, Type);\n    if (!isShow && Items) def = _objectSpread(_objectSpread({}, def), {}, {\n      Items: filterTreeDataByOnlyShowField(Items, onlyShowFieldType)\n    });\n    if (isShow || def.Items && def.Items.length) {\n      filteredData.push(def);\n    }\n    return filteredData;\n  }, []);\n}\nfunction filterTreeDataByHideDsType(definition, hideDsType) {\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n    var Items = def.Items,\n      DsType = def.DsType;\n    var isHideDsType = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_10___default()(hideDsType).call(hideDsType, DsType);\n    if (!isHideDsType) {\n      Items ? filteredData.push(_objectSpread(_objectSpread({}, def), {}, {\n        Items: filterTreeDataByHideDsType(Items, hideDsType)\n      })) : filteredData.push(def);\n    }\n    return filteredData;\n  }, []);\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/filterDataSource.ts?");

/***/ }),

/***/ 68116:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   filterEditorProperty: function() { return /* binding */ filterEditorProperty; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__);\n\nvar hiddenEditorIds = ['FontName', 'FontSize', 'Bold', 'Italic', 'UnderLine', 'ForeColor', 'BackColor', 'HorAlignment', 'Border', 'BorderType', 'VerAlignment', 'Padding', 'Strike', 'LineSpace'];\nvar filterEditorProperty = function filterEditorProperty(field, propMeta) {\n  var Id = propMeta.Id;\n  return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default()(hiddenEditorIds).call(hiddenEditorIds, Id);\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/filterEditorProperty.ts?");

/***/ }),

/***/ 97332:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   getCellSize: function() { return /* binding */ getCellSize; },\n/* harmony export */   getValue: function() { return /* binding */ getValue; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98092);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21980);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41232);\n\n\n\n\n\n\n\nvar calcCellSize = function calcCellSize(dataContext, cells, propName) {\n  var map = {};\n  var value = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_0___default()(cells).call(cells, function (res, cell) {\n    var rowId = cell.rowId,\n      columnId = cell.columnId;\n    var itemId = propName === 'height' ? rowId : columnId;\n    if (!map[itemId]) {\n      // if(propName === 'height') {\n      //   // 这里拿cell, row都行\n      // } else {\n\n      // }\n      map[itemId] = true;\n      return (0,_utils_index__WEBPACK_IMPORTED_MODULE_6__.toRoundFix)(res + dataContext.findControl(itemId)[propName === 'height' ? _constants__WEBPACK_IMPORTED_MODULE_4__.ROW_HEIGHT : _constants__WEBPACK_IMPORTED_MODULE_4__.COLUMN_WIDTH], _constants__WEBPACK_IMPORTED_MODULE_4__.PRECISION);\n    }\n    map[itemId] = true;\n    return (0,_utils_index__WEBPACK_IMPORTED_MODULE_6__.toRoundFix)(res, _constants__WEBPACK_IMPORTED_MODULE_4__.PRECISION);\n  }, 0);\n  return value;\n};\nvar getValue = function getValue(_ref) {\n  var isMultiSelected = _ref.isMultiSelected,\n    field = _ref.field,\n    dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    propName = _ref.propName;\n  var id = field.id,\n    parentId = field.parentId,\n    rowId = field.rowId,\n    columnId = field.columnId;\n  // 写在这里不是很好\n  // 写在编辑器item里？\n  // 这里做不到，下次进来应该显示什么呢\n  // 通过判断\n  var selection = selectionContext.getSelection();\n  if (isMultiSelected) {\n    var controls = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(selection).call(selection, function (id) {\n      return dataContext.findControl(id);\n    });\n    var cells = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(controls).call(controls, _grid__WEBPACK_IMPORTED_MODULE_5__.isGridRelativeControl);\n    if (cells.length === controls.length && (propName === 'width' || propName === 'height')) {\n      var propList = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(cells).call(cells, function (cell) {\n        return getCellSize({\n          dataContext: dataContext,\n          field: cell\n        })[propName];\n      });\n      var propSet = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default())(propList);\n      if (propSet.size === 1) return propList[0];\n      return '';\n    }\n    if (new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(controls).call(controls, function (field) {\n      return field[propName];\n    })).size === 1) return field[propName];\n    return '';\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_5__.isGridRelativeControl)(field) && (propName === 'width' || propName === 'height')) {\n    var _dataContext$findCont, _dataContext$findCont2, _dataContext$findCont3, _dataContext$findCont4;\n    var gridData = dataContext.findControl(parentId);\n    if (gridData.mergeConfig) {\n      var _cells = (0,_grid__WEBPACK_IMPORTED_MODULE_5__.getMergeRegion)({\n        items: dataContext.getData().items,\n        gridData: gridData,\n        rowId: rowId,\n        columnId: columnId\n      });\n      if (_cells.length) {\n        return calcCellSize(dataContext, _cells, propName);\n      }\n    }\n    return propName === 'width' ? (_dataContext$findCont = (_dataContext$findCont2 = dataContext.findControl(columnId)) === null || _dataContext$findCont2 === void 0 ? void 0 : _dataContext$findCont2.columnWidth) !== null && _dataContext$findCont !== void 0 ? _dataContext$findCont : '' : (_dataContext$findCont3 = (_dataContext$findCont4 = dataContext.findControl(rowId)) === null || _dataContext$findCont4 === void 0 ? void 0 : _dataContext$findCont4.rowHeight) !== null && _dataContext$findCont3 !== void 0 ? _dataContext$findCont3 : ''; // TOTEST:测试无法复现怎么导致的空指针\n  }\n  return field[propName];\n};\nvar getCellSize = function getCellSize(_ref2) {\n  var field = _ref2.field,\n    dataContext = _ref2.dataContext;\n  var id = field.id,\n    parentId = field.parentId,\n    rowId = field.rowId,\n    columnId = field.columnId;\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_5__.isGridRelativeControl)(field)) {\n    var gridData = dataContext.findControl(parentId);\n    if (gridData.mergeConfig) {\n      var cells = (0,_grid__WEBPACK_IMPORTED_MODULE_5__.getMergeRegion)({\n        items: dataContext.getData().items,\n        gridData: gridData,\n        rowId: rowId,\n        columnId: columnId\n      });\n      if (cells.length) {\n        var width = calcCellSize(dataContext, cells, 'width');\n        var height = calcCellSize(dataContext, cells, 'height');\n        return {\n          width: width,\n          height: height\n        };\n      } else {\n        var row = dataContext.findControl(rowId);\n        var column = dataContext.findControl(columnId);\n        return {\n          width: column.columnWidth,\n          height: row.rowHeight\n        };\n      }\n    }\n    // return propName === 'width' ? dataContext.findControl(columnId).columnWidth : dataContext.findControl(rowId).rowHeight\n  }\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/getValue.ts?");

/***/ }),

/***/ 21980:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   borderHandle: function() { return /* binding */ borderHandle; },\n/* harmony export */   calcEvenlySplit: function() { return /* binding */ calcEvenlySplit; },\n/* harmony export */   calcGridItemSize: function() { return /* binding */ calcGridItemSize; },\n/* harmony export */   changeItemsBorder: function() { return /* binding */ changeItemsBorder; },\n/* harmony export */   changeItemsBorderByMergeConfig: function() { return /* binding */ changeItemsBorderByMergeConfig; },\n/* harmony export */   collectExpectProp: function() { return /* binding */ collectExpectProp; },\n/* harmony export */   countLength: function() { return /* reexport safe */ _gridUtil__WEBPACK_IMPORTED_MODULE_28__.countLength; },\n/* harmony export */   createGetCellIdx: function() { return /* reexport safe */ _gridUtil__WEBPACK_IMPORTED_MODULE_28__.createGetCellIdx; },\n/* harmony export */   filterGroupProperties: function() { return /* binding */ filterGroupProperties; },\n/* harmony export */   getCellIdx: function() { return /* binding */ getCellIdx; },\n/* harmony export */   getCellPosition: function() { return /* reexport safe */ _gridUtil__WEBPACK_IMPORTED_MODULE_28__.getCellPosition; },\n/* harmony export */   getCollectProps: function() { return /* reexport safe */ _gridUtil__WEBPACK_IMPORTED_MODULE_28__.getCollectProps; },\n/* harmony export */   getControlSize: function() { return /* binding */ getControlSize; },\n/* harmony export */   getGridItems: function() { return /* binding */ getGridItems; },\n/* harmony export */   getGridTitleContent: function() { return /* binding */ getGridTitleContent; },\n/* harmony export */   getMergeRegion: function() { return /* binding */ getMergeRegion; },\n/* harmony export */   getNextMaxColumnNum: function() { return /* binding */ getNextMaxColumnNum; },\n/* harmony export */   getNextMinColumnNum: function() { return /* binding */ getNextMinColumnNum; },\n/* harmony export */   getPaperSize: function() { return /* binding */ getPaperSize; },\n/* harmony export */   getRowData: function() { return /* reexport safe */ _gridUtil__WEBPACK_IMPORTED_MODULE_28__.getRowData; },\n/* harmony export */   getSelectionIsDataRow: function() { return /* binding */ getSelectionIsDataRow; },\n/* harmony export */   handleGridBorder: function() { return /* binding */ handleGridBorder; },\n/* harmony export */   handleGridBorderByType: function() { return /* binding */ handleGridBorderByType; },\n/* harmony export */   handleGridBorderColor: function() { return /* binding */ handleGridBorderColor; },\n/* harmony export */   handleGridBorderStyle: function() { return /* binding */ handleGridBorderStyle; },\n/* harmony export */   handleGridBorderWidth: function() { return /* binding */ handleGridBorderWidth; },\n/* harmony export */   handleGridOutBorder: function() { return /* binding */ handleGridOutBorder; },\n/* harmony export */   handleNewGridBorder: function() { return /* binding */ handleNewGridBorder; },\n/* harmony export */   hasMergeCell: function() { return /* binding */ hasMergeCell; },\n/* harmony export */   isCardGrid: function() { return /* binding */ isCardGrid; },\n/* harmony export */   isDataCell: function() { return /* binding */ isDataCell; },\n/* harmony export */   isDataGrid: function() { return /* binding */ isDataGrid; },\n/* harmony export */   isDetailCell: function() { return /* binding */ isDetailCell; },\n/* harmony export */   isDetailRow: function() { return /* binding */ isDetailRow; },\n/* harmony export */   isGridColumn: function() { return /* binding */ isGridColumn; },\n/* harmony export */   isGridDataRow: function() { return /* binding */ isGridDataRow; },\n/* harmony export */   isGridFooter: function() { return /* binding */ isGridFooter; },\n/* harmony export */   isGridRelativeControl: function() { return /* binding */ isGridRelativeControl; },\n/* harmony export */   isGridRow: function() { return /* binding */ isGridRow; },\n/* harmony export */   isGridType: function() { return /* binding */ isGridType; },\n/* harmony export */   isGroupRow: function() { return /* binding */ isGroupRow; },\n/* harmony export */   isLayoutCell: function() { return /* binding */ isLayoutCell; },\n/* harmony export */   isLayoutGrid: function() { return /* binding */ isLayoutGrid; },\n/* harmony export */   isRichText: function() { return /* binding */ isRichText; },\n/* harmony export */   isSubDataGrid: function() { return /* binding */ isSubDataGrid; },\n/* harmony export */   isSubGridRelativeControl: function() { return /* binding */ isSubGridRelativeControl; },\n/* harmony export */   mergeChanges: function() { return /* binding */ mergeChanges; },\n/* harmony export */   mergeGridBoundaryBorder: function() { return /* binding */ mergeGridBoundaryBorder; },\n/* harmony export */   mergeGridItemsBorder: function() { return /* binding */ mergeGridItemsBorder; },\n/* harmony export */   setBorderData: function() { return /* binding */ setBorderData; },\n/* harmony export */   setControlBorderData: function() { return /* binding */ setControlBorderData; },\n/* harmony export */   setControlBorderDataCore: function() { return /* binding */ setControlBorderDataCore; },\n/* harmony export */   setGridControlBorderData: function() { return /* binding */ setGridControlBorderData; },\n/* harmony export */   specialchangeItemsBorder: function() { return /* binding */ specialchangeItemsBorder; },\n/* harmony export */   updateGridItemsBorder: function() { return /* binding */ updateGridItemsBorder; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(1508);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(98092);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(41232);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _gridUtil__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(90932);\n/* harmony import */ var _getValue__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(97332);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context38, _context39; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context38 = ownKeys(Object(t), !0)).call(_context38, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context39 = ownKeys(Object(t))).call(_context39, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction handleBorderData(val, cb) {\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n    var callbackRes = cb && cb(res, prop);\n    if (callbackRes) {\n      return res;\n    }\n    res[prop] = val;\n    return res;\n  }, {});\n}\nvar setGridControlBorderData = function setGridControlBorderData(borderData, borderType) {\n  var data = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(borderData);\n  var currentBorderWidth = data.width.top || data.width.left || data.width.right || data.width.bottom || data.width.inner || +_constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL;\n  var currentBorderColor = data.color.top || data.color.left || data.color.right || data.color.bottom || data.color.inner;\n  var currentBorderStyle = data.style.top || data.style.left || data.style.right || data.style.bottom || data.style.inner;\n  switch (borderType) {\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER:\n      {\n        data.width.inner = 0;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER:\n      {\n        var setterWidth = currentBorderWidth;\n        var setterColor = currentBorderColor;\n        var setterStyle = currentBorderStyle;\n        data.style.inner = setterStyle;\n        data.color.inner = setterColor;\n        data.width.inner = setterWidth;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER:\n    default:\n      {\n        var _setterWidth = currentBorderWidth;\n        var _setterColor = currentBorderColor;\n        var _setterStyle = currentBorderStyle;\n        data.style = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(data.style, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterStyle;\n          return res;\n        }, {}));\n        data.width = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(data.width, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterWidth;\n          return res;\n        }, {}));\n        data.color = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(data.color, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterColor;\n          return res;\n        }, {}));\n        break;\n      }\n  }\n  return data;\n};\nvar setControlBorderData = function setControlBorderData(borderData, color, type, line) {\n  var _context, _context2;\n  var width = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context = ['dashed', 'dotted']).call(_context, line) ? 0.5 : type === _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_BLOD ? 2 : line;\n  var style = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = ['dashed', 'dotted']).call(_context2, line) ? line : 'solid';\n  return setControlBorderDataCore(borderData, type, color, width, style);\n};\nvar setControlBorderDataCore = function setControlBorderDataCore(borderData, type, color, width, style) {\n  var data = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(borderData);\n  switch (type) {\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER:\n      {\n        data.width.left = 0;\n        data.width.right = 0;\n        data.width.top = 0;\n        data.width.bottom = 0;\n        data.width.inner = 0;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER:\n      {\n        data.width.left = width;\n        data.color.left = color;\n        data.style.left = style;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER:\n      {\n        data.width.right = width;\n        data.color.right = color;\n        data.style.right = style;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER:\n      {\n        data.color.top = color;\n        data.width.top = width;\n        data.style.top = style;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER:\n      {\n        data.color.bottom = color;\n        data.width.bottom = width;\n        data.style.bottom = style;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER:\n      data.color.inner = color;\n      data.width.inner = width;\n      data.style.inner = style;\n      break;\n    // 所有边框 粗外边框 外边框\n    default:\n      {\n        data.width = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n          if (prop !== 'inner' || type === _constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER) {\n            res[prop] = width;\n          }\n          return res;\n        }, {});\n        data.color = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n          if (prop !== 'inner' || type === _constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER) {\n            res[prop] = color;\n          }\n          return res;\n        }, {});\n        data.style = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n          if (prop !== 'inner' || type === _constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER) {\n            res[prop] = style;\n          }\n          return res;\n        }, {});\n        break;\n      }\n  }\n  return data;\n};\nvar setBorderData = function setBorderData(borderData, borderType, borderWidth, borderColor, borderStyle, isGridControl, noInitWidth) {\n  var data = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(borderData);\n  if (borderWidth && !noInitWidth) {\n    data.width = handleBorderData(borderWidth || +_constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL, function (res, prop) {\n      if (!data.width[prop]) {\n        res[prop] = data.width[prop];\n        return true;\n      }\n    });\n    // return data\n  }\n  if (borderColor) {\n    data.color = handleBorderData(borderColor);\n    // return data\n  }\n  if (borderStyle) {\n    data.style = handleBorderData(borderStyle);\n  }\n  if (!borderType) return data;\n  // 这里由于都是同一值，只取top\n  // 这里有可能没有值，得加上边框宽\n  var currentBorderWidth = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(borderWidth) ? borderWidth : data.width.top || data.width.left || data.width.right || data.width.bottom || data.width.inner || +_constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL;\n  var currentBorderStyle = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(borderStyle) ? borderStyle : data.style.top || data.style.left || data.style.right || data.style.bottom || data.style.inner;\n  var currentBorderColor = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(borderColor) ? borderColor : data.color.top || data.color.left || data.color.right || data.color.bottom || data.color.inner;\n  switch (borderType) {\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER:\n      {\n        if (isGridControl) {\n          data.width.left = 0;\n          data.width.right = 0;\n          data.width.top = 0;\n          data.width.bottom = 0;\n          if (data.width.inner === undefined) {\n            data.width.inner = 0;\n          }\n        } else {\n          data.width = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n            res[prop] = 0;\n            return res;\n          }, {});\n        }\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER:\n      {\n        var setterWidth = currentBorderWidth;\n        var setterColor = currentBorderColor;\n        var setterStyle = currentBorderStyle;\n        data.width.left = setterWidth;\n        data.color.left = setterColor;\n        data.style.left = setterStyle;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER:\n      {\n        var _setterWidth2 = currentBorderWidth;\n        var _setterColor2 = currentBorderColor;\n        var _setterStyle2 = currentBorderStyle;\n        data.color.right = _setterColor2;\n        data.width.right = _setterWidth2;\n        data.style.right = _setterStyle2;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER:\n      {\n        var _setterWidth3 = currentBorderWidth;\n        var _setterColor3 = currentBorderColor;\n        var _setterStyle3 = currentBorderStyle;\n        data.color.top = _setterColor3;\n        data.width.top = _setterWidth3;\n        data.style.top = _setterStyle3;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER:\n      {\n        var _setterWidth4 = currentBorderWidth;\n        var _setterColor4 = currentBorderColor;\n        var _setterStyle4 = currentBorderStyle;\n        data.color.bottom = _setterColor4;\n        data.width.bottom = _setterWidth4;\n        data.style.bottom = _setterStyle4;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER:\n      {\n        // TODO\n        var _setterWidth5 = currentBorderWidth;\n        var _setterColor5 = currentBorderColor;\n        var _setterStyle5 = currentBorderStyle;\n        data.width = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterWidth5;\n          return res;\n        }, {});\n        data.color = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterColor5;\n          return res;\n        }, {});\n        data.style = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterStyle5;\n          return res;\n        }, {});\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER:\n      {\n        var _setterWidth6 = currentBorderWidth;\n        var _setterColor6 = currentBorderColor;\n        var _setterStyle6 = currentBorderStyle;\n        data.color.inner = _setterColor6;\n        data.width.inner = _setterWidth6;\n        data.style.inner = _setterStyle6;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER:\n    default:\n      {\n        var _setterWidth7 = currentBorderWidth;\n        var _setterColor7 = currentBorderColor;\n        var _setterStyle7 = currentBorderStyle;\n        data.width = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(data.width, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterWidth7;\n          return res;\n        }, {}));\n        data.color = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(data.color, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterColor7;\n          return res;\n        }, {}));\n        data.style = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(data.style, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_PROPS, function (res, prop) {\n          res[prop] = _setterStyle7;\n          return res;\n        }, {}));\n        break;\n      }\n  }\n  return data;\n};\nvar setNoneBorderData = function setNoneBorderData(borderData, borderType) {\n  var data = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(borderData);\n  var noneBorderWidth = 0;\n  if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default()(borderType)) {\n    return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(borderType).call(borderType, function (newBorder, type) {\n      return setNoneBorderData(newBorder, type);\n    }, data);\n  }\n  switch (borderType) {\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER:\n      {\n        data.width.left = noneBorderWidth;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER:\n      {\n        data.width.right = noneBorderWidth;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER:\n      {\n        data.width.top = noneBorderWidth;\n        break;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER:\n      {\n        data.width.bottom = noneBorderWidth;\n        break;\n      }\n    default:\n      {\n        return data;\n      }\n  }\n  return data;\n};\nvar isGridRelativeControl = function isGridRelativeControl(selectItem) {\n  return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_RELATIVE_TYPES).call(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_RELATIVE_TYPES, selectItem === null || selectItem === void 0 ? void 0 : selectItem.type);\n};\nvar isSubGridRelativeControl = function isSubGridRelativeControl(selectItem) {\n  return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.SUB_GRID_RELATIVE_TYPES).call(_constants__WEBPACK_IMPORTED_MODULE_24__.SUB_GRID_RELATIVE_TYPES, selectItem === null || selectItem === void 0 ? void 0 : selectItem.type);\n};\nvar isGridType = function isGridType(selectItem) {\n  return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_TYPES).call(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_TYPES, selectItem === null || selectItem === void 0 ? void 0 : selectItem.type);\n};\nvar isDataGrid = function isDataGrid(selectItem) {\n  return selectItem.type === 'DataGrid';\n};\nvar isRichText = function isRichText(selectItem) {\n  return selectItem.type === 'RichText';\n};\nvar isSubDataGrid = function isSubDataGrid(selectItem) {\n  return (selectItem === null || selectItem === void 0 ? void 0 : selectItem.type) === _constants__WEBPACK_IMPORTED_MODULE_24__.SUB_GRID_TYPE;\n};\nvar isCardGrid = function isCardGrid(selectItem) {\n  return selectItem.type === 'CardGrid';\n};\nvar getPaperSize = function getPaperSize(dataContext) {\n  var paper = dataContext.findControl(dataContext.getRootId());\n  var width = paper.width - paper.marginLeft - paper.marginRight;\n  var height = paper.height - paper.marginTop - paper.marginBottom;\n  return {\n    x: 0,\n    y: 0,\n    width: width,\n    height: height,\n    left: 0,\n    top: 0,\n    right: width,\n    bottom: height\n  };\n};\nvar getControlSize = function getControlSize(dataContext, id) {\n  var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n    _ref$x = _ref.x,\n    addX = _ref$x === void 0 ? 0 : _ref$x,\n    _ref$y = _ref.y,\n    addY = _ref$y === void 0 ? 0 : _ref$y;\n  var control = dataContext.findControl(id);\n  var width = control.width,\n    height = control.height,\n    x = control.x,\n    y = control.y;\n  x += addX;\n  y += addY;\n  return {\n    x: x,\n    y: y,\n    width: width,\n    height: height,\n    left: x,\n    top: y,\n    right: x + width,\n    bottom: y + height\n  };\n};\nvar isGridRow = function isGridRow(selectItem) {\n  return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_ROW_TYPES).call(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_ROW_TYPES, selectItem.type);\n};\nvar isGridDataRow = function isGridDataRow(row) {\n  return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_DETAIL && row.type === 'DataRow';\n};\nvar isGridColumn = function isGridColumn(selectItem) {\n  return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_COLUMN_TYPES).call(_constants__WEBPACK_IMPORTED_MODULE_24__.GRID_COLUMN_TYPES, selectItem.type);\n};\nvar isDetailRow = function isDetailRow(row) {\n  return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_DETAIL;\n};\nvar isDetailCell = function isDetailCell(selectItem) {\n  if (!selectItem) return false;\n  var type = selectItem.type,\n    cellType = selectItem.cellType;\n  return type === 'DataCell' && cellType === 'Detail';\n};\nvar isGroupRow = function isGroupRow(row) {\n  return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_GROUP;\n};\nvar isLayoutCell = function isLayoutCell(selectItem) {\n  if (!selectItem) return false;\n  var type = selectItem.type;\n  return type === 'LayoutCell';\n};\nvar isGridFooter = function isGridFooter(selectItem) {\n  return selectItem.type === 'TableTail';\n};\nvar isDataCell = function isDataCell(selectItem) {\n  if (!selectItem) return false;\n  var type = selectItem.type;\n  return type === 'DataCell';\n};\nvar isLayoutGrid = function isLayoutGrid(selectItem) {\n  if (!selectItem) return false;\n  var type = selectItem.type;\n  return type === 'LayoutGrid' || type === 'CardGrid';\n};\nvar getGridItems = function getGridItems(dataContext, gridId) {\n  var _dataContext$getData = dataContext.getData(),\n    allItems = _dataContext$getData.items;\n  return {\n    items: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(allItems).call(allItems, function (item) {\n      return item.parentId === gridId;\n    }),\n    gridData: _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(allItems).call(allItems, function (item) {\n      return item.id === gridId;\n    }),\n    allItems: allItems\n  };\n};\nvar collectExpectProp = function collectExpectProp(obj, propArr) {\n  var renamePropArr = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(propArr).call(propArr, function (res, key, idx) {\n    if (renamePropArr[idx] || key) {\n      res[renamePropArr[idx] || key] = obj[key];\n    }\n    return res;\n  }, {});\n};\n// 增量覆盖\n// 是否需要增量更新？\nvar mergeChanges = function mergeChanges(changes) {\n  var _context3;\n  var changeMap = {};\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(changes).call(changes, function (_ref2) {\n    var _ref3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref2, 2),\n      id = _ref3[0],\n      change = _ref3[1];\n    // id唯一不需要顺序\n    changeMap[id] = changeMap[id] || [];\n    changeMap[id].push(change);\n  });\n  // 还是需要顺序\n  var handleChangeMap = {};\n  return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(changes).call(changes, function (_ref4) {\n    var _context4;\n    var _ref5 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_ref4, 2),\n      id = _ref5[0],\n      change = _ref5[1];\n    if (handleChangeMap[id]) return;\n    handleChangeMap[id] = true;\n    return [id, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_context4 = changeMap[id]).call(_context4, function (res, change) {\n      // 在这里最后处理下\n      return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(res, (0,_index__WEBPACK_IMPORTED_MODULE_25__.getCalcPosObj)(change));\n    }, {})];\n  })).call(_context3, Boolean);\n};\nvar calcGridItemSize = function calcGridItemSize(_ref6) {\n  var _context5, _context6, _context7, _context8, _context9, _context10;\n  var x = _ref6.x,\n    y = _ref6.y,\n    realWidth = _ref6.width,\n    realHeight = _ref6.height,\n    id = _ref6.id,\n    rows = _ref6.rows,\n    columns = _ref6.columns,\n    dataContext = _ref6.dataContext;\n  var _$cloneDeep = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(dataContext.getData()),\n    allItems = _$cloneDeep.items;\n  // 改表格\n  var gridData = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(allItems).call(allItems, function (item) {\n    return item.id === id;\n  });\n  var backupGridWidth = gridData.width;\n  var backupGridHeight = gridData.height;\n  var fixedRowAtPage = gridData.fixedRowAtPage,\n    templateRowCount = gridData.fixedRowCount;\n  // 不更改表格坐标\n  gridData.x = x === undefined ? gridData.x : x;\n  gridData.y = y === undefined ? gridData.y : y;\n  gridData.width = realWidth;\n  gridData.height = realHeight;\n  // 改行\n  var actualHeight = realHeight;\n  var rowIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(rows).call(rows, function (row) {\n    return row.id;\n  });\n  var columnIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(columns).call(columns, function (column) {\n    return column.id;\n  });\n  var newRows = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(allItems).call(allItems, function (item) {\n    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(rowIds).call(rowIds, item.id);\n  });\n  // 这里应该用newRows而不是rows\n  var detailRow = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(newRows).call(newRows, function (row) {\n    return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_DETAIL;\n  });\n  var newColumns = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(allItems).call(allItems, function (item) {\n    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(columnIds).call(columnIds, item.id);\n  });\n  var rowHeights = putRemainderLast(calcEvenlySplit(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(newRows).call(newRows, function (row) {\n    return row.rowHeight;\n  })).call(_context5, fixedRowAtPage && templateRowCount > 1 ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(_context6 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_18___default()(_context7 = new Array(templateRowCount - 1)).call(_context7, 0)).call(_context6, function () {\n    return detailRow.rowHeight;\n  }) : []), actualHeight), realHeight);\n  var columnWidths = putRemainderLast(calcEvenlySplit(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(newColumns).call(newColumns, function (column) {\n    return column.columnWidth;\n  }), realWidth), realWidth);\n  // 没有改变\n  // fix: 【H1质量加固测试】【新需求】【新打印】布局网格选中的蓝色边框线与网格的实际边框线没有重合\n  // 没有改变也就意味着输入有问题(精度丢失),需要返回原宽高\n  if (lodash__WEBPACK_IMPORTED_MODULE_26___default().isEqual(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_19___default()(rowHeights).call(rowHeights, 0, newRows.length), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(newRows).call(newRows, function (row) {\n    return row.rowHeight;\n  })) && lodash__WEBPACK_IMPORTED_MODULE_26___default().isEqual(columnWidths, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(newColumns).call(newColumns, function (column) {\n    return column.columnWidth;\n  }))) return [[id, {\n    width: backupGridWidth,\n    height: backupGridHeight\n  }]];\n  var currentRows = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(newRows).call(newRows, function (row, idx) {\n    row.rowHeight = rowHeights[idx];\n    return row;\n  });\n  var currentColumns = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(newColumns).call(newColumns, function (row, idx) {\n    row.columnWidth = columnWidths[idx];\n    return row;\n  });\n  var newItems = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context8 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(allItems).call(allItems, function (item) {\n    var itemId = item.id,\n      itemRowId = item.rowId,\n      itemColumnId = item.columnId;\n    if (itemId === gridData.id) return [gridData.id, collectExpectProp(gridData, [_constants__WEBPACK_IMPORTED_MODULE_24__.X, _constants__WEBPACK_IMPORTED_MODULE_24__.Y, _constants__WEBPACK_IMPORTED_MODULE_24__.HEIGHT, _constants__WEBPACK_IMPORTED_MODULE_24__.WIDTH])];\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(rowIds).call(rowIds, itemId)) return [itemId, collectExpectProp(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(currentRows).call(currentRows, function (row) {\n      return row.id === itemId;\n    }), [_constants__WEBPACK_IMPORTED_MODULE_24__.ROW_HEIGHT])];\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(columnIds).call(columnIds, itemId)) return [itemId, collectExpectProp(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(currentColumns).call(currentColumns, function (column) {\n      return column.id === itemId;\n    }), [_constants__WEBPACK_IMPORTED_MODULE_24__.COLUMN_WIDTH])];\n    // 一般有一个即可\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(rowIds).call(rowIds, itemRowId) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(columnIds).call(columnIds, itemColumnId)) {\n      return [itemId, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, collectExpectProp(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(currentRows).call(currentRows, function (row) {\n        return row.id === itemRowId;\n      }), [_constants__WEBPACK_IMPORTED_MODULE_24__.ROW_HEIGHT], [_constants__WEBPACK_IMPORTED_MODULE_24__.HEIGHT]), collectExpectProp(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(currentColumns).call(currentColumns, function (column) {\n        return column.id === itemColumnId;\n      }), [_constants__WEBPACK_IMPORTED_MODULE_24__.COLUMN_WIDTH], [_constants__WEBPACK_IMPORTED_MODULE_24__.WIDTH]))];\n    }\n    return null;\n  })).call(_context8, Boolean);\n  var newItemChilds = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context9 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(allItems).call(allItems, function (item) {\n    var itemId = item.id,\n      itemRowId = item.rowId,\n      itemColumnId = item.columnId,\n      parentId = item.parentId;\n    var parentControl = parentId ? dataContext.findControl(parentId) : null;\n    if (parentControl && isLayoutCell(parentControl)) {\n      var parentRowId = parentControl.rowId,\n        parentColumnId = parentControl.columnId;\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(rowIds).call(rowIds, parentRowId) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(columnIds).call(columnIds, parentColumnId)) {\n        var otherUpdates = {};\n        var _getCellSize = (0,_getValue__WEBPACK_IMPORTED_MODULE_29__.getCellSize)({\n            field: parentControl,\n            dataContext: dataContext\n          }),\n          width = _getCellSize.width,\n          height = _getCellSize.height;\n        var cellChildControls = dataContext.findControlByCondition(function (item) {\n          return item.parentId === parentId;\n        });\n        if (cellChildControls.length === 1) {\n          (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(otherUpdates, {\n            width: width,\n            height: height\n          });\n        }\n        return [itemId, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, collectExpectProp(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(currentRows).call(currentRows, function (row) {\n          return row.id === parentRowId;\n        }), [_constants__WEBPACK_IMPORTED_MODULE_24__.ROW_HEIGHT], [_constants__WEBPACK_IMPORTED_MODULE_24__.HEIGHT]), collectExpectProp(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(currentColumns).call(currentColumns, function (column) {\n          return column.id === parentColumnId;\n        }), [_constants__WEBPACK_IMPORTED_MODULE_24__.COLUMN_WIDTH], [_constants__WEBPACK_IMPORTED_MODULE_24__.WIDTH]), otherUpdates)];\n      }\n    } else {\n      return null;\n    }\n  })).call(_context9, Boolean);\n  return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context10 = []).call(_context10, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(newItems), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(newItemChilds));\n};\nvar getCellRealPos = function getCellRealPos(cell) {\n  var mergeConfig = cell.mergeConfig,\n    row = cell.row,\n    column = cell.column;\n  var rightRowIdx = row;\n  var bottomCellIdx = column;\n  if (mergeConfig) {\n    var rowLength = mergeConfig.rowLength,\n      columnLength = mergeConfig.columnLength;\n    rightRowIdx += rowLength - 1;\n    bottomCellIdx += columnLength - 1;\n  }\n  if (rightRowIdx === row) rightRowIdx = null;\n  if (bottomCellIdx === column) bottomCellIdx = null;\n  return {\n    realRowIdx: row,\n    realCellIdx: column,\n    rightRowIdx: rightRowIdx,\n    bottomCellIdx: bottomCellIdx\n  };\n};\nvar handleSingleCellBorder = function handleSingleCellBorder(_ref7) {\n  var _context11, _context12;\n  var rowIdx = _ref7.rowIdx,\n    cellIdx = _ref7.cellIdx,\n    cell = _ref7.cell,\n    cells = _ref7.cells,\n    borderConfig = _ref7.borderConfig,\n    handleBorderTypes = _ref7.handleBorderTypes,\n    columnLength = _ref7.columnLength;\n  var _getCellRealPos = getCellRealPos(cell),\n    realCellIdx = _getCellRealPos.realCellIdx,\n    bottomCellIdx = _getCellRealPos.bottomCellIdx;\n  var borderColor = borderConfig.borderColor,\n    borderStyle = borderConfig.borderStyle,\n    borderWidth = borderConfig.borderWidth;\n  // [[LEFT_BORDER, TOP_BORDER], [TOP_BORDER], [RIGHT_BORDER, TOP_BORDER]]\n  var _handleBorderTypes = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(handleBorderTypes, 3),\n    headChange = _handleBorderTypes[0],\n    middleChange = _handleBorderTypes[1],\n    tailChange = _handleBorderTypes[2];\n  if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context11 = [realCellIdx, bottomCellIdx]).call(_context11, 0)) {\n    cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(headChange).call(headChange, function (res, type) {\n      return setBorderData(res, type, borderWidth, borderColor, borderStyle, false, true);\n    }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n  }\n  if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context12 = [realCellIdx, bottomCellIdx]).call(_context12, columnLength - 1)) {\n    cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(tailChange).call(tailChange, function (res, type) {\n      return setBorderData(res, type, borderWidth, borderColor, borderStyle, false, true);\n    }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n  }\n  if (realCellIdx !== 0 || bottomCellIdx !== columnLength - 1 || (0,lodash__WEBPACK_IMPORTED_MODULE_26__.isNumber)(bottomCellIdx) && bottomCellIdx !== columnLength - 1) {\n    cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(middleChange).call(middleChange, function (res, type) {\n      return setBorderData(res, type, borderWidth, borderColor, borderStyle, false, true);\n    }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n  }\n};\nvar handleNewGridBorder = function handleNewGridBorder(color, type, line, rowData, gridConfig) {\n  var _context13, _context14;\n  if (!rowData.length) return null;\n  var rc = gridConfig.rc,\n    cc = gridConfig.cc;\n  var width = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context13 = ['dashed', 'dotted']).call(_context13, line) ? 0.5 : type === _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_BLOD ? 2 : line;\n  var style = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context14 = ['dashed', 'dotted']).call(_context14, line) ? line : 'solid';\n  var isOutBorder = type === _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER || type === _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER_BLOD;\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref8) {\n    var cells = _ref8.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n      var row = cell.row,\n        column = cell.column,\n        mergeConfig = cell.mergeConfig;\n      var _ref9 = mergeConfig || {},\n        mergeCC = _ref9.columnLength,\n        merageC = _ref9.columnStart,\n        mergeRC = _ref9.rowLength,\n        mergeR = _ref9.rowStart;\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER || isOutBorder) {\n        if (column === 0) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.left = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.left = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.left = style;\n        }\n      }\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER || isOutBorder) {\n        if (column === cc - 1 || mergeCC + merageC === cc) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.right = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.right = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.right = style;\n        }\n      }\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER || isOutBorder) {\n        if (row === 0) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.top = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.top = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.top = style;\n        }\n      }\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER || isOutBorder) {\n        if (row === rc - 1 || mergeRC + mergeR === rc) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.bottom = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.bottom = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.bottom = style;\n        }\n      }\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER) {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS).call(_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER_PROPS, function (key) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width[key] = 0;\n        });\n      }\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.left = width;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.left = color;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.left = style;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.top = width;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.top = color;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.top = style;\n        if (row === rc - 1 || mergeRC + mergeR === rc) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.bottom = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.bottom = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.bottom = style;\n        }\n        if (column === cc - 1 || mergeCC + merageC === cc) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.right = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.right = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.right = style;\n        }\n      }\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER) {\n        if (column !== 0) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.left = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.left = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.left = style;\n        }\n        if (row !== 0) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.top = width;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.top = color;\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.top = style;\n        }\n      }\n    });\n  });\n  return rowData;\n};\nvar handleGridOutBorder = function handleGridOutBorder(rowData, border, gridConfig) {\n  var rc = gridConfig.rc,\n    cc = gridConfig.cc;\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref10) {\n    var cells = _ref10.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n      var row = cell.row,\n        column = cell.column,\n        mergeConfig = cell.mergeConfig;\n      var _ref11 = mergeConfig || {},\n        mergeCC = _ref11.columnLength,\n        merageC = _ref11.columnStart,\n        mergeRC = _ref11.rowLength,\n        mergeR = _ref11.rowStart;\n      if (column === 0) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.left = border.width.left;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.left = border.color.left;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.left = border.style.left;\n      }\n      if (column === cc - 1 || mergeCC + merageC === cc) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.right = border.width.right;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.right = border.color.right;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.right = border.style.right;\n      }\n      if (row === 0) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.top = border.width.top;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.top = border.color.top;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.top = border.style.top;\n      }\n      if (row === rc - 1 || mergeRC + mergeR === rc) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].width.bottom = border.width.bottom;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].color.bottom = border.color.bottom;\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER].style.bottom = border.style.bottom;\n      }\n    });\n  });\n  return rowData;\n};\n// TODO:\n// 优化时间复杂度，尤其是单边的\n// 可以正/反向遍历，处理就退出\n\n// TODO: INNER_BORDER + TOP + ... 可以考虑一次处理\nvar handleGridBorder = function handleGridBorder(type, rowData, borderConfig, gridConfig) {\n  var filterTypes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n  if (rowData.length === 0) {\n    return null;\n  }\n  if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default()(type)) {\n    // 先置空,再操作\n    // 这里可以会有可能设置同样的情况,前一步先判断\n    return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(type).call(type, function (res, borderType) {\n      return handleGridBorder(borderType, res, borderConfig, gridConfig, filterTypes);\n    }, rowData);\n  }\n  var borderColor = borderConfig.borderColor,\n    borderStyle = borderConfig.borderStyle,\n    borderWidth = borderConfig.borderWidth;\n  var rowLength = gridConfig.rowLength,\n    columnLength = gridConfig.columnLength;\n  // 动态修改\n  switch (type) {\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER:\n      {\n        // 单行单个,左上右, 非单个则非尾列左上,尾列左上右\n        // 单行单个 尾行 全,非单个则非尾列左上下,尾列 全\n        // if(rowData.length === 1) {\n        //   rowData[0].cells.forEach((cell, idx, arr) => {\n        //     // `\n        //     if(idx === arr.length - 1) {\n\n        //     }\n        //   })\n        // }\n        // o(mn)\n        // 出于合并单元格的存在\n        // rowArr cellArr rowIdx cellIdx 不可信，因为有合并单元格，\n        // rowIdx cellIdx 不可信但是有用\n        // 先全盘考虑，不行再区分mergeConfig\n        // 合并单元格的需求思路：\n        // 都需要有一个来标识表格的，另一边位置，也即两个新位置变量\n        // 1. 根据mergeConfig 算 原位置 （需要计算）\n        // 2. 根据已有的算新的\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref12, rowIdx, rowArr) {\n          var cells = _ref12.cells;\n          // let previousMergeRowLength = 0\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell, cellIdx, cellArr) {\n            var _context15;\n            // let previousMergeColumnLength = 0\n            // const realRowIdx = rowIdx + previousMergeRowLength\n            var _getCellRealPos2 = getCellRealPos(cell),\n              realRowIdx = _getCellRealPos2.realRowIdx,\n              realCellIdx = _getCellRealPos2.realCellIdx,\n              rightRowIdx = _getCellRealPos2.rightRowIdx,\n              bottomCellIdx = _getCellRealPos2.bottomCellIdx;\n            // 这里可以维护一个变量记录边框处理位置，下次可以不用再次进入\n            if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context15 = [realRowIdx, rightRowIdx]).call(_context15, rowLength - 1)) {\n              var _context16;\n              if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context16 = [realCellIdx, bottomCellIdx]).call(_context16, columnLength - 1)) {\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER, borderWidth, borderColor, borderStyle);\n              } else {\n                var _context17;\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setNoneBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER);\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_context17 = [_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER]).call(_context17, function (res, type) {\n                  return setBorderData(res, type, borderWidth, borderColor, borderStyle);\n                }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n              }\n            } else {\n              var _context18;\n              if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context18 = [realCellIdx, bottomCellIdx]).call(_context18, columnLength - 1)) {\n                var _context19;\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setNoneBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER);\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_context19 = [_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER]).call(_context19, function (res, type) {\n                  return setBorderData(res, type, borderWidth, borderColor, borderStyle);\n                }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n              } else {\n                var _context20;\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setNoneBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], [_constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER]);\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_context20 = [_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER]).call(_context20, function (res, type) {\n                  return setBorderData(res, type, borderWidth, borderColor, borderStyle);\n                }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n              }\n            }\n          });\n        });\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER:\n      {\n        for (var rowIdx = 0; rowIdx < rowData.length; rowIdx++) {\n          var cells = rowData[rowIdx].cells;\n          for (var cellIdx = 0; cellIdx < cells.length; cellIdx++) {\n            var _context21, _context22;\n            var _cell = cells[cellIdx];\n            var _getCellRealPos3 = getCellRealPos(_cell),\n              realRowIdx = _getCellRealPos3.realRowIdx,\n              realCellIdx = _getCellRealPos3.realCellIdx,\n              rightRowIdx = _getCellRealPos3.rightRowIdx,\n              bottomCellIdx = _getCellRealPos3.bottomCellIdx;\n            if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context21 = [realRowIdx, rightRowIdx]).call(_context21, 0)) {\n              handleSingleCellBorder({\n                rowIdx: rowIdx,\n                cellIdx: cellIdx,\n                cell: _cell,\n                cells: cells,\n                borderConfig: borderConfig,\n                handleBorderTypes: [[_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER], [_constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER], [_constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER]],\n                columnLength: columnLength\n              });\n            }\n            // 不能用else if\n            if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context22 = [realRowIdx, rightRowIdx]).call(_context22, rowLength - 1)) {\n              handleSingleCellBorder({\n                rowIdx: rowIdx,\n                cellIdx: cellIdx,\n                cell: _cell,\n                cells: cells,\n                borderConfig: borderConfig,\n                handleBorderTypes: [[_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER], [_constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER], [_constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER]],\n                columnLength: columnLength\n              });\n            }\n            if (realRowIdx !== 0 || realRowIdx !== rowLength - 1 || (0,lodash__WEBPACK_IMPORTED_MODULE_26__.isNumber)(rightRowIdx) && rightRowIdx !== rowLength - 1) {\n              handleSingleCellBorder({\n                rowIdx: rowIdx,\n                cellIdx: cellIdx,\n                cell: _cell,\n                cells: cells,\n                borderConfig: borderConfig,\n                handleBorderTypes: [[_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER], [], [_constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER]],\n                columnLength: columnLength\n              });\n            }\n          }\n        }\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER:\n      {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref13, rowIdx, rowArr) {\n          var cells = _ref13.cells;\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell, cellIdx, cellArr) {\n            cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER, borderWidth, borderColor, borderStyle, true);\n          });\n        });\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER:\n      {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref14, rowIdx, rowArr) {\n          var cells = _ref14.cells;\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell, cellIdx, cellArr) {\n            var _getCellRealPos4 = getCellRealPos(cell),\n              realRowIdx = _getCellRealPos4.realRowIdx,\n              realCellIdx = _getCellRealPos4.realCellIdx,\n              rightRowIdx = _getCellRealPos4.rightRowIdx,\n              bottomCellIdx = _getCellRealPos4.bottomCellIdx;\n            if (realCellIdx === 0 || rightRowIdx === 0) {\n              cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, borderWidth, borderColor, borderStyle);\n            }\n          });\n        });\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER:\n      {\n        var _cells = rowData[0].cells;\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_cells).call(_cells, function (cell) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER, borderWidth, borderColor, borderStyle);\n        });\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER:\n      {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref15, rowIdx, rowArr) {\n          var cells = _ref15.cells;\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n            var _context23;\n            var _getCellRealPos5 = getCellRealPos(cell),\n              realRowIdx = _getCellRealPos5.realRowIdx,\n              realCellIdx = _getCellRealPos5.realCellIdx,\n              rightRowIdx = _getCellRealPos5.rightRowIdx,\n              bottomCellIdx = _getCellRealPos5.bottomCellIdx;\n            if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context23 = [realCellIdx, bottomCellIdx]).call(_context23, columnLength - 1)) {\n              cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER, borderWidth, borderColor, borderStyle);\n            }\n          });\n        });\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER:\n      {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref16, rowIdx, rowArr) {\n          var cells = _ref16.cells;\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n            var _context24;\n            var _getCellRealPos6 = getCellRealPos(cell),\n              realRowIdx = _getCellRealPos6.realRowIdx,\n              realCellIdx = _getCellRealPos6.realCellIdx,\n              rightRowIdx = _getCellRealPos6.rightRowIdx,\n              bottomCellIdx = _getCellRealPos6.bottomCellIdx;\n            if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context24 = [realRowIdx, rightRowIdx]).call(_context24, rowLength - 1)) {\n              cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER, borderWidth, borderColor, borderStyle);\n            }\n          });\n        });\n        return rowData;\n      }\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER:\n      {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref17, rowIdx, rowArr) {\n          var cells = _ref17.cells;\n          // let previousMergeRowLength = 0\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell, cellIdx, cellArr) {\n            var _context25;\n            // let previousMergeColumnLength = 0\n            // const realRowIdx = rowIdx + previousMergeRowLength\n            var _getCellRealPos7 = getCellRealPos(cell),\n              realRowIdx = _getCellRealPos7.realRowIdx,\n              realCellIdx = _getCellRealPos7.realCellIdx,\n              rightRowIdx = _getCellRealPos7.rightRowIdx,\n              bottomCellIdx = _getCellRealPos7.bottomCellIdx;\n            // 这里可以维护一个变量记录边框处理位置，下次可以不用再次进入\n            if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context25 = [realRowIdx, rightRowIdx]).call(_context25, 0)) {\n              var _context26;\n              if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context26 = [realCellIdx, bottomCellIdx]).call(_context26, 0)) {\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, borderWidth, borderColor, borderStyle);\n              }\n            } else {\n              var _context27;\n              if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context27 = [realCellIdx, bottomCellIdx]).call(_context27, 0)) {\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER, borderWidth, borderColor, borderStyle);\n              } else {\n                var _context28;\n                cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(_context28 = [_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER]).call(_context28, function (res, type) {\n                  return setBorderData(res, type, borderWidth, borderColor, borderStyle);\n                }, cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER]);\n              }\n            }\n            // if ([realRowIdx, rightRowIdx].includes(rowLength - 1)) {\n            //   if ([realCellIdx, bottomCellIdx].includes(0)) {\n            //     cell[BORDER] = setBorderData(cell[BORDER], TOP_BORDER, borderWidth, borderColor)\n            //   } else {\n            //     cell[BORDER] = [LEFT_BORDER, TOP_BORDER].reduce((res, type) => {\n            //       return setBorderData(res, type, borderWidth, borderColor)\n            //     }, cell[BORDER])\n            //   }\n            // } else {\n            //   if ([realCellIdx, bottomCellIdx].includes(columnLength - 1)) {\n            //     cell[BORDER] = setNoneBorderData(cell[BORDER], BOTTOM_BORDER)\n            //     cell[BORDER] = [LEFT_BORDER, TOP_BORDER, RIGHT_BORDER].reduce((res, type) => {\n            //       return setBorderData(res, type, borderWidth, borderColor)\n            //     }, cell[BORDER])\n            //   } else {\n            //     cell[BORDER] = setNoneBorderData(cell[BORDER], [BOTTOM_BORDER, RIGHT_BORDER])\n            //     cell[BORDER] = [LEFT_BORDER, TOP_BORDER].reduce((res, type) => {\n            //       return setBorderData(res, type, borderWidth, borderColor)\n            //     }, cell[BORDER])\n            //   }\n            // }\n            // 底线置空\n            // if (!filterTypes.includes(BOTTOM_BORDER)) {\n            //   if ([realRowIdx, rightRowIdx].includes(rowLength - 1)) {\n            //     cell[BORDER] = setNoneBorderData(cell[BORDER], BOTTOM_BORDER)\n            //   }\n            // }\n            // if (!filterTypes.includes(RIGHT_BORDER)) {\n            //   // 右线置空\n            //   if ([realCellIdx, bottomCellIdx].includes(columnLength - 1)) {\n            //     cell[BORDER] = setNoneBorderData(cell[BORDER], RIGHT_BORDER)\n            //   }\n            // }\n            // if (!filterTypes.includes(TOP_BORDER)) {\n            //   // 上线置空\n            //   if (rowIdx === 0) {\n            //     cell[BORDER] = setNoneBorderData(cell[BORDER], TOP_BORDER)\n            //   }\n            // }\n            // if (!filterTypes.includes(LEFT_BORDER)) {\n            //   // 左线置空\n            //   if (realCellIdx === 0 || rightRowIdx === 0) {\n            //     cell[BORDER] = setNoneBorderData(cell[BORDER], LEFT_BORDER)\n            //   }\n            // }\n          });\n        });\n        return rowData;\n      }\n    default:\n      {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.console.error('unreachable action error');\n        break;\n      }\n  }\n};\nvar mergeGridItemsBorder = function mergeGridItemsBorder(borderType, originGridItems, rowData, rowLength, columnLength) {\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref18, rowIdx, rowArr) {\n    var cells = _ref18.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell, cellIdx, cellArr) {\n      var _context29;\n      var _getCellRealPos8 = getCellRealPos(cell),\n        realRowIdx = _getCellRealPos8.realRowIdx,\n        realCellIdx = _getCellRealPos8.realCellIdx,\n        rightRowIdx = _getCellRealPos8.rightRowIdx,\n        bottomCellIdx = _getCellRealPos8.bottomCellIdx;\n      var oldCell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(originGridItems).call(originGridItems, function (i) {\n        return i.id === cell.id;\n      });\n      // 这里可以维护一个变量记录边框处理位置，下次可以不用再次进入\n      if (oldCell) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = oldCell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER];\n      }\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context29 = [realRowIdx, rightRowIdx]).call(_context29, rowLength - 1)) {\n        var _context30;\n        if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context30 = [realCellIdx, bottomCellIdx]).call(_context30, columnLength - 1)) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setNoneBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER);\n        }\n      } else {\n        var _context31;\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context31 = [realCellIdx, bottomCellIdx]).call(_context31, columnLength - 1)) {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setNoneBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER);\n        } else {\n          cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setNoneBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], [_constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER, _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER]);\n        }\n      }\n    });\n  });\n  return rowData;\n};\nvar mergeGridBoundaryBorder = function mergeGridBoundaryBorder(borderType, originGridItems, rowData, rowLength, columnLength) {\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref19, rowIdx, rowArr) {\n    var cells = _ref19.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell, cellIdx, cellArr) {\n      var _context32, _context33;\n      var _getCellRealPos9 = getCellRealPos(cell),\n        realRowIdx = _getCellRealPos9.realRowIdx,\n        realCellIdx = _getCellRealPos9.realCellIdx,\n        rightRowIdx = _getCellRealPos9.rightRowIdx,\n        bottomCellIdx = _getCellRealPos9.bottomCellIdx;\n      var oldCell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(originGridItems).call(originGridItems, function (i) {\n        return i.id === cell.id;\n      });\n      // 这里可以维护一个变量记录边框处理位置，下次可以不用再次进入\n      if (oldCell) {\n        cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = oldCell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER];\n      }\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context32 = [realRowIdx, rightRowIdx]).call(_context32, rowLength - 1)) {\n        var oldLastRow = lodash__WEBPACK_IMPORTED_MODULE_26___default().findLast(originGridItems, function (i) {\n          return i.type === 'DataRow';\n        });\n        if (oldLastRow && oldLastRow.id !== cell.rowId) {\n          var _border$width;\n          var nextRowCell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(originGridItems).call(originGridItems, function (i) {\n            return i.rowId === oldLastRow.id && i.columnId === cell.columnId;\n          });\n          var border = nextRowCell.border;\n          if (border !== null && border !== void 0 && (_border$width = border.width) !== null && _border$width !== void 0 && _border$width.bottom) {\n            var borderColor = borderHandle(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER])[1];\n            var borderStyle = borderHandle(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER])[2];\n            var borderWidth = borderHandle(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER])[3];\n            cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER, borderWidth, borderColor, borderStyle);\n          }\n        }\n      }\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_context33 = [realCellIdx, bottomCellIdx]).call(_context33, columnLength - 1)) {\n        var oldLastColumn = lodash__WEBPACK_IMPORTED_MODULE_26___default().findLast(originGridItems, function (i) {\n          return i.type === 'DataColumn';\n        });\n        if (oldLastColumn && oldLastColumn.id !== cell.columnId) {\n          var _border$width2;\n          var _nextRowCell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(originGridItems).call(originGridItems, function (i) {\n            return i.columnId === oldLastColumn.id && i.rowId === cell.rowId;\n          });\n          var _border = _nextRowCell.border;\n          if (_border !== null && _border !== void 0 && (_border$width2 = _border.width) !== null && _border$width2 !== void 0 && _border$width2.right) {\n            var _borderColor = borderHandle(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER])[1];\n            var _borderStyle = borderHandle(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER])[2];\n            var _borderWidth = borderHandle(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER])[3];\n            cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER, _borderWidth, _borderColor, _borderStyle);\n          }\n        }\n      }\n    });\n  });\n  return rowData;\n};\nvar handleGridBorderColor = function handleGridBorderColor(borderConfig, rowData) {\n  var borderColor = borderHandle(borderConfig)[1];\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref20) {\n    var cells = _ref20.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n      cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], undefined, undefined, borderColor, undefined);\n    });\n  });\n  return rowData;\n};\nvar handleGridBorderWidth = function handleGridBorderWidth(borderConfig, rowData) {\n  var borderWidth = borderHandle(borderConfig)[3];\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref21) {\n    var cells = _ref21.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n      cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], undefined, borderWidth, undefined, 'solid'); // 这里都是实线\n    });\n  });\n  return rowData;\n};\nvar handleGridBorderStyle = function handleGridBorderStyle(borderConfig, rowData) {\n  var borderStyle = borderHandle(borderConfig)[2];\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (_ref22) {\n    var cells = _ref22.cells;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n      cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER] = setBorderData(cell[_constants__WEBPACK_IMPORTED_MODULE_24__.BORDER], undefined, undefined, undefined, borderStyle);\n    });\n  });\n  return rowData;\n};\n// 性能点 30 * 30: 160+ms\n// 动态数据修改\nvar changeItemsBorder = function changeItemsBorder(gridData, gridItems) {\n  var isChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var cloneItemData = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(gridData);\n  // 这里还是需要去变更\n  var gridBorderType = cloneItemData.borderType,\n    border = cloneItemData.border,\n    _cloneItemData$mergeC = cloneItemData.mergeConfig,\n    mergeConfig = _cloneItemData$mergeC === void 0 ? {} : _cloneItemData$mergeC;\n  var getterFn = isChange ? function (val) {\n    return val;\n  } : (lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep);\n  var realGridItems = getterFn(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(gridItems).call(gridItems, function (item) {\n    return item.parentId === gridData.id;\n  }));\n  var _getCollectProps = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getCollectProps)(realGridItems),\n    columns = _getCollectProps.columns,\n    rows = _getCollectProps.rows,\n    cells = _getCollectProps.cells;\n  var _getRowData = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getRowData)(_objectSpread(_objectSpread({\n      columns: columns,\n      rows: rows,\n      cells: cells\n    }, cloneItemData), {}, {\n      mergeConfig: mergeConfig\n    })),\n    rowData = _getRowData.rowData;\n  var items = handleGridBorderByType(border, gridBorderType, rowData, rows.length, columns.length);\n  var changes = [];\n  if (items) {\n    var _context34;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context34 = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(items).call(items, function (res, item) {\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(res).call(res, item.cells);\n    }, [])).call(_context34, function (_ref23) {\n      var id = _ref23.id,\n        border = _ref23.border;\n      var cell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(realGridItems).call(realGridItems, function (i) {\n        return i.id === id;\n      });\n      if (cell && isChange) {\n        cell.border = border;\n        changes.push([cell.id, {\n          border: border\n        }]);\n      }\n    });\n  }\n  return changes;\n};\nvar changeItemsBorderByMergeConfig = function changeItemsBorderByMergeConfig(gridData, gridItems) {\n  var isRemoveMerge = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n  var cloneItemData = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(gridData);\n  // 这里还是需要去变更\n  var gridBorderType = cloneItemData.borderType,\n    border = cloneItemData.border,\n    _cloneItemData$mergeC2 = cloneItemData.mergeConfig,\n    mergeConfig = _cloneItemData$mergeC2 === void 0 ? {} : _cloneItemData$mergeC2;\n  var getterFn = (lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep);\n  var realGridItems = getterFn(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(gridItems).call(gridItems, function (item) {\n    return item.parentId === gridData.id;\n  }));\n  var _getCollectProps2 = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getCollectProps)(realGridItems),\n    columns = _getCollectProps2.columns,\n    rows = _getCollectProps2.rows,\n    cells = _getCollectProps2.cells;\n  var _getRowData2 = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getRowData)(_objectSpread(_objectSpread({\n      columns: columns,\n      rows: rows,\n      cells: cells\n    }, cloneItemData), {}, {\n      mergeConfig: mergeConfig\n    })),\n    rowData = _getRowData2.rowData;\n  // let items = handleGridBorderByType(border, gridBorderType, rowData, rows.length, columns.length)\n  // if (isMergeConfigChange) {\n\n  // }\n  var items = [];\n  if (isRemoveMerge) {\n    items = mergeGridItemsBorder(gridBorderType, realGridItems, rowData, rows.length, columns.length);\n  } else {\n    items = mergeGridBoundaryBorder(gridBorderType, realGridItems, rowData, rows.length, columns.length);\n  }\n  var changes = [];\n  if (items) {\n    var _context35;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context35 = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(items).call(items, function (res, item) {\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(res).call(res, item.cells);\n    }, [])).call(_context35, function (_ref24) {\n      var id = _ref24.id,\n        border = _ref24.border;\n      var cell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(realGridItems).call(realGridItems, function (i) {\n        return i.id === id;\n      });\n      if (cell) {\n        // cell.border = border\n        changes.push([cell.id, {\n          border: border\n        }]);\n      }\n    });\n  }\n  return changes;\n};\nvar updateGridItemsBorder = function updateGridItemsBorder(gridData, gridItems, originGridItems) {\n  var isDelete = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n  var cloneItemData = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(gridData);\n  // 这里还是需要去变更\n  var gridBorderType = cloneItemData.borderType,\n    border = cloneItemData.border,\n    _cloneItemData$mergeC3 = cloneItemData.mergeConfig,\n    mergeConfig = _cloneItemData$mergeC3 === void 0 ? {} : _cloneItemData$mergeC3;\n  var getterFn = (lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep);\n  var realGridItems = getterFn(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(gridItems).call(gridItems, function (item) {\n    return item.parentId === gridData.id;\n  }));\n  var oldGridItems = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(originGridItems).call(originGridItems, function (item) {\n    return item.parentId === gridData.id;\n  });\n  var _getCollectProps3 = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getCollectProps)(realGridItems),\n    columns = _getCollectProps3.columns,\n    rows = _getCollectProps3.rows,\n    cells = _getCollectProps3.cells;\n  var _getRowData3 = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getRowData)(_objectSpread(_objectSpread({\n      columns: columns,\n      rows: rows,\n      cells: cells\n    }, cloneItemData), {}, {\n      mergeConfig: mergeConfig\n    })),\n    rowData = _getRowData3.rowData;\n  var items = handleGridBorderByType(border, gridBorderType, rowData, rows.length, columns.length);\n  if (isDelete) {\n    // 删除行、列，走这里\n    items = mergeGridBoundaryBorder(gridBorderType, oldGridItems, rowData, rows.length, columns.length);\n  } else {\n    items = mergeGridItemsBorder(gridBorderType, originGridItems, rowData, rows.length, columns.length);\n  }\n  var changes = [];\n  if (items) {\n    var _context36;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context36 = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(items).call(items, function (res, item) {\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(res).call(res, item.cells);\n    }, [])).call(_context36, function (_ref25) {\n      var id = _ref25.id,\n        border = _ref25.border;\n      // const oldCell = originGridItems.find(i => i.id === id)\n      var cell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(realGridItems).call(realGridItems, function (i) {\n        return i.id === id;\n      });\n      if (cell) {\n        cell.border = border;\n        changes.push([cell.id, {\n          border: border\n        }]);\n      }\n    });\n  }\n  return changes;\n};\nvar specialchangeItemsBorder = function specialchangeItemsBorder(gridData, rowData, rowLength, columnLength) {\n  // 这里还是需要去变更\n  var gridBorderType = gridData.borderType,\n    border = gridData.border,\n    _gridData$mergeConfig = gridData.mergeConfig,\n    mergeConfig = _gridData$mergeConfig === void 0 ? {} : _gridData$mergeConfig;\n  var items = handleGridBorderByType(border, gridBorderType, rowData, rowLength, columnLength);\n  return {\n    newRowData: items\n  };\n};\nvar LINE_LIST = [_constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL, _constants__WEBPACK_IMPORTED_MODULE_24__.LINE_CU, _constants__WEBPACK_IMPORTED_MODULE_24__.LINE_JIACU];\nvar borderHandle = function borderHandle() {\n  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n  var borderType = arguments.length > 1 ? arguments[1] : undefined;\n  var widthValues = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_20___default()(data.width || {});\n  var _ref26 = data.width || {},\n    leftWidth = _ref26.left,\n    rightWidth = _ref26.right,\n    topWidth = _ref26.top,\n    bottomWidth = _ref26.bottom,\n    innerWidth = _ref26.inner;\n  var isOutBorder = !innerWidth && leftWidth && rightWidth && topWidth && bottomWidth;\n  var colorValues = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_20___default()(data.color || {});\n  var styleValues = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_20___default()(data.style || {});\n  var widthValuesLength = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(widthValues).call(widthValues, Boolean).length;\n  // borderType: INNER_BORDER | ALL_BORDER | NONE_BORDER\n  // if (borderType) {\n  //   if (borderType === INNER_BORDER) {\n  //     return [[borderType], data.color.top, data.style.top, +(LINE_LIST.find(str => +str === data.width.inner) ?? LINE_NORMAL)]\n  //   } else if (borderType === NONE_BORDER) {\n  //     return [[]]\n  //   }\n  // }\n  if (widthValuesLength === 0) {\n    return [[_constants__WEBPACK_IMPORTED_MODULE_24__.NONE_BORDER]];\n  } else if (widthValuesLength === 5) {\n    var _LINE_LIST$find;\n    return [[_constants__WEBPACK_IMPORTED_MODULE_24__.ALL_BORDER], data.color.top, data.style.top, +((_LINE_LIST$find = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(LINE_LIST).call(LINE_LIST, function (str) {\n      return +str === data.width.top;\n    })) !== null && _LINE_LIST$find !== void 0 ? _LINE_LIST$find : _constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL)];\n  } else if (isOutBorder) {\n    var _LINE_LIST$find2;\n    return [[_constants__WEBPACK_IMPORTED_MODULE_24__.OUT_BORDER], data.color.top, data.style.top, +((_LINE_LIST$find2 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(LINE_LIST).call(LINE_LIST, function (str) {\n      return +str === data.width.top;\n    })) !== null && _LINE_LIST$find2 !== void 0 ? _LINE_LIST$find2 : _constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL)];\n  } else {\n    var types = [];\n    if (data.width.top) {\n      types.push(_constants__WEBPACK_IMPORTED_MODULE_24__.TOP_BORDER);\n    }\n    if (data.width.left) {\n      types.push(_constants__WEBPACK_IMPORTED_MODULE_24__.LEFT_BORDER);\n    }\n    if (data.width.right) {\n      types.push(_constants__WEBPACK_IMPORTED_MODULE_24__.RIGHT_BORDER);\n    }\n    if (data.width.bottom) {\n      types.push(_constants__WEBPACK_IMPORTED_MODULE_24__.BOTTOM_BORDER);\n    }\n    if (data.width.inner) {\n      types.push(_constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER);\n    }\n    return [types, data.color.top || data.color.bottom || data.color.left || data.color.right || data.color.inner, data.style.top || data.style.bottom || data.style.left || data.style.right || data.style.inner, +(data.width.top || data.width.bottom || data.width.left || data.width.right || data.width.inner || _constants__WEBPACK_IMPORTED_MODULE_24__.LINE_NORMAL)];\n  }\n};\nvar _handleGridBorderByType = function _handleGridBorderByType(value, type, rowData, rowLength, columnLength) {\n  // const specialType = SPECIAL_BORDER_TYPES\n  // specialType.includes(type) ? [type] : borderTypeArr\n  var _borderHandle = borderHandle(value),\n    _borderHandle2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_borderHandle, 4),\n    _borderTypeArr = _borderHandle2[0],\n    borderColor = _borderHandle2[1],\n    borderStyle = _borderHandle2[2],\n    borderWidth = _borderHandle2[3];\n  var borderTypeArr = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_borderTypeArr).call(_borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER) ? [_constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER] : _borderTypeArr;\n  var items = handleGridBorder(borderTypeArr, lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(rowData), {\n    borderColor: borderColor,\n    borderStyle: borderStyle,\n    borderWidth: borderWidth\n  }, {\n    rowLength: rowLength,\n    columnLength: columnLength\n  }, _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_borderTypeArr).call(_borderTypeArr, function (type) {\n    return type !== _constants__WEBPACK_IMPORTED_MODULE_24__.INNER_BORDER;\n  }));\n  return items;\n};\nvar handleGridBorderByType = lodash__WEBPACK_IMPORTED_MODULE_26___default().memoize(_handleGridBorderByType, function (value, type, rowData, rowLength, columnLength) {\n  return _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_21___default()({\n    value: value,\n    type: type,\n    rowData: rowData,\n    rowLength: rowLength,\n    columnLength: columnLength\n  });\n});\nvar getMergeRegion = function getMergeRegion(_ref27) {\n  var _context37;\n  var items = _ref27.items,\n    rowId = _ref27.rowId,\n    columnId = _ref27.columnId,\n    gridData = _ref27.gridData;\n  var cloneItemData = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(gridData);\n  var gridBorderType = cloneItemData.borderType,\n    border = cloneItemData.border,\n    _cloneItemData$mergeC4 = cloneItemData.mergeConfig,\n    mergeConfig = _cloneItemData$mergeC4 === void 0 ? {} : _cloneItemData$mergeC4;\n  if (lodash__WEBPACK_IMPORTED_MODULE_26___default().isEmpty(mergeConfig)) return [];\n  var realGridItems = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(items).call(items, function (item) {\n    return item.parentId === gridData.id;\n  });\n  var _getCollectProps4 = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.getCollectProps)(realGridItems),\n    columns = _getCollectProps4.columns,\n    rows = _getCollectProps4.rows,\n    cells = _getCollectProps4.cells,\n    columnCount = _getCollectProps4.columnCount;\n  var getCellIdx = (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.createGetCellIdx)(columnCount);\n  // const {\n  //   rowData\n  // } = getRowData({\n  //   columns,\n  //   rows,\n  //   cells,\n  //   ...cloneItemData,\n  //   mergeConfig\n  // })\n  // 只需要左上角\n  var mergeKey = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context37 = \"\".concat(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_22___default()(rows).call(rows, function (row) {\n    return row.id === rowId;\n  }), \"_\")).call(_context37, _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_22___default()(columns).call(columns, function (column) {\n    return column.id === columnId;\n  }));\n  var res = [];\n  if (mergeConfig[mergeKey]) {\n    var _mergeConfig$mergeKey = mergeConfig[mergeKey],\n      rowStart = _mergeConfig$mergeKey.rowStart,\n      rowLength = _mergeConfig$mergeKey.rowLength,\n      columnStart = _mergeConfig$mergeKey.columnStart,\n      columnLength = _mergeConfig$mergeKey.columnLength;\n    for (var i = rowStart; i < rowStart + rowLength; i++) {\n      for (var j = columnStart; j < columnStart + columnLength; j++) {\n        var _cell2 = cells[getCellIdx(i, j)];\n        if (_cell2.rowId === rowId || _cell2.columnId === columnId) {\n          res.push(_cell2);\n        }\n      }\n    }\n  }\n  return res;\n};\nvar calcEvenlySplit = function calcEvenlySplit(arr, newSum) {\n  var sum = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(arr).call(arr, function (res, num) {\n    return res + num;\n  }, 0);\n  var variable = newSum - sum;\n  return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(arr).call(arr, function (num) {\n    // 这里好像都可以 TOTEST\n    return (0,_index__WEBPACK_IMPORTED_MODULE_25__.toFloorFix)(num + (sum === 0 ? variable / arr.length : variable * num / sum), _constants__WEBPACK_IMPORTED_MODULE_24__.PRECISION);\n    // return toRoundFix(num + (variable * num / sum), PRECISION)\n  });\n};\nvar putRemainderLast = function putRemainderLast(arr, newSum) {\n  if ((arr === null || arr === void 0 ? void 0 : arr.length) > 1) {\n    // 可能存在拖拽改变宽度的情况，不能直接平分\n    var sum = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_12___default()(arr).call(arr, function (res, num) {\n      return res + num;\n    }, 0);\n    arr[arr.length - 1] = arr[arr.length - 1] + (0,_index__WEBPACK_IMPORTED_MODULE_25__.toFloorFix)(newSum - sum, _constants__WEBPACK_IMPORTED_MODULE_24__.PRECISION);\n  }\n  return arr;\n};\nvar getCellIdx = function getCellIdx(columnCount) {\n  return (0,_gridUtil__WEBPACK_IMPORTED_MODULE_28__.createGetCellIdx)(columnCount);\n};\n\n// 是否选中表格行\nvar getSelectionIsDataRow = function getSelectionIsDataRow(dataContext, selectControls) {\n  var rowIds = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_23___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_16___default()(selectControls).call(selectControls, function (item) {\n    return item.rowId || '';\n  })));\n  if (rowIds.length !== 1) return false;\n  var rowId = rowIds[0];\n  if (!rowId) return false;\n  var cellControls = dataContext.findControlByCondition(function (item) {\n    return item.rowId === rowId;\n  });\n  return cellControls.length === selectControls.length;\n};\nvar filterGroupProperties = function filterGroupProperties(isSelectDataRow, dataRowId, dataContext, properties) {\n  if (!isSelectDataRow) return properties;\n  var _dataContext$findCont = dataContext.findControl(dataRowId),\n    parentId = _dataContext$findCont.parentId,\n    rowType = _dataContext$findCont.rowType;\n  var _dataContext$findCont2 = dataContext.findControl(parentId),\n    parentType = _dataContext$findCont2.type;\n  var hasGroupRow = !!dataContext.findControlByCondition(function (control) {\n    return isGroupRow(control) && control.parentId === parentId;\n  }).length;\n  if (rowType === 'Detail' && (hasGroupRow || parentType === 'SubDataGrid')) {\n    return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(properties).call(properties, function (group) {\n      return group.Id !== 'DataRowGroup';\n    });\n  }\n  return properties;\n};\nfunction hasMergeCell(mergeConfig) {\n  return _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(mergeConfig || {}).length > 0;\n}\nvar getNextTargetColumnNum = function getNextTargetColumnNum(minRowNum, maxRowNum, originCells, getCellIdx) {\n  return function (targetColumnNum, getNewColumnNum) {\n    var newColumnNum = targetColumnNum;\n    for (var i = minRowNum; i <= maxRowNum; i++) {\n      var _cell3 = originCells[getCellIdx(i, targetColumnNum)];\n      newColumnNum = getNewColumnNum(newColumnNum, _cell3);\n    }\n    return newColumnNum;\n  };\n};\nfunction getNextMaxColumnNum(minRowNum, maxRowNum, maxColumnNum, originCells, getCellIdx) {\n  var _getNextTargetColumnNum = getNextTargetColumnNum(minRowNum, maxRowNum, originCells, getCellIdx);\n  var _getNewMaxColumnNum = function _getNewMaxColumnNum(newColumnNum, cell) {\n    var mergeConfig = cell.mergeConfig;\n    if (!mergeConfig) {\n      return newColumnNum;\n    }\n    var columnStart = mergeConfig.columnStart,\n      columnLength = mergeConfig.columnLength;\n    return Math.max(newColumnNum, columnStart + columnLength - 1);\n  };\n  var curMaxColumnNum = maxColumnNum;\n  var newMaxColumnNum = _getNextTargetColumnNum(curMaxColumnNum, _getNewMaxColumnNum);\n  while (newMaxColumnNum > curMaxColumnNum) {\n    curMaxColumnNum = newMaxColumnNum;\n    newMaxColumnNum = _getNextTargetColumnNum(curMaxColumnNum, _getNewMaxColumnNum);\n  }\n  return curMaxColumnNum;\n}\nfunction getNextMinColumnNum(minRowNum, maxRowNum, minColumnNum, originCells, getCellIdx) {\n  var _getNextTargetColumnNum = getNextTargetColumnNum(minRowNum, maxRowNum, originCells, getCellIdx);\n  var _getNewMinColumnNum = function _getNewMinColumnNum(newColumnNum, cell) {\n    var mergeConfig = cell.mergeConfig;\n    if (!mergeConfig) {\n      return newColumnNum;\n    }\n    var columnStart = mergeConfig.columnStart;\n    return Math.min(newColumnNum, columnStart);\n  };\n  var curMinColumnNum = minColumnNum;\n  var newMinColumnNum = _getNextTargetColumnNum(curMinColumnNum, _getNewMinColumnNum);\n  while (newMinColumnNum < curMinColumnNum) {\n    curMinColumnNum = newMinColumnNum;\n    newMinColumnNum = _getNextTargetColumnNum(curMinColumnNum, _getNewMinColumnNum);\n  }\n  return curMinColumnNum;\n}\nfunction getGridTitleContent(row, gridType, rowIndex) {\n  // 如果是网格，行标题显示索引\n  if (gridType === 'LayoutGrid' || gridType === 'CardGrid') return rowIndex + 1;\n  var _ref28 = row || {},\n    rowType = _ref28.rowType;\n  switch (rowType) {\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_NORMAL:\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.components.key0043');\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_DETAIL:\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.components.key0044');\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_STATISTIC:\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.components.key0045');\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_LAYOUT:\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.components.key0046');\n    case _constants__WEBPACK_IMPORTED_MODULE_24__.ROW_TYPE_GROUP:\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.components.key0047');\n    default:\n      return row.name;\n  }\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/grid.ts?");

/***/ }),

/***/ 90932:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   countLength: function() { return /* binding */ countLength; },\n/* harmony export */   createGetCellIdx: function() { return /* binding */ createGetCellIdx; },\n/* harmony export */   getCellPosition: function() { return /* binding */ getCellPosition; },\n/* harmony export */   getCollectProps: function() { return /* binding */ getCollectProps; },\n/* harmony export */   getRowData: function() { return /* binding */ getRowData; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(1508);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(6908);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(41232);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(98092);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(21980);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_25__);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context22, _context23; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context22 = ownKeys(Object(t), !0)).call(_context22, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context23 = ownKeys(Object(t))).call(_context23, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar getCellPositionFn = function getCellPositionFn(_ref) {\n  var columns = _ref.columns,\n    rows = _ref.rows;\n  return function (_ref2) {\n    var row = _ref2.row,\n      column = _ref2.column;\n    return {\n      x: countLength(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12___default()(columns).call(columns, 0, column)),\n      y: countLength(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12___default()(rows).call(rows, 0, row)),\n      width: columns[column].columnWidth,\n      height: rows[row].rowHeight\n    };\n  };\n};\nvar getCellPosition = getCellPositionFn;\nvar createRowColumnKey = function createRowColumnKey(row, column) {\n  var _context;\n  return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context = \"\".concat(row, \"-\")).call(_context, column);\n};\nvar createGetCellIdx = function createGetCellIdx(columnCount) {\n  return function (row, column) {\n    return row * columnCount + column;\n  };\n};\n// _.memoize.Cache = WeakMap\nvar countLength = function countLength(arr) {\n  var templateRowHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  // 初始0\n  if (!arr.length) return 0;\n  return (0,_index__WEBPACK_IMPORTED_MODULE_22__.toRoundFix)(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(arr).call(arr, function (res, item) {\n    var Type = item.type;\n    if (Type === 'DataRow') {\n      if (item.rowType === _constants__WEBPACK_IMPORTED_MODULE_23__.ROW_TYPE_DETAIL) {\n        return res + item.rowHeight + templateRowHeight;\n      }\n      return res + item.rowHeight;\n    } else {\n      return res + item.columnWidth;\n    }\n  }, 0), _constants__WEBPACK_IMPORTED_MODULE_23__.PRECISION);\n};\nvar _getRowData = function _getRowData(_ref3) {\n  var _context2, _context3, _context4, _context7;\n  var columns = _ref3.columns,\n    rows = _ref3.rows,\n    cells = _ref3.cells,\n    mergeConfig = _ref3.mergeConfig,\n    templateRowCount = _ref3.templateRowCount,\n    fixedRowAtPage = _ref3.fixedRowAtPage,\n    _ref3$allItems = _ref3.allItems,\n    allItems = _ref3$allItems === void 0 ? [] : _ref3$allItems,\n    gridData = _ref3.gridData;\n  var clonedAllItems = lodash__WEBPACK_IMPORTED_MODULE_21___default().cloneDeep(allItems);\n  var cellDataWithoutMergeCell = [];\n  var cellDataWithMergeCell = [];\n  var rowMap = {};\n  var rowData = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_16___default()(_context3 = new Array(rows.length)).call(_context3, 0)).call(_context2, function () {\n    return {\n      cells: [],\n      row: {}\n    };\n  });\n  var columnCount = columns.length;\n  var rowCount = rows.length;\n  var originCells = lodash__WEBPACK_IMPORTED_MODULE_21___default().cloneDeep(cells);\n  var mergeCellPosCache = {};\n  var getCellPosition = getCellPositionFn({\n    columns: columns,\n    rows: rows\n  });\n  var getCellIdx = createGetCellIdx(columnCount);\n  // 这里如果当前单元格有则取当前单元格 TODO Other动作导致的，初始化是没有的\n  // 没有则根据Grid上配置borderType来执行规则？不行\n  // const getBorderConfig = useCallback((row, column) => {\n  //   const cell = cells[getCellIdx(row, column)]\n  //   return cell.border\n  // }, [rows, columns, cells])\n  // 根据mergeConfig处理\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context4 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(mergeConfig)).call(_context4, function (key) {\n    // -\n    var _key$split = key.split('-'),\n      _key$split2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_key$split, 2),\n      row = _key$split2[0],\n      column = _key$split2[1];\n    var _mergeConfig$key = mergeConfig[key],\n      rowStart = _mergeConfig$key.rowStart,\n      rowLength = _mergeConfig$key.rowLength,\n      columnStart = _mergeConfig$key.columnStart,\n      columnLength = _mergeConfig$key.columnLength;\n    for (var i = rowStart; i < rowStart + rowLength; i++) {\n      for (var j = columnStart; j < columnStart + columnLength; j++) {\n        originCells[getCellIdx(i, j)].mergeConfig = mergeConfig[key];\n      }\n    }\n  });\n  // 拿到cells\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(originCells).call(originCells, function (cell, idx) {\n    // 从0开始\n    // row, column, 得自己标注\n    var row = cell.row,\n      column = cell.column,\n      _cell$border = cell.border,\n      border = _cell$border === void 0 ? DEFUALT_BORDER_DATA : _cell$border,\n      id = cell.id;\n    // handle row\n    // if (!(row in rowMap)) {\n    //   rowMap[row] = true\n    //   // TODO\n    //   rowData.push({\n    //     row\n    //   })\n    // }\n    // handle cell\n    if (cell.mergeConfig) {\n      // 这里用map就无法\n      var _cell$mergeConfig = cell.mergeConfig,\n        mergeConfigRowStart = _cell$mergeConfig.rowStart,\n        mergeConfigColumnStart = _cell$mergeConfig.columnStart,\n        rowLength = _cell$mergeConfig.rowLength,\n        columnLength = _cell$mergeConfig.columnLength;\n      var key = createRowColumnKey(mergeConfigRowStart, mergeConfigColumnStart);\n      if (key in mergeCellPosCache) {\n        var _idx = mergeCellPosCache[key];\n        // update\n        // fix: 有时只算部分，\n        var _getCellPosition = getCellPosition({\n            row: row,\n            column: column\n          }),\n          width = _getCellPosition.width,\n          height = _getCellPosition.height;\n        if (row !== mergeConfigRowStart && column === mergeConfigColumnStart) {\n          cellDataWithMergeCell[_idx].height += height;\n        }\n        if (column !== mergeConfigColumnStart && row === mergeConfigRowStart) {\n          cellDataWithMergeCell[_idx].width += width;\n        }\n      } else {\n        var currentCell = _objectSpread(_objectSpread(_objectSpread({}, cell), getCellPosition({\n          row: row,\n          column: column\n        })), {}, {\n          cellKey: createRowColumnKey(row, column),\n          border: border,\n          childItems: (clonedAllItems === null || clonedAllItems === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(clonedAllItems).call(clonedAllItems, function (item) {\n            return item.parentId === id;\n          })) || []\n          // dataContext?.findControlByCondition(item => item.parentId === id) || []\n        });\n        cellDataWithMergeCell.push(currentCell);\n        rowData[row] = rowData[row] || {\n          cells: []\n        };\n        rowData[row].row = rows[row];\n        rowData[row].cells.push(currentCell);\n        mergeCellPosCache[key] = cellDataWithMergeCell.length - 1;\n      }\n    } else {\n      var _currentCell = _objectSpread(_objectSpread(_objectSpread({}, cell), getCellPosition({\n        row: row,\n        column: column\n      })), {}, {\n        cellKey: createRowColumnKey(row, column),\n        border: border\n      });\n      cellDataWithMergeCell.push(_currentCell);\n      rowData[row] = rowData[row] || {\n        cells: []\n      };\n      rowData[row].row = rows[row];\n      rowData[row].cells.push(_currentCell);\n    }\n  });\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_25__.console.log('cellDataWithMergeCell', rowData, cellDataWithMergeCell, mergeCellPosCache);\n  var templateRowData = [];\n  var templateRowIndex = -1;\n  var templateRowHeight = 0;\n  var templateRowY = -1;\n  if (fixedRowAtPage && templateRowCount > 1) {\n    templateRowIndex = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_17___default()(rowData).call(rowData, function (_ref4) {\n      var row = _ref4.row;\n      return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_23__.ROW_TYPE_DETAIL;\n    });\n    var rowItem = rowData[templateRowIndex];\n    if (rowItem) {\n      var _cells = rowItem.cells;\n      var rowHeight = rowItem.row.rowHeight;\n      templateRowHeight = rowHeight * (templateRowCount - 1);\n      if (_cells) {\n        var _context5, _context6;\n        var copyCells = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_fill__WEBPACK_IMPORTED_MODULE_16___default()(_context6 = new Array(templateRowCount - 1)).call(_context6, 0)).call(_context5, function (n, idx) {\n          return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_cells).call(_cells, function (cell) {\n            var y = cell.y + rowHeight * (idx + 1);\n            if (idx === 0) {\n              templateRowY = y;\n            }\n            return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, cell, _constants__WEBPACK_IMPORTED_MODULE_23__.EMPTY_CELL_TEXT, {\n              y: y\n            });\n          });\n        });\n        templateRowData = copyCells;\n      }\n    }\n  }\n  // 动态数据更改\n  if (templateRowIndex > -1 && templateRowHeight !== 0) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(rowData).call(rowData, function (rowItem, idx) {\n      var cells = rowItem.cells;\n      // row 不更改\n      if (idx > templateRowIndex) {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n          (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(cell, {\n            y: cell.y + templateRowHeight\n          });\n        });\n      }\n    });\n  }\n  // 在这里考虑所有的edge case\n  // 在这里重新计算重复行的边框\n  if (gridData && templateRowData.length && templateRowIndex !== -1 && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context7 = [_constants__WEBPACK_IMPORTED_MODULE_23__.NONE_BORDER, _constants__WEBPACK_IMPORTED_MODULE_23__.ALL_BORDER]).call(_context7, gridData[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER_TYPE])) {\n    var _context8, _context9;\n    // 数据行+重复行\n    var detailRowData = lodash__WEBPACK_IMPORTED_MODULE_21___default().cloneDeep(rowData[templateRowIndex]);\n    // 篡改row\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context8 = detailRowData.cells).call(_context8, function (cell) {\n      cell.row = 0;\n    });\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(templateRowData).call(templateRowData, function (arr, idx) {\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(arr).call(arr, function (cell) {\n        cell.row = idx + 1;\n      });\n    });\n    var _specialchangeItemsBo = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.specialchangeItemsBorder)(gridData, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context9 = [detailRowData]).call(_context9, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(templateRowData).call(templateRowData, function (data) {\n        return {\n          cells: data\n        };\n      }))), templateRowCount, columnCount),\n      newRowData = _specialchangeItemsBo.newRowData;\n    if (newRowData) {\n      var _context15, _context16, _context17;\n      var _borderHandle = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.borderHandle)(gridData[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER]),\n        _borderHandle2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_borderHandle, 4),\n        _borderTypeArr = _borderHandle2[0],\n        borderColor = _borderHandle2[1],\n        borderStyle = _borderHandle2[2],\n        borderWidth = _borderHandle2[3];\n      // const borderTypeArr = SPECIAL_BORDER_TYPES.includes(gridData[BORDER_TYPE]) ? [gridData[BORDER_TYPE]] : _borderTypeArr\n      var borderTypeArr = _borderTypeArr;\n      if (templateRowIndex !== 0) {\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(borderTypeArr).call(borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_23__.INNER_BORDER)) {\n          var _context10;\n          // 首行填充上\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context10 = newRowData[0].cells).call(_context10, function (cell) {\n            cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER] = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.setBorderData)(cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_23__.TOP_BORDER, borderWidth, borderColor, borderStyle);\n          });\n        }\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(borderTypeArr).call(borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_23__.TOP_BORDER)) {\n          var _context11;\n          // 首行去掉上\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context11 = newRowData[0].cells).call(_context11, function (cell) {\n            cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER] = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.setBorderData)(cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_23__.TOP_BORDER, 0, borderColor, borderStyle);\n          });\n        }\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(borderTypeArr).call(borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_23__.OUT_BORDER)) {\n          var _context12;\n          // 首行去掉上\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context12 = newRowData[0].cells).call(_context12, function (cell) {\n            cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER] = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.setBorderData)(cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_23__.TOP_BORDER, 0, borderColor, borderStyle);\n          });\n        }\n      }\n      if (templateRowIndex !== rowCount - 1) {\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(borderTypeArr).call(borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_23__.INNER_BORDER)) {\n          // 尾行填充下\n          // 尾行由合计行填充\n          // newRowData[newRowData.length - 1].cells.forEach(cell => {\n          //   cell[BORDER] = setBorderData(cell[BORDER], BOTTOM_BORDER, borderWidth, borderColor)\n          // })\n          // TODO: 其实这样的计算可以在上层通过ref状态标记来避免，而不用这样具体去去掉\n          // 这里可以将下一行合计行的top去掉去掉, 防止双重线框\n        }\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(borderTypeArr).call(borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_23__.BOTTOM_BORDER)) {\n          var _context13;\n          // 尾行去掉下\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context13 = newRowData[newRowData.length - 1].cells).call(_context13, function (cell) {\n            cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER] = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.setBorderData)(cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_23__.BOTTOM_BORDER, 0, borderColor, borderStyle);\n          });\n        }\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(borderTypeArr).call(borderTypeArr, _constants__WEBPACK_IMPORTED_MODULE_23__.OUT_BORDER)) {\n          var _context14;\n          // 尾行去掉下\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context14 = newRowData[newRowData.length - 1].cells).call(_context14, function (cell) {\n            cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER] = (0,_grid__WEBPACK_IMPORTED_MODULE_24__.setBorderData)(cell[_constants__WEBPACK_IMPORTED_MODULE_23__.BORDER], _constants__WEBPACK_IMPORTED_MODULE_23__.BOTTOM_BORDER, 0, borderColor, borderStyle);\n          });\n        }\n      }\n      return {\n        originCells: originCells,\n        rowData: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context15 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context16 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12___default()(rowData).call(rowData, 0, templateRowIndex)).call(_context16, newRowData[0])).call(_context15, _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12___default()(rowData).call(rowData, templateRowIndex + 1)),\n        templateRowData: _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_context17 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_12___default()(newRowData).call(newRowData, 1)).call(_context17, function (_ref5) {\n          var cells = _ref5.cells;\n          return cells;\n        }),\n        templateRowHeight: templateRowHeight,\n        templateRowIndex: templateRowIndex,\n        templateRowY: templateRowY,\n        rowCount: rowCount,\n        columnCount: columnCount\n      };\n    }\n  }\n  return {\n    originCells: originCells,\n    rowData: rowData,\n    templateRowData: templateRowData,\n    templateRowHeight: templateRowHeight,\n    templateRowIndex: templateRowIndex,\n    templateRowY: templateRowY,\n    rowCount: rowCount,\n    columnCount: columnCount\n  };\n};\nvar getRowData = _getRowData;\nvar _getCollectProps = function _getCollectProps(items) {\n  var _context18, _context19, _context20, _context21;\n  var collectProps = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(_context18 = lodash__WEBPACK_IMPORTED_MODULE_21___default().cloneDeep(items)).call(_context18, function (res, item) {\n    var Type = item.type,\n      id = item.id;\n    switch (Type) {\n      case 'DataRow':\n        {\n          // res.rowItems = res.rowItems || []\n          res.rows.push(item);\n          // res.rowItems.push(id)\n          return res;\n        }\n      case 'DataColumn':\n        {\n          // res.columnItems = res.columnItems || []\n          res.columns.push(item);\n          // res.columnItems.push(id)\n          return res;\n        }\n      case 'DataCell':\n      default:\n        {\n          // const { row, column } = item\n          res.cells.push(item);\n          // res.rowData = res.rowData || {}\n          // res.rowData[row] = res.rowData[row] || []\n          // res.columnData[column] = res.columnData[column] || []\n          // res.rowData[row].push(item)\n          // res.columnData[column].push(item)\n          return res;\n        }\n    }\n  }, {\n    columnData: {},\n    rowData: {},\n    cells: [],\n    columns: [],\n    rows: []\n  });\n  // let rowCount = collectProps.rows.length\n  var collectColumnCount = collectProps.columns.length;\n  // let currentRow = 0\n  // let currentColumn = 0\n  var rows = collectProps.rows,\n    columns = collectProps.columns;\n  // groupBy\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context19 = collectProps.cells).call(_context19, function (cell, idx) {\n    var cellId = cell.id,\n      rowId = cell.rowId,\n      columnId = cell.columnId;\n    // 抛弃按位置设置\n    // const row = Math.floor(idx / collectColumnCount)\n    var row = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_17___default()(rows).call(rows, function (_ref6) {\n      var id = _ref6.id;\n      return id === rowId;\n    });\n    // const column = idx % collectColumnCount\n    var column = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_17___default()(columns).call(columns, function (_ref7) {\n      var id = _ref7.id;\n      return id === columnId;\n    });\n    collectProps.cells[idx] = _objectSpread(_objectSpread({}, cell), {}, {\n      row: row,\n      column: column\n    });\n    collectProps.rowData[row] = collectProps.rowData[row] || [];\n    collectProps.rowData[row].push(cell);\n    collectProps.columnData[column] = collectProps.columnData[column] || [];\n    collectProps.columnData[column].push(cell);\n  });\n  // 排序\n  _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_19___default()(_context20 = collectProps.cells).call(_context20, function (cellA, cellB) {\n    var rowA = cellA.row,\n      columnA = cellA.column;\n    var rowB = cellB.row,\n      columnB = cellB.column;\n    if (rowA - rowB === 0) {\n      return columnA - columnB;\n    } else {\n      return rowA - rowB;\n    }\n  });\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_25__.console.log('originCells', collectProps.cells);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_25__.console.log('originCells id', _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_15___default()(_context21 = collectProps.cells).call(_context21, function (_ref8) {\n    var row = _ref8.row,\n      column = _ref8.column;\n    return {\n      row: row,\n      column: column\n    };\n  }));\n  collectProps.rowCount = rows.length;\n  collectProps.columnCount = columns.length;\n  return collectProps;\n};\nvar getCollectProps = lodash__WEBPACK_IMPORTED_MODULE_21___default().memoize(_getCollectProps, (_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_20___default()));\n\n//# sourceURL=webpack://print-designer/./src/utils/gridUtil.ts?");

/***/ }),

/***/ 41232:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   calculatorMMtoPx: function() { return /* binding */ calculatorMMtoPx; },\n/* harmony export */   calculatorPxtoMM: function() { return /* binding */ calculatorPxtoMM; },\n/* harmony export */   convertMMToNum: function() { return /* binding */ convertMMToNum; },\n/* harmony export */   convertToMM: function() { return /* binding */ convertToMM; },\n/* harmony export */   convertToPX: function() { return /* binding */ convertToPX; },\n/* harmony export */   getCalcPosObj: function() { return /* binding */ getCalcPosObj; },\n/* harmony export */   getDPI: function() { return /* binding */ getDPI; },\n/* harmony export */   getEnabledAnchorsProp: function() { return /* binding */ getEnabledAnchorsProp; },\n/* harmony export */   getInputLengthProp: function() { return /* binding */ getInputLengthProp; },\n/* harmony export */   isPrintModelIsTemplate: function() { return /* binding */ isPrintModelIsTemplate; },\n/* harmony export */   numAdd: function() { return /* binding */ numAdd; },\n/* harmony export */   numDiv: function() { return /* binding */ numDiv; },\n/* harmony export */   numMulti: function() { return /* binding */ numMulti; },\n/* harmony export */   oneMMtoPx: function() { return /* binding */ oneMMtoPx; },\n/* harmony export */   toFloorFix: function() { return /* binding */ toFloorFix; },\n/* harmony export */   toRoundFix: function() { return /* binding */ toRoundFix; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97552);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7224);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n\n\n\n\n\n\n\nvar UNIT_PRECISION = 2;\nvar deviceDPI;\nfunction getDPI() {\n  if (deviceDPI) return deviceDPI;\n  deviceDPI = {};\n  if (window.screen.deviceXDPI != undefined) {\n    deviceDPI.x = window.screen.deviceXDPI;\n    deviceDPI.y = window.screen.deviceYDPI;\n  } else {\n    var div = document.createElement('div');\n    div.style.cssText = 'width:1in;height:1in;position:absolute;left:0;top:0;z-index:0;visibility:hidden';\n    document.body.appendChild(div);\n    deviceDPI.x = _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_0___default()(div.offsetWidth);\n    deviceDPI.y = _babel_runtime_corejs3_core_js_stable_parse_int__WEBPACK_IMPORTED_MODULE_0___default()(div.offsetHeight);\n    div.parentNode.removeChild(div);\n  }\n  return deviceDPI;\n}\n/**\n * 将像素值转换成mm值\n * @param {*} value 像素单位值\n * @param {*} axisType 计算的方向，x: 水平方向 y: 竖直方向\n */\nfunction convertToMM(value) {\n  var axisType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';\n  var unit;\n  if (typeof value === 'string') {\n    unit = value.substr(value.length - 2, 2);\n  }\n  unit = unit || 'px';\n  value = _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1___default()(value);\n  var dpi = getDPI()[axisType];\n  switch (unit) {\n    case 'px':\n      return toRoundFix(value * 25.4 / dpi, _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION);\n    case 'cm':\n      return value * 10;\n    default:\n      return value;\n  }\n}\n\n// 这里没有方向\nvar oneMMtoPx = function oneMMtoPx() {\n  var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n  return convertToPX(1, 'x', scale);\n};\nvar calculatorMMtoPx = function calculatorMMtoPx(mmNumber) {\n  var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n  var precision = arguments.length > 2 ? arguments[2] : undefined;\n  // 这里也一位小数精度的话\n  // return mmNumber * convertToPX(1, 'x', scale)\n  return toRoundFix(mmNumber * convertToPX(1, 'x', scale), precision !== null && precision !== void 0 ? precision : _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION);\n};\nvar calculatorPxtoMM = function calculatorPxtoMM(mmNumber) {\n  var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n  var precision = arguments.length > 2 ? arguments[2] : undefined;\n  return toRoundFix(mmNumber / convertToPX(1, 'x', scale), precision !== null && precision !== void 0 ? precision : _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION);\n};\n/**\n * 将mm单位值转换成像素值\n * @param {*} value mm单位值\n * @param {*} axisType 方向 x: 水平方向 y: 竖直方向\n */\nfunction convertToPX(value) {\n  var axisType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';\n  var scale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n  var defaultUnit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'mm';\n  var unit;\n  if (typeof value === 'string') {\n    unit = value.substr(value.length - 2, 2);\n  }\n  unit = unit || defaultUnit;\n  value = _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1___default()(value);\n  var dpi = getDPI()[axisType];\n  switch (unit) {\n    case 'cm':\n      return toRoundFix(value * dpi / 2.54, _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION) * scale;\n    case 'mm':\n      return toRoundFix(value * dpi / 25.4, _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION) * scale;\n    default:\n      return value * scale;\n  }\n}\n/**\n *mm转为数字，向下取整\n *\n * @export\n * @param {*} mmVal\n * @returns\n */\nfunction convertMMToNum(mmVal) {\n  var isFloor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n  if (isFloor === true) {\n    return mmVal ? Math.floor(_babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1___default()(mmVal)) || 1 : 0;\n  }\n  return mmVal ? toRoundFix(_babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_1___default()(mmVal), _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION) : 0; // 保留两位小数\n}\n/**\n *四舍五入取整 保留小数\n * @export\n * @param {*} num\n * @param {*} bit 几位小数\n */\nfunction toRoundFix(num, bit) {\n  if (!bit) {\n    return num;\n  }\n  var _bit = Math.pow(10, bit);\n  // 应该四舍五入\n  return Math.round(num * _bit) / _bit;\n}\n\n/**\n *向下取整 保留小数\n * @export\n * @param {*} num\n * @param {*} bit 几位小数\n */\nfunction toFloorFix(num, bit) {\n  if (!bit) {\n    return num;\n  }\n  var _bit = Math.pow(10, bit);\n  return Math.floor(num * _bit) / _bit;\n}\n\n/**\n *浮点数加法，避免计算精度损失\n * @export\n * @param {*} num\n * @param {*} bit 几位小数\n * @returns\n */\nfunction numAdd(num1, num2) {\n  var baseNum, baseNum1, baseNum2;\n  try {\n    baseNum1 = num1.toString().split('.')[1].length;\n  } catch (e) {\n    baseNum1 = 0;\n  }\n  try {\n    baseNum2 = num2.toString().split('.')[1].length;\n  } catch (e) {\n    baseNum2 = 0;\n  }\n  baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));\n  return (num1 * baseNum + num2 * baseNum) / baseNum;\n}\n\n/**\n *乘法运算，避免数据相乘小数点后产生多位数和计算精度损失。\n */\nfunction numMulti(num1, num2) {\n  var baseNum = 0;\n  try {\n    baseNum += num1.toString().split('.')[1].length;\n  } catch (e) {}\n  try {\n    baseNum += num2.toString().split('.')[1].length;\n  } catch (e) {}\n  return Number(num1.toString().replace('.', '')) * Number(num2.toString().replace('.', '')) / Math.pow(10, baseNum);\n}\n;\n\n/**\n *除法运算，避免数据相除小数点后产生多位数和计算精度损失。\n *\n */\nfunction numDiv(num1, num2) {\n  var baseNum1 = 0;\n  var baseNum2 = 0;\n  var baseNum3, baseNum4;\n  try {\n    baseNum1 = num1.toString().split('.')[1].length;\n  } catch (e) {\n    baseNum1 = 0;\n  }\n  try {\n    baseNum2 = num2.toString().split('.')[1].length;\n  } catch (e) {\n    baseNum2 = 0;\n  }\n  baseNum3 = Number(num1.toString().replace('.', ''));\n  baseNum4 = Number(num2.toString().replace('.', ''));\n  return baseNum3 / baseNum4 * Math.pow(10, baseNum2 - baseNum1);\n}\nvar getInputLengthProp = function getInputLengthProp(props) {\n  var Editor = props.Editor;\n  var _Editor$MaxLength = Editor.MaxLength,\n    MaxLength = _Editor$MaxLength === void 0 ? '' : _Editor$MaxLength,\n    Tips = Editor.Tips,\n    _Editor$MinLength = Editor.MinLength,\n    MinLength = _Editor$MinLength === void 0 ? '' : _Editor$MinLength;\n  return {\n    maxLength: MaxLength,\n    minLength: MinLength\n  };\n};\nvar ALLOW_TWO_DECIMAL = ['fontSize', 'width', 'height'];\nvar getCalcPosObj = function getCalcPosObj(calcObj) {\n  var _context;\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_3___default()(calcObj)).call(_context, function (res, key) {\n    if (calcObj.lineSpace) {\n      res[key] = calcObj[key];\n      return res;\n    }\n    var decimals = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_4___default()(ALLOW_TWO_DECIMAL).call(ALLOW_TWO_DECIMAL, function (key) {\n      return calcObj === null || calcObj === void 0 ? void 0 : calcObj[key];\n    }) ? _constants__WEBPACK_IMPORTED_MODULE_6__.TWO_DECIMAL : _constants__WEBPACK_IMPORTED_MODULE_6__.PRECISION;\n    res[key] = lodash__WEBPACK_IMPORTED_MODULE_5___default().isNumber(calcObj[key]) ? toRoundFix(calcObj[key], decimals) : calcObj[key];\n    return res;\n  }, {});\n};\nvar getEnabledAnchorsProp = function getEnabledAnchorsProp(item, bizType) {\n  // 控制拖拽改变大小\n  if (bizType === '1' && item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.BARCODE) {\n    return {\n      enabledAnchors: ['bottom-center', 'top-center']\n    };\n  }\n  if (bizType === '1' && item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.QR_CODE) {\n    return {\n      enabledAnchors: []\n    };\n  }\n  if (item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.FOOTER) {\n    return {\n      enabledAnchors: ['top-center']\n    };\n  }\n  if (item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.HEADER) {\n    return {\n      enabledAnchors: ['bottom-center']\n    };\n  }\n  if (item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.SUB_GRID_TYPE) {\n    return {\n      enabledAnchors: ['bottom-center', 'middle-right', 'bottom-right']\n    };\n  }\n  if (item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.TABLE_TAIL) {\n    return {\n      enabledAnchors: ['middle-left', 'bottom-left', 'bottom-center', 'middle-right', 'bottom-right']\n    };\n  }\n  if (item.type === _constants__WEBPACK_IMPORTED_MODULE_6__.LINE) {\n    return {\n      enabledAnchors: ['middle-right', 'middle-left', 'bottom-center', 'top-center'],\n      padding: 3\n    };\n  }\n  return {};\n};\nvar isPrintModelIsTemplate = function isPrintModelIsTemplate(dataContext) {\n  var _dataContext$getData;\n  return ((_dataContext$getData = dataContext.getData()) === null || _dataContext$getData === void 0 ? void 0 : _dataContext$getData.type) !== 'PrintMetadata';\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/index.ts?");

/***/ }),

/***/ 48008:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   KEYS: function() { return /* binding */ KEYS; }\n/* harmony export */ });\nvar KEYS = {\n  0: 48,\n  1: 49,\n  2: 50,\n  3: 51,\n  4: 52,\n  5: 53,\n  6: 54,\n  7: 55,\n  8: 56,\n  9: 57,\n  A: 65,\n  B: 66,\n  C: 67,\n  D: 68,\n  E: 69,\n  F: 70,\n  G: 71,\n  H: 72,\n  I: 73,\n  J: 74,\n  K: 75,\n  L: 76,\n  M: 77,\n  N: 78,\n  O: 79,\n  P: 80,\n  Q: 81,\n  R: 82,\n  S: 83,\n  T: 84,\n  U: 85,\n  V: 86,\n  W: 87,\n  X: 88,\n  Y: 89,\n  Z: 90,\n  F1: 112,\n  F2: 113,\n  F3: 114,\n  F4: 115,\n  F5: 116,\n  F6: 117,\n  F7: 118,\n  F8: 119,\n  F9: 120,\n  F10: 121,\n  F11: 122,\n  F12: 123,\n  TAB: 9,\n  ENTER: 13,\n  SHIFT: 16,\n  CONTROL: 17,\n  ALT: 18,\n  ESCAPE: 27,\n  SPACE: 32,\n  PAGEUP: 33,\n  PAGEDOWN: 34,\n  END: 35,\n  HOME: 36,\n  ARROWLEFT: 37,\n  ARROWUP: 38,\n  ARROWRIGHT: 39,\n  ARROWDOWN: 40,\n  BACKSPACE: 8,\n  DELETE: 46,\n  META: 91,\n  '*': 106,\n  '+': 107,\n  ';': 186,\n  '=': 187,\n  ',': 188,\n  '-': 189,\n  '.': 190,\n  '/': 191,\n  '`': 192,\n  '[': 219,\n  ']': 221\n  // 反斜杠需和后端讨论显示问题\n  // '\\: 220\n};\n\n// 补充几种按键的简写status\nKEYS.CTRL = 17;\nKEYS.ESC = 27;\nKEYS.LEFT = 37;\nKEYS.UP = 38;\nKEYS.RIGHT = 39;\nKEYS.DOWN = 40;\n\n// 补充几种中文输入法下的status\nKEYS.SEMICOLON = 186; // Semicolon(; ；)\nKEYS.EQUAL = 187; // Equal(==)\nKEYS.COMMA = 188; // Comma(.，)\nKEYS.MINUS = 189; // Minus(--)\nKEYS.PERIOD = 190; // Period(.。)\nKEYS.SLASH = 191; // Slash(? /)\nKEYS.BACKQUOTE = 192; // Backquote(`·)\nKEYS.BRACKETLEFT = 219; // BracketLeft([【)\nKEYS.BRACKETRIGHT = 221; // BracketRight(]】)\nKEYS.BACKSLASH = 11; // Backslash(\\、)\nKEYS.QUOTE = 229; // Quote(')\n\n// 小键盘相关 小键盘status为 PAD + status\nKEYS.PAD0 = 96; // pad(0)\nKEYS.PAD1 = 97; // pad(1)\nKEYS.PAD2 = 98; // pad(2)\nKEYS.PAD3 = 99; // pad(3)\nKEYS.PAD4 = 100; // pad(4)\nKEYS.PAD5 = 101; // pad(5)\nKEYS.PAD6 = 102; // pad(6)\nKEYS.PAD7 = 103; // pad(7)\nKEYS.PAD8 = 104; // pad(8)\nKEYS.PAD9 = 105; // pad(9)\n\n//# sourceURL=webpack://print-designer/./src/utils/keyCode.ts?");

/***/ }),

/***/ 3316:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   layoutGridCellChildFit: function() { return /* binding */ layoutGridCellChildFit; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31408);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(98436);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(21980);\n/* harmony import */ var _getValue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(97332);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(98092);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar layoutGridCellChildFit = function layoutGridCellChildFit(realChanges, dataContext) {\n  var _layoutGridItems, _layoutGridItems2;\n  var _mapItemFromChange = (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_8__.mapItemFromChange)(realChanges, dataContext, function (field) {\n      return field && (0,_grid__WEBPACK_IMPORTED_MODULE_9__.isLayoutGrid)(field);\n    }),\n    layoutGridItems = _mapItemFromChange.items,\n    layoutGridChanges = _mapItemFromChange.changes;\n  var _$cloneDeep = lodash__WEBPACK_IMPORTED_MODULE_12___default().cloneDeep(dataContext.getData()),\n    newItems = _$cloneDeep.items;\n  // 先更新\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(realChanges).call(realChanges, function (_ref) {\n    var _ref2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, 2),\n      id = _ref2[0],\n      changeProp = _ref2[1];\n    var item = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(newItems).call(newItems, function (itm) {\n      return itm.id === id;\n    });\n    if (item) {\n      var _context;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_4___default()(changeProp)).call(_context, function (_ref3) {\n        var _ref4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref3, 2),\n          key = _ref4[0],\n          value = _ref4[1];\n        item[key] = value;\n      });\n    }\n  });\n  var layoutGridCellChildChanges = [];\n  // 不改变网格的行列修改\n  if (!((_layoutGridItems = layoutGridItems) !== null && _layoutGridItems !== void 0 && _layoutGridItems.length)) {\n    var _mapItemFromChange2 = (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_8__.mapItemFromChange)(realChanges, dataContext, function (field, changProp, id, dataContext) {\n        var parentField = field && dataContext.findControl(field.parentId);\n        return parentField && (0,_grid__WEBPACK_IMPORTED_MODULE_9__.isLayoutGrid)(parentField) && field && ((0,_grid__WEBPACK_IMPORTED_MODULE_9__.isGridRow)(field) || (0,_grid__WEBPACK_IMPORTED_MODULE_9__.isGridColumn)(field)) && (_constants__WEBPACK_IMPORTED_MODULE_13__.ROW_HEIGHT in changProp || _constants__WEBPACK_IMPORTED_MODULE_13__.COLUMN_WIDTH in changProp);\n      }),\n      gridRowColumnItems = _mapItemFromChange2.items;\n    if (gridRowColumnItems !== null && gridRowColumnItems !== void 0 && gridRowColumnItems.length) {\n      var _context2, _context3;\n      layoutGridItems = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(_context3 = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_7___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(gridRowColumnItems).call(gridRowColumnItems, function (item) {\n        return item.parentId;\n      })))).call(_context3, function (gridId) {\n        return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(newItems).call(newItems, function (item) {\n          return item.id === gridId;\n        });\n      })).call(_context2, Boolean);\n    }\n  }\n  if ((_layoutGridItems2 = layoutGridItems) !== null && _layoutGridItems2 !== void 0 && _layoutGridItems2.length) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(layoutGridItems).call(layoutGridItems, function (layoutGridItem) {\n      var _context4;\n      var gridId = layoutGridItem.id;\n      var layoutGridData = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(newItems).call(newItems, function (item) {\n        return item.id === gridId;\n      });\n      var gridItems = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_5___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_6___default()(newItems).call(newItems, function (item) {\n        if (item.parentId === gridId) return item;\n      })).call(_context4, Boolean);\n      var _getCollectProps = (0,_grid__WEBPACK_IMPORTED_MODULE_9__.getCollectProps)(gridItems),\n        cells = _getCollectProps.cells;\n      // TODO: 优化，只计算改动的cell\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(cells).call(cells, function (cell) {\n        var id = cell.id;\n        // 单一，直接find\n        var cellChildData = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_3___default()(newItems).call(newItems, function (item) {\n          return item.parentId === id;\n        });\n        if (cellChildData) {\n          var cellSize = (0,_getValue__WEBPACK_IMPORTED_MODULE_10__.getCellSize)({\n            field: cell,\n            dataContext: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_11__.createDataContext)(undefined, {\n              items: newItems\n            }, {\n              keywordMapping: {\n                id: 'id',\n                type: 'type',\n                name: 'name',\n                key: 'key',\n                parentId: 'parentId',\n                items: 'items'\n              }\n            })\n          });\n          if (cellSize) {\n            var cellWidth = cellSize.width,\n              cellHeight = cellSize.height;\n            var _id = cellChildData.id,\n              width = cellChildData.width,\n              height = cellChildData.height;\n            var change = {};\n            if (width > cellWidth) {\n              change.width = cellWidth;\n            }\n            if (height > cellHeight) {\n              change.height = cellHeight;\n            }\n            if (!lodash__WEBPACK_IMPORTED_MODULE_12___default().isEmpty(change)) {\n              layoutGridCellChildChanges.push([_id, change]);\n            }\n          }\n        }\n      });\n    });\n  }\n  return layoutGridCellChildChanges;\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/layoutGridCellChildFit.ts?");

/***/ }),

/***/ 74712:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ preAddHandle; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(11872);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _controlType__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(98600);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(21980);\n/* harmony import */ var _getValue__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(97332);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _preUpdateHandle__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(15296);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(98092);\n/* harmony import */ var _subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(98436);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(41232);\n/* harmony import */ var _utils_control__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(87524);\n/* harmony import */ var _views_center_constant__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(26736);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context15, _context16; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context15 = ownKeys(Object(t), !0)).call(_context15, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context16 = ownKeys(Object(t))).call(_context16, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar propertys = ['color', 'width', 'style'];\nvar horizontalPos = ['left', 'right'];\nfunction preAddHandle(_ref, resolve, reject) {\n  var globalConfig = _ref.globalConfig,\n    dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    action = _ref.action,\n    dataFactory = _ref.dataFactory,\n    modelFactory = _ref.modelFactory;\n  var showMessage = globalConfig.showMessage;\n  var otherUpdates = null;\n  var newControls = action.value;\n  var newControlToArray = _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(newControls) ? newControls : [newControls];\n  var newControl = _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(newControls) ? newControls[0] : newControls;\n  var rootId = dataContext.getRootId();\n  var rootControl = dataContext.findControl(rootId);\n  var width = rootControl.width,\n    height = rootControl.height,\n    marginBottom = rootControl.marginBottom,\n    marginTop = rootControl.marginTop,\n    marginLeft = rootControl.marginLeft,\n    marginRight = rootControl.marginRight;\n  var pageHeight = Math.max(height - Math.max(marginTop, 0) - Math.max(marginBottom, 0), 0);\n  var pageWidth = Math.max(width - Math.max(marginLeft, 0) - Math.max(marginRight, 0), 0);\n  var newControlType = newControl.type,\n    parentId = newControl.parentId,\n    newControlHeight = newControl.height,\n    newControlWidth = newControl.width,\n    newControlY = newControl.y,\n    newControlX = newControl.x,\n    id = newControl.id;\n  var parentControl = dataContext.findControl(parentId);\n  var parentHeight = parentControl.height,\n    parentType = parentControl.type;\n  var headerControls = dataContext.findControlByCondition(function (item) {\n    return item.type === 'Header';\n  });\n  var footerControls = dataContext.findControlByCondition(function (item) {\n    return item.type === 'Footer';\n  });\n  // 没特殊需求，暂时复用\n  // 创建表格，弹向导\n  if (!_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(newControls) && (newControlType === 'DataGrid' || newControlType === _constants__WEBPACK_IMPORTED_MODULE_24__.SUB_GRID_TYPE)) {\n    if (parentId === rootId) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.eventBus.emit('grid-guide', {\n        resolve: resolve,\n        reject: reject,\n        controlType: newControlType,\n        transferData: action.transferData\n      });\n    }\n    return;\n  }\n  // 创建网格，弹向导\n  if (newControlType === 'LayoutGrid') {\n    if (parentId === rootId) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.eventBus.emit('layoutGrid-setting', {\n        resolve: resolve,\n        reject: reject\n      });\n    } else if (parentType === 'TableTail') {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.eventBus.emit('layoutGrid-setting', {\n        resolve: resolve,\n        reject: reject,\n        parentId: parentId\n      });\n    }\n    return;\n  }\n  if (newControlType === 'CardGrid') {\n    if (parentId === rootId) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.eventBus.emit('card-setting', {\n        resolve: resolve,\n        reject: reject\n      });\n    } else if (parentType === 'TableTail') {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.eventBus.emit('card-setting', {\n        resolve: resolve,\n        reject: reject,\n        parentId: parentId\n      });\n    }\n    return;\n  }\n\n  // 创建页眉\n  if ((0,_controlType__WEBPACK_IMPORTED_MODULE_19__.isHeader)(newControl)) {\n    if (!headerControls.length) {\n      if (parentId !== rootId) {\n        reject((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.getLangMsg)('printd.grid.key0042'));\n      }\n      newControl.width = pageWidth;\n      newControl.x = 0;\n      newControl.y = 0;\n      var updateControls = dataContext.findControlByCondition(function (item) {\n        return item.type !== 'Header' && item.type !== 'Footer' && item.parentId === rootId && item.y < newControlHeight;\n      });\n      otherUpdates = updateControls && _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(updateControls).call(updateControls, function (control) {\n        return [control.id, {\n          y: newControlHeight\n        }];\n      });\n      var canvasContainer = document.getElementById('printDesignerCanvasContainer');\n      // canvasContainer?.scrollTo(0, 0)\n      canvasContainer.scrollTop = 0;\n    } else {\n      showMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.getLangMsg)('printd.grid.key0043'));\n      reject((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.getLangMsg)('printd.grid.key0044'));\n    }\n  }\n  // 创建页脚\n  if ((0,_controlType__WEBPACK_IMPORTED_MODULE_19__.isFooter)(newControl)) {\n    if (!footerControls.length) {\n      if (parentId !== rootId) {\n        reject((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.getLangMsg)('printd.grid.key0045'));\n      }\n      newControl.width = pageWidth;\n      newControl.x = 0;\n      newControl.y = pageHeight - newControlHeight;\n      var _updateControls = dataContext.findControlByCondition(function (item) {\n        return item.type !== 'Header' && item.type !== 'Footer' && item.parentId === rootId && item.y + item.height > newControl.y;\n      }) || [];\n      otherUpdates = _updateControls && _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_updateControls).call(_updateControls, function (control) {\n        var relativeHeight = (0,_utils_control__WEBPACK_IMPORTED_MODULE_27__.getControlRelativeHeight)(control, dataContext);\n        return [control.id, {\n          y: (0,_index__WEBPACK_IMPORTED_MODULE_26__.toFloorFix)(newControl.y - relativeHeight, 1)\n        }];\n      });\n      var _canvasContainer = document.getElementById('printDesignerCanvasContainer');\n      var scrollHeight = _canvasContainer.scrollHeight;\n      // canvasContainer?.scrollTo(0, scrollHeight)\n      _canvasContainer.scrollTop = scrollHeight;\n    } else {\n      showMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.getLangMsg)('printd.grid.key0046'));\n      reject((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.getLangMsg)('printd.grid.key0047'));\n    }\n  }\n  // 在页眉、页脚中添加控件逻辑\n  if ((0,_controlType__WEBPACK_IMPORTED_MODULE_19__.isHeader)(parentControl) || (0,_controlType__WEBPACK_IMPORTED_MODULE_19__.isFooter)(parentControl) || (0,_grid__WEBPACK_IMPORTED_MODULE_20__.isGridFooter)(parentControl)) {\n    if (newControlY + newControlHeight > parentHeight) {\n      if (newControlHeight >= parentHeight) {\n        // 高度不够，等比缩放\n        otherUpdates = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(newControlToArray).call(newControlToArray, function (control) {\n          return [control.id, {\n            y: 0,\n            height: parentHeight,\n            width: (0,_index__WEBPACK_IMPORTED_MODULE_26__.toFloorFix)(parentHeight / newControlHeight * newControlWidth, _constants__WEBPACK_IMPORTED_MODULE_24__.PRECISION)\n          }];\n        });\n      } else {\n        otherUpdates = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(newControlToArray).call(newControlToArray, function (control) {\n          return [control.id, {\n            y: parentHeight - newControlHeight\n          }];\n        });\n      }\n    }\n  }\n  // 在页脚中添加控件逻辑\n  // if (isFooter(parentControl)) {\n  //   if ((newControlY + newControlHeight > parentHeight)) {\n  //     if (newControlHeight >= parentHeight) {\n  //       // 高度不够，等比缩放\n  //       otherUpdates = [[id, { y: 0, height: parentHeight, width: parentHeight / newControlHeight * newControlWidth }]]\n  //     } else {\n  //       otherUpdates = [[id, { y: parentHeight - newControlHeight }]]\n  //     }\n  //   }\n  // }\n  // 新增控件，如果存在页眉，则y需加上页眉的高度\n  if (headerControls.length && !(0,_controlType__WEBPACK_IMPORTED_MODULE_19__.isFooter)(newControl) && parentId === rootId) {\n    var header = headerControls[0];\n    var headerHeight = header.height;\n    if (newControlY < headerHeight) {\n      if ((0,_grid__WEBPACK_IMPORTED_MODULE_20__.isDataGrid)(newControl) || (0,_grid__WEBPACK_IMPORTED_MODULE_20__.isLayoutGrid)(newControls)) {\n        newControl.y = newControlY + headerHeight;\n      } else {\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(newControlToArray).call(newControlToArray, function (control) {\n          control.y += headerHeight;\n        });\n      }\n      // otherUpdates = [[id, { y: newControlY + headerHeight }]]\n    }\n  }\n  var bizType = dataContext.getData().bizType;\n  if (bizType === '1' && (0,_controlType__WEBPACK_IMPORTED_MODULE_19__.isBarCode)(newControl)) {\n    newControl.width = pageWidth;\n  }\n  // 在网格单元格中添加控件逻辑\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_20__.isLayoutCell)(parentControl) || (0,_grid__WEBPACK_IMPORTED_MODULE_20__.isDataCell)(parentControl)) {\n    var _getCellSize = (0,_getValue__WEBPACK_IMPORTED_MODULE_21__.getCellSize)({\n        field: parentControl,\n        dataContext: dataContext\n      }),\n      cellWidth = _getCellSize.width,\n      cellHeight = _getCellSize.height;\n    var cellChildControls = dataContext.findControlByCondition(function (item) {\n      return item.parentId === parentId;\n    });\n    if (!cellChildControls.length) {\n      otherUpdates = [[id, {\n        x: 0,\n        y: 0,\n        width: cellWidth,\n        height: cellHeight\n      }]];\n    } else {\n      // const childSize = cellWidth > cellHeight ? { width: toFloorFix(cellHeight / newControlHeight * newControlWidth, PRECISION), height: cellHeight } : {\n      //   width: cellWidth,\n      //   height: toFloorFix(cellWidth / newControlWidth * newControlHeight, PRECISION)\n      // }\n      // otherUpdates = [[id, { x: 0, y: 0, ...childSize }]]\n      reject('error: fail to add control to layoutcell;accept only one children');\n    }\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_20__.isGridType)(newControl)) {\n    var columns = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(newControlToArray).call(newControlToArray, function (item) {\n      return item.parentId === id && item.type === 'DataColumn';\n    });\n    var gridChange = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(columns).call(columns, function (change, column) {\n      change.width = (0,_index__WEBPACK_IMPORTED_MODULE_26__.toFloorFix)(change.width + column.columnWidth, 1);\n      return change;\n    }, {\n      width: 0\n    });\n    otherUpdates = [[id, gridChange]];\n    if ((0,_grid__WEBPACK_IMPORTED_MODULE_20__.isDataGrid)(newControl)) {\n      var subGridIds = newControl.subGridId || [];\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(subGridIds).call(subGridIds, function (subId) {\n        var _dataContext$findCont = dataContext.findControl(subId),\n          subGridDirection = _dataContext$findCont.subGridDirection,\n          subGridX = _dataContext$findCont.x;\n        if (subGridDirection === 'right' && subGridX !== (0,_index__WEBPACK_IMPORTED_MODULE_26__.toFloorFix)(newControlX + gridChange.width, 1)) {\n          otherUpdates.push([subId, {\n            x: (0,_index__WEBPACK_IMPORTED_MODULE_26__.toFloorFix)(newControlX + gridChange.width, 1)\n          }]);\n        }\n      });\n    }\n  }\n  // 添加行\n  // 限制只是单行\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_20__.isGridRow)(newControl)) {\n    var _context, _context3;\n    var index = action.rowIndex;\n    var addIndex = action.index;\n    var direction = action.direction;\n    var gridId = newControl.parentId;\n    var rowType = newControl.rowType;\n    var _getGridItems = (0,_grid__WEBPACK_IMPORTED_MODULE_20__.getGridItems)(dataContext, gridId),\n      gridItems = _getGridItems.items,\n      _gridData = _getGridItems.gridData,\n      _allItems = _getGridItems.allItems;\n    var allItems = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(_allItems);\n    var originGridItems = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(gridItems);\n    var gridData = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(_gridData);\n    var _getCollectProps = (0,_grid__WEBPACK_IMPORTED_MODULE_20__.getCollectProps)(gridItems),\n      _getCollectProps$rows = _getCollectProps.rows,\n      rows = _getCollectProps$rows === void 0 ? [] : _getCollectProps$rows,\n      _getCollectProps$colu = _getCollectProps.columns,\n      _columns = _getCollectProps$colu === void 0 ? [] : _getCollectProps$colu,\n      _getCollectProps$cell = _getCollectProps.cells,\n      cells = _getCollectProps$cell === void 0 ? [] : _getCollectProps$cell,\n      rowItemData = _getCollectProps.rowData,\n      columnItemData = _getCollectProps.columnData,\n      rowCount = _getCollectProps.rowCount;\n    var _gridChange = {\n      height: gridData.height\n    };\n    var cellsData = [];\n    var extendsValue = {};\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.MERGE_CELL_PROP_LIST).call(_constants__WEBPACK_IMPORTED_MODULE_24__.MERGE_CELL_PROP_LIST, function (key) {\n      if (gridData[key]) {\n        extendsValue[key] = gridData[key];\n      }\n    });\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context = action.value).call(_context, function (rowData) {\n      var _context2;\n      _gridChange.height += rowData.rowHeight;\n      gridData.height += rowData.rowHeight;\n      var fields = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context2 = rowItemData[index]).call(_context2, function (_ref2, idx) {\n        var type = _ref2.type,\n          border = _ref2.border,\n          backColor = _ref2.backColor;\n        var transferData = _objectSpread({\n          rowId: rowData.id,\n          columnId: _columns[idx].id,\n          cellType: rowData.rowType\n        }, extendsValue);\n        if ((index !== 0 || action.direction !== 'up') && (index !== _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(rowItemData).length - 1 || action.direction !== 'bottom')) {\n          var newBorder = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(_views_center_constant__WEBPACK_IMPORTED_MODULE_28__.defaultTableBorder);\n          var nextCell = action.direction === 'up' ? rowItemData[index - 1][idx] : rowItemData[index + 1][idx];\n          var DiffBorder = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(propertys).call(propertys, function (key1) {\n            return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(horizontalPos).call(horizontalPos, function (key2) {\n              return border[key1][key2] !== nextCell.border[key1][key2];\n            });\n          });\n          if (!DiffBorder) {\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(propertys).call(propertys, function (key1) {\n              return _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(horizontalPos).call(horizontalPos, function (key2) {\n                return newBorder[key1][key2] = border[key1][key2];\n              });\n            });\n          }\n          (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(transferData, {\n            border: newBorder\n          });\n          backColor === nextCell.backColor && (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(transferData, {\n            backColor: backColor\n          });\n        }\n        return dataFactory({\n          type: type,\n          parentId: gridId,\n          transferData: transferData\n        });\n      });\n      cellsData.push.apply(cellsData, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(fields));\n    });\n    _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_16___default()(allItems).apply(allItems, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context3 = [addIndex, 0]).call(_context3, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(action.value)));\n    allItems.push.apply(allItems, cellsData);\n    var _gridData$mergeConfig = gridData.mergeConfig,\n      mergeConfig = _gridData$mergeConfig === void 0 ? {} : _gridData$mergeConfig;\n    if (!lodash__WEBPACK_IMPORTED_MODULE_18___default().isEmpty(mergeConfig)) {\n      var _context4;\n      var _rowCount = action.value.length;\n      var newMergeConfig = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(_context4 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(mergeConfig)).call(_context4, function (newConfig, key) {\n        var _context5;\n        var _key$split$map = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context5 = key.split('_')).call(_context5, function (num) {\n            return +num;\n          }),\n          _key$split$map2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_key$split$map, 2),\n          row = _key$split$map2[0],\n          column = _key$split$map2[1];\n        var currentMergeConfigRowType = rows[row].rowType;\n        // 不同行类型不走下去\n        var isSameRowType = rowType === currentMergeConfigRowType;\n        var addRowCount = isSameRowType ? _rowCount : 0;\n        var _mergeConfig$key = mergeConfig[key],\n          rowLength = _mergeConfig$key.rowLength,\n          columnLength = _mergeConfig$key.columnLength;\n        if (index < row) {\n          var _context6;\n          newConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context6 = \"\".concat(row + _rowCount, \"_\")).call(_context6, column)] = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, mergeConfig[key], {\n            rowStart: row + _rowCount\n          });\n        } else if (index === row && direction === 'up') {\n          var _context7;\n          newConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context7 = \"\".concat(row + _rowCount, \"_\")).call(_context7, column)] = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, mergeConfig[key], {\n            rowStart: row + _rowCount\n          });\n        } else if (index === row && rowLength !== 1) {\n          newConfig[key] = _objectSpread(_objectSpread({}, mergeConfig[key]), {}, {\n            rowLength: rowLength + addRowCount\n          });\n        } else if (index > row && index < row + rowLength - 1) {\n          newConfig[key] = _objectSpread(_objectSpread({}, mergeConfig[key]), {}, {\n            rowLength: rowLength + addRowCount\n          });\n        } else if (index === row + rowLength - 1 && direction === 'up') {\n          newConfig[key] = _objectSpread(_objectSpread({}, mergeConfig[key]), {}, {\n            rowLength: rowLength + addRowCount\n          });\n        } else {\n          newConfig[key] = _objectSpread({}, mergeConfig[key]);\n        }\n        return newConfig;\n      }, {});\n      _gridChange.mergeConfig = lodash__WEBPACK_IMPORTED_MODULE_18___default().omitBy(newMergeConfig, (lodash__WEBPACK_IMPORTED_MODULE_18___default().isUndefined));\n      gridData.mergeConfig = _gridChange.mergeConfig;\n    }\n    var changes = (0,_grid__WEBPACK_IMPORTED_MODULE_20__.updateGridItemsBorder)(gridData, allItems, originGridItems);\n    // 直接在这里返回\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cellsData).call(cellsData, function (cell) {\n      var changeInfo = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(changes).call(changes, function (_ref3) {\n        var _ref4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ref3, 2),\n          id = _ref4[0],\n          change = _ref4[1];\n        return cell.id === id;\n      });\n      if (changeInfo) {\n        (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(cell, changeInfo[1]);\n      }\n    });\n    var gridChanges = [[gridId, _gridChange]];\n    (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_25__.subDataGridRelationChange)({\n      realChange: gridChanges,\n      dataContext: dataContext\n    });\n    return [action, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createAddAction)(cellsData), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(changes).call(changes, gridChanges))];\n  }\n\n  // 添加列\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_20__.isGridColumn)(newControl)) {\n    var _context8, _context10;\n    var _index = action.columnIndex;\n    var _addIndex = action.index;\n    var _direction = action.direction;\n    var _gridId = newControl.parentId;\n    var _getGridItems2 = (0,_grid__WEBPACK_IMPORTED_MODULE_20__.getGridItems)(dataContext, _gridId),\n      _gridItems = _getGridItems2.items,\n      _gridData2 = _getGridItems2.gridData,\n      _allItems2 = _getGridItems2.allItems;\n    var _allItems3 = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(_allItems2);\n    var _originGridItems = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(_gridItems);\n    var _gridData3 = lodash__WEBPACK_IMPORTED_MODULE_18___default().cloneDeep(_gridData2);\n    var _getCollectProps2 = (0,_grid__WEBPACK_IMPORTED_MODULE_20__.getCollectProps)(_gridItems),\n      _getCollectProps2$row = _getCollectProps2.rows,\n      _rows = _getCollectProps2$row === void 0 ? [] : _getCollectProps2$row,\n      _getCollectProps2$col = _getCollectProps2.columns,\n      _columns2 = _getCollectProps2$col === void 0 ? [] : _getCollectProps2$col,\n      _getCollectProps2$cel = _getCollectProps2.cells,\n      _cells = _getCollectProps2$cel === void 0 ? [] : _getCollectProps2$cel,\n      _rowItemData = _getCollectProps2.rowData,\n      _columnItemData = _getCollectProps2.columnData,\n      columnCount = _getCollectProps2.columnCount;\n    var _gridChange2 = {\n      width: _gridData3.width\n    };\n    var _cellsData = [];\n    var _extendsValue = {};\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_constants__WEBPACK_IMPORTED_MODULE_24__.MERGE_CELL_PROP_LIST).call(_constants__WEBPACK_IMPORTED_MODULE_24__.MERGE_CELL_PROP_LIST, function (key) {\n      if (_gridData3[key]) {\n        _extendsValue[key] = _gridData3[key];\n      }\n    });\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context8 = action.value).call(_context8, function (columnData) {\n      var _context9;\n      _gridData3.width += columnData.columnWidth;\n      _gridChange2.width += columnData.columnWidth;\n      _cellsData.push.apply(_cellsData, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context9 = _columnItemData[_index]).call(_context9, function (_ref5, idx) {\n        var type = _ref5.type;\n        return dataFactory({\n          type: type,\n          parentId: _gridId,\n          transferData: _objectSpread({\n            rowId: _rows[idx].id,\n            columnId: columnData.id,\n            cellType: _rows[idx].rowType\n          }, _extendsValue)\n        });\n      })));\n    });\n    _babel_runtime_corejs3_core_js_stable_instance_splice__WEBPACK_IMPORTED_MODULE_16___default()(_allItems3).apply(_allItems3, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context10 = [_addIndex, 0]).call(_context10, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(action.value)));\n    _allItems3.push.apply(_allItems3, _cellsData);\n    var _gridData3$mergeConfi = _gridData3.mergeConfig,\n      _mergeConfig = _gridData3$mergeConfi === void 0 ? {} : _gridData3$mergeConfi;\n    if (!lodash__WEBPACK_IMPORTED_MODULE_18___default().isEmpty(_mergeConfig)) {\n      var _context11;\n      var _columnCount = action.value.length;\n      var _newMergeConfig = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(_context11 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(_mergeConfig)).call(_context11, function (newConfig, key) {\n        var _context12;\n        var _key$split$map3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context12 = key.split('_')).call(_context12, function (num) {\n            return +num;\n          }),\n          _key$split$map4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_key$split$map3, 2),\n          row = _key$split$map4[0],\n          column = _key$split$map4[1];\n        var _mergeConfig$key2 = _mergeConfig[key],\n          rowLength = _mergeConfig$key2.rowLength,\n          columnLength = _mergeConfig$key2.columnLength;\n        if (_index < column) {\n          var _context13;\n          newConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context13 = \"\".concat(row, \"_\")).call(_context13, column + _columnCount)] = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, _mergeConfig[key], {\n            columnStart: column + _columnCount\n          });\n        } else if (_index === column && _direction === 'up') {\n          var _context14;\n          newConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_context14 = \"\".concat(row, \"_\")).call(_context14, column + _columnCount)] = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, _mergeConfig[key], {\n            columnStart: column + _columnCount\n          });\n        } else if (_index === column && columnLength !== 1) {\n          newConfig[key] = _objectSpread(_objectSpread({}, _mergeConfig[key]), {}, {\n            columnLength: columnLength + _columnCount\n          });\n        } else if (_index > column && _index < column + columnLength - 1) {\n          newConfig[key] = _objectSpread(_objectSpread({}, _mergeConfig[key]), {}, {\n            columnLength: columnLength + _columnCount\n          });\n        } else if (_index === column + columnLength - 1 && _direction === 'up') {\n          newConfig[key] = _objectSpread(_objectSpread({}, _mergeConfig[key]), {}, {\n            columnLength: columnLength + _columnCount\n          });\n        } else {\n          newConfig[key] = _objectSpread({}, _mergeConfig[key]);\n        }\n        return newConfig;\n      }, {});\n      _gridChange2.mergeConfig = lodash__WEBPACK_IMPORTED_MODULE_18___default().omitBy(_newMergeConfig, (lodash__WEBPACK_IMPORTED_MODULE_18___default().isUndefined));\n      _gridData3.mergeConfig = _gridChange2.mergeConfig;\n    }\n    var _changes = (0,_grid__WEBPACK_IMPORTED_MODULE_20__.updateGridItemsBorder)(_gridData3, _allItems3, _originGridItems);\n    // 直接在这里返回\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_cellsData).call(_cellsData, function (cell) {\n      var changeInfo = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_15___default()(_changes).call(_changes, function (_ref6) {\n        var _ref7 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ref6, 2),\n          id = _ref7[0],\n          change = _ref7[1];\n        return cell.id === id;\n      });\n      if (changeInfo) {\n        (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(cell, changeInfo[1]);\n      }\n    });\n    var _gridChanges = [[_gridId, _gridChange2]];\n    (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_25__.subDataGridRelationChange)({\n      realChange: _gridChanges,\n      dataContext: dataContext\n    });\n    return [action, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createAddAction)(_cellsData), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(_changes).call(_changes, _gridChanges))];\n  }\n  //\n  var preHandleResults = [action];\n  if (otherUpdates && otherUpdates.length) {\n    preHandleResults.push.apply(preHandleResults, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__[\"default\"])((0,_preUpdateHandle__WEBPACK_IMPORTED_MODULE_23__[\"default\"])({\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      action: {\n        type: designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.UPDATE,\n        value: otherUpdates\n      },\n      globalConfig: globalConfig\n    })));\n  }\n  return preHandleResults;\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/preAddHandle.ts?");

/***/ }),

/***/ 97612:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _utils_control__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(87524);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(41232);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(21980);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98092);\n/* harmony import */ var _preAddHandle__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(74712);\n/* harmony import */ var _preUpdateHandle__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(15296);\n/* harmony import */ var _preDeleteHandle__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(34856);\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context4 = ownKeys(Object(t), !0)).call(_context4, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar preCustomUpdateHandle = function preCustomUpdateHandle(_ref, resolve, reject) {\n  var globalConfig = _ref.globalConfig,\n    dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    action = _ref.action,\n    dataFactory = _ref.dataFactory,\n    modelFactory = _ref.modelFactory;\n  var change = action.value;\n  if (!change.length) return;\n  var _change = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(change, 2),\n    id = _change[0],\n    property = _change[1];\n  var control = dataContext.findControl(id);\n  var rootId = dataContext.getRootId();\n  var rootControl = dataContext.findControl(rootId);\n  var width = rootControl.width,\n    marginLeft = rootControl.marginLeft,\n    marginRight = rootControl.marginRight;\n  var pageWidth = width - marginLeft - marginRight;\n  var field = dataContext.findControl(id);\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_17__.isCardGrid)(field) && (property === null || property === void 0 ? void 0 : property.methodName) === 'switchDataSource') {\n    var _context;\n    var dataSource = property.dataSource,\n      dataSourceText = property.dataSourceText,\n      dsType = property.dsType;\n    var updateValue = [[id, {\n      dataSource: dataSource,\n      dataSourceText: dataSourceText,\n      dsType: dsType,\n      tableTailId: ''\n    }]];\n    var childControls = dataContext.findControlByCondition(function (item) {\n      return item.parentId === id && item.type === 'LayoutCell';\n    });\n    var tableTailId = control.tableTailId;\n    var deleteedIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(childControls).call(childControls, function (item) {\n      return item.id;\n    });\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context = [(0,designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.createDeleteAction)(tableTailId)]).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_preDeleteHandle__WEBPACK_IMPORTED_MODULE_21__[\"default\"])({\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      action: {\n        type: designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.ActionType.DELETE,\n        value: deleteedIds\n      },\n      globalConfig: globalConfig\n    })), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_preUpdateHandle__WEBPACK_IMPORTED_MODULE_20__[\"default\"])({\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      action: {\n        type: designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.ActionType.UPDATE,\n        value: updateValue\n      },\n      globalConfig: globalConfig\n    })));\n  }\n  if (((0,_grid__WEBPACK_IMPORTED_MODULE_17__.isDataGrid)(control) || (0,_grid__WEBPACK_IMPORTED_MODULE_17__.isSubDataGrid)(control)) && _constants__WEBPACK_IMPORTED_MODULE_18__.DATASOURCE in property) {\n    var _dataSource$, _dataSource$2, _context2, _context3;\n    var x = control.x,\n      y = control.y,\n      controlWidth = control.width,\n      type = control.type,\n      parentGridId = control.parentGridId,\n      subGridDirection = control.subGridDirection,\n      subGridId = control.subGridId;\n    var gridData = {\n      type: type,\n      parentId: rootId\n    };\n    var _dataSource = property.dataSource;\n    var createGrid = (0,_utils_control__WEBPACK_IMPORTED_MODULE_15__.createDataGridModal)(dataFactory, modelFactory);\n    var _dataSourceText = ((_dataSource$ = _dataSource[0]) === null || _dataSource$ === void 0 ? void 0 : _dataSource$.bindText) || '';\n    _dataSourceText = _dataSourceText ? _dataSourceText.replace(/(\\S+)\\.(\\S+)(\\.\\S+)$/g, '$2') : '';\n    var subGridTransferData = {\n      parentGridId: parentGridId,\n      subGridDirection: subGridDirection\n    };\n    var dataGridTransferData = subGridId !== null && subGridId !== void 0 && subGridId.length ? {\n      subGridId: subGridId\n    } : {};\n    var transferData = _objectSpread(_objectSpread({\n      dataSource: ((_dataSource$2 = _dataSource[0]) === null || _dataSource$2 === void 0 ? void 0 : _dataSource$2.dataSource) || '',\n      dataSourceText: _dataSourceText,\n      width: type === 'DataGrid' && !(subGridId !== null && subGridId !== void 0 && subGridId.length) ? pageWidth : controlWidth\n    }, type === 'DataGrid' ? dataGridTransferData : {}), type === 'SubDataGrid' ? subGridTransferData : {});\n    var newControl = createGrid((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, gridData, {\n      cellData: _dataSource,\n      transferData: transferData\n    }));\n    newControl[0].x = x;\n    newControl[0].y = y;\n    var subGridChanges = (0,_grid__WEBPACK_IMPORTED_MODULE_17__.isDataGrid)(control) ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context2 = newControl[0].subGridId || []).call(_context2, function (id) {\n      var _dataContext$findCont = dataContext.findControl(id),\n        subGridDirection = _dataContext$findCont.subGridDirection;\n      if (subGridDirection === 'bottom') {\n        return [id, {\n          parentGridId: newControl[0].id,\n          y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_16__.toFloorFix)(newControl[0].y + newControl[0].height, 1)\n        }];\n      }\n      return [id, {\n        parentGridId: newControl[0].id\n      }];\n    }) : [];\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context3 = [(0,designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.createDeleteAction)(id)]).call(_context3, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_preAddHandle__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      action: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.createAddAction)(newControl, {\n        isDealPos: false\n      }),\n      globalConfig: globalConfig\n    })), [\n    // createAddAction(newControl, { isDealPos: false }),\n    (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.createUpdateAction)(subGridChanges)]);\n  }\n  return (0,_preUpdateHandle__WEBPACK_IMPORTED_MODULE_20__[\"default\"])({\n    dataContext: dataContext,\n    selectionContext: selectionContext,\n    action: {\n      type: designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.ActionType.UPDATE,\n      value: [change]\n    },\n    globalConfig: globalConfig\n  });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (preCustomUpdateHandle);\n\n//# sourceURL=webpack://print-designer/./src/utils/preCustomUpdateHandle.ts?");

/***/ }),

/***/ 34856:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"default\": function() { return /* binding */ preDeleteHandle; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(21980);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(98092);\n/* harmony import */ var _subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(98436);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_23__);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context22, _context23; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context22 = ownKeys(Object(t), !0)).call(_context22, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context23 = ownKeys(Object(t))).call(_context23, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar takeAsArray = function takeAsArray(ele) {\n  return _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(ele) ? ele : [ele];\n};\nvar omitMergeConfigPredicate = function omitMergeConfigPredicate(value) {\n  if (lodash__WEBPACK_IMPORTED_MODULE_23___default().isUndefined(value)) {\n    return true;\n  }\n  var rowLength = value.rowLength,\n    columnLength = value.columnLength;\n  if (rowLength === 1 && columnLength === 1) return true;\n  return false;\n};\nfunction preDeleteHandle(_ref, resolve, reject) {\n  var _context21;\n  var globalConfig = _ref.globalConfig,\n    dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    action = _ref.action,\n    dataFactory = _ref.dataFactory,\n    modelFactory = _ref.modelFactory;\n  var deleteControlId = _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(action.value) ? action.value[0] : action.value;\n  var deleteControl = dataContext.findControl(deleteControlId);\n  var deleteControlIds = takeAsArray(action.value);\n  var deleteControls = dataContext.findControl(deleteControlIds);\n  var otherActions = [];\n\n  // 删除行\n  // 单行\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_19__.isGridRow)(deleteControl)) {\n    var _context;\n    var gridId = deleteControl.parentId;\n    var _getGridItems = (0,_grid__WEBPACK_IMPORTED_MODULE_19__.getGridItems)(dataContext, gridId),\n      gridItems = _getGridItems.items,\n      _gridData = _getGridItems.gridData,\n      allItems = _getGridItems.allItems;\n    var gridData = lodash__WEBPACK_IMPORTED_MODULE_23___default().cloneDeep(_gridData);\n    var _getCollectProps = (0,_grid__WEBPACK_IMPORTED_MODULE_19__.getCollectProps)(gridItems),\n      _getCollectProps$rows = _getCollectProps.rows,\n      rows = _getCollectProps$rows === void 0 ? [] : _getCollectProps$rows,\n      _getCollectProps$colu = _getCollectProps.columns,\n      columns = _getCollectProps$colu === void 0 ? [] : _getCollectProps$colu,\n      _getCollectProps$cell = _getCollectProps.cells,\n      cells = _getCollectProps$cell === void 0 ? [] : _getCollectProps$cell,\n      rowItemData = _getCollectProps.rowData,\n      columnItemData = _getCollectProps.columnData,\n      rowCount = _getCollectProps.rowCount;\n    var items = allItems;\n    var originGridItems = lodash__WEBPACK_IMPORTED_MODULE_23___default().cloneDeep(gridItems);\n    var gridChange = {\n      height: gridData.height\n    };\n    var _gridData$mergeConfig = gridData.mergeConfig,\n      mergeConfig = _gridData$mergeConfig === void 0 ? {} : _gridData$mergeConfig;\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context = takeAsArray(action.value)).call(_context, function (rowId) {\n      var _context2;\n      var rowItemIdx = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_13___default()(rows).call(rows, function (row) {\n        return row.id === rowId;\n      });\n      var rowItem = rows[rowItemIdx];\n      gridChange.height -= rowItem.rowHeight;\n      gridData.height -= rowItem.rowHeight;\n      var rowCellIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context2 = rowItemData[rowItemIdx]).call(_context2, function (cell) {\n        return cell.id;\n      });\n      items = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(items).call(items, function (_ref2) {\n        var id = _ref2.id,\n          parentId = _ref2.parentId;\n        if (rowItem.id === id || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(rowCellIds).call(rowCellIds, id)) return false;\n        return true;\n      });\n      if (!lodash__WEBPACK_IMPORTED_MODULE_23___default().isEmpty(mergeConfig)) {\n        var _context3;\n        var index = rowItemIdx;\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context3 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(mergeConfig)).call(_context3, function (key) {\n          var _context4;\n          var _key$split$map = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context4 = key.split('_')).call(_context4, function (num) {\n              return +num;\n            }),\n            _key$split$map2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_key$split$map, 2),\n            row = _key$split$map2[0],\n            column = _key$split$map2[1];\n          var _mergeConfig$key = mergeConfig[key],\n            rowLength = _mergeConfig$key.rowLength,\n            columnLength = _mergeConfig$key.columnLength;\n          // TODO: 如果只有一行一列，delete掉？虽然现在没什么问题\n          // TODO: length =0\n          if (index < row) {\n            var _context5;\n            mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context5 = \"\".concat(row - 1, \"_\")).call(_context5, column)] = _objectSpread(_objectSpread({}, mergeConfig[key]), {}, {\n              rowStart: row - 1\n            });\n            mergeConfig[key] = undefined;\n          } else if (index > row) {\n            var _mergeConfig$key2 = mergeConfig[key],\n              _rowLength = _mergeConfig$key2.rowLength,\n              _columnLength = _mergeConfig$key2.columnLength;\n            mergeConfig[key] = _objectSpread(_objectSpread({}, mergeConfig[key]), {}, {\n              rowLength: row + _rowLength - 1 < index ? _rowLength : _rowLength - 1\n            });\n          } else {\n            // index === row\n            if (rowLength === 1) {\n              mergeConfig[key] = undefined;\n            } else {\n              var _context6;\n              mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context6 = \"\".concat(row, \"_\")).call(_context6, column)] = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, mergeConfig[key], {\n                rowStart: row,\n                rowLength: rowLength - 1\n              });\n              // mergeConfig[key] = undefined\n            }\n          }\n        });\n        gridChange.mergeConfig = lodash__WEBPACK_IMPORTED_MODULE_23___default().omitBy(mergeConfig, omitMergeConfigPredicate);\n        gridData.mergeConfig = gridChange.mergeConfig;\n      }\n    });\n    var changes = (0,_grid__WEBPACK_IMPORTED_MODULE_19__.updateGridItemsBorder)(gridData, items, originGridItems, true);\n    var gridChanges = [[gridId, gridChange]];\n    (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_22__.subDataGridRelationChange)({\n      realChange: gridChanges,\n      dataContext: dataContext\n    });\n    return [(0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(lodash__WEBPACK_IMPORTED_MODULE_23___default().difference(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(allItems).call(allItems, function (item) {\n      return item.id;\n    }), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(items).call(items, function (item) {\n      return item.id;\n    }))), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(changes).call(changes, gridChanges))];\n  }\n\n  // 删除列\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_19__.isGridColumn)(deleteControl)) {\n    var _dataContext$findCont, _dataContext$findCont2, _context7, _context13;\n    var _gridId = deleteControl.parentId;\n    var _getGridItems2 = (0,_grid__WEBPACK_IMPORTED_MODULE_19__.getGridItems)(dataContext, _gridId),\n      _gridItems = _getGridItems2.items,\n      _gridData2 = _getGridItems2.gridData,\n      _allItems = _getGridItems2.allItems;\n    var _gridData3 = lodash__WEBPACK_IMPORTED_MODULE_23___default().cloneDeep(_gridData2);\n    var _getCollectProps2 = (0,_grid__WEBPACK_IMPORTED_MODULE_19__.getCollectProps)(_gridItems),\n      _getCollectProps2$row = _getCollectProps2.rows,\n      _rows = _getCollectProps2$row === void 0 ? [] : _getCollectProps2$row,\n      _getCollectProps2$col = _getCollectProps2.columns,\n      _columns = _getCollectProps2$col === void 0 ? [] : _getCollectProps2$col,\n      _getCollectProps2$cel = _getCollectProps2.cells,\n      _cells = _getCollectProps2$cel === void 0 ? [] : _getCollectProps2$cel,\n      _rowItemData = _getCollectProps2.rowData,\n      _columnItemData = _getCollectProps2.columnData,\n      _rowCount = _getCollectProps2.rowCount;\n    var _items = _allItems;\n    var _originGridItems = lodash__WEBPACK_IMPORTED_MODULE_23___default().cloneDeep(_gridItems);\n    var _gridChange = {\n      width: _gridData3.width\n    };\n    var _gridData3$mergeConfi = _gridData3.mergeConfig,\n      _mergeConfig = _gridData3$mergeConfi === void 0 ? {} : _gridData3$mergeConfi;\n    var dataRow = ((_dataContext$findCont = dataContext.findControlByCondition(function (control) {\n      return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isGridDataRow)(control) && control.parentId === _gridId;\n    })) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont[0]) || {};\n    var deleteDataCell = (_dataContext$findCont2 = dataContext.findControlByCondition(function (control) {\n      return control.columnId === deleteControl.id && control.rowId === (dataRow === null || dataRow === void 0 ? void 0 : dataRow.id);\n    })) === null || _dataContext$findCont2 === void 0 ? void 0 : _dataContext$findCont2[0];\n    var _ref3 = deleteDataCell || {},\n      bindField = _ref3.bindField,\n      viewText = _ref3.viewText,\n      mergeSummary = _ref3.mergeSummary;\n    var _ref4 = dataRow || {},\n      mergeSummaryField = _ref4.mergeSummaryField,\n      mergeSummaryFieldText = _ref4.mergeSummaryFieldText,\n      mergeByField = _ref4.mergeByField,\n      mergeByFieldText = _ref4.mergeByFieldText;\n    var title = viewText === null || viewText === void 0 ? void 0 : viewText.replace(/^=\\$(\\S+)$/g, '$1');\n    var rowChange = [];\n    var dataRowCells = dataContext.findControlByCondition(function (control) {\n      return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isDetailCell)(control) && control.rowId === (dataRow === null || dataRow === void 0 ? void 0 : dataRow.id);\n    });\n    var mergeSummaryFieldTextArr = mergeSummaryFieldText ? mergeSummaryFieldText.split(';') : [];\n    var mergeByFieldArr = mergeByField ? mergeByField.split(';') : [];\n    var mergeByFieldTextArr = mergeByFieldText ? mergeByFieldText.split(';') : [];\n    var hasSameBindField = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(dataRowCells).call(dataRowCells, function (cell) {\n      return cell.bindField === bindField;\n    }).length > 1;\n    if (mergeByField && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(mergeByFieldArr).call(mergeByFieldArr, bindField) && !hasSameBindField) {\n      var newMergeByField = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeByFieldArr).call(mergeByFieldArr, function (key) {\n        return key !== bindField;\n      }).join(';');\n      // 合并依据字段被清空则需要清除合并汇总字段\n      if (newMergeByField) {\n        rowChange.push([dataRow.id, {\n          mergeByField: newMergeByField,\n          mergeByFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeByFieldTextArr).call(mergeByFieldTextArr, function (key) {\n            return key !== title;\n          }).join(';')\n        }]);\n      } else {\n        rowChange.push([dataRow.id, {\n          mergeByField: '',\n          mergeByFieldText: '',\n          mergeSummaryField: [],\n          mergeSummaryFieldText: ''\n        }]);\n      }\n    } else if (mergeSummary && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(mergeSummaryField).call(mergeSummaryField, bindField) && !hasSameBindField) {\n      rowChange.push([dataRow.id, {\n        mergeSummaryField: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeSummaryField).call(mergeSummaryField, function (key) {\n          return key !== bindField;\n        }),\n        mergeSummaryFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeSummaryFieldTextArr).call(mergeSummaryFieldTextArr, function (key) {\n          return key !== title;\n        }).join(';')\n      }]);\n    }\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context7 = takeAsArray(action.value)).call(_context7, function (columnId) {\n      var _context8;\n      var columnItemIdx = _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_13___default()(_columns).call(_columns, function (column) {\n        return column.id === columnId;\n      });\n      var columnItem = _columns[columnItemIdx];\n      _gridChange.width -= columnItem.columnWidth;\n      _gridData3.width -= columnItem.columnWidth;\n      var columnCellIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context8 = _columnItemData[columnItemIdx]).call(_context8, function (cell) {\n        return cell.id;\n      });\n      _items = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_items).call(_items, function (_ref5) {\n        var id = _ref5.id,\n          parentId = _ref5.parentId;\n        if (columnItem.id === id || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(columnCellIds).call(columnCellIds, id)) return false;\n        return true;\n      });\n      if (!lodash__WEBPACK_IMPORTED_MODULE_23___default().isEmpty(_mergeConfig)) {\n        var _context9;\n        var index = columnItemIdx;\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context9 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(_mergeConfig)).call(_context9, function (key) {\n          var _context10;\n          var _key$split$map3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context10 = key.split('_')).call(_context10, function (num) {\n              return +num;\n            }),\n            _key$split$map4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_key$split$map3, 2),\n            row = _key$split$map4[0],\n            column = _key$split$map4[1];\n          var _mergeConfig$key3 = _mergeConfig[key],\n            rowLength = _mergeConfig$key3.rowLength,\n            columnLength = _mergeConfig$key3.columnLength;\n          // TODO: 如果只有一行一列，delete掉？虽然现在没什么问题\n          // TODO: length =0\n          if (index < column) {\n            var _context11;\n            _mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context11 = \"\".concat(row, \"_\")).call(_context11, column - 1)] = _objectSpread(_objectSpread({}, _mergeConfig[key]), {}, {\n              columnStart: column - 1\n            });\n            _mergeConfig[key] = undefined;\n          } else if (index > column) {\n            var _mergeConfig$key4 = _mergeConfig[key],\n              _rowLength2 = _mergeConfig$key4.rowLength,\n              _columnLength2 = _mergeConfig$key4.columnLength;\n            _mergeConfig[key] = _objectSpread(_objectSpread({}, _mergeConfig[key]), {}, {\n              columnLength: column + _columnLength2 - 1 < index ? _columnLength2 : _columnLength2 - 1\n              // columnLength: columnLength - 1\n            });\n          } else {\n            // index === column\n            if (columnLength === 1) {\n              _mergeConfig[key] = undefined;\n            } else {\n              var _context12;\n              _mergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context12 = \"\".concat(row, \"_\")).call(_context12, column)] = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, _mergeConfig[key], {\n                columnStart: column,\n                columnLength: columnLength - 1\n              });\n              // mergeConfig[key] = undefined\n            }\n          }\n        });\n        _gridChange.mergeConfig = lodash__WEBPACK_IMPORTED_MODULE_23___default().omitBy(_mergeConfig, omitMergeConfigPredicate);\n        _gridData3.mergeConfig = _gridChange.mergeConfig;\n      }\n    });\n    var _changes = (0,_grid__WEBPACK_IMPORTED_MODULE_19__.updateGridItemsBorder)(_gridData3, _items, _originGridItems, true);\n    var _gridChanges = [[_gridId, _gridChange]];\n    (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_22__.subDataGridRelationChange)({\n      realChange: _gridChanges,\n      dataContext: dataContext\n    });\n    return [(0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(lodash__WEBPACK_IMPORTED_MODULE_23___default().difference(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_allItems).call(_allItems, function (item) {\n      return item.id;\n    }), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_items).call(_items, function (item) {\n      return item.id;\n    }))), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context13 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_changes).call(_changes, _gridChanges)).call(_context13, rowChange))];\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_19__.isGridRelativeControl)(deleteControl)) {\n    var _context14, _context16, _context17, _context18;\n    // 场景：选择多行多列、多单元格、相同数据源字段\n    var _changes2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context14 = action.value).call(_context14, function (id) {\n      return [id, _constants__WEBPACK_IMPORTED_MODULE_21__.EMPTY_CELL_TEXT];\n    });\n    var rowChangesMap = {};\n    var dataCellChanges = [];\n    var _gridData4 = [];\n    var parentGridId = '';\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(deleteControls).call(deleteControls, function (deleteControl) {\n      var parentId = deleteControl.parentId,\n        parentType = deleteControl.type,\n        bindField = deleteControl.bindField,\n        id = deleteControl.id;\n      _gridData4 = _gridData4 || dataContext.findControl(parentGridId);\n      parentGridId = parentGridId || parentId;\n      if (bindField) {\n        var _viewText = deleteControl.viewText,\n          rowId = deleteControl.rowId,\n          _mergeSummary = deleteControl.mergeSummary;\n        var _title = _viewText.replace(/^=\\$(\\S+)$/g, '$1');\n        var _dataContext$findCont3 = dataContext.findControl(rowId),\n          _mergeSummaryField = _dataContext$findCont3.mergeSummaryField,\n          _mergeSummaryFieldText = _dataContext$findCont3.mergeSummaryFieldText,\n          _mergeByField = _dataContext$findCont3.mergeByField,\n          _mergeByFieldText = _dataContext$findCont3.mergeByFieldText;\n        if (!rowChangesMap[rowId]) {\n          rowChangesMap[rowId] = {\n            mergeByField: _mergeByField,\n            mergeByFieldText: _mergeByFieldText,\n            mergeSummaryField: _mergeSummaryField,\n            mergeSummaryFieldText: _mergeSummaryFieldText\n          };\n        }\n        var _mergeByFieldArr = rowChangesMap[rowId].mergeByField ? rowChangesMap[rowId].mergeByField.split(';') : [];\n        var _mergeByFieldTextArr = rowChangesMap[rowId].mergeByFieldText ? rowChangesMap[rowId].mergeByFieldText.split(';') : [];\n        var _mergeSummaryFieldTextArr = rowChangesMap[rowId].mergeSummaryFieldText ? rowChangesMap[rowId].mergeSummaryFieldText.split(';') : [];\n        var detailCells = dataContext.findControlByCondition(function (control) {\n          return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isDetailCell)(control) && control.rowId === rowId;\n        });\n        var _hasSameBindField = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(detailCells).call(detailCells, function (cell) {\n          return cell.bindField === bindField;\n        }).length > 1;\n        // 如果数据源被设置为了合并依据字段，则清除合并依据和合并汇总\n        if (rowChangesMap[rowId].mergeByField && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(_mergeByFieldArr).call(_mergeByFieldArr, bindField) && !_hasSameBindField) {\n          var _context15;\n          dataCellChanges = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context15 = []).call(_context15, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(dataCellChanges), [[id, {\n            mergeSummary: false\n          }]]);\n          var _newMergeByField = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeByFieldArr).call(_mergeByFieldArr, function (key) {\n            return key !== bindField;\n          }).join(';');\n          // 合并依据字段被清空则需要清除合并汇总字段\n          if (_newMergeByField) {\n            rowChangesMap[rowId] = _objectSpread(_objectSpread({}, rowChangesMap[rowId]), {}, {\n              mergeByField: _newMergeByField,\n              mergeByFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeByFieldTextArr).call(_mergeByFieldTextArr, function (key) {\n                return key !== _title;\n              }).join(';')\n            });\n          } else {\n            rowChangesMap[rowId] = _objectSpread(_objectSpread({}, rowChangesMap[rowId]), {}, {\n              mergeByField: '',\n              mergeByFieldText: '',\n              mergeSummaryField: [],\n              mergeSummaryFieldText: ''\n            });\n          }\n        } else if (_mergeSummary && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(_mergeSummaryField).call(_mergeSummaryField, bindField) && !_hasSameBindField) {\n          // 如果数据源被设置为了合并汇总字段里的勾选，则清除合并汇总里的勾选\n          rowChangesMap[rowId] = _objectSpread(_objectSpread({}, rowChangesMap[rowId]), {}, {\n            mergeSummaryField: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeSummaryField).call(_mergeSummaryField, function (key) {\n              return key !== bindField;\n            }),\n            mergeSummaryFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeSummaryFieldTextArr).call(_mergeSummaryFieldTextArr, function (key) {\n              return key !== _title;\n            }).join(';')\n          });\n          _changes2.push([id, {\n            mergeSummary: false\n          }]);\n        }\n      }\n    });\n    var rowChanges = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(_context16 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(rowChangesMap)).call(_context16, function (rowId) {\n      return [rowId, rowChangesMap[rowId]];\n    });\n    _changes2 = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context17 = []).call(_context17, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_changes2), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(rowChanges), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(dataCellChanges));\n    // 如果数据行的单元格数据源都被清空了，则需清除主表格的数据源\n    var needClearGridDatasource = ((0,_grid__WEBPACK_IMPORTED_MODULE_19__.isDataGrid)(_gridData4) || (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isSubDataGrid)(_gridData4)) && !dataContext.findControlByCondition(function (item) {\n      var _action$value;\n      var parentId = item.parentId,\n        cellType = item.cellType,\n        bindField = item.bindField,\n        cellId = item.id;\n      return parentId === parentGridId && cellType === 'Detail' && !((_action$value = action.value) !== null && _action$value !== void 0 && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(_action$value).call(_action$value, cellId)) && bindField && bindField !== '=getRowNumber()';\n    }).length;\n    if (needClearGridDatasource) {\n      _changes2.push([parentGridId, {\n        dataSource: '',\n        dataSourceText: ''\n      }]);\n    }\n    var childControlIds = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17___default()(_context18 = action.value).call(_context18, function (ids, id) {\n      var _context19;\n      var child = dataContext.findControlByCondition(function (item) {\n        return item.parentId === id;\n      }) || [];\n      var childIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_14___default()(child).call(child, function (item) {\n        return item.id;\n      });\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context19 = []).call(_context19, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ids), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(childIds));\n    }, []);\n    return [(0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)(_changes2), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(childControlIds)];\n  }\n  if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18___default()(deleteControls).call(deleteControls, function (control) {\n    return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isDataGrid)(control);\n  })) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(deleteControls).call(deleteControls, function (control) {\n      var subGridId = control.subGridId;\n      var tableTailId = control.tableTailId;\n      if (tableTailId) {\n        otherActions.push((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(tableTailId));\n      }\n      if (subGridId && subGridId.length > 0) {\n        otherActions.push((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(subGridId));\n      }\n    });\n  }\n  if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18___default()(deleteControls).call(deleteControls, function (control) {\n    return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isCardGrid)(control);\n  })) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(deleteControls).call(deleteControls, function (control) {\n      var tableTailId = control.tableTailId;\n      if (tableTailId) {\n        otherActions.push((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createDeleteAction)(tableTailId));\n      }\n    });\n  }\n  if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18___default()(deleteControls).call(deleteControls, function (control) {\n    return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isGridFooter)(control);\n  })) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(deleteControls).call(deleteControls, function (control) {\n      var parentGridId = control.parentGridId;\n      if (parentGridId && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(deleteControlIds).call(deleteControlIds, parentGridId)) {\n        otherActions.push((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[parentGridId, {\n          hasTableTail: '',\n          tableTailId: ''\n        }]]));\n      }\n    });\n  }\n  if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_18___default()(deleteControls).call(deleteControls, function (control) {\n    return (0,_grid__WEBPACK_IMPORTED_MODULE_19__.isSubDataGrid)(control);\n  })) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(deleteControls).call(deleteControls, function (control) {\n      var parentGridId = control.parentGridId;\n      if (parentGridId && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(deleteControlIds).call(deleteControlIds, parentGridId)) {\n        var _context20;\n        otherActions.push((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_20__.createUpdateAction)([[parentGridId, {\n          subGridId: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context20 = dataContext.findControl(parentGridId).subGridId).call(_context20, function (id) {\n            return id !== control.id;\n          })\n        }]]));\n      }\n    });\n  }\n  return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context21 = [action]).call(_context21, otherActions);\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/preDeleteHandle.ts?");

/***/ }),

/***/ 69168:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _preAddHandle__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(74712);\n/* harmony import */ var _preUpdateHandle__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(15296);\n/* harmony import */ var _preCustomUpdateHandle__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(97612);\n/* harmony import */ var _preDeleteHandle__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(34856);\n/* harmony import */ var _dealPosition__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(89160);\n/* harmony import */ var _controlType__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(98600);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(21980);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(41232);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(98092);\n\n\n\n\nvar _excluded = [\"type\", \"value\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar preHandleFnMap = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.ADD, _preAddHandle__WEBPACK_IMPORTED_MODULE_15__[\"default\"]), designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.UPDATE, _preUpdateHandle__WEBPACK_IMPORTED_MODULE_16__[\"default\"]), designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.CUSTOMUPDATE, _preCustomUpdateHandle__WEBPACK_IMPORTED_MODULE_17__[\"default\"]), designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.DELETE, _preDeleteHandle__WEBPACK_IMPORTED_MODULE_18__[\"default\"]);\nvar preHandle = function preHandle(_ref) {\n  var _globalConfig$positio;\n  var action = _ref.action,\n    dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    globalConfig = _ref.globalConfig,\n    dataFactory = _ref.dataFactory,\n    modelFactory = _ref.modelFactory,\n    success = _ref.success,\n    fail = _ref.fail;\n  var positionRecords = ((_globalConfig$positio = globalConfig.positionRecordsRef) === null || _globalConfig$positio === void 0 ? void 0 : _globalConfig$positio.current) || {};\n  var dataRef = globalConfig.dataRef,\n    keywordMapping = globalConfig.keywordMapping;\n  var succesProxy = function succesProxy(actions) {\n    var appendActions = [];\n    var newActions = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(actions).call(actions, function (action) {\n      var type = action.type,\n        value = action.value,\n        rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(action, _excluded);\n      // 判断是否需要预处理偏移量\n      var _ref2 = rest || {},\n        _ref2$isDealPos = _ref2.isDealPos,\n        isDealPos = _ref2$isDealPos === void 0 ? true : _ref2$isDealPos;\n      if (type === designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.ADD || type === designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.ActionType.PASTE) {\n        if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13___default()(value)) {\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(value).call(value, function (val) {\n            val.key = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createUniqueKey)(val.key, val.type, dataRef.current, keywordMapping);\n            dataRef.current.push(val);\n          });\n          if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_21__.isSubDataGrid)(value[0])) {\n            var _context;\n            var pageWidth = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_21__.getPaperSize)(dataContext).width;\n            var _value$ = value[0],\n              parentGridId = _value$.parentGridId,\n              subGridDirection = _value$.subGridDirection,\n              id = _value$.id;\n            var _dataContext$findCont = dataContext.findControl(parentGridId),\n              parentGridWidth = _dataContext$findCont.width,\n              parentGridX = _dataContext$findCont.x,\n              parentGridHeight = _dataContext$findCont.height,\n              fixedRowAtPage = _dataContext$findCont.fixedRowAtPage,\n              fixedRowCount = _dataContext$findCont.fixedRowCount;\n            var detailRow = dataContext.findControlByCondition(function (item) {\n              return item.parentId === parentGridId && item.rowType === 'Detail';\n            })[0];\n            var increaseHeight = (detailRow === null || detailRow === void 0 ? void 0 : detailRow.rowHeight) * (fixedRowCount - 1);\n            var mergeFixRowAtPage = fixedRowAtPage ? {\n              fixedRowAtPage: false,\n              height: parentGridHeight - increaseHeight\n            } : {};\n            // 数据表格自己改变宽度呢?\n            if (subGridDirection === 'right' && isDealPos && parentGridX === 0 && pageWidth - parentGridWidth < 1) {\n              var _otherActions$;\n              var otherActions = (0,_preUpdateHandle__WEBPACK_IMPORTED_MODULE_16__[\"default\"])({\n                dataContext: dataContext,\n                selectionContext: selectionContext,\n                globalConfig: globalConfig,\n                action: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createUpdateAction)([[parentGridId, {\n                  width: (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(pageWidth / 2, _constants__WEBPACK_IMPORTED_MODULE_24__.PRECISION)\n                }]])\n              });\n              (_otherActions$ = otherActions[0]) === null || _otherActions$ === void 0 || (_otherActions$ = _otherActions$.value) === null || _otherActions$ === void 0 || _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_otherActions$).call(_otherActions$, function (actionValue) {\n                var _actionValue = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(actionValue, 2),\n                  id = _actionValue[0],\n                  change = _actionValue[1];\n                if (id === parentGridId) {\n                  var width = change.width;\n                  if (width && width !== parentGridWidth) {\n                    value[0].x = width;\n                  }\n                }\n              });\n              appendActions.push.apply(appendActions, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(otherActions));\n            }\n            // 下方放置子数据表格时，需要把y值调整下\n            var subGridYChange = subGridDirection === 'bottom' && fixedRowAtPage ? [[id, {\n              y: (0,_utils__WEBPACK_IMPORTED_MODULE_23__.toRoundFix)(y - increaseHeight, _constants__WEBPACK_IMPORTED_MODULE_24__.PRECISION)\n            }]] : [];\n            appendActions.push((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(_context = [[parentGridId, _objectSpread({\n              subGridId: [id]\n            }, mergeFixRowAtPage)]]).call(_context, subGridYChange)));\n          }\n          var newValue = isDealPos ? _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(value).call(value, function (control) {\n            var parentId = control.parentId;\n            return (0,_dealPosition__WEBPACK_IMPORTED_MODULE_19__[\"default\"])(control, (0,_controlType__WEBPACK_IMPORTED_MODULE_20__.dealParentItem)(dataContext.findControl(parentId)), parentId, positionRecords);\n          }) : value;\n          if ((rest === null || rest === void 0 ? void 0 : rest.addType) === 'addField' && !!newValue[1]) {\n            // 纸张限制\n            if (newValue[0].x + newValue[0].width + newValue[1].width <= (0,_utils_grid__WEBPACK_IMPORTED_MODULE_21__.getPaperSize)(dataContext).width) {\n              newValue[1].x = newValue[0].x + newValue[0].width;\n              newValue[1].y = newValue[0].y;\n            }\n          }\n          return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createAddAction)(newValue, rest);\n        } else {\n          value.key = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createUniqueKey)(value.key, value.type, dataRef.current, keywordMapping);\n          dataRef.current.push(value);\n          var parentId = value.parentId;\n          return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_22__.createAddAction)((0,_dealPosition__WEBPACK_IMPORTED_MODULE_19__[\"default\"])(value, (0,_controlType__WEBPACK_IMPORTED_MODULE_20__.dealParentItem)(dataContext.findControl(parentId)), parentId, positionRecords), rest);\n        }\n      } else {\n        return action;\n      }\n    });\n    success(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_14___default()(newActions).call(newActions, appendActions));\n  };\n  var preHandleResults = [];\n  var type = action.type;\n  var preHandleFn = preHandleFnMap[type];\n  if (preHandleFn) {\n    var allActions = preHandleFn({\n      globalConfig: globalConfig,\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      action: action,\n      dataFactory: dataFactory,\n      modelFactory: modelFactory\n    }, succesProxy, fail);\n    if (allActions) {\n      preHandleResults.push.apply(preHandleResults, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(allActions));\n    }\n  } else {\n    preHandleResults.push(action);\n  }\n  if (preHandleResults.length) {\n    succesProxy(preHandleResults);\n  }\n  // 不能同步reject\n  // else {\n  //   fail()\n  // }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (preHandle);\n\n//# sourceURL=webpack://print-designer/./src/utils/preHandle.ts?");

/***/ }),

/***/ 74780:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   preHandleUpdateValue: function() { return /* binding */ preHandleUpdateValue; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31408);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(73400);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(21980);\n/* harmony import */ var _controlType__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(98600);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(98092);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(87524);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(41232);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context25, _context26; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context25 = ownKeys(Object(t), !0)).call(_context25, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context26 = ownKeys(Object(t))).call(_context26, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar preHandleUpdateValue = function preHandleUpdateValue(_ref) {\n  var change = _ref.change,\n    id = _ref.id,\n    dataContext = _ref.dataContext,\n    globalConfig = _ref.globalConfig,\n    addActionRef = _ref.addActionRef,\n    action = _ref.action;\n  var definition = globalConfig.definition,\n    dataRef = globalConfig.dataRef,\n    showMessage = globalConfig.showMessage;\n  var rootId = dataContext.getRootId();\n  // TODO: 这里还是有些问题\n  // 单个控件\n  var field = dataContext.findControl(id);\n  if ('key' in change) {\n    var _context;\n    var allKeyList = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context = dataRef.current).call(_context, function (data) {\n      return data.key;\n    });\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(allKeyList).call(allKeyList, change.key)) {\n      showMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.getLangMsg)('printd.grid.key0048'));\n      // 这里直接返回的话，Input的内部状态不会刷\n      return {\n        change: field.key,\n        id: id\n      };\n    }\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_23__.isGridRelativeControl)(field)) {\n    var isRow = ('height' in change);\n    var isColumn = ('width' in change);\n    if (isRow || isColumn) {\n      var propName = isRow ? _constants__WEBPACK_IMPORTED_MODULE_25__.HEIGHT : _constants__WEBPACK_IMPORTED_MODULE_25__.WIDTH;\n      var isHeightPropName = propName === _constants__WEBPACK_IMPORTED_MODULE_25__.HEIGHT;\n      var isWidthPropName = propName === _constants__WEBPACK_IMPORTED_MODULE_25__.WIDTH;\n      var value = field[propName];\n      var newVal = change[propName];\n      var parentId = field.parentId,\n        rowId = field.rowId,\n        columnId = field.columnId;\n      var rowItem = dataContext.findControl(rowId);\n      var columnItem = dataContext.findControl(columnId);\n      var gridItem = dataContext.findControl(parentId);\n      var distance = newVal - value;\n      var addtionRowHeight = 0;\n      if ((0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailRow)(rowItem) && gridItem.fixedRowAtPage && gridItem.fixedRowCount > 1) {\n        addtionRowHeight = distance * (gridItem.fixedRowCount - 1);\n      }\n      var realChange = [[id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, newVal)], isHeightPropName ? [rowItem.id, {\n        rowHeight: newVal\n      }] : [columnItem.id, {\n        columnWidth: newVal\n      }]];\n      var gridData = dataContext.findControl(parentId);\n      if (gridData.mergeConfig) {\n        var cells = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.getMergeRegion)({\n          items: dataContext.getData().items,\n          gridData: gridData,\n          rowId: rowId,\n          columnId: columnId\n        });\n        if (cells.length) {\n          var _context2, _context3;\n          var set = new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_14___default())();\n          if (isColumn) {\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n              set.add(cell.columnId);\n            });\n          } else {\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(cells).call(cells, function (cell) {\n              set.add(cell.rowId);\n            });\n          }\n          var items = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context2 = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(set)).call(_context2, function (id) {\n            return dataContext.findControl(id);\n          });\n          var newValue = isColumn ? change.width : change.height;\n          var changePropName = isColumn ? 'columnWidth' : 'rowHeight';\n          var afterChange = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context3 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.calcEvenlySplit)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(items).call(items, function (item) {\n            return item[changePropName];\n          }), newValue)).call(_context3, function (val, idx) {\n            // const cellChange = realChange.find(([id, change]) => cellsIds.includes(id) && dataContext.findControl(id)[cellSubParentId] === items[idx].id)\n            // 更正单元格的正确修改宽高\n            // cellChange && (cellChange[1][cellChangePropName] = val)\n            return [items[idx].id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, changePropName, val)];\n          });\n          afterChange.unshift.apply(afterChange, realChange);\n          designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.console.log(lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(afterChange), 'afterChange', (0,_grid__WEBPACK_IMPORTED_MODULE_23__.mergeChanges)(afterChange));\n          return (0,_grid__WEBPACK_IMPORTED_MODULE_23__.mergeChanges)(afterChange);\n          // ...realChange\n        }\n      }\n      return (0,_grid__WEBPACK_IMPORTED_MODULE_23__.mergeChanges)(realChange);\n    }\n  }\n  if (field && (0,_controlType__WEBPACK_IMPORTED_MODULE_24__.isLine)(field)) {\n    if (change.border) {\n      var _context4;\n      var borderWidth = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context4 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default()(change.border.width)).call(_context4, function (w) {\n        return w;\n      })[0];\n      if (change.changeBorderType !== 'color') {\n        var _context5, _context6;\n        change.height = (0,_index__WEBPACK_IMPORTED_MODULE_29__.calculatorPxtoMM)(borderWidth, change.scale / 100, 2);\n        var dashArr = ['dashed', 'dotted'];\n        var newLineType = change.border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context5 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default()(change.border.style)).call(_context5, function (t) {\n          return t;\n        })[0];\n        var lineType = field.border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context6 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default()(field.border.style)).call(_context6, function (t) {\n          return t;\n        })[0];\n        if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(dashArr).call(dashArr, newLineType) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(dashArr).call(dashArr, lineType) || newLineType === 'solid' && lineType === 'solid') {} else {\n          var _context7, _context8, _context9, _context10;\n          var color = field.border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context7 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default()(field.border.color)).call(_context7, function (t) {\n            return t;\n          })[0];\n          var width = field.border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context8 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default()(field.border.width)).call(_context8, function (t) {\n            return t;\n          })[0];\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context9 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(field.border.color)).call(_context9, function (key) {\n            change.border.color[key] = color;\n          });\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context10 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(field.border.width)).call(_context10, function (key) {\n            change.border.width[key] = width;\n          });\n        }\n      } else {\n        var _context11, _context12;\n        var _lineType = field.border && _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context11 = _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_15___default()(field.border.style)).call(_context11, function (t) {\n          return t;\n        })[0];\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context12 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(field.border.style)).call(_context12, function (key) {\n          change.border.style[key] = _lineType;\n        });\n      }\n      if (field.direction === 'V') {\n        change.width = change.height || field.width;\n        change.height = field.height;\n      }\n    }\n    if (change.direction && change.direction !== field.direction) {\n      change.width = field.height;\n      change.height = field.width;\n    }\n    return {\n      change: change,\n      id: id\n    };\n  }\n  if (field && (0,_controlType__WEBPACK_IMPORTED_MODULE_24__.isBarCode)(field)) {\n    if (_constants__WEBPACK_IMPORTED_MODULE_25__.ROTATE in change) {\n      var _width = field.width,\n        height = field.height,\n        x = field.x,\n        y = field.y;\n      if ((0,_control__WEBPACK_IMPORTED_MODULE_27__.needReverseSize)(field, change.rotate)) {\n        change.width = height;\n        change.height = _width;\n        var newPosition = {\n          x: (0,_index__WEBPACK_IMPORTED_MODULE_29__.toFloorFix)(x + _width / 2 - height / 2),\n          y: (0,_index__WEBPACK_IMPORTED_MODULE_29__.toFloorFix)(y + height / 2 - _width / 2)\n        };\n        change.x = newPosition.x;\n        change.y = newPosition.y;\n      }\n      return {\n        id: id,\n        change: change\n      };\n    }\n  }\n  if (field && (0,_controlType__WEBPACK_IMPORTED_MODULE_24__.isTextField)(field)) {\n    if (_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER in change) {\n      var newType = action[_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER_TYPE];\n      var type = newType || field[_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER_TYPE]; // 可能为空\n      change[_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER_TYPE] = type || field[_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER_TYPE];\n    }\n  }\n  if ((0,_grid__WEBPACK_IMPORTED_MODULE_23__.isGridType)(field)) {\n    var oldItemValue = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(field);\n    // TODO: 属性过滤？防止不必要的添加属性or新操作方法(proxy)\n    var newItemValue = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep((0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, oldItemValue, change));\n    var realChanges = [[id, change]];\n    // const changeId = id\n    var _dataContext$getData = dataContext.getData(),\n      allItems = _dataContext$getData.items;\n    var _items = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(allItems).call(allItems, function (item) {\n      return item.parentId === id;\n    });\n    var _getCollectProps = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.getCollectProps)(_items),\n      _getCollectProps$rows = _getCollectProps.rows,\n      rows = _getCollectProps$rows === void 0 ? [] : _getCollectProps$rows,\n      _getCollectProps$colu = _getCollectProps.columns,\n      columns = _getCollectProps$colu === void 0 ? [] : _getCollectProps$colu,\n      _getCollectProps$cell = _getCollectProps.cells,\n      _cells = _getCollectProps$cell === void 0 ? [] : _getCollectProps$cell,\n      rowItemData = _getCollectProps.rowData,\n      columnItemData = _getCollectProps.columnData;\n    var _x = newItemValue.x,\n      _y = newItemValue.y,\n      gridId = newItemValue.id,\n      _height = newItemValue.height,\n      _width2 = newItemValue.width,\n      detailRowHeight = newItemValue.detailRowHeight,\n      fixedRowAtPage = newItemValue.fixedRowAtPage,\n      templateRowCount = newItemValue.fixedRowCount,\n      mergeConfig = newItemValue.mergeConfig,\n      subGridId = newItemValue.subGridId,\n      parentGridId = newItemValue.parentGridId,\n      subGridDirection = newItemValue.subGridDirection;\n    var _getRowData = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.getRowData)({\n        columns: columns,\n        rows: rows,\n        cells: _cells,\n        mergeConfig: mergeConfig,\n        templateRowCount: templateRowCount,\n        fixedRowAtPage: fixedRowAtPage,\n        allItems: dataContext.getData().items\n      }),\n      rowData = _getRowData.rowData;\n    if (_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER in change) {\n      var _context13;\n      // const specialType = SPECIAL_BORDER_TYPES\n      // const newType = action[GRID_BORDER_TYPE]\n      var changeType = action.changeType;\n      var newGridBorder = change.gridBorder;\n      var _value = change[_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER];\n      var border = field[_constants__WEBPACK_IMPORTED_MODULE_25__.BORDER];\n      var _items2;\n      if (newGridBorder) {\n        var _color = newGridBorder.color,\n          _type = newGridBorder.type,\n          line = newGridBorder.line;\n        _items2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.handleNewGridBorder)(_color, _type, line, rowData, {\n          rc: rows.length,\n          cc: columns.length\n        });\n        delete change.gridBorder;\n      } else if (changeType === 'borderWidth') {\n        _items2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.handleGridBorderWidth)(_value, rowData);\n      } else if (changeType === 'borderColor') {\n        _items2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.handleGridBorderColor)(_value, rowData);\n      } else if (changeType === 'borderStyle') {\n        _items2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.handleGridBorderStyle)(_value, rowData);\n      } else if (change.formatBrush) {\n        _items2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.handleGridOutBorder)(lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(rowData), change.border, {\n          rc: rows.length,\n          cc: columns.length\n        });\n        delete change.formatBrush;\n      } else {\n        // if (!_.isEqual(border, value)) {\n        _items2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.handleGridBorderByType)(_value, undefined, rowData, rows.length, columns.length);\n        // }\n      }\n      // const type = newType || field[GRID_BORDER_TYPE] // 可能为空\n      // change[GRID_BORDER_TYPE] = type || field[GRID_BORDER_TYPE]\n      // if ((!_.isEqual(border, value) /** || specialType.includes(type) */)) {\n      if (!_items2) return realChanges;\n      return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(realChanges).call(realChanges, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context13 = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17___default()(_items2).call(_items2, function (res, item) {\n        return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(res).call(res, item.cells);\n      }, [])).call(_context13, function (_ref4) {\n        var id = _ref4.id,\n          border = _ref4.border;\n        return [id, {\n          border: border\n        }];\n      }));\n      // }\n    }\n    var oldX = oldItemValue.x,\n      oldY = oldItemValue.y,\n      oldFixedRowAtPage = oldItemValue.fixedRowAtPage,\n      oldHeight = oldItemValue.height,\n      oldWidth = oldItemValue.width,\n      oldDetailRowHeight = oldItemValue.detailRowHeight,\n      oldTemplateRowCount = oldItemValue.fixedRowCount,\n      oldMergeConfig = oldItemValue.mergeConfig,\n      tableTailId = oldItemValue.tableTailId;\n    // 切换\n    if (oldFixedRowAtPage !== fixedRowAtPage) {\n      // 更改size，但是一进来会走进下面的循环\n      // 宽高里也限制\n      var detailRow = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(rows).call(rows, function (row) {\n        return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_25__.ROW_TYPE_DETAIL;\n      });\n      var increaseHeight = (detailRow === null || detailRow === void 0 ? void 0 : detailRow.rowHeight) * (templateRowCount - 1);\n      var newTableHeight = fixedRowAtPage ? _height + increaseHeight : _height - increaseHeight;\n      if (tableTailId) {\n        realChanges.push([tableTailId, {\n          y: newTableHeight + oldY,\n          isfixedRowAtPage: true\n        }]);\n      }\n      realChanges.push([id, {\n        height: newTableHeight,\n        x: oldX,\n        y: oldY,\n        isfixedRowAtPage: true\n      }]);\n    }\n    if (templateRowCount !== oldTemplateRowCount) {\n      // 增量更新会有更多问题\n      // 全量更新就要把这里的逻辑分散到各个方法\n      // 都不够优雅\n      var _detailRow = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(rows).call(rows, function (row) {\n        return row.rowType === _constants__WEBPACK_IMPORTED_MODULE_25__.ROW_TYPE_DETAIL;\n      });\n      // const rowHeightSum = countLength(rows)\n      var _increaseHeight = (_detailRow === null || _detailRow === void 0 ? void 0 : _detailRow.rowHeight) * (templateRowCount - oldTemplateRowCount);\n      if (!fixedRowAtPage) {\n        realChanges.push([id, {\n          height: _height - _increaseHeight\n        }]);\n      } else {\n        realChanges.push([id, {\n          height: _height + _increaseHeight\n        }]);\n      }\n    }\n    if (oldHeight !== _height || oldWidth !== _width2) {\n      var resizeRes = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.calcGridItemSize)({\n        x: _x,\n        y: _y,\n        width: _width2,\n        height: _height,\n        rows: rows,\n        columns: columns,\n        dataContext: dataContext,\n        id: id\n      });\n      if (resizeRes) {\n        realChanges.push.apply(realChanges, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(resizeRes));\n      }\n    }\n    // 这里应该不存在同时, 但是改其他值会把宽高传过来\n    if (!lodash__WEBPACK_IMPORTED_MODULE_26___default().isEqual(newItemValue, oldItemValue)) {\n      var changeProps = {};\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_constants__WEBPACK_IMPORTED_MODULE_25__.MERGE_CELL_PROP_LIST).call(_constants__WEBPACK_IMPORTED_MODULE_25__.MERGE_CELL_PROP_LIST, function (key) {\n        if (newItemValue[key] !== oldItemValue[key]) {\n          changeProps[key] = newItemValue[key];\n        }\n      });\n      if (!lodash__WEBPACK_IMPORTED_MODULE_26___default().isEmpty(changeProps)) {\n        var _$cloneDeep = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(dataContext.getData()),\n          _allItems = _$cloneDeep.items;\n        var otherChange = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_17___default()(_allItems).call(_allItems, function (res, item) {\n          var itemId = item.id,\n            type = item.type,\n            parentId = item.parentId;\n          var parentItem = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(_allItems).call(_allItems, function (itm) {\n            return itm.id === parentId;\n          });\n          var change = [];\n          if ((0,_grid__WEBPACK_IMPORTED_MODULE_23__.isGridRelativeControl)(item) && parentId === id || (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isGridRelativeControl)(parentItem) && parentItem.parentId === id) {\n            var _context14;\n            var itemChangeProp = {};\n            _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context14 = _babel_runtime_corejs3_core_js_stable_object_entries__WEBPACK_IMPORTED_MODULE_19___default()(changeProps)).call(_context14, function (_ref5) {\n              var _ref6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_ref5, 2),\n                key = _ref6[0],\n                value = _ref6[1];\n              if (key in item) {\n                itemChangeProp[key] = value;\n              }\n            });\n            if (!lodash__WEBPACK_IMPORTED_MODULE_26___default().isEmpty(itemChangeProp)) {\n              change.push([itemId, itemChangeProp]);\n            }\n          }\n          return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(res).call(res, change);\n        }, []);\n        realChanges.push.apply(realChanges, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(otherChange));\n      }\n    }\n\n    // 合并修改\n    // let isMergeConfigChange = false\n    if (!lodash__WEBPACK_IMPORTED_MODULE_26___default().isEqual(oldMergeConfig, mergeConfig)) {\n      var _context15, _context16, _context17;\n      // isMergeConfigChange = true\n      var gridItems = lodash__WEBPACK_IMPORTED_MODULE_26___default().cloneDeep(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context15 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_items).call(_items, function (item) {\n        if (item.parentId === gridId) return item;\n      })).call(_context15, Boolean));\n      var _getCollectProps2 = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.getCollectProps)(gridItems),\n        _columns = _getCollectProps2.columns,\n        _cells2 = _getCollectProps2.cells,\n        columnCount = _getCollectProps2.columnCount;\n      var getCellIdx = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.createGetCellIdx)(columnCount);\n      // 新增合并修改才走这里\n      var diffKeys = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context16 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_context17 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(mergeConfig)).call(_context17, function (key) {\n        if (!oldMergeConfig[key]) {\n          return key;\n        } else {\n          if (!lodash__WEBPACK_IMPORTED_MODULE_26___default().isEqual(mergeConfig[key], oldMergeConfig[key])) {\n            return key;\n          }\n        }\n      })).call(_context16, Boolean);\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(diffKeys).call(diffKeys, function (key) {\n        var _context18;\n        var _mergeConfig$key = mergeConfig[key],\n          rowStart = _mergeConfig$key.rowStart,\n          rowLength = _mergeConfig$key.rowLength,\n          columnStart = _mergeConfig$key.columnStart,\n          columnLength = _mergeConfig$key.columnLength;\n        var cell = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(gridItems).call(gridItems, function (item) {\n          return item.id === _cells2[getCellIdx(rowStart, columnStart)].id;\n        });\n        var isCellHaveAnyChildData = true;\n        if (!_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_20___default()(_context18 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(_constants__WEBPACK_IMPORTED_MODULE_25__.EMPTY_CELL_TEXT)).call(_context18, function (key) {\n          return cell[key];\n        })) {\n          var cellChild = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(_items).call(_items, function (item) {\n            return item.parentId === cell.id;\n          });\n          if (!cellChild) {\n            isCellHaveAnyChildData = false;\n          }\n        }\n        if (isCellHaveAnyChildData) return;\n        for (var i = rowStart; i <= rowStart + rowLength - 1; i++) {\n          var _loop = function _loop() {\n            // 复制action\n            if (!isCellHaveAnyChildData) {\n              if (i !== rowStart || j !== columnStart) {\n                var _context19;\n                var currentCell = _cells2[getCellIdx(i, j)];\n                if (_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_20___default()(_context19 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(_constants__WEBPACK_IMPORTED_MODULE_25__.EMPTY_CELL_TEXT)).call(_context19, function (key) {\n                  return currentCell[key];\n                })) {\n                  var _context20;\n                  // 复制文本\n                  var _change = {};\n                  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_11___default()(_context20 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(currentCell)).call(_context20, function (key) {\n                    if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_constants__WEBPACK_IMPORTED_MODULE_25__.IDENTITY_CELL_PROP).call(_constants__WEBPACK_IMPORTED_MODULE_25__.IDENTITY_CELL_PROP, key)) {\n                      cell[key] = currentCell[key];\n                      _change[key] = currentCell[key];\n                    }\n                  });\n                  realChanges.push([cell.id, _change]);\n                  isCellHaveAnyChildData = true;\n                }\n                var _cellChild = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_18___default()(_items).call(_items, function (item) {\n                  return item.parentId === currentCell.id;\n                });\n                if (_cellChild) {\n                  // 这里可能会有影响\n                  // 复制文本控件\n                  var newCellChild = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({}, _cellChild, {\n                    parentId: cell.id\n                  });\n                  var _dataRef = globalConfig.dataRef;\n                  newCellChild.key = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_28__.createUniqueKey)(newCellChild.key, newCellChild.type, _dataRef.current);\n                  _dataRef.current.push(newCellChild);\n                  addActionRef.current.push(newCellChild);\n                  isCellHaveAnyChildData = true;\n                }\n              }\n            } else {\n              return 1; // break\n            }\n          };\n          for (var j = columnStart; j <= columnStart + columnLength - 1; j++) {\n            if (_loop()) break;\n          }\n        }\n      });\n      // 所有合并修改都需要检查\n      // 不能让子控件大于单元格，所以拆分不考虑，只考虑新增或者现存的\n      // 这样路径太多了\n    }\n    var finallyChange = (0,_grid__WEBPACK_IMPORTED_MODULE_23__.mergeChanges)(realChanges);\n    if (finallyChange.length === 1) {\n      var _finallyChange$ = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(finallyChange[0], 2),\n        _id = _finallyChange$[0],\n        _change2 = _finallyChange$[1];\n      return {\n        id: _id,\n        change: _change2\n      };\n    }\n    return finallyChange;\n    // 不要了\n    // if (detailRowHeight !== undefined) {\n    //   const { detailRowHeight: oldDetailRowHeight } = oldItemValue\n    //   if (oldDetailRowHeight !== detailRowHeight) {\n    //     const { items: allItems } = dataContext.getData()\n    //     const detailRow = allItems.find(item => item.rowType === 'Detail')\n    //     if (detailRow) {\n    //       const { id: rowId, rowHeight } = detailRow\n    //       // 如果是数据行修改导致，不再进入\n    //       if (rowHeight === detailRowHeight) return\n    //       if (templateRowCount > 1 && printType === GRID_TEMPLATE_TYPE) {\n    //         dataContext.batchUpdateControlPropertyValues([[rowId, {\n    //           rowHeight: detailRowHeight\n    //         }], [id, {\n    //           height: height + (templateRowCount * (detailRowHeight - oldDetailRowHeight))\n    //         }]])\n    //       } else {\n    //         dataContext.batchUpdateControlPropertyValues(rowId, {\n    //           rowHeight: detailRowHeight\n    //         })\n    //       }\n    //       // dataContext.batchUpdateControlPropertyValues(rowId, {\n    //       //   rowHeight: detailRowHeight\n    //       // })\n    //     }\n    //   }\n    // }\n  }\n  if (field && field.id === rootId) {\n    var heightChange = 'height' in change || 'marginTop' in change || 'marginBottom' in change;\n    var widthChange = 'width' in change || 'marginLeft' in change || 'marginRight' in change;\n    var footerControls = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Footer';\n    });\n    var footer = footerControls[0];\n    var headerControls = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Header';\n    });\n    var header = headerControls[0];\n    // const barcodeControls = dataContext.findControlByCondition(item => item.type === 'Barcode')\n\n    var _realChange = [[id, change]];\n    var rootHeight = change.height,\n      rootWidth = change.width,\n      marginTop = change.marginTop,\n      marginBottom = change.marginBottom,\n      marginLeft = change.marginLeft,\n      marginRight = change.marginRight;\n    rootHeight = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(rootHeight) ? rootHeight : field.height;\n    rootWidth = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(rootWidth) ? rootWidth : field.width;\n    marginTop = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(marginTop) ? marginTop : field.marginTop;\n    marginBottom = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(marginBottom) ? marginBottom : field.marginBottom;\n    marginLeft = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(marginLeft) ? marginLeft : field.marginLeft;\n    marginRight = !lodash__WEBPACK_IMPORTED_MODULE_26___default().isUndefined(marginRight) ? marginRight : field.marginRight;\n    var pageHeight = Math.max(rootHeight - Math.max(marginTop, 0) - Math.max(marginBottom, 0), 0);\n    var pageWidth = Math.max(rootWidth - Math.max(marginLeft, 0) - Math.max(marginRight, 0), 0);\n    if (footer && (heightChange || widthChange)) {\n      var _height2 = footer.height,\n        footerId = footer.id;\n      _realChange.push([footerId, _objectSpread(_objectSpread({}, footer), {}, {\n        width: pageWidth,\n        y: pageHeight - _height2\n      })]);\n    }\n    if (header && widthChange) {\n      var headerId = header.id;\n      _realChange.push([headerId, _objectSpread(_objectSpread({}, header), {}, {\n        width: pageWidth\n      })]);\n    }\n    // if (barcodeControls?.length > 0) {\n    //   barcodeControls.forEach(barcode => {\n    //     const { id: barcodeId } = barcode\n    //     realChange.push([barcodeId, { ...barcode, width: pageWidth }])\n    //   })\n    // }\n    return _realChange;\n  }\n  if (field && (0,_controlType__WEBPACK_IMPORTED_MODULE_24__.isFooter)(field)) {\n    var _heightChange = ('height' in change);\n    if (_heightChange) {\n      var _height3 = change.height;\n      var rootControl = dataContext.findControl(rootId);\n      var _marginTop = rootControl.marginTop,\n        _marginBottom = rootControl.marginBottom,\n        _rootHeight = rootControl.height;\n      var _pageHeight = Math.max(_rootHeight - Math.max(_marginTop, 0) - Math.max(_marginBottom, 0), 0);\n      var footerY = _pageHeight - _height3;\n      var _realChange2 = [[id, _objectSpread(_objectSpread({}, change), {}, {\n        y: footerY\n      })]];\n      var updateControls = dataContext.findControlByCondition(function (item) {\n        return item.type !== 'Header' && item.type !== 'Footer' && item.parentId === rootId && item.y + item.height > footerY;\n      }) || [];\n      var updateValues = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(updateControls).call(updateControls, function (control) {\n        return [control.id, {\n          y: footerY - control.height\n        }];\n      });\n      _realChange2.push.apply(_realChange2, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(updateValues));\n      return _realChange2;\n    }\n    return {\n      id: id,\n      change: change\n    };\n  }\n  if (field && (0,_controlType__WEBPACK_IMPORTED_MODULE_24__.isHeader)(field)) {\n    var _heightChange2 = ('height' in change);\n    if (_heightChange2) {\n      var _height4 = change.height;\n      var _realChange3 = [[id, change]];\n      var _updateControls = dataContext.findControlByCondition(function (item) {\n        return item.type !== 'Header' && item.type !== 'Footer' && item.parentId === rootId && item.y < _height4;\n      });\n      var _updateValues = _updateControls && _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_updateControls).call(_updateControls, function (control) {\n        return [control.id, {\n          y: _height4\n        }];\n      });\n      _realChange3.push.apply(_realChange3, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_updateValues));\n      return _realChange3;\n    }\n    return {\n      id: id,\n      change: change\n    };\n  }\n\n  // 数据行合并汇总的联动处理\n  if (field && (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailRow)(field)) {\n    var mergeSummaryFieldChange = ('mergeSummaryField' in change);\n    var mergeByFieldChange = ('mergeByField' in change);\n    if (mergeByFieldChange && change.mergeByField && field.mergeByField) {\n      var _context21;\n      /**\n       * 合并依据字段换绑了，要把合并汇总字段里绑定的相应字段解绑\n       * eg：合并依据字段a => b，则合并汇总['b', 'c'] => ['c']，即将b过滤掉\n       */\n      var mergeByFieldText = change.mergeByFieldText,\n        mergeByField = change.mergeByField;\n      var mergeByFieldArr = mergeByField ? mergeByField.split(';') : [];\n      var _rowId = field.id,\n        mergeSummaryField = field.mergeSummaryField,\n        mergeSummaryFieldText = field.mergeSummaryFieldText;\n      var mergeSummaryFieldTextArr = mergeSummaryFieldText ? mergeSummaryFieldText.split(';') : [];\n      var _realChange4 = [[id, change]];\n      var detailCells = dataContext.findControlByCondition(function (control) {\n        return (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailCell)(control) && control.rowId === _rowId;\n      });\n      var cellUpdates = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context21 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(detailCells).call(detailCells, function (control) {\n        var mergeSummary = control.mergeSummary,\n          bindField = control.bindField,\n          controlId = control.id;\n        var shouldMerge = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_21___default()(mergeByFieldArr).call(mergeByFieldArr, bindField) > -1;\n        if (shouldMerge && mergeSummary) {\n          return [controlId, {\n            mergeSummary: false\n          }];\n        }\n        return null;\n      })).call(_context21, Boolean);\n      _realChange4.push.apply(_realChange4, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(cellUpdates));\n      _realChange4.push([_rowId, {\n        mergeSummaryField: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeSummaryField).call(mergeSummaryField, function (key) {\n          return _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_21___default()(mergeByFieldArr).call(mergeByFieldArr, key) === -1;\n        }),\n        mergeSummaryFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeSummaryFieldTextArr).call(mergeSummaryFieldTextArr, function (key) {\n          return !_babel_runtime_corejs3_core_js_stable_instance_ends_with__WEBPACK_IMPORTED_MODULE_22___default()(mergeByFieldText).call(mergeByFieldText, key);\n        }).join(';')\n      }]);\n      return _realChange4;\n    }\n    if (mergeSummaryFieldChange) {\n      var _context22;\n      // 合并汇总字段勾选了，对应数据行单元格“是否合并汇总”也给勾上\n      var _rowId2 = field.id;\n      var _mergeSummaryField = change.mergeSummaryField;\n      var _realChange5 = [[id, change]];\n      var _detailCells = dataContext.findControlByCondition(function (control) {\n        return (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailCell)(control) && control.rowId === _rowId2;\n      });\n      var otherUpdates = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context22 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_12___default()(_detailCells).call(_detailCells, function (control) {\n        var mergeSummary = control.mergeSummary,\n          bindField = control.bindField,\n          controlId = control.id;\n        var newMergeSummary = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_mergeSummaryField).call(_mergeSummaryField, bindField);\n        if (newMergeSummary !== mergeSummary) {\n          return [controlId, {\n            mergeSummary: newMergeSummary\n          }];\n        }\n        return null;\n      })).call(_context22, Boolean);\n      _realChange5.push.apply(_realChange5, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(otherUpdates));\n      return _realChange5;\n    }\n    return {\n      id: id,\n      change: change\n    };\n  }\n  if (field && (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailCell)(field)) {\n    // 数据行单元格，勾上了“是否合并汇总”，合并汇总字段那里需要联动\n    var bindField = field.bindField;\n    var mergeSummaryChange = ('mergeSummary' in change);\n    var bindFieldChange = ('bindField' in change);\n    if (mergeSummaryChange && bindField) {\n      var _rowId3 = field.rowId,\n        viewText = field.viewText;\n      var newMergeSummary = change.mergeSummary;\n      var title = viewText.replace(/^=\\$(\\S+)$/g, '$1');\n      var _dataContext$findCont = dataContext.findControl(_rowId3),\n        _mergeSummaryField2 = _dataContext$findCont.mergeSummaryField,\n        _mergeSummaryFieldText = _dataContext$findCont.mergeSummaryFieldText;\n      var _mergeSummaryFieldTextArr = _mergeSummaryFieldText ? _mergeSummaryFieldText.split(';') : [];\n      var _detailCells2 = dataContext.findControlByCondition(function (control) {\n        return (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailCell)(control) && control.rowId === _rowId3;\n      });\n      var hasSameBindField = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_detailCells2).call(_detailCells2, function (cell) {\n        return cell.bindField === bindField;\n      }).length > 1;\n      var _realChange6 = [[id, change]];\n      if (newMergeSummary && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_mergeSummaryField2).call(_mergeSummaryField2, bindField)) {\n        _realChange6.push([_rowId3, {\n          mergeSummaryField: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_mergeSummaryField2).call(_mergeSummaryField2, bindField),\n          mergeSummaryFieldText: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_mergeSummaryFieldTextArr).call(_mergeSummaryFieldTextArr, title).join(';')\n        }]);\n      } else if (!newMergeSummary && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_mergeSummaryField2).call(_mergeSummaryField2, bindField) && !hasSameBindField) {\n        _realChange6.push([_rowId3, {\n          mergeSummaryField: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeSummaryField2).call(_mergeSummaryField2, function (key) {\n            return key !== bindField;\n          }),\n          mergeSummaryFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeSummaryFieldTextArr).call(_mergeSummaryFieldTextArr, function (key) {\n            return key !== title;\n          }).join(';')\n        }]);\n      }\n      return _realChange6;\n    }\n    // 数据行单元格字段换绑时，需要更新合并汇总字段\n    if (bindFieldChange) {\n      var _viewText = field.viewText,\n        _rowId4 = field.rowId,\n        oldBindField = field.bindField,\n        mergeSummary = field.mergeSummary;\n      var _title = _viewText.replace(/^=\\$(\\S+)$/g, '$1');\n      var _dataContext$findCont2 = dataContext.findControl(_rowId4),\n        _mergeSummaryField3 = _dataContext$findCont2.mergeSummaryField,\n        _mergeSummaryFieldText2 = _dataContext$findCont2.mergeSummaryFieldText,\n        _mergeByFieldText = _dataContext$findCont2.mergeByFieldText,\n        _mergeByField = _dataContext$findCont2.mergeByField;\n      var _mergeSummaryFieldTextArr2 = _mergeSummaryFieldText2 ? _mergeSummaryFieldText2.split(';') : [];\n      var mergeFieldTextArr = _mergeByFieldText ? _mergeByFieldText.split(';') : [];\n      var _mergeByFieldArr = _mergeByField ? _mergeByField.split(';') : [];\n      var _detailCells3 = dataContext.findControlByCondition(function (control) {\n        return (0,_grid__WEBPACK_IMPORTED_MODULE_23__.isDetailCell)(control) && control.rowId === _rowId4;\n      });\n      var _hasSameBindField = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_detailCells3).call(_detailCells3, function (cell) {\n        return cell.bindField === oldBindField;\n      }).length > 1;\n      var _realChange7 = [[id, change]];\n      // mergeByField: \"kdtest_integerfield;kdtest_textfield\"\n      // mergeByFieldText: \"整数1;文本1\"\n\n      if (oldBindField && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_mergeByFieldArr).call(_mergeByFieldArr, oldBindField) && !_hasSameBindField) {\n        var _context23, _context24;\n        _realChange7.push([_rowId4, {\n          mergeByField: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context23 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeByFieldArr).call(_mergeByFieldArr, function (key) {\n            return key !== bindField;\n          })).call(_context23, change.bindField).join(';'),\n          mergeByFieldText: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_16___default()(_context24 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(mergeFieldTextArr).call(mergeFieldTextArr, function (key) {\n            return key !== _title;\n          })).call(_context24, change.viewText.replace(/^=\\$(\\S+)$/g, '$1')).join(';')\n        }]);\n      }\n      if (oldBindField && mergeSummary && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_13___default()(_mergeSummaryField3).call(_mergeSummaryField3, oldBindField) && !_hasSameBindField) {\n        _realChange7.push([_rowId4, {\n          mergeSummaryField: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeSummaryField3).call(_mergeSummaryField3, function (key) {\n            return key !== oldBindField;\n          }),\n          mergeSummaryFieldText: _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_mergeSummaryFieldTextArr2).call(_mergeSummaryFieldTextArr2, function (key) {\n            return key !== _title;\n          }).join(';')\n        }]);\n        _realChange7.push([id, {\n          mergeSummary: false\n        }]);\n      }\n      return _realChange7;\n    }\n  }\n  return {\n    id: id,\n    change: change\n  };\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/preHandleUpdateValue.ts?");

/***/ }),

/***/ 15296:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21980);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98092);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(41232);\n/* harmony import */ var _preHandleUpdateValue__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(74780);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(98436);\n/* harmony import */ var _tableTailIdRelationChange__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(67188);\n/* harmony import */ var _layoutGridCellChildFit__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(3316);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar preUpdateHandle = function preUpdateHandle(_ref, resolve, reject) {\n  var _context;\n  var dataContext = _ref.dataContext,\n    selectionContext = _ref.selectionContext,\n    globalConfig = _ref.globalConfig,\n    action = _ref.action;\n  var rootId = dataContext.getRootId();\n  var changes = action.value;\n  if (!changes.length) return;\n  // 直接把值传给preHandleUpdateValue? 但是单个值引起的改变不能加起来，preHandleUpdateValue是覆盖式更新\n  // TODO: 新增一个增量式更新？但是增量式或者覆盖式更新都是业务层决定，在预处理层如何感知应用哪种方式?\n  // 而且如果有链式（先更新再依赖更新的数据，而不是现在只依赖之前的数据）的复杂场景，需要业务层自己做？\n  // 这里可能会有很大问题：\n  if (changes.length === 1) {\n    var _changes = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(changes, 1),\n      _changes$ = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_changes[0], 2),\n      id = _changes$[0],\n      change = _changes$[1];\n    if (id === rootId && 'language' in change) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_12__.eventBus.emit('beforeChangeLang', {\n        resolve: resolve,\n        reject: reject,\n        value: change.language\n      });\n      return;\n    }\n    if ('hasTableTail' in change) {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_12__.eventBus.emit('beforeChangeGridFooter', {\n        resolve: resolve,\n        reject: reject,\n        tableTail: change.hasTableTail,\n        parentGridId: id\n      });\n      return;\n    }\n    var field = dataContext.findControl(id);\n    if (field && ('x' in change || 'y' in change)) {\n      var changeX = change.x;\n      var changeY = change.y;\n      var parentId = field.parentId;\n      var parentField = dataContext.findControl(parentId) || {};\n      var isTableTail = parentField.type === 'TableTail';\n      if (isTableTail) {\n        var parentWidth = parentField.width,\n          parentHeight = parentField.height;\n        var width = field.width,\n          height = field.height;\n        if (changeX + width > parentWidth) {\n          change.x = Math.max(parentWidth - width, 0);\n        }\n        if (changeY + height > parentHeight) {\n          change.y = Math.max(parentHeight - height, 0);\n        }\n      }\n    }\n  }\n  var addActionRef = {\n    current: []\n  };\n  var realChange = (0,_grid__WEBPACK_IMPORTED_MODULE_8__.mergeChanges)(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default()(changes).call(changes, function (res, singleChange) {\n    var _singleChange = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(singleChange, 2),\n      id = _singleChange[0],\n      change = _singleChange[1];\n    var updateChange = (0,_preHandleUpdateValue__WEBPACK_IMPORTED_MODULE_11__.preHandleUpdateValue)({\n      change: change,\n      id: id,\n      globalConfig: globalConfig,\n      dataContext: dataContext,\n      addActionRef: addActionRef,\n      action: action\n    });\n    if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_4___default()(updateChange)) {\n      res.push.apply(res, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(updateChange));\n    } else {\n      res.push([updateChange.id, updateChange.change]);\n    }\n    return res;\n  }, []));\n\n  // 增量、覆盖由业务层覆写\n  // 应该是单一属性更新\n  // 这里将单元格的变更加到表格上\n  // 改为表格行列的变更加到表格上\n\n  // 改为表格行列的变更加到表格上\n  var _mapItemFromChange = (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_13__.mapItemFromChange)(realChange, dataContext, function (field, changProp) {\n      return field && ((0,_grid__WEBPACK_IMPORTED_MODULE_8__.isGridRow)(field) || (0,_grid__WEBPACK_IMPORTED_MODULE_8__.isGridColumn)(field)) && (_constants__WEBPACK_IMPORTED_MODULE_9__.ROW_HEIGHT in changProp || _constants__WEBPACK_IMPORTED_MODULE_9__.COLUMN_WIDTH in changProp);\n    }),\n    gridRowColumnItems = _mapItemFromChange.items,\n    gridRowColumnChanges = _mapItemFromChange.changes;\n  // 多选修改可以进到这里\n  if (gridRowColumnItems !== null && gridRowColumnItems !== void 0 && gridRowColumnItems.length) {\n    var gridItem = dataContext.findControl(gridRowColumnItems[0].parentId);\n    var gridId = gridItem.id;\n    var rowColumnItems = dataContext.findControlByCondition(function (item) {\n      return item.parentId === gridId && ((0,_grid__WEBPACK_IMPORTED_MODULE_8__.isGridRow)(item) || (0,_grid__WEBPACK_IMPORTED_MODULE_8__.isGridColumn)(item));\n    });\n    realChange.push([gridId, (0,_index__WEBPACK_IMPORTED_MODULE_10__.getCalcPosObj)(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_3___default()(rowColumnItems).call(rowColumnItems, function (res, item) {\n      var _gridRowColumnChanges;\n      var id = item.id;\n      var findChange = (_gridRowColumnChanges = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_5___default()(gridRowColumnChanges).call(gridRowColumnChanges, function (_ref2) {\n        var _ref3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_ref2, 1),\n          itemId = _ref3[0];\n        return itemId === id;\n      })) === null || _gridRowColumnChanges === void 0 ? void 0 : _gridRowColumnChanges[1];\n      var findItem = findChange ? (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, item, findChange) : item;\n      if ((0,_grid__WEBPACK_IMPORTED_MODULE_8__.isGridRow)(findItem)) {\n        if ((0,_grid__WEBPACK_IMPORTED_MODULE_8__.isDetailRow)(findItem) && gridItem.fixedRowAtPage && gridItem.fixedRowCount > 1) {\n          res.height += findItem.rowHeight + findItem.rowHeight * Math.max(gridItem.fixedRowCount - 1, 1);\n        } else {\n          res.height += findItem.rowHeight;\n        }\n      } else {\n        res.width += findItem.columnWidth;\n      }\n      return res;\n    }, {\n      width: 0,\n      height: 0\n    }))]);\n    realChange = (0,_grid__WEBPACK_IMPORTED_MODULE_8__.mergeChanges)(realChange);\n    // const gridChangeMap = {}\n    // const gridIdSet = new Set()\n    // let gridId = null\n    // let gridItem = null\n    // let addGridWidthDistance = 0\n    // let addGridHeightDistance = 0\n    // gridRowColumnItems.forEach((item) => {\n    //   const propName = isGridRow(item) ? ROW_HEIGHT : COLUMN_WIDTH\n    //   const newVal = realChange.find(([changeId]) => changeId === item.id)?.[1]?.[propName] // change\n    //   const value = item[propName]\n    //   const { rowId, columnId, parentId } = item\n    //   gridItem = dataContext.findControl(parentId)\n    //   // gridId = parentId\n    //   gridChangeMap[parentId] = gridChangeMap[parentId] || {\n    //     addGridWidthDistance: 0,\n    //     addGridHeightDistance: 0\n    //   }\n    //   const map = gridChangeMap[parentId]\n    //   map.gridItem = gridItem\n    //   gridIdSet.add(parentId)\n    //   const distance = newVal - value\n    //   if (propName === COLUMN_WIDTH) {\n    //     map.addGridWidthDistance = map.addGridWidthDistance + distance // toFloorFix(map.addGridWidthDistance + distance, PRECISION)\n    //   } else {\n    //     map.addGridHeightDistance = map.addGridHeightDistance + distance // toFloorFix(map.addGridHeightDistance + distance, PRECISION)\n    //   }\n    //   if (isDetailRow(item) && gridItem.fixedRowAtPage && gridItem.fixedRowCount > 1) {\n    //     map.addGridHeightDistance = map.addGridHeightDistance + (distance * (gridItem.fixedRowCount - 1) // toFloorFix(map.addGridHeightDistance + (distance * (gridItem.fixedRowCount - 1)), PRECISION)\n    //   }\n    // })\n    // for (let gridId of gridIdSet) {\n    //   if (!_.isEmpty(gridChangeMap[gridId])) {\n    //     const map = gridChangeMap[gridId]\n    //     if (map.addGridWidthDistance !== 0 || map.addGridHeightDistance !== 0) {\n    //       // fix: 【H1质量加固测试】【新需求】【新打印】布局网格选中的蓝色边框线与网格的实际边框线没有重合\n    //       const gridChange = { width: map.gridItem!.width, height: map.gridItem!.height }\n    //       if (map.addGridWidthDistance !== 0) {\n    //         gridChange.width = toFloorFix(map.gridItem!.width + map.addGridWidthDistance, PRECISION)\n    //       }\n    //       if (map.addGridHeightDistance !== 0) {\n    //         gridChange.height = toFloorFix(map.gridItem!.height + map.addGridHeightDistance, PRECISION)\n    //       }\n    //       realChange.push([gridId, gridChange])\n    //     }\n    //   }\n    // }\n  }\n  (0,_subDataGridRelationChange__WEBPACK_IMPORTED_MODULE_13__.subDataGridRelationChange)({\n    realChange: realChange,\n    dataContext: dataContext\n  });\n  (0,_tableTailIdRelationChange__WEBPACK_IMPORTED_MODULE_14__.tableTailIdRelationChange)({\n    realChange: realChange,\n    dataContext: dataContext\n  });\n  var layoutGridCellChildChanges = (0,_layoutGridCellChildFit__WEBPACK_IMPORTED_MODULE_15__.layoutGridCellChildFit)(realChange, dataContext);\n  return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(_context = [{\n    type: designer_base_Main__WEBPACK_IMPORTED_MODULE_12__.ActionType.UPDATE,\n    value: (0,_grid__WEBPACK_IMPORTED_MODULE_8__.mergeChanges)(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_7___default()(realChange).call(realChange, layoutGridCellChildChanges))\n  }, addActionRef.current.length && (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_12__.createAddAction)(addActionRef.current)]).call(_context, Boolean);\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (preUpdateHandle);\n\n//# sourceURL=webpack://print-designer/./src/utils/preUpdateHandle.ts?");

/***/ }),

/***/ 20100:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(48560);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar scu = function scu(prevProps, nextProp) {\n  // console.log('renderLog', prevProps, nextProp, _.isEqual(prevProps, nextProp), Object.is(prevProps, nextProp))\n  if (_babel_runtime_corejs3_core_js_stable_object_is__WEBPACK_IMPORTED_MODULE_0___default()(prevProps, nextProp) || lodash__WEBPACK_IMPORTED_MODULE_1___default().isEqual(prevProps, nextProp)) return true;\n  return false;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (scu);\n\n//# sourceURL=webpack://print-designer/./src/utils/scu.ts?");

/***/ }),

/***/ 82795:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   isShapeBigThan: function() { return /* binding */ isShapeBigThan; },\n/* harmony export */   isShapeOverflow: function() { return /* binding */ isShapeOverflow; }\n/* harmony export */ });\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41232);\n\nvar isShapeOverflow = function isShapeOverflow(box, rootBox) {\n  var x = rootBox.x,\n    y = rootBox.y,\n    width = rootBox.width,\n    height = rootBox.height;\n  return box.x < x || box.y < y || (0,_index__WEBPACK_IMPORTED_MODULE_0__.toFloorFix)(box.x + box.width, 1) > (0,_index__WEBPACK_IMPORTED_MODULE_0__.toFloorFix)(x + width, 1) || (0,_index__WEBPACK_IMPORTED_MODULE_0__.toFloorFix)(box.y + box.height, _index__WEBPACK_IMPORTED_MODULE_0__.toFloorFix) > (0,_index__WEBPACK_IMPORTED_MODULE_0__.toFloorFix)(y + height, 1);\n};\nvar isShapeBigThan = function isShapeBigThan(box, rootBox) {\n  var width = rootBox.width,\n    height = rootBox.height;\n  return box.width > width || box.height > height;\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/shape.ts?");

/***/ }),

/***/ 98436:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   mapItemFromChange: function() { return /* binding */ mapItemFromChange; },\n/* harmony export */   subDataGridRelationChange: function() { return /* binding */ subDataGridRelationChange; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21980);\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(41232);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(98092);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n\nvar mapItemFromChange = function mapItemFromChange(changes, dataContext, callback) {\n  // 内存?\n  // _.cloneDeep(changes)\n  var cloneChanges = lodash__WEBPACK_IMPORTED_MODULE_8___default().cloneDeep(changes);\n  var collectChanges = [];\n  var items = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(cloneChanges).call(cloneChanges, function (items, change) {\n    var _change = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(change, 2),\n      id = _change[0],\n      changProp = _change[1];\n    var field = dataContext.findControl(id);\n    if (callback(field, changProp, id, dataContext)) {\n      collectChanges.push(change);\n      return items === null || items === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(items).call(items, field);\n    }\n    return items;\n  }, []);\n  return {\n    items: items,\n    changes: collectChanges\n  };\n};\nvar subDataGridRelationChange = function subDataGridRelationChange(_ref) {\n  var realChange = _ref.realChange,\n    dataContext = _ref.dataContext;\n  var _mapItemFromChange = mapItemFromChange(realChange, dataContext, function (field) {\n      return field && ((0,_grid__WEBPACK_IMPORTED_MODULE_5__.isDataGrid)(field) || (0,_grid__WEBPACK_IMPORTED_MODULE_5__.isCardGrid)(field));\n    }),\n    dataGridItems = _mapItemFromChange.items,\n    dataGridChanges = _mapItemFromChange.changes;\n  var _mapItemFromChange2 = mapItemFromChange(realChange, dataContext, function (field) {\n      return field && (0,_grid__WEBPACK_IMPORTED_MODULE_5__.isSubDataGrid)(field);\n    }),\n    subDataGridItems = _mapItemFromChange2.items,\n    subDataGridChanges = _mapItemFromChange2.changes;\n  if (dataGridItems !== null && dataGridItems !== void 0 && dataGridItems.length) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(dataGridItems).call(dataGridItems, function (dataGrid, idx) {\n      var _dataGridChanges$idx = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(dataGridChanges[idx], 2),\n        id = _dataGridChanges$idx[0],\n        changeProp = _dataGridChanges$idx[1];\n      var oldItemValue = dataGrid;\n      var newItemValue = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_8___default().cloneDeep(dataGrid), changeProp);\n      var x = newItemValue.x,\n        y = newItemValue.y,\n        subGridId = newItemValue.subGridId,\n        width = newItemValue.width,\n        height = newItemValue.height,\n        tableTailId = newItemValue.tableTailId,\n        hasTableTail = newItemValue.hasTableTail;\n      var oldX = oldItemValue.x,\n        oldY = oldItemValue.y,\n        oldWidth = oldItemValue.width,\n        oldHeight = oldItemValue.height;\n      if (subGridId && subGridId.length > 0) {\n        var subGrids = dataContext.findControl(subGridId);\n        _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(subGrids).call(subGrids, function (subGrid) {\n          var subGridDirection = subGrid.subGridDirection,\n            subGridId = subGrid.id;\n          var change = {};\n          if (subGridDirection === 'right') {\n            if (x !== oldX || width !== oldWidth) {\n              change.x = (0,_index__WEBPACK_IMPORTED_MODULE_6__.toRoundFix)(x + width, _constants__WEBPACK_IMPORTED_MODULE_7__.PRECISION);\n            }\n            if (y !== oldY) {\n              change.y = y;\n            }\n          } else {\n            if (y !== oldY || height !== oldHeight) {\n              change.y = (0,_index__WEBPACK_IMPORTED_MODULE_6__.toRoundFix)(y + height, _constants__WEBPACK_IMPORTED_MODULE_7__.PRECISION);\n            }\n            if (x !== oldX) {\n              change.x = x;\n            }\n          }\n          if (!lodash__WEBPACK_IMPORTED_MODULE_8___default().isEmpty(change)) {\n            realChange.push([subGridId, change]);\n          }\n        });\n      }\n      if (tableTailId) {\n        var tableTail = dataContext.findControl(tableTailId);\n        var change = {\n          x: x - oldX + tableTail.x,\n          y: y + height\n        };\n        if (tableTail.x < x || tableTail.x > x + width) {\n          change.x = x;\n        }\n\n        // x: calculatorPxtoMM(x),\n        // y: gridField.y + gridField.height,\n        // width: transformWidth,\n        // height: transformHeight\n\n        realChange.push([tableTailId, change]);\n      }\n    });\n  }\n  if (subDataGridItems !== null && subDataGridItems !== void 0 && subDataGridItems.length) {\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_4___default()(subDataGridItems).call(subDataGridItems, function (dataGrid, idx) {\n      var _subDataGridChanges$i = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(subDataGridChanges[idx], 2),\n        id = _subDataGridChanges$i[0],\n        changeProp = _subDataGridChanges$i[1];\n      var oldItemValue = dataGrid;\n      var newItemValue = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_8___default().cloneDeep(dataGrid), changeProp);\n      var parentGridId = newItemValue.parentGridId,\n        x = newItemValue.x,\n        y = newItemValue.y,\n        subGridDirection = newItemValue.subGridDirection;\n      var oldX = oldItemValue.x,\n        oldY = oldItemValue.y;\n      var parentGrid = dataContext.findControl(parentGridId);\n      var change = {};\n      if (subGridDirection === 'right') {\n        if (x !== oldX) {\n          change.x = (0,_index__WEBPACK_IMPORTED_MODULE_6__.toRoundFix)(x - parentGrid.width, _constants__WEBPACK_IMPORTED_MODULE_7__.PRECISION);\n        }\n        if (y !== oldY) {\n          change.y = y;\n        }\n      } else {\n        if (y !== oldY) {\n          change.y = (0,_index__WEBPACK_IMPORTED_MODULE_6__.toRoundFix)(y - parentGrid.height, _constants__WEBPACK_IMPORTED_MODULE_7__.PRECISION);\n        }\n        if (x !== oldX) {\n          change.x = x;\n        }\n      }\n      if (!lodash__WEBPACK_IMPORTED_MODULE_8___default().isEmpty(change)) {\n        realChange.push([parentGridId, change]);\n      }\n    });\n  }\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/subDataGridRelationChange.ts?");

/***/ }),

/***/ 67188:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   tableTailIdRelationChange: function() { return /* binding */ tableTailIdRelationChange; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21980);\n\n\n\n\nvar tableTailIdRelationChange = function tableTailIdRelationChange(_ref) {\n  var realChange = _ref.realChange,\n    dataContext = _ref.dataContext;\n  var newChange = [];\n  var isFixedRowAtPage = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_1___default()(realChange).call(realChange, function (_ref2) {\n    var _ref3 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_ref2, 2),\n      id = _ref3[0],\n      item = _ref3[1];\n    return item.fixedRowAtPage || item.fixedRowAtPage === false || item.fixedRowCount;\n  });\n  if (isFixedRowAtPage) return realChange;\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(realChange).call(realChange, function (change) {\n    var _change = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(change, 2),\n      id = _change[0],\n      changProp = _change[1];\n    var field = dataContext.findControl(id);\n    if (field && (0,_grid__WEBPACK_IMPORTED_MODULE_3__.isGridFooter)(field)) {\n      var y = changProp.y;\n      if (y || y === 0) {\n        var parentGridId = field.parentGridId;\n        var gridField = dataContext.findControl(parentGridId);\n        var height = gridField.height;\n        newChange.push([parentGridId, {\n          y: y - height\n        }]);\n      }\n    }\n  });\n  realChange.push.apply(realChange, newChange);\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/tableTailIdRelationChange.ts?");

/***/ }),

/***/ 77620:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   filterCardDataSourceByDsType: function() { return /* binding */ filterCardDataSourceByDsType; },\n/* harmony export */   filterCardFieldDataSourceByDsType: function() { return /* binding */ filterCardFieldDataSourceByDsType; },\n/* harmony export */   filterGridDataSource: function() { return /* binding */ filterGridDataSource; },\n/* harmony export */   filterSubGridDataSource: function() { return /* binding */ filterSubGridDataSource; },\n/* harmony export */   filterSysTreeData: function() { return /* binding */ filterSysTreeData; },\n/* harmony export */   filterTreeByCallbackValue: function() { return /* binding */ filterTreeByCallbackValue; },\n/* harmony export */   filterTreeByControlType: function() { return /* binding */ filterTreeByControlType; },\n/* harmony export */   filterTreeByDataSource: function() { return /* binding */ filterTreeByDataSource; },\n/* harmony export */   filterTreeByDataSourceKeys: function() { return /* binding */ filterTreeByDataSourceKeys; },\n/* harmony export */   filterTreeByDsType: function() { return /* binding */ filterTreeByDsType; },\n/* harmony export */   filterTreeByOmitKeys: function() { return /* binding */ filterTreeByOmitKeys; },\n/* harmony export */   filterTreeByOmitType: function() { return /* binding */ filterTreeByOmitType; },\n/* harmony export */   filterTreeByTextFormat: function() { return /* binding */ filterTreeByTextFormat; },\n/* harmony export */   getDefinition: function() { return /* binding */ getDefinition; },\n/* harmony export */   includeDataSource: function() { return /* binding */ includeDataSource; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _dataSource__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(32064);\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_0___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_1___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_2___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n/**\n *\n Root(\"Root\"),//根节点，预览\n  Sys(\"Sys\"),//系统字段\n  Main(\"Main\"),//主数据源\n  Ref(\"Ref\"),//引入数据源\n  Custom(\"Custom\"), //自定义数据源\n  Workflow(\"Workflow\"), //自定义数据源\n\n  //以下节点可能在主数据源，引入数据源中出现。目前只有单体，子单据体\n  Head(\"Head\"),//体单头.预留\n  Entry(\"Entry\"),//单体\n  Subentry(\"Subentry\"),//子分录\n  Approveline(\"Approveline\"),//工作流.审批线路\n  Approveactivity(\"Approveactivity\"),//工作流.审批节点\n  Attach(\"Attach\");//附件面板\n */\n\nvar filterTreeByCallbackValue = function filterTreeByCallbackValue(definition, callback, DsType) {\n  var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n    var _def = def,\n      Items = _def.Items;\n    if (Items) {\n      def = DsType && DsType === def.DsType || !DsType ? _objectSpread(_objectSpread({}, def), {}, {\n        Items: filterTreeByCallbackValue(Items, callback)\n      }) : def;\n    }\n    if (callback(def) || def.Items && def.Items.length) {\n      filteredData.push(def);\n    }\n    return filteredData;\n  }, []);\n  return data;\n};\nvar filterTreeByControlType = function filterTreeByControlType(definition, controlType) {\n  return filterTreeByCallbackValue(definition, function (def) {\n    var Type = def.Type;\n    return Type && Type === controlType;\n  });\n};\nvar filterTreeByOmitType = function filterTreeByOmitType(definition, omitType) {\n  return filterTreeByCallbackValue(definition, function (def) {\n    var Type = def.Type;\n    return Type && Type !== omitType;\n  });\n};\nvar dealDsType = function dealDsType(definition, parentDsType) {\n  return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_10___default()(definition).call(definition, function (def) {\n    var DsType = def.DsType,\n      Items = def.Items;\n    var pDsType = DsType || parentDsType;\n    def.parentDsType = pDsType;\n    if (Items) {\n      def.Items = dealDsType(Items, pDsType);\n    }\n    return def;\n  });\n};\nvar filterTreeByDsType = function filterTreeByDsType(definition, dsTypeFilter) {\n  if (!dsTypeFilter) return definition;\n  var copy = dealDsType(lodash__WEBPACK_IMPORTED_MODULE_14___default().cloneDeep(definition));\n  var filterFunc = function filterFunc(data, filters) {\n    return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(data).call(data, function (filteredData, def) {\n      var Items = def.Items,\n        parentDsType = def.parentDsType;\n      if (Items) def.Items = filterFunc(Items, filters);\n      if (parentDsType && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(filters).call(filters, parentDsType)) {\n        filteredData.push(def);\n      }\n      return filteredData;\n    }, []);\n  };\n  _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(copy).call(copy, function (def) {\n    var DsType = def.DsType,\n      Items = def.Items;\n    if (Items) {\n      def.Items = filterFunc(def.Items, dsTypeFilter);\n    }\n  });\n  return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(copy).call(copy, function (def) {\n    return def.Items && def.Items.length;\n  });\n};\nvar filterGridDataSourceByDsType = function filterGridDataSourceByDsType(dsTypeKey) {\n  return function (definition) {\n    var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n      var IsDataGridDs = def[dsTypeKey];\n      var _def2 = def,\n        Items = _def2.Items;\n      if (!IsDataGridDs && Items) def = _objectSpread(_objectSpread({}, def), {}, {\n        Items: filterGridDataSourceByDsType(dsTypeKey)(Items)\n      });\n      if (IsDataGridDs || def.Items && def.Items.length) {\n        filteredData.push(def);\n      }\n      return filteredData;\n    }, []);\n    return data;\n  };\n};\nvar filterGridDataSource = filterGridDataSourceByDsType('IsDataGridDs');\nvar filterSubGridDataSource = filterGridDataSourceByDsType('IsSubDataGridDs');\nvar filterTreeByDataSource = function filterTreeByDataSource(definition, dataSourceFilter) {\n  if (!dataSourceFilter) return definition;\n  var isSameDataSource = function isSameDataSource(dataSources, key) {\n    if (typeof dataSources === 'string') return dataSources === key;else if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_12___default()(dataSources)) return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(dataSources).call(dataSources, key);\n    return false;\n  };\n  var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n    var _def3 = def,\n      dataSource = _def3.dataSource,\n      Items = _def3.Items;\n    if (Items && !isSameDataSource(dataSourceFilter, dataSource)) def = _objectSpread(_objectSpread({}, def), {}, {\n      Items: filterTreeByDataSource(Items, dataSourceFilter)\n    });\n    if (dataSource && isSameDataSource(dataSourceFilter, dataSource) || def.Items && def.Items.length) {\n      filteredData.push(def);\n    }\n    return filteredData;\n  }, []);\n  return data;\n};\nvar filterTreeByDataSourceKeys = function filterTreeByDataSourceKeys(definition, keys) {\n  if (!(keys !== null && keys !== void 0 && keys.length)) return definition;\n  return filterTreeByCallbackValue(definition, function (def) {\n    var Key = def.bindField,\n      dataSource = def.dataSource;\n    var key = (0,_dataSource__WEBPACK_IMPORTED_MODULE_15__.createDataSourceNodeKey)(dataSource, Key);\n    return key && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(keys).call(keys, key);\n  });\n};\nvar filterTreeByOmitKeys = function filterTreeByOmitKeys(definition, keys) {\n  if (!(keys !== null && keys !== void 0 && keys.length)) return definition;\n  return filterTreeByCallbackValue(definition, function (def) {\n    var Key = def.bindField,\n      dataSource = def.dataSource;\n    var key = (0,_dataSource__WEBPACK_IMPORTED_MODULE_15__.createDataSourceNodeKey)(dataSource, Key);\n    return key && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(keys).call(keys, key);\n  });\n};\n\n// 过滤系统字段    filterTreeData--grid\nvar filterSysTreeData = function filterSysTreeData(definition, keys) {\n  if (!(keys !== null && keys !== void 0 && keys.length)) return definition;\n  return filterTreeByCallbackValue(definition, function (def) {\n    var key = def.bindField;\n    return key && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(keys).call(keys, key);\n  }, 'Sys');\n};\nvar DsTypes = ['Entry', 'ReportEntry', 'Subentry'];\nfunction getDefinition(definition, dataSource) {\n  var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n    var IsDataGridDs = dataSource === def.dataSource;\n    var _def4 = def,\n      Items = _def4.Items;\n    if (!IsDataGridDs && Items) def = _objectSpread(_objectSpread({}, def), {}, {\n      Items: getDefinition(Items, dataSource)\n    });\n    if (IsDataGridDs || def.Items && def.Items.length) {\n      filteredData.push(def);\n    }\n    return filteredData;\n  }, []);\n  return data;\n}\n\n// 过滤出可以绑定在卡片的字段上的数据源\nvar filterCardFieldDataSourceByDsType = function filterCardFieldDataSourceByDsType(dataSource, definition) {\n  if (dataSourceRootIsMain(dataSource, definition)) {\n    var mainDefinition = [_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default()(definition).call(definition, function (_ref) {\n      var DsType = _ref.DsType;\n      return DsType === 'Main';\n    })];\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(definition).call(definition, function (def) {\n      return (def.DsType === 'Ref' || def.DsType === 'Custom') && mainDefinition.push(def);\n    });\n    definition = getMainDefinition(mainDefinition);\n  } else {\n    definition = getDefinition(definition, dataSource);\n  }\n  return definition;\n  function getMainDefinition(definition) {\n    var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n      var Items = def.Items,\n        DsType = def.DsType;\n      if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(DsTypes).call(DsTypes, DsType) && dataSource !== def.dataSource) {\n        Items ? filteredData.push(_objectSpread(_objectSpread({}, def), {}, {\n          Items: getMainDefinition(Items)\n        })) : filteredData.push(def);\n      }\n      if (dataSource === def.dataSource) {\n        filteredData.push(def);\n      }\n      return filteredData;\n    }, []);\n    return data;\n  }\n  function dataSourceRootIsMain(dataSource, definition) {\n    definition = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default()(definition).call(definition, function (_ref2) {\n      var DsType = _ref2.DsType;\n      return DsType === 'Main';\n    });\n    if (!definition) return;\n    definition = definition.Items;\n    var isMainRoot = function isMainRoot(definition) {\n      return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default()(definition).call(definition, function (def) {\n        return dataSource === def.dataSource || def.Items && isMainRoot(def.Items);\n      });\n    };\n    return isMainRoot(definition);\n  }\n};\n\n// 过滤出可以绑定在卡片上的数据源\nfunction filterCardDataSourceByDsType(DsTypes) {\n  return function (definition) {\n    var data = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_9___default()(definition).call(definition, function (filteredData, def) {\n      var _def$Items, _def$Items2;\n      var includeCardDataSourceTypes = def.DsType && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(DsTypes).call(DsTypes, def.DsType);\n      if (includeCardDataSourceTypes && !(def !== null && def !== void 0 && (_def$Items = def.Items) !== null && _def$Items !== void 0 && _def$Items.length)) {\n        filteredData.push(def);\n      }\n      if (includeCardDataSourceTypes && (def === null || def === void 0 || (_def$Items2 = def.Items) === null || _def$Items2 === void 0 ? void 0 : _def$Items2.length) > 0) {\n        filteredData.push(_objectSpread(_objectSpread({}, def), {}, {\n          Items: filterCardDataSourceByDsType(DsTypes)(def.Items)\n        }));\n      }\n      return filteredData;\n    }, []);\n    return data;\n  };\n}\nvar includeDataSource = function includeDataSource() {\n  var definition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  var dataSource = arguments.length > 1 ? arguments[1] : undefined;\n  return _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_13___default()(definition).call(definition, function (def) {\n    return dataSource === def.dataSource || def.Items && includeDataSource(def.Items, dataSource);\n  });\n};\n\n// 过滤掉与后端解析类型不同的字段\nvar filterTreeByTextFormat = function filterTreeByTextFormat(definition, controlType) {\n  return filterTreeByCallbackValue(definition, function (def) {\n    var Type = def.Type,\n      InitAttr = def.InitAttr;\n    return Type && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(controlType).call(controlType, Type) && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_11___default()(controlType).call(controlType, InitAttr === null || InitAttr === void 0 ? void 0 : InitAttr.TextFormat);\n  });\n};\n\n//# sourceURL=webpack://print-designer/./src/utils/treeUtil.ts?");

/***/ }),

/***/ 98400:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   getAccountId: function() { return /* binding */ getAccountId; },\n/* harmony export */   splicingPramsToURL: function() { return /* binding */ splicingPramsToURL; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n/*\n * @Author: wqhui\n * @Date: 2024-06-27 16:30:18\n * @Description:\n */\nvar KD_ACCOUNT_ID = 'kd_print_kdcdc';\nfunction splicingPramsToURL(url, params) {\n  var validParams = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_0___default()(params).call(params, function (item) {\n    return typeof item[1] === 'string';\n  });\n  if (!validParams.length) {\n    return url;\n  }\n  return url + '?' + _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_1___default()(validParams).call(validParams, function (item) {\n    var _context;\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_2___default()(_context = \"\".concat(item[0], \"=\")).call(_context, item[1]);\n  }).join('&');\n}\nfunction getAccountId() {\n  var href = window.location.href;\n  var _getUrlParams = getUrlParams(href),\n    accountId = _getUrlParams.accountId,\n    accountid = _getUrlParams.accountid,\n    KDAccountId = _getUrlParams.kdcdc;\n  var accountIdByUrl = accountId || accountid || KDAccountId;\n  var accountIdBySession = window.sessionStorage.getItem(KD_ACCOUNT_ID);\n  if (accountIdByUrl) {\n    window.sessionStorage.setItem(KD_ACCOUNT_ID, accountIdByUrl);\n  }\n  return accountIdByUrl || accountIdBySession;\n}\nfunction getUrlParams(sUrl) {\n  var result = {};\n  if (!sUrl) return result;\n  sUrl.replace(/[?&]([^=&#]+)=([^&#]*)/g, function (a, k, v) {\n    if (result[k] === undefined && v !== '') {\n      result[k] = v;\n    }\n    return '';\n  });\n  return result;\n}\n\n//# sourceURL=webpack://print-designer/./src/utils/url.ts?");

/***/ }),

/***/ 87600:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(41256);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(84945);\n/* harmony import */ var _factory_parseUIControl__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(23312);\n/* harmony import */ var _hooks_useMeasureDirty__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(99252);\n/* harmony import */ var _utils_buildTree__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(66256);\n/* harmony import */ var _center_navTool__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(12968);\n\n\n\n\nvar _excluded = [\"type\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_5___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_6___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_10___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_9___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_8___default()(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_11___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_7___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n// @ts-nocheck\n\n\n\n\n\n\n\n// TODO\n// 这里需要把dataContext下发下去,并在控件层编写逻辑\nvar PrintDesignerCore = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_15__.memo)(function (props) {\n  // 这个数据应该不是globalConfig里的data，而是addDataChangeListener里来的data，初始时globalxxx里的\n  // 工厂类迭代渲染控件\n  // 不需要模型\n  // const data = {}\n  // 平铺数据渲染 or 平铺转树形再渲染?\n  // 平铺 groupby 同组的作为<></>下的组件，父子的子作为父的children传入?\n  // const { data = {}, meta = {} } = props\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_15__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_15__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.SelectionContext);\n  // const globalContext = useContext(GlobalContext)\n  // const { activedSelectId } = globalContext\n  var _useActivedSelectedId = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.useActivedSelectedId)({\n      dataContext: dataContext,\n      selectionContext: selectionContext\n    }),\n    activedSelectId = _useActivedSelectedId.activedSelectId;\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_15__.useContext)(_context__WEBPACK_IMPORTED_MODULE_16__.PrintDesignerContext),\n    _useContext$meta = _useContext.meta,\n    meta = _useContext$meta === void 0 ? [] : _useContext$meta,\n    _useContext$definitio = _useContext.definition,\n    definition = _useContext$definitio === void 0 ? {} : _useContext$definitio,\n    pagesManageRef = _useContext.pagesManageRef,\n    pageManage = _useContext.pageManage,\n    globalConfig = _useContext.globalConfig,\n    scaleRef = _useContext.scaleRef,\n    asistantBorderRef = _useContext.asistantBorderRef;\n  // 两个状态还要做响应式 换种方式\n  // const [itemsData, setItemsData] = useState(() => dataContext.getData())\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_15__.useState)(0)[1];\n  var navToolRef = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)(null);\n  var isMultiKeyActiveWhenSelectedRef = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)(false);\n  (0,react__WEBPACK_IMPORTED_MODULE_15__.useEffect)(function () {\n    var dataListener = dataContext.addDataChangeListener(function (_ref) {\n      var type = _ref.type,\n        notNeed = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(_ref, _excluded);\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.console.log(type, notNeed);\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n      // const currentData = dataContext.getData()\n      // if (!Object.is(currentData, itemsData) && !_.isEqual(currentData, itemsData)) {\n      //   console.log('setItemsData', currentData)\n      //   // setItemsData(currentData)\n      //   forceUpdate(n => n + 1)\n      // }\n    });\n    return function () {\n      dataListener && dataListener();\n    };\n  }, []);\n  // 这里还是先用树形数据结构\n  // 拷贝下\n  // console.log(itemsData.items, `itemsData.items`, itemsData.items.slice())\n  var treeData = (0,react__WEBPACK_IMPORTED_MODULE_15__.useMemo)(function () {\n    var itemsData = dataContext.getData();\n    return _babel_runtime_corejs3_core_js_stable_object_values__WEBPACK_IMPORTED_MODULE_12___default()((0,_utils_buildTree__WEBPACK_IMPORTED_MODULE_19__[\"default\"])(JSON.parse(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_13___default()(itemsData)).items, {\n      children: 'items',\n      parent: 'parentId',\n      id: 'id'\n    }))[0];\n  }, [dataContext.getData()]);\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.console.log(\"props\", treeData);\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_15__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.ConfigContext),\n    getPrefixCls = _useContext2.getPrefixCls,\n    prefixCls = _useContext2.prefixCls;\n  var printDesignerPrefixCls = getPrefixCls(prefixCls);\n  var canvasRef = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)(null);\n  var printDesignerCanvasRef = (0,react__WEBPACK_IMPORTED_MODULE_15__.useRef)(null);\n  var _useMeasureDirty = (0,_hooks_useMeasureDirty__WEBPACK_IMPORTED_MODULE_18__.useMeasureDirty)(),\n    _useMeasureDirty2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useMeasureDirty, 2),\n    containerRef = _useMeasureDirty2[0],\n    _useMeasureDirty2$ = _useMeasureDirty2[1],\n    width = _useMeasureDirty2$.width,\n    height = _useMeasureDirty2$.height;\n  var language = dataContext.findControl(dataContext.getRootId()).language;\n  var onChangeProperty = function onChangeProperty() {};\n  var portalId = \"\".concat(printDesignerPrefixCls, \"-top-view-main\");\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default().createElement((react__WEBPACK_IMPORTED_MODULE_15___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.ViewHeader, {\n    content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default().createElement(\"div\", {\n      className: \"\".concat(printDesignerPrefixCls, \"-main-view-toolbar\"),\n      id: \"kdesigner-top-view-main\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default().createElement(_center_navTool__WEBPACK_IMPORTED_MODULE_20__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, props, {\n      ref: navToolRef,\n      onChangeProperty: onChangeProperty,\n      context: {\n        dataContext: dataContext,\n        selectionContext: selectionContext,\n        activedSelectId: activedSelectId,\n        canvasRef: canvasRef,\n        globalConfig: globalConfig,\n        scaleRef: scaleRef,\n        asistantBorderRef: asistantBorderRef,\n        isMultiKeyActiveWhenSelectedRef: isMultiKeyActiveWhenSelectedRef\n      }\n    }))),\n    portalId: portalId\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-paper\"),\n    ref: printDesignerCanvasRef\n  }, (0,_factory_parseUIControl__WEBPACK_IMPORTED_MODULE_17__.parseUIControl)(treeData, false, _objectSpread({\n    width: width,\n    height: height,\n    navToolRef: navToolRef,\n    canvasRef: canvasRef,\n    meta: meta,\n    definition: definition,\n    activedSelectId: activedSelectId,\n    dataContext: dataContext,\n    isMultiKeyActiveWhenSelectedRef: isMultiKeyActiveWhenSelectedRef\n  }, props))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_15___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-pages-manage\"),\n    ref: pagesManageRef\n  }, pageManage));\n});\nPrintDesignerCore.tabKey = 'PrintDesignerCore';\nPrintDesignerCore.getTabName = function () {\n  return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_14__.getLangMsg)('printd.grid.key0109');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PrintDesignerCore);\n\n// TODO:\n/**\n * 1. 根据设计稿先把编辑器控件画出来\n * 2. 根据konva将画布、画布子控件画出来\n * 3. 根据通用设计器将设计器相关接口用UML画出来，并设计套打应用设计器将相关层连接起来\n * 4. 思考如何实现联通、并思考暴露什么接口，并考虑如何拓展\n */\n\n// DONE:\n/**\n * 1. 后台过来的约定元数据（模型层） 的元描述（这里是确定的） o\n * 2. 后台过来的根据约定构造出来的元数据 （数据层） 的元描述 （这里要跟1关联起来，很多东西，如Defitio rules 应该只要去模型层获取，可以根据类实例关系或者工厂类方法注入管理（联系）？） o\n * 3. 视图类图关系设计\n */\n\n//  1. 将数据与模型混成一体 -> MetaSchema -> Meta\n//  2. 将数据的归数据 -> DataSchema -> Data // 不确定数据归为数据\n//  3. 将模型归模型 -> ModelSchema -> Model // 确定的就一定是模型，不确定统一归为数据的\n\n//# sourceURL=webpack://print-designer/./src/views/PrintDesignerCore.tsx?");

/***/ }),

/***/ 87052:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30479);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _root__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(54052);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21980);\n\n\n\n\n\n\n\n\nvar KDRoot = function KDRoot(props) {\n  var fieldSizeCacheRef = (0,react__WEBPACK_IMPORTED_MODULE_4__.useRef)({});\n  // const {\n  //   id\n  // } = props\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_4__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.SelectionContext);\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_4__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.DataContext);\n  var getFieldSizeCache = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (pageId) {\n    var _fieldSizeCacheRef$cu;\n    return ((_fieldSizeCacheRef$cu = fieldSizeCacheRef.current) === null || _fieldSizeCacheRef$cu === void 0 ? void 0 : _fieldSizeCacheRef$cu[pageId]) || {};\n  }, []);\n  var setFieldSizeCache = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (pageId, data) {\n    fieldSizeCacheRef.current[pageId] = data;\n  }, []);\n  var fieldSizeCacher = (0,react__WEBPACK_IMPORTED_MODULE_4__.useMemo)(function () {\n    return {\n      setFieldSizeCache: setFieldSizeCache,\n      getFieldSizeCache: getFieldSizeCache\n    };\n  }, []);\n  var selectDeleteControl = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function (deleteControls, selectionContext, selection) {\n    if (!_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_1___default()(deleteControls).call(deleteControls, function (control) {\n      return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_7__.isGridRelativeControl)(control);\n    })) {\n      selectionContext.setSelect(selection);\n    }\n  }, []);\n  var deleteSelectionControl = (0,react__WEBPACK_IMPORTED_MODULE_4__.useCallback)(function () {\n    var _context;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.console.log('deleteSelectionControl');\n    // 选择删除功能\n    // if()\n    var rootId = dataContext.getRootId();\n    var selectedIds = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_2___default()(_context = selectionContext.getSelection()).call(_context, function (id) {\n      return id !== rootId;\n    });\n    var deleteedIds = selectedIds;\n    var deleteControls = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_3___default()(selectedIds).call(selectedIds, function (id) {\n      return dataContext.findControl(id);\n    });\n    if (deleteedIds.length) {\n      if (deleteControls.length === 1) {\n        var control = deleteControls[0];\n        selectDeleteControl(deleteControls, selectionContext, control.parentId !== rootId ? [control.parentId] : []);\n      } else {\n        selectDeleteControl(deleteControls, selectionContext, []);\n      }\n      dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_5__.createDeleteAction)(deleteedIds));\n    }\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_root__WEBPACK_IMPORTED_MODULE_6__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n    deleteSelectionControl: deleteSelectionControl,\n    fieldSizeCacher: fieldSizeCacher\n  }, props));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (KDRoot);\n\n//# sourceURL=webpack://print-designer/./src/views/center/KDRoot.tsx?");

/***/ }),

/***/ 12968:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ALIGN_SHAPES: function() { return /* binding */ ALIGN_SHAPES; },\n/* harmony export */   borderHandle: function() { return /* reexport safe */ _utils_grid__WEBPACK_IMPORTED_MODULE_43__.borderHandle; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(89843);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97440);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(64248);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(29636);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(89472);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(30479);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(59312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(7224);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(98092);\n/* harmony import */ var _editorControls_navTool_backGroudColorEditor__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(88304);\n/* harmony import */ var _editorControls_navTool_colorPicker__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(8020);\n/* harmony import */ var _editorControls_navTool_fontColorEditor__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(36372);\n/* harmony import */ var _editorControls_navTool_fontSizeEditor__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(43272);\n/* harmony import */ var _editorControls_navTool_picker_png__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(62493);\n/* harmony import */ var _hooks_useCommonProp__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(95356);\n/* harmony import */ var _hooks_useLastSelectedModal__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(64484);\n/* harmony import */ var _utils_client__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(77168);\n/* harmony import */ var _utils_controlType__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(98600);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(21980);\n/* harmony import */ var _dashed_png__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(23668);\n/* harmony import */ var _dotted_png__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(50228);\n/* harmony import */ var _deleteLine_png__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(91460);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(84945);\n/* harmony import */ var _utils_controlBorder__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(44780);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar _context5, _context6, _context7;\nvar _excluded = [\"id\", \"parentId\"],\n  _excluded2 = [\"id\", \"parentId\"];\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_6___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_7___default()(o) || o[\"@@iterator\"]; if (!it) { if (_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13___default()(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { var _context56; if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_14___default()(_context56 = Object.prototype.toString.call(o)).call(_context56, 8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_5___default()(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context54, _context55; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default()(_context54 = ownKeys(Object(t), !0)).call(_context54, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default()(_context55 = ownKeys(Object(t))).call(_context55, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar MIN_ICON_WIDTH = 32;\nvar horizontalAlignTitle = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0049');\nvar verticalAlignTitle = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0050');\nvar borderSettingTitle = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0051');\nvar layoutAlignTitle = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0052');\nvar copyControl = function copyControl(selectItem, parentId, dataRef) {\n  var newControl = lodash__WEBPACK_IMPORTED_MODULE_31___default().cloneDeep(selectItem);\n  newControl.parentId = parentId;\n  newControl.key = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUniqueKey)(selectItem.key, selectItem.type, dataRef.current);\n  // 不需要保留之前的吧\n  newControl.id = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUUid)();\n  return newControl;\n};\nvar copyControlRecurve = function copyControlRecurve(_ref) {\n  var _context, _context2;\n  var selectItem = _ref.selectItem,\n    items = _ref.items,\n    parentId = _ref.parentId,\n    dataRef = _ref.dataRef;\n  // key也不能重复\n  var itemId = selectItem.id,\n    selectItemParentId = selectItem.parentId,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(selectItem, _excluded);\n  var newControl = copyControl(selectItem, parentId || selectItemParentId, dataRef);\n  var childrens = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(items).call(items, function (item) {\n    if (item.parentId === itemId) return item;\n  })).call(_context, Boolean);\n  return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context2 = [newControl]).call(_context2, lodash__WEBPACK_IMPORTED_MODULE_31___default().flattenDeep(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(childrens).call(childrens, function (item) {\n    return copyControlRecurve({\n      selectItem: item,\n      items: items,\n      parentId: newControl.id,\n      dataRef: dataRef\n    });\n  })));\n};\nvar copyGridControl = function copyGridControl(_ref2) {\n  var _context4;\n  var selectItem = _ref2.selectItem,\n    items = _ref2.items,\n    parentId = _ref2.parentId,\n    dataRef = _ref2.dataRef;\n  var itemId = selectItem.id,\n    selectItemParentId = selectItem.parentId,\n    rest = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(selectItem, _excluded2);\n  var newGrid = copyControl(selectItem, parentId || selectItemParentId, dataRef);\n  newGrid.parentId = parentId || selectItemParentId;\n  newGrid.subGridId = [];\n  var gridItems = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(items).call(items, function (item) {\n    return item.parentId === itemId;\n  });\n  var _getCollectProps = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.getCollectProps)(gridItems),\n    cells = _getCollectProps.cells,\n    rows = _getCollectProps.rows,\n    columns = _getCollectProps.columns;\n  // 这里抽离key的重复判断\n  // 不进行昂贵的createData动作\n  var newRows = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(rows).call(rows, function (row) {\n    return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_31___default().cloneDeep(row), {\n      id: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUUid)(),\n      key: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUniqueKey)(row.key, row.type, dataRef.current),\n      parentId: newGrid.id\n    });\n  });\n  var newColumns = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(columns).call(columns, function (column) {\n    return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_31___default().cloneDeep(column), {\n      id: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUUid)(),\n      key: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUniqueKey)(column.key, column.type, dataRef.current),\n      parentId: newGrid.id\n    });\n  });\n  var newCells = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(cells).call(cells, function (cell) {\n    return (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, lodash__WEBPACK_IMPORTED_MODULE_31___default().cloneDeep(cell), {\n      id: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUUid)(),\n      key: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUniqueKey)(cell.key, cell.type, dataRef.current),\n      parentId: newGrid.id,\n      rowId: newRows[_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_20___default()(rows).call(rows, function (row) {\n        return row.id === cell.rowId;\n      })].id,\n      columnId: newColumns[_babel_runtime_corejs3_core_js_stable_instance_find_index__WEBPACK_IMPORTED_MODULE_20___default()(columns).call(columns, function (column) {\n        return column.id === cell.columnId;\n      })].id\n    });\n  });\n  var newCellsChildren = lodash__WEBPACK_IMPORTED_MODULE_31___default().flattenDeep(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(cells).call(cells, function (cell, cellIdx) {\n    var _context3;\n    var cellId = cell.id;\n    var oldCellForNewCellMap = new (_babel_runtime_corejs3_core_js_stable_weak_map__WEBPACK_IMPORTED_MODULE_21___default())();\n    // 只有单个子控件\n    var children = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(items).call(items, function (item) {\n      if (item.parentId === cellId) {\n        oldCellForNewCellMap.set(item, cellIdx);\n        return item;\n      }\n    })).call(_context3, Boolean);\n    return lodash__WEBPACK_IMPORTED_MODULE_31___default().flattenDeep(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(children).call(children, function (item) {\n      return copyControlRecurve({\n        selectItem: item,\n        items: items,\n        dataRef: dataRef,\n        parentId: newCells[oldCellForNewCellMap.get(item)].id\n      });\n    }));\n  }));\n  return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context4 = [newGrid]).call(_context4, newRows, newColumns, newCells, newCellsChildren);\n};\nvar ALIGN_SHAPES = 'align-shapes';\n// 理论上这里不用写margin了,通过getComputedStyle获取\nvar propertyOperationBarEditorComponentList = _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context5 = [{\n  name: _constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME,\n  margin: 5\n}, {\n  name: _constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE,\n  margin: 10\n}, {\n  name: _constants__WEBPACK_IMPORTED_MODULE_33__.BOLD,\n  margin: 7\n}]).call(_context5, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context6 = [_constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC, _constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE, _constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE]).call(_context6, function (name) {\n  return {\n    name: name,\n    margin: 4\n  };\n})), (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context7 = [_constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR, _constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR, _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, _constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN, _constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN, _constants__WEBPACK_IMPORTED_MODULE_33__.BORDER]).call(_context7, function (name) {\n  return {\n    name: name,\n    margin: 4\n  };\n})), [\n// 17 + 52\n{\n  name: ALIGN_SHAPES,\n  margin: 19\n}]);\n\n// export const OUT_BORDER = 'outBorder'\n// export const ALL_BORDER = 'allBorder'\n// export const NONE_BORDER = 'noneBorder'\n// export const LEFT_BORDER = 'left'\n// export const TOP_BORDER = 'top'\n// export const RIGHT_BORDER = 'right'\n// export const BOTTOM_BORDER = 'bottom'\nvar LINE_LIST = [_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_NORMAL, _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_CU, _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_JIACU];\n// 取出几种可能: 上下左右全无,并对应颜色, 粗细数据(1px, 2px, 3px)\n\nvar getGridSelectionIds = function getGridSelectionIds(selection, dataContext) {\n  return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(selection).call(selection, function (id) {\n    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_constants__WEBPACK_IMPORTED_MODULE_33__.GRID_TYPES).call(_constants__WEBPACK_IMPORTED_MODULE_33__.GRID_TYPES, dataContext.findControl(id).type);\n  });\n};\n\n// 这里只处理一个事情，应该抽出三个函数比较好\n// 之前写得快,现在只能改成同时处理多个属性\n\nvar INITIAL_SCALE = 100;\nvar NavFixedTool = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_32__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_32__.forwardRef)(function (_ref3, forwardedRef) {\n  var _commonPropertyNodes$, _commonPropertyNodes$2, _context8, _context9, _context10, _context11, _context12, _context13, _fontNamePropertyNode, _fontNamePropertyNode2, _fontNamePropertyNode3, _fontNamePropertyNode4, _context24, _fontSizePropertyNode, _fontSizePropertyNode2, _propertyOperationBar, _context49, _context50, _context51, _context52, _context53;\n  var meta = _ref3.meta,\n    data = _ref3.data,\n    context = _ref3.context,\n    onChangeProperty = _ref3.onChangeProperty;\n  // console.log('renderLog', 'nav-tool')\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_32__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.ConfigContext),\n    getPrefixCls = _useContext.getPrefixCls,\n    prefixCls = _useContext.prefixCls;\n  var fontSizeRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(null);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState, 2),\n    borderSelectVisible = _useState2[0],\n    setBorderSelectVisible = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState3, 2),\n    fontNameSelectVisible = _useState4[0],\n    setFontNameSelectVisible = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState5, 2),\n    moreBarVisible = _useState6[0],\n    setMoreBarVisible = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState7, 2),\n    colorPickVisible = _useState8[0],\n    setColorPickVisible = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState9, 2),\n    moreVisible = _useState10[0],\n    setMoreVisible = _useState10[1];\n  var navToolPrefixCls = getPrefixCls(prefixCls, 'nav-tool');\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(_constants__WEBPACK_IMPORTED_MODULE_33__.DEFAULT_TOOL_BORDER_COLOR),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState11, 2),\n    borderColorState = _useState12[0],\n    setBorderColor = _useState12[1];\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_NORMAL),\n    _useState14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState13, 2),\n    borderLineState = _useState14[0],\n    setBorderLine = _useState14[1];\n  var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(_constants__WEBPACK_IMPORTED_MODULE_33__.ALL_BORDER),\n    _useState16 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState15, 2),\n    borderTypeState = _useState16[0],\n    setBorderType = _useState16[1];\n  var dataContext = context.dataContext,\n    selectionContext = context.selectionContext,\n    canvasRef = context.canvasRef,\n    activedSelectId = context.activedSelectId,\n    globalConfig = context.globalConfig,\n    scaleRef = context.scaleRef,\n    asistantBorderRef = context.asistantBorderRef,\n    _context$isMultiKeyAc = context.isMultiKeyActiveWhenSelectedRef,\n    isMultiKeyActiveWhenSelectedRef = _context$isMultiKeyAc === void 0 ? (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(false) : _context$isMultiKeyAc;\n  var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(data.bizType === '1'),\n    _useState18 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState17, 2),\n    enableRefBorder = _useState18[0],\n    setEnableRefBorder = _useState18[1];\n  var _useState19 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(function () {\n      return (scaleRef === null || scaleRef === void 0 ? void 0 : scaleRef.current) || \"\".concat(INITIAL_SCALE);\n    }),\n    _useState20 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState19, 2),\n    scale = _useState20[0],\n    setScale = _useState20[1];\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.DataFactoryContext),\n    dataFactory = _useContext2.dataFactory,\n    modelFactory = _useContext2.modelFactory;\n  var _useLastSelectedModal = (0,_hooks_useLastSelectedModal__WEBPACK_IMPORTED_MODULE_40__.useLastSelectedModal)(_objectSpread(_objectSpread({\n      meta: meta\n    }, context), {}, {\n      activedSelectId: activedSelectId,\n      modelFactory: modelFactory\n    })),\n    modelData = _useLastSelectedModal.modelData,\n    selectItem = _useLastSelectedModal.selectItem,\n    isRootId = _useLastSelectedModal.isRootId,\n    rootId = _useLastSelectedModal.rootId;\n  var _useCommonModel = (0,_hooks_useCommonProp__WEBPACK_IMPORTED_MODULE_39__[\"default\"])({\n      selectionContext: selectionContext,\n      dataContext: dataContext,\n      meta: meta,\n      globalConfig: globalConfig\n    }),\n    commonProp = _useCommonModel.commonProp,\n    multiSelect = _useCommonModel.multiSelect,\n    selection = _useCommonModel.selection;\n  var selectItems = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(selection).call(selection, function (id) {\n    return dataContext.findControl(id);\n  });\n  var commonPropertyNodes = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(modelData).call(modelData, function (item) {\n    return item.Id === 'CommonGroup';\n  });\n  var fontNamePropertyNode = commonPropertyNodes === null || commonPropertyNodes === void 0 || (_commonPropertyNodes$ = commonPropertyNodes.Nodes) === null || _commonPropertyNodes$ === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(_commonPropertyNodes$).call(_commonPropertyNodes$, function (item) {\n    return item.Id === 'FontName';\n  });\n  var fontSizePropertyNode = commonPropertyNodes === null || commonPropertyNodes === void 0 || (_commonPropertyNodes$2 = commonPropertyNodes.Nodes) === null || _commonPropertyNodes$2 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(_commonPropertyNodes$2).call(_commonPropertyNodes$2, function (item) {\n    return item.Id === 'FontSize';\n  });\n  var _useContext3 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useContext)(_context__WEBPACK_IMPORTED_MODULE_47__.PrintDesignerContext),\n    setMessage = _useContext3.setMessage;\n  var selectedIds = selectionContext.getSelection();\n  var borderData = selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER] || _constants__WEBPACK_IMPORTED_MODULE_33__.DEFUALT_BORDER_DATA;\n  var _borderHandle = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.borderHandle)(borderData),\n    _borderHandle2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_borderHandle, 4),\n    borderTypeArr = _borderHandle2[0],\n    borderColor = _borderHandle2[1],\n    borderStyle = _borderHandle2[2],\n    borderWidth = _borderHandle2[3];\n  var borderType = borderTypeArr.length === 1 ? borderTypeArr[0] : 'outBorder';\n  // TODO: 网格\n  var isGridType = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.isGridType)(selectItem);\n  // TODO: 后面键盘事件执行前也会走类似逻辑\n  // 部分控件不止上述限制, 例如表格\n  var isGridControl = _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_24___default()(_context8 = selectionContext.getSelection()).call(_context8, function (id) {\n    return (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.isGridRelativeControl)(dataContext.findControl(id));\n  });\n  var isCannotOperateBorder = isGridControl;\n  var hasSelectedControl = activedSelectId !== rootId;\n  var isCannotOperateShapesAlign = _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_24___default()(_context9 = selectionContext.getSelection()).call(_context9, function (id) {\n    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_OPERATE_SHAPESALIGN).call(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_OPERATE_SHAPESALIGN, dataContext.findControl(id).type);\n  });\n  var isCanCopy = hasSelectedControl && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25___default()(_context10 = selectionContext.getSelection()).call(_context10, function (id) {\n    return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_COPY_CONTORLS).call(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_COPY_CONTORLS, dataContext.findControl(id).type);\n  });\n  var isCanDelete = hasSelectedControl && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25___default()(_context11 = selectionContext.getSelection()).call(_context11, function (id) {\n    return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_DELETE_CONTORLS).call(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_DELETE_CONTORLS, dataContext.findControl(id).type);\n  });\n  var isCanFormat = hasSelectedControl && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25___default()(_context12 = selectionContext.getSelection()).call(_context12, function (id) {\n    return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_FORMAT_CONTORLS).call(_constants__WEBPACK_IMPORTED_MODULE_33__.CANNOT_FORMAT_CONTORLS, dataContext.findControl(id).type);\n  });\n  var operatorScale = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (newScale) {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.console.log('scale---change', newScale);\n    if (newScale !== scale) {\n      setScale(newScale);\n      if (scaleRef) {\n        scaleRef.current = newScale;\n      }\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.eventBus.emit('scale', +newScale / INITIAL_SCALE);\n    }\n  }, [scale]);\n  var options = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context13 = [80, 100, 150, 200, 300]).call(_context13, function (scale) {\n    return {\n      label: \"\".concat(scale, \"%\"),\n      value: \"\".concat(scale)\n    };\n  });\n  var copyControl = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    var _context14;\n    var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n      copySelectedIds = _ref4.selection,\n      copySideItems = _ref4.items;\n    // 这里有些硬编码的意思\n    // 待确认\n    // 容器类控件需要判断\n    // const { id, ...rest } = selectItem\n    // const createData = dataFactory\n    var newControls = lodash__WEBPACK_IMPORTED_MODULE_31___default().flattenDeep(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context14 = copySelectedIds || selectedIds).call(_context14, function (id) {\n      // TODO: 父节点不存在当前页面时\n      var selectItem = copySideItems ? _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(copySideItems).call(copySideItems, function (item) {\n        return item.id === id;\n      }) : dataContext.findControl(id);\n      // 根节点可能不同\n      // 首层直接更换\n      if (copySideItems) {\n        selectItem.parentId = dataContext.getRootId();\n      }\n      var items = copySideItems || dataContext.getData().items;\n      if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.isGridType)(selectItem)) {\n        return copyGridControl({\n          selectItem: selectItem,\n          items: items,\n          dataRef: globalConfig.dataRef\n        });\n      }\n      return copyControlRecurve({\n        selectItem: selectItem,\n        items: items,\n        dataRef: globalConfig.dataRef\n      });\n    }));\n    return newControls;\n  }, [isRootId, meta, selectedIds, dataFactory, globalConfig]);\n  var pasteControl = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (newControls) {\n    var _context15, _context16, _context17;\n    // 复制过来的页眉页脚的子控件如果页眉页脚不粘贴，那子控件也不处理\n    newControls = _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_13___default()(newControls) ? newControls : _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_context15 = [newControls]).call(_context15, Boolean);\n    var headerFooterIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context16 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(newControls).call(newControls, function (control) {\n      return (0,_utils_controlType__WEBPACK_IMPORTED_MODULE_42__.isHeader)(control) || (0,_utils_controlType__WEBPACK_IMPORTED_MODULE_42__.isFooter)(control);\n    })).call(_context16, function (control) {\n      return control.id;\n    });\n    var subDataGridIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context17 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(newControls).call(newControls, _utils_grid__WEBPACK_IMPORTED_MODULE_43__.isSubDataGrid)).call(_context17, function (control) {\n      return control.id;\n    });\n    var newControlDatas = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(newControls).call(newControls, function (control) {\n      if ((0,_utils_controlType__WEBPACK_IMPORTED_MODULE_42__.isFooter)(control) || (0,_utils_controlType__WEBPACK_IMPORTED_MODULE_42__.isHeader)(control) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(headerFooterIds).call(headerFooterIds, control.parentId)) {\n        return false;\n      }\n      if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.isSubDataGrid)(control) || (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.isGridFooter)(control) || _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(subDataGridIds).call(subDataGridIds, control.parentId)) {\n        // 子数据表格禁用复制\n        return false;\n      }\n      return true;\n    });\n    if (!newControlDatas || !newControlDatas.length) return;\n    dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createPasteAction)(newControlDatas)).then(function () {\n      var _context18;\n      var newControlIds = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(newControlDatas).call(newControlDatas, function (c) {\n        return c.id;\n      });\n      selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context18 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(newControlDatas).call(newControlDatas, function (c) {\n        return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(newControlIds).call(newControlIds, c.parentId);\n      })).call(_context18, function (c) {\n        return c.id;\n      }));\n    });\n  }, []);\n  var copyAndPasteControl = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    if (!isCanCopy) return;\n    var newControls = copyControl();\n    if (newControls) {\n      pasteControl(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(newControls).call(newControls, function (newContro) {\n        delete newContro.tableTailId;\n        return newContro;\n      }));\n    }\n  }, [isRootId, selectedIds, meta, isCanCopy]);\n  var canvasRedo = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    dataContext.redo();\n  }, []);\n  var canvasUndo = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    dataContext.undo();\n  }, []);\n  var _useState21 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState22 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState21, 2),\n    formatEnable = _useState22[0],\n    setFormatEnable = _useState22[1];\n\n  // 格式刷、复制属性是否要在模型上声明，并用Proxy代理表单数据，已达到声明式编码的效果, 代理应该不行，数据从服务端下来的也要走一次代理?\n  // 双击效果需要事件通知\n  var setCursor = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    var _canvasRef$current;\n    var cursor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    if ((_canvasRef$current = canvasRef.current) !== null && _canvasRef$current !== void 0 && (_canvasRef$current = _canvasRef$current.content) !== null && _canvasRef$current !== void 0 && _canvasRef$current.style) {\n      canvasRef.current.content.style.cursor = cursor;\n    }\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_32__.useEffect)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.eventBus.on('format-done', function () {\n      if (formatEnable) {\n        setFormatEnable(false);\n        // console.log(canvasRef)\n        setCursor('');\n        // document.body.style.cursor = ''\n        formatControlInfoRef.current = {};\n      }\n    });\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.eventBus.off('format-done');\n    };\n  }, [formatEnable]);\n  var formatControlInfoRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)({});\n  var formatControlClick = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    var isOnce = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n    if (isRootId) return;\n    if (formatEnable) {\n      setFormatEnable(false);\n      formatControlInfoRef.current = {};\n      setCursor('');\n      return;\n    }\n    // 交给监听侧?\n    // console.log(canvasRef)\n    setCursor(\"url(\".concat(_editorControls_navTool_picker_png__WEBPACK_IMPORTED_MODULE_38__[\"default\"], \"),auto\"));\n    if (!isOnce) {\n      setFormatEnable(true);\n      formatControlInfoRef.current.isDoubleClick = true;\n    } else {\n      setFormatEnable(true);\n      formatControlInfoRef.current.isDoubleClick = false;\n    }\n    formatControlInfoRef.current.selectItem = selectItem;\n  }, [isRootId, activedSelectId, selectItem, formatEnable]);\n  var _handleChange = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (propName, value) {\n    var rest = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    value = propName === _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT && !value ? 1 : value;\n    // const updateBorderTypes = otherArg && [INNER_BORDER, ALL_BORDER, NONE_BORDER].includes(otherArg)\n    if (activedSelectId !== rootId) {\n      if (!multiSelect) {\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUpdateAction)([[activedSelectId, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, value)]], rest));\n      } else {\n        var batchUpdateValue = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(selection).call(selection, function (id) {\n          return [id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, propName, value)];\n        });\n        // 多选批量属性更新\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUpdateAction)(batchUpdateValue, rest));\n      }\n    }\n  }, [activedSelectId, rootId, multiSelect, selection, isGridType, selectItem]);\n  var deleteControl = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    var _context19;\n    if (!isCanDelete) return;\n    var ids = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_context19 = selectionContext.getSelection()).call(_context19, function (id) {\n      return id !== rootId;\n    });\n    if (!ids.length) return;\n    dataContext.deleteControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createDeleteAction)(ids));\n    selectionContext.setSelect([]);\n  }, [rootId, isCanDelete]);\n  var dropDownClassName = \"\".concat(navToolPrefixCls, \"-dropdown-text\");\n  var dropdownRender = function dropdownRender(originNode) {\n    var _context20;\n    var Comp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(originNode, {}, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context20 = originNode.props.children.props.data).call(_context20, function (node) {\n      return [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(node, {}, [node.props.children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: dropDownClassName\n      }, node.props.children.props.itemTitle)])];\n    }));\n    return Comp;\n  };\n  var DropdownProps = {\n    arrow: false,\n    arrowOffset: 0,\n    arrowSize: 0,\n    placement: 'rightTop',\n    popperClassName: 'kds-dropdown'\n  };\n  var BORDER_CHANGE_TYPE = {\n    borderWidth: 'borderWidth',\n    borderColor: 'borderColor',\n    borderStyle: 'borderStyle'\n  };\n  var BORDER_STYLE = {\n    dotted: 'dotted',\n    dash: 'dashed',\n    solid: 'solid'\n  };\n  var _useState23 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState24 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState23, 2),\n    borderColorPickerVisible = _useState24[0],\n    setBorderColorPickerVisible = _useState24[1];\n  var _useState25 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(false),\n    _useState26 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState25, 2),\n    borderWidthPopperVisible = _useState26[0],\n    setBorderWidthPopperVisible = _useState26[1];\n  var Menu = _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Dropdown.Menu,\n    Item = _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Dropdown.Item;\n  var spanStyle = {\n    marginRight: -5\n  };\n  var borderDropDownStyle = function borderDropDownStyle(value) {\n    // if (isGridControl && !['noneBorder', 'innerBorder'].includes(value)) return false\n    return true;\n  };\n  var borderDropdownRender = function borderDropdownRender(originNode, setBorderSelectVisible, setMoreBarVisible) {\n    var _context21;\n    var Comp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(originNode, {}, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context21 = originNode.props.children.props.data).call(_context21, function (node) {\n      return borderDropDownStyle(node.props.value) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(node, {}, [node.props.children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: dropDownClassName\n      }, node.props.children.props.itemTitle)]);\n    })));\n    var onItemClick = function onItemClick(key, changeType) {\n      setBorderLine(key);\n      if (borderTypeState === _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD && key !== _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_JIACU) {\n        setBorder(borderColorState, _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER, key);\n      } else {\n        setBorder(borderColorState, borderTypeState, key);\n      }\n      setBorderWidthPopperVisible(false);\n      setBorderSelectVisible(false);\n      setMoreBarVisible(false);\n    };\n    // return Comp\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", null, Comp, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Tooltip, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({\n      key: BORDER_CHANGE_TYPE.borderWidth\n    }, DropdownProps, {\n      gap: -6,\n      visible: borderWidthPopperVisible,\n      onVisibleChange: setBorderWidthPopperVisible,\n      popperClassName: \"kds-border-width-dropdown\",\n      popperStyle: {\n        width: 100,\n        transition: 'none'\n      },\n      tip: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(['kds-border-width-dropdown-item', {\n          'selected': borderLineState === _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_NORMAL\n        }]),\n        key: _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_NORMAL,\n        onClick: function onClick() {\n          return onItemClick(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_NORMAL, BORDER_CHANGE_TYPE.borderWidth);\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n        className: \"kds-border-width-dropdown-item-changgui\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(['kds-border-width-dropdown-item', {\n          'selected': borderLineState === _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_CU\n        }]),\n        key: _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_CU,\n        onClick: function onClick() {\n          return onItemClick(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_CU, BORDER_CHANGE_TYPE.borderWidth);\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n        className: \"kds-border-width-dropdown-item-cu\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(['kds-border-width-dropdown-item', {\n          'selected': borderLineState === _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_JIACU\n        }]),\n        key: _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_JIACU,\n        onClick: function onClick() {\n          return onItemClick(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_JIACU, BORDER_CHANGE_TYPE.borderWidth);\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n        className: \"kds-border-width-dropdown-item-jiacu\"\n      })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(['kds-border-width-dropdown-item', {\n          'selected': borderLineState === BORDER_STYLE.dotted\n        }]),\n        key: BORDER_STYLE.dotted,\n        onClick: function onClick() {\n          return onItemClick(BORDER_STYLE.dotted, BORDER_CHANGE_TYPE.borderStyle);\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n        className: \"kds-border-width-dropdown-item-dotted\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"img\", {\n        src: _dotted_png__WEBPACK_IMPORTED_MODULE_45__[\"default\"]\n      }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(['kds-border-width-dropdown-item', {\n          'selected': borderLineState === BORDER_STYLE.dash\n        }]),\n        key: BORDER_STYLE.dash,\n        onClick: function onClick() {\n          return onItemClick(BORDER_STYLE.dash, BORDER_CHANGE_TYPE.borderStyle);\n        }\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n        className: \"kds-border-width-dropdown-item-dashed\"\n      }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"img\", {\n        src: _dashed_png__WEBPACK_IMPORTED_MODULE_44__[\"default\"]\n      }))))\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()('kds-hover-panel')\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"shezhibiankuangcuxi\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n      className: dropDownClassName,\n      style: spanStyle\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0053')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      type: \"arrow-right-solid\"\n    }))), data.bizType !== '1' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Tooltip, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({\n      key: BORDER_CHANGE_TYPE.borderColor\n    }, DropdownProps, {\n      gap: -6,\n      popperStyle: {\n        width: 244,\n        height: 92,\n        transition: 'none'\n      }\n      // getPopupContainer={() => {\n      //   return document.querySelector('.kds-select-border')\n      // }}\n      ,\n      visible: borderColorPickerVisible,\n      onVisibleChange: setBorderColorPickerVisible,\n      popperClassName: \"kds-color-dropdown\",\n      tip: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_editorControls_navTool_colorPicker__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {\n        showPanel: borderColorPickerVisible,\n        color: \"#ffffff\",\n        onClosePanel: function onClosePanel() {\n          setBorderSelectVisible(false);\n          setBorderColorPickerVisible(false);\n          setMoreBarVisible(false);\n        },\n        onChange: function onChange(_ref7) {\n          var color = _ref7.color;\n          setBorderColor(color);\n          setBorder(color, borderTypeState, borderTypeState === _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD ? _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD : borderLineState, 'color');\n        },\n        onFocus: function onFocus() {\n          !borderColorPickerVisible && setBorderColorPickerVisible(true);\n        },\n        setPoperVisible: setBorderColorPickerVisible\n      })\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()('kds-hover-panel')\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"xiantiaoyanse\"\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n      className: dropDownClassName,\n      style: spanStyle\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0054')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      type: \"arrow-right-solid\"\n    }))));\n  };\n  var _useState27 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(1),\n    _useState28 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState27, 2),\n    lineHeight = _useState28[0],\n    setLineHeight = _useState28[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_32__.useEffect)(function () {\n    setLineHeight(Number(selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT]) || 1);\n  }, [selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT]]);\n  var lineHeightDropdownRender = function lineHeightDropdownRender(originNode) {\n    var _context22;\n    var Comp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(originNode, {}, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context22 = originNode.props.children.props.data).call(_context22, function (node) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(node, {}, [node.props.children.props.data, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n        className: dropDownClassName\n      }, node.props.children.props.itemTitle)]);\n    })));\n    var lineHeightChange = function lineHeightChange(e) {\n      var value = e.target.value;\n      if (value <= 0 && value !== '') return;\n      if (value > 50) {\n        return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.components.key0065'));\n      }\n      setLineHeight(value);\n    };\n    var handleBlur = function handleBlur() {\n      _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, Number(lineHeight));\n    };\n    var handleKeyDown = function handleKeyDown(e) {\n      if (e.keyCode === 13) {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, Number(lineHeight));\n      }\n    };\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", null, Comp, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      className: \"customInput\"\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n      className: \"label\"\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.components.key0064')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.InputNumber, {\n      decimalLength: 2,\n      onChange: lineHeightChange,\n      onBlur: handleBlur,\n      value: lineHeight,\n      borderType: \"bordered\",\n      max: 50,\n      min: 1,\n      minMark: \"[\",\n      onClick: function onClick(e) {\n        e.stopPropagation();\n      },\n      onKeyDown: handleKeyDown,\n      zeroShow: false,\n      showDecimalTailZero: true\n    })));\n  };\n  var normalSelectProps = {\n    style: {},\n    // className: `${navToolPrefixCls}-select-enable`,\n    dropdownClassName: 'kds-select',\n    dropdownStyle: {\n      minWidth: 120\n      // paddingLeft: 12,\n    },\n    dropdownRender: dropdownRender\n  };\n  var getSelectItemsPropUsed = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (prop) {\n    return selectItems.length && _babel_runtime_corejs3_core_js_stable_instance_every__WEBPACK_IMPORTED_MODULE_25___default()(selectItems).call(selectItems, function (item) {\n      return prop && item[prop];\n    });\n  }, [selectItems]);\n  var getSelectItemsProp = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (prop, defaultValue) {\n    var propValues = (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(new (_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_26___default())(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(selectItems).call(selectItems, function (item) {\n      return item[prop] || defaultValue;\n    })));\n    var propIsSame = propValues.length === 1;\n    return propIsSame ? propValues[0] : defaultValue;\n  }, [selectItems]);\n\n  // TODO: use怎么可以突破设置\n  var getClassName = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (enable, prop, customedUsed) {\n    var _context23;\n    return classnames__WEBPACK_IMPORTED_MODULE_29___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, \"\".concat(navToolPrefixCls, \"-operation-btn\"), true), _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context23 = \"\".concat(navToolPrefixCls, \"-operation-btn-\")).call(_context23, prop), prop), \"\".concat(navToolPrefixCls, \"-btn-enable\"), enable), \"\".concat(navToolPrefixCls, \"-btn-disable\"), !enable), \"\".concat(navToolPrefixCls, \"-btn-used\"), getSelectItemsPropUsed(prop) || customedUsed));\n  }, [navToolPrefixCls, selectItem, getSelectItemsPropUsed]);\n  var getSelectDisable = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function (prop) {\n    return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(commonProp).call(commonProp, prop);\n  }, [commonProp]);\n  var fontNameOptions = (_fontNamePropertyNode = fontNamePropertyNode === null || fontNamePropertyNode === void 0 || (_fontNamePropertyNode2 = fontNamePropertyNode.Editor) === null || _fontNamePropertyNode2 === void 0 || (_fontNamePropertyNode2 = _fontNamePropertyNode2.Enum) === null || _fontNamePropertyNode2 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_fontNamePropertyNode2).call(_fontNamePropertyNode2, function (_ref8) {\n    var Value = _ref8.Value,\n      Name = _ref8.Name,\n      IsCustom = _ref8.IsCustom;\n    return {\n      value: Value,\n      label: Name,\n      isCustom: IsCustom\n    };\n  })) !== null && _fontNamePropertyNode !== void 0 ? _fontNamePropertyNode : [{\n    value: 'default',\n    label: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0127')\n  }];\n  var customedFontNameOptions = (_fontNamePropertyNode3 = fontNamePropertyNode === null || fontNamePropertyNode === void 0 || (_fontNamePropertyNode4 = fontNamePropertyNode.Editor) === null || _fontNamePropertyNode4 === void 0 || (_fontNamePropertyNode4 = _fontNamePropertyNode4.Enum) === null || _fontNamePropertyNode4 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context24 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_fontNamePropertyNode4).call(_fontNamePropertyNode4, function (item) {\n    return !!item.IsCustom;\n  })).call(_context24, function (_ref9) {\n    var Value = _ref9.Value,\n      Name = _ref9.Name,\n      IsCustom = _ref9.IsCustom;\n    return {\n      key: Value,\n      label: Name,\n      isCustom: IsCustom\n    };\n  })) !== null && _fontNamePropertyNode3 !== void 0 ? _fontNamePropertyNode3 : [];\n  var fontSizeOptions = (_fontSizePropertyNode = fontSizePropertyNode === null || fontSizePropertyNode === void 0 || (_fontSizePropertyNode2 = fontSizePropertyNode.Editor) === null || _fontSizePropertyNode2 === void 0 || (_fontSizePropertyNode2 = _fontSizePropertyNode2.Enum) === null || _fontSizePropertyNode2 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_fontSizePropertyNode2).call(_fontSizePropertyNode2, function (_ref10) {\n    var Value = _ref10.Value,\n      Name = _ref10.Name;\n    return {\n      value: Value,\n      label: Name\n    };\n  })) !== null && _fontSizePropertyNode !== void 0 ? _fontSizePropertyNode : [{\n    value: 'default',\n    label: _constants__WEBPACK_IMPORTED_MODULE_33__.DEFAULT_FONT_SIZE\n  }];\n  var _useState29 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(function () {\n      return propertyOperationBarEditorComponentList;\n    }),\n    _useState30 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState29, 2),\n    visibleList = _useState30[0],\n    setVisibleList = _useState30[1];\n  var _useState31 = (0,react__WEBPACK_IMPORTED_MODULE_32__.useState)(function () {\n      return [];\n    }),\n    _useState32 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_useState31, 2),\n    unvisibleList = _useState32[0],\n    setUnvisibleList = _useState32[1];\n  var setBorder = function setBorder(color, type, line, changeBorderType) {\n    if (!multiSelect) {\n      type = selectItem.type === 'Line' ? 'allBorder' : type;\n      var _data = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.setControlBorderData)(borderData, color, type, line);\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUpdateAction)([[activedSelectId, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n        scale: scale,\n        changeBorderType: changeBorderType\n      }, _constants__WEBPACK_IMPORTED_MODULE_33__.BORDER, _data), \"gridBorder\", isGridType && {\n        color: color,\n        type: type,\n        line: line\n      })]]));\n    } else {\n      var _context25;\n      //外边框，且非ctrl多选控件\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_context25 = [_constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD, _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER]).call(_context25, type) && isMultiKeyActiveWhenSelectedRef.current === false) {\n        var selectionColIds = (0,_utils_controlBorder__WEBPACK_IMPORTED_MODULE_48__.getSelectionColIds)(dataContext, selection);\n        if (selectionColIds.length) {\n          var _context28, _context29, _context30, _context31, _context32;\n          var updateCellBorderDataMap = function updateCellBorderDataMap(cellData, type) {\n            var _getNewUpdateOuterBor = getNewUpdateOuterBorder(cellData, type),\n              _getNewUpdateOuterBor2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(_getNewUpdateOuterBor, 2),\n              key = _getNewUpdateOuterBor2[0],\n              broderData = _getNewUpdateOuterBor2[1];\n            cellBorderDataMap[key] = broderData;\n          };\n          var getNewUpdateOuterBorder = function getNewUpdateOuterBorder(cellData, type) {\n            var _context26, _context27;\n            var oldBorder = cellBorderDataMap[cellData.id] ? cellBorderDataMap[cellData.id][_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER] : cellData[_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER];\n            var width = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_context26 = ['dashed', 'dotted']).call(_context26, line) ? 0.5 : originType === _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD ? 2 : line;\n            var style = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_context27 = ['dashed', 'dotted']).call(_context27, line) ? line : 'solid';\n            var data = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.setControlBorderDataCore)(oldBorder, type, color, width, style);\n            return [cellData.id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n              scale: scale,\n              changeBorderType: changeBorderType\n            }, _constants__WEBPACK_IMPORTED_MODULE_33__.BORDER, data), \"gridBorder\", {\n              color: color,\n              type: type,\n              line: line\n            })];\n          };\n          var originType = type; //当前设置边框的类型\n          var outerCellsData = (0,_utils_controlBorder__WEBPACK_IMPORTED_MODULE_48__.getOuterCellsData)(dataContext, selection, selectionColIds);\n          var cellBorderDataMap = {};\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default()(_context28 = outerCellsData.firstRowCells).call(_context28, function (cellData) {\n            return updateCellBorderDataMap(cellData, _constants__WEBPACK_IMPORTED_MODULE_33__.TOP_BORDER);\n          });\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default()(_context29 = outerCellsData.lastRowCells).call(_context29, function (cellData) {\n            return updateCellBorderDataMap(cellData, _constants__WEBPACK_IMPORTED_MODULE_33__.BOTTOM_BORDER);\n          });\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default()(_context30 = outerCellsData.firstColCells).call(_context30, function (cellData) {\n            return updateCellBorderDataMap(cellData, _constants__WEBPACK_IMPORTED_MODULE_33__.LEFT_BORDER);\n          });\n          _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_17___default()(_context31 = outerCellsData.lastColCells).call(_context31, function (cellData) {\n            return updateCellBorderDataMap(cellData, _constants__WEBPACK_IMPORTED_MODULE_33__.RIGHT_BORDER);\n          });\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context32 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_15___default()(cellBorderDataMap)).call(_context32, function (key) {\n            return [key, cellBorderDataMap[key]];\n          })));\n          return;\n        }\n      }\n      var batchUpdateValue = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(selection).call(selection, function (id) {\n        var controlData = dataContext.findControl(id);\n        var oldBorder = controlData[_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER];\n        var _isGrid = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.isGridType)(controlData);\n        type = controlData.type === 'Line' ? 'allBorder' : type;\n        var data = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_43__.setControlBorderData)(oldBorder, color, type, line);\n        return [id, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n          scale: scale,\n          changeBorderType: changeBorderType\n        }, _constants__WEBPACK_IMPORTED_MODULE_33__.BORDER, data), \"gridBorder\", _isGrid && {\n          color: color,\n          type: type,\n          line: line\n        })];\n      });\n      dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.createUpdateAction)(batchUpdateValue));\n    }\n  };\n  var borderSelectOptions = [{\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.LEFT_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"zuobiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0055'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0055'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.RIGHT_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"youbiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0056'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0056'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.TOP_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"shangbiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0057'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0057'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.BOTTOM_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"xiabiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0058'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0058'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"waicebiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0059'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0059'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"cuwaibiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0060'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0060'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.INNER_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"neibiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0061'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0061'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.ALL_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"suoyoubiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0062'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0062'),\n    disabled: selectItem.type === 'Line'\n  }, {\n    value: _constants__WEBPACK_IMPORTED_MODULE_33__.NONE_BORDER,\n    label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"wubiankuang\",\n      itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0063'),\n      title: borderSettingTitle\n    }),\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0063'),\n    disabled: selectItem.type === 'Line'\n  }];\n  // TODO:\n  // 两个list/map\n  // useMemo\n  // TODO: kui popperStyle 另一个属性\n  var propertyOperationBarEditorComponentMap = (_propertyOperationBar = {}, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_propertyOperationBar, _constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME, function (disabled, className) {\n    var _context33;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({\n      disabled: disabled,\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(\"\".concat(navToolPrefixCls, \"-property-font-name\"), _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context33 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context33, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME)), className, (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, \"\".concat(navToolPrefixCls, \"-property-font-name-enable\"), !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME)), \"\".concat(navToolPrefixCls, \"-property-font-name-disabled\"), getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME))),\n      visible: fontNameSelectVisible && !disabled,\n      onVisibleChange: function onVisibleChange(open) {\n        setFontNameSelectVisible(open);\n      },\n      dropdownRender: function dropdownRender(originNode) {\n        var _context34;\n        if (!customedFontNameOptions.length) return originNode;\n        var definedFontNames = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(_context34 = originNode.props.children.props.data).call(_context34, function (node) {\n          return !!!_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(customedFontNameOptions).call(customedFontNameOptions, function (option) {\n            return node.props.value === option.key;\n          });\n        });\n        var Comp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().cloneElement(originNode, {}, definedFontNames);\n        return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", null, Comp, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Dropdown, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({\n          key: \"dropdown\",\n          onItemClick: function onItemClick(key) {\n            designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.console.log('onItemClick');\n            _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME, key);\n            fontNameSelectVisible && setFontNameSelectVisible(false);\n          }\n        }, DropdownProps, {\n          popperStyle: {\n            width: 100\n          },\n          popperClassName: classnames__WEBPACK_IMPORTED_MODULE_29___default()(DropdownProps.popperClassName, 'kds-font-custom'),\n          menu: customedFontNameOptions\n        }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n          className: classnames__WEBPACK_IMPORTED_MODULE_29___default()('kds-hover-panel')\n        }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"span\", {\n          className: dropDownClassName,\n          style: {\n            marginLeft: 0\n          }\n        }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0064')))));\n      },\n      dropdownStyle: {\n        width: 100\n      },\n      style: {\n        width: 86,\n        height: 28\n      },\n      onChange: function onChange(val) {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME, val);\n        fontNameSelectVisible && setFontNameSelectVisible(false);\n      }\n    }, \"disabled\", getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME)), \"borderType\", \"none\"), \"value\", selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.FONTNAME] || 'default'), \"options\", fontNameOptions));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE, function (disabled, className) {\n    var _context35;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_editorControls_navTool_fontSizeEditor__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {\n      bizType: data.bizType,\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(\"\".concat(navToolPrefixCls, \"-property-font-size\"), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context35 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context35, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE)), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, \"\".concat(navToolPrefixCls, \"-property-font-size-enable\"), !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE)), \"\".concat(navToolPrefixCls, \"-property-font-size-disabled\"), getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE))),\n      onChange: function onChange(val) {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE, val);\n      },\n      value: +selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE] || _constants__WEBPACK_IMPORTED_MODULE_33__.DEFAULT_FONT_SIZE,\n      dropdownStyle: {\n        width: 100\n      },\n      disabled: getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTSIZE) || disabled,\n      options: fontSizeOptions\n    });\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.BOLD, function (disabled, className) {\n    var _context36;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0065'),\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(getClassName(hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.BOLD), _constants__WEBPACK_IMPORTED_MODULE_33__.BOLD), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context36 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context36, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.BOLD))),\n      onClick: function onClick() {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.BOLD, !getSelectItemsPropUsed(_constants__WEBPACK_IMPORTED_MODULE_33__.BOLD));\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"jiacu\"\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC, function (disabled, className) {\n    var _context37;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0066'),\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(getClassName(hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC), _constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context37 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context37, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC))),\n      onClick: function onClick() {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC, !getSelectItemsPropUsed(_constants__WEBPACK_IMPORTED_MODULE_33__.ITALIC));\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"xieti\"\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE, function (disabled, className) {\n    var _context38;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0067'),\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(getClassName(hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE), _constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context38 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context38, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE))),\n      onClick: function onClick() {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE, !getSelectItemsPropUsed(_constants__WEBPACK_IMPORTED_MODULE_33__.UNDERLINE));\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n      prefix: \"printdesignericon\",\n      type: \"xiahuaxian\"\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE, function (disabled, className) {\n    var _context39;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0068'),\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(getClassName(hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE), _constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context39 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context39, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE))),\n      onClick: function onClick() {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE, !getSelectItemsPropUsed(_constants__WEBPACK_IMPORTED_MODULE_33__.STRIKE));\n      }\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"img\", {\n      src: _deleteLine_png__WEBPACK_IMPORTED_MODULE_46__[\"default\"],\n      style: {\n        width: 16\n      }\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR, function (disabled, className) {\n    var _context40;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      style: {\n        width: 40\n        // 应该不用used才对：FONTCOLOR\n      },\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(getClassName(hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR)), className, \"\".concat(navToolPrefixCls, \"-self-select\"), _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context40 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context40, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR)))\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_editorControls_navTool_fontColorEditor__WEBPACK_IMPORTED_MODULE_36__[\"default\"], {\n      handleChange: function handleChange(val) {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR, val);\n      },\n      setColorPickVisible: setColorPickVisible,\n      setMoreBarVisible: setMoreBarVisible,\n      enable: hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR) && !disabled,\n      value: selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.FONTCOLOR] || _constants__WEBPACK_IMPORTED_MODULE_33__.DEFAULT_FONT_COLOR\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR, function (disabled, className) {\n    var _context41;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      style: {\n        width: 40\n        // 应该不用used才对：BACKGROUDCOLOR\n      },\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(getClassName(hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR)), className, \"\".concat(navToolPrefixCls, \"-self-select\"), _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context41 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context41, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR)))\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_editorControls_navTool_backGroudColorEditor__WEBPACK_IMPORTED_MODULE_34__[\"default\"], {\n      value: selectItem[_constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR] || _constants__WEBPACK_IMPORTED_MODULE_33__.DEFAULT_BACKGROUND_COLOR,\n      setColorPickVisible: setColorPickVisible,\n      setMoreBarVisible: setMoreBarVisible,\n      handleChange: function handleChange(val) {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR, val);\n      },\n      enable: hasSelectedControl && !getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.BACKGROUDCOLOR) && !disabled\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, function (disabled, className) {\n    var _context42, _context43;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, normalSelectProps, {\n      disabled: getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT) || disabled,\n      dropdownClassName: classnames__WEBPACK_IMPORTED_MODULE_29___default()('kds-select-border', 'kds-select', 'lineHeight'),\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(!getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT) && \"\".concat(navToolPrefixCls, \"-select-enable\"), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context42 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context42, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT))),\n      onChange: function onChange(value) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.console.log(value);\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, value);\n      },\n      onVisibleChange: function onVisibleChange(visible) {\n        setMoreVisible(visible);\n      },\n      onSelect: function onSelect() {\n        setMoreVisible(false);\n        setMoreBarVisible(false);\n      },\n      borderType: \"none\",\n      value: _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_22___default()(_context43 = [1, 1.15, 1.25, 1.5, 2.0]).call(_context43, getSelectItemsProp(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, 1)) ? getSelectItemsProp(_constants__WEBPACK_IMPORTED_MODULE_33__.LINE_HEIGHT, 1) : 'default',\n      options: [{\n        value: 'default',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xingjushezhi\",\n          itemTitle: \"1.0\"\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0114')\n      }, {\n        value: 1,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xingjushezhi\",\n          itemTitle: \"1.0\"\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0114')\n      }, {\n        value: 1.15,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xingjushezhi\",\n          itemTitle: \"1.15\"\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0114')\n      }, {\n        value: 1.25,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xingjushezhi\",\n          itemTitle: \"1.25\"\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0114')\n      }, {\n        value: 1.5,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xingjushezhi\",\n          itemTitle: \"1.5\"\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0114')\n      }, {\n        value: 2,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xingjushezhi\",\n          itemTitle: \"2.0\"\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0114')\n      }],\n      dropdownRender: lineHeightDropdownRender,\n      defaultValue: 1\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN, function (disabled, className) {\n    var _context44;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, normalSelectProps, {\n      disabled: getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN) || disabled,\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(!getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN) && \"\".concat(navToolPrefixCls, \"-select-enable\"), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context44 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context44, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN))),\n      onChange: function onChange(value) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.console.log(value);\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN, value);\n      },\n      borderType: \"none\",\n      value: getSelectItemsProp(_constants__WEBPACK_IMPORTED_MODULE_33__.ALIGN, 'left'),\n      options: [{\n        value: 'left',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"duanluo-zuoduiqi\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0069'),\n          title: horizontalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0069')\n      }, {\n        value: 'center',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"duanluo-juzhong\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0070'),\n          title: horizontalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0070')\n      }, {\n        value: 'right',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"duanluo-youduiqi\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0071'),\n          title: horizontalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0071')\n      }, {\n        value: 'justify',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"duanluo-quanbuliangduanduiqi\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0072'),\n          title: horizontalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0072'),\n        disabled: selectItem.type === 'Image'\n      }]\n    }));\n  }), (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_propertyOperationBar, _constants__WEBPACK_IMPORTED_MODULE_33__.BORDER, function (disabled, className) {\n    var _context45;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, normalSelectProps, {\n      dropdownStyle: {\n        minWidth: 120,\n        overflow: 'hidden'\n      },\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(!getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER) && \"\".concat(navToolPrefixCls, \"-select-enable\"), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context45 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context45, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER))),\n      visible: borderSelectVisible && !disabled,\n      onVisibleChange: function onVisibleChange(open) {\n        if (!(borderColorPickerVisible || borderWidthPopperVisible)) {\n          setBorderSelectVisible(open);\n        }\n      },\n      dropdownClassName: classnames__WEBPACK_IMPORTED_MODULE_29___default()('kds-select-border', 'kds-select'),\n      dropdownRender: function dropdownRender(node) {\n        return borderDropdownRender(node, setBorderSelectVisible, setMoreBarVisible);\n      },\n      disabled: getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.BORDER) || disabled,\n      onSelect: function onSelect(value) {\n        // handleChange(BORDER, setBorderData(borderData, value, undefined, undefined))\n        setBorderType(value);\n        if (borderTypeState === _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER_BLOD) {\n          setBorder(borderColorState, value, _constants__WEBPACK_IMPORTED_MODULE_33__.LINE_JIACU);\n        } else {\n          setBorder(borderColorState, value, borderLineState);\n        }\n        setBorderSelectVisible(false);\n        setMoreBarVisible(false);\n      },\n      borderType: \"none\",\n      defaultValue: _constants__WEBPACK_IMPORTED_MODULE_33__.OUT_BORDER,\n      options: borderSelectOptions\n    }));\n  }), _constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN, function (disabled, className) {\n    var _context46;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, normalSelectProps, {\n      disabled: getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN) || disabled,\n      onChange: function onChange(value) {\n        _handleChange(_constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN, value);\n      },\n      borderType: \"none\",\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(!getSelectDisable(_constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN) && \"\".concat(navToolPrefixCls, \"-select-enable\"), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context46 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context46, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(_constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN))),\n      value: getSelectItemsProp(_constants__WEBPACK_IMPORTED_MODULE_33__.VERTICAL_ALIGN, 'middle'),\n      options: [{\n        value: 'top',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xinggaoduiqizhiding\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0073'),\n          title: verticalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0073')\n      }, {\n        value: 'middle',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xinggaoduiqijuzhong\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0074'),\n          title: verticalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0074')\n      }, {\n        value: 'bottom',\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"xinggaoduiqizhidi\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0075'),\n          title: verticalAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0075')\n      }]\n    }));\n  }), ALIGN_SHAPES, function (disabled, className) {\n    var _context47;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement((react__WEBPACK_IMPORTED_MODULE_32___default().Fragment), null, (visibleList.length === propertyOperationBarEditorComponentList.length || unvisibleList.length > 1) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(\"\".concat(navToolPrefixCls, \"-operation-bar-split-line\"), className)\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, normalSelectProps, {\n      disabled: selectedIds.length < 2 || isCannotOperateShapesAlign || disabled,\n      className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(!(selectedIds.length < 2 || isCannotOperateShapesAlign) && \"\".concat(navToolPrefixCls, \"-select-enable\"), className, _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context47 = \"\".concat(navToolPrefixCls, \"-editor-\")).call(_context47, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(ALIGN_SHAPES))),\n      onChange: function onChange(value) {\n        designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.eventBus.emit('align-shapes', {\n          type: value,\n          ids: selectedIds\n        });\n      },\n      borderType: \"none\",\n      value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_LEFT,\n      options: [{\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_LEFT,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"zuoduiqi3\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0076'),\n          title: layoutAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0076')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_HORIZONTAL_CENTER,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"zuoyoujuzhong\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0077'),\n          title: layoutAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0077')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_HORIZONTAL_DISTRIBUTION,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"shuipingfenbu\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0078'),\n          title: layoutAlignTitle\n        }),\n        disabled: selectedIds.length < 3,\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0078')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_RIGHT,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"youduiqi3\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0079'),\n          title: layoutAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0079')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_TOP,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"dingduiqi\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0080'),\n          title: layoutAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0080')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_VERTICAL_CENTER,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"shangxiajuzhong\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0081'),\n          title: layoutAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0081')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_VERTICAL_DISTRIBUTION,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"chuizhifenbu\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0082'),\n          title: layoutAlignTitle\n        }),\n        disabled: selectedIds.length < 3,\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0082')\n      }, {\n        value: _constants__WEBPACK_IMPORTED_MODULE_33__.SHAPE_ALIGN_BOTTOM,\n        label: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n          prefix: \"printdesignericon\",\n          type: \"diduiqi\",\n          itemTitle: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0083'),\n          title: layoutAlignTitle\n        }),\n        title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0083')\n      }]\n    })));\n  }));\n  var navToolRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(null);\n  var propertyOperationBarRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(null);\n  var operationBarRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(null);\n  var operationBarContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(null);\n  var resizeCb = (0,react__WEBPACK_IMPORTED_MODULE_32__.useCallback)(function () {\n    // const moreIconWidth = MIN_ICON_WIDTH\n    var allEditorComp = propertyOperationBarEditorComponentList;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.console.log('count');\n    if (propertyOperationBarRef.current) {\n      var leaveWidth = propertyOperationBarRef.current.offsetWidth;\n      if (leaveWidth <= MIN_ICON_WIDTH) {\n        if (!lodash__WEBPACK_IMPORTED_MODULE_31___default().isEqual(allEditorComp, unvisibleList)) {\n          setUnvisibleList(allEditorComp);\n        }\n        return;\n      }\n      var idx = 0;\n      var visibleComp = [];\n      var unVisibleComp = [];\n      var currentWidthArr = [];\n      var _iterator = _createForOfIteratorHelper(propertyOperationBarEditorComponentList),\n        _step;\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var _context48, _dom$offsetWidth;\n          var comp = _step.value;\n          var dom = propertyOperationBarRef.current.querySelector(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context48 = \".\".concat(navToolPrefixCls, \"-editor-\")).call(_context48, lodash__WEBPACK_IMPORTED_MODULE_31___default().kebabCase(comp.name)));\n          var width = ((_dom$offsetWidth = dom === null || dom === void 0 ? void 0 : dom.offsetWidth) !== null && _dom$offsetWidth !== void 0 ? _dom$offsetWidth : 0) + (dom ? _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_27___default()(getComputedStyle(dom).marginLeft || 0) + _babel_runtime_corejs3_core_js_stable_parse_float__WEBPACK_IMPORTED_MODULE_27___default()(getComputedStyle(dom).marginRight || 0) : comp.margin);\n          if (leaveWidth >= width) {\n            visibleComp.push(comp);\n            leaveWidth -= width;\n            currentWidthArr.push(width);\n            idx++;\n          } else {\n            if (leaveWidth < MIN_ICON_WIDTH) {\n              visibleComp.pop();\n              leaveWidth += currentWidthArr.pop() || 0;\n              idx--;\n            }\n            break;\n          }\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n      if (!lodash__WEBPACK_IMPORTED_MODULE_31___default().isEqual(visibleComp, visibleList)) {\n        setVisibleList(visibleComp);\n        // 必改变\n        setUnvisibleList(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_14___default()(allEditorComp).call(allEditorComp, idx));\n      }\n    }\n  }, [propertyOperationBarEditorComponentList, unvisibleList, visibleList, navToolPrefixCls]);\n  var debounceResizeCbRef = (0,react__WEBPACK_IMPORTED_MODULE_32__.useRef)(lodash__WEBPACK_IMPORTED_MODULE_31___default().debounce(resizeCb));\n  (0,react__WEBPACK_IMPORTED_MODULE_32__.useEffect)(function () {\n    debounceResizeCbRef.current();\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.eventBus.emit('contextStrokeEnabled', data.bizType === '1');\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_32__.useEffect)(function () {\n    // resize? don't need\n    debounceResizeCbRef.current = lodash__WEBPACK_IMPORTED_MODULE_31___default().debounce(resizeCb);\n  }, [propertyOperationBarEditorComponentList, unvisibleList, visibleList, navToolPrefixCls]);\n  // useResizeObserver 初次会不生效\n  // useResizeObserver(navToolRef.current, debounceResizeCbRef.current) // propertyOperationBarRef\n  (0,react__WEBPACK_IMPORTED_MODULE_32__.useEffect)(function () {\n    var cb = function cb() {\n      debounceResizeCbRef.current();\n    };\n    window.addEventListener('resize', cb);\n    return function () {\n      window.removeEventListener('resize', cb);\n    };\n  }, [debounceResizeCbRef.current]);\n  (0,react__WEBPACK_IMPORTED_MODULE_32__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      formatControlInfoRef: formatControlInfoRef,\n      copyControl: copyControl,\n      pasteControl: pasteControl,\n      copyAndPasteControl: copyAndPasteControl,\n      canvasRedo: canvasRedo,\n      canvasUndo: canvasUndo\n    };\n  }, [formatControlInfoRef, copyControl, copyAndPasteControl]);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: navToolPrefixCls,\n    ref: navToolRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    ref: operationBarContainerRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: \"\".concat(navToolPrefixCls, \"-operation-bar\"),\n    ref: operationBarRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    title: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context49 = \"\".concat((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0084'), \"\\n\")).call(_context49, !(0,_utils_client__WEBPACK_IMPORTED_MODULE_41__.isMac)() ? 'Ctrl+Z' : '⌘+Z'),\n    className: classnames__WEBPACK_IMPORTED_MODULE_29___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, \"\".concat(navToolPrefixCls, \"-operation-disable\"), !dataContext.canUndo()), \"\".concat(navToolPrefixCls, \"-operation-btn\"), true)),\n    onClick: canvasUndo\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"chexiao\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    title: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context50 = \"\".concat((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0085'), \"\\n\")).call(_context50, !(0,_utils_client__WEBPACK_IMPORTED_MODULE_41__.isMac)() ? 'Ctrl+Y' : '⌘+Y'),\n    className: classnames__WEBPACK_IMPORTED_MODULE_29___default()((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])((0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])({}, \"\".concat(navToolPrefixCls, \"-operation-disable\"), !dataContext.canRedo()), \"\".concat(navToolPrefixCls, \"-operation-btn\"), true)),\n    onClick: canvasRedo\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"zhongzuo\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: \"\".concat(navToolPrefixCls, \"-operation-bar-split-line\")\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: getClassName(isCanCopy),\n    onClick: copyAndPasteControl,\n    title: _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_19___default()(_context51 = \"\".concat((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0086'), \"\\n\")).call(_context51, !(0,_utils_client__WEBPACK_IMPORTED_MODULE_41__.isMac)() ? 'Ctrl+D' : '⌘+D')\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"fuzhi\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0087'),\n    className: getClassName(isCanFormat, 'null', formatEnable && hasSelectedControl),\n    onClick: function onClick() {\n      formatControlClick();\n    },\n    onDoubleClick: function onDoubleClick() {\n      formatControlClick(false);\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"geshishua\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    title: \"\".concat((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0088'), \"\\nDelete\"),\n    className: getClassName(isCanDelete),\n    onClick: deleteControl\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"shanchu\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: \"\".concat(navToolPrefixCls, \"-operation-bar-split-line\")\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: \"\".concat(navToolPrefixCls, \"-property-operation-bar\"),\n    ref: propertyOperationBarRef\n  }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context52 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(propertyOperationBarEditorComponentList).call(propertyOperationBarEditorComponentList, function (item) {\n    var findItem = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(visibleList).call(visibleList, function (i) {\n      return i.name === item.name;\n    });\n    return findItem;\n  })).call(_context52, function (item) {\n    return propertyOperationBarEditorComponentMap[item.name](false);\n  }), unvisibleList.length > 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Tooltip, {\n    popperClassName: \"\".concat(navToolPrefixCls, \"-operation-more-popper\")\n    // scrollHidden // 下拉选项不能用这个选项\n    ,\n    arrow: false\n    // arrowOffset={5}\n    ,\n    arrowSize: 0,\n    placement: \"bottomRight\",\n    visible: moreBarVisible,\n    onVisibleChange: function onVisibleChange(visible) {\n      !moreVisible && !borderSelectVisible && (!colorPickVisible || visible) && setMoreBarVisible(visible);\n    },\n    tip: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n      className: \"\".concat(navToolPrefixCls, \"-more-property-bar\")\n    }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(unvisibleList).call(unvisibleList, function (_ref14) {\n      var name = _ref14.name;\n      return propertyOperationBarEditorComponentMap[name](false);\n    })),\n    trigger: \"click\",\n    popperStyle: {}\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_29___default()(\"\".concat(navToolPrefixCls, \"-operation-btn\"), \"\".concat(navToolPrefixCls, \"-operation-more-btn\"))\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    type: \"more\"\n  }))), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_18___default()(_context53 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_16___default()(propertyOperationBarEditorComponentList).call(propertyOperationBarEditorComponentList, function (item) {\n    var findItem = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_23___default()(visibleList).call(visibleList, function (i) {\n      return i.name === item.name;\n    });\n    return !findItem;\n  })).call(_context53, function (item) {\n    return propertyOperationBarEditorComponentMap[item.name](true, 'shadow-calc-dom');\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: \"\".concat(navToolPrefixCls, \"-canvas-operation-bar\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(\"div\", {\n    className: getClassName(true, '', enableRefBorder),\n    onClick: function onClick() {\n      setEnableRefBorder(!enableRefBorder);\n      if (asistantBorderRef) {\n        asistantBorderRef.current = !enableRefBorder;\n      }\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.eventBus.emit('contextStrokeEnabled', !enableRefBorder);\n    },\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0089')\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Icon, {\n    prefix: \"printdesignericon\",\n    type: 'kaiqifuzhuxian',\n    onClick: function onClick() {}\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_32___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_28__.Select, {\n    style: {\n      // marginLeft: 16,\n      width: 64\n    },\n    dropdownStyle: {\n      width: 100\n    },\n    title: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_30__.getLangMsg)('printd.grid.key0090'),\n    borderType: \"none\",\n    value: scale,\n    options: options,\n    onChange: operatorScale\n  }))));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = (NavFixedTool);\n\n//# sourceURL=webpack://print-designer/./src/views/center/navTool.tsx?");

/***/ }),

/***/ 54052:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_helpers_readOnlyError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(57048);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(96416);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(12640);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(47332);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(6908);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(65624);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(39832);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(13760);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var konva__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(25700);\n/* harmony import */ var konva__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(konva__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(2480);\n/* harmony import */ var react_konva__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(react_konva__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _components_common_baseImage__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(9172);\n/* harmony import */ var _components_common_changeLangModal__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(69652);\n/* harmony import */ var _components_common_controlTransformer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(2680);\n/* harmony import */ var _components_common_gridGuide__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(90588);\n/* harmony import */ var _components_common_gridSettings__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(48600);\n/* harmony import */ var _components_common_cardSetting__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(30380);\n/* harmony import */ var _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(84528);\n/* harmony import */ var _components_common_refLine__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(21532);\n/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(20008);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(98092);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(84945);\n/* harmony import */ var _hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(75252);\n/* harmony import */ var _hooks_useEditor__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(88456);\n/* harmony import */ var _hooks_useSelected__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(14772);\n/* harmony import */ var _hooks_useWindowZoom__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(78992);\n/* harmony import */ var _utils_client__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(77168);\n/* harmony import */ var _utils_control__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(87524);\n/* harmony import */ var _utils_controlType__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(98600);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(32064);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(21980);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(41232);\n/* harmony import */ var _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(48008);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(77620);\n\n\n\n\n\n\n\n\n\n\nvar _excluded = [\"title\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context26, _context27; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context26 = ownKeys(Object(t), !0)).call(_context26, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_3___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_2___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context27 = ownKeys(Object(t))).call(_context27, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_4___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// import * as Comlink from 'comlink'\nvar DRAW_REGION_RECT_INIT_VAL = -100;\nvar THROTTLE_TIME = 200;\nvar DEFAULT_LAYOUT_GRID_ROW_HEIGHT = 8;\n// TODO:\n\nfunction calcCanvasPosition(canvasContainerWidth, canvasContainerHeight, realCanvasPageWidth, realCanvasPageHeight) {\n  return {\n    justifyContent: !canvasContainerWidth ? 'center' : canvasContainerWidth < realCanvasPageWidth ? 'flex-start' : 'center',\n    alignItems: !canvasContainerHeight ? 'center' : canvasContainerHeight < realCanvasPageHeight ? 'flex-start' : 'center'\n  };\n}\nfunction collectRelativeId(id, allItems) {\n  var _context;\n  return [id, lodash__WEBPACK_IMPORTED_MODULE_29___default().flattenDeep(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(_context = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(allItems).call(allItems, function (_ref) {\n    var childId = _ref.id,\n      parentId = _ref.parentId;\n    if (parentId === id) {\n      return collectRelativeId(childId, allItems);\n    }\n  })).call(_context, Boolean))];\n}\n// 还是每个控件注入\n// import ControlTransformer from '../../../controls/common'\nvar DRAW_DELAY = 1000;\n// 分布功能，多选图形范围内，如果还有空隙就等分空隙，没有的话，就根据等分点，除前后的图形，其他图形移动至对应等分点\nvar distributionShapes = function distributionShapes(shapes, dataContext, changePosPropName, changeDistancePropName) {\n  var _context2, _context3, _context4;\n  if (shapes.length <= 2) return;\n  var reverShapes = _babel_runtime_corejs3_core_js_stable_instance_reverse__WEBPACK_IMPORTED_MODULE_14___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15___default()(shapes).call(shapes)).call(_context2);\n  var maxEnd = Math.max.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n    return shape[changePosPropName] + shape[changeDistancePropName];\n  }));\n  var endShape = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(reverShapes).call(reverShapes, function (shape) {\n    return shape[changePosPropName] + shape[changeDistancePropName] === maxEnd;\n  });\n  var minStart = Math.min.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n    return shape[changePosPropName];\n  }));\n  var startShape = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(shapes).call(shapes, function (shape) {\n    return shape[changePosPropName] === minStart;\n  });\n  var sortShapes = _babel_runtime_corejs3_core_js_stable_instance_sort__WEBPACK_IMPORTED_MODULE_17___default()(_context3 = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_15___default()(_context4 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(shapes).call(shapes, function (shape) {\n    var _context5;\n    return !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context5 = [startShape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], endShape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID]]).call(_context5, shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID]);\n  })).call(_context4)).call(_context3, function (shapeA, shapeB) {\n    return shapeA[changePosPropName] - shapeB[changePosPropName];\n  });\n  var allShapeDistance = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default()(shapes).call(shapes, function (res, shape) {\n    return res + shape[changeDistancePropName];\n  }, 0);\n  var startShapeEnd = minStart + startShape[changeDistancePropName];\n  var regionDistance = maxEnd - minStart;\n  var notChangeShapeCount = 0;\n  if (allShapeDistance > regionDistance) {\n    var singleDistance = regionDistance / (shapes.length - 1);\n    var changeArr = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(sortShapes).call(sortShapes, function (shape, idx) {\n      var changeDistance = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.toRoundFix)(minStart + singleDistance * (idx + 1), _constants__WEBPACK_IMPORTED_MODULE_41__.PRECISION);\n      if (changeDistance === shape[changePosPropName]) {\n        notChangeShapeCount++;\n      }\n      return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, changePosPropName, changeDistance)];\n    });\n    if (notChangeShapeCount === sortShapes.length) {\n      console.log('distributionShapes changePosPropName:', changePosPropName, 'not change');\n      return;\n    }\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(changeArr));\n  } else {\n    var leaveDistance = regionDistance - startShape[changeDistancePropName] - endShape[changeDistancePropName];\n    var _singleDistance = (leaveDistance - _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default()(sortShapes).call(sortShapes, function (res, shape) {\n      return res + shape[changeDistancePropName];\n    }, 0)) / (2 + sortShapes.length - 1);\n    var previousEnd = startShapeEnd;\n    var _changeArr = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(sortShapes).call(sortShapes, function (shape, idx) {\n      var changeDistance = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.toRoundFix)(previousEnd + _singleDistance, _constants__WEBPACK_IMPORTED_MODULE_41__.PRECISION);\n      previousEnd += _singleDistance + shape[changeDistancePropName];\n      if (shape[changePosPropName] === changeDistance) {\n        notChangeShapeCount++;\n      }\n      return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, changePosPropName, changeDistance)];\n    });\n    if (notChangeShapeCount === sortShapes.length) {\n      console.log('distributionShapes changePosPropName:', changePosPropName, 'not change');\n      return;\n    }\n    dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_changeArr));\n  }\n};\nvar INITIAL_SCALE = 1;\nvar INITIAL_PIXELRATIO = 1;\nvar PrintRoot = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_30__.memo)( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_30__.forwardRef)(function (props, forwardedRef) {\n  var _context7, _canvasBoxRef$current, _canvasBoxRef$current2, _canvasBoxRef$current3, _canvasBoxRef$current4, _canvasBoxRef$current9, _canvasBoxRef$current10, _canvasBoxRef$current11, _canvasBoxRef$current12;\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(_context__WEBPACK_IMPORTED_MODULE_42__.PrintDesignerContext),\n    setMessage = _useContext.setMessage,\n    scaleRef = _useContext.scaleRef,\n    asistantBorderRef = _useContext.asistantBorderRef,\n    handlePassGridActionGuide = _useContext.handlePassGridActionGuide,\n    isFirstUseGrid = _useContext.isFirstUseGrid,\n    onValid = _useContext.onValid;\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.GlobalConfigContext),\n    env = _useContext2.env,\n    keywordMapping = _useContext2.keywordMapping;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)(INITIAL_SCALE),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState, 2),\n    scale = _useState2[0],\n    setScale = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)(function () {\n      return +(window.devicePixelRatio || INITIAL_PIXELRATIO).toFixed(2);\n    }),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState3, 2),\n    pixelRatio = _useState4[0],\n    setPixelRatio = _useState4[1];\n  var stageRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var layerRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  // const tempLayer = useRef<Konva.Layer>(null)\n  var refLineRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var canvasPageRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var canvasLayerRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var controlGroupRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var dragGroupRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var xRulerRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var xRulerDomRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var yRulerRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var yRulerDomRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var drawRegionRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var backgroundRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var canvasAbsolutePosRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var dropInfo = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)({\n    isDrag: false,\n    yPos: 0\n  });\n  var shdowInputRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var shadowCanvasRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var globalConfig = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.GlobalConfigContext);\n  var previewImageUrl = globalConfig.previewImageUrl,\n    uploadImageUrl = globalConfig.uploadImageUrl;\n  var fieldSizeCacher = props.fieldSizeCacher;\n  var setFieldSizeCache = fieldSizeCacher.setFieldSizeCache,\n    getFieldSizeCache = fieldSizeCacher.getFieldSizeCache;\n  var pageId = props === null || props === void 0 ? void 0 : props.data.key;\n  var cachePageCalcData = (0,react__WEBPACK_IMPORTED_MODULE_30__.useMemo)(function () {\n    return getFieldSizeCache(pageId) || {};\n  }, [pageId]);\n  var getTextSize = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function (option) {\n    var stage = new (konva__WEBPACK_IMPORTED_MODULE_28___default().Stage)({\n      container: 'shadowCanvas',\n      width: window.innerWidth,\n      height: window.innerHeight\n    });\n    var layer = new (konva__WEBPACK_IMPORTED_MODULE_28___default().Layer)();\n    stage.add(layer);\n    var textNode = new (konva__WEBPACK_IMPORTED_MODULE_28___default().Text)(option);\n    var height = textNode.height();\n    var width = textNode.width();\n\n    // layer.add(textNode)\n    console.log(height, width);\n    return {\n      height: height,\n      width: width\n    };\n  }, []);\n  var getInputSize = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function (text) {\n    var style = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var id = arguments.length > 2 ? arguments[2] : undefined;\n    if (shdowInputRef.current) {\n      var _context6;\n      if (cachePageCalcData[id]) {\n        var _cachePageCalcData$id = cachePageCalcData[id],\n          _offsetWidth = _cachePageCalcData$id.offsetWidth,\n          _offsetHeight = _cachePageCalcData$id.offsetHeight,\n          preText = _cachePageCalcData$id.text,\n          preStyle = _cachePageCalcData$id.style;\n        var preWidth = preStyle.width;\n        var _width = style.width;\n        if (preText === text && preWidth === _width) return {\n          width: _offsetWidth,\n          height: _offsetHeight\n        };\n      }\n      shdowInputRef.current.innerText = text;\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context6 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(style)).call(_context6, function (key) {\n        shdowInputRef.current.style[key] = lodash__WEBPACK_IMPORTED_MODULE_29___default().isString(style[key]) ? style[key] : style[key] + 'px';\n      });\n      var _shdowInputRef$curren = shdowInputRef.current,\n        offsetWidth = _shdowInputRef$curren.offsetWidth,\n        offsetHeight = _shdowInputRef$curren.offsetHeight;\n      cachePageCalcData[id] = {\n        text: text,\n        style: style,\n        width: offsetWidth,\n        height: offsetHeight\n      };\n      setFieldSizeCache(pageId, cachePageCalcData);\n      return {\n        width: offsetWidth,\n        height: offsetHeight\n      };\n    }\n  }, [fieldSizeCacher]);\n  // const [containerRef, { width: canvasContainerWidth, height: canvasContainerHeight }] = useMeasureDirty()\n  var containerDomRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var _useContext3 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.DataFactoryContext),\n    dataFactory = _useContext3.dataFactory,\n    modelFactory = _useContext3.modelFactory,\n    controlMetaInfo = _useContext3.controlMetaInfo;\n  var _ref4 = containerDomRef.current || {},\n    canvasContainerHeight = _ref4.offsetHeight,\n    canvasContainerWidth = _ref4.offsetWidth;\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)({\n      show: false\n    }),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState5, 2),\n    gridData = _useState6[0],\n    setGridData = _useState6[1];\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)({\n      show: false\n    }),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState7, 2),\n    gridSetting = _useState8[0],\n    setGridSetting = _useState8[1];\n  var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)({\n      show: false\n    }),\n    _useState10 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState9, 2),\n    langData = _useState10[0],\n    setLangData = _useState10[1];\n  var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)({\n      show: false\n    }),\n    _useState12 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState11, 2),\n    cardSetting = _useState12[0],\n    setCardSetting = _useState12[1];\n  var children = props.children,\n    appState = props.appState,\n    deleteSelectionControl = props.deleteSelectionControl;\n  console.log('children', children);\n  var _props$data = props.data,\n    id = _props$data.id,\n    width = _props$data.width,\n    height = _props$data.height,\n    marginTop = _props$data.marginTop,\n    marginLeft = _props$data.marginLeft,\n    marginBottom = _props$data.marginBottom,\n    marginRight = _props$data.marginRight,\n    paperDirection = _props$data.paperDirection,\n    bgImgRcId = _props$data.bgImgRcId;\n  var pageHeight = Math.max(height - Math.max(marginTop, 0) - Math.max(marginBottom, 0), 0);\n  var pageWidth = Math.max(width - Math.max(marginLeft, 0) - Math.max(marginRight, 0), 0);\n  var realCanvasPageWidth = Math.max((0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(width, scale), canvasContainerWidth ? canvasContainerWidth - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING * 2 : 0);\n  var realCanvasPageHeight = Math.max((0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(height, scale), canvasContainerHeight ? canvasContainerHeight - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING * 2 : 0);\n  var actualPageHeight = Math.max(pageHeight, 0) + Math.max(marginTop, 0) + Math.max(marginBottom, 0);\n  var actualPageWidth = Math.max(pageWidth, 0) + Math.max(marginLeft, 0) + Math.max(marginRight, 0);\n  var _appState$navToolRef = appState.navToolRef,\n    navToolRef = _appState$navToolRef === void 0 ? {} : _appState$navToolRef,\n    canvasRef = appState.canvasRef,\n    _appState$meta = appState.meta,\n    meta = _appState$meta === void 0 ? [] : _appState$meta,\n    _appState$definition = appState.definition,\n    definition = _appState$definition === void 0 ? {} : _appState$definition,\n    activedSelectId = appState.activedSelectId,\n    isMultiKeyActiveWhenSelectedRef = appState.isMultiKeyActiveWhenSelectedRef;\n  var backgroundImgSrc = bgImgRcId ? _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_20___default()(_context7 = \"\".concat(previewImageUrl)).call(_context7, bgImgRcId) : '';\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    var _ref5 = containerDomRef.current || {},\n      canvasContainerHeight = _ref5.offsetHeight,\n      canvasContainerWidth = _ref5.offsetWidth;\n    canvasPageRef.current.style.width = Math.max((0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageWidth, scale), canvasContainerWidth !== null && canvasContainerWidth !== void 0 ? canvasContainerWidth : 0);\n    canvasPageRef.current.style.height = Math.max((0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageHeight, scale), canvasContainerHeight !== null && canvasContainerHeight !== void 0 ? canvasContainerHeight : 0);\n    forceUpdate(function (n) {\n      return n + 1;\n    });\n  }, []);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.SelectionContext);\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.DataContext);\n  var rootId = dataContext.getRootId();\n  var createControlData = dataFactory;\n  var _useSelected = (0,_hooks_useSelected__WEBPACK_IMPORTED_MODULE_45__.useSelected)({\n      selectionContext: selectionContext,\n      dataContext: dataContext,\n      rulerRef: rulerRef,\n      navToolRef: navToolRef,\n      activedSelectId: activedSelectId\n    }, rootId),\n    handleMouseDown = _useSelected.handleMouseDown;\n  var _useMemo = (0,react__WEBPACK_IMPORTED_MODULE_30__.useMemo)(function () {\n      var _dataContext$findCont, _dataContext$findCont2;\n      if (((_dataContext$findCont = dataContext.findControl((_dataContext$findCont2 = dataContext.findControl(activedSelectId)) === null || _dataContext$findCont2 === void 0 ? void 0 : _dataContext$findCont2.parentId)) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont.type) === 'SubDataGrid') {\n        return {\n          isContainer: false,\n          accept: ''\n        };\n      }\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getControlIsContainer)(controlMetaInfo, dataContext.findControl(activedSelectId), keywordMapping);\n    }, [activedSelectId, controlMetaInfo]),\n    isContainerControl = _useMemo.isContainer,\n    acceptTypes = _useMemo.accept;\n  var _useContext4 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useContext)(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_40__[\"default\"]),\n    getPrefixCls = _useContext4.getPrefixCls,\n    prefixCls = _useContext4.prefixCls;\n  var printDesignerPrefixCls = getPrefixCls(prefixCls, 'print-designer');\n  var dragInfoRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)({\n    isDragging: false,\n    startX: 0,\n    startY: 0\n  });\n  var canvasBoxRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var rootControlOutterRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var rootControlRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var onLangCancel = function onLangCancel() {\n    var value = langData.value,\n      resolve = langData.resolve,\n      reject = langData.reject;\n    reject((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0091'));\n    setLangData({\n      show: false\n    });\n  };\n  var onLangUnSave = function onLangUnSave() {\n    var value = langData.value,\n      resolve = langData.resolve,\n      reject = langData.reject;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.emit('change-lang', value, false);\n    // resolve && resolve([createUpdateAction([[rootId, { language: value }]])])\n    setLangData({\n      show: false\n    });\n  };\n  var onLangSave = function onLangSave() {\n    var value = langData.value,\n      resolve = langData.resolve,\n      reject = langData.reject;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.emit('change-lang', value, true);\n    // resolve && resolve([createUpdateAction([[rootId, { language: value }]])])\n    setLangData({\n      show: false\n    });\n  };\n  var onGridGuideCancel = function onGridGuideCancel() {\n    var reject = gridData.reject;\n    reject && reject('error: cancel add DataGrid');\n    setGridData({\n      show: false\n    });\n  };\n  var onSelect = function onSelect(checkedNodes, callbacks) {\n    var _dataSouce$, _dataSouce$2;\n    if ((gridData === null || gridData === void 0 ? void 0 : gridData.controlType) === 'CardGrid') {\n      var gridInfo = (gridData === null || gridData === void 0 ? void 0 : gridData.gridInfo) || {};\n      setCardData(checkedNodes, gridInfo);\n      resetDropInfo();\n      setGridData({\n        show: false\n      });\n      return;\n    }\n    console.log('checkedNodes', checkedNodes);\n    var checkedCount = checkedNodes.length;\n    var getCallbackProp = function getCallbackProp(key) {\n      return (callbacks === null || callbacks === void 0 ? void 0 : callbacks[key]) || gridData[key];\n    };\n    var controlType = getCallbackProp('controlType');\n    var transferData = getCallbackProp('transferData');\n    var colWidth = pageWidth / checkedCount;\n    if (controlType === 'DataGrid' && colWidth < 5) return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0092'));\n    if (transferData) {\n      var subGridWidth = transferData.width,\n        subGridDirection = transferData.subGridDirection;\n      if (subGridDirection === 'right' && subGridWidth / checkedCount < 10) {\n        // 子数据表格在横向的时候，最小宽度为10\n        transferData.width = 10 * checkedCount;\n      }\n    }\n    var dataSouce = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(checkedNodes).call(checkedNodes, function (node) {\n      var _context8;\n      var key = node.key,\n        _node$InitAttr = node.InitAttr,\n        InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr;\n      var res = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.queryDataSourceAndAncestorByKey)(key, definition);\n      if (!res) {\n        console.error('queryDataSourceAndAncestorByKey has no res', key, definition);\n        return {};\n      }\n      var dataSource = res.dataSource,\n        dataSourceText = res.dataSourceText,\n        ancestorTitle = res.ancestorTitle,\n        relationKey = res.key,\n        title = res.title,\n        dsType = res.dsType,\n        IgnoreZero = res.IgnoreZero,\n        IgnoreTailZero = res.IgnoreTailZero;\n      var asignProp = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default()(_context8 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(InitAttr)).call(_context8, function (prop, key) {\n        prop[lodash__WEBPACK_IMPORTED_MODULE_29___default().camelCase(key)] = InitAttr[key];\n        return prop;\n      }, {});\n      asignProp.ignoreZero = IgnoreZero;\n      asignProp.ignoreTailZero = IgnoreTailZero;\n      return _objectSpread({\n        bindText: \"=$\".concat(ancestorTitle),\n        bindField: relationKey,\n        dataSource: dataSource,\n        dataSourceText: dataSourceText,\n        viewText: \"=$\".concat(title),\n        dsType: dsType\n      }, asignProp);\n    });\n    var createGrid = (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.createDataGridModal)(dataFactory, modelFactory);\n    var headerControl = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Header';\n    });\n    var _dropInfo$current = dropInfo.current,\n      isDrag = _dropInfo$current.isDrag,\n      yPos = _dropInfo$current.yPos;\n    var defaultTransferData = _objectSpread({\n      dataSource: ((_dataSouce$ = dataSouce[0]) === null || _dataSouce$ === void 0 ? void 0 : _dataSouce$.dataSource) || '',\n      dataSourceText: ((_dataSouce$2 = dataSouce[0]) === null || _dataSouce$2 === void 0 ? void 0 : _dataSouce$2.dataSourceText) || '',\n      width: pageWidth\n    }, isDrag ? {\n      y: yPos\n    } : {});\n    var activeField = dataContext.findControl(activedSelectId);\n    var parentId = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isGridFooter)(activeField) && activeField.id;\n    var newControl = createGrid({\n      type: getCallbackProp('controlType') || 'DataGrid',\n      parentId: parentId || rootId,\n      parentItem: (0,_utils_controlType__WEBPACK_IMPORTED_MODULE_49__.dealParentItem)(dataContext.findControl(rootId)),\n      cellData: dataSouce,\n      transferData: transferData ? (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(defaultTransferData, transferData) : defaultTransferData\n    });\n    if (headerControl && headerControl.length && newControl[0].y < headerControl[0].height) {\n      newControl[0].y = headerControl[0].height + newControl[0].y;\n    }\n    var resolveFn = getCallbackProp('resolve');\n    resolveFn([{\n      type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.ADD,\n      value: newControl\n    }]);\n    resetDropInfo();\n    setGridData({\n      show: false\n    });\n  };\n  var onConfirm = function onConfirm(gridInfo) {\n    console.log('onConfirm', gridInfo);\n    var row = gridInfo.row,\n      column = gridInfo.column;\n    var colWidth = pageWidth / column;\n    if (colWidth < 5) return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0093'));\n    var createLayoutGrid = (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.createLayoutGridModal)(dataFactory, modelFactory);\n    var headerControl = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Header';\n    });\n    var _dropInfo$current2 = dropInfo.current,\n      isDrag = _dropInfo$current2.isDrag,\n      yPos = _dropInfo$current2.yPos;\n    var resolve = gridSetting.resolve,\n      parentId = gridSetting.parentId;\n    var transferData = _objectSpread({\n      width: pageWidth,\n      height: row * DEFAULT_LAYOUT_GRID_ROW_HEIGHT\n    }, isDrag ? {\n      y: yPos\n    } : {});\n    var updateAction = null;\n    if (parentId) {\n      var parentField = dataContext.findControl(parentId);\n      var _width2 = parentField.width,\n        y = parentField.y,\n        _height = parentField.height,\n        type = parentField.type;\n      transferData.width = _width2;\n      if (isDrag) {\n        transferData.y = transferData.y - y;\n      } else {\n        transferData.y = 0;\n      }\n\n      // 表尾添加数据表格时，如果容器高度小于数据表格高度，则撑开容器高度\n      if (type === 'TableTail' && _height < row * DEFAULT_LAYOUT_GRID_ROW_HEIGHT) {\n        updateAction = {\n          type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.UPDATE,\n          value: [[parentId, {\n            height: row * DEFAULT_LAYOUT_GRID_ROW_HEIGHT\n          }]]\n        };\n      }\n    }\n    var newControl = createLayoutGrid({\n      type: 'LayoutGrid',\n      parentId: parentId || rootId,\n      gridInfo: gridInfo,\n      transferData: transferData\n    });\n    if (headerControl && headerControl.length && newControl[0].y < headerControl[0].height) {\n      newControl[0].y = headerControl[0].height + newControl[0].y;\n    }\n    var resolveParams = [{\n      type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.ADD,\n      value: newControl\n    }];\n    if (updateAction) {\n      resolveParams.push(updateAction);\n    }\n    resolve(resolveParams);\n    resetDropInfo();\n    setGridSetting({\n      show: false\n    });\n  };\n  var onCancel = function onCancel() {\n    var reject = gridSetting.reject;\n    reject && reject('error: cancel add layoutGrid');\n    setGridSetting({\n      show: false\n    });\n  };\n  var onCardCancel = function onCardCancel() {\n    var reject = cardSetting.reject;\n    reject && reject('error: cancel add layoutGrid');\n    setCardSetting({\n      show: false\n    });\n  };\n  var setCardData = function setCardData(data, gridInfo) {\n    console.log('gridInfo', gridInfo);\n    var row = gridInfo.row,\n      column = gridInfo.column;\n    var colWidth = pageWidth / column;\n    if (colWidth < 5) return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0094'));\n    var createLayoutGrid = (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.createLayoutGridModal)(dataFactory, modelFactory);\n    var headerControl = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Header';\n    });\n    var _dropInfo$current3 = dropInfo.current,\n      isDrag = _dropInfo$current3.isDrag,\n      yPos = _dropInfo$current3.yPos;\n    var dataSource = data.dataSource,\n      dataSourceText = data.dataSourceText;\n    var transferData = _objectSpread({\n      width: pageWidth,\n      height: row * 8,\n      dataSource: dataSource,\n      dataSourceText: dataSourceText\n    }, isDrag ? {\n      y: yPos\n    } : {});\n    var newControl = createLayoutGrid({\n      type: 'CardGrid',\n      parentId: rootId,\n      gridInfo: gridInfo,\n      transferData: transferData\n    });\n    if (headerControl && headerControl.length && newControl[0].y < headerControl[0].height) {\n      newControl[0].y = headerControl[0].height + newControl[0].y;\n    }\n    var resolve = gridData.resolve;\n    resolve([{\n      type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.ADD,\n      value: newControl\n    }]);\n  };\n  var onCardConfirm = function onCardConfirm(gridInfo) {\n    setCardSetting({\n      show: false\n    });\n    var resolve = cardSetting.resolve,\n      reject = cardSetting.reject;\n    setGridData({\n      controlType: \"CardGrid\",\n      reject: reject,\n      resolve: resolve,\n      show: true,\n      gridInfo: gridInfo\n    });\n  };\n  var handleGridGenerator = function handleGridGenerator(setGridData, callbacks) {\n    if ((0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.isPrintModelIsTemplate)(dataContext)) {\n      onSelect([{}, {}, {}], callbacks);\n    } else {\n      setGridData(_objectSpread({\n        show: true\n      }, callbacks));\n    }\n  };\n  var resetDropInfo = function resetDropInfo() {\n    dropInfo.current = {\n      isDrag: false,\n      yPos: 0\n    };\n  };\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('grid-guide', function (data) {\n      handleGridGenerator(setGridData, data);\n    });\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('layoutGrid-setting', function (data) {\n      setGridSetting(_objectSpread({\n        show: true\n      }, data));\n    });\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('beforeChangeLang', function (data) {\n      setLangData(_objectSpread({\n        show: true\n      }, data));\n    });\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('card-setting', function (data) {\n      setCardSetting(_objectSpread({\n        show: true\n      }, data));\n    }), designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('beforeChangeGridFooter', function (data) {\n      var parentGridId = data.parentGridId,\n        tableTail = data.tableTail,\n        resolve = data.resolve,\n        reject = data.reject;\n      if (tableTail) {\n        var gridField = dataContext.findControl(parentGridId);\n        var newControl = createControlData({\n          type: 'TableTail',\n          parentId: rootId,\n          transferData: {\n            x: gridField.x,\n            y: gridField.y + gridField.height,\n            width: gridField.width,\n            parentGridId: parentGridId\n          }\n        });\n        resolve([{\n          type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.ADD,\n          value: newControl\n        }, {\n          type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.UPDATE,\n          value: [[gridField.id, {\n            hasTableTail: tableTail,\n            tableTailId: newControl.id\n          }]]\n        }]);\n      } else {\n        var _gridField = dataContext.findControl(parentGridId);\n        resolve([{\n          type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.DELETE,\n          value: _gridField.tableTailId\n        }, {\n          type: designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ActionType.UPDATE,\n          value: [[_gridField.id, {\n            hasTableTail: tableTail,\n            tableTailId: ''\n          }]]\n        }]);\n      }\n    });\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('grid-guide');\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('layoutGrid-setting');\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('beforeChangeLang');\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('card-setting');\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('beforeChangeGridFooter');\n    };\n  }, [activedSelectId, onSelect]);\n\n  // 画布缩放的需求需要澄清\n  // 1. 主视图缩放的范围\n  // 2. 缩放后，内部控件的逻辑（尺寸、缩放、拖拽）的逻辑，\n\n  // 这里需要监听DOM变化\n  var operateRulerBar = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    console.log(\"canvasBoxRef\", canvasBoxRef);\n    var canvasBox = canvasBoxRef.current;\n    if (canvasBox) {\n      var _canvasLayerRef$curre, _canvasLayerRef$curre2, _canvasLayerRef$curre3;\n      var offsetTop = canvasBox.offsetTop,\n        offsetLeft = canvasBox.offsetLeft;\n      (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(cacheOffsetRef.current, {\n        offsetTop: offsetTop,\n        offsetLeft: offsetLeft\n      });\n      xRulerDomRef.current.style.top = Math.max(offsetTop !== null && offsetTop !== void 0 ? offsetTop : 0, _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING) + 'px';\n      yRulerDomRef.current.style.left = Math.max(offsetLeft !== null && offsetLeft !== void 0 ? offsetLeft : 0, _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING) + 'px';\n      (_canvasLayerRef$curre = canvasLayerRef.current) === null || _canvasLayerRef$curre === void 0 || _canvasLayerRef$curre.x(offsetLeft - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING);\n      (_canvasLayerRef$curre2 = canvasLayerRef.current) === null || _canvasLayerRef$curre2 === void 0 || _canvasLayerRef$curre2.y(offsetTop - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING);\n      (_canvasLayerRef$curre3 = canvasLayerRef.current) === null || _canvasLayerRef$curre3 === void 0 || _canvasLayerRef$curre3.batchDraw();\n      forceUpdate(function (n) {\n        return n + 1;\n      }); // update realCanvasPageWidth\n    }\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    operateRulerBar();\n  }, []);\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.useResizeObserver)(canvasBoxRef.current, operateRulerBar);\n  (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.useResizeObserver)(containerDomRef.current, operateRulerBar);\n  var rootRelativeRefs = [rootControlRef, stageRef, rootControlOutterRef, backgroundRef];\n  var isRootControl = function isRootControl(node) {\n    return _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_21___default()(rootRelativeRefs).call(rootRelativeRefs, function (ref) {\n      return ref.current === node;\n    });\n  };\n  var handleDrawRegionMouseDown = function handleDrawRegionMouseDown(e) {\n    var node = e.target;\n    console.log(\"selectedIds node\", node);\n    // 0是左键\n    if (e.evt.button !== 0) return;\n    if (node !== (inputNodeRef === null || inputNodeRef === void 0 ? void 0 : inputNodeRef.current)) {\n      hideEditor && hideEditor();\n    }\n    if (isRootControl(node)) {\n      dragInfoRef.current.isDragging = true;\n    }\n    var _e$evt = e.evt,\n      layerX = _e$evt.layerX,\n      layerY = _e$evt.layerY;\n    dragInfoRef.current.startX = layerX;\n    dragInfoRef.current.startY = layerY;\n    // 这里需要防止点击transfomer也会触发，需要判断\n    // TOCONFIRM:\n    if (isRootControl(node)) {\n      console.log(\"selectedIds node stageRef.current\", node);\n      handleMouseDown(e);\n      // eventBus.emit('reset-grid-state')\n    }\n  };\n  var cacheOffsetRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)({\n    offsetLeft: 0,\n    offsetTop: 0\n  });\n  var getRedundancyXY = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    var _cacheOffsetRef$curre, _cacheOffsetRef$curre2, _cacheOffsetRef$curre3, _cacheOffsetRef$curre4;\n    return {\n      x: ((_cacheOffsetRef$curre = (_cacheOffsetRef$curre2 = cacheOffsetRef.current) === null || _cacheOffsetRef$curre2 === void 0 ? void 0 : _cacheOffsetRef$curre2.offsetLeft) !== null && _cacheOffsetRef$curre !== void 0 ? _cacheOffsetRef$curre : 0) - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING + (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginLeft, scale),\n      y: ((_cacheOffsetRef$curre3 = (_cacheOffsetRef$curre4 = cacheOffsetRef.current) === null || _cacheOffsetRef$curre4 === void 0 ? void 0 : _cacheOffsetRef$curre4.offsetTop) !== null && _cacheOffsetRef$curre3 !== void 0 ? _cacheOffsetRef$curre3 : 0) - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING + (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginTop, scale)\n    };\n  }, [marginLeft, marginTop, scale]);\n  var handleDrawRegionMouseMove = function handleDrawRegionMouseMove(e) {\n    var _node$getLayer;\n    if (drawRegionOuterRef.current.isOutMouseUp) {\n      handleDrawRegionMouseUp(e);\n      drawRegionOuterRef.current.isOutMouseUp = false;\n      return;\n    }\n    if (!dragInfoRef.current.isDragging) return;\n    var _e$evt2 = e.evt,\n      moveX = _e$evt2.layerX,\n      moveY = _e$evt2.layerY;\n    var _dragInfoRef$current = dragInfoRef.current,\n      startX = _dragInfoRef$current.startX,\n      startY = _dragInfoRef$current.startY;\n    var _ref6 = [Math.min(moveX, startX), Math.min(moveY, startY), Math.abs(moveX - startX), Math.abs(moveY - startY)],\n      originX = _ref6[0],\n      originY = _ref6[1],\n      width = _ref6[2],\n      height = _ref6[3];\n    var node = drawRegionRef.current;\n    var _getRedundancyXY = getRedundancyXY(),\n      redundancyX = _getRedundancyXY.x,\n      redundancyY = _getRedundancyXY.y;\n    node.x(originX - redundancyX);\n    node.y(originY - redundancyY);\n    node.width(width);\n    node.height(height);\n    node.visible(true);\n    node === null || node === void 0 || (_node$getLayer = node.getLayer()) === null || _node$getLayer === void 0 || _node$getLayer.batchDraw();\n  };\n  var copyGridCell = function copyGridCell() {\n    try {\n      localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_GRIDCELL_KEY, _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_22___default()(lastedSelectItem));\n    } catch (error) {\n      console.log('cannot save datacellInfo:', lastedSelectItem, 'so clear localStorage and try to save again');\n      localStorage.clear();\n      localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_GRIDCELL_KEY, lastedSelectItem);\n    }\n  };\n  var pasteGridCell = function pasteGridCell() {\n    var gridInfo = localStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_GRIDCELL_KEY);\n    if (gridInfo) {\n      var _JSON$parse = JSON.parse(gridInfo),\n        dataSource = _JSON$parse.dataSource,\n        bindField = _JSON$parse.bindField,\n        bindText = _JSON$parse.bindText,\n        viewText = _JSON$parse.viewText;\n      var node = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.queryDataSourceNodeByKey)((0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.createDataSourceNodeKey)(dataSource, bindField), definition);\n      if (node) {\n        console.log('node', node);\n        (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.handlePasteTextInGridCell)(node, lastedSelectItem, dataContext, {\n          dataSource: dataSource,\n          bindField: bindField,\n          bindText: bindText,\n          viewText: viewText\n        }, setMessage);\n      } else {\n        dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)([[activedSelectId, {\n          dataSource: dataSource,\n          bindField: bindField,\n          bindText: bindText,\n          viewText: viewText\n        }]]));\n      }\n    }\n  };\n  var _handleCanvasKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function (e) {\n    var key = e.keyCode || e.which;\n    var isMulti = (0,_utils_client__WEBPACK_IMPORTED_MODULE_47__.isMultiKeyActive)(e);\n    var selectIds = selectionContext.getSelection();\n    var collectCanKeyMoveIds = function collectCanKeyMoveIds() {\n      var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectIds;\n      return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(ids).call(ids, function (id) {\n        var _context9;\n        var control = dataContext.findControl(id);\n        return !_babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_21___default()(_context9 = [_utils_controlType__WEBPACK_IMPORTED_MODULE_49__.isHeader, _utils_grid__WEBPACK_IMPORTED_MODULE_51__.isGridRelativeControl, _utils_controlType__WEBPACK_IMPORTED_MODULE_49__.isFooter, _utils_grid__WEBPACK_IMPORTED_MODULE_51__.isSubDataGrid]).call(_context9, function (isFn) {\n          return isFn(control);\n        });\n      });\n    };\n    var getMoveBoundPos = function getMoveBoundPos(id) {\n      var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        _ref7$x = _ref7.x,\n        addX = _ref7$x === void 0 ? 0 : _ref7$x,\n        _ref7$y = _ref7.y,\n        addY = _ref7$y === void 0 ? 0 : _ref7$y;\n      var _dataContext$findCont3 = dataContext.findControl(id),\n        x = _dataContext$findCont3.x,\n        y = _dataContext$findCont3.y,\n        parentId = _dataContext$findCont3.parentId;\n      return (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_43__.moveBoundFunc)({\n        position: {\n          x: x + addX,\n          y: y + addY\n        },\n        id: id,\n        rootId: rootId,\n        parentId: parentId,\n        dataContext: dataContext,\n        addXY: {\n          x: addX,\n          y: addY\n        }\n      });\n    };\n    var isHaveAnyDataCell = function isHaveAnyDataCell() {\n      var _context10;\n      var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectIds;\n      return _babel_runtime_corejs3_core_js_stable_instance_some__WEBPACK_IMPORTED_MODULE_21___default()(_context10 = dataContext.findControl(ids)).call(_context10, _utils_grid__WEBPACK_IMPORTED_MODULE_51__.isGridRelativeControl);\n    };\n    switch (key) {\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.BACKSPACE:\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.DELETE:\n        {\n          deleteSelectionControl();\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.A:\n        {\n          if (isMulti) {\n            var _context11;\n            var _dataContext$getData = dataContext.getData(),\n              items = _dataContext$getData.items;\n            selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context11 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(items).call(items, function (item) {\n              return item.parentId === rootId;\n            })).call(_context11, function (_ref8) {\n              var id = _ref8.id;\n              return id;\n            }));\n          }\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.C:\n        {\n          // 允许复制\n          // if (!isChinese) return\n          // TODO: constant\n          if (isMulti) {\n            var _selectIds = selectionContext.getSelection();\n            if (_selectIds.length) {\n              if (isHaveAnyDataCell()) {\n                return _selectIds.length === 1 ? copyGridCell() : localStorage.removeItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_LOCALSTORAGE_KEY);\n              }\n              var allItems = dataContext.getData().items;\n              var allRelativeIds = lodash__WEBPACK_IMPORTED_MODULE_29___default().flattenDeep(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_selectIds).call(_selectIds, function (id) {\n                return collectRelativeId(id, allItems);\n              }));\n              var copyInfo = _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_22___default()({\n                selection: _selectIds,\n                items: _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(allRelativeIds).call(allRelativeIds, function (id) {\n                  return dataContext.findControl(id);\n                }) // 压缩选中范围\n              });\n              try {\n                localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_LOCALSTORAGE_KEY, copyInfo);\n              } catch (error) {\n                console.log('cannot save copyInfo:', copyInfo, 'so clear localStorage and try to save again');\n                localStorage.removeItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_LOCALSTORAGE_KEY);\n                localStorage.setItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_LOCALSTORAGE_KEY, copyInfo);\n              }\n            }\n          }\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.V:\n        {\n          if (isMulti) {\n            var _selectIds2 = selectionContext.getSelection();\n            if (isHaveAnyDataCell()) {\n              return _selectIds2.length === 1 ? pasteGridCell() : false;\n            }\n            var newControls = localStorage.getItem(_constants__WEBPACK_IMPORTED_MODULE_41__.COPY_LOCALSTORAGE_KEY);\n            if (newControls) {\n              var _JSON$parse2 = JSON.parse(newControls),\n                selection = _JSON$parse2.selection,\n                _items = _JSON$parse2.items;\n              var newControlDatas = navToolRef.current.copyControl({\n                selection: selection,\n                items: _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_items).call(_items, function (item) {\n                  if (item.tableTailId) item.tableTailId = '';\n                  return item;\n                })\n              });\n              var _newControlDatas = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(newControlDatas).call(newControlDatas, function (newControlData) {\n                var _context12;\n                return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context12 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(controlMetaInfo)).call(_context12, newControlData.type);\n              });\n              (_newControlDatas === null || _newControlDatas === void 0 ? void 0 : _newControlDatas.length) > 0 && navToolRef.current.pasteControl(_newControlDatas);\n            }\n          }\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.D:\n        {\n          if (isMulti) {\n            navToolRef.current.copyAndPasteControl();\n          }\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.Z:\n        {\n          if (isMulti) {\n            navToolRef.current.canvasUndo();\n            _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23___default()(function () {\n              canvasPageRef.current.focus();\n            });\n          }\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.Y:\n        {\n          if (isMulti) {\n            navToolRef.current.canvasRedo();\n            _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23___default()(function () {\n              canvasPageRef.current.focus();\n            });\n          }\n          break;\n        }\n      // DONE:\n      // selectIds 添加 类型 约束\n      // change 添加 位置 约束\n      // DONE:\n      // 键盘快速输入，得用队列, 用节流即可\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWUP:\n        {\n          var _context13;\n          if (isHaveAnyDataCell()) return;\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context13 = collectCanKeyMoveIds()).call(_context13, function (id) {\n            var _getMoveBoundPos = getMoveBoundPos(id, {\n                y: -_constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM\n              }),\n              realX = _getMoveBoundPos.x,\n              realY = _getMoveBoundPos.y;\n            var _dataContext$findCont4 = dataContext.findControl(id),\n              parentId = _dataContext$findCont4.parentId,\n              childY = _dataContext$findCont4.y;\n            var _ref9 = dataContext.findControl(parentId) || {},\n              type = _ref9.type;\n            if (type === 'TableTail') {\n              realY = childY - _constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM > 0 ? childY - _constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM : 0;\n            }\n            return [id, {\n              y: realY\n            }];\n          })));\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWDOWN:\n        {\n          var _context14;\n          if (isHaveAnyDataCell()) return;\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context14 = collectCanKeyMoveIds()).call(_context14, function (id) {\n            var _getMoveBoundPos2 = getMoveBoundPos(id, {\n                y: +_constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM\n              }),\n              realX = _getMoveBoundPos2.x,\n              realY = _getMoveBoundPos2.y;\n            var _dataContext$findCont5 = dataContext.findControl(id),\n              parentId = _dataContext$findCont5.parentId,\n              childY = _dataContext$findCont5.y,\n              childH = _dataContext$findCont5.height;\n            var _ref10 = dataContext.findControl(parentId) || {},\n              height = _ref10.height,\n              type = _ref10.type;\n            if (type === 'TableTail') {\n              realY = childH + childY + _constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM > height ? childY : +childY + _constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM;\n            }\n            return [id, {\n              y: realY\n            }];\n          })));\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWLEFT:\n        {\n          var _context15;\n          if (isHaveAnyDataCell()) return;\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context15 = collectCanKeyMoveIds()).call(_context15, function (id) {\n            var _getMoveBoundPos3 = getMoveBoundPos(id, {\n                x: -_constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM\n              }),\n              realX = _getMoveBoundPos3.x,\n              realY = _getMoveBoundPos3.y;\n            return [id, {\n              x: realX\n            }];\n          })));\n          break;\n        }\n      case _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWRIGHT:\n        {\n          var _context16;\n          if (isHaveAnyDataCell()) return;\n          dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context16 = collectCanKeyMoveIds()).call(_context16, function (id) {\n            var _getMoveBoundPos4 = getMoveBoundPos(id, {\n                x: +_constants__WEBPACK_IMPORTED_MODULE_41__.ARROW_KEYS_STEP_MM\n              }),\n              realX = _getMoveBoundPos4.x,\n              realY = _getMoveBoundPos4.y;\n            return [id, {\n              x: realX\n            }];\n          })));\n          break;\n        }\n    }\n  }, [activedSelectId]);\n  var handleCanvasKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(lodash__WEBPACK_IMPORTED_MODULE_29___default().throttle(_handleCanvasKeyDown, THROTTLE_TIME, {\n    trailing: true\n  }), [_handleCanvasKeyDown]);\n  var handleDragOver = function handleDragOver(e) {\n    // Canvas容器\n    if (!containerDomRef.current) return;\n    var _containerDomRef$curr = containerDomRef.current.getBoundingClientRect(),\n      left = _containerDomRef$curr.left,\n      top = _containerDomRef$curr.top,\n      height = _containerDomRef$curr.height,\n      width = _containerDomRef$curr.width;\n    var _containerDomRef$curr2 = containerDomRef.current,\n      scrollLeft = _containerDomRef$curr2.scrollLeft,\n      scrollTop = _containerDomRef$curr2.scrollTop;\n    var _getRedundancyXY2 = getRedundancyXY(),\n      x = _getRedundancyXY2.x,\n      y = _getRedundancyXY2.y;\n    var pageX = e.pageX,\n      pageY = e.pageY;\n    if (pageX >= left + Math.max(x - scrollLeft, 0) && pageX <= left + Math.max(x - scrollLeft, 0) + (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageWidth, scale) && pageY >= top + Math.max(y - scrollTop, 0) && pageY <= top + Math.max(y - scrollTop, 0) + (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageHeight, scale)) {\n      e.preventDefault();\n    }\n  };\n  var handleStageDrop = function handleStageDrop(e) {\n    // e.stopPropagation()\n    console.log('handleStageDrop---------', e);\n    var type = e.dropType,\n      evt = e.evt,\n      controlData = e.controlData,\n      position = e.position,\n      showDataSourceTitle = e.showDataSourceTitle;\n    var offsetX = evt.offsetX,\n      offsetY = evt.offsetY;\n    var pos = {\n      x: offsetX,\n      y: offsetY\n    };\n    // 这里可以拿到落于画布上的具体控件\n    var dropShape = stageRef.current.getIntersection(pos, 'Group');\n    console.log('shape-----', pos, dropShape);\n    if (type === 'control') {\n      handleControlDrop(controlData, position, dropShape);\n    } else {\n      handleDataSourceDrop(controlData, position, dropShape, showDataSourceTitle);\n    }\n  };\n  var handleDrop = function handleDrop(e) {\n    e.preventDefault();\n    var _window$event = window.event,\n      offsetX = _window$event.offsetX,\n      offsetY = _window$event.offsetY;\n    var _getRedundancyXY3 = getRedundancyXY(),\n      redundancyX = _getRedundancyXY3.x,\n      redundancyY = _getRedundancyXY3.y;\n    var position = {\n      // deal ?\n      offsetX: offsetX - redundancyX,\n      offsetY: offsetY - redundancyY,\n      x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorPxtoMM)(offsetX - redundancyX, scale),\n      y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorPxtoMM)(offsetY - redundancyY, scale)\n    };\n    dropInfo.current = {\n      isDrag: true,\n      yPos: position.y\n    };\n    var dragData = env[designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.CONTROL_DRAG_DATA] || {};\n    // const dragData = data ? JSON.parse(data) : {}\n    if (!_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(dragData).length) return;\n    var type = dragData.type,\n      controlData = dragData.data,\n      showDataSourceTitle = dragData.showDataSourceTitle;\n    stageRef === null || stageRef === void 0 || stageRef.current.fire('drop', {\n      dropType: type,\n      target: stageRef.current,\n      evt: window.event,\n      controlData: controlData,\n      position: position,\n      showDataSourceTitle: showDataSourceTitle\n    }, false);\n    delete env[designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.CONTROL_DRAG_DATA];\n  };\n  var getDropControl = function getDropControl(id) {\n    var _dataContext$findCont6;\n    var control = id ? dataContext.findControl(id) : null;\n    var _getControlIsContaine = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getControlIsContainer)(controlMetaInfo, control || {}, keywordMapping),\n      isContainer = _getControlIsContaine.isContainer;\n    if (((_dataContext$findCont6 = dataContext.findControl(dataContext.findControl(activedSelectId).parentId)) === null || _dataContext$findCont6 === void 0 ? void 0 : _dataContext$findCont6.type) === 'SubDataGrid') {\n      return isContainer = false;\n    }\n    while (control && !isContainer && control.parentId !== rootId) {\n      var parentControl = dataContext.findControl(control.parentId);\n      control = parentControl;\n    }\n    return control;\n  };\n  // 控件拖拽入画布\n  var handleControlDrop = function handleControlDrop(node, position, dropShape) {\n    var _dropShape$attrs, _dataContext$findCont7, _dataContext$findCont8;\n    var type = node.Id;\n    var offsetX = position.offsetX,\n      offsetY = position.offsetY;\n    var id = dropShape === null || dropShape === void 0 || (_dropShape$attrs = dropShape.attrs) === null || _dropShape$attrs === void 0 ? void 0 : _dropShape$attrs.id;\n    var dropControl = getDropControl(id);\n    var _getControlIsContaine2 = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getControlIsContainer)(controlMetaInfo, dropControl || {}, keywordMapping),\n      isContainer = _getControlIsContaine2.isContainer,\n      accept = _getControlIsContaine2.accept;\n    if (((_dataContext$findCont7 = dataContext.findControl((_dataContext$findCont8 = dataContext.findControl(id)) === null || _dataContext$findCont8 === void 0 ? void 0 : _dataContext$findCont8.parentId)) === null || _dataContext$findCont7 === void 0 ? void 0 : _dataContext$findCont7.type) === 'SubDataGrid') {\n      false, (0,_babel_runtime_corejs3_helpers_readOnlyError__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(\"isContainer\");\n      '', (0,_babel_runtime_corejs3_helpers_readOnlyError__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(\"accept\");\n    }\n    if (isContainer && accept && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(accept).call(accept, type)) return;\n    var newControl = createControlData({\n      type: type,\n      parentId: isContainer ? dropControl.id : rootId,\n      transferData: {\n        x: position.x,\n        y: isContainer ? position.y - dropControl.y : position.y\n      }\n    });\n    if (!newControl) return;\n    var x = newControl.x,\n      y = newControl.y,\n      width = newControl.width,\n      height = newControl.height;\n    if (x + width >= pageWidth) {\n      newControl.x = pageWidth - width;\n    }\n    if (y + height > pageHeight) {\n      newControl.y = pageHeight - height;\n    }\n    var footerControls = dataContext.findControlByCondition(function (item) {\n      return item.type === 'Footer';\n    });\n    var footer = footerControls[0];\n    if (footer && newControl.parentId === rootId && y + height > footer.y) {\n      (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.batchChangeControlValue)([newControl], 'y', footer.y - height);\n    }\n    newControl.x = newControl.x < 0 ? 0 : newControl.x;\n    dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createAddAction)(newControl)).then(function (actions) {\n      var realControl = actions[0].value;\n      selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_24___default()(realControl) ? [realControl[0].id] : [realControl.id]);\n    });\n    // selectionContext.setSelect(Array.isArray(newControl) ? [newControl[0].id] : [newControl.id])\n  };\n  // 数据源拖拽入画布\n  var handleDataSourceDrop = function handleDataSourceDrop(node, position, dropShape, showDataSourceTitle) {\n    var _context17, _dropShape$attrs2, _dataContext$findCont9;\n    node.key = node.nodeKey;\n    var _node$type = node.type,\n      type = _node$type === void 0 ? 'Text' : _node$type,\n      Items = node.Items,\n      _node$InitAttr2 = node.InitAttr,\n      InitAttr = _node$InitAttr2 === void 0 ? {} : _node$InitAttr2;\n    if (Items) {\n      return;\n    }\n    // InitAttr 平铺\n    var dataSourceObj = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.specialHandle)(node, definition);\n    var title = dataSourceObj.title,\n      _initAttr = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(dataSourceObj, _excluded);\n    var initAttr = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default()(_context17 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_10___default()(InitAttr)).call(_context17, function (res, key) {\n      res[lodash__WEBPACK_IMPORTED_MODULE_29___default().camelCase(key)] = InitAttr[key];\n      // 这里约定好由前端处理\n      return res;\n    }, {}), _initAttr);\n    var id = dropShape === null || dropShape === void 0 || (_dropShape$attrs2 = dropShape.attrs) === null || _dropShape$attrs2 === void 0 ? void 0 : _dropShape$attrs2.id;\n    var dropControl = getDropControl(id);\n    var _getControlIsContaine3 = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getControlIsContainer)(controlMetaInfo, dropControl || {}, keywordMapping),\n      isContainer = _getControlIsContaine3.isContainer,\n      accept = _getControlIsContaine3.accept;\n    if (((_dataContext$findCont9 = dataContext.findControl(dataContext.findControl(activedSelectId).parentId)) === null || _dataContext$findCont9 === void 0 ? void 0 : _dataContext$findCont9.type) === 'SubDataGrid') {\n      isContainer = false;\n      accept = '';\n    }\n    if (type === 'Text') {\n      if (dropControl && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isDataCell)(dropControl)) {\n        return (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.handleDropInTextInDataCell)(node, dropControl, dataContext, {\n          initAttr: initAttr,\n          title: title\n        }, setMessage, definition);\n      }\n      if (isContainer && accept && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(accept).call(accept, type)) return;\n      // 网格处理逻辑\n      if (dropControl && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isLayoutCell)(dropControl)) {\n        var cardGridDataSource = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.geGridDataSource)(dataContext, id, 'CardGrid');\n        if (cardGridDataSource) {\n          var cardFieldDataSource = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__.filterCardFieldDataSourceByDsType)(cardGridDataSource, definition);\n          var include = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__.includeDataSource)(cardFieldDataSource, dataSourceObj === null || dataSourceObj === void 0 ? void 0 : dataSourceObj.dataSource);\n          if (!include) {\n            return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0095'));\n          }\n        }\n        return (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.handleDropTextInLayoutCell)(id, dataContext, _objectSpread(_objectSpread({}, initAttr), {}, {\n          viewText: \"=$\".concat(title)\n        }));\n      }\n      var newControls = [];\n      if (showDataSourceTitle) {\n        var newTextControl = createControlData({\n          type: type,\n          parentId: isContainer ? dropControl.id : rootId,\n          transferData: {\n            bindText: title,\n            x: position.x,\n            y: isContainer ? position.y - dropControl.y : position.y\n          }\n        });\n        var x = newTextControl.x,\n          y = newTextControl.y,\n          _width3 = newTextControl.width,\n          _height2 = newTextControl.height;\n        if (x + _width3 >= pageWidth) {\n          newTextControl.x = pageWidth - 2 * _width3;\n        }\n        if (y + _height2 > pageHeight) {\n          newTextControl.y = pageHeight - _height2;\n        }\n        var newTextFieldControl = createControlData({\n          type: type,\n          parentId: isContainer ? dropControl.id : rootId,\n          transferData: (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, initAttr, {\n            x: (+newTextControl.x || 0) + (+newTextControl.width || 0),\n            y: +newTextControl.y || 0,\n            // 这里写死了\n            viewText: \"=$\".concat(title)\n          })\n        });\n        newControls = [newTextControl, newTextFieldControl];\n      } else {\n        var _newTextFieldControl = createControlData({\n          type: type,\n          parentId: isContainer ? dropControl.id : rootId,\n          transferData: _objectSpread(_objectSpread({}, initAttr), {}, {\n            x: position.x,\n            y: isContainer ? position.y - dropControl.y : position.y,\n            viewText: \"=$\".concat(title)\n          })\n        });\n        var _x = _newTextFieldControl.x,\n          _y = _newTextFieldControl.y,\n          _width4 = _newTextFieldControl.width,\n          _height3 = _newTextFieldControl.height;\n        if (_x + _width4 >= pageWidth) {\n          _newTextFieldControl.x = pageWidth - _width4;\n        }\n        if (_y + _height3 > pageHeight) {\n          _newTextFieldControl.y = pageHeight - _height3;\n        }\n        newControls = [_newTextFieldControl];\n      }\n      var footerControls = dataContext.findControlByCondition(function (item) {\n        return item.type === 'Footer';\n      });\n      var footer = footerControls[0];\n      var _newControls$ = newControls[0],\n        newControlY = _newControls$.y,\n        newControlHeight = _newControls$.height;\n      if (footer && newControls[0].parentId === rootId && newControlY + newControlHeight > footer.y) {\n        (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.batchChangeControlValue)(newControls, 'y', footer.y - newControlHeight);\n      }\n      dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createAddAction)(newControls, {\n        addType: 'addField'\n      })).then(function () {\n        selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(newControls).call(newControls, function (item) {\n          return item.id;\n        }));\n      });\n    } else {\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_41__.COMMON_CONTROL_TYPE_MAP.richText) {\n        // 富文本时与左树点击逻辑一致\n        if (dropControl) {\n          //数据表格单元格\n          if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isDataCell)(dropControl)) {\n            return (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.handleDropInTextInDataCell)(node, dropControl, dataContext, {\n              initAttr: initAttr,\n              title: title\n            }, setMessage, definition);\n          }\n\n          //布局表格单元格\n          if ((0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isLayoutCell)(dropControl)) {\n            var _cardGridDataSource = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.geGridDataSource)(dataContext, id, 'CardGrid');\n            if (_cardGridDataSource) {\n              var _cardFieldDataSource = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__.filterCardFieldDataSourceByDsType)(_cardGridDataSource, definition);\n              var _include = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__.includeDataSource)(_cardFieldDataSource, dataSourceObj === null || dataSourceObj === void 0 ? void 0 : dataSourceObj.dataSource);\n              if (!_include) {\n                return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0095'));\n              }\n            }\n            return (0,_utils_control__WEBPACK_IMPORTED_MODULE_48__.handleDropTextInLayoutCell)(id, dataContext, _objectSpread(_objectSpread({}, initAttr), {}, {\n              viewText: \"=$\".concat(title)\n            }));\n          }\n        }\n      }\n      if (dropControl && (0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isLayoutCell)(dropControl)) {\n        var _id = dropControl.id;\n        var _cardGridDataSource2 = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_50__.geGridDataSource)(dataContext, _id, 'CardGrid');\n        if (_cardGridDataSource2) {\n          var _cardFieldDataSource2 = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__.filterCardFieldDataSourceByDsType)(_cardGridDataSource2, definition);\n          var _include2 = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_54__.includeDataSource)(_cardFieldDataSource2, dataSourceObj === null || dataSourceObj === void 0 ? void 0 : dataSourceObj.dataSource);\n          if (!_include2) {\n            return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.getLangMsg)('printd.grid.key0096'));\n          }\n        }\n      }\n      if (isContainer && acceptTypes && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(acceptTypes).call(acceptTypes, type)) return;\n      var newControl = createControlData({\n        type: type,\n        parentId: isContainer ? dropControl.id : rootId,\n        transferData: _objectSpread(_objectSpread({}, initAttr), {}, {\n          x: position.x,\n          y: isContainer ? position.y - dropControl.y : position.y\n        })\n      });\n      var _x2 = newControl.x,\n        _y2 = newControl.y,\n        _width5 = newControl.width,\n        _height4 = newControl.height;\n      if (_x2 + _width5 >= pageWidth) {\n        newControl.x = pageWidth - _width5;\n      }\n      if (_y2 + _height4 > pageHeight) {\n        newControl.y = pageHeight - _height4;\n      }\n      dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createAddAction)(newControl)).then(function () {\n        selectionContext.setSelect([newControl.id]);\n      });\n    }\n  };\n  var drawRegionOuterRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)({\n    isOutMouseUp: false\n  });\n  var handleDrawRegionMouseUp = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    if (dragInfoRef.current.isDragging === true) {\n      var _stageRef$current, _context18, _context19, _node$getLayer2;\n      dragInfoRef.current.isDragging = false;\n      var node = drawRegionRef.current;\n      var drawRegionNodeRect = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_43__.getAbsolutePosition)(node);\n      var nodes = (_stageRef$current = stageRef.current) === null || _stageRef$current === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(_stageRef$current).call(_stageRef$current, \".\".concat(_constants__WEBPACK_IMPORTED_MODULE_41__.CONTAINER_NODE_CLASSNAME)).toArray();\n      var selectControls = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(_context18 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(_context19 = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_11___default()(nodes).call(nodes, function (node) {\n        var nodeNames = node.name().split(' ');\n        // && !nodeNames.includes(CELL_NODE_CLASSNAME) 这个不需要，根据父节点判断\n        return konva__WEBPACK_IMPORTED_MODULE_28___default().Util.haveIntersection(drawRegionNodeRect, (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_43__.getAbsolutePosition)(node)) && node.getParent() === controlGroupRef.current;\n      })).call(_context19, function (node) {\n        return node.id();\n      })).call(_context18, Boolean);\n      console.log(selectControls);\n      if (selectControls.length > 0) {\n        selectionContext.setSelect(selectControls);\n      }\n      // alert(m)\n      node.x(DRAW_REGION_RECT_INIT_VAL);\n      node.y(DRAW_REGION_RECT_INIT_VAL);\n      node.width(DRAW_REGION_RECT_INIT_VAL);\n      node.height(DRAW_REGION_RECT_INIT_VAL);\n      node.visible(false);\n      // node?.destroy()\n      // node?.draw()\n      node === null || node === void 0 || (_node$getLayer2 = node.getLayer()) === null || _node$getLayer2 === void 0 || _node$getLayer2.batchDraw();\n    }\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    var _document$querySelect;\n    var handleDrawRegionOuterMouseUp = function handleDrawRegionOuterMouseUp() {\n      // 这里竟然不可以??\n      // handleDrawRegionMouseUp()\n      drawRegionOuterRef.current.isOutMouseUp = true;\n    };\n    var callback = function callback(e) {\n      var _e$target, _e$target2, _e$target3, _e$target4, _context20, _context21;\n      // 画布一刀切\n      if (((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.tagName) === 'INPUT' && ((_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : _e$target2.type) !== 'checkbox' || ((_e$target3 = e.target) === null || _e$target3 === void 0 ? void 0 : _e$target3.tagName) === 'TEXTAREA' || ((_e$target4 = e.target) === null || _e$target4 === void 0 ? void 0 : _e$target4.contentEditable) === \"true\") {\n        return;\n      }\n      var key = e.keyCode || e.which;\n      var isMulti = (0,_utils_client__WEBPACK_IMPORTED_MODULE_47__.isMultiKeyActive)(e);\n      // 上下左右取消默认行为\n      if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context20 = [_utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWDOWN, _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWLEFT, _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWRIGHT, _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.ARROWUP, _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.DELETE, _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.BACKSPACE]).call(_context20, key) || isMulti && _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_18___default()(_context21 = [_utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.D, _utils_keyCode__WEBPACK_IMPORTED_MODULE_53__.KEYS.A]).call(_context21, key)) {\n        e.preventDefault();\n      }\n      handleCanvasKeyDown(e);\n    };\n    (_document$querySelect = document.querySelector('.print-designer-root')) === null || _document$querySelect === void 0 || _document$querySelect.addEventListener('keydown', callback);\n    window.addEventListener('mouseup', handleDrawRegionOuterMouseUp);\n    return function () {\n      var _document$querySelect2;\n      (_document$querySelect2 = document.querySelector('.print-designer-root')) === null || _document$querySelect2 === void 0 || _document$querySelect2.removeEventListener('keydown', callback);\n      window.removeEventListener('mouseup', handleDrawRegionOuterMouseUp);\n    };\n  }, [activedSelectId, rootId, handleDrawRegionMouseUp, handleCanvasKeyDown]);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    var callback = function callback(e) {\n      e.stopPropagation();\n    };\n    window.addEventListener('drop', callback);\n    return function () {\n      window.removeEventListener('drop', callback);\n    };\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('scale', function (newScale) {\n      if (newScale !== scale) {\n        console.log('newScale----', newScale, scale);\n        setScale(newScale);\n      }\n    });\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('scale');\n    };\n  }, [scale]);\n  var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)(function () {\n      return (asistantBorderRef === null || asistantBorderRef === void 0 ? void 0 : asistantBorderRef.current) || false;\n    }),\n    _useState14 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(_useState13, 2),\n    contextStrokeEnabled = _useState14[0],\n    setContextStrokeEnabled = _useState14[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('contextStrokeEnabled', function (newContextStrokeEnabled) {\n      if (newContextStrokeEnabled !== contextStrokeEnabled) {\n        console.log('newContextStrokeEnabled----', newContextStrokeEnabled);\n        setContextStrokeEnabled(newContextStrokeEnabled);\n      }\n    });\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('contextStrokeEnabled');\n    };\n  }, [contextStrokeEnabled]);\n  var operationRulerPosition = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    var node = containerDomRef.current;\n    var canvasContainerWidth = node.offsetWidth,\n      canvasContainerHeight = node.offsetHeight;\n    // const {offsetWidth: canvasContainerWidth, offsetHeight: canvasContainerHeight} = canvasBoxRef\n    if (node) {\n      var _context22;\n      var _calcCanvasPosition = calcCanvasPosition(canvasContainerWidth, canvasContainerHeight, (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(actualPageWidth, scale), (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(actualPageHeight, scale)),\n        justifyContent = _calcCanvasPosition.justifyContent,\n        alignItems = _calcCanvasPosition.alignItems;\n      var isChange = false;\n      if (node.style.justifyContent !== justifyContent) {\n        node.style.justifyContent = justifyContent;\n        isChange = true;\n      }\n      if (node.style.alignItems !== alignItems) {\n        node.style.alignItems = alignItems;\n        isChange = true;\n      }\n      // flex-start -> center 需要重新算\n      if (isChange) {\n        forceUpdate(function (n) {\n          return n + 1;\n        });\n      }\n      _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context22 = canvasResizeCallbackRef.current).call(_context22, function (fn) {\n        return fn();\n      });\n      operateRulerBar();\n      forceUpdateTransformer();\n    }\n  }, [scale, actualPageWidth, actualPageHeight]);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    window.addEventListener('resize', operationRulerPosition);\n    return function () {\n      window.removeEventListener('resize', operationRulerPosition);\n    };\n  }, [pageWidth, pageHeight, scale, pixelRatio, actualPageWidth, actualPageHeight]);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    operationRulerPosition();\n  }, [scale, pageWidth, pageHeight, actualPageWidth, actualPageHeight]);\n  var sizeAndPixelRatioChangeCbRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)([]);\n  var windowZoomCallback = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    var _context23;\n    var pr = (window.devicePixelRatio || 1).toFixed(2);\n    if (!lodash__WEBPACK_IMPORTED_MODULE_29___default().isEqual(+pr, +pixelRatio)) {\n      // 没有作用, Konva不支持动态设置。。。\n      setPixelRatio(+pr);\n    }\n    operationRulerPosition();\n    forceUpdateTransformer();\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context23 = sizeAndPixelRatioChangeCbRef.current).call(_context23, function (fn) {\n      return fn(scale);\n    });\n  }, [pixelRatio, pageWidth, pageHeight, scale, actualPageWidth, actualPageHeight]);\n  (0,_hooks_useWindowZoom__WEBPACK_IMPORTED_MODULE_46__.useWindowZoom)([pixelRatio, pageWidth, pageHeight, scale, actualPageWidth, actualPageHeight], windowZoomCallback);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useImperativeHandle)(forwardedRef, function () {\n    return {\n      stage: stageRef.current\n    };\n  }, []);\n  console.log(\"stageRef.current\", stageRef.current);\n  var forceUpdateTransformer = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    // 更新transformer\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23___default()(function () {\n      var _stageRef$current2, _stageRef$current3, _context24;\n      console.log('update Transformer', (_stageRef$current2 = stageRef.current) === null || _stageRef$current2 === void 0 ? void 0 : _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(_stageRef$current2).call(_stageRef$current2, 'Transformer').toArray());\n      (_stageRef$current3 = stageRef.current) === null || _stageRef$current3 === void 0 || _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context24 = _babel_runtime_corejs3_core_js_stable_instance_find__WEBPACK_IMPORTED_MODULE_16___default()(_stageRef$current3).call(_stageRef$current3, 'Transformer').toArray()).call(_context24, function (tr) {\n        tr === null || tr === void 0 || tr.forceUpdate();\n      });\n    });\n  }, []);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    // 这里还得自己找\n    var operateLine = function operateLine() {\n      var _stageRef$current4;\n      // TYPE\n      // TODO:\n      // 太多了, 后面加太多类型了，没法一一对应\n      // TODO:\n      // 拖拽后的状态需要确定\n      // 又去掉了\n      // const selection = selectionContext.getSelection()\n      // if (selection.length > 1) return\n      var id = activedSelectId;\n      if (id === rootId) {\n        var _rulerRef$current;\n        (_rulerRef$current = rulerRef.current) === null || _rulerRef$current === void 0 || _rulerRef$current.hideLine();\n        return;\n      }\n      // fix: 表格宽高改变，尺子没有绘制bug\n      var node = (_stageRef$current4 = stageRef.current) === null || _stageRef$current4 === void 0 ? void 0 : _stageRef$current4.findOne(\"#\".concat(activedSelectId));\n\n      // 表格的节点需要特殊处理\n      // 加上表格的top left 直接绝对处理\n      // 由于更新是在该effect后(因为这里是data change 而不是render)\n      _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_23___default()(function () {\n        var rect = (0,_hooks_useDragDrop__WEBPACK_IMPORTED_MODULE_43__.getAbsolutePosition)(node, getRedundancyXY());\n        if (!rect || !dataContext.findControl(activedSelectId)) {\n          var _rulerRef$current2;\n          (_rulerRef$current2 = rulerRef.current) === null || _rulerRef$current2 === void 0 || _rulerRef$current2.hideLine();\n          console.log(\"selected ref not find node\", rect, node, id, activedSelectId);\n        } else {\n          var _rulerRef$current3;\n          (_rulerRef$current3 = rulerRef.current) === null || _rulerRef$current3 === void 0 || _rulerRef$current3.operateLine(rect);\n        }\n        forceUpdateTransformer();\n      });\n    };\n    operateLine();\n    var cb = dataContext.addDataChangeListener(operateLine);\n    return function () {\n      cb();\n    };\n  }, [activedSelectId, scale, rootId, forceUpdateTransformer]);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.on('align-shapes', function (_ref11) {\n      var type = _ref11.type,\n        ids = _ref11.ids;\n      var shapes = dataContext.findControl(ids);\n      // 这里直接拿属性就好了\n      console.log(\"shapes\", shapes, ids, type);\n      switch (type) {\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_TOP:\n          {\n            var changeProperty = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.Y, Math.min.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return shape[_constants__WEBPACK_IMPORTED_MODULE_41__.Y];\n            })));\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], changeProperty];\n            })));\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_VERTICAL_CENTER:\n          {\n            var _changeProperty2 = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.Y, (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.toRoundFix)((Math.min.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return shape[_constants__WEBPACK_IMPORTED_MODULE_41__.Y];\n            })) + Math.max.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return shape[_constants__WEBPACK_IMPORTED_MODULE_41__.Y] + shape[_constants__WEBPACK_IMPORTED_MODULE_41__.HEIGHT];\n            }))) / 2, _constants__WEBPACK_IMPORTED_MODULE_41__.PRECISION));\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.Y, (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.toRoundFix)(_changeProperty2[_constants__WEBPACK_IMPORTED_MODULE_41__.Y] - shape[_constants__WEBPACK_IMPORTED_MODULE_41__.HEIGHT] / 2, _constants__WEBPACK_IMPORTED_MODULE_41__.PRECISION))];\n            })));\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_VERTICAL_DISTRIBUTION:\n          {\n            distributionShapes(shapes, dataContext, _constants__WEBPACK_IMPORTED_MODULE_41__.Y, _constants__WEBPACK_IMPORTED_MODULE_41__.HEIGHT);\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_HORIZONTAL_DISTRIBUTION:\n          {\n            distributionShapes(shapes, dataContext, _constants__WEBPACK_IMPORTED_MODULE_41__.X, _constants__WEBPACK_IMPORTED_MODULE_41__.WIDTH);\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_HORIZONTAL_CENTER:\n          {\n            var _changeProperty4 = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.X, (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.toRoundFix)((Math.max.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return shape[_constants__WEBPACK_IMPORTED_MODULE_41__.X] + shape[_constants__WEBPACK_IMPORTED_MODULE_41__.WIDTH];\n            })) + Math.min.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return shape[_constants__WEBPACK_IMPORTED_MODULE_41__.X];\n            }))) / 2, _constants__WEBPACK_IMPORTED_MODULE_41__.PRECISION));\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.X, (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.toRoundFix)(_changeProperty4[_constants__WEBPACK_IMPORTED_MODULE_41__.X] - shape[_constants__WEBPACK_IMPORTED_MODULE_41__.WIDTH] / 2, _constants__WEBPACK_IMPORTED_MODULE_41__.PRECISION))];\n            })));\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_RIGHT:\n          {\n            var maxRight = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default()(shapes).call(shapes, function (res, shape) {\n              var currentRight = shape[_constants__WEBPACK_IMPORTED_MODULE_41__.X] + shape[_constants__WEBPACK_IMPORTED_MODULE_41__.WIDTH];\n              if (currentRight > res) {\n                return currentRight;\n              }\n              return res;\n            }, 0);\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.X, shape[_constants__WEBPACK_IMPORTED_MODULE_41__.X] + (maxRight - (shape[_constants__WEBPACK_IMPORTED_MODULE_41__.X] + shape[_constants__WEBPACK_IMPORTED_MODULE_41__.WIDTH])))];\n            })));\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_BOTTOM:\n          {\n            var maxBottom = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_19___default()(shapes).call(shapes, function (res, shape) {\n              var currentRight = shape[_constants__WEBPACK_IMPORTED_MODULE_41__.Y] + shape[_constants__WEBPACK_IMPORTED_MODULE_41__.HEIGHT];\n              if (currentRight > res) {\n                return currentRight;\n              }\n              return res;\n            }, 0);\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.Y, shape[_constants__WEBPACK_IMPORTED_MODULE_41__.Y] + (maxBottom - (shape[_constants__WEBPACK_IMPORTED_MODULE_41__.Y] + shape[_constants__WEBPACK_IMPORTED_MODULE_41__.HEIGHT])))];\n            })));\n            break;\n          }\n        case _constants__WEBPACK_IMPORTED_MODULE_41__.SHAPE_ALIGN_LEFT:\n        default:\n          {\n            var _changeProperty6 = (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({}, _constants__WEBPACK_IMPORTED_MODULE_41__.X, Math.min.apply(null, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return shape[_constants__WEBPACK_IMPORTED_MODULE_41__.X];\n            })));\n            dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.createUpdateAction)(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_13___default()(shapes).call(shapes, function (shape) {\n              return [shape[_constants__WEBPACK_IMPORTED_MODULE_41__.ID], _changeProperty6];\n            })));\n            break;\n          }\n      }\n    });\n    return function () {\n      designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.eventBus.off('align-shapes');\n    };\n  }, []);\n  var scrollCallbackRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)([]);\n  var canvasResizeCallbackRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)([]);\n  var handleCanvasScroll = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function (e) {\n    var _context25;\n    var _e$currentTarget = e.currentTarget,\n      scrollLeft = _e$currentTarget.scrollLeft,\n      scrollTop = _e$currentTarget.scrollTop;\n    yRulerDomRef.current.style.transform = \"translateX(\".concat(-scrollLeft + 'px', \")\");\n    xRulerDomRef.current.style.transform = \"translateY(\".concat(-scrollTop + 'px', \")\");\n    _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_12___default()(_context25 = scrollCallbackRef.current).call(_context25, function (cb) {\n      cb && cb({\n        scrollLeft: scrollLeft,\n        scrollTop: scrollTop\n      });\n    });\n  }, []);\n  var containerHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(height, scale);\n  var containerWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(width, scale);\n  var rulerContainerHeight = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(Math.max(height, marginTop + marginBottom), scale);\n  var rulerContainerWidth = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(Math.max(width, marginLeft + marginRight), scale);\n  var _getRedundancyXY4 = getRedundancyXY(),\n    redundancyX = _getRedundancyXY4.x,\n    redundancyY = _getRedundancyXY4.y;\n  var _useEditor = (0,_hooks_useEditor__WEBPACK_IMPORTED_MODULE_44__[\"default\"])({\n      offsetTop: (_canvasBoxRef$current = (_canvasBoxRef$current2 = canvasBoxRef.current) === null || _canvasBoxRef$current2 === void 0 ? void 0 : _canvasBoxRef$current2.offsetTop) !== null && _canvasBoxRef$current !== void 0 ? _canvasBoxRef$current : 0,\n      offsetLeft: (_canvasBoxRef$current3 = (_canvasBoxRef$current4 = canvasBoxRef.current) === null || _canvasBoxRef$current4 === void 0 ? void 0 : _canvasBoxRef$current4.offsetLeft) !== null && _canvasBoxRef$current3 !== void 0 ? _canvasBoxRef$current3 : 0,\n      marginLeft: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginLeft, scale),\n      marginTop: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginTop, scale),\n      definition: definition,\n      dataContext: dataContext,\n      id: id\n    }),\n    showEditor = _useEditor.showEditor,\n    hideEditor = _useEditor.hideEditor,\n    editorElement = _useEditor.editorElement,\n    setEditorPosition = _useEditor.setEditorPosition,\n    inputNodeRef = _useEditor.inputNodeRef;\n\n  // TODO:\n  // offsetTop操作页面会变更\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_30__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    var resizeHandle = function resizeHandle() {\n      // TOTEST\n      if (canvasLayerRef.current && canvasBoxRef.current) {\n        var _ref16 = canvasBoxRef.current || {},\n          offsetLeft = _ref16.offsetLeft,\n          offsetTop = _ref16.offsetTop;\n        canvasLayerRef.current.position({\n          x: (offsetLeft !== null && offsetLeft !== void 0 ? offsetLeft : 0) - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING,\n          y: (offsetTop !== null && offsetTop !== void 0 ? offsetTop : 0) - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING\n        });\n      }\n      // forceUpdate(n => n + 1)\n    };\n    window.addEventListener('resize', resizeHandle);\n    return function () {\n      window.removeEventListener('resize', resizeHandle);\n    };\n  }, [setEditorPosition]);\n  var rulerRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useMemo)(function () {\n    return {\n      current: {\n        operateLine: function operateLine() {\n          var _xRulerRef$current, _yRulerRef$current;\n          for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n            args[_key] = arguments[_key];\n          }\n          (_xRulerRef$current = xRulerRef.current) === null || _xRulerRef$current === void 0 || _xRulerRef$current.operateLine.apply(_xRulerRef$current, args);\n          (_yRulerRef$current = yRulerRef.current) === null || _yRulerRef$current === void 0 || _yRulerRef$current.operateLine.apply(_yRulerRef$current, args);\n        },\n        hideLine: function hideLine() {\n          var _xRulerRef$current2, _yRulerRef$current2;\n          (_xRulerRef$current2 = xRulerRef.current) === null || _xRulerRef$current2 === void 0 || _xRulerRef$current2.hideLine();\n          (_yRulerRef$current2 = yRulerRef.current) === null || _yRulerRef$current2 === void 0 || _yRulerRef$current2.hideLine();\n        }\n      }\n    };\n  }, []);\n  // 这里的refLineRef是旧值\n  var getContainerDomScroll = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function () {\n    var _containerDomRef$curr3, _containerDomRef$curr4, _containerDomRef$curr5, _containerDomRef$curr6;\n    return {\n      scrollTop: (_containerDomRef$curr3 = (_containerDomRef$curr4 = containerDomRef.current) === null || _containerDomRef$curr4 === void 0 ? void 0 : _containerDomRef$curr4.scrollTop) !== null && _containerDomRef$curr3 !== void 0 ? _containerDomRef$curr3 : 0,\n      scrollLeft: (_containerDomRef$curr5 = (_containerDomRef$curr6 = containerDomRef.current) === null || _containerDomRef$curr6 === void 0 ? void 0 : _containerDomRef$curr6.scrollLeft) !== null && _containerDomRef$curr5 !== void 0 ? _containerDomRef$curr5 : 0\n    };\n  }, []);\n  var getBackgroundImageSize = (0,react__WEBPACK_IMPORTED_MODULE_30__.useCallback)(function (imageWidth, imageHeight) {\n    console.log('getBackgroundImageSize----------');\n    var bgImageSize = {\n      width: 0,\n      height: 0\n    };\n    if (imageWidth > width) {\n      bgImageSize = {\n        width: width,\n        height: imageHeight * width / imageWidth\n      };\n    } else {\n      bgImageSize = {\n        width: imageWidth,\n        height: imageHeight\n      };\n    }\n    return bgImageSize;\n  }, [width, height, scale]);\n  var rulerWidth = width,\n    rulerHeight = height; // not here + 20, after convert\n  // TODO: useMemo\n  var globalTrRef = (0,react__WEBPACK_IMPORTED_MODULE_30__.useRef)(null);\n  var lastedSelectItem = dataContext.findControl(activedSelectId) || {};\n  var enabledAnchorsProp = (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.getEnabledAnchorsProp)(lastedSelectItem, appState.data.bizType);\n  var gloalTransformerProps = _objectSpread({\n    isGlobal: true,\n    stageRef: stageRef,\n    rootControlRef: rootControlRef,\n    selectedId: activedSelectId,\n    parentId: lastedSelectItem === null || lastedSelectItem === void 0 ? void 0 : lastedSelectItem.parentId,\n    ref: globalTrRef,\n    controlGroupRef: controlGroupRef,\n    isCell: (0,_utils_grid__WEBPACK_IMPORTED_MODULE_51__.isGridRelativeControl)(lastedSelectItem),\n    isSelected: activedSelectId !== rootId,\n    isLastSelected: activedSelectId !== rootId,\n    dataContext: dataContext,\n    refLineRef: refLineRef\n  }, enabledAnchorsProp);\n  var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_30__.useMemo)(function () {\n    var _canvasBoxRef$current5, _canvasBoxRef$current6, _canvasBoxRef$current7, _canvasBoxRef$current8;\n    return {\n      refLineRef: refLineRef,\n      rulerRef: rulerRef,\n      stageRef: stageRef,\n      rootControlRef: rootControlRef,\n      xRulerRef: xRulerRef,\n      yRulerRef: yRulerRef,\n      showEditor: showEditor,\n      globalTrRef: globalTrRef,\n      pageHeight: pageHeight,\n      pageWidth: pageWidth,\n      pixelRatio: pixelRatio,\n      setMessage: setMessage,\n      hideEditor: hideEditor,\n      setEditorPosition: setEditorPosition,\n      marginLeft: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginLeft, scale),\n      marginTop: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginTop, scale),\n      selectionContext: selectionContext,\n      navToolRef: navToolRef,\n      canvasAbsolutePosRef: canvasAbsolutePosRef,\n      deleteSelectionControl: deleteSelectionControl,\n      // 这里需要考虑尺子\n      // 而且不能直接赋值，得手动获取\n      getContainerDomScroll: getContainerDomScroll,\n      canvasBoxRef: canvasBoxRef,\n      rulerWidth: _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n      offsetTop: ((_canvasBoxRef$current5 = (_canvasBoxRef$current6 = canvasBoxRef.current) === null || _canvasBoxRef$current6 === void 0 ? void 0 : _canvasBoxRef$current6.offsetTop) !== null && _canvasBoxRef$current5 !== void 0 ? _canvasBoxRef$current5 : 0) + _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n      offsetLeft: ((_canvasBoxRef$current7 = (_canvasBoxRef$current8 = canvasBoxRef.current) === null || _canvasBoxRef$current8 === void 0 ? void 0 : _canvasBoxRef$current8.offsetLeft) !== null && _canvasBoxRef$current7 !== void 0 ? _canvasBoxRef$current7 : 0) + _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n      dataContext: dataContext,\n      isNeedDashBorder: false,\n      scrollCallbackRef: scrollCallbackRef,\n      scale: scale,\n      contextStrokeEnabled: contextStrokeEnabled,\n      containerDomRef: containerDomRef,\n      getRedundancyXY: getRedundancyXY,\n      rootId: rootId,\n      getInputSize: getInputSize,\n      getTextSize: getTextSize,\n      controlGroupRef: controlGroupRef,\n      dataFactory: dataFactory,\n      dragGroupRef: dragGroupRef,\n      globalConfig: globalConfig,\n      sizeAndPixelRatioChangeCbRef: sizeAndPixelRatioChangeCbRef,\n      forceUpdateTransformer: forceUpdateTransformer,\n      canvasResizeCallbackRef: canvasResizeCallbackRef,\n      handlePassGridActionGuide: handlePassGridActionGuide,\n      isFirstUseGrid: isFirstUseGrid,\n      onValid: onValid\n    };\n  }, [rulerRef, showEditor, pageHeight, pageWidth, pixelRatio, setMessage, hideEditor, setEditorPosition, marginLeft, marginTop, deleteSelectionControl, getContainerDomScroll, _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH, scale, contextStrokeEnabled, getRedundancyXY, rootId, getInputSize, getTextSize, dataFactory, globalConfig, handlePassGridActionGuide, isFirstUseGrid, onValid]);\n  var canvasSelectContextValue = (0,react__WEBPACK_IMPORTED_MODULE_30__.useMemo)(function () {\n    return {\n      activedSelectId: activedSelectId,\n      isMultiKeyActiveWhenSelectedRef: isMultiKeyActiveWhenSelectedRef\n    };\n  }, [activedSelectId]);\n  (0,react__WEBPACK_IMPORTED_MODULE_30__.useEffect)(function () {\n    canvasRef.current = stageRef.current;\n  }, [stageRef.current]);\n  console.log(\"pageHeight, pageWidth\", pageHeight, pageWidth, width, height);\n  var rulerStyle = {\n    position: 'absolute',\n    zIndex: 1,\n    backgroundColor: '#ffffff'\n  };\n  // direction x 为竖直尺子\n  // TODO: 下一步性能优化: 选中控件拖拽的连贯动作,复用?画布缓存?\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement((react__WEBPACK_IMPORTED_MODULE_30___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()(\"\".concat(printDesignerPrefixCls, \"-canvas-ruler\"), \"\".concat(printDesignerPrefixCls, \"-canvas-ruler-x\")),\n    style: _objectSpread(_objectSpread({}, rulerStyle), {}, {\n      width: _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n      height: rulerContainerHeight + _constants__WEBPACK_IMPORTED_MODULE_41__.RULER_REDUNDANCY + _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH\n    }),\n    ref: xRulerDomRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Stage, {\n    width: _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n    height: rulerContainerHeight + _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH + _constants__WEBPACK_IMPORTED_MODULE_41__.RULER_REDUNDANCY\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__[\"default\"], {\n    direction: \"x\",\n    scale: scale,\n    marginLeft: marginLeft,\n    marginTop: marginTop,\n    marginRight: marginRight,\n    marginBottom: marginBottom,\n    pageSize: {\n      width: width,\n      height: height\n    },\n    dataContext: dataContext,\n    ref: xRulerRef\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-canvas-and-ruler\"),\n    ref: canvasAbsolutePosRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-lock\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_25__.Icon, {\n    type: \"lock\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()(\"\".concat(printDesignerPrefixCls, \"-canvas-ruler\"), \"\".concat(printDesignerPrefixCls, \"-canvas-ruler-y\")),\n    style: _objectSpread(_objectSpread({}, rulerStyle), {}, {\n      width: rulerContainerWidth + _constants__WEBPACK_IMPORTED_MODULE_41__.RULER_REDUNDANCY + _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n      height: _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH\n    }),\n    ref: yRulerDomRef\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Stage, {\n    width: rulerContainerWidth + _constants__WEBPACK_IMPORTED_MODULE_41__.RULER_REDUNDANCY + _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH,\n    height: _components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__.RULER_WIDTH\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_printRuler__WEBPACK_IMPORTED_MODULE_38__[\"default\"], {\n    direction: \"y\",\n    scale: scale,\n    marginLeft: marginLeft,\n    marginTop: marginTop,\n    marginRight: marginRight,\n    marginBottom: marginBottom,\n    pageSize: {\n      width: width,\n      height: height\n    },\n    dataContext: dataContext,\n    ref: yRulerRef\n  }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()(\"\".concat(printDesignerPrefixCls, \"-canvas-container\"), \"\".concat(printDesignerPrefixCls, \"-shadow-canvas-container\")),\n    id: \"printDesignerCanvasContainer\",\n    ref: function ref(node) {\n      if (node) {\n        // containerRef(node)\n        containerDomRef.current = node;\n      }\n    }\n    // 会导致闪烁不如直接DOM操作\n    // style={calcCanvasPosition(canvasContainerWidth, canvasContainerHeight, realCanvasPageWidth, realCanvasPageHeight)}\n    ,\n    onScroll: handleCanvasScroll\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-canvas-container-border-left\")\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-canvas-container-border-top\")\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_26___default()(\"\".concat(printDesignerPrefixCls, \"-canvas-box\"), \"\".concat(printDesignerPrefixCls, \"-shadow-canvas-box\")),\n    ref: canvasBoxRef,\n    style: {\n      position: 'relative',\n      height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageHeight, scale),\n      width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageWidth, scale),\n      paddingLeft: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginLeft, scale),\n      paddingRight: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginRight, scale),\n      paddingTop: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginTop, scale),\n      paddingBottom: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginBottom, scale),\n      boxSizing: 'content-box'\n      // boxSizing: 'border-box',\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-canvas-paper\"),\n    ref: canvasPageRef,\n    onDragOver: handleDragOver,\n    onDrop: handleDrop,\n    style: {\n      width: Math.ceil(realCanvasPageWidth),\n      height: Math.ceil(realCanvasPageHeight)\n    },\n    tabIndex: -1\n    // onKeyDown={handleCanvasKeyDown}\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    className: \"\".concat(printDesignerPrefixCls, \"-shadow-input\"),\n    ref: shdowInputRef\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"canvas\", {\n    ref: shadowCanvasRef,\n    style: {\n      display: 'none'\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(\"div\", {\n    id: \"shadowCanvas\",\n    style: {\n      display: 'none'\n    }\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Stage, {\n    ref: stageRef,\n    className: \"\".concat(printDesignerPrefixCls, \"-paper\")\n    // canvas 宽高只能是整数\n    ,\n    width: Math.ceil(realCanvasPageWidth),\n    height: Math.ceil(realCanvasPageHeight),\n    scale: {\n      x: Math.ceil(realCanvasPageWidth) / realCanvasPageWidth,\n      y: Math.ceil(realCanvasPageHeight) / realCanvasPageHeight\n    },\n    onMouseDown: handleDrawRegionMouseDown,\n    onMouseMove: handleDrawRegionMouseMove,\n    onMouseUp: handleDrawRegionMouseUp,\n    onDrop: handleStageDrop\n    // onKeyDown={handleCanvasKeyDown}\n    // 据说会优化性能, 官方文档\n    // 但是滚轮缩放后会更模糊...\n    // 没用\n    // pixelRatio={pixelRatio}\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_context__WEBPACK_IMPORTED_MODULE_42__.PrintRootContext.Provider, {\n    value: contextValue\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_context__WEBPACK_IMPORTED_MODULE_42__.CanvasSelectContext.Provider, {\n    value: canvasSelectContextValue\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Layer, {\n    ref: canvasLayerRef,\n    x: ((_canvasBoxRef$current9 = (_canvasBoxRef$current10 = canvasBoxRef.current) === null || _canvasBoxRef$current10 === void 0 ? void 0 : _canvasBoxRef$current10.offsetLeft) !== null && _canvasBoxRef$current9 !== void 0 ? _canvasBoxRef$current9 : 0) - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING,\n    y: ((_canvasBoxRef$current11 = (_canvasBoxRef$current12 = canvasBoxRef.current) === null || _canvasBoxRef$current12 === void 0 ? void 0 : _canvasBoxRef$current12.offsetTop) !== null && _canvasBoxRef$current11 !== void 0 ? _canvasBoxRef$current11 : 0) - _constants__WEBPACK_IMPORTED_MODULE_41__.CANVAS_PADDING\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Rect, {\n    id: \"\".concat(id, \"_outter\"),\n    ref: rootControlOutterRef,\n    name: \"\".concat(id, \"_outter_rect\"),\n    x: 0,\n    y: 0,\n    width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(width, scale),\n    height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(height, scale),\n    draggable: false\n    // listening={false}\n    ,\n    strokeWidth: 1,\n    fill: '#ffffff',\n    shadowColor: '#000',\n    shadowBlur: 10,\n    shadowOpacity: .1,\n    shadowOffset: {\n      x: 0,\n      y: 2\n    }\n    // 阴影有些奇怪\n    ,\n    shadowEnabled: true\n    // shadowEnabled={false}\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_baseImage__WEBPACK_IMPORTED_MODULE_32__[\"default\"], {\n    key: backgroundImgSrc,\n    id: 'unique_draw_background',\n    ref: backgroundRef,\n    getImageSize: getBackgroundImageSize,\n    src: backgroundImgSrc,\n    scale: scale\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Group, {\n    x: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginLeft, scale),\n    ref: controlGroupRef,\n    name: \"\".concat(id, \"_group\"),\n    y: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginTop, scale)\n    // ref={}\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Rect, {\n    id: \"\".concat(id),\n    ref: rootControlRef,\n    name: \"\".concat(id, \"_dotted_rect\")\n    // x={calculatorMMtoPx(marginLeft, scale)}\n    // y={calculatorMMtoPx(marginTop, scale)}\n    ,\n    width: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageWidth, scale),\n    height: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(pageHeight, scale),\n    draggable: false\n    // fill={'#ffffff'}\n    // listening={false}\n    // dash={[3, 3]}\n    ,\n    dash: [2.5, 2.5],\n    stroke: '#D9D9D9',\n    dashEnabled: true\n  }), (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.toArray)(children, {\n    context: contextValue\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_controlTransformer__WEBPACK_IMPORTED_MODULE_34__[\"default\"], (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({}, gloalTransformerProps, {\n    key: \"global-transformer\"\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(react_konva__WEBPACK_IMPORTED_MODULE_31__.Rect, {\n    key: 'unique_draw_region',\n    id: 'unique_draw_region',\n    ref: drawRegionRef,\n    x: DRAW_REGION_RECT_INIT_VAL,\n    y: DRAW_REGION_RECT_INIT_VAL,\n    height: DRAW_REGION_RECT_INIT_VAL,\n    width: DRAW_REGION_RECT_INIT_VAL,\n    visible: false\n    // fill={'white'}\n    ,\n    stroke: '#0E5FD8',\n    strokeWidth: 1,\n    shadowForStrokeEnabled: false,\n    strokeScaleEnabled: false,\n    hitStrokeWidth: 0,\n    alpha: 1,\n    strokeEnabled: true\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_refLine__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {\n    dataContext: dataContext,\n    marginTop: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginTop, scale),\n    marginLeft: (0,_utils_index__WEBPACK_IMPORTED_MODULE_52__.calculatorMMtoPx)(marginLeft, scale),\n    getRedundancyXY: getRedundancyXY,\n    controlGroupRef: controlGroupRef,\n    key: \"unique_refline\",\n    rootControlRef: rootControlRef,\n    ref: refLineRef,\n    stageRef: stageRef,\n    selectedId: activedSelectId,\n    selectionContext: selectionContext\n  }))))))), editorElement)), gridData.show && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_gridGuide__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {\n    meta: meta,\n    controlType: gridData.controlType,\n    transferData: gridData.transferData,\n    definition: definition,\n    visible: gridData.show,\n    onCancel: onGridGuideCancel,\n    onSelect: onSelect,\n    activedSelectId: activedSelectId\n  }), gridSetting.show && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_gridSettings__WEBPACK_IMPORTED_MODULE_36__[\"default\"], {\n    meta: meta,\n    definition: definition,\n    visible: gridSetting.show,\n    onCancel: onCancel,\n    onConfirm: onConfirm\n  }), cardSetting.show && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_cardSetting__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {\n    meta: meta,\n    definition: definition,\n    visible: cardSetting.show,\n    onCancel: onCardCancel,\n    onConfirm: onCardConfirm\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_30___default().createElement(_components_common_changeLangModal__WEBPACK_IMPORTED_MODULE_33__[\"default\"], {\n    meta: meta,\n    definition: definition,\n    visible: langData.show,\n    onCancel: onLangUnSave,\n    onConfirm: onLangSave,\n    onClose: onLangCancel\n  }));\n}));\n/* harmony default export */ __webpack_exports__[\"default\"] = ((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_27__.ErrorBoundaryWrap)(PrintRoot, 'print-main-view'));\n\n//# sourceURL=webpack://print-designer/./src/views/center/root.tsx?");

/***/ }),

/***/ 44780:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   getOuterCellsData: function() { return /* binding */ getOuterCellsData; },\n/* harmony export */   getSelectionColIds: function() { return /* binding */ getSelectionColIds; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21980);\n/* harmony import */ var _constants_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98092);\n\n\n\n\n\n\n\nfunction getSelectionColIds(dataContext, selection) {\n  // 只能选择表格单元格时处理\n  var maybeCellData = dataContext.findControl(selection[0]);\n  if (!(0,_utils_grid__WEBPACK_IMPORTED_MODULE_5__.isGridRelativeControl)(maybeCellData) && !(0,_utils_grid__WEBPACK_IMPORTED_MODULE_5__.isSubGridRelativeControl)(maybeCellData)) {\n    return [];\n  }\n  // 选择的单元格id一定是从第一行开始排序，而且是一行一行顺序排序，可以用来获得有几列\n  var selectionColIds = [maybeCellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.COLUMN_ID]];\n  var index = 1;\n  while (index < selection.length) {\n    var cellData = dataContext.findControl(selection[index]);\n    if (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(selectionColIds).call(selectionColIds, cellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.COLUMN_ID])) {\n      // 找到重复的，说明列已经找完了\n      break;\n    }\n    selectionColIds.push(cellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.COLUMN_ID]);\n    index++;\n  }\n  return selectionColIds;\n}\nfunction getOuterCellsData(dataContext, selection, selectionColIds) {\n  var _dataContext$findCont, _dataContext$getParen;\n  var firstColId = selectionColIds[0];\n  var lastColId = selectionColIds[selectionColIds.length - 1];\n  var firstRowId = dataContext.findControl(selection[0])[_constants_index__WEBPACK_IMPORTED_MODULE_6__.ROW_ID];\n  var lastRowId = (_dataContext$findCont = dataContext.findControl(selection[selection.length - 1])) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont[_constants_index__WEBPACK_IMPORTED_MODULE_6__.ROW_ID];\n  var pushOuterCellToData = function pushOuterCellToData(cellData, outerCellsData) {\n    if (firstRowId === cellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.ROW_ID]) {\n      outerCellsData.firstRowCells.push(cellData);\n    }\n    if (lastRowId === cellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.ROW_ID]) {\n      outerCellsData.lastRowCells.push(cellData);\n    }\n    if (firstColId === cellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.COLUMN_ID]) {\n      outerCellsData.firstColCells.push(cellData);\n    }\n    if (lastColId === cellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.COLUMN_ID]) {\n      outerCellsData.lastColCells.push(cellData);\n    }\n  };\n  var outerCellsData = {\n    firstRowCells: [],\n    lastRowCells: [],\n    firstColCells: [],\n    lastColCells: []\n  };\n  var gridData = ((_dataContext$getParen = dataContext.getParentControl) === null || _dataContext$getParen === void 0 ? void 0 : _dataContext$getParen.call(dataContext, firstColId)) || {};\n  var mergeConfig = gridData.mergeConfig;\n  if (!(0,_utils_grid__WEBPACK_IMPORTED_MODULE_5__.hasMergeCell)(mergeConfig)) {\n    outerCellsData = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(selection).call(selection, function (acc, cellId) {\n      var cellData = dataContext.findControl(cellId);\n      pushOuterCellToData(cellData, acc);\n      return acc;\n    }, outerCellsData);\n  } else {\n    var firstCellPostion = getFirstCellPostion(dataContext, selection);\n    var colLen = selectionColIds.length;\n    var rowLen = selection.length / colLen;\n    var selectionMergeConfig = getSelectionMergeConfig(mergeConfig, firstCellPostion, rowLen, colLen);\n    var rowIndex = 0;\n    var index = 0;\n    while (index < selection.length) {\n      // 控制行的遍历\n      var colInedx = 0;\n      while (colInedx < colLen && index < selection.length) {\n        var _context;\n        // 控制列的遍历\n        var cellData = dataContext.findControl(selection[index]);\n        pushOuterCellToData(cellData, outerCellsData);\n        var firstCellRowIndex = firstCellPostion.rowIndex,\n          firstCellColIndex = firstCellPostion.colIndex;\n        var cellMergeConfig = selectionMergeConfig[_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_3___default()(_context = \"\".concat(firstCellRowIndex + rowIndex, \"_\")).call(_context, firstCellColIndex + colInedx)];\n        if (cellMergeConfig) {\n          var rowLength = cellMergeConfig.rowLength,\n            columnLength = cellMergeConfig.columnLength;\n          if (rowIndex + rowLength === rowLen) {\n            outerCellsData.lastRowCells.push(cellData);\n          }\n          if (colInedx + columnLength === colLen) {\n            outerCellsData.lastColCells.push(cellData);\n          }\n        }\n        index++;\n        colInedx++;\n      }\n      rowIndex++;\n    }\n  }\n  return outerCellsData;\n}\nfunction getFirstCellPostion(dataContext, selection) {\n  var firstCellData = dataContext.findControl(selection[0]);\n  var firstCellRowId = firstCellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.ROW_ID];\n  var rowIndex = -1;\n  var maybeRowData = dataContext.findControl(firstCellRowId);\n  while (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(_constants_index__WEBPACK_IMPORTED_MODULE_6__.GRID_ROW_TYPES).call(_constants_index__WEBPACK_IMPORTED_MODULE_6__.GRID_ROW_TYPES, (_maybeRowData = maybeRowData) === null || _maybeRowData === void 0 ? void 0 : _maybeRowData.type)) {\n    var _maybeRowData, _dataContext$getPrevS;\n    maybeRowData = (_dataContext$getPrevS = dataContext.getPrevSibling(maybeRowData.id)) === null || _dataContext$getPrevS === void 0 ? void 0 : _dataContext$getPrevS.control;\n    rowIndex++;\n  }\n  var firstCellColId = firstCellData[_constants_index__WEBPACK_IMPORTED_MODULE_6__.COLUMN_ID];\n  var colIndex = -1;\n  var maybeColData = dataContext.findControl(firstCellColId);\n  while (_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_1___default()(_constants_index__WEBPACK_IMPORTED_MODULE_6__.GRID_COLUMN_TYPES).call(_constants_index__WEBPACK_IMPORTED_MODULE_6__.GRID_COLUMN_TYPES, (_maybeColData = maybeColData) === null || _maybeColData === void 0 ? void 0 : _maybeColData.type)) {\n    var _maybeColData, _dataContext$getPrevS2;\n    maybeColData = (_dataContext$getPrevS2 = dataContext.getPrevSibling(maybeColData.id)) === null || _dataContext$getPrevS2 === void 0 ? void 0 : _dataContext$getPrevS2.control;\n    colIndex++;\n  }\n  return {\n    rowIndex: rowIndex,\n    colIndex: colIndex\n  };\n}\nfunction getSelectionMergeConfig(mergeConfig, firstCellPostion, rowLen, colLen) {\n  var _context2;\n  var firstCellRowIndex = firstCellPostion.rowIndex,\n    firstCellColIndex = firstCellPostion.colIndex;\n  return _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_2___default()(_context2 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4___default()(mergeConfig)).call(_context2, function (acc, key) {\n    var _key$split = key.split('_'),\n      _key$split2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_key$split, 2),\n      rowIndex = _key$split2[0],\n      colIndex = _key$split2[1];\n    var rowIndexNum = Number(rowIndex);\n    var colIndexNum = Number(colIndex);\n    if (rowIndexNum >= firstCellRowIndex && rowIndexNum < firstCellRowIndex + rowLen && colIndexNum >= firstCellColIndex && colIndexNum < firstCellColIndex + colLen) {\n      acc[key] = mergeConfig[key];\n    }\n    return acc;\n  }, {});\n}\n\n//# sourceURL=webpack://print-designer/./src/views/center/utils/controlBorder.ts?");

/***/ }),

/***/ 33408:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75984);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(39568);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(12388);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(36324);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(84945);\n\n\n\n\n\n\n\n\n\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_0___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context8 = ownKeys(Object(t), !0)).call(_context8, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_4___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_3___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_2___default()(_context9 = ownKeys(Object(t))).call(_context9, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_5___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_1___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\nvar Panel = _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__.Collapse.Panel;\nvar getControlList = function getControlList(meta) {\n  var Categories = meta.Categories,\n    Controls = meta.Controls;\n  return _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(Categories).call(Categories, function (item) {\n    var Id = item.Id;\n    var controls = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(Controls).call(Controls, function (control) {\n      return control.CategoryId === Id;\n    });\n    return _objectSpread(_objectSpread({}, item), {}, {\n      Controls: controls\n    });\n  });\n};\nvar ControlView = function ControlView(props) {\n  var _props$meta = props.meta,\n    meta = _props$meta === void 0 ? [] : _props$meta;\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.ConfigContext),\n    getPrefixCls = _useContext.getPrefixCls;\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(_context__WEBPACK_IMPORTED_MODULE_19__.PrintDesignerContext),\n    prefixCls = _useContext2.prefixCls;\n  var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_18__.useRef)(null);\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(''),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState, 2),\n    searchVal = _useState2[0],\n    setSearchVal = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(function () {\n      return getControlList(meta);\n    }),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState3, 2),\n    originControlList = _useState4[0],\n    setOriginalList = _useState4[1];\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(originControlList),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState5, 2),\n    controlList = _useState6[0],\n    setControlList = _useState6[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.SelectionContext);\n  var _useActivedSelectedId = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.useActivedSelectedId)({\n      dataContext: dataContext,\n      selectionContext: selectionContext\n    }),\n    activedSelectId = _useActivedSelectedId.activedSelectId;\n  var _useContext3 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.GlobalConfigContext),\n    getOutlineItemIcon = _useContext3.getOutlineItemIcon,\n    enableSearch = _useContext3.enableSearch,\n    env = _useContext3.env,\n    keywordMapping = _useContext3.keywordMapping;\n  // TODO: custom prefixCls\n  var leftViewPrefixCls = getPrefixCls(prefixCls, 'left-view');\n\n  // getLangMsg(`leftView.${key}`)\n  // 这里直接props下发\n  var _useContext4 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.DataFactoryContext),\n    dataFactory = _useContext4.dataFactory,\n    controlMetaInfo = _useContext4.controlMetaInfo;\n  var context = {\n    getOutlineItemIcon: getOutlineItemIcon,\n    createControlData: dataFactory\n  };\n  var _useMemo = (0,react__WEBPACK_IMPORTED_MODULE_18__.useMemo)(function () {\n      var _dataContext$findCont, _dataContext$findCont2, _context;\n      if (((_dataContext$findCont = dataContext.findControl((_dataContext$findCont2 = dataContext.findControl(activedSelectId)) === null || _dataContext$findCont2 === void 0 ? void 0 : _dataContext$findCont2.parentId)) === null || _dataContext$findCont === void 0 ? void 0 : _dataContext$findCont.type) === 'SubDataGrid') {\n        return {\n          isContainer: false,\n          accept: ''\n        };\n      }\n      var ctrl = dataContext.findControl(activedSelectId);\n      if (!_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12___default()(_context = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_9___default()(controlMetaInfo)).call(_context, ctrl.type)) {\n        return {\n          isContainer: false,\n          accept: ''\n        };\n      }\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getControlIsContainer)(controlMetaInfo, ctrl, keywordMapping);\n    }, [activedSelectId]),\n    isContainer = _useMemo.isContainer,\n    acceptList = _useMemo.accept;\n  var isChildEmpty = (0,react__WEBPACK_IMPORTED_MODULE_18__.useMemo)(function () {\n    return !!acceptList && !controlList.length;\n  }, [acceptList, controlList]);\n  var filteredControlList = (0,react__WEBPACK_IMPORTED_MODULE_18__.useMemo)(function () {\n    var _context2;\n    if (!searchVal) return controlList;\n    return _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context2 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(controlList).call(controlList, function (containerData) {\n      var _context3;\n      if (containerData.Id === 'HiddenControl') return null;\n      var controls = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context3 = containerData.Controls).call(_context3, function (control) {\n        var _context4;\n        return _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_13___default()(_context4 = control.Name).call(_context4, searchVal) !== -1;\n      });\n      if (controls.length === 0) return null;\n      return _objectSpread(_objectSpread({}, containerData), {}, {\n        Controls: controls\n      });\n    })).call(_context2, Boolean);\n  }, [searchVal, controlList]);\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useEffect)(function () {\n    setOriginalList(function () {\n      return getControlList(meta);\n    });\n  }, [meta]);\n  (0,react__WEBPACK_IMPORTED_MODULE_18__.useEffect)(function () {\n    setControlList(function () {\n      var _context5;\n      if (!acceptList) return originControlList;\n      var acceptControls = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context5 = _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(originControlList).call(originControlList, function (containerData) {\n        var _context6;\n        if (containerData.Id === 'HiddenControl') return null;\n        var controls = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_10___default()(_context6 = containerData.Controls).call(_context6, function (control) {\n          return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_12___default()(acceptList).call(acceptList, control.Id);\n        });\n        if (controls.length === 0) return null;\n        return _objectSpread(_objectSpread({}, containerData), {}, {\n          Controls: controls\n        });\n      })).call(_context5, Boolean);\n      return acceptControls;\n    });\n  }, [acceptList, originControlList]);\n  var handleControlSearch = (0,react__WEBPACK_IMPORTED_MODULE_18__.useCallback)(function () {\n    var _inputRef$current;\n    var value = (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.value;\n    setSearchVal(value);\n  }, [meta, controlList]);\n  if (isChildEmpty) {\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n      className: \"\".concat(leftViewPrefixCls, \"-props-empty\")\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"img\", {\n      className: \"\".concat(leftViewPrefixCls, \"-props-empty-img\"),\n      src: _print_assets_images_property_empty_png__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n      width: \"168\",\n      height: \"96\",\n      alt: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0104')\n    }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n      className: \"\".concat(leftViewPrefixCls, \"-props-empty-desc\")\n    }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0002')));\n  }\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(leftViewPrefixCls, \"-control-tabs\")\n  }, enableSearch && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(leftViewPrefixCls, \"-control-search\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__.Input, {\n    className: \"\".concat(leftViewPrefixCls, \"-control-search-input\"),\n    ref: inputRef,\n    placeholder: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.getLangMsg)('printd.grid.key0097'),\n    borderType: \"bordered\",\n    onChange: _.debounce(handleControlSearch, 250),\n    allowClear: true,\n    suffix: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n      onClick: handleControlSearch\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__.Icon, {\n      type: \"search\"\n    }))\n  })), _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(filteredControlList).call(filteredControlList, function (containerData) {\n    var _context7;\n    if (containerData.Id === 'HiddenControl') return null;\n    return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__.Collapse, {\n      animatable: false,\n      name: \"Collapse\",\n      key: containerData.Id,\n      defaultActiveKey: containerData.Id,\n      expandIconPosition: \"right\",\n      className: \"\".concat(leftViewPrefixCls, \"-collapse\")\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(Panel, {\n      header: containerData.Name,\n      panelKey: containerData.Id\n    }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n      className: \"\".concat(leftViewPrefixCls, \"-pane\")\n    }, _babel_runtime_corejs3_core_js_stable_instance_map__WEBPACK_IMPORTED_MODULE_11___default()(_context7 = (containerData === null || containerData === void 0 ? void 0 : containerData.Controls) || []).call(_context7, function (control) {\n      return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(ControlViewItem, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n        key: control.Id\n      }, control, context, {\n        className: leftViewPrefixCls,\n        activedSelectId: activedSelectId,\n        isContainer: isContainer,\n        env: env\n      }));\n    }))));\n  }));\n};\nvar ControlViewItem = function ControlViewItem(props) {\n  var type = props.Id,\n    name = props.Name,\n    createControlData = props.createControlData,\n    className = props.className,\n    getOutlineItemIcon = props.getOutlineItemIcon,\n    activedSelectId = props.activedSelectId,\n    isContainer = props.isContainer,\n    env = props.env,\n    tips = props.Tips,\n    _props$Visible = props.Visible,\n    visible = _props$Visible === void 0 ? true : _props$Visible;\n  var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_18__.useState)(false),\n    _useState8 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(_useState7, 2),\n    tooltipVisible = _useState8[0],\n    setToolTipVisible = _useState8[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_18__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.SelectionContext);\n  var rootId = dataContext.getRootId();\n  // 拖拽暂时不加\n  // TODO:\n  var handleClick = (0,react__WEBPACK_IMPORTED_MODULE_18__.useCallback)(function () {\n    // TODO: 偏移信息功能加到afterAddControl里\n    var newControl = createControlData({\n      type: type,\n      parentId: isContainer ? activedSelectId : rootId\n    });\n    dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.createAddAction)(newControl)).then(function (actions) {\n      var realControl = actions[0].value;\n      selectionContext.setSelect(_babel_runtime_corejs3_core_js_stable_array_is_array__WEBPACK_IMPORTED_MODULE_14___default()(realControl) ? [realControl[0].id] : [realControl.id]);\n    });\n  }, [type, activedSelectId]);\n  var onDragStart = (0,react__WEBPACK_IMPORTED_MODULE_18__.useCallback)(function (e) {\n    var dragData = {\n      type: 'control',\n      data: props\n    };\n    env[designer_base_Main__WEBPACK_IMPORTED_MODULE_17__.CONTROL_DRAG_DATA] = dragData;\n    setToolTipVisible(false);\n  }, [props]);\n  var onVisibleChange = (0,react__WEBPACK_IMPORTED_MODULE_18__.useCallback)(function (visible) {\n    setToolTipVisible(visible);\n  }, []);\n  // {props.Id}:\n  return visible ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-control\")\n  }, tips ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_15__.Tooltip, {\n    placement: \"right\",\n    tip: tips || '',\n    visible: tooltipVisible,\n    onVisibleChange: onVisibleChange\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-control-content\"),\n    draggable: true,\n    onDragStart: onDragStart,\n    onClick: handleClick\n  }, getOutlineItemIcon(type), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    title: props.Name\n  }, props.Name))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"div\", {\n    className: \"\".concat(className, \"-control-content\"),\n    draggable: true,\n    onDragStart: onDragStart,\n    onClick: handleClick\n  }, getOutlineItemIcon(type), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default().createElement(\"span\", {\n    title: props.Name\n  }, props.Name))) : null;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ControlView);\n\n//# sourceURL=webpack://print-designer/./src/views/left/controlView.tsx?");

/***/ }),

/***/ 49008:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   DataSourceView: function() { return /* binding */ DataSourceView; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30112);\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80284);\n/* harmony import */ var _babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28220);\n/* harmony import */ var _babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30260);\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95992);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(81744);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(45076);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(47976);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39448);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(18860);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(55748);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7312);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(54120);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(63808);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(45040);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(54116);\n/* harmony import */ var _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(45548);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _components_common_dataSource__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(21920);\n/* harmony import */ var _hooks_useScrollKey__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(98724);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(84945);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(71252);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _utils_index__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(41232);\n/* harmony import */ var _utils_dataSource__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(32064);\n/* harmony import */ var _utils_control__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87524);\n/* harmony import */ var _utils_treeUtil__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(77620);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(98092);\n\n\n\n\n\nvar _excluded = [\"title\"];\nfunction ownKeys(e, r) { var t = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default()(e); if ((_babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6___default())) { var o = _babel_runtime_corejs3_core_js_stable_object_get_own_property_symbols__WEBPACK_IMPORTED_MODULE_6___default()(e); r && (o = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_7___default()(o).call(o, function (r) { return _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8___default()(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(_context4 = ownKeys(Object(t), !0)).call(_context4, function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(e, r, t[r]); }) : (_babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default()) ? _babel_runtime_corejs3_core_js_stable_object_define_properties__WEBPACK_IMPORTED_MODULE_11___default()(e, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptors__WEBPACK_IMPORTED_MODULE_10___default()(t)) : _babel_runtime_corejs3_core_js_stable_instance_for_each__WEBPACK_IMPORTED_MODULE_9___default()(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _babel_runtime_corejs3_core_js_stable_object_define_property__WEBPACK_IMPORTED_MODULE_12___default()(e, r, _babel_runtime_corejs3_core_js_stable_object_get_own_property_descriptor__WEBPACK_IMPORTED_MODULE_8___default()(t, r)); }); } return e; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// import { getLangMsg } from '../../../../locale/locale'\nvar Panel = _kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Collapse.Panel;\nvar dsTypeMap = {\n  // Statistic: ['Sys', 'Entry', 'Approveline', 'Approveactivit', 'Attach'], // 合计行不做限制\n  // Detail: ['Entry', 'Approveline', 'Workflow', 'Attach', 'Custom'], // 数据行\n  Normal: ['Sys', 'Head', 'Import', 'Main'] // 标题行\n};\n// 这里有个问题： 不在Node层而是Node.Editor层导致没能拿到relation相关键值\n// TODO:\nvar DataSourceView = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_16__.memo)(function (props) {\n  var _props$meta = props.meta,\n    meta = _props$meta === void 0 ? [] : _props$meta;\n  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(false),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState, 2),\n    showDefinitionId = _useState2[0],\n    setShowDefinitionId = _useState2[1];\n  var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(true),\n    _useState4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState3, 2),\n    showDataSourceTitle = _useState4[0],\n    setShowDataSourceTitle = _useState4[1];\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.SelectionContext);\n  var printDesignerContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(_context__WEBPACK_IMPORTED_MODULE_22__.PrintDesignerContext);\n  var setMessage = printDesignerContext.setMessage,\n    _printDesignerContext = printDesignerContext.definition,\n    definition = _printDesignerContext === void 0 ? {} : _printDesignerContext,\n    prefixCls = printDesignerContext.prefixCls;\n  var leftViewPrefixCls = \"\".concat(prefixCls, \"-left-view\");\n  var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(false),\n    _useState6 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(_useState5, 2),\n    errorShow = _useState6[0],\n    setErrorShow = _useState6[1];\n  // getLangMsg(`leftView.${key}`)\n  // 这里直接props下发\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.GlobalConfigContext),\n    handleOpenCustomDsModal = _useContext.handleOpenCustomDsModal,\n    handleOpenRefDsModal = _useContext.handleOpenRefDsModal,\n    keywordMapping = _useContext.keywordMapping;\n  var rootId = dataContext.getRootId();\n  var _dataContext$findCont = dataContext.findControl(rootId),\n    language = _dataContext$findCont.language;\n  var isPrintTemplate = (0,_utils_index__WEBPACK_IMPORTED_MODULE_24__.isPrintModelIsTemplate)(dataContext); // 是否是模板库\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_16__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.DataFactoryContext),\n    dataFactory = _useContext2.dataFactory,\n    modelFactory = _useContext2.modelFactory,\n    controlMetaInfo = _useContext2.controlMetaInfo;\n  var _useActivedSelectedId = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.useActivedSelectedId)({\n      dataContext: dataContext,\n      selectionContext: selectionContext\n    }),\n    activedSelectId = _useActivedSelectedId.activedSelectId;\n  var scrollToKey = (0,_hooks_useScrollKey__WEBPACK_IMPORTED_MODULE_21__.useScrollKey)({\n    dataContext: dataContext,\n    selectionContext: selectionContext,\n    meta: meta,\n    activedSelectId: activedSelectId,\n    modelFactory: modelFactory\n  });\n  var createControlData = dataFactory;\n  var _useMemo = (0,react__WEBPACK_IMPORTED_MODULE_16__.useMemo)(function () {\n      var _dataContext$findCont2, _dataContext$findCont3;\n      if (((_dataContext$findCont2 = dataContext.findControl((_dataContext$findCont3 = dataContext.findControl(activedSelectId)) === null || _dataContext$findCont3 === void 0 ? void 0 : _dataContext$findCont3.parentId)) === null || _dataContext$findCont2 === void 0 ? void 0 : _dataContext$findCont2.type) === 'SubDataGrid') {\n        return {\n          isContainer: false,\n          accept: ''\n        };\n      }\n      return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getControlIsContainer)(controlMetaInfo, dataContext.findControl(activedSelectId), keywordMapping);\n    }, [activedSelectId, controlMetaInfo]),\n    isContainer = _useMemo.isContainer,\n    accept = _useMemo.accept;\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_16__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_16__.useEffect)(function () {\n    // const callback = ({ value: newSelectedIds }) => {\n    //   forceUpdate(n => n + 1)\n    // }\n    // const subscribe = selectionContext.addSelectChangeListener(callback)\n    var dataSubscribe = dataContext.addDataChangeListener(function (_ref) {\n      var type = _ref.type;\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    });\n    return function () {\n      // subscribe && subscribe()\n      dataSubscribe && dataSubscribe();\n    };\n  }, []);\n  // TODO: 增加子数据表格选中支持, 比较复杂暂时不处理\n  var onSelect = function onSelect(checked, node, event) {\n    var _context, _context2;\n    designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.console.log('dataSourceView--------', node);\n    var rootId = dataContext.getRootId();\n    var _dataContext$findCont4 = dataContext.findControl(rootId),\n      pageHeight = _dataContext$findCont4.height;\n    var lastSelectedId = lodash__WEBPACK_IMPORTED_MODULE_18___default().last(_babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_13___default()(_context = [rootId]).call(_context, (0,_babel_runtime_corejs3_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(selectionContext.getSelection())));\n    var selectControl = dataContext.findControl(lastSelectedId);\n    var _node$type = node.type,\n      type = _node$type === void 0 ? 'Text' : _node$type,\n      Items = node.Items,\n      _node$InitAttr = node.InitAttr,\n      InitAttr = _node$InitAttr === void 0 ? {} : _node$InitAttr,\n      isDataGridDs = node.isDataGridDs,\n      dsType = node.dsType,\n      isSubDataGridDs = node.isSubDataGridDs;\n    if (Items) {\n      return;\n    }\n    // InitAttr 平铺\n    var dataSourceObj = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_25__.specialHandle)(node, definition);\n    var title = dataSourceObj.title,\n      _initAttr = (0,_babel_runtime_corejs3_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(dataSourceObj, _excluded);\n    var initAttr = (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_14___default()(_context2 = _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_5___default()(InitAttr)).call(_context2, function (res, key) {\n      res[lodash__WEBPACK_IMPORTED_MODULE_18___default().camelCase(key)] = InitAttr[key];\n      // 这里约定好由前端处理\n      return res;\n    }, {}), _initAttr);\n    if (selectControl) {\n      var controlType = selectControl.type,\n        parentId = selectControl.parentId,\n        id = selectControl.id,\n        cellType = selectControl.cellType;\n      var cardGridDataSource = (0,_utils_dataSource__WEBPACK_IMPORTED_MODULE_25__.geGridDataSource)(dataContext, id, 'CardGrid');\n      if (cardGridDataSource) {\n        var cardFieldDataSource = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_27__.filterCardFieldDataSourceByDsType)(cardGridDataSource, definition);\n        var include = (0,_utils_treeUtil__WEBPACK_IMPORTED_MODULE_27__.includeDataSource)(cardFieldDataSource, dataSourceObj === null || dataSourceObj === void 0 ? void 0 : dataSourceObj.dataSource);\n        if (!include) {\n          return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0095'));\n        }\n      }\n      if (controlType === 'Text') {\n        var _dataContext$findCont5 = dataContext.findControl(parentId),\n          _type = _dataContext$findCont5.type,\n          _cellType = _dataContext$findCont5.cellType,\n          PParentId = _dataContext$findCont5.parentId;\n        if (_type === 'DataCell' && _cellType === 'Detail') {\n          var _context3;\n          var _dataContext$findCont6 = dataContext.findControl(PParentId),\n            parentType = _dataContext$findCont6.type,\n            dataSource = _dataContext$findCont6.dataSource;\n          var DsTypes = ['Entry', 'ReportEntry', 'Subentry', 'Workflow', 'Report', 'Approveline', 'Sys'];\n          var isRow = _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(_context3 = ['=getGroupRowNumber()', '=getRowNumber()']).call(_context3, initAttr.bindField);\n          var isSameDataSource = dataSource && (initAttr.dataSource === dataSource || !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(DsTypes).call(DsTypes, initAttr.dsType));\n          if (parentType === 'DataGrid' && !(isRow || isSameDataSource || !dataSource && isDataGridDs)) {\n            return setMessage((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0037'));\n          }\n        }\n        return dataContext.batchUpdateControlPropertyValues((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.createUpdateAction)([[lastSelectedId, _objectSpread(_objectSpread({}, initAttr), {}, {\n          viewText: \"=$\".concat(title)\n        })]]));\n      }\n      if (controlType === 'DataCell') {\n        return (0,_utils_control__WEBPACK_IMPORTED_MODULE_26__.handleDropInTextInDataCell)(node, selectControl, dataContext, {\n          initAttr: initAttr,\n          title: title\n        }, setMessage, definition);\n      }\n      if (controlType === 'LayoutCell') {\n        return (0,_utils_control__WEBPACK_IMPORTED_MODULE_26__.handleDropTextInLayoutCell)(id, dataContext, _objectSpread(_objectSpread({}, initAttr), {}, {\n          viewText: \"=$\".concat(title)\n        }));\n      }\n    }\n    if (type === 'Text') {\n      var newTextControl = createControlData({\n        type: type,\n        parentId: isContainer ? lastSelectedId : rootId,\n        transferData: {\n          bindText: title\n        }\n      });\n      var positionInfo = showDataSourceTitle ? {\n        x: (+newTextControl.x || 0) + (+newTextControl.width || 0)\n      } : {};\n      var newTextFieldControl = createControlData({\n        type: type,\n        parentId: isContainer ? lastSelectedId : rootId,\n        transferData: (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, initAttr, _objectSpread(_objectSpread({}, positionInfo), {}, {\n          // 这里写死了\n          viewText: \"=$\".concat(title)\n        }))\n      });\n      var newControls = showDataSourceTitle ? [newTextControl, newTextFieldControl] : [newTextFieldControl];\n      dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.createAddAction)(newControls, {\n        addType: 'addField'\n      })).then(function () {\n        selectionContext.setSelect(showDataSourceTitle ? [newTextControl.id, newTextFieldControl.id] : [newTextFieldControl.id]);\n      });\n    } else {\n      if (type === _constants__WEBPACK_IMPORTED_MODULE_28__.COMMON_CONTROL_TYPE_MAP.richText) {\n        //仅处理富文本不满足\n        if (isContainer && accept && !_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_15___default()(accept).call(accept, type)) return;\n      }\n      var newControl = createControlData({\n        type: type,\n        parentId: isContainer ? lastSelectedId : rootId,\n        transferData: initAttr\n      });\n      dataContext.addControl((0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.createAddAction)(newControl)).then(function () {\n        selectionContext.setSelect([newControl.id]);\n      });\n    }\n  };\n  designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.console.log('renderView DataSourceView');\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_23___default()(leftViewPrefixCls, \"\".concat(leftViewPrefixCls, \"-datasource\"))\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_23___default()(\"\".concat(leftViewPrefixCls, \"-datasource-header\"))\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_23___default()(\"\".concat(leftViewPrefixCls, \"-datasource-action\"), {\n      'hide': isPrintTemplate\n    })\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    onClick: handleOpenRefDsModal\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"guanlian\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"span\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0099'))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    onClick: handleOpenCustomDsModal\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"tianjia\"\n  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"span\", null, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0100')))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_components_common_dataSource__WEBPACK_IMPORTED_MODULE_20__[\"default\"], {\n    draggable: true,\n    scrollToKey: scrollToKey,\n    meta: meta,\n    definition: definition,\n    onSelect: onSelect,\n    showDefinitionId: showDefinitionId,\n    showDataSourceTitle: showDataSourceTitle\n  })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(\"div\", {\n    className: \"\".concat(leftViewPrefixCls, \"-datasource-checkbox\")\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Checkbox, {\n    checked: showDefinitionId,\n    onChange: function onChange(e) {\n      var newVal = !!e.target.checked;\n      setShowDefinitionId(newVal);\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0101')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Checkbox, {\n    checked: showDataSourceTitle,\n    onChange: function onChange(e) {\n      var newVal = !!e.target.checked;\n      setShowDataSourceTitle(newVal);\n    }\n  }, (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0102'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Tooltip, {\n    placement: \"right\",\n    tip: (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0103'),\n    style: {\n      marginLeft: '5px'\n    }\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default().createElement(_kdcloudjs_kdesign__WEBPACK_IMPORTED_MODULE_17__.Icon, {\n    prefix: \"printdesignericon\",\n    type: \"tishixinxi\"\n  })))));\n});\nDataSourceView.getTabName = function () {\n  return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_19__.getLangMsg)('printd.grid.key0111');\n};\nDataSourceView.tabKey = 'dataSource';\n/* harmony default export */ __webpack_exports__[\"default\"] = (DataSourceView);\n\n//# sourceURL=webpack://print-designer/./src/views/left/dataSourceView.tsx?");

/***/ }),

/***/ 26364:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20008);\n/* harmony import */ var _controlView__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33408);\n/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(84945);\n\n\n\n\n\n\nvar PrintOutline = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(function (props) {\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n    getPrefixCls = _useContext.getPrefixCls;\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(_context__WEBPACK_IMPORTED_MODULE_4__.PrintDesignerContext),\n    prefixCls = _useContext2.prefixCls;\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_0__.DataContext);\n  var leftViewPrefixCls = getPrefixCls(prefixCls, 'left-view');\n  var rootId = dataContext.getRootId();\n  var language = dataContext.findControl(rootId).language;\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n    var dataSubscribe = dataContext.addDataChangeListener(function (_ref) {\n      var type = _ref.type;\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    });\n    return function () {\n      dataSubscribe && dataSubscribe();\n    };\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_controlView__WEBPACK_IMPORTED_MODULE_3__[\"default\"], props);\n});\nPrintOutline.tabKey = 'ControlView';\nPrintOutline.getTabName = function () {\n  return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_0__.getLangMsg)('printd.grid.key0106');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PrintOutline);\n\n//# sourceURL=webpack://print-designer/./src/views/left/printOutline.tsx?");

/***/ }),

/***/ 19268:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   PrintSettingView: function() { return /* binding */ PrintSettingView; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80284);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_2__);\n\n/*\n * @Author: fjr\n * @Email: jinrui_fang@kingdee.com\n * @Date: 2021-08-02 15:36:17\n * @Last Modified by: fjr\n * @LastEditTime: 2021-10-25 10:41:42\n * @Description: ...\n */\n\n\n\n// TODO: 应该跟系统的是成一套的，而不是独立\nvar PrintSettingView = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().memo(function (props) {\n  var _props$meta = props.meta,\n    meta = _props$meta === void 0 ? {} : _props$meta,\n    _props$data = props.data,\n    data = _props$data === void 0 ? {} : _props$data;\n  // 这里需要data中有meta的类型\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.SelectionContext);\n  var rootId = dataContext.getRootId();\n  var _useActivedSelectedId = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.useActivedSelectedId)({\n      dataContext: dataContext,\n      selectionContext: selectionContext\n    }),\n    activedSelectId = _useActivedSelectedId.activedSelectId;\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n    var dataSubscribe = dataContext.addDataChangeListener(function (_ref) {\n      var type = _ref.type;\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    });\n    return function () {\n      dataSubscribe && dataSubscribe();\n    };\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.PropertyView, (0,_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n    id: rootId,\n    key: activedSelectId || rootId\n  }));\n});\nPrintSettingView.tabKey = 'PrintSetting';\nPrintSettingView.getTabName = function () {\n  return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_2__.getLangMsg)('printd.grid.key0107');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PrintSettingView);\n\n//# sourceURL=webpack://print-designer/./src/views/right/printSettingView.tsx?");

/***/ }),

/***/ 3192:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82600);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18040);\n/* harmony import */ var designer_base_Main__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(43400);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21980);\n\n\n\n\n\nvar DataRowPropertyGroup = function DataRowPropertyGroup(_ref) {\n  var _ref$meta = _ref.meta,\n    meta = _ref$meta === void 0 ? {} : _ref$meta;\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.SelectionContext);\n  var selection = selectionContext.getSelection();\n  var globalConfig = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.GlobalConfigContext);\n  var selectControls = dataContext.findControlByCondition(function (item) {\n    return _babel_runtime_corejs3_core_js_stable_instance_includes__WEBPACK_IMPORTED_MODULE_0___default()(selection).call(selection, item.id);\n  });\n  var isSelectDataRow = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_3__.getSelectionIsDataRow)(dataContext, selectControls);\n  var dataRowId = isSelectDataRow ? selectControls[0].rowId : '';\n  var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.DataFactoryContext),\n    modelFactory = _useContext.modelFactory;\n  var _useSelectModel = (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.useSelectModel)({\n      dataContext: dataContext,\n      selectionContext: selectionContext,\n      solidId: dataRowId,\n      meta: meta,\n      activedSelectId: '',\n      modelFactory: modelFactory,\n      globalConfig: globalConfig\n    }),\n    modelData = _useSelectModel.modelData,\n    field = _useSelectModel.field;\n  var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.ConfigContext),\n    getPrefixCls = _useContext2.getPrefixCls,\n    prefixCls = _useContext2.prefixCls;\n  var rightViewPrefixCls = getPrefixCls(prefixCls, 'right-view');\n  var properties = (0,_utils_grid__WEBPACK_IMPORTED_MODULE_3__.filterGroupProperties)(isSelectDataRow, dataRowId, dataContext, modelData);\n  return isSelectDataRow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.PropertyViewItemGroup, {\n    modelData: properties,\n    PropertyViewItemRender: designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.PropertyViewItem,\n    className: rightViewPrefixCls,\n    field: field\n  });\n};\n\n// TODO: 应该跟系统的是成一套的，而不是独立\nvar PrintPropertyView = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().memo(function (props) {\n  var _props$meta = props.meta,\n    meta = _props$meta === void 0 ? {} : _props$meta;\n  var dataContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.DataContext);\n  var selectionContext = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.SelectionContext);\n  var forceUpdate = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(0)[1];\n  (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n    var selectionSubscribe = selectionContext.addSelectChangeListener(function () {\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    });\n    var dataSubscribe = dataContext.addDataChangeListener(function (_ref2) {\n      var type = _ref2.type;\n      forceUpdate(function (n) {\n        return n + 1;\n      });\n    });\n    return function () {\n      dataSubscribe && dataSubscribe();\n      selectionSubscribe && selectionSubscribe();\n    };\n  }, []);\n  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.PropertyView, {\n    meta: meta\n  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(DataRowPropertyGroup, {\n    meta: meta\n  }));\n});\nPrintPropertyView.tabKey = 'PropertyView';\nPrintPropertyView.getTabName = function () {\n  return (0,designer_base_Main__WEBPACK_IMPORTED_MODULE_1__.getLangMsg)('printd.grid.key0108');\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PrintPropertyView);\n\n//# sourceURL=webpack://print-designer/./src/views/right/propertyView.tsx?");

/***/ }),

/***/ 19600:
/***/ (function() {

eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://print-designer/./src/style/index.less?");

/***/ }),

/***/ 36324:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (__webpack_require__.p + \"images/b7faef5a0338c01e97e8b6d7d8f7511f.png\");\n\n//# sourceURL=webpack://print-designer/./assets/images/property-empty.png?");

/***/ }),

/***/ 12492:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAABgCAYAAACJ8DltAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAqKADAAQAAAABAAAAYAAAAACo6b7MAAADyUlEQVR4Ae2dP2vUYBzHn1QRoRQcRK9SXERQFwfxRfgmHJ0cuohOenUTFwcnwaVvwlfgJA66KIiLHHh1cCkt4mBMaofL3TWN3KX5ffP9HBR6Se7J98+HJ5e7cEmJBwmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQAAmQQGcJZJ3tueUd53l+ZvRj72me0t2U5+st724pw+/sjLdu37w6XMpgPRlkpSc+ZmwcwJnnD1XgLA3keXry7sOX4YwZ4wW9BfRg5hQsFkirpfUWUKWZs1oJM+lkHv0FdNKl4P/MpP9KA9DA8AJpSgAaGNBSmjukABocUHdIAVQAUGdIAVQEUFdIAVQIUEdIAVQMUDdIAVQQUCdIAVQUUBdIAVQYUAdIe3u53bfxbnG9yOxjPB7PLpxaMhgMppbEf3p5sNbLLplB47NnrRBAreuPbx5A43dkrRBAreuPbx5A43dkrRBAreuPbx5A43dkrRBAreuPb/50fInLVaj4IfxyE9AajRlUqy87tQBqV7mWYQDV6stOLYDaVa5lGEC1+rJTa3cW3+Ryu8gUuH0K0ctrCEvAFrke9H8A/Tg6m16/PZd+7lcPRjtfP9UO8+D+rdr1i67cfrNfGSLL0tbnF6vDykKBJ9VUBQRHkzgPzmgaSz3lL5Rc29wbRtRWpwlA69JpsG565mzwks42UYQUQDvDpZsdq0Fqd5LUDRbt7fX5y/eVwZu8tz2ENCm8J7UD1O0suELvxBMVSDnET5Tm9m8JaXTPABq9IXN9AGoOQHT7ABq9IXN9AGoOQHT7dmfxy/8u/lL0jqX12QEq3dYc8U0+95zzMplFHOJlqvIUCqCevcu4BlCZqjyF8h60pd4vXrleO/L09Zq1GxuvtAOU7+K1aOcQr9WXnVoAtatcyzCAavVlpxZA7SrXMgygWn3ZqQVQu8q1DAOoVl92agHUrnItwwCq1ZedWgC1q1zLMIBq9WWnFkDtKtcyDKBafdmpBVC7yrUMA6hWX3ZqAdSuci3DAKrVl51aALWrXMswgGr1ZacWQO0q1zIMoFp92akFULvKtQwDqFZfdmoB1K5yLcMAqtWXnVoAtatcy3B/f/omy74X9/9b76qO4+7VedK6jvutqJPW03R/vZ1Bi7vkbjcNge3iJtBbQDcurD7OsuxZKmfSFh/n11ocvPWhs1Hru1hwB709xBdw/i6yeXT4t2BMR7/8xuavOyn9eVXcT3jj6K0irslGp7KVexGVoYkESIAESIAESIAESIAESIAESIAESIAESIAESIAEnBL4C2BywrT3uwIUAAAAAElFTkSuQmCC\");\n\n//# sourceURL=webpack://print-designer/./assets/images/save.png?");

/***/ }),

/***/ 25812:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./assets/images/search.png?");

/***/ }),

/***/ 8565:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./assets/images/warning-solid.png?");

/***/ }),

/***/ 24708:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAAB4CAYAAADMtn8nAAAJWElEQVR4Xu2dQZbbOAxEJ0fp+x8qR5l5sdoZmzH9q0jJ2fzs0hJlGQRQhQIk//j6+vr3nxf/fv78+ePXn+/H7/+/nzquG4+P59Hx8Rbaz6P7oe9J95ten+77/jl03uw4rWuvn9pl1z4zvxnvN/W3q75nus8zf03vn+Ih3ecftIFX3VC6oWnC2DX8roOmdmodr72v9vq0/6Ojpt+THHQ3AK76nrt+dJZ9DOBvBrGaKMiAn0JIA/iwQJpoZgG4uz71IwP421KrAZRmZjpv9fNpHX0uHT/7+qljt4lEBD5K0JRBtva9ny+FniA1BYoIvOegUuhn+xnAgxhHAbiLdAawAfyYhK4WfWdMSQQWgd92IRSx3ieqEQisga2Bbxb4FMJbA3dMguxlABvABvCbBDarnUksosCj9arQA1VNDbJqWGvgDFlSx25FFlXozP6rJYoqNCA9JYBPUdw2cEicm9VshGztfRjABnDVR9udoNl10LT2aQOsva/2+iJwF2hkr9QPKMERgIjAIvDTrLsIfFhgFwgMYEUsRSxFrGkXYky09oHtA9sHfogKEXhIETNKoQq9VnultRGdN04OSaGl0E+iE4kvBrAB/Jg02lHEq8Q6EVgEfquet45HiZBU0VmiFIEPy6RMJQUcRSxFLEWsILDaRLib6AxgJ7GeuMlq5qd1Vzl2ywSozzmruVMEu+p7SqGl0FLoFwh6NoIZwIcFbCPZRrKNZBvpTzGAKFeakUmEWT1OGZyoqrPQnYqe7rcU+nhLLPnf3Z4isAgsAovAIvBVyEFMZlddTde396GItcdQRGBfKxs9zWUAd4FG9koTOSU4A9gANoAfakkKvLO0FAPYQQ4HOQoRh5CqnTizD2wf2D6wfWBUkaXQQJEpM9tGev7xutlk1Pj3syiik1i+2D2q8dL+467Kmjo2JQ46vpuYxuunteGufdJ9uMqO6feUQkuhpdBSaCk0Ic3u8V2kcxKra7+IwM+/w20NbA18i4ldapiul0IfFiB7pSWAAWwARw5F/U1ySEUsfxvp5XB2SqnIAVePS6FVoX/5wNmlmAjsIIeDHEFgUQJeVdtVoVWhVaFVoWtkbzWG+/k+TujjhD5O+AA6IrAILAKLwCLwrrhA66mGovX2ge0DP2JV+15r20i2kWwjBWKXTyN9Ze/oaTOKbaQOwdL2BDGLVXW2FVnIH8b+cotgV31Pa2BrYGtga2Br4NUaNM3MdN7q59M6+lw6fvb1ncRaY0K7DIIYSrrPtpFsI9lGso3kWymvqlHb2pMQ3Br4GTsJ6ej4zJ60TgRWhVaFVoX2p1VW+7mr61qEFIEPC6S1+kxF3l2fdk1SJiYCi8Afdew2kZCD7opAbSI0gMuAoQ1PM9rsvLbGaDdw9fq0rnU8smP7vayBrYFfZn7KuHR8lpEN4GcKeXaCSBNAm0hW9zuloG0iTL+ngxxDJM42RARe6z8awGsIagBLoZ/6pYpYXQJKE7YInI0u3+3pIIeDHA5yPIC6FFoK7Sy0s9DOQlOtt3ucRJDV69M6+lw6fvb109pQESvrR6clAIl86T5LoaXQUmgptLPQaeYlhKXjaWam8+7HReBOjCN7pX4gApeqOBl+lyKmG0cBSscpMGm9gxxrbaizVXQD2AB+OVBjAL/+DaI2gad2nCVESrQGsAFsAPs0kk8jrQ5krK5LM/unrp8i026JcTYFbe2Yfk/7wPaB7QPbB7YP3NYQu5lzF2EUsbrfvx3y/G+Hv8qOInBZc1JApJRqdt5ugBMFW70+raPPpeNnXz91bNpPSqDpfhvAzkLffGXX0Wn9p2rUNnAoAdhGso30Uv1sZfE0I4vAhwX+NjK1iYT8QQr9PEDS2vd+vqOUjlI6SvmQTagUoJIjTbSU4IgBGsDfFlilwqvrWoq7mpnJARylPCyb2illjAYwBNZuAMyoWxsoBnA3Q3x2ALR+QMi5WqrNNIU2MbT+JwKLwLd+derYrYMRRbQGtgZ+OzBBGZAyOK0XgUXgxyQ0liSt/7QJUgQWgUVga+D/cxBRJjqe1qaEnOlxOq/NoKl4QZ9Lx+m+aP2sZiP7twixut9X2TEtFVShB0+YbUgqaqyKC7uOTuul0FJoKXQhorSZkQKQkIrWG8AGsAFsAP/2gTRBUWKhxCSFfqaIZE86PrMnraMSg9YrYiliKWIpYiliteJOi5BXXz8Vd9r7IISZiWaKWD6NdPONlIKs1rKr6wzg5+eGVyloa8c0UaWlzG4CogSX+q8PM/gwgw8zPESjAWwbyVfq+EodZIAicPmGkJZCEYWRQttGso1kG8k20tANUMRSxFLECkS8cfh+JsqMf08DjCjirgikiHVYQBFLEUsRSxHLHzdLkalFjrb/2l4/1Qba+xCB9zQC0mCcxHISy0msotQYE9huCUAJzgAGlZqQigyoCr2HMLsBQPs3GxChWt8+sH1g+8D2ge0DryJgmpnpvNXPp3X0uXT87OtbA3dMguyVaiFSaAc5brFODjWr3WwjHZahhEjHZ1Sd1hnABrABXATgbqJTxBoCLjUIIcjq8V2qqojVUc90v1MKSvuniPUdcKlBW0qQbuhqgBKFIQeg9QawAfyo144lSes/o5/T+vv5TmI5ieUk1kMk2kayjWQbyTZSLY6JwF/vfyG+FTGIwkihpdBS6BPaIKs1sjXwEYBpYmsRgjSRgaj9RqxUc6H9U8RSxFr67SVC7tbx2sBpr28Ad0yC7JUmIEpwqR8pYiliKWIpYvk4YZp5W4QUgQ8LEPJRKbW7Pm17pn4gAjuJ9VHHbhMJOag1sL8PvFSjzhxn10HTzCsC+17oXz5ACc4a2OeBowSXUsvdBHc2BW0TYfo9HeRwkMNBjgBhpNBS6Ahh0sy/izBS6PeDNOk+XGVHEbgUjSgg0g0ldXH1OFEwqkGcxOr6p+l+G8C+F/rmKxSABrCTWImftH6UJiBFrJIRtBSKNk4EFoEf63gfJxxUjdUAImS1jXRYwFfqPNvhrFJMBP62pAH8GuHILmkCM4AN4KcZ2pbTp6LGambcdXRaL4WWQkuhT5hxXQ1wQioDeK9PSQndPvCefe/282kkn0byaaSHbOIk1pBaZ0W9FLqjoKk4QsxiPJ6q8+N+tQwl3e+//T0NYAPYUUpHKXEOgUoMSpBSaFC7yYCKWB2DEIG7UVPyPwPYAPadWMHEXhpIf2uQ4z+vbQmifPTi6wAAAABJRU5ErkJggg==\");\n\n//# sourceURL=webpack://print-designer/./src/components/base/barCode/default.png?");

/***/ }),

/***/ 42700:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./src/components/base/image/default.png?");

/***/ }),

/***/ 97264:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACEAQMAAABrihHkAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAAKZJREFUeNrN1UEKxSAMBNABD+D9b+kBAmkm0dr/oUuZWij4Ng3JaOEONEO83ProAxBLGJeR0H18QLjhHlgVCiXLa1ki7bhMtf31X4Hn9GqOx8WbZTtiMS5iCQrJ586zUlDJjRIZ3pleoTxGGFtALdGwSvcjUVJBNisnODMmlTzYtN1DraDadV9/R6VVfHm4X2T9rGwn6qCsq4/H+xOyL34fcvlbQysXaMC43QnP9IEAAAAASUVORK5CYII=\");\n\n//# sourceURL=webpack://print-designer/./src/components/base/qrCode/image/DataMatrix.png?");

/***/ }),

/***/ 45896:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAABCAQMAAAChJZwKAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAAKVJREFUeNpj+J/br25jNifhR/Hyy3vkv8kdYKCpyKpzRs4SJ3mOn1hEc5Feyw8GlxPO+7bP9qe9yOwzZvkSB/eknX1Ac5Gej00Gbgy/eNjPHaa5SJ/LGaPJCQ8L3ILyaS7Ss1jCjCfhB0/bwTaai/SmsRkIVxxLT/+UT3ORvn6Q7Tc3tB+cQ3ORXr0yk2aJSzxpE9JoLtIn5GBwRuGxQZvmN9qKAAAoFDTTdduhGwAAAABJRU5ErkJggg==\");\n\n//# sourceURL=webpack://print-designer/./src/components/base/qrCode/image/PDF417.png?");

/***/ }),

/***/ 41480:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACAAQMAAAD58POIAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAANVJREFUeNq1lUEOhCAMRUtYuPQIPYo3c5zMxTwKR3DJwsyflmJG9/yGGHguKp/PV+BVVpF1alOhgFNEpvKquk3FpgsJzDgNAF9/HlSwtsEGCWTQJIy2N03ZoPvDwcMwY8FVusmzhgIc1rk0oHv7DgYwCXNVY6nKkuPkxgM7m1g5AHYWEFRzBN7WXGYSMAnPSAd7lUPT8SDKks4uVZeQAMLayQeQTUIK6HmKuKP/gGWDHn1AVYdM4P4wTW3BBCk2lw8hgZ6nvrlmQQq4fuL6qbrfUnso+AFlA+5pQALjxgAAAABJRU5ErkJggg==\");\n\n//# sourceURL=webpack://print-designer/./src/components/base/qrCode/image/QRCode.png?");

/***/ }),

/***/ 89920:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./src/components/guide/resource/control.png?");

/***/ }),

/***/ 1024:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (__webpack_require__.p + \"images/10a6246291a0d3b504113bd071fd58d0.png\");\n\n//# sourceURL=webpack://print-designer/./src/components/guide/resource/datasource.png?");

/***/ }),

/***/ 99652:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (__webpack_require__.p + \"images/a4a05f34e894ef1e8cd1b3e97e33a010.png\");\n\n//# sourceURL=webpack://print-designer/./src/components/guide/resource/printsetting.png?");

/***/ }),

/***/ 38188:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./src/components/guide/resource/property.png?");

/***/ }),

/***/ 97744:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./src/components/guide/resource/toolbar.png?");

/***/ }),

/***/ 62493:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQflBRgDCh1Mv+qbAAABAklEQVQoz3XRPyuFYRzG8c/9PE8pf0rHyEApg3CykeGUt6BMJtlNJpMysRmkjEokbwElg5JkMB0ZSJGSjkN0zm05eNRxrd9v133d/UKJxJAe0W+CqjMvHMowZlNQk0+7LYtiSYaiihlvOVwzZ1KnZzFDohqvw8efhnvD9i05yPCoP2z4zOGoqKzPoIO0l1sfCg3wPbJsxagrpxmerTbAiFktiFrNGrJHciiKohTGTUsFQaJuxwkZRyipUTDgwVrtIs3NSXI/Xzelw246odEaRdmP0KVowaltRcdHTRqCujs3XgVNn/gnv0KU6Nan7c/ZchuenFv2jvPmQsW8EZlbl3nhCwJBSyl0EBnIAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA1LTI0VDAzOjEwOjI5KzAwOjAwjsqiaAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNS0yNFQwMzoxMDoyOSswMDowMP+XGtQAAAAASUVORK5CYII=\");\n\n//# sourceURL=webpack://print-designer/./src/editorControls/navTool/picker.png?");

/***/ }),

/***/ 23668:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAABCAYAAACbkyOnAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAATaADAAQAAAABAAAAAQAAAAAxfJBbAAAAGklEQVQYGWN0cHD4z4AGDhw4wAgTGpXHDB8Apz4lwZkCeZgAAAAASUVORK5CYII=\");\n\n//# sourceURL=webpack://print-designer/./src/views/center/dashed.png?");

/***/ }),

/***/ 91460:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64, \");\n\n//# sourceURL=webpack://print-designer/./src/views/center/deleteLine.png?");

/***/ }),

/***/ 50228:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = (\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAAABCAYAAAB0UUiZAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAZiS0dEAP8A/wD/oL2nkwAAAB5JREFUGNNjdHBw+M/AwMBw4MABRgYoQBcb6XxkMQCOoUnBExsl8wAAAD5lWElmAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAATKADAAQAAAABAAAAAQAAAACZ+EYYAAAAAElFTkSuQmCC\");\n\n//# sourceURL=webpack://print-designer/./src/views/center/dotted.png?");

/***/ })

}]);