"use strict";
/*
 * 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["webpackChunknocode_component"] = self["webpackChunknocode_component"] || []).push([[208],{

/***/ "./src/base/web/EditArea/index.less":
/*!******************************************!*\
  !*** ./src/base/web/EditArea/index.less ***!
  \******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"code-edit\":\"wCIb-5q+_code-edit\",\"readonly\":\"jqjnmfn9_readonly\",\"tag_tips\":\"L-uqsBi5_tag_tips\"});\n\n//# sourceURL=webpack://nocode-component/./src/base/web/EditArea/index.less?");

/***/ }),

/***/ "./src/base/web/EditArea/EditArea.tsx":
/*!********************************************!*\
  !*** ./src/base/web/EditArea/EditArea.tsx ***!
  \********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/array/from */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/array/from.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_array_from__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/symbol */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/symbol.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js/get-iterator-method */ \"../../node_modules/@babel/runtime-corejs3/core-js/get-iterator-method.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_object_keys__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/keys */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js\");\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__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js\");\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__(/*! @babel/runtime-corejs3/core-js-stable/instance/filter */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/filter.js\");\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__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor.js\");\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_8__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors.js\");\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__(/*! @babel/runtime-corejs3/core-js-stable/object/define-properties */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-properties.js\");\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__(/*! @babel/runtime-corejs3/core-js-stable/object/define-property */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/object/define-property.js\");\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 _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ \"../../node_modules/@babel/runtime-corejs3/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set-timeout */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/set-timeout.js\");\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_json_stringify__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/json/stringify */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/json/stringify.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/index-of */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/index-of.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/reduce */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/reduce.js\");\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/concat */ \"../../node_modules/@babel/runtime-corejs3/core-js-stable/instance/concat.js\");\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 core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ \"../../node_modules/core-js/modules/es.array.join.js\");\n/* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"../../node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"../../node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"../../node_modules/core-js/modules/es.regexp.exec.js\");\n/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.string.match.js */ \"../../node_modules/core-js/modules/es.string.match.js\");\n/* harmony import */ var core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_match_js__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"../../node_modules/core-js/modules/es.regexp.to-string.js\");\n/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"../../node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! kd_libs/react */ \"webpack/container/remote/kd_libs/react\");\n/* harmony import */ var kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(kd_libs_react__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var kd_libs_react_dom__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! kd_libs/react-dom */ \"webpack/container/remote/kd_libs/react-dom\");\n/* harmony import */ var kd_libs_react_dom__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(kd_libs_react_dom__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var kd_libs_kdesign1__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! kd_libs/kdesign1 */ \"webpack/container/remote/kd_libs/kdesign1\");\n/* harmony import */ var kd_libs_kdesign1__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(kd_libs_kdesign1__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var react_codemirror2__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! react-codemirror2 */ \"../../node_modules/react-codemirror2/index.js\");\n/* harmony import */ var _utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @/utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ \"../../node_modules/codemirror/lib/codemirror.css\");\n/* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var codemirror_addon_selection_mark_selection__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! codemirror/addon/selection/mark-selection */ \"../../node_modules/codemirror/addon/selection/mark-selection.js\");\n/* harmony import */ var codemirror_addon_selection_mark_selection__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_selection_mark_selection__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var codemirror_addon_search_searchcursor__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! codemirror/addon/search/searchcursor */ \"../../node_modules/codemirror/addon/search/searchcursor.js\");\n/* harmony import */ var codemirror_addon_search_searchcursor__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_search_searchcursor__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var codemirror_addon_edit_matchbrackets_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! codemirror/addon/edit/matchbrackets.js */ \"../../node_modules/codemirror/addon/edit/matchbrackets.js\");\n/* harmony import */ var codemirror_addon_edit_matchbrackets_js__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_edit_matchbrackets_js__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var codemirror_addon_edit_closebrackets__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! codemirror/addon/edit/closebrackets */ \"../../node_modules/codemirror/addon/edit/closebrackets.js\");\n/* harmony import */ var codemirror_addon_edit_closebrackets__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_edit_closebrackets__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var codemirror_addon_display_placeholder__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! codemirror/addon/display/placeholder */ \"../../node_modules/codemirror/addon/display/placeholder.js\");\n/* harmony import */ var codemirror_addon_display_placeholder__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(codemirror_addon_display_placeholder__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! kd_libs/lodash */ \"webpack/container/remote/kd_libs/lodash\");\n/* harmony import */ var kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./index.less */ \"./src/base/web/EditArea/index.less\");\n/* harmony import */ var _Condition_const__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../Condition/const */ \"./src/base/web/Condition/const.ts\");\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_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 t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_11__[\"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)) : ownKeys(Object(t)).forEach(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_7___default()(t, r)); }); } return e; }\n\n\n\n\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof (_babel_runtime_corejs3_core_js_stable_symbol__WEBPACK_IMPORTED_MODULE_2___default()) !== \"undefined\" && _babel_runtime_corejs3_core_js_get_iterator_method__WEBPACK_IMPORTED_MODULE_3___default()(o) || o[\"@@iterator\"]; if (!it) { if (Array.isArray(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_0___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_1___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// import { eventBus } from 'designer_base/Main'\n\n// import { DesignerContext } from '../../context'\n\n// import { OPERATION_FILTER_LIST } from '../../constants'\n\n\n\n\n\n\n\n\n\n\n\n\n// function getCustomMode (expressions: string[], operations: string[]) {\n//   return {\n//     name: 'custom',\n//     fn: () => {\n//       const expKeyWords = expressions.sort((a, b) => b.length - a.length)\n//       operations = operations.map(op => op.toLowerCase())\n//       const operationChars = operations.filter(op => !/^\\w+\\s*\\w*/.test(op))\n//       const operationWords = operations.filter(op => /^\\w+\\s*\\w*/.test(op))\n//       function tokenBase (stream:any, state:any) {\n//         state.beforeParams = false\n//         if (stream.match(/\\w+(?=\\(.*\\))/)) {\n//           stream.eatWhile(/\\w+/)\n//           const word = stream.current()\n//           if (expKeyWords.includes(word)) {\n//             return 'expression-style'\n//           }\n//           return null\n//         }\n//         // 单词形式操作符（如Like, in, and等），匹配高亮时需加上前后空格匹配\n//         if (stream.match(/\\w+/)) {\n//           // stream.eatWhile(/^[A-Za-z]+(\\s\\w+)*$/)\n//           const word = stream.current()\n//           if (operationWords.includes(word.toLowerCase())) {\n//             return 'operation-style'\n//           }\n//           return null\n//         }\n//         // 符号类的不需匹配空格\n//         for (let i = 0; i < operationChars.length; i++) {\n//           if (stream.match(operationChars[i])) {\n//             return 'operation-style'\n//           }\n//         }\n//         stream.next()\n//         return null\n//       }\n//       return {\n//         startState: function () {\n//           return {\n//             tokenize: tokenBase,\n//             beforeParams: false,\n//             inParams: false\n//           }\n//         },\n//         token: function (stream, state) {\n//           if (stream.eatSpace()) return null\n//           return state.tokenize(stream, state)\n//         }\n//       }\n//     }\n//   }\n// }\n\n/**\n * codeMirror 配置信息\n */\nvar options = {\n  mode: {\n    name: 'custom'\n  },\n  autoCloseBrackets: true,\n  autofocus: false,\n  // 自动获取焦点\n  styleActiveLine: true,\n  // 光标代码高亮\n  lineNumbers: false,\n  // 显示行号\n  smartIndent: true,\n  // 自动缩进\n  matchBrackets: true,\n  // 匹配括号\n  lineWrapping: true,\n  // 代码超长不换行\n  singleCursorHeightPerLine: true,\n  placeholder: '请从左侧选择字段或手动输入文字'\n};\n\n// 对变量树进行格式化，如果变量类型是关联表单，则把关联表单的子属性取出作为变量\n// function formatTree (fieldList:any[]|undefined) {\n//   if (!fieldList) return []\n//   console.log('formatTree', fieldList)\n//   fieldList.forEach((field:any) => {\n//     const { type, option, children, key } = field\n//     if (type === 'refbill' && option.isMulti && option?.children?.length) {\n//       field.children = option.children.map((op:any) => {\n//         return { ...op, key: op.value, parentKey: key }\n//       })\n//       // delete option.children\n//     } else if (children?.length) {\n//       formatTree(children)\n//     }\n//   })\n//   return fieldList\n// }\n\nvar EditArea = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.forwardRef)(function (_ref, ref) {\n  var initValue = _ref.value,\n    expressionData = _ref.expressionData,\n    fieldData = _ref.fieldData,\n    readOnly = _ref.readOnly,\n    placeholder = _ref.placeholder,\n    onClickField = _ref.onClickField,\n    autofocus = _ref.autofocus;\n  // const treeDataFlatten = useMemo(() => getTreeDataFlatten(formatFieldTree(cloneDeep(fieldData))), [fieldData])\n  // const fields: any[] = treeDataFlatten.filter((node: any) => !node.children?.length).sort((a: any, b: any) => b.key.length - a.key.length)\n  // const { invokeAction, getEncodeValue } = useContext(DesignerContext)\n  var _useState = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useState)(''),\n    _useState2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(_useState, 2),\n    value = _useState2[0],\n    setValue = _useState2[1];\n  var _useReducer = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useReducer)(function (v) {\n      return v + 1;\n    }, 0),\n    _useReducer2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(_useReducer, 2),\n    forceUpdate = _useReducer2[1];\n  var editorRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useRef)(null);\n  var customNodes = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useRef)([]);\n  var treeDataRef = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useRef)((0,_utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__.getTreeDataFlatten)((0,_utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__.formatFieldTree)((0,kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37__.cloneDeep)(fieldData))));\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useEffect)(function () {\n    // 表单设计器里后端返回的变量有一定延时，但默认有根节点，需要侦听fieldData的变化\n    // 如果fieldData发生了变化，则需要清除所有MARK然后重新生成\n    var newData = (0,_utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__.getTreeDataFlatten)((0,_utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__.formatFieldTree)((0,kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37__.cloneDeep)(fieldData)));\n    if (!(0,kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37__.isEqual)(treeDataRef.current, newData)) {\n      treeDataRef.current = newData;\n      var editor = editorRef.current.editor;\n      editor.doc.getAllMarks().forEach(function (mark) {\n        return mark.clear();\n      });\n      // 重新生成变量及函数TAG\n      replaceShortcode(editor, {\n        line: 0,\n        ch: 0\n      });\n    }\n  }, [fieldData]);\n  // 函数对象列表-转对象，方便查询\n  var expressions = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useMemo)(function () {\n    var obj = {};\n    var _iterator = _createForOfIteratorHelper(expressionData),\n      _step;\n    try {\n      for (_iterator.s(); !(_step = _iterator.n()).done;) {\n        var types = _step.value.types;\n        types.forEach(function (exp) {\n          obj[exp.id] = exp;\n        });\n      }\n    } catch (err) {\n      _iterator.e(err);\n    } finally {\n      _iterator.f();\n    }\n    return obj;\n  }, [expressionData]);\n\n  // const operations = useMemo(() => {\n  //   return operationData.filter((op: string) => !OPERATION_FILTER_LIST.includes(op))\n  // }, [operationData])\n\n  // const customMode = useMemo(() => getCustomMode(expressions, operations), [expressions, operations])\n\n  // 外部更新值\n  var handleValue = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useCallback)(function (v) {\n    var editor = editorRef.current.editor;\n    setValue(v);\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      // 将光标移到末尾\n      editor.refresh();\n      editor.setCursor(editor.lineCount(), 0);\n      !readOnly && editor.focus();\n    }, 500);\n  }, [editorRef.current, readOnly]);\n\n  // 向上暴露接口\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useImperativeHandle)(ref, function () {\n    return {\n      insertText: insertText,\n      forceUpdate: forceUpdate,\n      setEditorValue: handleValue,\n      getEditorValue: function getEditorValue() {\n        return (0,kd_libs_lodash__WEBPACK_IMPORTED_MODULE_37__.trimStart)(value);\n      },\n      getEditor: function getEditor() {\n        var editor = editorRef.current.editor;\n        return editor;\n      }\n    };\n  });\n\n  /**\n   * 监听指令，有些函数需要二次弹窗\n   */\n  // useEffect(() => {\n  //   eventBus.on('setFunctionParam', insertText)\n  //   return () => {\n  //     eventBus.off('setFunctionParam', insertText)\n  //   }\n  // }, [])\n\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useEffect)(function () {\n    handleValue(initValue);\n  }, [initValue]);\n  var insertText = function insertText(str) {\n    var editor = editorRef.current.editor;\n    var pos = editor.getCursor();\n    var line = pos.line,\n      ch = pos.ch;\n    if (ch !== 0) {\n      str = \" \".concat(str, \" \");\n    } else {\n      str = \"\".concat(str, \" \");\n    }\n    editor.replaceRange(str, pos);\n    // 这里不用设置cursor，貌似鼠标焦点会出问题\n    // editor.setCursor({\n    //   line,\n    //   ch: ch + str.length\n    // })\n    _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      editor.refresh();\n      editor.focus();\n      editor.scrollIntoView(null);\n    }, 10);\n  };\n  var handleChange = function handleChange(editor, data, value) {\n    var from = data.from;\n    var fromStartOfLine = _objectSpread(_objectSpread({}, from), {}, {\n      ch: 0\n    });\n\n    // 手动输入匹配（字段的key=>标签文本）\n    // for (const { id, longText } of fields) {\n    //   const text = longText.replace(/(\\S+)\\(\\S+\\)/g, '$1')\n    //   const regExp = new RegExp(`(?<!\\\\S)(${id})(?=\\\\s)`)\n    //   const fieldText = `{{Field id=\"${id}\" text=\"${text}\"}}`\n    //   replaceFieldKey(editor, fromStartOfLine, regExp, fieldText)\n    // }\n    // 文本转换成标签\n    replaceShortcode(editor, fromStartOfLine);\n  };\n  var handleLoad = function handleLoad(editor) {\n    // 编辑器初始加载的时候，将文本全量替换处理下（字段的key=>标签文本）\n    // let replacedValue = initValue\n    // for (const { id, longText } of fields) {\n    //   const text = longText.replace(/(\\S+)\\(\\S+\\)/g, '$1')\n    //   const fieldRegText = `{{Field id=\"${id}\" text=\"${text}\"}}`\n    //   replacedValue = replacedValue.replace(new RegExp(`(?<!\\\\w|\\\\d|\\\\.|=\\\")(${id})(?!\\\\w|\\\\d|\\\")`, 'g'), fieldRegText)\n    // }\n    editor.setValue(initValue);\n    var timer = _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n      clearTimeout(timer);\n      editor.refresh();\n      editor.setCursor(editor.lineCount(), 0); // 将光标移到末尾\n      !readOnly && editor.focus();\n    }, 500);\n  };\n  var handleUpdate = function handleUpdate(editor) {\n    renderReactNodes(editor);\n  };\n\n  // const replaceFieldKey = (editor:any, loc:any, regExp:any, fieldText:string) => {\n  //   // 转换：标签的key => 标签文本\n  //   const cursor = editor.getSearchCursor(regExp, loc, {\n  //     multiline: 'disable'\n  //   })\n\n  //   while (cursor.findNext()) {\n  //     const markers = editor.findMarks(cursor.from(), cursor.to())\n  //     if (markers.length === 0) {\n  //       const from = cursor.from()\n  //       const to = cursor.to()\n  //       editor.replaceRange(fieldText, from, to)\n  //     }\n  //   }\n  // }\n\n  /**\n   * 渲染字段\n   */\n  var renderField = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useCallback)(function (editor, loc) {\n    // 转换：标签文本 => node\n    var cursor = editor.getSearchCursor(_Condition_const__WEBPACK_IMPORTED_MODULE_40__.fieldRegExp, loc, {\n      multiline: 'disable'\n    });\n    var newValue = '';\n    var _loop = function _loop() {\n      // 字段\n      var markers = editor.findMarks(cursor.from(), cursor.to());\n      if (markers.length === 0) {\n        var from = cursor.from();\n        var to = cursor.to();\n\n        // extract if checkbox is selected or not\n        var match = editor.getRange(from, to);\n        var _match$match = match.match(_Condition_const__WEBPACK_IMPORTED_MODULE_40__.fieldRegExp),\n          _match$match2 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(_match$match, 3),\n          _id = _match$match2[1],\n          text = _match$match2[2];\n        var info = treeDataRef.current[_id];\n        // const parent = treeDataFlatten[info?.parentKey]\n        // const [parentTitle = '', nodeTitle = ''] = text.split('|||')\n        // console.log('renderField', match)\n        // 多层级时标题parentTitle 与parent?.title将永远不相等\n        // if (info && parent && (parentTitle !== parent?.title || nodeTitle !== info?.title)) {\n        //   newValue = value.replace(match, `{{Field id=\"${id}\" text=\"${parent.title}|||${info.title}\"}}`)\n        // }\n        var node = document.createElement('div');\n        var css = info ? 'tag' : 'tag_error';\n        // const pTitle = parentTitle || parent?.title\n        // const nTitle = nodeTitle || info?.title\n        // 轮询所有父子标题\n        var getParentTitle = function getParentTitle(field) {\n          var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n          title.unshift([(field === null || field === void 0 ? void 0 : field.titlePrefix) || '', field.title]);\n          var parent = treeDataRef.current[field === null || field === void 0 ? void 0 : field.pKey];\n          if (parent) getParentTitle(parent, title);\n          return title;\n        };\n        var label = info ? getParentTitle(info) : null; // 生成data-text标题\n        node.setAttribute('class', css);\n        node.setAttribute('data-id', _id);\n        node.setAttribute('data-type', 'vars');\n        node.setAttribute('data-text', _babel_runtime_corejs3_core_js_stable_json_stringify__WEBPACK_IMPORTED_MODULE_14___default()(label));\n        customNodes.current.push(node);\n        editor.markText(from, to, {\n          replacedWith: node\n        });\n      }\n    };\n    while (cursor.findNext()) {\n      _loop();\n    }\n    newValue && setValue(newValue);\n  }, [value]);\n\n  /**\n   * 渲染函数\n   */\n  var renderExpress = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useCallback)(function (editor, loc) {\n    var expCursor = editor.getSearchCursor(_Condition_const__WEBPACK_IMPORTED_MODULE_40__.expRegExp, loc, {\n      multiline: 'disable'\n    });\n    while (expCursor.findNext()) {\n      // 函数\n      var markers = editor.findMarks(expCursor.from(), expCursor.to());\n      if (markers.length === 0) {\n        var from = expCursor.from();\n        var to = expCursor.to();\n\n        // extract if checkbox is selected or not\n        var match = editor.getRange(from, to);\n        var _match$match3 = match.match(_Condition_const__WEBPACK_IMPORTED_MODULE_40__.expRegExp),\n          _match$match4 = (0,_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(_match$match3, 4),\n          _id2 = _match$match4[1],\n          name = _match$match4[2],\n          lang = _match$match4[3];\n        var info = expressions[_id2];\n        var text = lang === '1' ? info.name || name : info.id || _id2;\n        var node = document.createElement('span');\n        var css = info ? 'tag' : 'tag_error';\n        node.setAttribute('class', css);\n        node.setAttribute('class', 'exp');\n        node.setAttribute('data-id', _id2);\n        node.setAttribute('data-text', text);\n        customNodes.current.push(node);\n        editor.markText(from, to, {\n          replacedWith: node\n        });\n      }\n    }\n  }, [expressions]);\n\n  /**\n   * 将标签转成html节点\n   * @param editor 编辑器\n   * @param loc\n   */\n  var replaceShortcode = (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useCallback)(function (editor, loc) {\n    renderField(editor, loc);\n    renderExpress(editor, loc);\n  }, [renderField, renderExpress]);\n\n  /**\n   * 对react里的内容自定义渲染\n   * @param editor\n   */\n  var renderReactNodes = function renderReactNodes(editor) {\n    var needsRefresh = false;\n    var width = editorRef.current.ref.getElementsByClassName('CodeMirror-code')[0].offsetWidth;\n    customNodes.current.forEach(function (n, i) {\n      if (!n.dataset.__react_rendered) {\n        var fieldId = n.dataset.id;\n        var fieldName = n.dataset.text;\n        var type = n.dataset.type;\n        n.dataset.__react_rendered = '1';\n        var Component = type === 'vars' ? VarField : Field;\n        kd_libs_react_dom__WEBPACK_IMPORTED_MODULE_27___default().render( /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(Component, {\n          key: fieldId + i,\n          id: fieldId,\n          text: fieldName,\n          width: width,\n          onClickField: onClickField\n        }), n);\n        needsRefresh = true;\n      }\n    });\n    // customNodes.current = customNodes.current.filter((n:any) => {\n    //   if (n.ownerDocument.body.contains(n)) {\n    //     if (!n.dataset.__react_rendered) {\n    //       const fieldId = n.dataset.id\n    //       const fieldName = n.dataset.text\n    //       const type = n.dataset.type\n    //       n.dataset.__react_rendered = '1'\n    //       const Component = type === 'vars' ? VarField : Field\n    //       ReactDOM.render(<Component id={fieldId} text={fieldName} width={width} onClickField={onClickField} />, n)\n    //       needsRefresh = true\n    //     }\n    //     return true\n    //   } else {\n    //     if (n.dataset.__react_rendered) {\n    //       ReactDOM.unmountComponentAtNode(n)\n    //     }\n    //     return false\n    //   }\n    // })\n    if (needsRefresh) {\n      editor.refresh();\n    }\n  };\n  (0,kd_libs_react__WEBPACK_IMPORTED_MODULE_26__.useEffect)(function () {\n    return function () {\n      customNodes.current.forEach(function (n) {\n        if (n.dataset.__react_rendered) {\n          kd_libs_react_dom__WEBPACK_IMPORTED_MODULE_27___default().unmountComponentAtNode(n);\n        }\n      });\n    };\n  }, []);\n\n  // const handleCheck = () => {\n  //   if (value === '') return\n  //   const encodedValue = getEncodeValue(trimStart(value))\n  //   invokeAction('validateFormula', [encodedValue])\n  // }\n\n  var config = _objectSpread(_objectSpread({}, options), {}, {\n    readOnly: readOnly,\n    placeholder: placeholder || options.placeholder,\n    autofocus: autofocus !== null && autofocus !== void 0 ? autofocus : true\n  });\n  // console.log('EditArea', config)\n  return /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"div\", {\n    className: classnames__WEBPACK_IMPORTED_MODULE_38___default()(_index_less__WEBPACK_IMPORTED_MODULE_39__[\"default\"]['code-edit'], (0,_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_11__[\"default\"])({}, _index_less__WEBPACK_IMPORTED_MODULE_39__[\"default\"].readonly, readOnly), 'kd-nc-code-edit')\n  }, /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(react_codemirror2__WEBPACK_IMPORTED_MODULE_29__.Controlled, {\n    ref: editorRef,\n    value: value,\n    options: config\n    // onBlur={() => onBlur?.()}\n    // defineMode={customMode}\n    ,\n    onBeforeChange: function onBeforeChange(editor, data, newVal) {\n      // console.log('onBeforeChange', data.from, data.text)\n      setValue(newVal);\n      if (_Condition_const__WEBPACK_IMPORTED_MODULE_40__.expRegExp.test(data.text[0])) {\n        var _context;\n        var index = _babel_runtime_corejs3_core_js_stable_instance_index_of__WEBPACK_IMPORTED_MODULE_15___default()(_context = data.text[0]).call(_context, '()');\n        _babel_runtime_corejs3_core_js_stable_set_timeout__WEBPACK_IMPORTED_MODULE_13___default()(function () {\n          return editor.setCursor({\n            line: data.from.line,\n            ch: data.from.ch + index + 1\n          });\n        }, 10);\n      }\n    },\n    onChange: handleChange,\n    editorDidMount: handleLoad,\n    onUpdate: handleUpdate\n  }));\n});\nfunction Field(_ref2) {\n  var text = _ref2.text,\n    id = _ref2.id,\n    onClickField = _ref2.onClickField;\n  return /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"span\", {\n    onClick: function onClick() {\n      return onClickField && onClickField(id);\n    }\n  }, text);\n}\nvar VarField = function VarField(_ref3) {\n  var text = _ref3.text,\n    id = _ref3.id,\n    onClickField = _ref3.onClickField,\n    width = _ref3.width;\n  var titleArr = JSON.parse(text);\n  if (!titleArr) return null;\n  var tips = _babel_runtime_corejs3_core_js_stable_instance_reduce__WEBPACK_IMPORTED_MODULE_16___default()(titleArr).call(titleArr, function (result, item) {\n    return _babel_runtime_corejs3_core_js_stable_instance_concat__WEBPACK_IMPORTED_MODULE_17___default()(result).call(result, item.join(''));\n  }, []).join(' > '); // tips内容\n  var fieldTitle = titleArr.pop(); // 当前变量内家\n  var parentTitle = titleArr.length > 0 ? titleArr.pop().join('') : '';\n  // const index = fieldTitle.lastIndexOf(']')\n  var parentWidth = parentTitle ? (0,_utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__.getTextWidth)(parentTitle, 12) : 0;\n  var fieldWidth = (0,_utils_treeUtils__WEBPACK_IMPORTED_MODULE_30__.getTextWidth)(fieldTitle, 12);\n  var halfWidth = width / 2 - 16; // 有16像素的填充\n  var parentStyle = parentWidth > halfWidth ? {\n    flexShrink: 1\n  } : {};\n  var fieldStyle = fieldWidth > halfWidth ? {\n    flexShrink: 1\n  } : {};\n  return /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(kd_libs_kdesign1__WEBPACK_IMPORTED_MODULE_28__.Tooltip, {\n    tip: \"\\u5B8C\\u6574\\u8DEF\\u5F84\\uFF1A\".concat(tips),\n    scrollHidden: true,\n    popperClassName: _index_less__WEBPACK_IMPORTED_MODULE_39__[\"default\"].tag_tips,\n    mouseEnterDelay: 0.3\n  }, /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"div\", {\n    className: \"var_title\",\n    onClick: function onClick() {\n      return onClickField === null || onClickField === void 0 ? void 0 : onClickField(id);\n    }\n  }, !!parentTitle && /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"div\", {\n    style: parentStyle,\n    className: \"parent_title gray\"\n  }, /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"span\", null, parentTitle)), /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"div\", {\n    className: \"field_title\",\n    style: fieldStyle\n  }, /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"span\", null, !!fieldTitle[0] && /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"span\", {\n    className: \"gray\"\n  }, fieldTitle[0]), /*#__PURE__*/kd_libs_react__WEBPACK_IMPORTED_MODULE_26___default().createElement(\"span\", null, fieldTitle[1])))));\n};\nEditArea.displayName = 'EditArea';\n/* harmony default export */ __webpack_exports__[\"default\"] = (EditArea);\n\n//# sourceURL=webpack://nocode-component/./src/base/web/EditArea/EditArea.tsx?");

/***/ })

}]);