{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\node_modules\\@jiaminghi\\data-view\\lib\\components\\percentPond\\src\\main.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\@jiaminghi\\data-view\\lib\\components\\percentPond\\src\\main.vue","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\babel.config.js","mtime":1675214572901},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xypm-web/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport \"core-js/modules/es6.regexp.replace\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { uuid } from \"../../../util/index\";\nimport { deepMerge } from '@jiaminghi/charts/lib/util/index';\nimport { deepClone } from '@jiaminghi/c-render/lib/plugin/util';\nexport default {\n  name: 'DvPercentPond',\n  props: {\n    config: {\n      type: Object,\n      default: function _default() {\n        return {};\n      }\n    }\n  },\n  data: function data() {\n    var id = uuid();\n    return {\n      gradientId1: \"percent-pond-gradientId1-\".concat(id),\n      gradientId2: \"percent-pond-gradientId2-\".concat(id),\n      width: 0,\n      height: 0,\n      defaultConfig: {\n        /**\n         * @description Value\n         * @type {Number}\n         * @default value = 0\n         */\n        value: 0,\n\n        /**\n         * @description Colors (hex|rgb|rgba|color keywords)\n         * @type {Array<String>}\n         * @default colors = ['#00BAFF', '#3DE7C9']\n         * @example colors = ['#000', 'rgb(0, 0, 0)', 'rgba(0, 0, 0, 1)', 'red']\n         */\n        colors: ['#3DE7C9', '#00BAFF'],\n\n        /**\n         * @description Border width\n         * @type {Number}\n         * @default borderWidth = 3\n         */\n        borderWidth: 3,\n\n        /**\n         * @description Gap between border and pond\n         * @type {Number}\n         * @default borderGap = 3\n         */\n        borderGap: 3,\n\n        /**\n         * @description Line dash\n         * @type {Array<Number>}\n         * @default lineDash = [5, 1]\n         */\n        lineDash: [5, 1],\n\n        /**\n         * @description Text color\n         * @type {String}\n         * @default textColor = '#fff'\n         */\n        textColor: '#fff',\n\n        /**\n         * @description Border radius\n         * @type {Number}\n         * @default borderRadius = 5\n         */\n        borderRadius: 5,\n\n        /**\n         * @description Local Gradient\n         * @type {Boolean}\n         * @default localGradient = false\n         * @example localGradient = false | true\n         */\n        localGradient: false,\n\n        /**\n         * @description Formatter\n         * @type {String}\n         * @default formatter = '{value}%'\n         */\n        formatter: '{value}%'\n      },\n      mergedConfig: null\n    };\n  },\n  computed: {\n    rectWidth: function rectWidth() {\n      var mergedConfig = this.mergedConfig,\n          width = this.width;\n      if (!mergedConfig) return 0;\n      var borderWidth = mergedConfig.borderWidth;\n      return width - borderWidth;\n    },\n    rectHeight: function rectHeight() {\n      var mergedConfig = this.mergedConfig,\n          height = this.height;\n      if (!mergedConfig) return 0;\n      var borderWidth = mergedConfig.borderWidth;\n      return height - borderWidth;\n    },\n    points: function points() {\n      var mergedConfig = this.mergedConfig,\n          width = this.width,\n          height = this.height;\n      var halfHeight = height / 2;\n      if (!mergedConfig) return \"0, \".concat(halfHeight, \" 0, \").concat(halfHeight);\n      var borderWidth = mergedConfig.borderWidth,\n          borderGap = mergedConfig.borderGap,\n          value = mergedConfig.value;\n      var polylineLength = (width - (borderWidth + borderGap) * 2) / 100 * value;\n      return \"\\n        \".concat(borderWidth + borderGap, \", \").concat(halfHeight, \"\\n        \").concat(borderWidth + borderGap + polylineLength, \", \").concat(halfHeight + 0.001, \"\\n      \");\n    },\n    polylineWidth: function polylineWidth() {\n      var mergedConfig = this.mergedConfig,\n          height = this.height;\n      if (!mergedConfig) return 0;\n      var borderWidth = mergedConfig.borderWidth,\n          borderGap = mergedConfig.borderGap;\n      return height - (borderWidth + borderGap) * 2;\n    },\n    linearGradient: function linearGradient() {\n      var mergedConfig = this.mergedConfig;\n      if (!mergedConfig) return [];\n      var colors = mergedConfig.colors;\n      var colorNum = colors.length;\n      var colorOffsetGap = 100 / (colorNum - 1);\n      return colors.map(function (c, i) {\n        return [colorOffsetGap * i, c];\n      });\n    },\n    polylineGradient: function polylineGradient() {\n      var gradientId1 = this.gradientId1,\n          gradientId2 = this.gradientId2,\n          mergedConfig = this.mergedConfig;\n      if (!mergedConfig) return gradientId2;\n      if (mergedConfig.localGradient) return gradientId1;\n      return gradientId2;\n    },\n    gradient2XPos: function gradient2XPos() {\n      var mergedConfig = this.mergedConfig;\n      if (!mergedConfig) return '100%';\n      var value = mergedConfig.value;\n      return \"\".concat(200 - value, \"%\");\n    },\n    details: function details() {\n      var mergedConfig = this.mergedConfig;\n      if (!mergedConfig) return '';\n      var value = mergedConfig.value,\n          formatter = mergedConfig.formatter;\n      return formatter.replace('{value}', value);\n    }\n  },\n  watch: {\n    config: function config() {\n      var mergeConfig = this.mergeConfig;\n      mergeConfig();\n    }\n  },\n  methods: {\n    init: function () {\n      var _init = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n        var initWH, config, mergeConfig;\n        return regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                initWH = this.initWH, config = this.config, mergeConfig = this.mergeConfig;\n                _context.next = 3;\n                return initWH();\n\n              case 3:\n                if (config) {\n                  _context.next = 5;\n                  break;\n                }\n\n                return _context.abrupt(\"return\");\n\n              case 5:\n                mergeConfig();\n\n              case 6:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function init() {\n        return _init.apply(this, arguments);\n      }\n\n      return init;\n    }(),\n    initWH: function () {\n      var _initWH = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n        var $nextTick, $refs, _$refs$percentPond, clientWidth, clientHeight;\n\n        return regeneratorRuntime.wrap(function _callee2$(_context2) {\n          while (1) {\n            switch (_context2.prev = _context2.next) {\n              case 0:\n                $nextTick = this.$nextTick, $refs = this.$refs;\n                _context2.next = 3;\n                return $nextTick();\n\n              case 3:\n                _$refs$percentPond = $refs['percent-pond'], clientWidth = _$refs$percentPond.clientWidth, clientHeight = _$refs$percentPond.clientHeight;\n                this.width = clientWidth;\n                this.height = clientHeight;\n\n              case 6:\n              case \"end\":\n                return _context2.stop();\n            }\n          }\n        }, _callee2, this);\n      }));\n\n      function initWH() {\n        return _initWH.apply(this, arguments);\n      }\n\n      return initWH;\n    }(),\n    mergeConfig: function mergeConfig() {\n      var config = this.config,\n          defaultConfig = this.defaultConfig;\n      this.mergedConfig = deepMerge(deepClone(defaultConfig, true), config || {});\n    }\n  },\n  mounted: function mounted() {\n    var init = this.init;\n    init();\n  }\n};",null]}