/*
 * 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["webpackJsonp_bos-platform"] = self["webpackJsonp_bos-platform"] || []).push([[1152],{

/***/ "./src/component/web/base/Notification.jsx":
/*!*************************************************!*\
  !*** ./src/component/web/base/Notification.jsx ***!
  \*************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"../../node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"../../node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"../../node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"../../node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"../../node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"../../node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"../../node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"../../node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"../../node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"../../node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"../../node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"../../node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"../../node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"../../node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"../../node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"../../node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"../../node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"../../node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"../../node_modules/core-js/modules/es.weak-map.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"../../node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = exports.Link = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"../../node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"../../node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"../../node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"../../node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"../../node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"../../node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"../../node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"../../node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"../../node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"../../node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"../../node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"../../node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.string.link.js */ \"../../node_modules/core-js/modules/es.string.link.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"../../node_modules/core-js/modules/web.timers.js\");\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react?dca2\"));\nvar _Notification = _interopRequireDefault(__webpack_require__(/*! ./Notification.less */ \"./src/component/web/base/Notification.less\"));\nvar _classnames3 = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _intlApi = __webpack_require__(/*! ../../../i18n/intlApi */ \"./src/i18n/intlApi.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { \"default\": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n[\"default\"] = e, t && t.set(e, n), n; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || 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) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n/**\r\n * 悬浮样式消息提示框（单据内）\r\n * @author: chengzhou_hong\r\n */\nvar Notification = /*#__PURE__*/function (_Component) {\n  _inherits(Notification, _Component);\n  function Notification(props) {\n    var _this;\n    _classCallCheck(this, Notification);\n    _this = _callSuper(this, Notification, [props]);\n    _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n    _this.handlClose = _this.handlClose.bind(_assertThisInitialized(_this));\n    _this.getButton = _this.getButton.bind(_assertThisInitialized(_this));\n    _this.callbackAndClose = _this.callbackAndClose.bind(_assertThisInitialized(_this));\n    _this.removeAnimation = _this.removeAnimation.bind(_assertThisInitialized(_this));\n    _this.bindAnimationEndListener = _this.bindAnimationEndListener.bind(_assertThisInitialized(_this));\n    _this.unbindAnimationEndListener = _this.unbindAnimationEndListener.bind(_assertThisInitialized(_this));\n    _this.nextHandle = _this.nextHandle.bind(_assertThisInitialized(_this));\n    _this.lastHandle = _this.lastHandle.bind(_assertThisInitialized(_this));\n    _this.stopAutoClose = _this.stopAutoClose.bind(_assertThisInitialized(_this));\n    _this.bindMouseEventListener = _this.bindMouseEventListener.bind(_assertThisInitialized(_this));\n    _this.unbindMouseEventListener = _this.unbindMouseEventListener.bind(_assertThisInitialized(_this));\n    _this.state = {\n      show: true,\n      // 显示消息\n      needMoveInAnimation: true // 是否需要动画\n    };\n    _this.isUnmount = false;\n    return _this;\n  }\n  _createClass(Notification, [{\n    key: \"componentWillUnmount\",\n    value: function componentWillUnmount() {\n      var _this2 = this;\n      var setShowNum = this.props.setShowNum;\n      this.isUnmount = true;\n      this.unbindAnimationEndListener(this.removeAnimation);\n      this.unbindMouseEventListener('mouseover', function () {\n        return _this2.stopAutoClose();\n      });\n      this.unbindMouseEventListener('mouseleave', function () {\n        return _this2.autoClose(5000);\n      });\n      this.timer && clearTimeout(this.timer);\n      this.timer = null;\n      // 把父层的浮层显示序号重置为0\n      setShowNum && setShowNum();\n    }\n  }, {\n    key: \"onClick\",\n    value: function onClick(e) {\n      /* click事件 获取 整个div对象增加 动画结束事件 ，在回调函数中关闭 */\n      e && e.stopPropagation();\n      this.bindAnimationEndListener(this.handlClose);\n      if (!this.isUnmount) {\n        this.setState({\n          show: false\n        });\n      }\n    }\n  }, {\n    key: \"handlClose\",\n    value: function handlClose() {\n      /* 移除监听事件 并调用关闭方法关闭div */\n      this.unbindAnimationEndListener(this.handlClose);\n      this.props.onClose();\n    }\n  }, {\n    key: \"removeAnimation\",\n    value: function removeAnimation(e) {\n      this.setState({\n        needMoveInAnimation: false\n      });\n    }\n  }, {\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      var _this3 = this;\n      /**\r\n       * 失败和提示类型 消息不自动消失\r\n       * 成功类型消失自动消失\r\n      */\n      this.autoClose(this.props.duration);\n      /**\r\n       * 问题：由于悬浮提示框出场时有动画，当有错误的悬浮框在单据中没有关掉，切换页签时，会造成又弹出一次悬浮框的假象\r\n       * 解决：在组件didMount时绑定动画事件，当动画渲染结束，删掉dom的动画css样式\r\n       * 这样页签切换没有此问题\r\n       */\n      this.bindAnimationEndListener(this.removeAnimation);\n      // 警告类型，鼠标悬停不自动关闭，鼠标移出5S后自动关闭\n      if (this.props.type === 2) {\n        this.bindMouseEventListener('mouseover', function () {\n          return _this3.stopAutoClose();\n        });\n        this.bindMouseEventListener('mouseleave', function () {\n          return _this3.autoClose(5000);\n        });\n      }\n    }\n  }, {\n    key: \"stopAutoClose\",\n    value: function stopAutoClose() {\n      if (this.props.autoClose) {\n        this.timer && clearTimeout(this.timer);\n      }\n    }\n  }, {\n    key: \"autoClose\",\n    value: function autoClose(timeout) {\n      var _this4 = this;\n      if (this.props.autoClose) {\n        this.timer && clearTimeout(this.timer);\n        this.timer = setTimeout(function () {\n          _this4.onClick();\n        }, timeout);\n      }\n    }\n  }, {\n    key: \"componentWillReceiveProps\",\n    value: function componentWillReceiveProps(nextProps) {\n      // 有新的汇总消息则重新显示到第一条\n      var setShowNum = this.props.setShowNum;\n      if (nextProps.msgLength !== this.props.msgLength) {\n        setShowNum && setShowNum();\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate(prevProps, prevState) {\n      if (this.props.type === prevProps.type && this.props.duration === prevProps.duration) return;\n      this.autoClose(this.props.duration);\n    }\n  }, {\n    key: \"bindAnimationEndListener\",\n    value: function bindAnimationEndListener(fn) {\n      var notificationDiv = this.refs.notification_div;\n      if (notificationDiv) {\n        notificationDiv.addEventListener('webkitAnimationEnd', fn);\n        notificationDiv.addEventListener('animationend', fn);\n      }\n    }\n  }, {\n    key: \"unbindAnimationEndListener\",\n    value: function unbindAnimationEndListener(fn) {\n      var notificationDiv = this.refs.notification_div;\n      if (notificationDiv) {\n        notificationDiv.removeEventListener('webkitAnimationEnd', fn);\n        notificationDiv.removeEventListener('animationend', fn);\n      }\n    }\n  }, {\n    key: \"bindMouseEventListener\",\n    value: function bindMouseEventListener(eventName, fn) {\n      var notificationDiv = this.refs.notification_div;\n      if (notificationDiv) {\n        notificationDiv.addEventListener(eventName, fn);\n      }\n    }\n  }, {\n    key: \"unbindMouseEventListener\",\n    value: function unbindMouseEventListener(eventName, fn) {\n      var notificationDiv = this.refs.notification_div;\n      if (notificationDiv) {\n        notificationDiv.removeEventListener(eventName, fn);\n      }\n    }\n  }, {\n    key: \"callbackAndClose\",\n    value: function callbackAndClose(code) {\n      code && this.props.callback(code);\n      this.onClick();\n    }\n\n    /**\r\n     * 获取包含连接的文本\r\n     * @param {map} linkData 连接配置信息对象\r\n     * @param {string} content 内容\r\n     */\n  }, {\n    key: \"getLinkContent\",\n    value: function getLinkContent(linkData, content) {\n      var _this5 = this;\n      var flagReg = new RegExp(/(#\\{\\d+\\})/g);\n      var indexReg = new RegExp(/\\d+/g);\n      var contentAry = content.split(flagReg);\n      var newContent = contentAry.map(function (item, i) {\n        var isFlag = flagReg.test(item);\n        if (isFlag) {\n          var linkIndex = parseInt(item.match(indexReg));\n          var _iterator = _createForOfIteratorHelper(linkData),\n            _step;\n          try {\n            for (_iterator.s(); !(_step = _iterator.n()).done;) {\n              var data = _step.value;\n              var index = data.index,\n                text = data.text,\n                value = data.value,\n                url = data.url;\n              if (index === linkIndex) {\n                return /*#__PURE__*/_react[\"default\"].createElement(Link, {\n                  key: \"link\".concat(i),\n                  name: text,\n                  code: value || url,\n                  index: index,\n                  callback: _this5.callbackAndClose\n                });\n              }\n            }\n          } catch (err) {\n            _iterator.e(err);\n          } finally {\n            _iterator.f();\n          }\n        }\n        return item;\n      });\n      return newContent;\n    }\n  }, {\n    key: \"getButton\",\n    value: function getButton() {\n      var _this6 = this;\n      return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n        className: _Notification[\"default\"]['button-div'],\n        onClick: function onClick(e) {\n          return _this6.onClick(e);\n        }\n      }, (0, _intlApi.getLangMsg)('msg.iKnow'));\n    }\n  }, {\n    key: \"lastHandle\",\n    value: function lastHandle(e) {\n      e.stopPropagation();\n      var changeMsgNum = this.props.changeMsgNum;\n      changeMsgNum && changeMsgNum('last');\n    }\n  }, {\n    key: \"nextHandle\",\n    value: function nextHandle(e) {\n      e.stopPropagation();\n      var changeMsgNum = this.props.changeMsgNum;\n      changeMsgNum && changeMsgNum('next');\n    }\n  }, {\n    key: \"renderLastNextBtn\",\n    value: function renderLastNextBtn() {\n      var _this7 = this;\n      var _this$props = this.props,\n        msgNum = _this$props.msgNum,\n        msgLength = _this$props.msgLength;\n      if (msgNum === undefined || msgLength === undefined) return;\n      return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n        className: _Notification[\"default\"][\"switch\"]\n      }, /*#__PURE__*/_react[\"default\"].createElement(\"span\", {\n        className: (0, _classnames3[\"default\"])(_Notification[\"default\"].last, 'kdfont', 'kdfont-qianfan'),\n        onClick: function onClick(e) {\n          return _this7.lastHandle(e);\n        }\n      }, \"  \"), /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n        className: _Notification[\"default\"].number\n      }, msgNum + 1, \"/\", msgLength), /*#__PURE__*/_react[\"default\"].createElement(\"span\", {\n        className: (0, _classnames3[\"default\"])(_Notification[\"default\"].next, 'kdfont', 'kdfont-houfan'),\n        onClick: function onClick(e) {\n          return _this7.nextHandle(e);\n        }\n      }, \" \"));\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this8 = this;\n      var _this$props2 = this.props,\n        title = _this$props2.title,\n        content = _this$props2.content,\n        contentType = _this$props2.contentType,\n        type = _this$props2.type,\n        showButton = _this$props2.showButton,\n        tmpStyle = _this$props2.tmpStyle,\n        args = _this$props2.args,\n        hasLink = _this$props2.hasLink,\n        msgLength = _this$props2.msgLength,\n        relative = _this$props2.relative;\n      var _this$state = this.state,\n        show = _this$state.show,\n        needMoveInAnimation = _this$state.needMoveInAnimation;\n      var textEle = hasLink ? this.getLinkContent(args, content) : content;\n      var showToggleButton = msgLength >= 2;\n      var dialogClassName = (0, _classnames3[\"default\"])(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _Notification[\"default\"]['dialog-div-style-' + tmpStyle], true), \"\".concat(tmpStyle, \"-bg-color\"), true), _Notification[\"default\"]['move-up-in'], needMoveInAnimation), _Notification[\"default\"]['move-up-leave'], !show), _Notification[\"default\"].absolute, !relative));\n      var descClassName = (0, _classnames3[\"default\"])(_defineProperty(_defineProperty(_defineProperty({}, _Notification[\"default\"]['desc-div-style-' + tmpStyle], true), \"\".concat(tmpStyle, \"-color\"), true), _Notification[\"default\"]['desc-show-button'], showToggleButton));\n      var fontClassName = type === 0 ? 'kdfont-kdfont kdfont-zhuangtai_wancheng' : 'kdfont kdfont-zhuangtai_jingshi';\n      var rootDivAtt = hasLink || type !== 0 ? {} : {\n        onClick: this.onClick\n      };\n      var imgClass = (0, _classnames3[\"default\"])(_Notification[\"default\"]['img-style'], _Notification[\"default\"][\"color-\".concat(tmpStyle)], \"\".concat(tmpStyle, \"-color\"), 'kdfont', fontClassName);\n      return /*#__PURE__*/_react[\"default\"].createElement(\"div\", _extends({\n        className: dialogClassName,\n        ref: \"notification_div\"\n      }, rootDivAtt), /*#__PURE__*/_react[\"default\"].createElement(\"span\", {\n        className: imgClass\n      }), title && title.trim().length !== 0 ? /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n        className: _Notification[\"default\"]['tip-div-style-' + tmpStyle]\n      }, title) : null, contentType === 'component' ? /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n        className: descClassName\n      }, content) : /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n        className: descClassName,\n        title: content\n      }, textEle), showButton ? this.getButton() : null, showToggleButton ? this.renderLastNextBtn() : null, /*#__PURE__*/_react[\"default\"].createElement(\"span\", {\n        className: (0, _classnames3[\"default\"])(_Notification[\"default\"]['close-div-style'], 'kdfont kdfont-toubudaohang_guanbi'),\n        onClick: function onClick(e) {\n          return _this8.onClick(e);\n        }\n      }));\n    }\n  }]);\n  return Notification;\n}(_react.Component);\nvar _default = exports[\"default\"] = Notification;\nvar Link = exports.Link = /*#__PURE__*/function (_Component2) {\n  _inherits(Link, _Component2);\n  function Link() {\n    _classCallCheck(this, Link);\n    return _callSuper(this, Link, arguments);\n  }\n  _createClass(Link, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props3 = this.props,\n        name = _this$props3.name,\n        code = _this$props3.code,\n        callback = _this$props3.callback;\n      var isOutsizeLink = code.startsWith('www') || code.startsWith('http://') || code.startsWith('https://');\n      var linkClass = (0, _classnames3[\"default\"])(_Notification[\"default\"].link, 'theme-fc');\n      return isOutsizeLink ? /*#__PURE__*/_react[\"default\"].createElement(\"a\", {\n        className: linkClass,\n        onClick: function onClick() {\n          return callback();\n        },\n        href: code.startsWith('www') ? \"http://\".concat(code) : code,\n        rel: \"noopener noreferrer\",\n        target: \"_blank\"\n      }, name) : /*#__PURE__*/_react[\"default\"].createElement(\"a\", {\n        className: linkClass,\n        href: \"javascript:void(0);\",\n        onClick: function onClick() {\n          return callback(code);\n        }\n      }, name);\n    }\n  }]);\n  return Link;\n}(_react.Component);\n\n//# sourceURL=webpack://bos-platform/./src/component/web/base/Notification.jsx?");

/***/ }),

/***/ "./src/page/Calculator.js":
/*!********************************!*\
  !*** ./src/page/Calculator.js ***!
  \********************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";
eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"../../node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"../../node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"../../node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"../../node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"../../node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"../../node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"../../node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"../../node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"../../node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"../../node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"../../node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"../../node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"../../node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"../../node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"../../node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"../../node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"../../node_modules/core-js/modules/es.weak-map.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"../../node_modules/core-js/modules/web.dom-collections.iterator.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"../../node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"../../node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"../../node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"../../node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"../../node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"../../node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"../../node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"../../node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"../../node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"../../node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"../../node_modules/core-js/modules/es.number.to-fixed.js\");\n__webpack_require__(/*! core-js/modules/es.number.to-precision.js */ \"../../node_modules/core-js/modules/es.number.to-precision.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"../../node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"../../node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"../../node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"../../node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"../../node_modules/core-js/modules/web.dom-collections.for-each.js\");\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react?dca2\"));\nvar _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"../../node_modules/lodash/lodash.js\"));\nvar _big = _interopRequireDefault(__webpack_require__(/*! big.js */ \"../../node_modules/big.js/big.js\"));\nvar _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ \"../../node_modules/copy-to-clipboard/index.js\"));\nvar _global = _interopRequireWildcard(__webpack_require__(/*! @/global */ \"./src/global/index.js\"));\nvar _Notification = _interopRequireDefault(__webpack_require__(/*! ../component/web/base/Notification */ \"./src/component/web/base/Notification.jsx\"));\nvar _SystemUIProvider = __webpack_require__(/*! ./SystemUIProvider */ \"./src/page/SystemUIProvider.js\");\nvar _useDialogDrag = _interopRequireDefault(__webpack_require__(/*! ../component/common/useDialogDrag */ \"./src/component/common/useDialogDrag.js\"));\nvar _timers = __webpack_require__(/*! timers */ \"../../node_modules/timers-browserify/main.js\");\nvar _Calculator = _interopRequireDefault(__webpack_require__(/*! ./Calculator.less */ \"./src/page/Calculator.less\"));\nvar _client = __webpack_require__(/*! @/action/actionname/global/custom/client */ \"./src/action/actionname/global/custom/client/index.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { \"default\": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n[\"default\"] = e, t && t.set(e, n), n; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(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 _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(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) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nvar MAX_VALUE = 9999999999999.99;\n\n/**\n * 计算器的计算过程是按windows自带的计算器标准模式做的\n * 调用方式：ctrl+f11  （用showForm方式展示）\n * 使用方式：1、鼠标点击按键  2、键盘操作\n * 注意点：按回车键或者点击关闭按钮，是关闭计算器（数据回填也是在这一步做的）\n * 注意点：点击'='号是直接计算结果\n */\nfunction KeyButtons(_ref) {\n  var activeKey = _ref.activeKey,\n    _onClick = _ref.onClick;\n  var createColumns = function createColumns(numberArr) {\n    return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n      className: _Calculator[\"default\"].column\n    }, numberArr.map(function (item) {\n      return createCells(item);\n    }));\n  };\n  var createCells = function createCells(item) {\n    // 创建单元格\n    var key = _lodash[\"default\"].isString(item) ? item : item.name;\n    var style = _lodash[\"default\"].isString(item) ? {} : item.style || {}; // 控制特殊的字体颜色、背景色\n    var defaultClassName = _lodash[\"default\"].isString(item) ? '' : item.className || '';\n    var className = (0, _classnames[\"default\"])(_Calculator[\"default\"].cell, defaultClassName, {\n      'hover-bg': activeKey === key,\n      // 键盘操作时模拟一下button的点击效果\n      'kd-hover-bgcolor': _lodash[\"default\"].isString(item) // 普通按钮要加上这个，特殊按钮通过classname自己传过来\n    });\n    return /*#__PURE__*/_react[\"default\"].createElement(\"span\", {\n      key: key,\n      style: style,\n      className: className,\n      onClick: function onClick() {\n        return _onClick(key);\n      }\n    }, key);\n  };\n  var getOperateStyle = function getOperateStyle(_ref2) {\n    var name = _ref2.name,\n      _ref2$span = _ref2.span,\n      span = _ref2$span === void 0 ? 1 : _ref2$span,\n      _ref2$className = _ref2.className,\n      className = _ref2$className === void 0 ? 'theme-fc kd-hover-bgcolor' : _ref2$className,\n      _ref2$fontSize = _ref2.fontSize,\n      fontSize = _ref2$fontSize === void 0 ? '24px' : _ref2$fontSize,\n      _ref2$style = _ref2.style,\n      style = _ref2$style === void 0 ? {} : _ref2$style;\n    return {\n      name: name,\n      className: className,\n      style: _objectSpread(_objectSpread({}, style), {}, {\n        fontSize: fontSize,\n        height: 48 * span\n      })\n    };\n  };\n  var specialBtn = (0, _classnames[\"default\"])('theme-bg', _Calculator[\"default\"]['special-hover-btn']);\n  return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: _Calculator[\"default\"]['key-buttons']\n  }, createColumns([getOperateStyle({\n    name: 'AC',\n    fontSize: '16px'\n  }), '7', '4', '1', '0']), createColumns([getOperateStyle({\n    name: '÷'\n  }), '8', '5', '2', '±']), createColumns([getOperateStyle({\n    name: '×'\n  }), '9', '6', '3', '.']), createColumns([getOperateStyle({\n    name: '-'\n  }), getOperateStyle({\n    name: '+',\n    span: 2\n  }), getOperateStyle({\n    name: '=',\n    span: 2,\n    className: specialBtn,\n    style: {\n      color: '#fff'\n    }\n  })]));\n}\nfunction Calculator(_ref3) {\n  var onSave = _ref3.onSave;\n  var _useState = (0, _react.useState)(null),\n    _useState2 = _slicedToArray(_useState, 2),\n    showNotification = _useState2[0],\n    setShowNotification = _useState2[1];\n  var _useState3 = (0, _react.useState)(''),\n    _useState4 = _slicedToArray(_useState3, 2),\n    activeKey = _useState4[0],\n    setActiveKey = _useState4[1]; // 当前键盘点击的按键，用来加acitve效果\n  var _useState5 = (0, _react.useState)('0'),\n    _useState6 = _slicedToArray(_useState5, 2),\n    resultData = _useState6[0],\n    setResultData = _useState6[1];\n  var _useContext = (0, _react.useContext)(_SystemUIProvider.SystemUIContext),\n    close = _useContext.close,\n    uiData = _useContext.uiData;\n  var rootRef = (0, _react.useRef)(null);\n  var _useState7 = (0, _react.useState)([uiData.value ? uiData.value + '' : '0']),\n    _useState8 = _slicedToArray(_useState7, 2),\n    process = _useState8[0],\n    setProcess = _useState8[1];\n  var _useDrag = (0, _useDialogDrag[\"default\"])({\n      dialogWidth: 240\n    }),\n    _useDrag2 = _slicedToArray(_useDrag, 1),\n    setDragRef = _useDrag2[0];\n  var clickButtons = function clickButtons(keyName, save) {\n    if (keyName === 'AC') {\n      setProcess(['0']);\n      setResultData('0');\n      return;\n    }\n    if (keyName === '=') {\n      var newResultData = operateProcess(process);\n      setResultData(newResultData);\n      setProcess([newResultData]);\n      return;\n    }\n    if (keyName === '.') {\n      setProcess(function (process) {\n        var last = process[process.length - 1];\n        if (last.includes('.')) return _toConsumableArray(process);\n        return isNumber(last) ? [].concat(_toConsumableArray(process.pop() && process), [last + '.']) : [].concat(_toConsumableArray(process), ['0.']);\n      });\n    }\n    if (keyName === '±') {\n      setProcess(function (process) {\n        var last = process[process.length - 1];\n        if (isNumber(last)) {\n          if (last === '0') return [].concat(_toConsumableArray(process.pop() && process), ['-0']);\n          return [].concat(_toConsumableArray(process.pop() && process), [Number(last) > 0 ? '-' + last : last.replace('-', '')]);\n        }\n        return [].concat(_toConsumableArray(process), ['-0']);\n      });\n    }\n    if (['+', '-', '×', '÷'].includes(keyName)) {\n      var _newResultData = operateProcess(process);\n      setResultData(_newResultData);\n      setProcess(function (process) {\n        return ['+', '-', '×', '÷'].includes(process[process.length - 1]) ? [].concat(_toConsumableArray(process.pop() && process), [keyName]) : [].concat(_toConsumableArray(process), [keyName]);\n      });\n    }\n    if (isNumber(keyName)) {\n      setProcess(function (process) {\n        var last = process[process.length - 1];\n        if (isNumber(last)) {\n          if (Number(last) > MAX_VALUE) return _toConsumableArray(process);\n          if (last.split('.')[1] && last.split('.')[1].length >= 10) return _toConsumableArray(process);\n        }\n        if (process.length === 1 && last === resultData && Number(last) !== 0) return _toConsumableArray(process);\n        if (last === '0') return [].concat(_toConsumableArray(process.pop() && process), [Number(keyName).toString()]);\n        if (last === '-0') return [].concat(_toConsumableArray(process.pop() && process), [(-1 * Number(keyName)).toString()]);\n        if (isNumber(last) || last === '.') return [].concat(_toConsumableArray(process.pop() && process), [last + '' + keyName]);\n        return [].concat(_toConsumableArray(process), [keyName]);\n      });\n    }\n    if (keyName === 'delete') {\n      setProcess(function (process) {\n        var last = process[process.length - 1];\n        if (process.length === 1 && last === resultData) return _toConsumableArray(process);\n        if (isNumber(last) && last !== 0) {\n          return [].concat(_toConsumableArray(process.pop() && process), [last.replace('-', '').length === 1 ? '0' : last.substr(0, last.length - 1) || '0']);\n        }\n        return _toConsumableArray(process);\n      });\n    }\n\n    // 保存\n    if (save) {\n      // const result = operateProcess(process)\n      // onSave && onSave(result)\n      onSave(resultData);\n    }\n  };\n\n  // 判断是不是数字\n  var isNumber = function isNumber(item) {\n    return /[0-9]+/.test(item);\n  };\n  var operateProcess = function operateProcess(data) {\n    var willCalProcess = _toConsumableArray(data);\n    var result = willCalProcess[0];\n    try {\n      // 先乘除\n      var index = 0;\n      while (index < willCalProcess.length) {\n        var item = willCalProcess[index];\n        if ((item === '×' || item === '÷') && willCalProcess[index - 1] !== undefined && willCalProcess[index + 1] !== undefined) {\n          var number = operate(willCalProcess[index - 1], willCalProcess[index + 1], item);\n          willCalProcess.splice(index - 1, 2);\n          willCalProcess[index - 1] = number;\n        } else {\n          index++;\n        }\n      }\n\n      // 后加减\n      result = willCalProcess[0];\n      willCalProcess.forEach(function (item, index) {\n        if (isNumber(item) && willCalProcess[index - 1]) {\n          result = operate(result, item, willCalProcess[index - 1]);\n        }\n      });\n    } catch (error) {\n      console.log(error);\n      // 计算报错\n      setShowNotification('error');\n      (0, _timers.setTimeout)(function () {\n        return setShowNotification(null);\n      }, 1000);\n      result = '0';\n    }\n    return result;\n  };\n\n  // 加减乘除计算\n  var operate = function operate(numberOne, numberTwo, operation) {\n    var result = 0;\n    var one = (0, _big[\"default\"])(numberOne || '0');\n    var two = (0, _big[\"default\"])(numberTwo || '0');\n    // const bigjsCaclApi = {\n    //   '+': 'plus',\n    //   '-': 'minus',\n    //   '×': 'times',\n    //   '÷': 'div'\n    // }\n    if (operation === '+') {\n      result = one.plus(two);\n    }\n    if (operation === '-') {\n      result = one.minus(two);\n    }\n    if (operation === '×') {\n      result = one.times(two);\n    }\n    if (operation === '÷') {\n      if (two === '0') {\n        result = '0';\n      } else {\n        result = one.div(two);\n      }\n    }\n    if (result.toString().indexOf('e') > -1) return result.toString();\n    var _result$toString$spli = result.toString().split('.'),\n      _result$toString$spli2 = _slicedToArray(_result$toString$spli, 2),\n      integer = _result$toString$spli2[0],\n      decimal = _result$toString$spli2[1];\n    if (integer && integer.length >= 14) result = result.toPrecision(14);\n    if (decimal && decimal.length >= 14) result = result.toFixed(14);\n    return result.toString();\n    // .toPrecision(14).toString()\n  };\n  var renderNotification = function renderNotification() {\n    if (!showNotification) return null;\n    if (showNotification === 'success') {\n      return /*#__PURE__*/_react[\"default\"].createElement(_Notification[\"default\"], {\n        content: \"\\u590D\\u5236\\u6210\\u529F\",\n        type: 0,\n        duration: 1000 // title=\"成功\"\n        ,\n        autoClose: true,\n        showButton: false,\n        tmpStyle: \"success\",\n        onClose: function onClose() {}\n      });\n    } else {\n      return /*#__PURE__*/_react[\"default\"].createElement(_Notification[\"default\"], {\n        content: \"\\u9664\\u6570\\u4E0D\\u80FD\\u4E3A\\u96F6\",\n        type: 0,\n        duration: 1000 // title=\"失败\"\n        ,\n        autoClose: true,\n        showButton: false,\n        tmpStyle: \"error\",\n        onClose: function onClose() {}\n      });\n    }\n  };\n  var onCopy = function onCopy() {\n    (0, _copyToClipboard[\"default\"])(resultData);\n    // 前端调提示信息\n    setShowNotification('success');\n    (0, _timers.setTimeout)(function () {\n      return setShowNotification(null);\n    }, 1000);\n  };\n  var onClose = function onClose() {\n    if (onSave) onSave();\n    close();\n    var pageId = uiData.pageId,\n      _uiData$key = uiData.key,\n      key = _uiData$key === void 0 ? '' : _uiData$key;\n    _global[\"default\"][_global.INVOKE_CUSTOM_EVENT](pageId, '', [key, _client.CUSTOM_EVENT_CLOSE_CALCULATOR, new _big[\"default\"](resultData).toString()], true);\n  };\n  (0, _react.useEffect)(function () {\n    setProcess([uiData.value === undefined ? '0' : uiData.value]);\n  }, [uiData.value]);\n  (0, _react.useEffect)(function () {\n    rootRef.current.focus();\n  }, []);\n  var keyUpHandler = function keyUpHandler() {\n    return setActiveKey('');\n  };\n  var keyDownHandler = function keyDownHandler(e) {\n    // 键盘事件\n    // e.preventDefault()\n    // e.stopPropagation()\n    var keyCode = e.keyCode || e.which || e.charCode;\n    var buttonName = '';\n    var isSave = false; // 按回车是保存\n    // 字母和数字键的键码值\n    // 48 ~ 57 对应的是0 ~ 9\n    // 187对应=+ 189对应-\n    // 数字键盘上的键的键码值\n    // 96 ~ 105 对应的是0 ~ 9\n    if (e.shiftKey) {\n      var arr = {\n        187: '+',\n        56: '*'\n      };\n      buttonName = arr[keyCode] || '';\n    } else {\n      if (keyCode > 47 && keyCode < 58) {\n        buttonName = (keyCode - 48).toString();\n      } else if (keyCode > 95 && keyCode < 106) {\n        buttonName = (keyCode - 96).toString();\n      } else {\n        var _arr = {\n          13: '=',\n          187: '=',\n          189: '-',\n          190: '.',\n          106: '×',\n          107: '+',\n          108: '=',\n          109: '-',\n          110: '.',\n          111: '÷',\n          8: 'delete',\n          46: 'AC'\n        };\n        buttonName = _arr[keyCode] || '';\n        isSave = keyCode === 13;\n      }\n    }\n    if (!buttonName) return false;\n    clickButtons(buttonName, isSave);\n    setActiveKey(buttonName);\n  };\n  var processString = process.join(' ');\n  var result = isNumber(process[process.length - 1]) ? process[process.length - 1] : resultData;\n  return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: _Calculator[\"default\"].calculator,\n    ref: rootRef,\n    onKeyDown: keyDownHandler,\n    onKeyUp: keyUpHandler,\n    tabIndex: 1\n  }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: _Calculator[\"default\"].header,\n    ref: setDragRef\n  }, /*#__PURE__*/_react[\"default\"].createElement(\"i\", {\n    className: \"kdfont kdfont-guanbiyulan\",\n    onClick: onClose\n  })), /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: (0, _classnames[\"default\"])('kd-hover-bgcolor', _Calculator[\"default\"].resultWrap)\n  }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: (0, _classnames[\"default\"])(_Calculator[\"default\"].copy, 'theme-bg'),\n    onClick: onCopy\n  }, \"\\u590D\\u5236\\u7ED3\\u679C\"), /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: _Calculator[\"default\"].cal\n  }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: _Calculator[\"default\"].process,\n    style: {\n      fontSize: \"\".concat(processString.length < 22 ? 14 : 12, \"px\")\n    }\n  }, processString.length > 32 ? /*#__PURE__*/_react[\"default\"].createElement(\"i\", {\n    className: \"kdfont kdfont-shuangjiantou_zuo\"\n  }) : null, /*#__PURE__*/_react[\"default\"].createElement(\"span\", null, processString)), /*#__PURE__*/_react[\"default\"].createElement(\"p\", {\n    className: _Calculator[\"default\"].result,\n    style: {\n      fontSize: \"\".concat(result.length < 16 ? 24 : result.length < 20 ? 20 : 16, \"px\")\n    }\n  }, result))), /*#__PURE__*/_react[\"default\"].createElement(KeyButtons, {\n    onClick: clickButtons,\n    activeKey: activeKey\n  }), renderNotification());\n}\nvar _default = exports[\"default\"] = Calculator;\n\n//# sourceURL=webpack://bos-platform/./src/page/Calculator.js?");

/***/ }),

/***/ "../../node_modules/core-js/modules/es.number.to-precision.js":
/*!********************************************************************!*\
  !*** ../../node_modules/core-js/modules/es.number.to-precision.js ***!
  \********************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"../../node_modules/core-js/internals/export.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"../../node_modules/core-js/internals/fails.js\");\nvar thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ \"../../node_modules/core-js/internals/this-number-value.js\");\n\nvar nativeToPrecision = 1.0.toPrecision;\n\nvar FORCED = fails(function () {\n  // IE7-\n  return nativeToPrecision.call(1, undefined) !== '1';\n}) || !fails(function () {\n  // V8 ~ Android 4.3-\n  nativeToPrecision.call({});\n});\n\n// `Number.prototype.toPrecision` method\n// https://tc39.github.io/ecma262/#sec-number.prototype.toprecision\n$({ target: 'Number', proto: true, forced: FORCED }, {\n  toPrecision: function toPrecision(precision) {\n    return precision === undefined\n      ? nativeToPrecision.call(thisNumberValue(this))\n      : nativeToPrecision.call(thisNumberValue(this), precision);\n  }\n});\n\n\n//# sourceURL=webpack://bos-platform/../../node_modules/core-js/modules/es.number.to-precision.js?");

/***/ }),

/***/ "../../node_modules/setimmediate/setImmediate.js":
/*!*******************************************************!*\
  !*** ../../node_modules/setimmediate/setImmediate.js ***!
  \*******************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

eval("/* provided dependency */ var process = __webpack_require__(/*! process/browser */ \"../../node_modules/process/browser.js\");\n(function (global, undefined) {\n    \"use strict\";\n\n    if (global.setImmediate) {\n        return;\n    }\n\n    var nextHandle = 1; // Spec says greater than zero\n    var tasksByHandle = {};\n    var currentlyRunningATask = false;\n    var doc = global.document;\n    var registerImmediate;\n\n    function setImmediate(callback) {\n      // Callback can either be a function or a string\n      if (typeof callback !== \"function\") {\n        callback = new Function(\"\" + callback);\n      }\n      // Copy function arguments\n      var args = new Array(arguments.length - 1);\n      for (var i = 0; i < args.length; i++) {\n          args[i] = arguments[i + 1];\n      }\n      // Store and register the task\n      var task = { callback: callback, args: args };\n      tasksByHandle[nextHandle] = task;\n      registerImmediate(nextHandle);\n      return nextHandle++;\n    }\n\n    function clearImmediate(handle) {\n        delete tasksByHandle[handle];\n    }\n\n    function run(task) {\n        var callback = task.callback;\n        var args = task.args;\n        switch (args.length) {\n        case 0:\n            callback();\n            break;\n        case 1:\n            callback(args[0]);\n            break;\n        case 2:\n            callback(args[0], args[1]);\n            break;\n        case 3:\n            callback(args[0], args[1], args[2]);\n            break;\n        default:\n            callback.apply(undefined, args);\n            break;\n        }\n    }\n\n    function runIfPresent(handle) {\n        // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n        // So if we're currently running a task, we'll need to delay this invocation.\n        if (currentlyRunningATask) {\n            // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n            // \"too much recursion\" error.\n            setTimeout(runIfPresent, 0, handle);\n        } else {\n            var task = tasksByHandle[handle];\n            if (task) {\n                currentlyRunningATask = true;\n                try {\n                    run(task);\n                } finally {\n                    clearImmediate(handle);\n                    currentlyRunningATask = false;\n                }\n            }\n        }\n    }\n\n    function installNextTickImplementation() {\n        registerImmediate = function(handle) {\n            process.nextTick(function () { runIfPresent(handle); });\n        };\n    }\n\n    function canUsePostMessage() {\n        // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n        // where `global.postMessage` means something completely different and can't be used for this purpose.\n        if (global.postMessage && !global.importScripts) {\n            var postMessageIsAsynchronous = true;\n            var oldOnMessage = global.onmessage;\n            global.onmessage = function() {\n                postMessageIsAsynchronous = false;\n            };\n            global.postMessage(\"\", \"*\");\n            global.onmessage = oldOnMessage;\n            return postMessageIsAsynchronous;\n        }\n    }\n\n    function installPostMessageImplementation() {\n        // Installs an event handler on `global` for the `message` event: see\n        // * https://developer.mozilla.org/en/DOM/window.postMessage\n        // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n        var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n        var onGlobalMessage = function(event) {\n            if (event.source === global &&\n                typeof event.data === \"string\" &&\n                event.data.indexOf(messagePrefix) === 0) {\n                runIfPresent(+event.data.slice(messagePrefix.length));\n            }\n        };\n\n        if (global.addEventListener) {\n            global.addEventListener(\"message\", onGlobalMessage, false);\n        } else {\n            global.attachEvent(\"onmessage\", onGlobalMessage);\n        }\n\n        registerImmediate = function(handle) {\n            global.postMessage(messagePrefix + handle, \"*\");\n        };\n    }\n\n    function installMessageChannelImplementation() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = function(event) {\n            var handle = event.data;\n            runIfPresent(handle);\n        };\n\n        registerImmediate = function(handle) {\n            channel.port2.postMessage(handle);\n        };\n    }\n\n    function installReadyStateChangeImplementation() {\n        var html = doc.documentElement;\n        registerImmediate = function(handle) {\n            // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n            // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n            var script = doc.createElement(\"script\");\n            script.onreadystatechange = function () {\n                runIfPresent(handle);\n                script.onreadystatechange = null;\n                html.removeChild(script);\n                script = null;\n            };\n            html.appendChild(script);\n        };\n    }\n\n    function installSetTimeoutImplementation() {\n        registerImmediate = function(handle) {\n            setTimeout(runIfPresent, 0, handle);\n        };\n    }\n\n    // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n    var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n    attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n    // Don't get fooled by e.g. browserify environments.\n    if ({}.toString.call(global.process) === \"[object process]\") {\n        // For Node.js before 0.9\n        installNextTickImplementation();\n\n    } else if (canUsePostMessage()) {\n        // For non-IE10 modern browsers\n        installPostMessageImplementation();\n\n    } else if (global.MessageChannel) {\n        // For web workers, where supported\n        installMessageChannelImplementation();\n\n    } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n        // For IE 6–8\n        installReadyStateChangeImplementation();\n\n    } else {\n        // For older browsers\n        installSetTimeoutImplementation();\n    }\n\n    attachTo.setImmediate = setImmediate;\n    attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof __webpack_require__.g === \"undefined\" ? this : __webpack_require__.g : self));\n\n\n//# sourceURL=webpack://bos-platform/../../node_modules/setimmediate/setImmediate.js?");

/***/ }),

/***/ "../../node_modules/timers-browserify/main.js":
/*!****************************************************!*\
  !*** ../../node_modules/timers-browserify/main.js ***!
  \****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("var scope = (typeof __webpack_require__.g !== \"undefined\" && __webpack_require__.g) ||\n            (typeof self !== \"undefined\" && self) ||\n            window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n  return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n  return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n  if (timeout) {\n    timeout.close();\n  }\n};\n\nfunction Timeout(id, clearFn) {\n  this._id = id;\n  this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n  this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n  clearTimeout(item._idleTimeoutId);\n  item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n  clearTimeout(item._idleTimeoutId);\n\n  var msecs = item._idleTimeout;\n  if (msecs >= 0) {\n    item._idleTimeoutId = setTimeout(function onTimeout() {\n      if (item._onTimeout)\n        item._onTimeout();\n    }, msecs);\n  }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(/*! setimmediate */ \"../../node_modules/setimmediate/setImmediate.js\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto.  Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n                       (typeof __webpack_require__.g !== \"undefined\" && __webpack_require__.g.setImmediate) ||\n                       (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n                         (typeof __webpack_require__.g !== \"undefined\" && __webpack_require__.g.clearImmediate) ||\n                         (this && this.clearImmediate);\n\n\n//# sourceURL=webpack://bos-platform/../../node_modules/timers-browserify/main.js?");

/***/ }),

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

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"dialog-div-style-success\":\"Notification_dialog-div-style-success_4eXR\",\"dialog-div-style-error\":\"Notification_dialog-div-style-error_2I9b\",\"dialog-div-style-warning\":\"Notification_dialog-div-style-warning_36VL\",\"move-up-in\":\"Notification_move-up-in_1gZ-\",\"MessageMoveIn\":\"Notification_MessageMoveIn_2Dae\",\"move-up-leave\":\"Notification_move-up-leave_xNa3\",\"MessageMoveOut\":\"Notification_MessageMoveOut_3HE4\",\"img-style\":\"Notification_img-style_2lMj\",\"tip-div-style-success\":\"Notification_tip-div-style-success_hQJl\",\"tip-div-style-error\":\"Notification_tip-div-style-error_3FZW\",\"tip-div-style-warning\":\"Notification_tip-div-style-warning_1GUX\",\"desc-div-style-success\":\"Notification_desc-div-style-success_3rEx\",\"color-success\":\"Notification_color-success_12_p\",\"desc-div-style-error\":\"Notification_desc-div-style-error_1V-k\",\"color-error\":\"Notification_color-error_1Q7O\",\"desc-div-style-warning\":\"Notification_desc-div-style-warning_k1_c\",\"color-warning\":\"Notification_color-warning_2Mlz\",\"close-div-style\":\"Notification_close-div-style_1GZi\",\"button-div\":\"Notification_button-div_2ygj\",\"link\":\"Notification_link_3c-t\",\"switch\":\"Notification_switch_sVcP\",\"last\":\"Notification_last_1DB7\",\"next\":\"Notification_next_DpQZ\",\"number\":\"Notification_number_2fL1\",\"absolute\":\"Notification_absolute_hssL\",\"desc-show-button\":\"Notification_desc-show-button_1z5C\"});\n\n//# sourceURL=webpack://bos-platform/./src/component/web/base/Notification.less?");

/***/ }),

/***/ "./src/page/Calculator.less":
/*!**********************************!*\
  !*** ./src/page/Calculator.less ***!
  \**********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"calculator\":\"Calculator_calculator_2KAP\",\"icon\":\"Calculator_icon_2zBc\",\"header\":\"Calculator_header__MzW\",\"resultWrap\":\"Calculator_resultWrap_CRz8\",\"copy\":\"Calculator_copy_2Wcc\",\"cal\":\"Calculator_cal_n8Zg\",\"font-style\":\"Calculator_font-style_2cAp\",\"process\":\"Calculator_process_2QSh\",\"result\":\"Calculator_result_3mY1\",\"key-buttons\":\"Calculator_key-buttons_2IAK\",\"column\":\"Calculator_column_1y48\",\"cell\":\"Calculator_cell_1zVs\",\"special-hover-btn\":\"Calculator_special-hover-btn_2eb8\"});\n\n//# sourceURL=webpack://bos-platform/./src/page/Calculator.less?");

/***/ })

}]);