{"version":3,"file":"g2-simple.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 1906ef40ce2ac9b2ee78","webpack:///./src/util.js","webpack:///./node_modules/@antv/g/lib/util/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/util/index.js","webpack:///./node_modules/@antv/util/lib/each.js","webpack:///./node_modules/@antv/component/lib/util.js","webpack:///./node_modules/@antv/util/lib/type/is-array.js","webpack:///./node_modules/@antv/util/lib/type/is-nil.js","webpack:///./node_modules/@antv/g/lib/core/shape.js","webpack:///./src/global.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/shape.js","webpack:///./node_modules/@antv/util/lib/mix.js","webpack:///./node_modules/@antv/util/lib/type/is-number.js","webpack:///./node_modules/@antv/util/lib/type/is-string.js","webpack:///./node_modules/@antv/util/lib/type/is-function.js","webpack:///./node_modules/@antv/util/lib/type/is-type.js","webpack:///./node_modules/@antv/util/lib/type/is-array-like.js","webpack:///./node_modules/@antv/component/lib/const.js","webpack:///./node_modules/@antv/component/lib/guide/base.js","webpack:///./src/renderer.js","webpack:///./node_modules/d3-color/src/index.js","webpack:///./node_modules/@antv/scale/lib/base.js","webpack:///./src/geom/shape/shape.js","webpack:///./node_modules/@antv/util/lib/type/is-object.js","webpack:///./src/geom/base.js","webpack:///./node_modules/@antv/component/lib/index.js","webpack:///./src/geom/util/path.js","webpack:///./node_modules/@antv/util/lib/to-string.js","webpack:///./node_modules/@antv/util/lib/deep-mix.js","webpack:///./node_modules/@antv/util/lib/type/is-plain-object.js","webpack:///./node_modules/@antv/util/lib/to-array.js","webpack:///./node_modules/@antv/util/lib/math/is-number-equal.js","webpack:///./node_modules/@antv/g/lib/util/format.js","webpack:///./node_modules/d3-interpolate/src/color.js","webpack:///./node_modules/@antv/attr/lib/base.js","webpack:///./node_modules/@antv/adjust/lib/base.js","webpack:///./node_modules/@antv/component/lib/axis/base.js","webpack:///./node_modules/@antv/component/lib/component.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/util/format.js","webpack:///./node_modules/@antv/scale/lib/linear.js","webpack:///./node_modules/@antv/util/lib/clone.js","webpack:///./node_modules/@antv/util/lib/is-equal.js","webpack:///./node_modules/@antv/util/lib/math/clamp.js","webpack:///./node_modules/@antv/util/lib/matrix/mat3.js","webpack:///./node_modules/@antv/g/lib/shapes/math/line.js","webpack:///./node_modules/@antv/g/lib/shapes/math/arc.js","webpack:///./node_modules/@antv/g/lib/shapes/util/arrow.js","webpack:///./node_modules/@antv/g/lib/shapes/util/path-segment.js","webpack:///./node_modules/d3-interpolate/src/number.js","webpack:///./node_modules/@antv/util/lib/array/contains.js","webpack:///./node_modules/@antv/util/lib/array/merge.js","webpack:///./node_modules/@antv/util/lib/matrix/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/line.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/arc.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/util/arrow.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/util/path-segment.js","webpack:///./node_modules/@antv/coord/lib/base.js","webpack:///./src/geom/util/shape.js","webpack:///./node_modules/@antv/g/lib/util/common.js","webpack:///./node_modules/@antv/util/lib/type/is-boolean.js","webpack:///./node_modules/@antv/util/lib/is-empty.js","webpack:///./node_modules/@antv/util/lib/unique-id.js","webpack:///./node_modules/@antv/util/lib/type/is-object-like.js","webpack:///./node_modules/@antv/util/lib/string/upper-first.js","webpack:///./node_modules/@antv/util/lib/extend.js","webpack:///./node_modules/@antv/util/lib/augment.js","webpack:///./node_modules/@antv/util/lib/array/pull.js","webpack:///./node_modules/@antv/util/lib/math/to-radian.js","webpack:///./node_modules/@antv/util/lib/math/to-degree.js","webpack:///./node_modules/@antv/util/lib/math/mod.js","webpack:///./node_modules/@antv/util/lib/dom/create-dom.js","webpack:///./node_modules/@antv/util/lib/dom/modify-css.js","webpack:///./node_modules/@antv/util/lib/dom/request-animation-frame.js","webpack:///./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js","webpack:///./node_modules/@antv/util/lib/matrix/vec2.js","webpack:///./node_modules/@antv/util/lib/matrix/vec3.js","webpack:///./node_modules/@antv/util/lib/matrix/transform.js","webpack:///./node_modules/@antv/g/lib/event.js","webpack:///./node_modules/@antv/g/lib/shapes/util/inside.js","webpack:///./node_modules/@antv/g/lib/shapes/math/cubic.js","webpack:///./node_modules/@antv/g/lib/shapes/marker.js","webpack:///./node_modules/@antv/g/lib/util/path.js","webpack:///./node_modules/d3-timer/src/timer.js","webpack:///./node_modules/d3-interpolate/src/value.js","webpack:///./node_modules/d3-color/src/color.js","webpack:///./node_modules/d3-color/src/define.js","webpack:///./node_modules/d3-interpolate/src/basis.js","webpack:///./node_modules/@antv/util/lib/filter.js","webpack:///./node_modules/@antv/util/lib/array/values-of-key.js","webpack:///./node_modules/wolfy87-eventemitter/EventEmitter.js","webpack:///./src/geom/label/geom-labels.js","webpack:///./node_modules/@antv/component/lib/base.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/util/inside.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/cubic.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/marker.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/util/path.js","webpack:///./node_modules/@antv/component/lib/legend/continuous.js","webpack:///./node_modules/@antv/component/lib/tooltip/base.js","webpack:///./node_modules/@antv/scale/lib/time-util.js","webpack:///./node_modules/d3-timer/src/index.js","webpack:///./node_modules/d3-ease/src/index.js","webpack:///./node_modules/@antv/attr/lib/index.js","webpack:///./node_modules/@antv/scale/lib/index.js","webpack:///./node_modules/@antv/util/lib/string/lower-first.js","webpack:///./node_modules/@antv/scale/lib/auto/util.js","webpack:///./node_modules/@antv/scale/lib/category.js","webpack:///./node_modules/@antv/scale/lib/auto/cat.js","webpack:///./node_modules/fecha/fecha.js","webpack:///./node_modules/@antv/util/lib/type/is-date.js","webpack:///./node_modules/@antv/g/lib/index.js","webpack:///./node_modules/@antv/util/lib/type/get-type.js","webpack:///./node_modules/@antv/util/lib/type/is-prototype.js","webpack:///./node_modules/@antv/g/lib/core/group.js","webpack:///./node_modules/@antv/g/lib/core/element.js","webpack:///./node_modules/@antv/g/lib/core/event-emitter.js","webpack:///./node_modules/@antv/g/lib/shapes/math/quadratic.js","webpack:///./node_modules/@antv/g/lib/shapes/math/ellipse.js","webpack:///./node_modules/@antv/g/lib/shapes/arc.js","webpack:///./node_modules/@antv/g/lib/shapes/circle.js","webpack:///./node_modules/@antv/g/lib/shapes/dom.js","webpack:///./node_modules/@antv/g/lib/shapes/ellipse.js","webpack:///./node_modules/@antv/g/lib/shapes/fan.js","webpack:///./node_modules/@antv/g/lib/shapes/image.js","webpack:///./node_modules/@antv/g/lib/shapes/line.js","webpack:///./node_modules/@antv/g/lib/shapes/path.js","webpack:///./node_modules/@antv/g/lib/shapes/polygon.js","webpack:///./node_modules/@antv/g/lib/shapes/polyline.js","webpack:///./node_modules/@antv/g/lib/shapes/rect.js","webpack:///./node_modules/@antv/g/lib/shapes/text.js","webpack:///./node_modules/d3-ease/src/math.js","webpack:///./node_modules/d3-interpolate/index.js","webpack:///./node_modules/d3-color/src/math.js","webpack:///./node_modules/d3-interpolate/src/rgb.js","webpack:///./node_modules/d3-interpolate/src/basisClosed.js","webpack:///./node_modules/d3-interpolate/src/constant.js","webpack:///./node_modules/d3-interpolate/src/array.js","webpack:///./node_modules/d3-interpolate/src/date.js","webpack:///./node_modules/d3-interpolate/src/object.js","webpack:///./node_modules/d3-interpolate/src/string.js","webpack:///./src/animate/animate.js","webpack:///./node_modules/@antv/util/lib/index.js","webpack:///./node_modules/@antv/util/lib/object/is-match.js","webpack:///./node_modules/@antv/util/lib/object/keys.js","webpack:///./node_modules/@antv/util/lib/array/pull-at.js","webpack:///./node_modules/@antv/util/lib/array/uniq.js","webpack:///./node_modules/@antv/util/lib/math/max-by.js","webpack:///./node_modules/@antv/util/lib/math/to-integer.js","webpack:///./node_modules/@antv/util/lib/object/has.js","webpack:///./node_modules/@antv/util/lib/object/values.js","webpack:///./node_modules/@antv/util/lib/path/rect-path.js","webpack:///./node_modules/@antv/util/lib/path/parse-path-array.js","webpack:///./node_modules/@antv/util/lib/path/path2curve.js","webpack:///./node_modules/@antv/util/lib/path/path2absolute.js","webpack:///./node_modules/@antv/util/lib/path/parse-path-string.js","webpack:///./node_modules/@antv/util/lib/path/catmull-rom2bezier.js","webpack:///./node_modules/@antv/util/lib/string/lower-case.js","webpack:///./node_modules/@antv/util/lib/string/upper-case.js","webpack:///./node_modules/@antv/util/lib/group.js","webpack:///./node_modules/@antv/util/lib/group-to-map.js","webpack:///./node_modules/@antv/util/lib/group-by.js","webpack:///./src/chart/chart.js","webpack:///./src/base.js","webpack:///./node_modules/@antv/attr/lib/color-util.js","webpack:///./node_modules/@antv/adjust/lib/mixin/adjust.js","webpack:///./src/theme/index.js","webpack:///./src/theme/default.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/util/common.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/event.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/group.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/element.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/quadratic.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/ellipse.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/arc.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/circle.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/dom.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/ellipse.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/fan.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/image.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/line.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/path.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/polygon.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/polyline.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/rect.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/text.js","webpack:///./node_modules/@antv/component/lib/axis/grid.js","webpack:///./node_modules/@antv/component/lib/label/base.js","webpack:///./node_modules/@antv/component/lib/label/utils/greedy.js","webpack:///./node_modules/@antv/component/lib/guide/util/helper.js","webpack:///./node_modules/@antv/component/lib/legend/category.js","webpack:///./node_modules/@antv/component/lib/legend/base.js","webpack:///./node_modules/@antv/component/lib/legend/cat-html.js","webpack:///./node_modules/@antv/component/lib/tooltip/crosshair.js","webpack:///./node_modules/@antv/component/lib/tooltip/mixin/position.js","webpack:///./node_modules/@antv/component/lib/tooltip/mixin/marker-group.js","webpack:///./node_modules/@antv/component/lib/tooltip/canvas.js","webpack:///./src/geom/label/polar-labels.js","webpack:///./src/geom/mixin/zindex-util.js","webpack:///./src/chart/controller/index.js","webpack:///./src/chart/util/bbox-of-back-plot.js","webpack:///./src/chart/util/merge-bbox.js","webpack:///./src/chart/util/plot-range2bbox.js","webpack:///./src/core.js","webpack:///./node_modules/@antv/scale/lib/auto/number.js","webpack:///./node_modules/@antv/scale/lib/identity.js","webpack:///./node_modules/@antv/scale/lib/time.js","webpack:///./node_modules/@antv/scale/lib/auto/time.js","webpack:///./node_modules/@antv/scale/lib/time-cat.js","webpack:///./node_modules/@antv/scale/lib/log.js","webpack:///./node_modules/@antv/scale/lib/pow.js","webpack:///./node_modules/@antv/g/lib/canvas.js","webpack:///./node_modules/detect-browser/es/index.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/@antv/gl-matrix/lib/gl-matrix/mat3.js","webpack:///./node_modules/@antv/gl-matrix/lib/gl-matrix/vec2.js","webpack:///./node_modules/@antv/gl-matrix/lib/gl-matrix/vec3.js","webpack:///./node_modules/@antv/g/lib/core/mixin/event.js","webpack:///./node_modules/@antv/g/lib/core/mixin/attribute.js","webpack:///./node_modules/@antv/g/lib/core/mixin/transform.js","webpack:///./node_modules/@antv/g/lib/core/mixin/animation.js","webpack:///./node_modules/@antv/g/lib/core/advanced-event-emitter.js","webpack:///./node_modules/@antv/g/lib/shapes/index.js","webpack:///./node_modules/@antv/g/lib/core/mixin/isPointInPath.js","webpack:///./node_modules/@antv/g/lib/core/mixin/timeline.js","webpack:///./node_modules/d3-timer/src/timeout.js","webpack:///./node_modules/d3-timer/src/interval.js","webpack:///./node_modules/d3-ease/src/linear.js","webpack:///./node_modules/d3-ease/src/quad.js","webpack:///./node_modules/d3-ease/src/cubic.js","webpack:///./node_modules/d3-ease/src/poly.js","webpack:///./node_modules/d3-ease/src/sin.js","webpack:///./node_modules/d3-ease/src/exp.js","webpack:///./node_modules/d3-ease/src/circle.js","webpack:///./node_modules/d3-ease/src/bounce.js","webpack:///./node_modules/d3-ease/src/back.js","webpack:///./node_modules/d3-ease/src/elastic.js","webpack:///./node_modules/d3-color/src/lab.js","webpack:///./node_modules/d3-color/src/cubehelix.js","webpack:///./node_modules/d3-interpolate/src/round.js","webpack:///./node_modules/d3-interpolate/src/transform/index.js","webpack:///./node_modules/d3-interpolate/src/transform/parse.js","webpack:///./node_modules/d3-interpolate/src/transform/decompose.js","webpack:///./node_modules/d3-interpolate/src/zoom.js","webpack:///./node_modules/d3-interpolate/src/hsl.js","webpack:///./node_modules/d3-interpolate/src/lab.js","webpack:///./node_modules/d3-interpolate/src/hcl.js","webpack:///./node_modules/d3-interpolate/src/cubehelix.js","webpack:///./node_modules/d3-interpolate/src/quantize.js","webpack:///./node_modules/@antv/g/lib/renderers/index.js","webpack:///./node_modules/@antv/g/lib/renderers/canvas/index.js","webpack:///./node_modules/@antv/g/lib/renderers/canvas/painter.js","webpack:///./node_modules/@antv/g/lib/renderers/canvas/util.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/index.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/painter.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/defs.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/defs/gradient.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/defs/shadow.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/defs/arrow.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/defs/clip.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/defs/pattern.js","webpack:///./node_modules/@antv/g/lib/renderers/svg/getShape.js","webpack:///./node_modules/@antv/util/lib/dom/index.js","webpack:///./node_modules/@antv/util/lib/dom/add-event-listener.js","webpack:///./node_modules/@antv/util/lib/dom/get-bounding-client-rect.js","webpack:///./node_modules/@antv/util/lib/dom/get-height.js","webpack:///./node_modules/@antv/util/lib/dom/get-outer-height.js","webpack:///./node_modules/@antv/util/lib/dom/get-outer-width.js","webpack:///./node_modules/@antv/util/lib/dom/get-ratio.js","webpack:///./node_modules/@antv/util/lib/dom/get-style.js","webpack:///./node_modules/@antv/util/lib/dom/get-width.js","webpack:///./node_modules/@antv/util/lib/array/index.js","webpack:///./node_modules/@antv/util/lib/array/difference.js","webpack:///./node_modules/@antv/util/lib/array/find.js","webpack:///./node_modules/@antv/util/lib/array/first-value.js","webpack:///./node_modules/@antv/util/lib/array/flatten.js","webpack:///./node_modules/@antv/util/lib/array/flatten-deep.js","webpack:///./node_modules/@antv/util/lib/array/get-range.js","webpack:///./node_modules/@antv/util/lib/array/reduce.js","webpack:///./node_modules/@antv/util/lib/array/remove.js","webpack:///./node_modules/@antv/util/lib/array/sort-by.js","webpack:///./node_modules/@antv/util/lib/array/union.js","webpack:///./node_modules/@antv/util/lib/event/index.js","webpack:///./node_modules/@antv/util/lib/event/get-wrap-behavior.js","webpack:///./node_modules/@antv/util/lib/event/wrap-behavior.js","webpack:///./node_modules/@antv/util/lib/format/index.js","webpack:///./node_modules/@antv/util/lib/format/number2color.js","webpack:///./node_modules/@antv/util/lib/format/parse-path.js","webpack:///./node_modules/@antv/util/lib/format/parse-radius.js","webpack:///./node_modules/@antv/util/lib/math/index.js","webpack:///./node_modules/@antv/util/lib/math/fixed-base.js","webpack:///./node_modules/@antv/util/lib/math/is-decimal.js","webpack:///./node_modules/@antv/util/lib/math/is-even.js","webpack:///./node_modules/@antv/util/lib/math/is-integer.js","webpack:///./node_modules/@antv/util/lib/math/is-negative.js","webpack:///./node_modules/@antv/util/lib/math/is-odd.js","webpack:///./node_modules/@antv/util/lib/math/is-positive.js","webpack:///./node_modules/@antv/util/lib/math/min-by.js","webpack:///./node_modules/@antv/util/lib/object/index.js","webpack:///./node_modules/@antv/util/lib/object/for-in.js","webpack:///./node_modules/@antv/util/lib/object/has-key.js","webpack:///./node_modules/@antv/util/lib/object/has-value.js","webpack:///./node_modules/@antv/util/lib/path/index.js","webpack:///./node_modules/@antv/util/lib/path/path-intersection.js","webpack:///./node_modules/@antv/util/lib/path/fill-path.js","webpack:///./node_modules/@antv/util/lib/path/fill-path-by-diff.js","webpack:///./node_modules/@antv/util/lib/path/is-segment-equal.js","webpack:///./node_modules/@antv/util/lib/path/format-path.js","webpack:///./node_modules/@antv/util/lib/string/index.js","webpack:///./node_modules/@antv/util/lib/string/lc.js","webpack:///./node_modules/@antv/util/lib/string/substitute.js","webpack:///./node_modules/@antv/util/lib/string/uc.js","webpack:///./node_modules/@antv/util/lib/type/index.js","webpack:///./node_modules/@antv/util/lib/type/is-null.js","webpack:///./node_modules/@antv/util/lib/type/is-undefined.js","webpack:///./node_modules/@antv/util/lib/type/is-reg-exp.js","webpack:///./node_modules/@antv/util/lib/type/is-arguments.js","webpack:///./node_modules/@antv/util/lib/type/is-error.js","webpack:///./node_modules/@antv/util/lib/debounce.js","webpack:///./node_modules/@antv/util/lib/index-of.js","webpack:///./node_modules/@antv/util/lib/is-equal-with.js","webpack:///./node_modules/@antv/util/lib/map.js","webpack:///./node_modules/@antv/util/lib/pick.js","webpack:///./node_modules/@antv/util/lib/throttle.js","webpack:///./src/animate/action.js","webpack:///./src/chart/view.js","webpack:///./node_modules/@antv/attr/lib/position.js","webpack:///./node_modules/@antv/attr/lib/color.js","webpack:///./node_modules/@antv/attr/lib/shape.js","webpack:///./node_modules/@antv/attr/lib/size.js","webpack:///./node_modules/@antv/attr/lib/opacity.js","webpack:///./node_modules/@antv/adjust/lib/index.js","webpack:///./node_modules/@antv/adjust/lib/dodge.js","webpack:///./node_modules/@antv/adjust/lib/stack.js","webpack:///./node_modules/@antv/adjust/lib/mixin/dodge.js","webpack:///./node_modules/@antv/adjust/lib/mixin/stack.js","webpack:///./node_modules/@antv/adjust/lib/jitter.js","webpack:///./node_modules/@antv/adjust/lib/symmetric.js","webpack:///./src/theme/dark.js","webpack:///./src/geom/label/index.js","webpack:///./node_modules/@antv/component/lib/axis/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/canvas.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/mixin/attribute.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/mixin/transform.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/mixin/animation.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/mixin/isPointInPath.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/core/mixin/timeline.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/canvas/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/canvas/painter.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/canvas/util.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/index.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/painter.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/defs.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/defs/gradient.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/defs/shadow.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/defs/arrow.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/defs/clip.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/defs/pattern.js","webpack:///./node_modules/@antv/component/node_modules/@antv/g/lib/renderers/svg/getShape.js","webpack:///./node_modules/@antv/component/lib/label/utils/position-adjust.js","webpack:///./node_modules/@antv/component/lib/label/utils/spiral-adjust.js","webpack:///./node_modules/@antv/component/lib/label/utils/bbox-adjust.js","webpack:///./node_modules/@antv/component/lib/axis/circle.js","webpack:///./node_modules/@antv/component/lib/axis/helix.js","webpack:///./node_modules/@antv/component/lib/axis/line.js","webpack:///./node_modules/@antv/component/lib/axis/polyline.js","webpack:///./node_modules/@antv/component/lib/guide/index.js","webpack:///./node_modules/@antv/component/lib/guide/arc.js","webpack:///./node_modules/@antv/component/lib/guide/data-marker.js","webpack:///./node_modules/@antv/component/lib/guide/data-region.js","webpack:///./node_modules/@antv/component/lib/guide/html.js","webpack:///./node_modules/@antv/component/lib/guide/image.js","webpack:///./node_modules/@antv/component/lib/guide/line.js","webpack:///./node_modules/@antv/component/lib/guide/region.js","webpack:///./node_modules/@antv/component/lib/guide/text.js","webpack:///./node_modules/@antv/component/lib/label/index.js","webpack:///./node_modules/@antv/component/lib/legend/index.js","webpack:///./node_modules/@antv/component/lib/legend/cat-page-html.js","webpack:///./node_modules/@antv/component/lib/legend/color.js","webpack:///./node_modules/@antv/component/lib/legend/slider.js","webpack:///./node_modules/@antv/component/lib/legend/size.js","webpack:///./node_modules/@antv/component/lib/legend/size-circle.js","webpack:///./node_modules/@antv/component/lib/tooltip/index.js","webpack:///./node_modules/@antv/component/lib/tooltip/html.js","webpack:///./node_modules/@antv/component/lib/tooltip/theme.js","webpack:///./node_modules/@antv/component/lib/tooltip/mini.js","webpack:///./src/geom/util/spline.js","webpack:///./src/geom/label/pie-labels.js","webpack:///./src/geom/label/interval-labels.js","webpack:///./src/geom/mixin/tooltip.js","webpack:///./src/geom/mixin/active.js","webpack:///./src/geom/mixin/select.js","webpack:///./src/geom/util/parse-fields.js","webpack:///./src/chart/controller/scale.js","webpack:///./src/chart/controller/coord.js","webpack:///./node_modules/@antv/coord/lib/index.js","webpack:///./node_modules/@antv/coord/lib/cartesian.js","webpack:///./node_modules/@antv/coord/lib/polar.js","webpack:///./node_modules/@antv/coord/lib/helix.js","webpack:///./src/chart/controller/axis.js","webpack:///./src/chart/controller/guide.js","webpack:///./src/component/guide/index.js","webpack:///./src/component/guide/region-filter.js","webpack:///./src/chart/controller/legend.js","webpack:///./src/component/legend/tail.js","webpack:///./src/chart/controller/tooltip.js","webpack:///./src/chart/controller/event.js","webpack:///./src/animate/index.js","webpack:///./src/component/plot.js","webpack:///./src/geom/mixin/size.js","webpack:///./src/geom/mixin/split.js","webpack:///./src/geom/path.js","webpack:///./src/geom/interval.js","webpack:///./src/geom/shape/interval.js","webpack:///./src/geom/line.js","webpack:///./src/geom/shape/line.js","webpack:///./src/geom/point.js","webpack:///./src/geom/shape/point.js","webpack:///./src/simple.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"G2_3\"] = factory();\n\telse\n\t\troot[\"G2_3\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 562);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 1906ef40ce2ac9b2ee78","/**\n * @fileOverview The util method based on the lodash.\n * @author dxq613@gmail.com\n * @see https://github.com/lodash/lodash\n */\nvar Utils = require('@antv/util/lib');\n\nvar G = require('./renderer');\n\nvar Util = Utils.mix({}, Utils, {\n assign: Utils.mix,\n // simple mix\n merge: Utils.deepMix,\n // deep mix\n cloneDeep: Utils.clone,\n isFinite: isFinite,\n isNaN: isNaN,\n snapEqual: Utils.isNumberEqual,\n remove: Utils.pull,\n inArray: Utils.contains,\n\n /**\n * 将用户输入的 padding 转换成 [top, right, bottom, right] 的模式\n * @param {Number|Array} padding 输入的padding\n * @return {Array} 四个padding 值\n */\n toAllPadding: function toAllPadding(padding) {\n var top = 0;\n var left = 0;\n var right = 0;\n var bottom = 0;\n\n if (Util.isNumber(padding) || Util.isString(padding)) {\n top = left = right = bottom = padding;\n } else if (Util.isArray(padding)) {\n top = padding[0];\n right = !Util.isNil(padding[1]) ? padding[1] : padding[0];\n bottom = !Util.isNil(padding[2]) ? padding[2] : padding[0];\n left = !Util.isNil(padding[3]) ? padding[3] : right;\n } else if (Util.isObject(padding)) {\n top = padding.top || 0;\n right = padding.right || 0;\n bottom = padding.bottom || 0;\n left = padding.left || 0;\n }\n\n return [top, right, bottom, left];\n },\n getClipByRange: function getClipByRange(plotRange) {\n var tl = plotRange.tl,\n br = plotRange.br;\n var clip = new G.Rect({\n attrs: {\n x: tl.x,\n y: tl.y,\n width: br.x - tl.x,\n height: br.y - tl.y\n }\n });\n return clip;\n }\n});\nUtil.Array = {\n groupToMap: Utils.groupToMap,\n group: Utils.group,\n merge: Utils.merge,\n values: Utils.valuesOfKey,\n getRange: Utils.getRange,\n firstValue: Utils.firstValue,\n remove: Utils.pull\n};\nmodule.exports = Util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/util.js\n// module id = 0\n// module chunks = 0 1 2","var CommonUtil = require('./common');\n\nvar Util = {};\nCommonUtil.merge(Util, CommonUtil, {\n isColorProp: function isColorProp(k) {\n // 是否是颜色属性\n return ['fill', 'stroke', 'fillStyle', 'strokeStyle'].includes(k);\n },\n isGradientColor: function isGradientColor(v) {\n // 是否是渐变色\n return /^[r,R,L,l]{1}[\\s]*\\(/.test(v);\n },\n mixin: function mixin(c, mixins) {\n var Param = c.CFG ? 'CFG' : 'ATTRS';\n\n if (c && mixins) {\n c._mixins = mixins;\n c[Param] = c[Param] || {};\n var temp = {};\n Util.each(mixins, function (mixin) {\n Util.augment(c, mixin);\n var attrs = mixin[Param];\n\n if (attrs) {\n Util.merge(temp, attrs);\n }\n });\n c[Param] = Util.merge(temp, c[Param]);\n }\n }\n});\nmodule.exports = Util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/util/index.js\n// module id = 1\n// module chunks = 0 1 2","var CommonUtil = require('./common');\n\nvar Util = {};\nCommonUtil.merge(Util, CommonUtil, {\n mixin: function mixin(c, mixins) {\n var Param = c.CFG ? 'CFG' : 'ATTRS';\n\n if (c && mixins) {\n c._mixins = mixins;\n c[Param] = c[Param] || {};\n var temp = {};\n Util.each(mixins, function (mixin) {\n Util.augment(c, mixin);\n var attrs = mixin[Param];\n\n if (attrs) {\n Util.merge(temp, attrs);\n }\n });\n c[Param] = Util.merge(temp, c[Param]);\n }\n }\n});\nmodule.exports = Util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/util/index.js\n// module id = 2\n// module chunks = 0 1 2","var isObject = require('./type/is-object');\n\nvar isArray = require('./type/is-array');\n\nvar each = function each(elements, func) {\n if (!elements) {\n return;\n }\n\n var rst = void 0;\n\n if (isArray(elements)) {\n for (var i = 0, len = elements.length; i < len; i++) {\n rst = func(elements[i], i);\n\n if (rst === false) {\n break;\n }\n }\n } else if (isObject(elements)) {\n for (var k in elements) {\n if (elements.hasOwnProperty(k)) {\n rst = func(elements[k], k);\n\n if (rst === false) {\n break;\n }\n }\n }\n }\n};\n\nmodule.exports = each;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/each.js\n// module id = 3\n// module chunks = 0 1 2","/**\n * @fileOverview The util method based on the lodash.\n * @author dxq613@gmail.com\n */\nvar G = require('@antv/g/lib');\n\nvar Utils = require('@antv/util/lib');\n\nvar Util = Utils.mix({\n assign: Utils.mix,\n isFinite: isFinite,\n isNaN: isNaN,\n Group: G.Group,\n Event: G.Event\n}, Utils);\nmodule.exports = Util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/util.js\n// module id = 4\n// module chunks = 0 1 2","var isType = require('./is-type');\n\nvar isArray = Array.isArray ? Array.isArray : function (value) {\n return isType(value, 'Array');\n};\nmodule.exports = isArray;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-array.js\n// module id = 5\n// module chunks = 0 1 2","// isFinite,\nvar isNil = function isNil(value) {\n /**\n * isNil(null) => true\n * isNil() => true\n */\n return value === null || value === undefined;\n};\n\nmodule.exports = isNil;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-nil.js\n// module id = 6\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar isPointInPath = require('./mixin/isPointInPath');\n\nvar Element = require('./element');\n\nvar Inside = require('../shapes/util/inside');\n\nvar CLONE_CFGS = ['zIndex', 'capture', 'visible'];\n\nvar Shape = function Shape(cfg) {\n Shape.superclass.constructor.call(this, cfg);\n};\n\nShape.ATTRS = {};\nUtil.extend(Shape, Element);\nvar ARRAY_ATTRS = {\n matrix: 'matrix',\n path: 'path',\n points: 'points',\n lineDash: 'lineDash'\n};\n\nfunction _cloneArrayAttr(arr) {\n var result = [];\n\n for (var i = 0; i < arr.length; i++) {\n if (Util.isArray(arr[i])) {\n result.push([].concat(arr[i]));\n } else {\n result.push(arr[i]);\n }\n }\n\n return result;\n}\n\nUtil.augment(Shape, isPointInPath, {\n isShape: true,\n drawInner: function drawInner(context) {\n var self = this;\n var attrs = self._attrs;\n self.createPath(context);\n var originOpacity = context.globalAlpha;\n\n if (self.hasFill()) {\n var fillOpacity = attrs.fillOpacity;\n\n if (!Util.isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n context.fill();\n context.globalAlpha = originOpacity;\n } else {\n context.fill();\n }\n }\n\n if (self.hasStroke()) {\n var lineWidth = self._attrs.lineWidth;\n\n if (lineWidth > 0) {\n var strokeOpacity = attrs.strokeOpacity;\n\n if (!Util.isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = strokeOpacity;\n }\n\n context.stroke();\n }\n }\n\n self.afterPath(context);\n },\n afterPath: function afterPath() {},\n\n /**\n * 击中图形时是否进行包围盒判断\n * @return {Boolean} [description]\n */\n isHitBox: function isHitBox() {\n return true;\n },\n\n /**\n * 节点是否能够被击中\n * @param {Number} x x坐标\n * @param {Number} y y坐标\n * @return {Boolean} 是否在图形中\n */\n isHit: function isHit(x, y) {\n var self = this;\n var v = [x, y, 1];\n self.invert(v); // canvas\n\n if (self.isHitBox()) {\n var box = self.getBBox();\n\n if (box && !Inside.box(box.minX, box.maxX, box.minY, box.maxY, v[0], v[1])) {\n return false;\n }\n }\n\n var clip = self._attrs.clip;\n\n if (clip) {\n clip.invert(v, self.get('canvas'));\n\n if (clip.isPointInPath(v[0], v[1])) {\n return self.isPointInPath(v[0], v[1]);\n }\n } else {\n return self.isPointInPath(v[0], v[1]);\n }\n\n return false;\n },\n\n /**\n * @protected\n * 计算包围盒\n * @return {Object} 包围盒\n */\n calculateBox: function calculateBox() {\n return null;\n },\n // 获取拾取时线的宽度,需要考虑附加的线的宽度\n getHitLineWidth: function getHitLineWidth() {\n var attrs = this._attrs; // if (!attrs.stroke) {\n // return 0;\n // }\n\n var lineAppendWidth = attrs.lineAppendWidth || 0;\n var lineWidth = attrs.lineWidth || 0;\n return lineWidth + lineAppendWidth;\n },\n // 清除当前的矩阵\n clearTotalMatrix: function clearTotalMatrix() {\n this._cfg.totalMatrix = null;\n this._cfg.region = null;\n },\n clearBBox: function clearBBox() {\n this._cfg.box = null;\n this._cfg.region = null;\n },\n getBBox: function getBBox() {\n var box = this._cfg.box; // 延迟计算\n\n if (!box) {\n box = this.calculateBox();\n\n if (box) {\n box.x = box.minX;\n box.y = box.minY;\n box.width = box.maxX - box.minX;\n box.height = box.maxY - box.minY;\n }\n\n this._cfg.box = box;\n }\n\n return box;\n },\n clone: function clone() {\n var self = this;\n var clone = null;\n var _attrs = self._attrs;\n var attrs = {};\n Util.each(_attrs, function (i, k) {\n if (ARRAY_ATTRS[k] && Util.isArray(_attrs[k])) {\n attrs[k] = _cloneArrayAttr(_attrs[k]);\n } else {\n attrs[k] = _attrs[k];\n }\n });\n clone = new self.constructor({\n attrs: attrs\n }); // 对于一些在 cfg 中的特殊属性做 clone\n\n Util.each(CLONE_CFGS, function (cfg) {\n clone._cfg[cfg] = self._cfg[cfg];\n });\n return clone;\n }\n});\nmodule.exports = Shape;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/core/shape.js\n// module id = 7\n// module chunks = 0 1 2","/**\n * @fileOverview 全局变量\n * @author dxq613\n */\nvar Util = require('./util');\n\nvar Theme = require('./theme/index');\n\nvar Global = {\n version: '3.5.19',\n renderer: 'canvas',\n // trackable: false,\n trackingInfo: {},\n animate: true,\n widthRatio: {\n // 宽度所占的分类的比例\n column: 1 / 2,\n // 一般的柱状图占比 1/2\n rose: 0.9999999,\n // 玫瑰图柱状占比 1\n multiplePie: 1 / 1.3 // 多层的饼图、环图\n\n },\n // 折线图、区域图、path 当只有一个数据时,是否显示成点\n showSinglePoint: false,\n connectNulls: false,\n scales: {},\n registerTheme: function registerTheme(name, theme) {\n Theme[name] = theme;\n },\n setTheme: function setTheme(theme) {\n var newTheme = {};\n\n if (Util.isObject(theme)) {\n newTheme = theme;\n } else if (Util.indexOf(Object.keys(Theme), theme) !== -1) {\n newTheme = Theme[theme];\n } else {\n newTheme = Theme.default;\n }\n\n Util.deepMix(Global, newTheme);\n }\n};\nGlobal.setTheme('default');\nmodule.exports = Global;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/global.js\n// module id = 8\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar isPointInPath = require('./mixin/isPointInPath');\n\nvar Element = require('./element');\n\nvar Inside = require('../shapes/util/inside');\n\nvar Shape = function Shape(cfg) {\n Shape.superclass.constructor.call(this, cfg);\n};\n\nShape.ATTRS = {};\nUtil.extend(Shape, Element);\nvar ARRAY_ATTRS = {\n matrix: 'matrix',\n path: 'path',\n points: 'points',\n lineDash: 'lineDash'\n};\n\nfunction _cloneArrayAttr(arr) {\n var result = [];\n\n for (var i = 0; i < arr.length; i++) {\n if (Util.isArray(arr[i])) {\n result.push([].concat(arr[i]));\n } else {\n result.push(arr[i]);\n }\n }\n\n return result;\n}\n\nUtil.augment(Shape, isPointInPath, {\n isShape: true,\n drawInner: function drawInner(context) {\n var self = this;\n var attrs = self._attrs;\n self.createPath(context);\n var originOpacity = context.globalAlpha;\n\n if (self.hasFill()) {\n var fillOpacity = attrs.fillOpacity;\n\n if (!Util.isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n context.fill();\n context.globalAlpha = originOpacity;\n } else {\n context.fill();\n }\n }\n\n if (self.hasStroke()) {\n var lineWidth = self._attrs.lineWidth;\n\n if (lineWidth > 0) {\n var strokeOpacity = attrs.strokeOpacity;\n\n if (!Util.isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = strokeOpacity;\n }\n\n context.stroke();\n }\n }\n\n self.afterPath(context);\n },\n afterPath: function afterPath() {},\n\n /**\n * 击中图形时是否进行包围盒判断\n * @return {Boolean} [description]\n */\n isHitBox: function isHitBox() {\n return true;\n },\n\n /**\n * 节点是否能够被击中\n * @param {Number} x x坐标\n * @param {Number} y y坐标\n * @return {Boolean} 是否在图形中\n */\n isHit: function isHit(x, y) {\n var self = this;\n var v = [x, y, 1];\n self.invert(v); // canvas\n\n if (self.isHitBox()) {\n var box = self.getBBox();\n\n if (box && !Inside.box(box.minX, box.maxX, box.minY, box.maxY, v[0], v[1])) {\n return false;\n }\n }\n\n var clip = self._attrs.clip;\n\n if (clip) {\n clip.invert(v, self.get('canvas'));\n\n if (clip.isPointInPath(v[0], v[1])) {\n return self.isPointInPath(v[0], v[1]);\n }\n } else {\n return self.isPointInPath(v[0], v[1]);\n }\n\n return false;\n },\n\n /**\n * @protected\n * 计算包围盒\n * @return {Object} 包围盒\n */\n calculateBox: function calculateBox() {\n return null;\n },\n // 获取拾取时线的宽度,需要考虑附加的线的宽度\n getHitLineWidth: function getHitLineWidth() {\n var attrs = this._attrs; // if (!attrs.stroke) {\n // return 0;\n // }\n\n var lineAppendWidth = attrs.lineAppendWidth || 0;\n var lineWidth = attrs.lineWidth || 0;\n return lineWidth + lineAppendWidth;\n },\n // 清除当前的矩阵\n clearTotalMatrix: function clearTotalMatrix() {\n this._cfg.totalMatrix = null;\n this._cfg.region = null;\n },\n clearBBox: function clearBBox() {\n this._cfg.box = null;\n this._cfg.region = null;\n },\n getBBox: function getBBox() {\n var box = this._cfg.box; // 延迟计算\n\n if (!box) {\n box = this.calculateBox();\n\n if (box) {\n box.x = box.minX;\n box.y = box.minY;\n box.width = box.maxX - box.minX;\n box.height = box.maxY - box.minY;\n }\n\n this._cfg.box = box;\n }\n\n return box;\n },\n clone: function clone() {\n var self = this;\n var clone = null;\n var _attrs = self._attrs;\n var attrs = {};\n Util.each(_attrs, function (i, k) {\n if (ARRAY_ATTRS[k] && Util.isArray(_attrs[k])) {\n attrs[k] = _cloneArrayAttr(_attrs[k]);\n } else {\n attrs[k] = _attrs[k];\n }\n });\n clone = new self.constructor({\n attrs: attrs\n }); // zIndex也是绘图属性,但是在cfg中,特殊处理\n\n clone._cfg.zIndex = self._cfg.zIndex;\n return clone;\n }\n});\nmodule.exports = Shape;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/core/shape.js\n// module id = 9\n// module chunks = 0 1 2","function _mix(dist, obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {\n dist[key] = obj[key];\n }\n }\n}\n\nvar mix = function mix(dist, src1, src2, src3) {\n if (src1) _mix(dist, src1);\n if (src2) _mix(dist, src2);\n if (src3) _mix(dist, src3);\n return dist;\n};\n\nmodule.exports = mix;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/mix.js\n// module id = 10\n// module chunks = 0 1 2","/**\n * 判断是否数字\n * @return {Boolean} 是否数字\n */\nvar isType = require('./is-type');\n\nvar isNumber = function isNumber(value) {\n return isType(value, 'Number');\n};\n\nmodule.exports = isNumber;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-number.js\n// module id = 11\n// module chunks = 0 1 2","var isType = require('./is-type');\n\nvar isString = function isString(str) {\n return isType(str, 'String');\n};\n\nmodule.exports = isString;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-string.js\n// module id = 12\n// module chunks = 0 1 2","/**\n * 是否为函数\n * @param {*} fn 对象\n * @return {Boolean} 是否函数\n */\nvar isType = require('./is-type');\n\nvar isFunction = function isFunction(value) {\n return isType(value, 'Function');\n};\n\nmodule.exports = isFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-function.js\n// module id = 13\n// module chunks = 0 1 2","var toString = {}.toString;\n\nvar isType = function isType(value, type) {\n return toString.call(value) === '[object ' + type + ']';\n};\n\nmodule.exports = isType;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-type.js\n// module id = 14\n// module chunks = 0 1 2","var isArrayLike = function isArrayLike(value) {\n /**\n * isArrayLike([1, 2, 3]) => true\n * isArrayLike(document.body.children) => true\n * isArrayLike('abc') => true\n * isArrayLike(Function) => false\n */\n return value !== null && typeof value !== 'function' && isFinite(value.length);\n};\n\nmodule.exports = isArrayLike;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-array-like.js\n// module id = 15\n// module chunks = 0 1 2","module.exports = {\n FONT_FAMILY: 'BlinkMacSystemFont, \"Segoe UI\", Roboto,\"Helvetica Neue\", Helvetica, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\",SimSun, \"sans-serif\"'\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/const.js\n// module id = 16\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nvar Util = require('../util');\n\nvar Helper = require('./util/helper');\n\nvar Component = require('../component');\n\nvar KEYWORDS = ['min', 'max', 'median', 'start', 'end'];\n\nvar Guide = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Guide, _Component);\n\n function Guide() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = Guide.prototype;\n\n _proto.getDefaultCfg = function getDefaultCfg() {\n var cfg = _Component.prototype.getDefaultCfg.call(this);\n\n return Util.mix({}, cfg, {\n xScales: null,\n yScales: null,\n el: null\n });\n };\n\n _proto.render = function render() {}\n /**\n * clear container\n * @override\n */\n ;\n\n _proto.clear = function clear() {\n var self = this;\n var el = self.get('el');\n el && el.remove();\n this.set('el', null);\n };\n\n _proto.destroy = function destroy() {\n this.clear();\n\n _Component.prototype.destroy.call(this);\n }\n /**\n * show or hide\n * @protected\n * @param {Boolean} visible true means show, false means hide\n */\n ;\n\n _proto.changeVisible = function changeVisible(visible) {\n var self = this;\n self.set('visible', visible);\n var el = self.get('el');\n if (!el) return;\n\n if (el.set) {\n el.set('visible', visible);\n } else {\n el.style.display = visible ? '' : 'none';\n }\n }\n /**\n * calculate the canvas coordinate value\n * @protected\n * @param {Coordinate} coord the instance of Coordinate class\n * @param {Object | Array | Function} position the value need to convert\n * @return {Object} return the result\n */\n ;\n\n _proto.parsePoint = function parsePoint(coord, position) {\n var self = this;\n var xScales = self.get('xScales');\n var yScales = self.get('yScales');\n\n if (Util.isFunction(position)) {\n position = position(xScales, yScales);\n }\n\n var x;\n var y; // 如果数据格式是 ['50%', '50%'] 的格式\n\n if (Util.isArray(position) && Util.isString(position[0]) && position[0].indexOf('%') !== -1) {\n return this._parsePercentPoint(coord, position);\n }\n\n if (Util.isArray(position)) {\n // Array,suuport for mixing of keyword, percent and value\n x = self._getNormalizedValue(position[0], Helper.getFirstScale(xScales));\n y = self._getNormalizedValue(position[1], Helper.getFirstScale(yScales));\n } else {\n for (var field in position) {\n var value = position[field];\n\n if (xScales[field]) {\n x = self._getNormalizedValue(value, xScales[field]);\n }\n\n if (yScales[field]) {\n y = self._getNormalizedValue(value, yScales[field], 'y');\n }\n }\n }\n\n if (!Util.isNil(x) && !Util.isNil(y) && !isNaN(x) && !isNaN(y)) {\n return coord.convert({\n x: x,\n y: y\n });\n }\n\n return null;\n }\n /**\n * Normalized the value\n * @param {String | Number} val param\n * @param {Scale} scale the instance of Scale\n * @return {Number} return the normalized value\n */\n ;\n\n _proto._getNormalizedValue = function _getNormalizedValue(val, scale) {\n var result;\n\n if (Util.indexOf(KEYWORDS, val) !== -1) {\n // keyword\n var scaleValue;\n\n if (val === 'start') {\n // the start of coordinate\n result = 0;\n } else if (val === 'end') {\n result = 1;\n } else if (val === 'median') {\n scaleValue = scale.isCategory ? (scale.values.length - 1) / 2 : (scale.min + scale.max) / 2;\n result = scale.scale(scaleValue);\n } else {\n if (scale.isCategory) {\n scaleValue = val === 'min' ? 0 : scale.values.length - 1;\n } else {\n scaleValue = scale[val];\n }\n\n result = scale.scale(scaleValue);\n }\n } else {\n // 数值\n result = scale.scale(val);\n }\n\n return result;\n };\n\n _proto._parsePercentPoint = function _parsePercentPoint(coord, position) {\n var xPercent = parseFloat(position[0]) / 100;\n var yPercent = parseFloat(position[1]) / 100;\n var start = coord.start,\n end = coord.end;\n var topLeft = {\n x: Math.min(start.x, end.x),\n y: Math.min(start.y, end.y)\n };\n var x = coord.width * xPercent + topLeft.x;\n var y = coord.height * yPercent + topLeft.y;\n return {\n x: x,\n y: y\n };\n };\n\n return Guide;\n}(Component);\n\nmodule.exports = Guide;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/guide/base.js\n// module id = 17\n// module chunks = 0 1 2","var G = require('@antv/g/lib');\n\nmodule.exports = G;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/renderer.js\n// module id = 18\n// module chunks = 0 1 2","export { default as color, rgb, hsl } from \"./color.js\";\nexport { default as lab, hcl, lch, gray } from \"./lab.js\";\nexport { default as cubehelix } from \"./cubehelix.js\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-color/src/index.js\n// module id = 19\n// module chunks = 0 1 2","var mix = require('@antv/util/lib/mix');\n\nvar each = require('@antv/util/lib/each');\n\nvar isObject = require('@antv/util/lib/type/is-object');\n\nvar isNil = require('@antv/util/lib/type/is-nil');\n\nvar Scale = /*#__PURE__*/function () {\n var _proto = Scale.prototype;\n\n _proto._initDefaultCfg = function _initDefaultCfg() {\n this.type = 'base';\n /**\n * 格式化函数,输出文本或者tick时的格式化函数\n * @type {Function}\n */\n\n this.formatter = null;\n /**\n * 输出的值域\n * @type {Array}\n */\n\n this.range = [0, 1];\n /**\n * 度量的标记\n * @type {Array}\n */\n\n this.ticks = null;\n /**\n * 参与度量计算的值,可选项\n * @type {Array}\n */\n\n this.values = [];\n };\n\n function Scale(cfg) {\n this._initDefaultCfg();\n\n mix(this, cfg);\n this.init();\n }\n /**\n * 度量初始化\n * @protected\n */\n\n\n _proto.init = function init() {}\n /**\n * 获取该度量的ticks,返回的是多个对象,\n * - text: tick 的文本\n * - value: 对应的度量转换后的值\n * \n * [\n * {text: 0,value:0}\n * {text: 1,value:0.2}\n * {text: 2,value:0.4}\n * {text: 3,value:0.6}\n * {text: 4,value:0.8}\n * {text: 5,value:1}\n * ]\n *
\n * @param {Number} count 输出tick的个数的近似值,默认是 10\n * @return {Array} 返回 ticks 数组\n */\n ;\n\n _proto.getTicks = function getTicks() {\n var self = this;\n var ticks = self.ticks;\n var rst = [];\n each(ticks, function (tick) {\n var obj;\n\n if (isObject(tick)) {\n obj = tick;\n } else {\n obj = {\n text: self.getText(tick),\n tickValue: tick,\n value: self.scale(tick)\n };\n }\n\n rst.push(obj);\n });\n return rst;\n }\n /**\n * 获取格式化后的文本\n * @param {*} value 输入的数据\n * @param {*} key 字段的 key\n * @return {String} 格式化的文本\n */\n ;\n\n _proto.getText = function getText(value, key) {\n var formatter = this.formatter;\n value = formatter ? formatter(value, key) : value;\n\n if (isNil(value) || !value.toString) {\n value = '';\n }\n\n return value.toString();\n }\n /**\n * 输出的值域最小值\n * @protected\n * @return {Number} 返回最小的值\n */\n ;\n\n _proto.rangeMin = function rangeMin() {\n return this.range[0];\n }\n /**\n * 输出的值域最大值\n * @protected\n * @return {Number} 返回最大的值\n */\n ;\n\n _proto.rangeMax = function rangeMax() {\n var range = this.range;\n return range[range.length - 1];\n }\n /**\n * 度量转换后的结果,翻转回输入域\n * @param {Number} value 需要翻转的数值\n * @return {*} 度量的输入值\n */\n ;\n\n _proto.invert = function invert(value) {\n return value;\n }\n /**\n * 将传入的值从非数值转换成数值格式,如分类字符串、时间字符串等\n * @param {*} value 传入的值\n * @return {Number} 转换的值\n */\n ;\n\n _proto.translate = function translate(value) {\n return value;\n }\n /**\n * 进行度量转换\n * @param {*} value 输入值\n * @return {Number} 输出值,在设定的输出值域之间,默认[0,1]\n */\n ;\n\n _proto.scale = function scale(value) {\n return value;\n }\n /**\n * 克隆一个新的scale,拥有跟当前scale相同的输入域、输出域等\n * @return {Scale} 克隆的度量\n */\n ;\n\n _proto.clone = function clone() {\n var self = this;\n var constr = self.constructor;\n var cfg = {};\n each(self, function (v, k) {\n cfg[k] = self[k];\n });\n return new constr(cfg);\n }\n /**\n * 更改度量的属性信息\n * @param {Object} info 属性信息\n * @chainable\n * @return {Scale} 返回自身的引用\n */\n ;\n\n _proto.change = function change(info) {\n this.ticks = null;\n mix(this, info);\n this.init();\n return this;\n };\n\n return Scale;\n}();\n\nmodule.exports = Scale;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/base.js\n// module id = 20\n// module chunks = 0 1 2","/**\n * @fileOverview 工厂类,管理各种类型的 shape\n * @author dxq613@gmail.com\n */\nvar Util = require('../../util');\n\nvar PathUtil = require('../util/path');\n\nvar GPath = Util.PathUtil;\nvar Shape = {};\nvar ShapeBase = {\n _coord: null,\n\n /**\n * 绘制图形\n * @param {Object} cfg 配置项\n * @param {Object} container 容器\n * @return {Object} shape 创建的 shape\n */\n draw: function draw(cfg, container) {\n if (this.drawShape) {\n return this.drawShape(cfg, container);\n }\n\n return null;\n },\n\n /**\n * 获取绘制图形需要的点, 可以不定义,则使用默认的\n getPoints(cfg) {\n if (this.getShapePoints) {\n return this.getShapePoints(cfg);\n }\n return null;\n },*/\n\n /**\n * 设置坐标系\n * @param {Coord} coord 坐标系\n */\n setCoord: function setCoord(coord) {\n this._coord = coord;\n },\n\n /**\n * 0~1 path 转 画布 path\n * @param {path} path 路径\n * @param {Boolean} islineToArc 是否转换成圆弧\n * @return {path} path 转换到画布坐标的path\n */\n parsePath: function parsePath(path, islineToArc) {\n var coord = this._coord;\n path = GPath.parsePathString(path);\n\n if (coord.isPolar && islineToArc !== false) {\n path = PathUtil.convertPolarPath(coord, path);\n } else {\n path = PathUtil.convertNormalPath(coord, path);\n }\n\n return path;\n },\n\n /**\n * 0~1 point 转 画布 point\n * @param {point} point 节点\n * @return {point} point 转换后的点\n */\n parsePoint: function parsePoint(point) {\n var coord = this._coord;\n return coord.convertPoint(point);\n },\n\n /**\n * 0~1 points 转 画布 points\n * @param {points} points 节点集合\n * @return {points} points 转换后的多个节点\n */\n parsePoints: function parsePoints(points) {\n var coord = this._coord;\n var rst = [];\n Util.each(points, function (point) {\n rst.push(coord.convertPoint(point));\n });\n return rst;\n }\n};\nvar ShapeFactoryBase = {\n defaultShapeType: null,\n setCoord: function setCoord(coord) {\n this._coord = coord;\n },\n getShape: function getShape(type) {\n var self = this;\n\n if (Util.isArray(type)) {\n type = type[0];\n }\n\n var shape = self[type] || self[self.defaultShapeType];\n shape._coord = self._coord;\n return shape;\n },\n getShapePoints: function getShapePoints(type, cfg) {\n var shape = this.getShape(type);\n var fn = shape.getPoints || shape.getShapePoints || this.getDefaultPoints;\n var points = fn(cfg);\n return points;\n },\n getDefaultPoints: function getDefaultPoints() {\n return [];\n },\n getMarkerCfg: function getMarkerCfg(type, cfg) {\n var shape = this.getShape(type);\n\n if (!shape.getMarkerCfg) {\n var defaultShapeType = this.defaultShapeType;\n shape = this.getShape(defaultShapeType);\n }\n\n return shape.getMarkerCfg(cfg);\n },\n getSelectedCfg: function getSelectedCfg() {\n return {};\n },\n drawShape: function drawShape(type, cfg, container) {\n var shape = this.getShape(type);\n var gShape = shape.draw(cfg, container);\n\n if (gShape) {\n gShape.setSilent('origin', cfg.origin);\n gShape._id = cfg.yIndex ? cfg._id + cfg.yIndex : cfg._id;\n gShape.name = this.name;\n }\n\n return gShape;\n }\n}; // 注册 Geometry 获取图形的入口\n\nShape.registerFactory = function (factoryName, cfg) {\n var className = Util.upperFirst(factoryName);\n var geomObj = Util.assign({}, ShapeFactoryBase, cfg);\n Shape[className] = geomObj;\n geomObj.name = factoryName;\n return geomObj;\n}; // 注册图形\n\n\nShape.registerShape = function (factoryName, shapeType, cfg) {\n var className = Util.upperFirst(factoryName);\n var factory = Shape[className];\n var shapeObj = Util.assign({}, ShapeBase, cfg);\n factory[shapeType] = shapeObj;\n return shapeObj;\n}; // 获得Geom 对应的 shapeFactory\n\n\nShape.getShapeFactory = function (factoryName) {\n var self = this;\n factoryName = factoryName || 'point';\n var className = Util.upperFirst(factoryName);\n return self[className];\n};\n\nmodule.exports = Shape;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/geom/shape/shape.js\n// module id = 21\n// module chunks = 0 1 2","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar isObject = function isObject(value) {\n /**\n * isObject({}) => true\n * isObject([1, 2, 3]) => true\n * isObject(Function) => true\n * isObject(null) => false\n */\n var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n return value !== null && type === 'object' || type === 'function';\n};\n\nmodule.exports = isObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-object.js\n// module id = 22\n// module chunks = 0 1 2","function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview 所有 Geometry 的基类\n * @author dxq613@gmail.com\n */\nvar Attr = require('@antv/attr/lib');\n\nvar Adjust = require('@antv/adjust/lib');\n\nvar Base = require('../base');\n\nvar Util = require('../util');\n\nvar Global = require('../global');\n\nvar Labels = require('./label/index');\n\nvar Shape = require('./shape/shape');\n\nvar TooltipMixin = require('./mixin/tooltip');\n\nvar ActiveMixin = require('./mixin/active');\n\nvar SelectMixin = require('./mixin/select');\n\nvar parseFields = require('./util/parse-fields');\n\nvar GROUP_ATTRS = ['color', 'shape', 'size'];\nvar FIELD_ORIGIN = '_origin'; // 转换成对象的数组 [{type: 'adjust'}]\n\nfunction parseAdjusts(adjusts) {\n // 如果是字符串或者对象转换成数组\n if (Util.isString(adjusts) || Util.isPlainObject(adjusts)) {\n adjusts = [adjusts];\n }\n\n Util.each(adjusts, function (adjust, index) {\n if (!Util.isObject(adjust)) {\n adjusts[index] = {\n type: adjust\n };\n }\n });\n return adjusts;\n}\n/**\n * 几何标记\n * @class Geom\n */\n\n\nvar GeomBase = /*#__PURE__*/function (_Base) {\n _inheritsLoose(GeomBase, _Base);\n\n var _proto = GeomBase.prototype;\n\n /**\n * 获取默认的配置属性\n * @protected\n * @return {Object} 默认属性\n */\n _proto.getDefaultCfg = function getDefaultCfg() {\n return {\n /**\n * 标记 _id 用于区分执行动画\n * @type {String}\n */\n _id: null,\n\n /**\n * 类型\n * @type {String}\n */\n type: 'base',\n\n /**\n * 坐标系\n * @type {Object}\n */\n coord: null,\n\n /**\n * 属性映射集\n * @protected\n * @type {Object}\n */\n attrs: {},\n\n /**\n * 所属的View\n * @type {View}\n */\n view: null,\n\n /**\n * 几何标记显示的数据\n * @type {Array}\n */\n data: [],\n\n /**\n * 相关的度量\n * @type {Object}\n */\n scales: {},\n\n /**\n * 绘图容器\n * @type {Object}\n */\n container: null,\n\n /**\n * 文本容器\n * @type {Object}\n */\n labelContainer: null,\n\n /**\n * 图形容器\n * @type {Object}\n */\n shapeContainer: null,\n\n /**\n * 几何标记的一些配置项,用于延迟生成图表\n * @type {Object}\n */\n attrOptions: {},\n // 样式配置项\n styleOptions: null,\n // 选中时的配置项\n selectedOptions: null,\n // active 时的配置项\n activedOptions: null,\n\n /**\n * 某些类存在默认的adjust,不能更改 adjust\n * @type {Boolean}\n */\n hasDefaultAdjust: false,\n // 数据调整类型\n adjusts: null,\n\n /**\n * 使用形状的类型\n * @protected\n * @type {String}\n */\n shapeType: null,\n\n /**\n * 是否生成多个点来绘制图形\n * @protected\n * @type {Boolean}\n */\n generatePoints: false,\n\n /**\n * 数据是否进行排序\n * @type {Boolean}\n */\n sortable: false,\n labelCfg: null,\n\n /**\n * 是否共享 tooltip\n * @type {Boolean}\n */\n shareTooltip: true,\n tooltipCfg: null,\n\n /**\n * 是否执行动画,默认执行\n * @type {Boolean}\n */\n animate: true,\n\n /**\n * 动画配置\n * @type {[type]}\n */\n animateCfg: null,\n visible: true\n };\n };\n\n function GeomBase(cfg) {\n var _this;\n\n _this = _Base.call(this, cfg) || this;\n _this.viewTheme = _this.get('viewTheme');\n Util.assign(_assertThisInitialized(_this), TooltipMixin, ActiveMixin, SelectMixin);\n\n if (_this.get('container')) {\n _this._initContainer();\n }\n\n _this._initOptions();\n\n return _this;\n } // 初始化时对配置项的格式化\n\n\n _proto._initOptions = function _initOptions() {\n var adjusts = this.get('adjusts');\n\n if (adjusts) {\n adjusts = parseAdjusts(adjusts);\n this.set('adjusts', adjusts);\n }\n };\n\n _proto._createScale = function _createScale(field, data) {\n var scales = this.get('scales');\n var scale = scales[field];\n\n if (!scale) {\n scale = this.get('view').createScale(field, data);\n scales[field] = scale;\n }\n\n return scale;\n };\n\n _proto._setAttrOptions = function _setAttrOptions(attrName, attrCfg) {\n var options = this.get('attrOptions');\n options[attrName] = attrCfg;\n };\n\n _proto._createAttrOption = function _createAttrOption(attrName, field, cfg, defaultValues) {\n var attrCfg = {};\n attrCfg.field = field;\n\n if (cfg) {\n if (Util.isFunction(cfg)) {\n attrCfg.callback = cfg;\n } else {\n attrCfg.values = cfg;\n }\n } else if (attrName !== 'color') {\n attrCfg.values = defaultValues;\n }\n\n this._setAttrOptions(attrName, attrCfg);\n }\n /**\n * 位置属性映射\n * @chainable\n * @param {String} field 字段名\n * @return {Geom} geom 当前几何标记\n */\n ;\n\n _proto.position = function position(field) {\n this._setAttrOptions('position', {\n field: field\n });\n\n return this;\n }\n /**\n * 颜色属性映射\n * @chainable\n * @param {String} field 字段名\n * @param {Array|Function} values 颜色的数组或者回调函数\n * @return {Geom} geom 当前几何标记\n */\n ;\n\n _proto.color = function color(field, values) {\n var viewTheme = this.viewTheme || Global;\n\n this._createAttrOption('color', field, values, viewTheme.colors);\n\n return this;\n }\n /**\n * 大小属性映射\n * @chainable\n * @param {String} field 字段名\n * @param {Array|Function} values 大小的数组或者回调函数\n * @return {Geom} geom 当前几何标记\n */\n ;\n\n _proto.size = function size(field, values) {\n var viewTheme = this.viewTheme || Global;\n\n this._createAttrOption('size', field, values, viewTheme.sizes);\n\n return this;\n }\n /**\n * 形状属性映射\n * @chainable\n * @param {String} field 字段名\n * @param {Array|Function} values 大小的数组或者回调函数\n * @return {Geom} geom 当前几何标记\n */\n ;\n\n _proto.shape = function shape(field, values) {\n var viewTheme = this.viewTheme || Global;\n var type = this.get('type');\n var shapes = viewTheme.shapes[type] || [];\n\n this._createAttrOption('shape', field, values, shapes);\n\n return this;\n }\n /**\n * 透明度属性映射\n * @chainable\n * @param {String} field 字段名\n * @param {Array|Function} values 透明度的数组或者回调函数\n * @return {Geom} geom 当前几何标记\n */\n ;\n\n _proto.opacity = function opacity(field, values) {\n var viewTheme = this.viewTheme || Global;\n\n this._createAttrOption('opacity', field, values, viewTheme.opacities);\n\n return this;\n };\n\n _proto.style = function style(field, cfg) {\n var styleOptions = this.get('styleOptions');\n\n if (!styleOptions) {\n styleOptions = {};\n this.set('styleOptions', styleOptions);\n }\n\n if (Util.isObject(field)) {\n cfg = field;\n field = null;\n }\n\n var fields;\n\n if (field) {\n fields = parseFields(field);\n }\n\n styleOptions.fields = fields;\n styleOptions.style = cfg;\n return this;\n };\n\n _proto.label = function label(field, callback, cfg) {\n var self = this;\n var labelCfg = self.get('labelCfg'); // const scales = Util.map(self.get('labelCfg').fields, field => self._createScale(field));\n\n if (!labelCfg) {\n labelCfg = {};\n self.set('labelCfg', labelCfg);\n }\n\n var fields;\n\n if (field) {\n fields = parseFields(field);\n }\n\n labelCfg.fields = fields; // 如果存在回调函数\n\n if (Util.isFunction(callback)) {\n if (!cfg) {\n cfg = {};\n }\n\n labelCfg.callback = callback;\n } else if (Util.isObject(callback)) {\n // 如果没有设置回调函数\n cfg = callback;\n }\n\n labelCfg.globalCfg = cfg;\n return this;\n };\n\n _proto.tooltip = function tooltip(field, cfg) {\n var tooltipCfg = this.get('tooltipCfg');\n\n if (!tooltipCfg) {\n tooltipCfg = {};\n }\n\n if (field === false) {\n // geom 关闭 tooltip\n this.set('tooltipCfg', false);\n } else {\n var tooltipFields;\n\n if (field) {\n tooltipFields = parseFields(field);\n }\n\n tooltipCfg.fields = tooltipFields;\n tooltipCfg.cfg = cfg;\n }\n\n this.set('tooltipCfg', tooltipCfg);\n return this;\n };\n\n _proto.animate = function animate(cfg) {\n this.set('animateCfg', cfg);\n return this;\n }\n /**\n * 是否允许使用默认的图形激活交互\n * @param {Boolean} enable 是否允许激活开关\n * @param {Object} cfg 激活的配置项\n * @return {Geom} 返回 geom 自身\n */\n ;\n\n _proto.active = function active(enable, cfg) {\n if (enable === false) {\n this.set('allowActive', false);\n } else if (Util.isObject(enable)) {\n this.set('allowActive', true);\n this.set('activedOptions', enable);\n } else {\n this.set('allowActive', true);\n this.set('activedOptions', cfg);\n }\n\n return this;\n }\n /**\n * 对 geometry 进行数据调整\n * @chainable\n * @param {String|Array|null} adjusts 数据调整的类型\n * @return {Object} geometry 对象\n */\n ;\n\n _proto.adjust = function adjust(adjusts) {\n if (!this.get('hasDefaultAdjust')) {\n if (adjusts) {\n adjusts = parseAdjusts(adjusts);\n }\n\n this.set('adjusts', adjusts);\n }\n\n return this;\n }\n /**\n * 设置图形的选中模式\n * @param {Boolean|Object} enable 布尔类型用于模式开关,对象类型用于配置\n * @param {Object} cfg 选中配置项\n * @return {Geom} 返回 geom 自身\n */\n ;\n\n _proto.select = function select(enable, cfg) {\n if (enable === false) {\n this.set('allowSelect', false);\n } else if (Util.isObject(enable)) {\n this.set('allowSelect', true);\n this.set('selectedOptions', enable);\n } else {\n this.set('allowSelect', true);\n this.set('selectedOptions', cfg);\n }\n\n return this;\n };\n\n _proto.hasAdjust = function hasAdjust(adjustType) {\n var self = this;\n var adjusts = self.get('adjusts');\n\n if (!adjustType) {\n return false;\n }\n\n var rst = false;\n Util.each(adjusts, function (adjust) {\n if (adjust.type === adjustType) {\n rst = true;\n return false;\n }\n });\n return rst;\n };\n\n _proto.hasStack = function hasStack() {\n var isStacked = this.get('isStacked');\n\n if (Util.isNil(isStacked)) {\n isStacked = this.hasAdjust('stack');\n this.set('isStacked', isStacked);\n }\n\n return isStacked;\n };\n\n _proto.isInCircle = function isInCircle() {\n var coord = this.get('coord');\n return coord && coord.isPolar;\n };\n\n _proto._initContainer = function _initContainer() {\n var self = this;\n var shapeContainer = self.get('shapeContainer');\n\n if (!shapeContainer) {\n var container = self.get('container');\n var view = self.get('view');\n var viewId = view && view.get('_id');\n shapeContainer = container.addGroup({\n viewId: viewId,\n visible: self.get('visible')\n });\n self.set('shapeContainer', shapeContainer);\n }\n };\n\n _proto.init = function init() {\n var self = this;\n\n self._initContainer();\n\n self._initAttrs();\n\n if (self.get('tooltipCfg') && self.get('tooltipCfg').fields) {\n var tooltipFields = self.get('tooltipCfg').fields;\n Util.each(tooltipFields, function (field) {\n self._createScale(field);\n });\n }\n\n var dataArray = self._processData();\n\n if (self.get('adjusts')) {\n self._adjust(dataArray);\n }\n\n self.set('dataArray', dataArray);\n } // step 1: init attrs\n ;\n\n _proto._initAttrs = function _initAttrs() {\n var self = this;\n var attrs = self.get('attrs');\n var attrOptions = self.get('attrOptions');\n var coord = self.get('coord');\n var viewTheme = self.viewTheme || Global;\n var isPie = false;\n\n for (var type in attrOptions) {\n if (attrOptions.hasOwnProperty(type)) {\n var option = attrOptions[type];\n var className = Util.upperFirst(type);\n var fields = parseFields(option.field);\n\n if (type === 'position') {\n option.coord = coord; // 饼图坐标系下,填充一维\n\n if (fields.length === 1 && coord.type === 'theta') {\n fields.unshift('1');\n isPie = true;\n }\n }\n\n var scales = [];\n\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i];\n\n var scale = self._createScale(field);\n\n if (type === 'color' && Util.isNil(option.values)) {\n // 设置 color 的默认色值\n if (scale.values.length <= 8) {\n option.values = isPie ? viewTheme.colors_pie : viewTheme.colors;\n } else if (scale.values.length <= 16) {\n option.values = isPie ? viewTheme.colors_pie_16 : viewTheme.colors_16;\n } else {\n option.values = viewTheme.colors_24;\n }\n\n if (Util.isNil(option.values)) {\n option.values = viewTheme.colors; // 防止主题没有声明诸如 colors_pie 的属性\n }\n }\n\n scales.push(scale);\n } // 饼图需要填充满整个空间\n\n\n if (coord.type === 'theta' && type === 'position' && scales.length > 1) {\n var yScale = scales[1];\n var min = 0;\n var max = Math.max.apply(null, yScale.values);\n\n if (!isFinite(max)) {\n max = 1;\n }\n\n yScale.change({\n nice: false,\n min: min,\n max: max\n });\n }\n\n option.scales = scales;\n var attr = new Attr[className](option);\n attrs[type] = attr;\n }\n }\n } // step 2: 处理数据\n ;\n\n _proto._processData = function _processData() {\n var self = this;\n var data = this.get('data');\n var dataArray = [];\n\n var groupedArray = this._groupData(data);\n\n for (var i = 0; i < groupedArray.length; i++) {\n var subData = groupedArray[i];\n\n var tempData = self._saveOrigin(subData);\n\n dataArray.push(self._numberic(tempData));\n }\n\n return dataArray;\n } // step 2.1 数据分组\n ;\n\n _proto._groupData = function _groupData(data) {\n var groupScales = this._getGroupScales();\n\n var fields = groupScales.map(function (scale) {\n return scale.field;\n });\n return Util.Array.group(data, fields);\n } // step 2.2 数据调整前保存原始数据\n ;\n\n _proto._saveOrigin = function _saveOrigin(data) {\n var rst = [];\n\n for (var i = 0; i < data.length; i++) {\n var origin = data[i];\n var obj = {};\n\n for (var k in origin) {\n obj[k] = origin[k];\n } // const obj = Util.mix({}, origin);\n\n\n obj[FIELD_ORIGIN] = origin;\n rst.push(obj);\n }\n\n return rst;\n } // step 2.3 将分类数据翻译成数据, 仅对位置相关的度量进行数字化处理\n ;\n\n _proto._numberic = function _numberic(data) {\n var positionAttr = this.getAttr('position');\n var scales = positionAttr.scales;\n var result = [];\n\n for (var j = 0; j < data.length; j++) {\n var obj = data[j];\n var isValidate = true;\n\n for (var i = 0; i < Math.min(2, scales.length); i++) {\n var scale = scales[i];\n\n if (scale.isCategory) {\n var field = scale.field;\n obj[field] = scale.translate(obj[field]);\n\n if (Number.isNaN(obj[field])) {\n // 当分类为 NaN 时,说明该条数据不在定义域内,需要过滤掉\n isValidate = false;\n }\n }\n }\n\n if (isValidate) {\n result.push(obj);\n }\n }\n\n return result;\n };\n\n _proto._getGroupScales = function _getGroupScales() {\n var self = this;\n var scales = self.get('groupScales');\n\n if (!scales) {\n scales = [];\n var attrs = self.get('attrs');\n Util.each(attrs, function (attr) {\n if (GROUP_ATTRS.includes(attr.type)) {\n var attrScales = attr.scales;\n Util.each(attrScales, function (scale) {\n if (scale.isCategory && Util.indexOf(scales, scale) === -1) {\n scales.push(scale);\n }\n });\n }\n });\n self.set('groupScales', scales);\n }\n\n return scales;\n };\n\n _proto._updateStackRange = function _updateStackRange(field, scale, dataArray) {\n var mergeArray = Util.Array.merge(dataArray);\n var min = scale.min;\n var max = scale.max;\n\n for (var i = 0; i < mergeArray.length; i++) {\n var obj = mergeArray[i]; // 过滤掉非法数据\n\n if (!Util.isArray(obj[field])) {\n continue;\n }\n\n var tmpMin = Math.min.apply(null, obj[field]);\n var tmpMax = Math.max.apply(null, obj[field]);\n\n if (tmpMin < min) {\n min = tmpMin;\n }\n\n if (tmpMax > max) {\n max = tmpMax;\n }\n }\n\n if (min < scale.min || max > scale.max) {\n scale.change({\n min: min,\n max: max\n });\n }\n } // step 2.2 调整数据\n ;\n\n _proto._adjust = function _adjust(dataArray) {\n // 当数据为空的时候,就不需要对数据进行调整了\n if (!dataArray || !dataArray.length) {\n return;\n }\n\n var self = this;\n var adjusts = self.get('adjusts');\n var viewTheme = this.viewTheme || Global;\n var yScale = self.getYScale();\n var xScale = self.getXScale();\n var xField = xScale.field;\n var yField = yScale ? yScale.field : null;\n Util.each(adjusts, function (adjust) {\n var adjustCfg = Util.mix({\n xField: xField,\n yField: yField\n }, adjust);\n var adjustType = Util.upperFirst(adjust.type);\n\n if (adjustType === 'Dodge') {\n var adjustNames = [];\n\n if (xScale.isCategory || xScale.isIdentity) {\n adjustNames.push('x');\n } else if (!yScale) {\n adjustNames.push('y');\n } else {\n throw new Error('dodge is not support linear attribute, please use category attribute!');\n }\n\n adjustCfg.adjustNames = adjustNames;\n adjustCfg.dodgeRatio = adjustCfg.dodgeRatio || viewTheme.widthRatio.column;\n /* if (self.isInCircle()) {\n adjustCfg.dodgeRatio = 1;\n adjustCfg.marginRatio = 0;\n }*/\n } else if (adjustType === 'Stack') {\n var coord = self.get('coord');\n\n if (!yScale) {\n // 一维的情况下获取高度和默认size\n adjustCfg.height = coord.getHeight();\n var size = self.getDefaultValue('size') || 3;\n adjustCfg.size = size;\n } // 不进行 transpose 时,用户又没有设置这个参数时,默认从上向下\n\n\n if (!coord.isTransposed && Util.isNil(adjustCfg.reverseOrder)) {\n adjustCfg.reverseOrder = true;\n }\n }\n\n var adjustElement = new Adjust[adjustType](adjustCfg);\n adjustElement.processAdjust(dataArray);\n\n if (adjustType === 'Stack' && yScale) {\n self._updateStackRange(yField, yScale, dataArray);\n }\n });\n }\n /**\n * @internal 设置coord,通常外部容器变化时,coord 会发生变化\n * @param {Object} coord 坐标系\n */\n ;\n\n _proto.setCoord = function setCoord(coord) {\n this.set('coord', coord);\n var position = this.getAttr('position');\n var shapeContainer = this.get('shapeContainer');\n shapeContainer.setMatrix(coord.matrix);\n\n if (position) {\n position.coord = coord;\n }\n } // step 3 绘制\n ;\n\n _proto.paint = function paint() {\n var self = this;\n var dataArray = self.get('dataArray');\n var mappedArray = [];\n var shapeFactory = self.getShapeFactory();\n shapeFactory.setCoord(self.get('coord'));\n self.set('shapeFactory', shapeFactory);\n var shapeContainer = self.get('shapeContainer');\n\n self._beforeMapping(dataArray);\n\n for (var i = 0; i < dataArray.length; i++) {\n var data = dataArray[i];\n var index = i;\n data = self._mapping(data);\n mappedArray.push(data);\n self.draw(data, shapeContainer, shapeFactory, index);\n }\n\n if (self.get('labelCfg')) {\n self._addLabels(Util.union.apply(null, mappedArray), shapeContainer.get('children'));\n }\n\n if (!self.get('sortable')) {\n self._sort(mappedArray); // 便于数据的查找,需要对数据进行排序,用于 geom.findPoint()\n\n } else {\n self.set('dataArray', mappedArray);\n }\n };\n\n _proto._sort = function _sort(mappedArray) {\n var self = this;\n var xScale = self.getXScale();\n var xField = xScale.field;\n Util.each(mappedArray, function (itemArr) {\n itemArr.sort(function (obj1, obj2) {\n return xScale.translate(obj1[FIELD_ORIGIN][xField]) - xScale.translate(obj2[FIELD_ORIGIN][xField]);\n });\n });\n self.set('dataArray', mappedArray);\n } // step 3.1 before mapping\n ;\n\n _proto._beforeMapping = function _beforeMapping(dataArray) {\n var self = this;\n\n if (self.get('sortable')) {\n var xScale = self.getXScale();\n var field = xScale.field;\n Util.each(dataArray, function (data) {\n data.sort(function (v1, v2) {\n return xScale.translate(v1[field]) - xScale.translate(v2[field]);\n });\n });\n }\n\n if (self.get('generatePoints')) {\n Util.each(dataArray, function (data) {\n self._generatePoints(data);\n });\n Util.each(dataArray, function (data, index) {\n var nextData = dataArray[index + 1];\n\n if (nextData) {\n data[0].nextPoints = nextData[0].points;\n }\n });\n }\n } // step 3.2 add labels\n ;\n\n _proto._addLabels = function _addLabels(points, shapes) {\n var self = this;\n var type = self.get('type');\n var viewTheme = self.get('viewTheme') || Global;\n var coord = self.get('coord');\n var C = Labels.getLabelsClass(coord.type, type);\n var container = self.get('container');\n var scales = Util.map(self.get('labelCfg').fields, function (field) {\n return self._createScale(field);\n });\n var labelContainer = container.addGroup(C, {\n _id: this.get('_id'),\n labelCfg: Util.mix({\n scales: scales\n }, self.get('labelCfg')),\n coord: coord,\n geom: self,\n geomType: type,\n yScale: self.getYScale(),\n viewTheme: viewTheme,\n visible: self.get('visible')\n });\n labelContainer.showLabels(points, shapes);\n self.set('labelContainer', labelContainer);\n }\n /**\n * @protected\n * 获取图形的工厂类\n * @return {Object} 工厂类对象\n */\n ;\n\n _proto.getShapeFactory = function getShapeFactory() {\n var shapeFactory = this.get('shapeFactory');\n\n if (!shapeFactory) {\n var shapeType = this.get('shapeType');\n shapeFactory = Shape.getShapeFactory(shapeType);\n this.set('shapeFactory', shapeFactory);\n }\n\n return shapeFactory;\n } // step 3.2 generate points\n ;\n\n _proto._generatePoints = function _generatePoints(data) {\n var self = this;\n var shapeFactory = self.getShapeFactory();\n var shapeAttr = self.getAttr('shape');\n\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var cfg = self.createShapePointsCfg(obj);\n var shape = shapeAttr ? self._getAttrValues(shapeAttr, obj) : null;\n var points = shapeFactory.getShapePoints(shape, cfg);\n obj.points = points;\n }\n }\n /**\n * 获取图形对应点的配置项\n * @protected\n * @param {Object} obj 数据对象\n * @return {Object} cfg 获取图形对应点的配置项\n */\n ;\n\n _proto.createShapePointsCfg = function createShapePointsCfg(obj) {\n var xScale = this.getXScale();\n var yScale = this.getYScale();\n\n var x = this._normalizeValues(obj[xScale.field], xScale);\n\n var y; // 存在没有 y 的情况\n\n if (yScale) {\n y = this._normalizeValues(obj[yScale.field], yScale);\n } else {\n y = obj.y ? obj.y : 0.1;\n }\n\n return {\n x: x,\n y: y,\n y0: yScale ? yScale.scale(this.getYMinValue()) : undefined\n };\n }\n /**\n * @protected\n * 如果y轴的最小值小于0则返回0,否则返回最小值\n * @return {Number} y轴上的最小值\n */\n ;\n\n _proto.getYMinValue = function getYMinValue() {\n var yScale = this.getYScale();\n var min = yScale.min,\n max = yScale.max;\n var value;\n\n if (min >= 0) {\n value = min;\n } else if (max <= 0) {\n // 当值全位于负区间时,需要保证 ymin 在区域内,不可为 0\n value = max;\n } else {\n value = 0;\n }\n\n return value;\n } // 将数据归一化\n ;\n\n _proto._normalizeValues = function _normalizeValues(values, scale) {\n var rst = [];\n\n if (Util.isArray(values)) {\n for (var i = 0; i < values.length; i++) {\n var v = values[i];\n rst.push(scale.scale(v));\n }\n } else {\n rst = scale.scale(values);\n }\n\n return rst;\n } // step 3.2 mapping\n ;\n\n _proto._mapping = function _mapping(data) {\n var self = this;\n var attrs = self.get('attrs');\n var mappedData = [];\n\n for (var i = 0; i < data.length; i++) {\n var record = data[i];\n var newRecord = {};\n newRecord[FIELD_ORIGIN] = record[FIELD_ORIGIN];\n newRecord.points = record.points;\n newRecord.nextPoints = record.nextPoints;\n\n for (var k in attrs) {\n if (attrs.hasOwnProperty(k)) {\n var attr = attrs[k];\n var names = attr.names;\n\n var values = self._getAttrValues(attr, record);\n\n if (names.length > 1) {\n // position 之类的生成多个字段的属性\n for (var j = 0; j < values.length; j++) {\n var val = values[j];\n var name = names[j];\n newRecord[name] = Util.isArray(val) && val.length === 1 ? val[0] : val; // 只有一个值时返回第一个属性值\n }\n } else {\n newRecord[names[0]] = values.length === 1 ? values[0] : values;\n }\n }\n }\n\n mappedData.push(newRecord);\n }\n\n return mappedData;\n } // 获取属性映射的值\n ;\n\n _proto._getAttrValues = function _getAttrValues(attr, record) {\n var scales = attr.scales;\n var params = [];\n\n for (var i = 0; i < scales.length; i++) {\n var scale = scales[i];\n var field = scale.field;\n\n if (scale.type === 'identity') {\n params.push(scale.value);\n } else {\n params.push(record[field]);\n }\n }\n\n var values = attr.mapping.apply(attr, params);\n return values;\n };\n\n _proto.getAttrValue = function getAttrValue(attrName, record) {\n var attr = this.getAttr(attrName);\n var rst = null;\n\n if (attr) {\n var values = this._getAttrValues(attr, record);\n\n rst = values[0];\n }\n\n return rst;\n };\n\n _proto.getDefaultValue = function getDefaultValue(attrName) {\n var value = this.get(attrName);\n var attr = this.getAttr(attrName);\n\n if (attr) {\n var scale = attr.getScale(attrName);\n\n if (scale.type === 'identity') {\n value = scale.value;\n }\n }\n\n return value;\n }\n /**\n * step 3.3 draw\n * @protected\n * @param {Array} data 绘制图形\n * @param {Object} container 绘图容器\n * @param {Object} shapeFactory 绘制图形的工厂类\n * @param {Number} index 每个 shape 的索引值\n */\n ;\n\n _proto.draw = function draw(data, container, shapeFactory, index) {\n var self = this;\n\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n self.drawPoint(obj, container, shapeFactory, index + i);\n }\n };\n\n _proto.getCallbackCfg = function getCallbackCfg(fields, cfg, origin) {\n if (!fields) {\n return cfg;\n }\n\n var tmpCfg = {};\n var params = fields.map(function (field) {\n return origin[field];\n });\n Util.each(cfg, function (v, k) {\n if (Util.isFunction(v)) {\n tmpCfg[k] = v.apply(null, params);\n } else {\n tmpCfg[k] = v;\n }\n });\n return tmpCfg;\n };\n\n _proto._getShapeId = function _getShapeId(dataObj) {\n var id = this.get('_id');\n var keyFields = this.get('keyFields');\n\n if (keyFields && keyFields.length > 0) {\n Util.each(keyFields, function (key) {\n id += '-' + dataObj[key];\n });\n } else {\n var type = this.get('type');\n var xScale = this.getXScale();\n var yScale = this.getYScale();\n var xField = xScale.field || 'x';\n var yField = yScale.field || 'y';\n var yVal = dataObj[yField];\n var xVal;\n\n if (xScale.isIdentity) {\n xVal = xScale.value;\n } else {\n xVal = dataObj[xField];\n }\n\n if (type === 'interval' || type === 'schema') {\n id += '-' + xVal;\n } else if (type === 'line' || type === 'area' || type === 'path') {\n id += '-' + type;\n } else {\n id += '-' + xVal + '-' + yVal;\n }\n\n var groupScales = this._getGroupScales();\n\n if (!Util.isEmpty(groupScales)) {\n Util.each(groupScales, function (groupScale) {\n var field = groupScale.field;\n\n if (groupScale.type !== 'identity') {\n id += '-' + dataObj[field];\n }\n });\n }\n }\n\n return id;\n };\n\n _proto.getDrawCfg = function getDrawCfg(obj) {\n var self = this;\n var cfg = {\n origin: obj,\n x: obj.x,\n y: obj.y,\n color: obj.color,\n size: obj.size,\n shape: obj.shape,\n isInCircle: self.isInCircle(),\n opacity: obj.opacity\n };\n var styleOptions = self.get('styleOptions');\n\n if (styleOptions && styleOptions.style) {\n cfg.style = self.getCallbackCfg(styleOptions.fields, styleOptions.style, obj[FIELD_ORIGIN]);\n }\n\n if (self.get('generatePoints')) {\n cfg.points = obj.points;\n cfg.nextPoints = obj.nextPoints;\n }\n\n if (self.get('animate')) {\n // _id 字段仅用于动画\n cfg._id = self._getShapeId(obj[FIELD_ORIGIN]);\n }\n\n return cfg;\n };\n\n _proto.appendShapeInfo = function appendShapeInfo(shape, index) {\n if (shape) {\n shape.setSilent('index', index);\n shape.setSilent('coord', this.get('coord'));\n\n if (this.get('animate') && this.get('animateCfg')) {\n shape.setSilent('animateCfg', this.get('animateCfg'));\n }\n }\n };\n\n _proto._applyViewThemeShapeStyle = function _applyViewThemeShapeStyle(cfg, shape, shapeFactory) {\n // applying view theme\n var self = this;\n var viewTheme = self.viewTheme || Global;\n var shapeName = shapeFactory.name;\n\n if (shape) {\n if (shape && (shape.indexOf('hollow') > -1 || shape.indexOf('liquid') > -1)) {\n shapeName = \"hollow\" + Util.upperFirst(shapeName);\n }\n } else if (shapeFactory.defaultShapeType.indexOf('hollow') > -1) {\n shapeName = \"hollow\" + Util.upperFirst(shapeName);\n }\n\n var defaultStyle = viewTheme.shape[shapeName] || {};\n cfg.style = Util.mix({}, defaultStyle, cfg.style);\n };\n\n _proto.drawPoint = function drawPoint(obj, container, shapeFactory, index) {\n var self = this;\n var shape = obj.shape;\n var cfg = self.getDrawCfg(obj);\n\n self._applyViewThemeShapeStyle(cfg, shape, shapeFactory);\n\n var geomShape = shapeFactory.drawShape(shape, cfg, container);\n self.appendShapeInfo(geomShape, index);\n }\n /**\n * 获取属性\n * @protected\n * @param {String} name 属性名\n * @return {Scale} 度量\n */\n ;\n\n _proto.getAttr = function getAttr(name) {\n return this.get('attrs')[name];\n }\n /**\n * 获取 x 对应的度量\n * @return {Scale} x 对应的度量\n */\n ;\n\n _proto.getXScale = function getXScale() {\n return this.getAttr('position').scales[0];\n }\n /**\n * 获取 y 对应的度量\n * @return {Scale} y 对应的度量\n */\n ;\n\n _proto.getYScale = function getYScale() {\n return this.getAttr('position').scales[1];\n };\n\n _proto.getShapes = function getShapes() {\n var result = [];\n var shapeContainer = this.get('shapeContainer');\n var children = shapeContainer.get('children');\n Util.each(children, function (child) {\n if (child.get('origin')) {\n // 过滤 label\n result.push(child);\n }\n });\n return result;\n };\n\n _proto.getAttrsForLegend = function getAttrsForLegend() {\n var attrs = this.get('attrs');\n var rst = [];\n Util.each(attrs, function (attr) {\n if (GROUP_ATTRS.includes(attr.type)) {\n rst.push(attr);\n }\n });\n return rst;\n };\n\n _proto.getFieldsForLegend = function getFieldsForLegend() {\n var fields = [];\n var attrOptions = this.get('attrOptions');\n Util.each(GROUP_ATTRS, function (attrName) {\n var attrCfg = attrOptions[attrName];\n\n if (attrCfg && attrCfg.field && Util.isString(attrCfg.field)) {\n fields = fields.concat(attrCfg.field.split('*'));\n }\n });\n return Util.uniq(fields);\n };\n\n _proto.changeVisible = function changeVisible(visible, stopDraw) {\n var me = this;\n me.set('visible', visible);\n var shapeContainer = this.get('shapeContainer');\n\n if (shapeContainer) {\n shapeContainer.set('visible', visible);\n }\n\n var labelContainer = this.get('labelContainer');\n\n if (labelContainer) {\n labelContainer.set('visible', visible);\n }\n\n if (!stopDraw && shapeContainer) {\n var canvas = shapeContainer.get('canvas');\n canvas.draw();\n }\n };\n\n _proto.reset = function reset() {\n this.set('attrOptions', {});\n this.clearInner();\n };\n\n _proto.clearInner = function clearInner() {\n this.clearActivedShapes();\n this.clearSelected();\n var shapeContainer = this.get('shapeContainer');\n shapeContainer && shapeContainer.clear(); // 由于 Labels 对应的模块需要生成group,所以这个地方需要删除\n\n var labelContainer = this.get('labelContainer');\n labelContainer && labelContainer.remove();\n this.set('attrs', {});\n this.set('groupScales', null); // if (!this.get('hasDefaultAdjust')) {\n // this.set('adjusts', null);\n // }\n\n this.set('labelContainer', null);\n this.set('xDistance', null);\n this.set('isStacked', null);\n };\n\n _proto.clear = function clear() {\n this.clearInner();\n this.set('scales', {});\n };\n\n _proto.destroy = function destroy() {\n this.clear();\n var shapeContainer = this.get('shapeContainer');\n shapeContainer && shapeContainer.remove();\n this.offEvents();\n\n _Base.prototype.destroy.call(this);\n };\n\n _proto.bindEvents = function bindEvents() {\n if (this.get('view')) {\n this._bindActiveAction();\n\n this._bindSelectedAction();\n }\n };\n\n _proto.offEvents = function offEvents() {\n if (this.get('view')) {\n this._offActiveAction();\n\n this._offSelectedAction();\n }\n };\n\n return GeomBase;\n}(Base);\n\nmodule.exports = GeomBase;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/geom/base.js\n// module id = 23\n// module chunks = 0 1 2","module.exports = {\n Axis: require('./axis/'),\n Component: require('./base'),\n Guide: require('./guide/'),\n Label: require('./label/'),\n Legend: require('./legend/'),\n Tooltip: require('./tooltip/')\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/index.js\n// module id = 24\n// module chunks = 0 1 2","/**\n * @fileOverview 计算path 使用的工具方法\n * @author dxq613@gmail.com\n */\nvar Util = require('../../util');\n\nvar Spline = require('./spline');\n\nfunction points2path(points, isInCircle) {\n if (!points.length) {\n return [];\n }\n\n var path = [];\n\n for (var i = 0, length = points.length; i < length; i++) {\n var item = points[i];\n\n if (i === 0) {\n path.push(['M', item.x, item.y]);\n } else {\n path.push(['L', item.x, item.y]);\n }\n }\n\n if (isInCircle) {\n path.push(['Z']);\n }\n\n return path;\n}\n\nfunction _getPointRadius(coord, point) {\n var center = coord.getCenter();\n var r = Math.sqrt(Math.pow(point.x - center.x, 2) + Math.pow(point.y - center.y, 2));\n return r;\n}\n\nfunction convertArr(arr, coord) {\n var len = arr.length;\n var tmp = [arr[0]];\n\n for (var i = 1; i < len; i = i + 2) {\n var point = coord.convertPoint({\n x: arr[i],\n y: arr[i + 1]\n });\n tmp.push(point.x, point.y);\n }\n\n return tmp;\n}\n\nfunction _convertPolarPath(pre, cur, coord) {\n // const radius = coord.getRadius();\n // const inner = coord.innerRadius || 0;\n // let innerRadius = inner * radius;\n var transposed = coord.isTransposed;\n var startAngle = coord.startAngle;\n var endAngle = coord.endAngle;\n var prePoint = {\n x: pre[1],\n y: pre[2]\n };\n var curPoint = {\n x: cur[1],\n y: cur[2]\n };\n var rst = []; // innerRadius = innerRadius || 0;\n\n var xDim = transposed ? 'y' : 'x';\n var angleRange = Math.abs(curPoint[xDim] - prePoint[xDim]) * (endAngle - startAngle);\n var direction = curPoint[xDim] >= prePoint[xDim] ? 1 : 0; // 圆弧的方向\n\n var flag = angleRange > Math.PI ? 1 : 0; // 大弧还是小弧标志位\n\n var convertPoint = coord.convertPoint(curPoint);\n\n var r = _getPointRadius(coord, convertPoint);\n\n if (r >= 0.5) {\n // 小于1像素的圆在图像上无法识别\n if (angleRange === Math.PI * 2) {\n var middlePoint = {\n x: (curPoint.x + prePoint.x) / 2,\n y: (curPoint.y + prePoint.y) / 2\n };\n var middleConvertPoint = coord.convertPoint(middlePoint);\n rst.push(['A', r, r, 0, flag, direction, middleConvertPoint.x, middleConvertPoint.y]);\n rst.push(['A', r, r, 0, flag, direction, convertPoint.x, convertPoint.y]);\n } else {\n rst.push(['A', r, r, 0, flag, direction, convertPoint.x, convertPoint.y]);\n }\n }\n\n return rst;\n} // 当存在整体的圆时,去除圆前面和后面的线,防止出现直线穿过整个圆的情形\n\n\nfunction filterFullCirleLine(path) {\n Util.each(path, function (subPath, index) {\n var cur = subPath;\n\n if (cur[0].toLowerCase() === 'a') {\n var pre = path[index - 1];\n var next = path[index + 1];\n\n if (next && next[0].toLowerCase() === 'a') {\n if (pre && pre[0].toLowerCase() === 'l') {\n pre[0] = 'M';\n }\n } else if (pre && pre[0].toLowerCase() === 'a') {\n if (next && next[0].toLowerCase() === 'l') {\n next[0] = 'M';\n }\n }\n }\n });\n}\n\nvar PathUtil = {\n // 线的path\n getLinePath: function getLinePath(points, isInCircle) {\n return points2path(points, isInCircle);\n },\n // get spline: 限定了范围的平滑线\n getSplinePath: function getSplinePath(points, isInCircle, constaint) {\n var data = [];\n var first = points[0];\n var prePoint = null;\n\n if (points.length <= 2) {\n return PathUtil.getLinePath(points, isInCircle);\n }\n\n Util.each(points, function (point) {\n if (!prePoint || !(prePoint.x === point.x && prePoint.y === point.y)) {\n data.push(point.x);\n data.push(point.y);\n prePoint = point;\n }\n });\n constaint = constaint || [// 范围\n [0, 0], [1, 1]];\n var splinePath = Spline.catmullRom2bezier(data, isInCircle, constaint);\n splinePath.unshift(['M', first.x, first.y]);\n return splinePath;\n },\n getPointRadius: function getPointRadius(coord, point) {\n var result = _getPointRadius(coord, point);\n\n return result;\n },\n getPointAngle: function getPointAngle(coord, point) {\n var center = coord.getCenter();\n var angle = Math.atan2(point.y - center.y, point.x - center.x);\n return angle;\n },\n convertNormalPath: function convertNormalPath(coord, path) {\n var tmp = [];\n Util.each(path, function (subPath) {\n var action = subPath[0];\n\n switch (action.toLowerCase()) {\n case 'm':\n case 'l':\n case 'c':\n tmp.push(convertArr(subPath, coord));\n break;\n\n case 'z':\n default:\n tmp.push(subPath);\n break;\n }\n });\n return tmp;\n },\n convertPolarPath: function convertPolarPath(coord, path) {\n var tmp = [];\n var pre;\n var cur;\n var transposed;\n var equals;\n Util.each(path, function (subPath, index) {\n var action = subPath[0];\n\n switch (action.toLowerCase()) {\n case 'm':\n case 'c':\n case 'q':\n tmp.push(convertArr(subPath, coord));\n break;\n\n case 'l':\n pre = path[index - 1];\n cur = subPath;\n transposed = coord.isTransposed; // 是否半径相同,转换成圆弧\n\n equals = transposed ? pre[pre.length - 2] === cur[1] : pre[pre.length - 1] === cur[2];\n\n if (equals) {\n tmp = tmp.concat(_convertPolarPath(pre, cur, coord));\n } else {\n // y 不相等,所以直接转换\n tmp.push(convertArr(subPath, coord));\n }\n\n break;\n\n case 'z':\n default:\n tmp.push(subPath);\n break;\n }\n });\n filterFullCirleLine(tmp); // 过滤多余的直线\n\n return tmp;\n }\n};\nmodule.exports = PathUtil;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/geom/util/path.js\n// module id = 25\n// module chunks = 0 1 2","var isNil = require('./type/is-nil');\n\nfunction toString(value) {\n if (isNil(value)) return '';\n return value.toString();\n}\n\nmodule.exports = toString;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/to-string.js\n// module id = 26\n// module chunks = 0 1 2","var isPlainObject = require('./type/is-plain-object');\n\nvar isArray = require('./type/is-array');\n\nvar MAX_MIX_LEVEL = 5;\n\nfunction _deepMix(dist, src, level, maxLevel) {\n level = level || 0;\n maxLevel = maxLevel || MAX_MIX_LEVEL;\n\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n var value = src[key];\n\n if (value !== null && isPlainObject(value)) {\n if (!isPlainObject(dist[key])) {\n dist[key] = {};\n }\n\n if (level < maxLevel) {\n _deepMix(dist[key], value, level + 1, maxLevel);\n } else {\n dist[key] = src[key];\n }\n } else if (isArray(value)) {\n dist[key] = [];\n dist[key] = dist[key].concat(value);\n } else if (value !== undefined) {\n dist[key] = value;\n }\n }\n }\n}\n\nvar deepMix = function deepMix() {\n var args = new Array(arguments.length);\n var length = args.length;\n\n for (var i = 0; i < length; i++) {\n args[i] = arguments[i];\n }\n\n var rst = args[0];\n\n for (var _i = 1; _i < length; _i++) {\n _deepMix(rst, args[_i]);\n }\n\n return rst;\n};\n\nmodule.exports = deepMix;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/deep-mix.js\n// module id = 27\n// module chunks = 0 1 2","var isObjectLike = require('./is-object-like');\n\nvar isType = require('./is-type');\n\nvar isPlainObject = function isPlainObject(value) {\n /**\n * isObjectLike(new Foo) => false\n * isObjectLike([1, 2, 3]) => false\n * isObjectLike({ x: 0, y: 0 }) => true\n * isObjectLike(Object.create(null)) => true\n */\n if (!isObjectLike(value) || !isType(value, 'Object')) {\n return false;\n }\n\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n\n var proto = value;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(value) === proto;\n};\n\nmodule.exports = isPlainObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-plain-object.js\n// module id = 28\n// module chunks = 0 1 2","var isArrayLike = require('./type/is-array-like');\n\nfunction toArray(value) {\n return isArrayLike(value) ? Array.prototype.slice.call(value) : [];\n}\n\nmodule.exports = toArray;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/to-array.js\n// module id = 29\n// module chunks = 0 1 2","var PRECISION = 0.00001; // numbers less than this is considered as 0\n\nmodule.exports = function isNumberEqual(a, b) {\n var precision = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : PRECISION;\n return Math.abs(a - b) < precision;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/is-number-equal.js\n// module id = 30\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig;\nvar regexDot = /[^\\s\\,]+/ig;\nmodule.exports = {\n parseRadius: function parseRadius(radius) {\n var r1 = 0,\n r2 = 0,\n r3 = 0,\n r4 = 0;\n\n if (Util.isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n } else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n } else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n } else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n } else {\n r1 = r2 = r3 = r4 = radius;\n }\n\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n },\n parsePath: function parsePath(path) {\n path = path || [];\n\n if (Util.isArray(path)) {\n return path;\n }\n\n if (Util.isString(path)) {\n path = path.match(regexTags);\n Util.each(path, function (item, index) {\n item = item.match(regexDot);\n\n if (item[0].length > 1) {\n var tag = item[0].charAt(0);\n item.splice(1, 0, item[0].substr(1));\n item[0] = tag;\n }\n\n Util.each(item, function (sub, i) {\n if (!isNaN(sub)) {\n item[i] = +sub;\n }\n });\n path[index] = item;\n });\n return path;\n }\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/util/format.js\n// module id = 31\n// module chunks = 0 1 2","import constant from \"./constant\";\n\nfunction linear(a, d) {\n return function (t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function (a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/color.js\n// module id = 32\n// module chunks = 0 1 2","/**\n * @fileOverview the Attribute base class\n */\nvar isString = require('@antv/util/lib/type/is-string');\n\nvar isArray = require('@antv/util/lib/type/is-array');\n\nvar isNil = require('@antv/util/lib/type/is-nil');\n\nvar mix = require('@antv/util/lib/mix');\n\nvar each = require('@antv/util/lib/each');\n\nfunction toScaleString(scale, value) {\n if (isString(value)) {\n return value;\n }\n\n return scale.invert(scale.scale(value));\n}\n/**\n * 所有视觉通道属性的基类\n * @class Attr\n */\n\n\nvar AttributeBase = /*#__PURE__*/function () {\n function AttributeBase(cfg) {\n var _this = this;\n /**\n * 属性的类型\n * @type {String}\n */\n\n\n this.type = 'base';\n /**\n * 属性的名称\n * @type {String}\n */\n\n this.name = null;\n /**\n * 回调函数\n * @type {Function}\n */\n\n this.method = null;\n /**\n * 备选的值数组\n * @type {Array}\n */\n\n this.values = [];\n /**\n * 属性内部的度量\n * @type {Array}\n */\n\n this.scales = [];\n /**\n * 是否通过线性取值, 如果未指定,则根据数值的类型判定\n * @type {Boolean}\n */\n\n this.linear = null;\n /**\n * 当用户设置的 callback 返回 null 时, 应该返回默认 callback 中的值\n */\n\n var mixedCallback = null;\n var defaultCallback = this.callback;\n\n if (cfg.callback) {\n var userCallback = cfg.callback;\n\n mixedCallback = function mixedCallback() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n\n var ret = userCallback.apply(void 0, params);\n\n if (isNil(ret)) {\n ret = defaultCallback.apply(_this, params);\n }\n\n return ret;\n };\n }\n\n mix(this, cfg);\n\n if (mixedCallback) {\n mix(this, {\n callback: mixedCallback\n });\n }\n } // 获取属性值,将值映射到视觉通道\n\n\n var _proto = AttributeBase.prototype;\n\n _proto._getAttrValue = function _getAttrValue(scale, value) {\n var values = this.values;\n\n if (scale.isCategory && !this.linear) {\n var index = scale.translate(value);\n return values[index % values.length];\n }\n\n var percent = scale.scale(value);\n return this.getLinearValue(percent);\n };\n /**\n * 如果进行线性映射,返回对应的映射值\n * @protected\n * @param {Number} percent 百分比\n * @return {*} 颜色值、形状、大小等\n */\n\n\n _proto.getLinearValue = function getLinearValue(percent) {\n var values = this.values;\n var steps = values.length - 1;\n var step = Math.floor(steps * percent);\n var leftPercent = steps * percent - step;\n var start = values[step];\n var end = step === steps ? start : values[step + 1];\n var rstValue = start + (end - start) * leftPercent;\n return rstValue;\n };\n /**\n * 默认的回调函数\n * @param {*} value 回调函数的值\n * @type {Function}\n * @return {Array} 返回映射后的值\n */\n\n\n _proto.callback = function callback(value) {\n var self = this;\n var scale = self.scales[0];\n var rstValue = null;\n\n if (scale.type === 'identity') {\n rstValue = scale.value;\n } else {\n rstValue = self._getAttrValue(scale, value);\n }\n\n return rstValue;\n };\n /**\n * 根据度量获取属性名\n * @return {Array} dims of this Attribute\n */\n\n\n _proto.getNames = function getNames() {\n var scales = this.scales;\n var names = this.names;\n var length = Math.min(scales.length, names.length);\n var rst = [];\n\n for (var i = 0; i < length; i++) {\n rst.push(names[i]);\n }\n\n return rst;\n };\n /**\n * 根据度量获取维度名\n * @return {Array} dims of this Attribute\n */\n\n\n _proto.getFields = function getFields() {\n var scales = this.scales;\n var rst = [];\n each(scales, function (scale) {\n rst.push(scale.field);\n });\n return rst;\n };\n /**\n * 根据名称获取度量\n * @param {String} name the name of scale\n * @return {Scale} scale\n */\n\n\n _proto.getScale = function getScale(name) {\n var scales = this.scales;\n var names = this.names;\n var index = names.indexOf(name);\n return scales[index];\n };\n /**\n * 映射数据\n * @param {*} param1...paramn 多个数值\n * @return {Array} 映射的值组成的数组\n */\n\n\n _proto.mapping = function mapping() {\n var scales = this.scales;\n var callback = this.callback;\n\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n\n var values = params;\n\n if (callback) {\n for (var i = 0, len = params.length; i < len; i++) {\n params[i] = this._toOriginParam(params[i], scales[i]);\n }\n\n values = callback.apply(this, params);\n }\n\n values = [].concat(values);\n return values;\n }; // 原始的参数\n\n\n _proto._toOriginParam = function _toOriginParam(param, scale) {\n var rst = param;\n\n if (!scale.isLinear) {\n if (isArray(param)) {\n rst = [];\n\n for (var i = 0, len = param.length; i < len; i++) {\n rst.push(toScaleString(scale, param[i]));\n }\n } else {\n rst = toScaleString(scale, param);\n }\n }\n\n return rst;\n };\n\n return AttributeBase;\n}();\n\nmodule.exports = AttributeBase;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/attr/lib/base.js\n// module id = 33\n// module chunks = 0 1 2","var mix = require('@antv/util/lib/mix');\n\nvar Adjust = /*#__PURE__*/function () {\n var _proto = Adjust.prototype;\n\n _proto._initDefaultCfg = function _initDefaultCfg() {\n this.adjustNames = ['x', 'y']; // 调整的维度,默认,x,y都做调整\n };\n\n function Adjust(cfg) {\n this._initDefaultCfg();\n\n mix(this, cfg);\n }\n /**\n * @override\n */\n\n\n _proto.processAdjust = function processAdjust()\n /* dataArray */\n {};\n\n return Adjust;\n}();\n\nmodule.exports = Adjust;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/adjust/lib/base.js\n// module id = 34\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nvar Component = require('../component');\n\nvar Util = require('../util');\n\nvar Grid = require('./grid');\n\nvar Label = require('../label/base');\n\nvar _require = require('../const'),\n FONT_FAMILY = _require.FONT_FAMILY;\n\nvar Axis = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Axis, _Component);\n\n function Axis() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = Axis.prototype;\n\n _proto.getDefaultCfg = function getDefaultCfg() {\n var cfg = _Component.prototype.getDefaultCfg.call(this);\n\n return Util.mix({}, cfg, {\n /**\n * 用于动画,唯一标识的 id\n * @type {[type]}\n */\n _id: null,\n zIndex: 4,\n\n /**\n * 坐标轴上的坐标点\n * @type {Array}\n */\n ticks: null,\n\n /**\n * 坐标轴线的配置信息,如果设置成null,则不显示轴线\n * @type {Object}\n */\n line: null,\n\n /**\n * 坐标轴刻度线的配置,如果设置成null,则不显示刻度线\n * @type {Object}\n */\n tickLine: null,\n\n /**\n * 次刻度线个数配置\n * @type {Number}\n */\n subTickCount: 0,\n\n /**\n * 次刻度线样式配置\n * @type {Object}\n */\n subTickLine: null,\n\n /**\n * 网格线配置,如果值为 null,则不显示\n * @type {Object}\n */\n grid: null,\n\n /**\n * 坐标轴文本配置\n * @type {Object}\n */\n label: {\n offset: 0,\n offsetX: 0,\n offsetY: 0,\n textStyle: {},\n // 坐标轴文本样式\n autoRotate: true,\n autoHide: false,\n formatter: null // 坐标轴文本格式化回调函数\n\n },\n labelItems: [],\n\n /**\n * 坐标轴标题配置\n * @type {Object}\n */\n title: {\n autoRotate: true,\n // 文本是否自动旋转\n textStyle: {} // 坐标轴标题样式\n\n },\n autoPaint: true\n });\n };\n\n _proto.beforeRender = function beforeRender() {\n var self = this;\n var title = self.get('title');\n var label = self.get('label');\n var grid = self.get('grid');\n\n if (title) {\n self.set('title', Util.deepMix({\n autoRotate: true,\n textStyle: {\n fontSize: 12,\n fill: '#ccc',\n textBaseline: 'middle',\n fontFamily: FONT_FAMILY,\n textAlign: 'center'\n },\n offset: 48\n }, title));\n }\n\n if (label) {\n self.set('label', Util.deepMix({\n autoRotate: true,\n autoHide: true,\n textStyle: {\n fontSize: 12,\n fill: '#ccc',\n textBaseline: 'middle',\n fontFamily: FONT_FAMILY\n },\n offset: 10\n }, label));\n }\n\n if (grid) {\n self.set('grid', Util.deepMix({\n lineStyle: {\n lineWidth: 1,\n stroke: '#C0D0E0'\n }\n }, grid));\n }\n };\n\n _proto.render = function render() {\n var self = this;\n self.beforeRender();\n var labelCfg = self.get('label');\n\n if (labelCfg) {\n self.renderLabels();\n }\n\n if (self.get('autoPaint')) {\n self.paint();\n }\n\n if (!Util.isNil(self.get('title'))) {\n self.renderTitle();\n }\n\n self.get('group').sort();\n };\n\n _proto.renderLabels = function renderLabels() {\n var self = this;\n var group = self.get('group');\n var labelCfg = self.get('label');\n var labelRenderer = new Label({\n name: 'axis-label'\n });\n self.set('labelRenderer', labelRenderer);\n labelRenderer.set('labelCfg', labelCfg);\n var cfgs2copy = ['formatter', 'htmlTemplate', 'labelLine', 'textStyle', 'useHtml'];\n Util.each(cfgs2copy, function (cfg) {\n if (labelCfg[cfg]) {\n labelRenderer.set(cfg, labelCfg[cfg]);\n }\n });\n labelRenderer.set('coord', self.get('coord'));\n labelRenderer.set('group', group.addGroup());\n labelRenderer.set('canvas', self.get('canvas'));\n };\n\n _proto._parseTicks = function _parseTicks(ticks) {\n ticks = ticks || [];\n var ticksLength = ticks.length;\n\n for (var i = 0; i < ticksLength; i++) {\n var item = ticks[i];\n\n if (!Util.isObject(item)) {\n ticks[i] = this.parseTick(item, i, ticksLength);\n }\n }\n\n this.set('ticks', ticks);\n return ticks;\n };\n\n _proto._addTickItem = function _addTickItem(index, point, length, type) {\n if (type === void 0) {\n type = '';\n }\n\n var tickItems = this.get('tickItems');\n var subTickItems = this.get('subTickItems');\n var end = this.getTickEnd(point, length, index);\n var cfg = {\n x1: point.x,\n y1: point.y,\n x2: end.x,\n y2: end.y\n };\n\n if (!tickItems) {\n tickItems = [];\n }\n\n if (!subTickItems) {\n subTickItems = [];\n }\n\n if (type === 'sub') {\n subTickItems.push(cfg);\n } else {\n tickItems.push(cfg);\n }\n\n this.set('tickItems', tickItems);\n this.set('subTickItems', subTickItems);\n };\n\n _proto._renderLine = function _renderLine() {\n var self = this;\n var lineCfg = self.get('line');\n var path;\n\n if (lineCfg) {\n path = self.getLinePath();\n lineCfg = Util.mix({\n path: path\n }, lineCfg);\n var group = self.get('group');\n var lineShape = group.addShape('path', {\n attrs: lineCfg\n });\n lineShape.name = 'axis-line';\n self.get('appendInfo') && lineShape.setSilent('appendInfo', self.get('appendInfo'));\n self.set('lineShape', lineShape);\n }\n };\n\n _proto._processCatTicks = function _processCatTicks() {\n var self = this;\n var labelCfg = self.get('label');\n var tickLineCfg = self.get('tickLine');\n var ticks = self.get('ticks');\n ticks = self._parseTicks(ticks);\n\n var new_ticks = self._getNormalizedTicks(ticks);\n\n for (var i = 0; i < new_ticks.length; i += 3) {\n var p = self.getTickPoint(new_ticks[i]);\n var p0 = self.getTickPoint(new_ticks[i + 1]);\n var p1 = self.getTickPoint(new_ticks[i + 2]);\n var index = Math.floor(i / 3);\n var tick = ticks[index];\n\n if (tickLineCfg) {\n if (index === 0) {\n self._addTickItem(index, p0, tickLineCfg.length);\n }\n\n self._addTickItem(index, p1, tickLineCfg.length);\n }\n\n if (labelCfg) {\n self.addLabel(tick, p, index);\n }\n }\n };\n\n _proto._getNormalizedTicks = function _getNormalizedTicks(ticks) {\n var tickSeg = 0;\n\n if (ticks.length > 1) {\n tickSeg = (ticks[1].value - ticks[0].value) / 2;\n }\n\n var points = [];\n\n for (var i = 0; i < ticks.length; i++) {\n var tick = ticks[i];\n var p = tick.value;\n var p0 = tick.value - tickSeg;\n var p1 = tick.value + tickSeg;\n points.push(p, p0, p1);\n }\n\n var range = Util.arrayUtil.getRange(points);\n return points.map(function (p) {\n var norm = (p - range.min) / (range.max - range.min);\n return norm;\n });\n };\n\n _proto.addLabel = function addLabel(tick, point, index) {\n var self = this;\n var labelItems = self.get('labelItems');\n var labelRenderer = self.get('labelRenderer');\n var label = Util.deepMix({}, self.get('label'));\n var rst;\n\n if (labelRenderer) {\n var offset = self.get('_labelOffset');\n\n if (!Util.isNil(self.get('label').offset)) {\n offset = self.get('label').offset;\n }\n\n var vector = self.getSideVector(offset, point, index);\n point = {\n x: point.x + vector[0] + label.offsetX,\n y: point.y + vector[1] + label.offsetY\n };\n label.text = tick.text;\n label.x = point.x;\n label.y = point.y;\n label.point = point;\n label.textAlign = self.getTextAnchor(vector);\n\n if (point.rotate) {\n label.rotate = point.rotate;\n }\n\n labelItems.push(label);\n }\n\n return rst;\n };\n\n _proto._processTicks = function _processTicks() {\n var self = this;\n var labelCfg = self.get('label');\n var subTickCount = self.get('subTickCount');\n var tickLineCfg = self.get('tickLine');\n var ticks = self.get('ticks');\n ticks = self._parseTicks(ticks);\n Util.each(ticks, function (tick, index) {\n var tickPoint = self.getTickPoint(tick.value, index);\n\n if (tickLineCfg) {\n self._addTickItem(index, tickPoint, tickLineCfg.length);\n }\n\n if (labelCfg) {\n self.addLabel(tick, tickPoint, index);\n }\n });\n\n if (subTickCount) {\n // 如果有设置次级分点,添加次级tick\n var subTickLineCfg = self.get('subTickLine');\n Util.each(ticks, function (tick, index) {\n if (index > 0) {\n var diff = tick.value - ticks[index - 1].value;\n diff = diff / (self.get('subTickCount') + 1);\n\n for (var i = 1; i <= subTickCount; i++) {\n var subTick = {\n text: '',\n value: index ? ticks[index - 1].value + i * diff : i * diff\n };\n var tickPoint = self.getTickPoint(subTick.value);\n var subTickLength = void 0;\n\n if (subTickLineCfg && subTickLineCfg.length) {\n subTickLength = subTickLineCfg.length;\n } else {\n subTickLength = parseInt(tickLineCfg.length * (3 / 5), 10);\n }\n\n self._addTickItem(i - 1, tickPoint, subTickLength, 'sub');\n }\n }\n });\n }\n };\n\n _proto._addTickLine = function _addTickLine(ticks, lineCfg) {\n var self = this;\n var cfg = Util.mix({}, lineCfg);\n var path = [];\n Util.each(ticks, function (item) {\n path.push(['M', item.x1, item.y1]);\n path.push(['L', item.x2, item.y2]);\n });\n delete cfg.length;\n cfg.path = path;\n var group = self.get('group');\n var tickShape = group.addShape('path', {\n attrs: cfg\n });\n tickShape.name = 'axis-ticks';\n tickShape._id = self.get('_id') + '-ticks';\n tickShape.set('coord', self.get('coord'));\n self.get('appendInfo') && tickShape.setSilent('appendInfo', self.get('appendInfo'));\n };\n\n _proto._renderTicks = function _renderTicks() {\n var self = this;\n var tickItems = self.get('tickItems');\n var subTickItems = self.get('subTickItems');\n\n if (!Util.isEmpty(tickItems)) {\n var tickLineCfg = self.get('tickLine');\n\n self._addTickLine(tickItems, tickLineCfg);\n }\n\n if (!Util.isEmpty(subTickItems)) {\n var subTickLineCfg = self.get('subTickLine') || self.get('tickLine');\n\n self._addTickLine(subTickItems, subTickLineCfg);\n }\n };\n\n _proto._renderGrid = function _renderGrid() {\n var grid = this.get('grid');\n\n if (!grid) {\n return;\n }\n\n grid.coord = this.get('coord');\n grid.appendInfo = this.get('appendInfo');\n var group = this.get('group');\n this.set('gridGroup', group.addGroup(Grid, grid));\n };\n\n _proto._renderLabels = function _renderLabels() {\n var self = this;\n var labelRenderer = self.get('labelRenderer');\n var labelItems = self.get('labelItems');\n\n if (labelRenderer) {\n labelRenderer.set('items', labelItems);\n\n labelRenderer._dryDraw();\n }\n };\n\n _proto.paint = function paint() {\n var self = this;\n var tickLineCfg = self.get('tickLine');\n var alignWithLabel = true;\n\n if (tickLineCfg && tickLineCfg.hasOwnProperty('alignWithLabel')) {\n alignWithLabel = tickLineCfg.alignWithLabel;\n }\n\n self._renderLine();\n\n var type = self.get('type');\n var isCat = type === 'cat' || type === 'timeCat';\n\n if (isCat && alignWithLabel === false) {\n self._processCatTicks();\n } else {\n self._processTicks();\n }\n\n self._renderTicks();\n\n self._renderGrid();\n\n self._renderLabels();\n\n var labelCfg = this.get('label');\n\n if (labelCfg && labelCfg.autoRotate) {\n self.autoRotateLabels();\n }\n\n if (labelCfg && labelCfg.autoHide) {\n self.autoHideLabels();\n }\n };\n\n _proto.parseTick = function parseTick(tick, index, length) {\n return {\n text: tick,\n value: index / (length - 1)\n };\n };\n\n _proto.getTextAnchor = function getTextAnchor(vector) {\n var ratio = Math.abs(vector[1] / vector[0]);\n var align;\n\n if (ratio >= 1) {\n // 上面或者下面\n align = 'center';\n } else {\n if (vector[0] > 0) {\n // 右侧\n align = 'start';\n } else {\n // 左侧\n align = 'end';\n }\n }\n\n return align;\n };\n\n _proto.getMaxLabelWidth = function getMaxLabelWidth(labelRenderer) {\n var labels = labelRenderer.getLabels();\n var max = 0;\n Util.each(labels, function (label) {\n var bbox = label.getBBox();\n var width = bbox.width;\n\n if (max < width) {\n max = width;\n }\n });\n return max;\n };\n\n _proto.getMaxLabelHeight = function getMaxLabelHeight(labelRenderer) {\n var labels = labelRenderer.getLabels();\n var max = 0;\n Util.each(labels, function (label) {\n var bbox = label.getBBox();\n var height = bbox.height;\n\n if (max < height) {\n max = height;\n }\n });\n return max;\n };\n\n _proto.destroy = function destroy() {\n var self = this;\n\n if (!self.destroyed) {\n var gridGroup = self.get('gridGroup');\n gridGroup && gridGroup.remove();\n var labelRenderer = this.get('labelRenderer');\n labelRenderer && labelRenderer.destroy();\n var group = self.get('group');\n group.destroy();\n\n _Component.prototype.destroy.call(this); // 要最后调用 super.destroy 否则 get 属性会无效\n\n }\n };\n\n _proto.clear = function clear() {\n var self = this;\n var group = self.get('group');\n\n if (!group.get('destroyed') && group.get('children').length) {\n var gridGroup = self.get('gridGroup');\n gridGroup && gridGroup.clear();\n var labelRenderer = this.get('labelRenderer');\n labelRenderer && labelRenderer.clear();\n\n var _group = self.get('group');\n\n _group.clear();\n }\n }\n /**\n * 旋转文本\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.autoRotateLabels = function autoRotateLabels() {}\n /**\n * 文本自动防遮罩\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.autoHideLabels = function autoHideLabels() {}\n /**\n * 渲染标题\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.renderTitle = function renderTitle() {}\n /**\n * 获取坐标轴线的 path\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.getLinePath = function getLinePath() {}\n /**\n * 获取 tick 在画布上的位置\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.getTickPoint = function getTickPoint() {}\n /**\n * 获取标示坐标点的线的终点\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.getTickEnd = function getTickEnd() {}\n /**\n * 获取距离坐标轴的向量\n * @abstract\n * @return {[type]} [description]\n */\n ;\n\n _proto.getSideVector = function getSideVector() {};\n\n return Axis;\n}(Component);\n\nmodule.exports = Axis;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/axis/base.js\n// module id = 35\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nvar Base = require('./base');\n\nvar Component = /*#__PURE__*/function (_Base) {\n _inheritsLoose(Component, _Base);\n\n function Component() {\n return _Base.apply(this, arguments) || this;\n }\n\n var _proto = Component.prototype; // 配置\n\n _proto.getDefaultCfg = function getDefaultCfg() {\n return {\n // 顶层标志位\n _id: null,\n // 用于动画\n // 容器\n canvas: null,\n container: null,\n // html,可选\n group: null,\n // G Group,可选\n // 交互属性\n capture: false,\n // props\n coord: null,\n offset: [0, 0],\n plotRange: null,\n // BBox\n position: [0, 0],\n visible: true,\n zIndex: 1\n };\n } // 基础生命周期\n ;\n\n _proto._init = function _init() {};\n\n _proto.clear = function clear() {};\n\n _proto.destroy = function destroy() {\n // 之前未指定销毁\n _Base.prototype.destroy.call(this);\n } // 绘图\n ;\n\n _proto.beforeRender = function beforeRender() {};\n\n _proto.render = function render() {} // 初始化、绑事件和绘图\n ;\n\n _proto.afterRender = function afterRender() {};\n\n _proto.beforeDraw = function beforeDraw() {};\n\n _proto.draw = function draw() {} // 单纯更新视图\n ;\n\n _proto.afterDraw = function afterDraw() {} // visibility\n ;\n\n _proto.show = function show() {};\n\n _proto.hide = function hide() {} // props operating syntactic sugar\n ;\n\n _proto.setOffset = function setOffset() {};\n\n _proto.setPosition = function setPosition() {};\n\n _proto.setVisible = function setVisible() {};\n\n _proto.setZIndex = function setZIndex() {};\n\n return Component;\n}(Base);\n\nmodule.exports = Component;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/component.js\n// module id = 36\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar regexTags = /[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig;\nvar regexDot = /[^\\s\\,]+/ig;\nvar numColorCache = {};\nmodule.exports = {\n parseRadius: function parseRadius(radius) {\n var r1 = 0,\n r2 = 0,\n r3 = 0,\n r4 = 0;\n\n if (Util.isArray(radius)) {\n if (radius.length === 1) {\n r1 = r2 = r3 = r4 = radius[0];\n } else if (radius.length === 2) {\n r1 = r3 = radius[0];\n r2 = r4 = radius[1];\n } else if (radius.length === 3) {\n r1 = radius[0];\n r2 = r4 = radius[1];\n r3 = radius[2];\n } else {\n r1 = radius[0];\n r2 = radius[1];\n r3 = radius[2];\n r4 = radius[3];\n }\n } else {\n r1 = r2 = r3 = r4 = radius;\n }\n\n return {\n r1: r1,\n r2: r2,\n r3: r3,\n r4: r4\n };\n },\n parsePath: function parsePath(path) {\n path = path || [];\n\n if (Util.isArray(path)) {\n return path;\n }\n\n if (Util.isString(path)) {\n path = path.match(regexTags);\n Util.each(path, function (item, index) {\n item = item.match(regexDot);\n\n if (item[0].length > 1) {\n var tag = item[0].charAt(0);\n item.splice(1, 0, item[0].substr(1));\n item[0] = tag;\n }\n\n Util.each(item, function (sub, i) {\n if (!isNaN(sub)) {\n item[i] = +sub;\n }\n });\n path[index] = item;\n });\n return path;\n }\n },\n numberToColor: function numberToColor(num) {\n // 增加缓存\n var color = numColorCache[num];\n\n if (!color) {\n var str = num.toString(16);\n\n for (var i = str.length; i < 6; i++) {\n str = '0' + str;\n }\n\n color = '#' + str;\n numColorCache[num] = color;\n }\n\n return color;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/util/format.js\n// module id = 37\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n/**\n * @fileOverview The measurement of linear data scale function\n * @author dxq613@gmail.com\n */\n\n\nvar isNil = require('@antv/util/lib/type/is-nil');\n\nvar each = require('@antv/util/lib/each');\n\nvar Base = require('./base');\n\nvar numberAuto = require('./auto/number');\n/**\n * 线性度量\n * @class Scale.Linear\n */\n\n\nvar Linear = /*#__PURE__*/function (_Base) {\n _inheritsLoose(Linear, _Base);\n\n function Linear() {\n return _Base.apply(this, arguments) || this;\n }\n\n var _proto = Linear.prototype;\n\n _proto._initDefaultCfg = function _initDefaultCfg() {\n _Base.prototype._initDefaultCfg.call(this);\n\n var self = this;\n self.type = 'linear';\n self.isLinear = true;\n /**\n * 是否为了用户习惯,优化min,max和ticks,如果进行优化,则会根据生成的ticks调整min,max,否则舍弃(min,max)范围之外的ticks\n * @type {Boolean}\n * @default false\n */\n\n self.nice = false;\n /**\n * min value of the scale\n * @type {Number}\n * @default null\n */\n\n self.min = null;\n /**\n * min value limitted of the scale\n * @type {Number}\n * @default null\n */\n\n self.minLimit = null;\n /**\n * max value of the scale\n * @type {Number}\n * @default null\n */\n\n self.max = null;\n /**\n * max value limitted of the scale\n * @type {Number}\n * @default null\n */\n\n self.maxLimit = null;\n /**\n * 自动生成标记时的个数\n * @type {Number}\n * @default null\n */\n\n self.tickCount = null;\n /**\n * 坐标轴点之间的间距,指的是真实数据的差值\n * @type {Number}\n * @default null\n */\n\n self.tickInterval = null;\n /**\n * 坐标轴点之间的最小间距,指的是真实数据的差值\n * @type {Number}\n * @default null\n */\n\n self.minTickInterval = null;\n /**\n * 用于计算坐标点时逼近的数组\n * @type {Array}\n */\n\n self.snapArray = null;\n }\n /**\n * @protected\n * @override\n */\n ;\n\n _proto.init = function init() {\n var self = this;\n\n if (!self.ticks) {\n self.min = self.translate(self.min);\n self.max = self.translate(self.max);\n self.initTicks();\n } else {\n var ticks = self.ticks;\n var firstValue = self.translate(ticks[0]);\n var lastValue = self.translate(ticks[ticks.length - 1]);\n\n if (isNil(self.min) || self.min > firstValue) {\n self.min = firstValue;\n }\n\n if (isNil(self.max) || self.max < lastValue) {\n self.max = lastValue;\n }\n }\n }\n /**\n * 计算坐标点\n * @protected\n * @return {Array} 计算完成的坐标点\n */\n ;\n\n _proto.calculateTicks = function calculateTicks() {\n var min = this.min,\n max = this.max,\n minLimit = this.minLimit,\n maxLimit = this.maxLimit,\n tickCount = this.tickCount,\n tickInterval = this.tickInterval,\n minTickInterval = this.minTickInterval,\n snapArray = this.snapArray;\n\n if (tickCount === 1) {\n throw new Error('linear scale\\'tickCount should not be 1');\n }\n\n if (max < min) {\n throw new Error(\"max: \" + max + \" should not be less than min: \" + min);\n }\n\n var tmp = numberAuto({\n min: min,\n max: max,\n minLimit: minLimit,\n maxLimit: maxLimit,\n minCount: tickCount,\n maxCount: tickCount,\n interval: tickInterval,\n minTickInterval: minTickInterval,\n snapArray: snapArray\n });\n return tmp.ticks;\n } // 初始化ticks\n ;\n\n _proto.initTicks = function initTicks() {\n var self = this;\n var calTicks = self.calculateTicks();\n\n if (self.nice) {\n // 如果需要优化显示的tick\n self.ticks = calTicks;\n self.min = calTicks[0];\n self.max = calTicks[calTicks.length - 1];\n } else {\n var ticks = [];\n each(calTicks, function (tick) {\n if (tick >= self.min && tick <= self.max) {\n ticks.push(tick);\n }\n }); // 如果 ticks 为空,直接输入最小值、最大值\n\n if (!ticks.length) {\n ticks.push(self.min);\n ticks.push(self.max);\n }\n\n self.ticks = ticks;\n }\n }\n /**\n * @override\n */\n ;\n\n _proto.scale = function scale(value) {\n if (isNil(value)) {\n return NaN;\n }\n\n var max = this.max;\n var min = this.min;\n\n if (max === min) {\n return 0;\n }\n\n var percent = (value - min) / (max - min);\n var rangeMin = this.rangeMin();\n var rangeMax = this.rangeMax();\n return rangeMin + percent * (rangeMax - rangeMin);\n }\n /**\n * @override\n */\n ;\n\n _proto.invert = function invert(value) {\n var percent = (value - this.rangeMin()) / (this.rangeMax() - this.rangeMin());\n return this.min + percent * (this.max - this.min);\n };\n\n return Linear;\n}(Base);\n\nBase.Linear = Linear;\nmodule.exports = Linear;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/linear.js\n// module id = 38\n// module chunks = 0 1 2","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar isArray = require('./type/is-array');\n\nvar clone = function clone(obj) {\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {\n return obj;\n }\n\n var rst = void 0;\n\n if (isArray(obj)) {\n rst = [];\n\n for (var i = 0, l = obj.length; i < l; i++) {\n if (_typeof(obj[i]) === 'object' && obj[i] != null) {\n rst[i] = clone(obj[i]);\n } else {\n rst[i] = obj[i];\n }\n }\n } else {\n rst = {};\n\n for (var k in obj) {\n if (_typeof(obj[k]) === 'object' && obj[k] != null) {\n rst[k] = clone(obj[k]);\n } else {\n rst[k] = obj[k];\n }\n }\n }\n\n return rst;\n};\n\nmodule.exports = clone;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/clone.js\n// module id = 39\n// module chunks = 0 1 2","var isObjectLike = require('./type/is-object-like');\n\nvar isArrayLike = require('./type/is-array-like');\n\nvar isString = require('./type/is-string');\n\nvar isEqual = function isEqual(value, other) {\n if (value === other) {\n return true;\n }\n\n if (!value || !other) {\n return false;\n }\n\n if (isString(value) || isString(other)) {\n return false;\n }\n\n if (isArrayLike(value) || isArrayLike(other)) {\n if (value.length !== other.length) {\n return false;\n }\n\n var rst = true;\n\n for (var i = 0; i < value.length; i++) {\n rst = isEqual(value[i], other[i]);\n\n if (!rst) {\n break;\n }\n }\n\n return rst;\n }\n\n if (isObjectLike(value) || isObjectLike(other)) {\n var valueKeys = Object.keys(value);\n var otherKeys = Object.keys(other);\n\n if (valueKeys.length !== otherKeys.length) {\n return false;\n }\n\n var _rst = true;\n\n for (var _i = 0; _i < valueKeys.length; _i++) {\n _rst = isEqual(value[valueKeys[_i]], other[valueKeys[_i]]);\n\n if (!_rst) {\n break;\n }\n }\n\n return _rst;\n }\n\n return false;\n};\n\nmodule.exports = isEqual;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/is-equal.js\n// module id = 40\n// module chunks = 0 1 2","var clamp = function clamp(a, min, max) {\n if (a < min) {\n return min;\n } else if (a > max) {\n return max;\n }\n\n return a;\n};\n\nmodule.exports = clamp;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/clamp.js\n// module id = 41\n// module chunks = 0 1 2","var mat3 = require('@antv/gl-matrix/lib/gl-matrix/mat3');\n\nmat3.translate = function (out, a, v) {\n var transMat = new Array(9);\n mat3.fromTranslation(transMat, v);\n return mat3.multiply(out, transMat, a);\n};\n\nmat3.rotate = function (out, a, rad) {\n var rotateMat = new Array(9);\n mat3.fromRotation(rotateMat, rad);\n return mat3.multiply(out, rotateMat, a);\n};\n\nmat3.scale = function (out, a, v) {\n var scaleMat = new Array(9);\n mat3.fromScaling(scaleMat, v);\n return mat3.multiply(out, scaleMat, a);\n};\n\nmodule.exports = mat3;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/matrix/mat3.js\n// module id = 42\n// module chunks = 0 1 2","var vec2 = require('../../util/index').vec2;\n\nmodule.exports = {\n at: function at(p1, p2, t) {\n return (p2 - p1) * t + p1;\n },\n pointDistance: function pointDistance(x1, y1, x2, y2, x, y) {\n var d = [x2 - x1, y2 - y1];\n\n if (vec2.exactEquals(d, [0, 0])) {\n return NaN;\n }\n\n var u = [-d[1], d[0]];\n vec2.normalize(u, u);\n var a = [x - x1, y - y1];\n return Math.abs(vec2.dot(a, u));\n },\n box: function box(x1, y1, x2, y2, lineWidth) {\n var halfWidth = lineWidth / 2;\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n return {\n minX: minX - halfWidth,\n minY: minY - halfWidth,\n maxX: maxX + halfWidth,\n maxY: maxY + halfWidth\n };\n },\n len: function len(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/math/line.js\n// module id = 43\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nfunction circlePoint(cx, cy, r, angle) {\n return {\n x: Math.cos(angle) * r + cx,\n y: Math.sin(angle) * r + cy\n };\n}\n\nfunction angleNearTo(angle, min, max, out) {\n var v1;\n var v2;\n\n if (out) {\n if (angle < min) {\n v1 = min - angle;\n v2 = Math.PI * 2 - max + angle;\n } else if (angle > max) {\n v1 = Math.PI * 2 - angle + min;\n v2 = angle - max;\n }\n } else {\n v1 = angle - min;\n v2 = max - angle;\n }\n\n return v1 > v2 ? max : min;\n}\n\nfunction nearAngle(angle, startAngle, endAngle, clockwise) {\n var plus = 0;\n\n if (endAngle - startAngle >= Math.PI * 2) {\n plus = Math.PI * 2;\n }\n\n startAngle = Util.mod(startAngle, Math.PI * 2);\n endAngle = Util.mod(endAngle, Math.PI * 2) + plus;\n angle = Util.mod(angle, Math.PI * 2);\n\n if (clockwise) {\n if (startAngle >= endAngle) {\n if (angle > endAngle && angle < startAngle) {\n return angle;\n }\n\n return angleNearTo(angle, endAngle, startAngle, true);\n }\n\n if (angle < startAngle || angle > endAngle) {\n return angle;\n }\n\n return angleNearTo(angle, startAngle, endAngle);\n }\n\n if (startAngle <= endAngle) {\n if (startAngle < angle && angle < endAngle) {\n return angle;\n }\n\n return angleNearTo(angle, startAngle, endAngle, true);\n }\n\n if (angle > startAngle || angle < endAngle) {\n return angle;\n }\n\n return angleNearTo(angle, endAngle, startAngle);\n}\n\nfunction arcProjectPoint(cx, cy, r, startAngle, endAngle, clockwise, x, y, out) {\n var v = [x, y];\n var v0 = [cx, cy];\n var v1 = [1, 0];\n var subv = Util.vec2.subtract([], v, v0);\n var angle = Util.vec2.angleTo(v1, subv);\n angle = nearAngle(angle, startAngle, endAngle, clockwise);\n var vpoint = [r * Math.cos(angle) + cx, r * Math.sin(angle) + cy];\n\n if (out) {\n out.x = vpoint[0];\n out.y = vpoint[1];\n }\n\n var d = Util.vec2.distance(vpoint, v);\n return d;\n}\n\nfunction arcBox(cx, cy, r, startAngle, endAngle, clockwise) {\n var angleRight = 0;\n var angleBottom = Math.PI / 2;\n var angleLeft = Math.PI;\n var angleTop = Math.PI * 3 / 2;\n var points = [];\n var angle = nearAngle(angleRight, startAngle, endAngle, clockwise);\n\n if (angle === angleRight) {\n points.push(circlePoint(cx, cy, r, angleRight));\n }\n\n angle = nearAngle(angleBottom, startAngle, endAngle, clockwise);\n\n if (angle === angleBottom) {\n points.push(circlePoint(cx, cy, r, angleBottom));\n }\n\n angle = nearAngle(angleLeft, startAngle, endAngle, clockwise);\n\n if (angle === angleLeft) {\n points.push(circlePoint(cx, cy, r, angleLeft));\n }\n\n angle = nearAngle(angleTop, startAngle, endAngle, clockwise);\n\n if (angle === angleTop) {\n points.push(circlePoint(cx, cy, r, angleTop));\n }\n\n points.push(circlePoint(cx, cy, r, startAngle));\n points.push(circlePoint(cx, cy, r, endAngle));\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n Util.each(points, function (point) {\n if (minX > point.x) {\n minX = point.x;\n }\n\n if (maxX < point.x) {\n maxX = point.x;\n }\n\n if (minY > point.y) {\n minY = point.y;\n }\n\n if (maxY < point.y) {\n maxY = point.y;\n }\n });\n return {\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY\n };\n}\n\nmodule.exports = {\n nearAngle: nearAngle,\n projectPoint: function projectPoint(cx, cy, r, startAngle, endAngle, clockwise, x, y) {\n var rst = {};\n arcProjectPoint(cx, cy, r, startAngle, endAngle, clockwise, x, y, rst);\n return rst;\n },\n pointDistance: arcProjectPoint,\n box: arcBox\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/math/arc.js\n// module id = 44\n// module chunks = 0 1 2","var Format = require('../../util/format');\n\nvar PathSegment = require('../util/path-segment');\n\nvar PI = Math.PI;\nvar sin = Math.sin;\nvar cos = Math.cos;\nvar atan2 = Math.atan2;\nvar DEFAULT_LENGTH = 10;\nvar DEFAULT_ANGLE = PI / 3;\n\nfunction _addArrow(ctx, attrs, x1, y1, x2, y2, isStart) {\n var leftX;\n var leftY;\n var rightX;\n var rightY;\n var offsetX;\n var offsetY;\n var angle;\n\n if (!attrs.fill) {\n // 闭合的不绘制箭头\n var arrowLength = attrs.arrowLength || DEFAULT_LENGTH;\n var arrowAngle = attrs.arrowAngle ? attrs.arrowAngle * PI / 180 : DEFAULT_ANGLE; // 转换为弧\n // Calculate angle\n\n angle = atan2(y1 - y2, x1 - x2);\n /* // Adjust angle correctly\n angle -= PI;*/\n // Calculate offset to place arrow at edge of path\n\n offsetX = Math.abs(attrs.lineWidth * cos(angle)) / 2;\n offsetY = Math.abs(attrs.lineWidth * sin(angle)) / 2;\n\n if (isStart) {\n offsetX = -offsetX;\n offsetY = -offsetY;\n } // Calculate coordinates for left half of arrow\n\n\n leftX = x2 + arrowLength * cos(angle + arrowAngle / 2);\n leftY = y2 + arrowLength * sin(angle + arrowAngle / 2); // Calculate coordinates for right half of arrow\n\n rightX = x2 + arrowLength * cos(angle - arrowAngle / 2);\n rightY = y2 + arrowLength * sin(angle - arrowAngle / 2);\n ctx.beginPath(); // Draw left half of arrow\n\n ctx.moveTo(leftX - offsetX, leftY - offsetY);\n ctx.lineTo(x2 - offsetX, y2 - offsetY); // Draw right half of arrow\n\n ctx.lineTo(rightX - offsetX, rightY - offsetY); // Visually connect arrow to path\n\n ctx.moveTo(x2 - offsetX, y2 - offsetY);\n ctx.lineTo(x2 + offsetX, y2 + offsetY); // Move back to end of path\n\n ctx.moveTo(x2, y2);\n ctx.stroke();\n }\n}\n\nfunction parsePath(attrs) {\n var segments = [];\n var pathArray = Format.parsePath(attrs.path);\n var preSegment;\n\n if (!Array.isArray(pathArray) || pathArray.length === 0 || pathArray[0][0] !== 'M' && pathArray[0][0] !== 'm') {\n return false;\n }\n\n var count = pathArray.length;\n\n for (var i = 0; i < pathArray.length; i++) {\n var item = pathArray[i];\n preSegment = new PathSegment(item, preSegment, i === count - 1);\n segments.push(preSegment);\n }\n\n return segments;\n}\n/**\n * 如果自定义箭头并且有 d 需要做偏移,如果直接画,线条会超出箭头尖端,因此需要根据箭头偏移 d, 返回线需要缩短的距离\n * |----------------\n * |<|--------------\n * |\n * @param {Number} x1 起始点 x\n * @param {number} y1 起始点 y\n * @param {number} x2 箭头作用点 x\n * @param {number} y2 箭头作用点 y\n * @param {number} d 箭头沿线条方向的偏移距离\n * @return {{dx: number, dy: number}} 返回线条偏移距离\n */\n\n\nfunction getShortenOffset(x1, y1, x2, y2, d) {\n var rad = Math.atan2(y2 - y1, x2 - x1);\n return {\n dx: cos(rad) * d,\n dy: sin(rad) * d\n };\n}\n\nfunction _addCustomizedArrow(ctx, attrs, x1, y1, x2, y2, isStart) {\n var shape = isStart ? attrs.startArrow : attrs.endArrow;\n var d = shape.d;\n var x = x2 - x1;\n var y = y2 - y1;\n var rad = Math.atan2(y, x);\n var path = parsePath(shape);\n\n if (!path) {\n return;\n }\n\n if (d) {\n x2 = x2 - cos(rad) * d;\n y2 = y2 - sin(rad) * d;\n }\n\n ctx.save();\n ctx.beginPath();\n ctx.translate(x2, y2);\n ctx.rotate(rad);\n\n for (var i = 0; i < path.length; i++) {\n path[i].draw(ctx);\n }\n\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.fill();\n ctx.restore();\n}\n\nmodule.exports = {\n addStartArrow: function addStartArrow(ctx, attrs, x1, y1, x2, y2) {\n if (typeof attrs.startArrow === 'object') {\n _addCustomizedArrow(ctx, attrs, x1, y1, x2, y2, true);\n } else if (attrs.startArrow) {\n _addArrow(ctx, attrs, x1, y1, x2, y2, true);\n }\n },\n addEndArrow: function addEndArrow(ctx, attrs, x1, y1, x2, y2) {\n if (typeof attrs.endArrow === 'object') {\n _addCustomizedArrow(ctx, attrs, x1, y1, x2, y2, false);\n } else if (attrs.endArrow) {\n _addArrow(ctx, attrs, x1, y1, x2, y2, false);\n }\n },\n getShortenOffset: getShortenOffset\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/util/arrow.js\n// module id = 45\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nvar Inside = require('./inside');\n\nvar Cubic = require('../math/cubic');\n\nvar Quadratic = require('../math/quadratic');\n\nvar Ellipse = require('../math/ellipse');\n\nvar vec3 = Util.vec3;\nvar mat3 = Util.mat3;\nvar ARR_CMD = ['m', 'l', 'c', 'a', 'q', 'h', 'v', 't', 's', 'z'];\n\nfunction toAbsolute(x, y, curPoint) {\n // 获取绝对坐标\n return {\n x: curPoint.x + x,\n y: curPoint.y + y\n };\n}\n\nfunction toSymmetry(point, center) {\n // 点对称\n return {\n x: center.x + (center.x - point.x),\n y: center.y + (center.y - point.y)\n };\n}\n\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n\nfunction vRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n}\n\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n\nfunction getArcParams(point1, point2, fa, fs, rx, ry, psiDeg) {\n var psi = Util.mod(Util.toRadian(psiDeg), Math.PI * 2);\n var x1 = point1.x;\n var y1 = point1.y;\n var x2 = point2.x;\n var y2 = point2.y;\n var xp = Math.cos(psi) * (x1 - x2) / 2.0 + Math.sin(psi) * (y1 - y2) / 2.0;\n var yp = -1 * Math.sin(psi) * (x1 - x2) / 2.0 + Math.cos(psi) * (y1 - y2) / 2.0;\n var lambda = xp * xp / (rx * rx) + yp * yp / (ry * ry);\n\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n\n var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp);\n var f = Math.sqrt((rx * rx * (ry * ry) - diff) / diff);\n\n if (fa === fs) {\n f *= -1;\n }\n\n if (isNaN(f)) {\n f = 0;\n }\n\n var cxp = f * rx * yp / ry;\n var cyp = f * -ry * xp / rx;\n var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;\n var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n var dTheta = vAngle(u, v);\n\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n\n if (fs === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n\n if (fs === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n\n return [point1, cx, cy, rx, ry, theta, dTheta, psi, fs];\n}\n\nvar PathSegment = function PathSegment(item, preSegment, isLast) {\n this.preSegment = preSegment;\n this.isLast = isLast;\n this.init(item, preSegment);\n};\n\nUtil.augment(PathSegment, {\n init: function init(item, preSegment) {\n var command = item[0];\n preSegment = preSegment || {\n endPoint: {\n x: 0,\n y: 0\n }\n };\n var relative = ARR_CMD.indexOf(command) >= 0; // /[a-z]/.test(command);\n\n var cmd = relative ? command.toUpperCase() : command;\n var p = item;\n var point1;\n var point2;\n var point3;\n var point;\n var preEndPoint = preSegment.endPoint;\n var p1 = p[1];\n var p2 = p[2];\n\n switch (cmd) {\n default:\n break;\n\n case 'M':\n if (relative) {\n point = toAbsolute(p1, p2, preEndPoint);\n } else {\n point = {\n x: p1,\n y: p2\n };\n }\n\n this.command = 'M';\n this.params = [preEndPoint, point];\n this.subStart = point;\n this.endPoint = point;\n break;\n\n case 'L':\n if (relative) {\n point = toAbsolute(p1, p2, preEndPoint);\n } else {\n point = {\n x: p1,\n y: p2\n };\n }\n\n this.command = 'L';\n this.params = [preEndPoint, point];\n this.subStart = preSegment.subStart;\n this.endPoint = point;\n\n this.endTangent = function () {\n return [point.x - preEndPoint.x, point.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point.x, preEndPoint.y - point.y];\n };\n\n break;\n\n case 'H':\n if (relative) {\n point = toAbsolute(p1, 0, preEndPoint);\n } else {\n point = {\n x: p1,\n y: preEndPoint.y\n };\n }\n\n this.command = 'L';\n this.params = [preEndPoint, point];\n this.subStart = preSegment.subStart;\n this.endPoint = point;\n\n this.endTangent = function () {\n return [point.x - preEndPoint.x, point.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point.x, preEndPoint.y - point.y];\n };\n\n break;\n\n case 'V':\n if (relative) {\n point = toAbsolute(0, p1, preEndPoint);\n } else {\n point = {\n x: preEndPoint.x,\n y: p1\n };\n }\n\n this.command = 'L';\n this.params = [preEndPoint, point];\n this.subStart = preSegment.subStart;\n this.endPoint = point;\n\n this.endTangent = function () {\n return [point.x - preEndPoint.x, point.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point.x, preEndPoint.y - point.y];\n };\n\n break;\n\n case 'Q':\n if (relative) {\n point1 = toAbsolute(p1, p2, preEndPoint);\n point2 = toAbsolute(p[3], p[4], preEndPoint);\n } else {\n point1 = {\n x: p1,\n y: p2\n };\n point2 = {\n x: p[3],\n y: p[4]\n };\n }\n\n this.command = 'Q';\n this.params = [preEndPoint, point1, point2];\n this.subStart = preSegment.subStart;\n this.endPoint = point2;\n\n this.endTangent = function () {\n return [point2.x - point1.x, point2.y - point1.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n\n break;\n\n case 'T':\n if (relative) {\n point2 = toAbsolute(p1, p2, preEndPoint);\n } else {\n point2 = {\n x: p1,\n y: p2\n };\n }\n\n if (preSegment.command === 'Q') {\n point1 = toSymmetry(preSegment.params[1], preEndPoint);\n this.command = 'Q';\n this.params = [preEndPoint, point1, point2];\n this.subStart = preSegment.subStart;\n this.endPoint = point2;\n\n this.endTangent = function () {\n return [point2.x - point1.x, point2.y - point1.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n } else {\n this.command = 'TL';\n this.params = [preEndPoint, point2];\n this.subStart = preSegment.subStart;\n this.endPoint = point2;\n\n this.endTangent = function () {\n return [point2.x - preEndPoint.x, point2.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point2.x, preEndPoint.y - point2.y];\n };\n }\n\n break;\n\n case 'C':\n if (relative) {\n point1 = toAbsolute(p1, p2, preEndPoint);\n point2 = toAbsolute(p[3], p[4], preEndPoint);\n point3 = toAbsolute(p[5], p[6], preEndPoint);\n } else {\n point1 = {\n x: p1,\n y: p2\n };\n point2 = {\n x: p[3],\n y: p[4]\n };\n point3 = {\n x: p[5],\n y: p[6]\n };\n }\n\n this.command = 'C';\n this.params = [preEndPoint, point1, point2, point3];\n this.subStart = preSegment.subStart;\n this.endPoint = point3;\n\n this.endTangent = function () {\n return [point3.x - point2.x, point3.y - point2.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n\n break;\n\n case 'S':\n if (relative) {\n point2 = toAbsolute(p1, p2, preEndPoint);\n point3 = toAbsolute(p[3], p[4], preEndPoint);\n } else {\n point2 = {\n x: p1,\n y: p2\n };\n point3 = {\n x: p[3],\n y: p[4]\n };\n }\n\n if (preSegment.command === 'C') {\n point1 = toSymmetry(preSegment.params[2], preEndPoint);\n this.command = 'C';\n this.params = [preEndPoint, point1, point2, point3];\n this.subStart = preSegment.subStart;\n this.endPoint = point3;\n\n this.endTangent = function () {\n return [point3.x - point2.x, point3.y - point2.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n } else {\n this.command = 'SQ';\n this.params = [preEndPoint, point2, point3];\n this.subStart = preSegment.subStart;\n this.endPoint = point3;\n\n this.endTangent = function () {\n return [point3.x - point2.x, point3.y - point2.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point2.x, preEndPoint.y - point2.y];\n };\n }\n\n break;\n\n case 'A':\n {\n var rx = p1;\n var ry = p2;\n var psi = p[3];\n var fa = p[4];\n var fs = p[5];\n\n if (relative) {\n point = toAbsolute(p[6], p[7], preEndPoint);\n } else {\n point = {\n x: p[6],\n y: p[7]\n };\n }\n\n this.command = 'A';\n var params = getArcParams(preEndPoint, point, fa, fs, rx, ry, psi);\n this.params = params;\n var start = preSegment.subStart;\n this.subStart = start;\n this.endPoint = point;\n var startAngle = params[5] % (Math.PI * 2);\n\n if (Util.isNumberEqual(startAngle, Math.PI * 2)) {\n startAngle = 0;\n }\n\n var endAngle = params[6] % (Math.PI * 2);\n\n if (Util.isNumberEqual(endAngle, Math.PI * 2)) {\n endAngle = 0;\n }\n\n var d = 0.001;\n\n this.startTangent = function () {\n if (fs === 0) {\n d *= -1;\n }\n\n var dx = params[3] * Math.cos(startAngle - d) + params[1];\n var dy = params[4] * Math.sin(startAngle - d) + params[2];\n return [dx - start.x, dy - start.y];\n };\n\n this.endTangent = function () {\n var endAngle = params[6];\n\n if (endAngle - Math.PI * 2 < 0.0001) {\n endAngle = 0;\n }\n\n var dx = params[3] * Math.cos(startAngle + endAngle + d) + params[1];\n var dy = params[4] * Math.sin(startAngle + endAngle - d) + params[2];\n return [preEndPoint.x - dx, preEndPoint.y - dy];\n };\n\n break;\n }\n\n case 'Z':\n {\n this.command = 'Z';\n this.params = [preEndPoint, preSegment.subStart];\n this.subStart = preSegment.subStart;\n this.endPoint = preSegment.subStart;\n }\n }\n },\n isInside: function isInside(x, y, lineWidth) {\n var self = this;\n var command = self.command;\n var params = self.params;\n var box = self.box;\n\n if (box) {\n if (!Inside.box(box.minX, box.maxX, box.minY, box.maxY, x, y)) {\n return false;\n }\n }\n\n switch (command) {\n default:\n break;\n\n case 'M':\n return false;\n\n case 'TL':\n case 'L':\n case 'Z':\n return Inside.line(params[0].x, params[0].y, params[1].x, params[1].y, lineWidth, x, y);\n\n case 'SQ':\n case 'Q':\n return Inside.quadraticline(params[0].x, params[0].y, params[1].x, params[1].y, params[2].x, params[2].y, lineWidth, x, y);\n\n case 'C':\n {\n return Inside.cubicline(params[0].x, params[0].y, params[1].x, params[1].y, params[2].x, params[2].y, params[3].x, params[3].y, lineWidth, x, y);\n }\n\n case 'A':\n {\n var p = params;\n var cx = p[1];\n var cy = p[2];\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n p = [x, y, 1];\n var m = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n mat3.translate(m, m, [-cx, -cy]);\n mat3.rotate(m, m, -psi);\n mat3.scale(m, m, [1 / scaleX, 1 / scaleY]);\n vec3.transformMat3(p, p, m);\n return Inside.arcline(0, 0, r, theta, theta + dTheta, 1 - fs, lineWidth, p[0], p[1]);\n }\n }\n\n return false;\n },\n draw: function draw(context) {\n var command = this.command;\n var params = this.params;\n var point1;\n var point2;\n var point3;\n\n switch (command) {\n default:\n break;\n\n case 'M':\n context.moveTo(params[1].x, params[1].y);\n break;\n\n case 'TL':\n case 'L':\n context.lineTo(params[1].x, params[1].y);\n break;\n\n case 'SQ':\n case 'Q':\n point1 = params[1];\n point2 = params[2];\n context.quadraticCurveTo(point1.x, point1.y, point2.x, point2.y);\n break;\n\n case 'C':\n point1 = params[1];\n point2 = params[2];\n point3 = params[3];\n context.bezierCurveTo(point1.x, point1.y, point2.x, point2.y, point3.x, point3.y);\n break;\n\n case 'A':\n {\n var p = params;\n var p1 = p[1];\n var p2 = p[2];\n var cx = p1;\n var cy = p2;\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(psi);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-psi);\n context.translate(-cx, -cy);\n break;\n }\n\n case 'Z':\n context.closePath();\n break;\n }\n },\n shortenDraw: function shortenDraw(context, dx, dy) {\n var command = this.command;\n var params = this.params;\n var point1;\n var point2;\n var point3;\n\n switch (command) {\n default:\n break;\n\n case 'M':\n context.moveTo(params[1].x - dx, params[1].y - dy);\n break;\n\n case 'TL':\n case 'L':\n context.lineTo(params[1].x - dx, params[1].y - dy);\n break;\n\n case 'SQ':\n case 'Q':\n point1 = params[1];\n point2 = params[2];\n context.quadraticCurveTo(point1.x, point1.y, point2.x - dx, point2.y - dy);\n break;\n\n case 'C':\n point1 = params[1];\n point2 = params[2];\n point3 = params[3];\n context.bezierCurveTo(point1.x, point1.y, point2.x, point2.y, point3.x - dx, point3.y - dy);\n break;\n\n case 'A':\n {\n var p = params;\n var p1 = p[1];\n var p2 = p[2];\n var cx = p1;\n var cy = p2;\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(psi);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-psi);\n context.translate(-cx, -cy);\n break;\n }\n\n case 'Z':\n context.closePath();\n break;\n }\n },\n getBBox: function getBBox(lineWidth) {\n var halfWidth = lineWidth / 2;\n var params = this.params;\n var yDims;\n var xDims;\n var i;\n var l;\n\n switch (this.command) {\n default:\n case 'M':\n case 'Z':\n break;\n\n case 'TL':\n case 'L':\n this.box = {\n minX: Math.min(params[0].x, params[1].x) - halfWidth,\n maxX: Math.max(params[0].x, params[1].x) + halfWidth,\n minY: Math.min(params[0].y, params[1].y) - halfWidth,\n maxY: Math.max(params[0].y, params[1].y) + halfWidth\n };\n break;\n\n case 'SQ':\n case 'Q':\n xDims = Quadratic.extrema(params[0].x, params[1].x, params[2].x);\n\n for (i = 0, l = xDims.length; i < l; i++) {\n xDims[i] = Quadratic.at(params[0].x, params[1].x, params[2].x, xDims[i]);\n }\n\n xDims.push(params[0].x, params[2].x);\n yDims = Quadratic.extrema(params[0].y, params[1].y, params[2].y);\n\n for (i = 0, l = yDims.length; i < l; i++) {\n yDims[i] = Quadratic.at(params[0].y, params[1].y, params[2].y, yDims);\n }\n\n yDims.push(params[0].y, params[2].y);\n this.box = {\n minX: Math.min.apply(Math, xDims) - halfWidth,\n maxX: Math.max.apply(Math, xDims) + halfWidth,\n minY: Math.min.apply(Math, yDims) - halfWidth,\n maxY: Math.max.apply(Math, yDims) + halfWidth\n };\n break;\n\n case 'C':\n xDims = Cubic.extrema(params[0].x, params[1].x, params[2].x, params[3].x);\n\n for (i = 0, l = xDims.length; i < l; i++) {\n xDims[i] = Cubic.at(params[0].x, params[1].x, params[2].x, params[3].x, xDims[i]);\n }\n\n yDims = Cubic.extrema(params[0].y, params[1].y, params[2].y, params[3].y);\n\n for (i = 0, l = yDims.length; i < l; i++) {\n yDims[i] = Cubic.at(params[0].y, params[1].y, params[2].y, params[3].y, yDims[i]);\n }\n\n xDims.push(params[0].x, params[3].x);\n yDims.push(params[0].y, params[3].y);\n this.box = {\n minX: Math.min.apply(Math, xDims) - halfWidth,\n maxX: Math.max.apply(Math, xDims) + halfWidth,\n minY: Math.min.apply(Math, yDims) - halfWidth,\n maxY: Math.max.apply(Math, yDims) + halfWidth\n };\n break;\n\n case 'A':\n {\n // todo 待优化\n var p = params;\n var cx = p[1];\n var cy = p[2];\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var start = theta;\n var end = theta + dTheta;\n var xDim = Ellipse.xExtrema(psi, rx, ry);\n var minX = Infinity;\n var maxX = -Infinity;\n var xs = [start, end];\n\n for (i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var xAngle = xDim + i;\n\n if (fs === 1) {\n if (start < xAngle && xAngle < end) {\n xs.push(xAngle);\n }\n } else {\n if (end < xAngle && xAngle < start) {\n xs.push(xAngle);\n }\n }\n }\n\n for (i = 0, l = xs.length; i < l; i++) {\n var x = Ellipse.xAt(psi, rx, ry, cx, xs[i]);\n\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n }\n\n var yDim = Ellipse.yExtrema(psi, rx, ry);\n var minY = Infinity;\n var maxY = -Infinity;\n var ys = [start, end];\n\n for (i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var yAngle = yDim + i;\n\n if (fs === 1) {\n if (start < yAngle && yAngle < end) {\n ys.push(yAngle);\n }\n } else {\n if (end < yAngle && yAngle < start) {\n ys.push(yAngle);\n }\n }\n }\n\n for (i = 0, l = ys.length; i < l; i++) {\n var y = Ellipse.yAt(psi, rx, ry, cy, ys[i]);\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n }\n\n this.box = {\n minX: minX - halfWidth,\n maxX: maxX + halfWidth,\n minY: minY - halfWidth,\n maxY: maxY + halfWidth\n };\n break;\n }\n }\n }\n});\nmodule.exports = PathSegment;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/util/path-segment.js\n// module id = 46\n// module chunks = 0 1 2","export default function (a, b) {\n return a = +a, b -= a, function (t) {\n return a + b * t;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/number.js\n// module id = 47\n// module chunks = 0 1 2","var isArrayLike = require('../type/is-array-like');\n\nvar indexOf = Array.prototype.indexOf;\n\nvar contains = function contains(arr, value) {\n if (!isArrayLike(arr)) {\n return false;\n }\n\n return indexOf.call(arr, value) > -1;\n};\n\nmodule.exports = contains;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/array/contains.js\n// module id = 48\n// module chunks = 0 1 2","var merge = function merge(dataArray) {\n var rst = [];\n\n for (var i = 0; i < dataArray.length; i++) {\n rst = rst.concat(dataArray[i]);\n }\n\n return rst;\n};\n\nmodule.exports = merge;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/array/merge.js\n// module id = 49\n// module chunks = 0 1 2","module.exports = {\n mat3: require('./mat3'),\n vec2: require('./vec2'),\n vec3: require('./vec3'),\n transform: require('./transform')\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/matrix/index.js\n// module id = 50\n// module chunks = 0 1 2","module.exports = {\n Canvas: require('./canvas'),\n Group: require('./core/group'),\n Shape: require('./core/shape'),\n Arc: require('./shapes/arc'),\n Circle: require('./shapes/circle'),\n Dom: require('./shapes/dom'),\n Ellipse: require('./shapes/ellipse'),\n Fan: require('./shapes/fan'),\n Image: require('./shapes/image'),\n Line: require('./shapes/line'),\n Marker: require('./shapes/marker'),\n Path: require('./shapes/path'),\n Polygon: require('./shapes/polygon'),\n Polyline: require('./shapes/polyline'),\n Rect: require('./shapes/rect'),\n Text: require('./shapes/text'),\n PathSegment: require('./shapes/util/path-segment'),\n PathUtil: require('./util/path'),\n Event: require('./event'),\n // version, etc.\n version: '3.3.6'\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/index.js\n// module id = 51\n// module chunks = 0 1 2","var vec2 = require('../../util/index').vec2;\n\nmodule.exports = {\n at: function at(p1, p2, t) {\n return (p2 - p1) * t + p1;\n },\n pointDistance: function pointDistance(x1, y1, x2, y2, x, y) {\n var d = [x2 - x1, y2 - y1];\n\n if (vec2.exactEquals(d, [0, 0])) {\n return NaN;\n }\n\n var u = [-d[1], d[0]];\n vec2.normalize(u, u);\n var a = [x - x1, y - y1];\n return Math.abs(vec2.dot(a, u));\n },\n box: function box(x1, y1, x2, y2, lineWidth) {\n var halfWidth = lineWidth / 2;\n var minX = Math.min(x1, x2);\n var maxX = Math.max(x1, x2);\n var minY = Math.min(y1, y2);\n var maxY = Math.max(y1, y2);\n return {\n minX: minX - halfWidth,\n minY: minY - halfWidth,\n maxX: maxX + halfWidth,\n maxY: maxY + halfWidth\n };\n },\n len: function len(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/line.js\n// module id = 52\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nfunction circlePoint(cx, cy, r, angle) {\n return {\n x: Math.cos(angle) * r + cx,\n y: Math.sin(angle) * r + cy\n };\n}\n\nfunction angleNearTo(angle, min, max, out) {\n var v1;\n var v2;\n\n if (out) {\n if (angle < min) {\n v1 = min - angle;\n v2 = Math.PI * 2 - max + angle;\n } else if (angle > max) {\n v1 = Math.PI * 2 - angle + min;\n v2 = angle - max;\n }\n } else {\n v1 = angle - min;\n v2 = max - angle;\n }\n\n return v1 > v2 ? max : min;\n}\n\nfunction nearAngle(angle, startAngle, endAngle, clockwise) {\n var plus = 0;\n\n if (endAngle - startAngle >= Math.PI * 2) {\n plus = Math.PI * 2;\n }\n\n startAngle = Util.mod(startAngle, Math.PI * 2);\n endAngle = Util.mod(endAngle, Math.PI * 2) + plus;\n angle = Util.mod(angle, Math.PI * 2);\n\n if (clockwise) {\n if (startAngle >= endAngle) {\n if (angle > endAngle && angle < startAngle) {\n return angle;\n }\n\n return angleNearTo(angle, endAngle, startAngle, true);\n }\n\n if (angle < startAngle || angle > endAngle) {\n return angle;\n }\n\n return angleNearTo(angle, startAngle, endAngle);\n }\n\n if (startAngle <= endAngle) {\n if (startAngle < angle && angle < endAngle) {\n return angle;\n }\n\n return angleNearTo(angle, startAngle, endAngle, true);\n }\n\n if (angle > startAngle || angle < endAngle) {\n return angle;\n }\n\n return angleNearTo(angle, endAngle, startAngle);\n}\n\nfunction arcProjectPoint(cx, cy, r, startAngle, endAngle, clockwise, x, y, out) {\n var v = [x, y];\n var v0 = [cx, cy];\n var v1 = [1, 0];\n var subv = Util.vec2.subtract([], v, v0);\n var angle = Util.vec2.angleTo(v1, subv);\n angle = nearAngle(angle, startAngle, endAngle, clockwise);\n var vpoint = [r * Math.cos(angle) + cx, r * Math.sin(angle) + cy];\n\n if (out) {\n out.x = vpoint[0];\n out.y = vpoint[1];\n }\n\n var d = Util.vec2.distance(vpoint, v);\n return d;\n}\n\nfunction arcBox(cx, cy, r, startAngle, endAngle, clockwise) {\n var angleRight = 0;\n var angleBottom = Math.PI / 2;\n var angleLeft = Math.PI;\n var angleTop = Math.PI * 3 / 2;\n var points = [];\n var angle = nearAngle(angleRight, startAngle, endAngle, clockwise);\n\n if (angle === angleRight) {\n points.push(circlePoint(cx, cy, r, angleRight));\n }\n\n angle = nearAngle(angleBottom, startAngle, endAngle, clockwise);\n\n if (angle === angleBottom) {\n points.push(circlePoint(cx, cy, r, angleBottom));\n }\n\n angle = nearAngle(angleLeft, startAngle, endAngle, clockwise);\n\n if (angle === angleLeft) {\n points.push(circlePoint(cx, cy, r, angleLeft));\n }\n\n angle = nearAngle(angleTop, startAngle, endAngle, clockwise);\n\n if (angle === angleTop) {\n points.push(circlePoint(cx, cy, r, angleTop));\n }\n\n points.push(circlePoint(cx, cy, r, startAngle));\n points.push(circlePoint(cx, cy, r, endAngle));\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n Util.each(points, function (point) {\n if (minX > point.x) {\n minX = point.x;\n }\n\n if (maxX < point.x) {\n maxX = point.x;\n }\n\n if (minY > point.y) {\n minY = point.y;\n }\n\n if (maxY < point.y) {\n maxY = point.y;\n }\n });\n return {\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY\n };\n}\n\nmodule.exports = {\n nearAngle: nearAngle,\n projectPoint: function projectPoint(cx, cy, r, startAngle, endAngle, clockwise, x, y) {\n var rst = {};\n arcProjectPoint(cx, cy, r, startAngle, endAngle, clockwise, x, y, rst);\n return rst;\n },\n pointDistance: arcProjectPoint,\n box: arcBox\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/arc.js\n// module id = 53\n// module chunks = 0 1 2","var Format = require('../../util/format');\n\nvar PathSegment = require('../util/path-segment');\n\nvar PI = Math.PI;\nvar sin = Math.sin;\nvar cos = Math.cos;\nvar atan2 = Math.atan2;\nvar DEFAULT_LENGTH = 10;\nvar DEFAULT_ANGLE = PI / 3;\n\nfunction _addArrow(ctx, attrs, x1, y1, x2, y2, isStart) {\n var leftX;\n var leftY;\n var rightX;\n var rightY;\n var offsetX;\n var offsetY;\n var angle;\n\n if (!attrs.fill) {\n // 闭合的不绘制箭头\n var arrowLength = attrs.arrowLength || DEFAULT_LENGTH;\n var arrowAngle = attrs.arrowAngle ? attrs.arrowAngle * PI / 180 : DEFAULT_ANGLE; // 转换为弧\n // Calculate angle\n\n angle = atan2(y1 - y2, x1 - x2);\n /* // Adjust angle correctly\n angle -= PI;*/\n // Calculate offset to place arrow at edge of path\n\n offsetX = Math.abs(attrs.lineWidth * cos(angle)) / 2;\n offsetY = Math.abs(attrs.lineWidth * sin(angle)) / 2;\n\n if (isStart) {\n offsetX = -offsetX;\n offsetY = -offsetY;\n } // Calculate coordinates for left half of arrow\n\n\n leftX = x2 + arrowLength * cos(angle + arrowAngle / 2);\n leftY = y2 + arrowLength * sin(angle + arrowAngle / 2); // Calculate coordinates for right half of arrow\n\n rightX = x2 + arrowLength * cos(angle - arrowAngle / 2);\n rightY = y2 + arrowLength * sin(angle - arrowAngle / 2);\n ctx.beginPath(); // Draw left half of arrow\n\n ctx.moveTo(leftX - offsetX, leftY - offsetY);\n ctx.lineTo(x2 - offsetX, y2 - offsetY); // Draw right half of arrow\n\n ctx.lineTo(rightX - offsetX, rightY - offsetY); // Visually connect arrow to path\n\n ctx.moveTo(x2 - offsetX, y2 - offsetY);\n ctx.lineTo(x2 + offsetX, y2 + offsetY); // Move back to end of path\n\n ctx.moveTo(x2, y2);\n ctx.stroke();\n }\n}\n\nfunction parsePath(attrs) {\n var segments = [];\n var pathArray = Format.parsePath(attrs.path);\n var preSegment;\n\n if (!Array.isArray(pathArray) || pathArray.length === 0 || pathArray[0][0] !== 'M' && pathArray[0][0] !== 'm') {\n return false;\n }\n\n var count = pathArray.length;\n\n for (var i = 0; i < pathArray.length; i++) {\n var item = pathArray[i];\n preSegment = new PathSegment(item, preSegment, i === count - 1);\n segments.push(preSegment);\n }\n\n return segments;\n}\n\nfunction _addCustomizedArrow(ctx, attrs, x1, y1, x2, y2, isStart) {\n var shape = isStart ? attrs.startArrow : attrs.endArrow;\n var d = shape.d;\n var deg = 0;\n var x = x2 - x1;\n var y = y2 - y1;\n var tan = Math.atan(x / y);\n\n if (y === 0 && x < 0) {\n deg = Math.PI;\n } else if (x > 0 && y > 0) {\n deg = Math.PI / 2 - tan;\n } else if (x < 0 && y < 0) {\n deg = -Math.PI / 2 - tan;\n } else if (x >= 0 && y < 0) {\n deg = -tan - Math.PI / 2;\n } else if (x <= 0 && y > 0) {\n deg = Math.PI / 2 - tan;\n }\n\n var path = parsePath(shape);\n\n if (!path) {\n return;\n }\n\n if (d) {\n if (isStart) {\n x2 = x2 + Math.sin(Math.abs(tan)) * d;\n y2 = y2 + Math.cos(Math.abs(tan)) * d - 0.5 * ctx.lineWidth;\n } else {\n x2 = x2 - Math.sin(Math.abs(tan)) * d;\n y2 = y2 - Math.cos(Math.abs(tan)) * d + 0.5 * ctx.lineWidth;\n }\n }\n\n ctx.save();\n ctx.beginPath();\n ctx.translate(x2, y2);\n ctx.rotate(deg);\n\n for (var i = 0; i < path.length; i++) {\n path[i].draw(ctx);\n }\n\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.fillStyle = ctx.strokeStyle;\n ctx.fill();\n ctx.restore();\n}\n\nmodule.exports = {\n addStartArrow: function addStartArrow(ctx, attrs, x1, y1, x2, y2) {\n if (typeof attrs.startArrow === 'object') {\n _addCustomizedArrow(ctx, attrs, x1, y1, x2, y2, true);\n } else if (attrs.startArrow) {\n _addArrow(ctx, attrs, x1, y1, x2, y2, true);\n }\n },\n addEndArrow: function addEndArrow(ctx, attrs, x1, y1, x2, y2) {\n if (typeof attrs.endArrow === 'object') {\n _addCustomizedArrow(ctx, attrs, x1, y1, x2, y2, false);\n } else if (attrs.endArrow) {\n _addArrow(ctx, attrs, x1, y1, x2, y2, false);\n }\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/util/arrow.js\n// module id = 54\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nvar Inside = require('./inside');\n\nvar Cubic = require('../math/cubic');\n\nvar Quadratic = require('../math/quadratic');\n\nvar Ellipse = require('../math/ellipse');\n\nvar vec3 = Util.vec3;\nvar mat3 = Util.mat3;\nvar ARR_CMD = ['m', 'l', 'c', 'a', 'q', 'h', 'v', 't', 's', 'z'];\n\nfunction toAbsolute(x, y, curPoint) {\n // 获取绝对坐标\n return {\n x: curPoint.x + x,\n y: curPoint.y + y\n };\n}\n\nfunction toSymmetry(point, center) {\n // 点对称\n return {\n x: center.x + (center.x - point.x),\n y: center.y + (center.y - point.y)\n };\n}\n\nfunction vMag(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n\nfunction vRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n}\n\nfunction vAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n}\n\nfunction getArcParams(point1, point2, fa, fs, rx, ry, psiDeg) {\n var psi = Util.mod(Util.toRadian(psiDeg), Math.PI * 2);\n var x1 = point1.x;\n var y1 = point1.y;\n var x2 = point2.x;\n var y2 = point2.y;\n var xp = Math.cos(psi) * (x1 - x2) / 2.0 + Math.sin(psi) * (y1 - y2) / 2.0;\n var yp = -1 * Math.sin(psi) * (x1 - x2) / 2.0 + Math.cos(psi) * (y1 - y2) / 2.0;\n var lambda = xp * xp / (rx * rx) + yp * yp / (ry * ry);\n\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n\n var diff = rx * rx * (yp * yp) + ry * ry * (xp * xp);\n var f = Math.sqrt((rx * rx * (ry * ry) - diff) / diff);\n\n if (fa === fs) {\n f *= -1;\n }\n\n if (isNaN(f)) {\n f = 0;\n }\n\n var cxp = f * rx * yp / ry;\n var cyp = f * -ry * xp / rx;\n var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;\n var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n var dTheta = vAngle(u, v);\n\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n\n if (fs === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n\n if (fs === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n\n return [point1, cx, cy, rx, ry, theta, dTheta, psi, fs];\n}\n\nvar PathSegment = function PathSegment(item, preSegment, isLast) {\n this.preSegment = preSegment;\n this.isLast = isLast;\n this.init(item, preSegment);\n};\n\nUtil.augment(PathSegment, {\n init: function init(item, preSegment) {\n var command = item[0];\n preSegment = preSegment || {\n endPoint: {\n x: 0,\n y: 0\n }\n };\n var relative = ARR_CMD.indexOf(command) >= 0; // /[a-z]/.test(command);\n\n var cmd = relative ? command.toUpperCase() : command;\n var p = item;\n var point1;\n var point2;\n var point3;\n var point;\n var preEndPoint = preSegment.endPoint;\n var p1 = p[1];\n var p2 = p[2];\n\n switch (cmd) {\n default:\n break;\n\n case 'M':\n if (relative) {\n point = toAbsolute(p1, p2, preEndPoint);\n } else {\n point = {\n x: p1,\n y: p2\n };\n }\n\n this.command = 'M';\n this.params = [preEndPoint, point];\n this.subStart = point;\n this.endPoint = point;\n break;\n\n case 'L':\n if (relative) {\n point = toAbsolute(p1, p2, preEndPoint);\n } else {\n point = {\n x: p1,\n y: p2\n };\n }\n\n this.command = 'L';\n this.params = [preEndPoint, point];\n this.subStart = preSegment.subStart;\n this.endPoint = point;\n\n this.endTangent = function () {\n return [point.x - preEndPoint.x, point.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point.x, preEndPoint.y - point.y];\n };\n\n break;\n\n case 'H':\n if (relative) {\n point = toAbsolute(p1, 0, preEndPoint);\n } else {\n point = {\n x: p1,\n y: preEndPoint.y\n };\n }\n\n this.command = 'L';\n this.params = [preEndPoint, point];\n this.subStart = preSegment.subStart;\n this.endPoint = point;\n\n this.endTangent = function () {\n return [point.x - preEndPoint.x, point.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point.x, preEndPoint.y - point.y];\n };\n\n break;\n\n case 'V':\n if (relative) {\n point = toAbsolute(0, p1, preEndPoint);\n } else {\n point = {\n x: preEndPoint.x,\n y: p1\n };\n }\n\n this.command = 'L';\n this.params = [preEndPoint, point];\n this.subStart = preSegment.subStart;\n this.endPoint = point;\n\n this.endTangent = function () {\n return [point.x - preEndPoint.x, point.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point.x, preEndPoint.y - point.y];\n };\n\n break;\n\n case 'Q':\n if (relative) {\n point1 = toAbsolute(p1, p2, preEndPoint);\n point2 = toAbsolute(p[3], p[4], preEndPoint);\n } else {\n point1 = {\n x: p1,\n y: p2\n };\n point2 = {\n x: p[3],\n y: p[4]\n };\n }\n\n this.command = 'Q';\n this.params = [preEndPoint, point1, point2];\n this.subStart = preSegment.subStart;\n this.endPoint = point2;\n\n this.endTangent = function () {\n return [point2.x - point1.x, point2.y - point1.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n\n break;\n\n case 'T':\n if (relative) {\n point2 = toAbsolute(p1, p2, preEndPoint);\n } else {\n point2 = {\n x: p1,\n y: p2\n };\n }\n\n if (preSegment.command === 'Q') {\n point1 = toSymmetry(preSegment.params[1], preEndPoint);\n this.command = 'Q';\n this.params = [preEndPoint, point1, point2];\n this.subStart = preSegment.subStart;\n this.endPoint = point2;\n\n this.endTangent = function () {\n return [point2.x - point1.x, point2.y - point1.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n } else {\n this.command = 'TL';\n this.params = [preEndPoint, point2];\n this.subStart = preSegment.subStart;\n this.endPoint = point2;\n\n this.endTangent = function () {\n return [point2.x - preEndPoint.x, point2.y - preEndPoint.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point2.x, preEndPoint.y - point2.y];\n };\n }\n\n break;\n\n case 'C':\n if (relative) {\n point1 = toAbsolute(p1, p2, preEndPoint);\n point2 = toAbsolute(p[3], p[4], preEndPoint);\n point3 = toAbsolute(p[5], p[6], preEndPoint);\n } else {\n point1 = {\n x: p1,\n y: p2\n };\n point2 = {\n x: p[3],\n y: p[4]\n };\n point3 = {\n x: p[5],\n y: p[6]\n };\n }\n\n this.command = 'C';\n this.params = [preEndPoint, point1, point2, point3];\n this.subStart = preSegment.subStart;\n this.endPoint = point3;\n\n this.endTangent = function () {\n return [point3.x - point2.x, point3.y - point2.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n\n break;\n\n case 'S':\n if (relative) {\n point2 = toAbsolute(p1, p2, preEndPoint);\n point3 = toAbsolute(p[3], p[4], preEndPoint);\n } else {\n point2 = {\n x: p1,\n y: p2\n };\n point3 = {\n x: p[3],\n y: p[4]\n };\n }\n\n if (preSegment.command === 'C') {\n point1 = toSymmetry(preSegment.params[2], preEndPoint);\n this.command = 'C';\n this.params = [preEndPoint, point1, point2, point3];\n this.subStart = preSegment.subStart;\n this.endPoint = point3;\n\n this.endTangent = function () {\n return [point3.x - point2.x, point3.y - point2.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point1.x, preEndPoint.y - point1.y];\n };\n } else {\n this.command = 'SQ';\n this.params = [preEndPoint, point2, point3];\n this.subStart = preSegment.subStart;\n this.endPoint = point3;\n\n this.endTangent = function () {\n return [point3.x - point2.x, point3.y - point2.y];\n };\n\n this.startTangent = function () {\n return [preEndPoint.x - point2.x, preEndPoint.y - point2.y];\n };\n }\n\n break;\n\n case 'A':\n {\n var rx = p1;\n var ry = p2;\n var psi = p[3];\n var fa = p[4];\n var fs = p[5];\n\n if (relative) {\n point = toAbsolute(p[6], p[7], preEndPoint);\n } else {\n point = {\n x: p[6],\n y: p[7]\n };\n }\n\n this.command = 'A';\n var params = getArcParams(preEndPoint, point, fa, fs, rx, ry, psi);\n this.params = params;\n var start = preSegment.subStart;\n this.subStart = start;\n this.endPoint = point;\n var startAngle = params[5] % (Math.PI * 2);\n\n if (Util.isNumberEqual(startAngle, Math.PI * 2)) {\n startAngle = 0;\n }\n\n var endAngle = params[6] % (Math.PI * 2);\n\n if (Util.isNumberEqual(endAngle, Math.PI * 2)) {\n endAngle = 0;\n }\n\n var d = 0.001;\n\n this.startTangent = function () {\n if (fs === 0) {\n d *= -1;\n }\n\n var dx = params[3] * Math.cos(startAngle - d) + params[1];\n var dy = params[4] * Math.sin(startAngle - d) + params[2];\n return [dx - start.x, dy - start.y];\n };\n\n this.endTangent = function () {\n var endAngle = params[6];\n\n if (endAngle - Math.PI * 2 < 0.0001) {\n endAngle = 0;\n }\n\n var dx = params[3] * Math.cos(startAngle + endAngle + d) + params[1];\n var dy = params[4] * Math.sin(startAngle + endAngle - d) + params[2];\n return [preEndPoint.x - dx, preEndPoint.y - dy];\n };\n\n break;\n }\n\n case 'Z':\n {\n this.command = 'Z';\n this.params = [preEndPoint, preSegment.subStart];\n this.subStart = preSegment.subStart;\n this.endPoint = preSegment.subStart;\n }\n }\n },\n isInside: function isInside(x, y, lineWidth) {\n var self = this;\n var command = self.command;\n var params = self.params;\n var box = self.box;\n\n if (box) {\n if (!Inside.box(box.minX, box.maxX, box.minY, box.maxY, x, y)) {\n return false;\n }\n }\n\n switch (command) {\n default:\n break;\n\n case 'M':\n return false;\n\n case 'TL':\n case 'L':\n case 'Z':\n return Inside.line(params[0].x, params[0].y, params[1].x, params[1].y, lineWidth, x, y);\n\n case 'SQ':\n case 'Q':\n return Inside.quadraticline(params[0].x, params[0].y, params[1].x, params[1].y, params[2].x, params[2].y, lineWidth, x, y);\n\n case 'C':\n {\n return Inside.cubicline(params[0].x, params[0].y, params[1].x, params[1].y, params[2].x, params[2].y, params[3].x, params[3].y, lineWidth, x, y);\n }\n\n case 'A':\n {\n var p = params;\n var cx = p[1];\n var cy = p[2];\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n p = [x, y, 1];\n var m = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n mat3.translate(m, m, [-cx, -cy]);\n mat3.rotate(m, m, -psi);\n mat3.scale(m, m, [1 / scaleX, 1 / scaleY]);\n vec3.transformMat3(p, p, m);\n return Inside.arcline(0, 0, r, theta, theta + dTheta, 1 - fs, lineWidth, p[0], p[1]);\n }\n }\n\n return false;\n },\n draw: function draw(context) {\n var command = this.command;\n var params = this.params;\n var point1;\n var point2;\n var point3;\n\n switch (command) {\n default:\n break;\n\n case 'M':\n context.moveTo(params[1].x, params[1].y);\n break;\n\n case 'TL':\n case 'L':\n context.lineTo(params[1].x, params[1].y);\n break;\n\n case 'SQ':\n case 'Q':\n point1 = params[1];\n point2 = params[2];\n context.quadraticCurveTo(point1.x, point1.y, point2.x, point2.y);\n break;\n\n case 'C':\n point1 = params[1];\n point2 = params[2];\n point3 = params[3];\n context.bezierCurveTo(point1.x, point1.y, point2.x, point2.y, point3.x, point3.y);\n break;\n\n case 'A':\n {\n var p = params;\n var p1 = p[1];\n var p2 = p[2];\n var cx = p1;\n var cy = p2;\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(psi);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-psi);\n context.translate(-cx, -cy);\n break;\n }\n\n case 'Z':\n context.closePath();\n break;\n }\n },\n getBBox: function getBBox(lineWidth) {\n var halfWidth = lineWidth / 2;\n var params = this.params;\n var yDims;\n var xDims;\n var i;\n var l;\n\n switch (this.command) {\n default:\n case 'M':\n case 'Z':\n break;\n\n case 'TL':\n case 'L':\n this.box = {\n minX: Math.min(params[0].x, params[1].x) - halfWidth,\n maxX: Math.max(params[0].x, params[1].x) + halfWidth,\n minY: Math.min(params[0].y, params[1].y) - halfWidth,\n maxY: Math.max(params[0].y, params[1].y) + halfWidth\n };\n break;\n\n case 'SQ':\n case 'Q':\n xDims = Quadratic.extrema(params[0].x, params[1].x, params[2].x);\n\n for (i = 0, l = xDims.length; i < l; i++) {\n xDims[i] = Quadratic.at(params[0].x, params[1].x, params[2].x, xDims[i]);\n }\n\n xDims.push(params[0].x, params[2].x);\n yDims = Quadratic.extrema(params[0].y, params[1].y, params[2].y);\n\n for (i = 0, l = yDims.length; i < l; i++) {\n yDims[i] = Quadratic.at(params[0].y, params[1].y, params[2].y, yDims);\n }\n\n yDims.push(params[0].y, params[2].y);\n this.box = {\n minX: Math.min.apply(Math, xDims) - halfWidth,\n maxX: Math.max.apply(Math, xDims) + halfWidth,\n minY: Math.min.apply(Math, yDims) - halfWidth,\n maxY: Math.max.apply(Math, yDims) + halfWidth\n };\n break;\n\n case 'C':\n xDims = Cubic.extrema(params[0].x, params[1].x, params[2].x, params[3].x);\n\n for (i = 0, l = xDims.length; i < l; i++) {\n xDims[i] = Cubic.at(params[0].x, params[1].x, params[2].x, params[3].x, xDims[i]);\n }\n\n yDims = Cubic.extrema(params[0].y, params[1].y, params[2].y, params[3].y);\n\n for (i = 0, l = yDims.length; i < l; i++) {\n yDims[i] = Cubic.at(params[0].y, params[1].y, params[2].y, params[3].y, yDims[i]);\n }\n\n xDims.push(params[0].x, params[3].x);\n yDims.push(params[0].y, params[3].y);\n this.box = {\n minX: Math.min.apply(Math, xDims) - halfWidth,\n maxX: Math.max.apply(Math, xDims) + halfWidth,\n minY: Math.min.apply(Math, yDims) - halfWidth,\n maxY: Math.max.apply(Math, yDims) + halfWidth\n };\n break;\n\n case 'A':\n {\n // todo 待优化\n var p = params;\n var cx = p[1];\n var cy = p[2];\n var rx = p[3];\n var ry = p[4];\n var theta = p[5];\n var dTheta = p[6];\n var psi = p[7];\n var fs = p[8];\n var start = theta;\n var end = theta + dTheta;\n var xDim = Ellipse.xExtrema(psi, rx, ry);\n var minX = Infinity;\n var maxX = -Infinity;\n var xs = [start, end];\n\n for (i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var xAngle = xDim + i;\n\n if (fs === 1) {\n if (start < xAngle && xAngle < end) {\n xs.push(xAngle);\n }\n } else {\n if (end < xAngle && xAngle < start) {\n xs.push(xAngle);\n }\n }\n }\n\n for (i = 0, l = xs.length; i < l; i++) {\n var x = Ellipse.xAt(psi, rx, ry, cx, xs[i]);\n\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n }\n\n var yDim = Ellipse.yExtrema(psi, rx, ry);\n var minY = Infinity;\n var maxY = -Infinity;\n var ys = [start, end];\n\n for (i = -Math.PI * 2; i <= Math.PI * 2; i += Math.PI) {\n var yAngle = yDim + i;\n\n if (fs === 1) {\n if (start < yAngle && yAngle < end) {\n ys.push(yAngle);\n }\n } else {\n if (end < yAngle && yAngle < start) {\n ys.push(yAngle);\n }\n }\n }\n\n for (i = 0, l = ys.length; i < l; i++) {\n var y = Ellipse.yAt(psi, rx, ry, cy, ys[i]);\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n }\n\n this.box = {\n minX: minX - halfWidth,\n maxX: maxX + halfWidth,\n minY: minY - halfWidth,\n maxY: maxY + halfWidth\n };\n break;\n }\n }\n }\n});\nmodule.exports = PathSegment;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/util/path-segment.js\n// module id = 55\n// module chunks = 0 1 2","\"use strict\";\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n/**\n * @fileOverview the base class of Coordinate\n * @author sima.zhang\n */\n\n\nvar MatrixUtil = require('@antv/util/lib/matrix/');\n\nvar mix = require('@antv/util/lib/mix');\n\nvar mat3 = MatrixUtil.mat3;\nvar vec3 = MatrixUtil.vec3;\n\nvar Coord = /*#__PURE__*/function () {\n _createClass(Coord, [{\n key: \"getDefaultCfg\",\n\n /**\n * 获取默认的配置属性\n * @protected\n * @return {Object} 默认属性\n */\n value: function getDefaultCfg() {\n return {\n /**\n * Mark x y is transposed.\n * @type {Boolean}\n */\n isTransposed: false,\n\n /**\n * The matrix of coordinate\n * @type {Array}\n */\n matrix: [1, 0, 0, 0, 1, 0, 0, 0, 1]\n };\n }\n }]);\n\n function Coord(cfg) {\n _classCallCheck(this, Coord);\n\n var defaultCfg = this.getDefaultCfg();\n mix(this, defaultCfg, cfg);\n this.init();\n }\n\n _createClass(Coord, [{\n key: \"init\",\n value: function init() {\n var start = this.start;\n var end = this.end;\n var center = {\n x: (start.x + end.x) / 2,\n y: (start.y + end.y) / 2\n };\n this.center = center;\n this.width = Math.abs(end.x - start.x);\n this.height = Math.abs(end.y - start.y);\n }\n }, {\n key: \"_swapDim\",\n value: function _swapDim(dim) {\n var dimRange = this[dim];\n\n if (dimRange) {\n var tmp = dimRange.start;\n dimRange.start = dimRange.end;\n dimRange.end = tmp;\n }\n }\n }, {\n key: \"getCenter\",\n value: function getCenter() {\n return this.center;\n }\n }, {\n key: \"getWidth\",\n value: function getWidth() {\n return this.width;\n }\n }, {\n key: \"getHeight\",\n value: function getHeight() {\n return this.height;\n }\n }, {\n key: \"convertDim\",\n value: function convertDim(percent, dim) {\n var _this$dim = this[dim],\n start = _this$dim.start,\n end = _this$dim.end;\n return start + percent * (end - start);\n }\n }, {\n key: \"invertDim\",\n value: function invertDim(value, dim) {\n var _this$dim2 = this[dim],\n start = _this$dim2.start,\n end = _this$dim2.end;\n return (value - start) / (end - start);\n }\n /**\n * 将归一化的坐标点数据转换为画布坐标\n * @override\n * @param {Object} point 归一化的坐标点\n * @return {Object} 返回画布坐标\n */\n\n }, {\n key: \"convertPoint\",\n value: function convertPoint(point) {\n return point;\n }\n /**\n * 将画布坐标转换为归一化的坐标点数据\n * @override\n * @param {Object} point 画布坐标点数据\n * @return {Object} 归一化后的数据点\n */\n\n }, {\n key: \"invertPoint\",\n value: function invertPoint(point) {\n return point;\n }\n /**\n * 将坐标点进行矩阵变换\n * @param {Number} x 对应 x 轴画布坐标\n * @param {Number} y 对应 y 轴画布坐标\n * @param {Number} tag 默认为 0,可取值 0, 1\n * @return {Array} 返回变换后的三阶向量 [x, y, z]\n */\n\n }, {\n key: \"applyMatrix\",\n value: function applyMatrix(x, y) {\n var tag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var matrix = this.matrix;\n var vector = [x, y, tag];\n vec3.transformMat3(vector, vector, matrix);\n return vector;\n }\n /**\n * 将坐标点进行矩阵逆变换\n * @param {Number} x 对应 x 轴画布坐标\n * @param {Number} y 对应 y 轴画布坐标\n * @param {Number} tag 默认为 0,可取值 0, 1\n * @return {Array} 返回矩阵逆变换后的三阶向量 [x, y, z]\n */\n\n }, {\n key: \"invertMatrix\",\n value: function invertMatrix(x, y) {\n var tag = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var matrix = this.matrix;\n var inversedMatrix = mat3.invert([], matrix);\n var vector = [x, y, tag];\n vec3.transformMat3(vector, vector, inversedMatrix);\n return vector;\n }\n /**\n * 将归一化的坐标点数据转换为画布坐标,并根据坐标系当前矩阵进行变换\n * @param {Object} point 归一化的坐标点\n * @return {Object} 返回进行矩阵变换后的画布坐标\n */\n\n }, {\n key: \"convert\",\n value: function convert(point) {\n var _this$convertPoint = this.convertPoint(point),\n x = _this$convertPoint.x,\n y = _this$convertPoint.y;\n\n var vector = this.applyMatrix(x, y, 1);\n return {\n x: vector[0],\n y: vector[1]\n };\n }\n /**\n * 将进行过矩阵变换画布坐标转换为归一化坐标\n * @param {Object} point 画布坐标\n * @return {Object} 返回归一化的坐标点\n */\n\n }, {\n key: \"invert\",\n value: function invert(point) {\n var vector = this.invertMatrix(point.x, point.y, 1);\n return this.invertPoint({\n x: vector[0],\n y: vector[1]\n });\n }\n /**\n * 坐标系旋转变换\n * @param {Number} radian 旋转弧度\n * @return {Object} 返回坐标系对象\n */\n\n }, {\n key: \"rotate\",\n value: function rotate(radian) {\n var matrix = this.matrix;\n var center = this.center;\n mat3.translate(matrix, matrix, [-center.x, -center.y]);\n mat3.rotate(matrix, matrix, radian);\n mat3.translate(matrix, matrix, [center.x, center.y]);\n return this;\n }\n /**\n * 坐标系反射变换\n * @param {String} dim 反射维度\n * @return {Object} 返回坐标系对象\n */\n\n }, {\n key: \"reflect\",\n value: function reflect(dim) {\n switch (dim) {\n case 'x':\n this._swapDim('x');\n\n break;\n\n case 'y':\n this._swapDim('y');\n\n break;\n\n default:\n this._swapDim('y');\n\n }\n\n return this;\n }\n /**\n * 坐标系比例变换\n * @param {Number} s1 x 方向缩放比例\n * @param {Number} s2 y 方向缩放比例\n * @return {Object} 返回坐标系对象\n */\n\n }, {\n key: \"scale\",\n value: function scale(s1, s2) {\n var matrix = this.matrix;\n var center = this.center;\n mat3.translate(matrix, matrix, [-center.x, -center.y]);\n mat3.scale(matrix, matrix, [s1, s2]);\n mat3.translate(matrix, matrix, [center.x, center.y]);\n return this;\n }\n /**\n * 坐标系平移变换\n * @param {Number} x x 方向平移像素\n * @param {Number} y y 方向平移像素\n * @return {Object} 返回坐标系对象\n */\n\n }, {\n key: \"translate\",\n value: function translate(x, y) {\n var matrix = this.matrix;\n mat3.translate(matrix, matrix, [x, y]);\n return this;\n }\n /**\n * 将坐标系 x y 两个轴进行转置\n * @return {Object} 返回坐标系对象\n */\n\n }, {\n key: \"transpose\",\n value: function transpose() {\n this.isTransposed = !this.isTransposed;\n return this;\n }\n }]);\n\n return Coord;\n}();\n\nmodule.exports = Coord;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/coord/lib/base.js\n// module id = 56\n// module chunks = 0 1 2","/**\n * @fileOverview shape 的辅助方法\n * @author dxq613@gmail.com\n */\nvar Util = require('../../util');\n\nvar ShapeUtil = {\n splitPoints: function splitPoints(obj) {\n var points = [];\n var x = obj.x;\n var y = obj.y;\n y = Util.isArray(y) ? y : [y];\n Util.each(y, function (yItem, index) {\n var point = {\n x: Util.isArray(x) ? x[index] : x,\n y: yItem\n };\n points.push(point);\n });\n return points;\n },\n addFillAttrs: function addFillAttrs(attrs, cfg) {\n if (cfg.color) {\n attrs.fill = cfg.color;\n }\n\n if (Util.isNumber(cfg.opacity)) {\n attrs.opacity = attrs.fillOpacity = cfg.opacity;\n }\n },\n addStrokeAttrs: function addStrokeAttrs(attrs, cfg) {\n if (cfg.color) {\n attrs.stroke = cfg.color;\n }\n\n if (Util.isNumber(cfg.opacity)) {\n attrs.opacity = attrs.strokeOpacity = cfg.opacity;\n }\n }\n};\nmodule.exports = ShapeUtil;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/geom/util/shape.js\n// module id = 57\n// module chunks = 0 1","module.exports = {\n isFunction: require('@antv/util/lib/type/is-function'),\n isObject: require('@antv/util/lib/type/is-object'),\n isBoolean: require('@antv/util/lib/type/is-boolean'),\n isNil: require('@antv/util/lib/type/is-nil'),\n isString: require('@antv/util/lib/type/is-string'),\n isArray: require('@antv/util/lib/type/is-array'),\n isNumber: require('@antv/util/lib/type/is-number'),\n isEmpty: require('@antv/util/lib/is-empty'),\n // isBlank\n uniqueId: require('@antv/util/lib/unique-id'),\n clone: require('@antv/util/lib/clone'),\n deepMix: require('@antv/util/lib/deep-mix'),\n assign: require('@antv/util/lib/mix'),\n // simpleMix\n merge: require('@antv/util/lib/deep-mix'),\n // mix\n upperFirst: require('@antv/util/lib/string/upper-first'),\n // ucfirst\n each: require('@antv/util/lib/each'),\n isEqual: require('@antv/util/lib/is-equal'),\n toArray: require('@antv/util/lib/to-array'),\n extend: require('@antv/util/lib/extend'),\n augment: require('@antv/util/lib/augment'),\n remove: require('@antv/util/lib/array/pull'),\n isNumberEqual: require('@antv/util/lib/math/is-number-equal'),\n toRadian: require('@antv/util/lib/math/to-radian'),\n toDegree: require('@antv/util/lib/math/to-degree'),\n mod: require('@antv/util/lib/math/mod'),\n clamp: require('@antv/util/lib/math/clamp'),\n createDom: require('@antv/util/lib/dom/create-dom'),\n modifyCSS: require('@antv/util/lib/dom/modify-css'),\n requestAnimationFrame: require('@antv/util/lib/dom/request-animation-frame'),\n getRatio: function getRatio() {\n return window.devicePixelRatio ? window.devicePixelRatio : 2;\n },\n mat3: require('@antv/util/lib/matrix/mat3'),\n vec2: require('@antv/util/lib/matrix/vec2'),\n vec3: require('@antv/util/lib/matrix/vec3'),\n transform: require('@antv/util/lib/matrix/transform')\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/util/common.js\n// module id = 59\n// module chunks = 0 1 2","/**\n * 是否是布尔类型\n *\n * @param {Object} value 测试的值\n * @return {Boolean}\n */\nvar isType = require('./is-type');\n\nvar isBoolean = function isBoolean(value) {\n return isType(value, 'Boolean');\n};\n\nmodule.exports = isBoolean;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-boolean.js\n// module id = 60\n// module chunks = 0 1 2","var isNil = require('./type/is-nil');\n\nvar isArrayLike = require('./type/is-array-like');\n\nvar getType = require('./type/get-type');\n\nvar isPrototype = require('./type/is-prototype');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isEmpty(value) {\n /**\n * isEmpty(null) => true\n * isEmpty() => true\n * isEmpty(true) => true\n * isEmpty(1) => true\n * isEmpty([1, 2, 3]) => false\n * isEmpty('abc') => false\n * isEmpty({ a: 1 }) => false\n */\n if (isNil(value)) {\n return true;\n }\n\n if (isArrayLike(value)) {\n return !value.length;\n }\n\n var type = getType(value);\n\n if (type === 'Map' || type === 'Set') {\n return !value.size;\n }\n\n if (isPrototype(value)) {\n return !Object.keys(value).length;\n }\n\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = isEmpty;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/is-empty.js\n// module id = 61\n// module chunks = 0 1 2","var uniqueId = function () {\n var map = {};\n return function (prefix) {\n prefix = prefix || 'g';\n\n if (!map[prefix]) {\n map[prefix] = 1;\n } else {\n map[prefix] += 1;\n }\n\n return prefix + map[prefix];\n };\n}();\n\nmodule.exports = uniqueId;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/unique-id.js\n// module id = 62\n// module chunks = 0 1 2","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar isObjectLike = function isObjectLike(value) {\n /**\n * isObjectLike({}) => true\n * isObjectLike([1, 2, 3]) => true\n * isObjectLike(Function) => false\n * isObjectLike(null) => false\n */\n return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null;\n};\n\nmodule.exports = isObjectLike;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-object-like.js\n// module id = 63\n// module chunks = 0 1 2","var toString = require('../to-string');\n\nvar upperFirst = function upperFirst(value) {\n var str = toString(value);\n return str.charAt(0).toUpperCase() + str.substring(1);\n};\n\nmodule.exports = upperFirst;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/string/upper-first.js\n// module id = 64\n// module chunks = 0 1 2","var isFunction = require('./type/is-function');\n\nvar mix = require('./mix');\n\nvar extend = function extend(subclass, superclass, overrides, staticOverrides) {\n // 如果只提供父类构造函数,则自动生成子类构造函数\n if (!isFunction(superclass)) {\n overrides = superclass;\n superclass = subclass;\n\n subclass = function subclass() {};\n }\n\n var create = Object.create ? function (proto, c) {\n return Object.create(proto, {\n constructor: {\n value: c\n }\n });\n } : function (proto, c) {\n function Tmp() {}\n\n Tmp.prototype = proto;\n var o = new Tmp();\n o.constructor = c;\n return o;\n };\n var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype\n\n subclass.prototype = mix(superObj, subclass.prototype); // 指定子类的prototype\n\n subclass.superclass = create(superclass.prototype, superclass);\n mix(superObj, overrides);\n mix(subclass, staticOverrides);\n return subclass;\n};\n\nmodule.exports = extend;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/extend.js\n// module id = 65\n// module chunks = 0 1 2","var isFunction = require('./type/is-function');\n\nvar toArray = require('./to-array');\n\nvar mix = require('./mix');\n\nvar augment = function augment(c) {\n var args = toArray(arguments);\n\n for (var i = 1; i < args.length; i++) {\n var obj = args[i];\n\n if (isFunction(obj)) {\n obj = obj.prototype;\n }\n\n mix(c.prototype, obj);\n }\n};\n\nmodule.exports = augment;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/augment.js\n// module id = 66\n// module chunks = 0 1 2","var arrPrototype = Array.prototype;\nvar splice = arrPrototype.splice;\nvar indexOf = arrPrototype.indexOf;\nvar slice = arrPrototype.slice;\n\nvar pull = function pull(arr) {\n var values = slice.call(arguments, 1);\n\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var fromIndex = -1;\n\n while ((fromIndex = indexOf.call(arr, value)) > -1) {\n splice.call(arr, fromIndex, 1);\n }\n }\n\n return arr;\n};\n\nmodule.exports = pull;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/array/pull.js\n// module id = 67\n// module chunks = 0 1 2","var RADIAN = Math.PI / 180;\n\nvar toRadian = function toRadian(degree) {\n return RADIAN * degree;\n};\n\nmodule.exports = toRadian;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/to-radian.js\n// module id = 68\n// module chunks = 0 1 2","var DEGREE = 180 / Math.PI;\n\nvar toDegree = function toDegree(radian) {\n return DEGREE * radian;\n};\n\nmodule.exports = toDegree;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/to-degree.js\n// module id = 69\n// module chunks = 0 1 2","var mod = function mod(n, m) {\n return (n % m + m) % m;\n};\n\nmodule.exports = mod;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/mod.js\n// module id = 70\n// module chunks = 0 1 2","/**\n * 创建DOM 节点\n * @param {String} str Dom 字符串\n * @return {HTMLElement} DOM 节点\n */\nvar TABLE = document.createElement('table');\nvar TABLE_TR = document.createElement('tr');\nvar FRAGMENT_REG = /^\\s*<(\\w+|!)[^>]*>/;\nvar CONTAINERS = {\n tr: document.createElement('tbody'),\n tbody: TABLE,\n thead: TABLE,\n tfoot: TABLE,\n td: TABLE_TR,\n th: TABLE_TR,\n '*': document.createElement('div')\n};\n\nmodule.exports = function createDom(str) {\n var name = FRAGMENT_REG.test(str) && RegExp.$1;\n\n if (!(name in CONTAINERS)) {\n name = '*';\n }\n\n var container = CONTAINERS[name];\n str = str.replace(/(^\\s*)|(\\s*$)/g, '');\n container.innerHTML = '' + str;\n var dom = container.childNodes[0];\n container.removeChild(dom);\n return dom;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/dom/create-dom.js\n// module id = 71\n// module chunks = 0 1 2","module.exports = function modifyCSS(dom, css) {\n if (dom) {\n for (var key in css) {\n if (css.hasOwnProperty(key)) {\n dom.style[key] = css[key];\n }\n }\n }\n\n return dom;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/dom/modify-css.js\n// module id = 72\n// module chunks = 0 1 2","module.exports = function requestAnimationFrame(fn) {\n var method = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {\n return setTimeout(fn, 16);\n };\n\n return method(fn);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/dom/request-animation-frame.js\n// module id = 73\n// module chunks = 0 1 2","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.setMatrixArrayType = setMatrixArrayType;\nexports.toRadian = toRadian;\nexports.equals = equals;\n/**\n * Common utilities\n * @module glMatrix\n */\n// Configuration Constants\n\nvar EPSILON = exports.EPSILON = 0.000001;\nvar ARRAY_TYPE = exports.ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nvar RANDOM = exports.RANDOM = Math.random;\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\n\nfunction setMatrixArrayType(type) {\n exports.ARRAY_TYPE = ARRAY_TYPE = type;\n}\n\nvar degree = Math.PI / 180;\n/**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\n\nfunction toRadian(a) {\n return a * degree;\n}\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\n\n\nfunction equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/gl-matrix/lib/gl-matrix/common.js\n// module id = 74\n// module chunks = 0 1 2","var vec2 = require('@antv/gl-matrix/lib/gl-matrix/vec2');\n\nvar clamp = require('../math/clamp');\n\nvec2.angle = function (v1, v2) {\n var theta = vec2.dot(v1, v2) / (vec2.length(v1) * vec2.length(v2));\n return Math.acos(clamp(theta, -1, 1));\n};\n/**\n * 向量 v1 到 向量 v2 夹角的方向\n * @param {Array} v1 向量\n * @param {Array} v2 向量\n * @return {Boolean} >= 0 顺时针 < 0 逆时针\n */\n\n\nvec2.direction = function (v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n};\n\nvec2.angleTo = function (v1, v2, direct) {\n var angle = vec2.angle(v1, v2);\n var angleLargeThanPI = vec2.direction(v1, v2) >= 0;\n\n if (direct) {\n if (angleLargeThanPI) {\n return Math.PI * 2 - angle;\n }\n\n return angle;\n }\n\n if (angleLargeThanPI) {\n return angle;\n }\n\n return Math.PI * 2 - angle;\n};\n\nvec2.vertical = function (out, v, flag) {\n if (flag) {\n out[0] = v[1];\n out[1] = -1 * v[0];\n } else {\n out[0] = -1 * v[1];\n out[1] = v[0];\n }\n\n return out;\n};\n\nmodule.exports = vec2;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/matrix/vec2.js\n// module id = 75\n// module chunks = 0 1 2","var vec3 = require('@antv/gl-matrix/lib/gl-matrix/vec3');\n\nmodule.exports = vec3;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/matrix/vec3.js\n// module id = 76\n// module chunks = 0 1 2","var clone = require('../clone');\n\nvar each = require('../each');\n\nvar mat3 = require('./mat3');\n\nmodule.exports = function transform(m, ts) {\n m = clone(m);\n each(ts, function (t) {\n switch (t[0]) {\n case 't':\n mat3.translate(m, m, [t[1], t[2]]);\n break;\n\n case 's':\n mat3.scale(m, m, [t[1], t[2]]);\n break;\n\n case 'r':\n mat3.rotate(m, m, t[1]);\n break;\n\n case 'm':\n mat3.multiply(m, m, t[1]);\n break;\n\n default:\n return false;\n }\n });\n return m;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/matrix/transform.js\n// module id = 77\n// module chunks = 0 1 2","var Util = require('./util/index');\n\nvar Event = function Event(type, event, bubbles, cancelable) {\n this.type = type; // 事件类型\n\n this.target = null; // 目标\n\n this.currentTarget = null; // 当前目标\n\n this.bubbles = bubbles; // 冒泡\n\n this.cancelable = cancelable; // 是否能够阻止\n\n this.timeStamp = new Date().getTime(); // 时间戳\n\n this.defaultPrevented = false; // 阻止默认\n\n this.propagationStopped = false; // 阻止冒泡\n\n this.removed = false; // 是否被移除\n\n this.event = event; // 触发的原生事件\n};\n\nUtil.augment(Event, {\n preventDefault: function preventDefault() {\n this.defaultPrevented = this.cancelable && true;\n },\n stopPropagation: function stopPropagation() {\n this.propagationStopped = true;\n },\n remove: function remove() {\n this.remove = true;\n },\n clone: function clone() {\n return Util.clone(this);\n },\n toString: function toString() {\n return '[Event (type=' + this.type + ')]';\n }\n});\nmodule.exports = Event;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/event.js\n// module id = 78\n// module chunks = 0 1 2","var Line = require('../math/line');\n\nvar Quadratic = require('../math/quadratic');\n\nvar Cubic = require('../math/cubic');\n\nvar Arc = require('../math/arc');\n\nmodule.exports = {\n line: function line(x1, y1, x2, y2, lineWidth, x, y) {\n var box = Line.box(x1, y1, x2, y2, lineWidth);\n\n if (!this.box(box.minX, box.maxX, box.minY, box.maxY, x, y)) {\n return false;\n }\n\n var d = Line.pointDistance(x1, y1, x2, y2, x, y);\n\n if (isNaN(d)) {\n return false;\n }\n\n return d <= lineWidth / 2;\n },\n polyline: function polyline(points, lineWidth, x, y) {\n var l = points.length - 1;\n\n if (l < 1) {\n return false;\n }\n\n for (var i = 0; i < l; i++) {\n var x1 = points[i][0];\n var y1 = points[i][1];\n var x2 = points[i + 1][0];\n var y2 = points[i + 1][1];\n\n if (this.line(x1, y1, x2, y2, lineWidth, x, y)) {\n return true;\n }\n }\n\n return false;\n },\n cubicline: function cubicline(x1, y1, x2, y2, x3, y3, x4, y4, lineWidth, x, y) {\n return Cubic.pointDistance(x1, y1, x2, y2, x3, y3, x4, y4, x, y) <= lineWidth / 2;\n },\n quadraticline: function quadraticline(x1, y1, x2, y2, x3, y3, lineWidth, x, y) {\n return Quadratic.pointDistance(x1, y1, x2, y2, x3, y3, x, y) <= lineWidth / 2;\n },\n arcline: function arcline(cx, cy, r, startAngle, endAngle, clockwise, lineWidth, x, y) {\n return Arc.pointDistance(cx, cy, r, startAngle, endAngle, clockwise, x, y) <= lineWidth / 2;\n },\n rect: function rect(rx, ry, width, height, x, y) {\n return rx <= x && x <= rx + width && ry <= y && y <= ry + height;\n },\n circle: function circle(cx, cy, r, x, y) {\n return Math.pow(x - cx, 2) + Math.pow(y - cy, 2) <= Math.pow(r, 2);\n },\n box: function box(minX, maxX, minY, maxY, x, y) {\n return minX <= x && x <= maxX && minY <= y && y <= maxY;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/util/inside.js\n// module id = 79\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nvar vec2 = Util.vec2;\n\nfunction cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return onet * onet * (onet * p3 + 3 * t * p2) + t * t * (t * p0 + 3 * onet * p1);\n}\n\nfunction cubicDerivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet + (p3 - p2) * t * t);\n}\n\nfunction cubicProjectPoint(x1, y1, x2, y2, x3, y3, x4, y4, x, y, out) {\n var t;\n var interval = 0.005;\n var d = Infinity;\n\n var _t;\n\n var v1;\n var d1;\n var d2;\n var v2;\n var prev;\n var next;\n var EPSILON = 0.0001;\n var v0 = [x, y];\n\n for (_t = 0; _t < 1; _t += 0.05) {\n v1 = [cubicAt(x1, x2, x3, x4, _t), cubicAt(y1, y2, y3, y4, _t)];\n d1 = vec2.squaredDistance(v0, v1);\n\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n\n d = Infinity;\n\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON) {\n break;\n }\n\n prev = t - interval;\n next = t + interval;\n v1 = [cubicAt(x1, x2, x3, x4, prev), cubicAt(y1, y2, y3, y4, prev)];\n d1 = vec2.squaredDistance(v0, v1);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n v2 = [cubicAt(x1, x2, x3, x4, next), cubicAt(y1, y2, y3, y4, next)];\n d2 = vec2.squaredDistance(v0, v2);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n }\n\n if (out) {\n out.x = cubicAt(x1, x2, x3, x4, t);\n out.y = cubicAt(y1, y2, y3, y4, t);\n }\n\n return Math.sqrt(d);\n}\n\nfunction cubicExtrema(p0, p1, p2, p3) {\n var a = 3 * p0 - 9 * p1 + 9 * p2 - 3 * p3;\n var b = 6 * p1 - 12 * p2 + 6 * p3;\n var c = 3 * p2 - 3 * p3;\n var extrema = [];\n var t1;\n var t2;\n var discSqrt;\n\n if (Util.isNumberEqual(a, 0)) {\n if (!Util.isNumberEqual(b, 0)) {\n t1 = -c / b;\n\n if (t1 >= 0 && t1 <= 1) {\n extrema.push(t1);\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n\n if (Util.isNumberEqual(disc, 0)) {\n extrema.push(-b / (2 * a));\n } else if (disc > 0) {\n discSqrt = Math.sqrt(disc);\n t1 = (-b + discSqrt) / (2 * a);\n t2 = (-b - discSqrt) / (2 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n extrema.push(t1);\n }\n\n if (t2 >= 0 && t2 <= 1) {\n extrema.push(t2);\n }\n }\n }\n\n return extrema;\n}\n\nfunction base3(t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;\n var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n}\n\nfunction cubiclLen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (Util.isNil(z)) {\n z = 1;\n }\n\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816];\n var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472];\n var sum = 0;\n\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2;\n var xbase = base3(ct, x1, x2, x3, x4);\n var ybase = base3(ct, y1, y2, y3, y4);\n var comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n\n return z2 * sum;\n}\n\nmodule.exports = {\n at: cubicAt,\n derivativeAt: cubicDerivativeAt,\n projectPoint: function projectPoint(x1, y1, x2, y2, x3, y3, x4, y4, x, y) {\n var rst = {};\n cubicProjectPoint(x1, y1, x2, y2, x3, y3, x4, y4, x, y, rst);\n return rst;\n },\n pointDistance: cubicProjectPoint,\n extrema: cubicExtrema,\n len: cubiclLen\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/math/cubic.js\n// module id = 80\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Format = require('../util/format');\n\nvar PathSegment = require('./util/path-segment');\n\nvar Marker = function Marker(cfg) {\n Marker.superclass.constructor.call(this, cfg);\n};\n\nMarker.Symbols = {\n // 圆\n circle: function circle(x, y, r) {\n return [['M', x, y], ['m', -r, 0], ['a', r, r, 0, 1, 0, r * 2, 0], ['a', r, r, 0, 1, 0, -r * 2, 0]];\n },\n // 正方形\n square: function square(x, y, r) {\n return [['M', x - r, y - r], ['L', x + r, y - r], ['L', x + r, y + r], ['L', x - r, y + r], ['Z']];\n },\n // 菱形\n diamond: function diamond(x, y, r) {\n return [['M', x - r, y], ['L', x, y - r], ['L', x + r, y], ['L', x, y + r], ['Z']];\n },\n // 三角形\n triangle: function triangle(x, y, r) {\n var diffY = r * Math.sin(1 / 3 * Math.PI);\n return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['z']];\n },\n // 倒三角形\n 'triangle-down': function triangleDown(x, y, r) {\n var diffY = r * Math.sin(1 / 3 * Math.PI);\n return [['M', x - r, y - diffY], ['L', x + r, y - diffY], ['L', x, y + diffY], ['Z']];\n }\n};\nMarker.ATTRS = {\n path: null,\n lineWidth: 1\n};\nUtil.extend(Marker, Shape);\nUtil.augment(Marker, {\n type: 'marker',\n canFill: true,\n canStroke: true,\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n x: 0,\n y: 0,\n lineWidth: 1\n };\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.radius || attrs.r;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2 + r;\n return {\n minX: cx - halfWidth,\n minY: cy - halfWidth,\n maxX: cx + halfWidth,\n maxY: cy + halfWidth\n };\n },\n _getPath: function _getPath() {\n var attrs = this._attrs;\n var x = attrs.x;\n var y = attrs.y;\n var r = attrs.radius || attrs.r;\n var symbol = attrs.symbol || 'circle';\n var method;\n\n if (Util.isFunction(symbol)) {\n method = symbol;\n } else {\n method = Marker.Symbols[symbol];\n }\n\n if (!method) {\n console.warn(symbol + \" marker is not supported.\");\n return null;\n }\n\n return method(x, y, r);\n },\n createPath: function createPath(context) {\n var segments = this._cfg.segments;\n\n if (segments && !this._cfg.hasUpdate) {\n context.beginPath();\n\n for (var i = 0; i < segments.length; i++) {\n segments[i].draw(context);\n }\n\n return;\n }\n\n var path = Format.parsePath(this._getPath());\n context.beginPath();\n var preSegment;\n segments = [];\n\n for (var _i = 0; _i < path.length; _i++) {\n var item = path[_i];\n preSegment = new PathSegment(item, preSegment, _i === path.length - 1);\n segments.push(preSegment);\n preSegment.draw(context);\n }\n\n this._cfg.segments = segments;\n this._cfg.hasUpdate = false;\n }\n});\nmodule.exports = Marker;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/marker.js\n// module id = 81\n// module chunks = 0 1 2","var Util = require('./common');\n\nvar SPACES = \"\\t\\n\\x0B\\f\\r \\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\";\nvar PATH_COMMAND = new RegExp('([a-z])[' + SPACES + ',]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[' + SPACES + ']*,?[' + SPACES + ']*)+)', 'ig');\nvar PATH_VALUES = new RegExp('(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[' + SPACES + ']*,?[' + SPACES + ']*', 'ig'); // Parses given path string into an array of arrays of path segments\n\nvar parsePathString = function parsePathString(pathString) {\n if (!pathString) {\n return null;\n }\n\n if (typeof pathString === typeof []) {\n return pathString;\n }\n\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n\n if (name === 'r') {\n data.push([b].concat(params));\n } else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n });\n return data;\n}; // http://schepers.cc/getting-to-the-point\n\n\nvar catmullRom2bezier = function catmullRom2bezier(crp, z) {\n var d = [];\n\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\n var p = [{\n x: +crp[i - 2],\n y: +crp[i - 1]\n }, {\n x: +crp[i],\n y: +crp[i + 1]\n }, {\n x: +crp[i + 2],\n y: +crp[i + 3]\n }, {\n x: +crp[i + 4],\n y: +crp[i + 5]\n }];\n\n if (z) {\n if (!i) {\n p[0] = {\n x: +crp[iLen - 2],\n y: +crp[iLen - 1]\n };\n } else if (iLen - 4 === i) {\n p[3] = {\n x: +crp[0],\n y: +crp[1]\n };\n } else if (iLen - 2 === i) {\n p[2] = {\n x: +crp[0],\n y: +crp[1]\n };\n p[3] = {\n x: +crp[2],\n y: +crp[3]\n };\n }\n } else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n } else if (!i) {\n p[0] = {\n x: +crp[i],\n y: +crp[i + 1]\n };\n }\n }\n\n d.push(['C', (-p[0].x + 6 * p[1].x + p[2].x) / 6, (-p[0].y + 6 * p[1].y + p[2].y) / 6, (p[1].x + 6 * p[2].x - p[3].x) / 6, (p[1].y + 6 * p[2].y - p[3].y) / 6, p[2].x, p[2].y]);\n }\n\n return d;\n};\n\nvar ellipsePath = function ellipsePath(x, y, rx, ry, a) {\n var res = [];\n\n if (a === null && ry === null) {\n ry = rx;\n }\n\n x = +x;\n y = +y;\n rx = +rx;\n ry = +ry;\n\n if (a !== null) {\n var rad = Math.PI / 180;\n var x1 = x + rx * Math.cos(-ry * rad);\n var x2 = x + rx * Math.cos(-a * rad);\n var y1 = y + rx * Math.sin(-ry * rad);\n var y2 = y + rx * Math.sin(-a * rad);\n res = [['M', x1, y1], ['A', rx, rx, 0, +(a - ry > 180), 0, x2, y2]];\n } else {\n res = [['M', x, y], ['m', 0, -ry], ['a', rx, ry, 0, 1, 1, 0, 2 * ry], ['a', rx, ry, 0, 1, 1, 0, -2 * ry], ['z']];\n }\n\n return res;\n};\n\nvar pathToAbsolute = function pathToAbsolute(pathArray) {\n pathArray = parsePathString(pathArray);\n\n if (!pathArray || !pathArray.length) {\n return [['M', 0, 0]];\n }\n\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0;\n var dots;\n\n if (pathArray[0][0] === 'M') {\n x = +pathArray[0][1];\n y = +pathArray[0][2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n\n var crz = pathArray.length === 3 && pathArray[0][0] === 'M' && pathArray[1][0].toUpperCase() === 'R' && pathArray[2][0].toUpperCase() === 'Z';\n\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\n res.push(r = []);\n pa = pathArray[i];\n pa0 = pa[0];\n\n if (pa0 !== pa0.toUpperCase()) {\n r[0] = pa0.toUpperCase();\n\n switch (r[0]) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n\n case 'V':\n r[1] = +pa[1] + y;\n break;\n\n case 'H':\n r[1] = +pa[1] + x;\n break;\n\n case 'R':\n dots = [x, y].concat(pa.slice(1));\n\n for (var j = 2, jj = dots.length; j < jj; j++) {\n dots[j] = +dots[j] + x;\n dots[++j] = +dots[j] + y;\n }\n\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n break;\n\n case 'O':\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n break;\n\n case 'U':\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n break;\n\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n break;\n // for lint\n\n default:\n for (var _j = 1, _jj = pa.length; _j < _jj; _j++) {\n r[_j] = +pa[_j] + (_j % 2 ? x : y);\n }\n\n }\n } else if (pa0 === 'R') {\n dots = [x, y].concat(pa.slice(1));\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n r = ['R'].concat(pa.slice(-2));\n } else if (pa0 === 'O') {\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n } else if (pa0 === 'U') {\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n } else {\n for (var k = 0, kk = pa.length; k < kk; k++) {\n r[k] = pa[k];\n }\n }\n\n pa0 = pa0.toUpperCase();\n\n if (pa0 !== 'O') {\n switch (r[0]) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n\n case 'H':\n x = r[1];\n break;\n\n case 'V':\n y = r[1];\n break;\n\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break;\n // for lint\n\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n }\n }\n\n return res;\n};\n\nvar l2c = function l2c(x1, y1, x2, y2) {\n return [x1, y1, x2, y2, x2, y2];\n};\n\nvar q2c = function q2c(x1, y1, ax, ay, x2, y2) {\n var _13 = 1 / 3;\n\n var _23 = 2 / 3;\n\n return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2];\n};\n\nvar a2c = function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\n // for more information of where this math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n if (rx === ry) {\n rx += 1;\n }\n\n var _120 = Math.PI * 120 / 180;\n\n var rad = Math.PI / 180 * (+angle || 0);\n var res = [];\n var xy;\n var f1;\n var f2;\n var cx;\n var cy;\n\n var rotate = function rotate(x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return {\n x: X,\n y: Y\n };\n };\n\n if (!recursive) {\n xy = rotate(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotate(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n\n if (x1 === x2 && y1 === y2) {\n // 若弧的起始点和终点重叠则错开一点\n x2 += 1;\n y2 += 1;\n } // const cos = Math.cos(Math.PI / 180 * angle);\n // const sin = Math.sin(Math.PI / 180 * angle);\n\n\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = x * x / (rx * rx) + y * y / (ry * ry);\n\n if (h > 1) {\n h = Math.sqrt(h);\n rx = h * rx;\n ry = h * ry;\n }\n\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (large_arc_flag === sweep_flag ? -1 : 1) * Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = k * rx * y / ry + (x1 + x2) / 2;\n cy = k * -ry * x / rx + (y1 + y2) / 2;\n f1 = Math.asin(((y1 - cy) / ry).toFixed(9));\n f2 = Math.asin(((y2 - cy) / ry).toFixed(9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n f1 < 0 && (f1 = Math.PI * 2 + f1);\n f2 < 0 && (f2 = Math.PI * 2 + f2);\n\n if (sweep_flag && f1 > f2) {\n f1 = f1 - Math.PI * 2;\n }\n\n if (!sweep_flag && f2 > f1) {\n f2 = f2 - Math.PI * 2;\n }\n } else {\n f1 = recursive[0];\n f2 = recursive[1];\n cx = recursive[2];\n cy = recursive[3];\n }\n\n var df = f2 - f1;\n\n if (Math.abs(df) > _120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\n }\n\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = 4 / 3 * rx * t;\n var hy = 4 / 3 * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n\n if (recursive) {\n return [m2, m3, m4].concat(res);\n }\n\n res = [m2, m3, m4].concat(res).join().split(',');\n var newres = [];\n\n for (var i = 0, ii = res.length; i < ii; i++) {\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\n }\n\n return newres;\n};\n\nvar pathTocurve = function pathTocurve(path, path2) {\n var p = pathToAbsolute(path);\n var p2 = path2 && pathToAbsolute(path2);\n var attrs = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null\n };\n var attrs2 = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null\n };\n var pcoms1 = []; // path commands of original path p\n\n var pcoms2 = []; // path commands of original path p2\n\n var pfirst = ''; // temporary holder for original path command\n\n var pcom = ''; // holder for previous path command of original path\n\n var ii;\n\n var processPath = function processPath(path, d, pcom) {\n var nx, ny;\n\n if (!path) {\n return ['C', d.x, d.y, d.x, d.y, d.x, d.y];\n }\n\n !(path[0] in {\n T: 1,\n Q: 1\n }) && (d.qx = d.qy = null);\n\n switch (path[0]) {\n case 'M':\n d.X = path[1];\n d.Y = path[2];\n break;\n\n case 'A':\n path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));\n break;\n\n case 'S':\n if (pcom === 'C' || pcom === 'S') {\n // In \"S\" case we have to take into account, if the previous command is C/S.\n nx = d.x * 2 - d.bx; // And reflect the previous\n\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\n } else {\n // or some else or nothing\n nx = d.x;\n ny = d.y;\n }\n\n path = ['C', nx, ny].concat(path.slice(1));\n break;\n\n case 'T':\n if (pcom === 'Q' || pcom === 'T') {\n // In \"T\" case we have to take into account, if the previous command is Q/T.\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\n\n d.qy = d.y * 2 - d.qy; // to case \"S\".\n } else {\n // or something else or nothing\n d.qx = d.x;\n d.qy = d.y;\n }\n\n path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\n break;\n\n case 'Q':\n d.qx = path[1];\n d.qy = path[2];\n path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\n break;\n\n case 'L':\n path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));\n break;\n\n case 'H':\n path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));\n break;\n\n case 'V':\n path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));\n break;\n\n case 'Z':\n path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));\n break;\n\n default:\n break;\n }\n\n return path;\n };\n\n var fixArc = function fixArc(pp, i) {\n if (pp[i].length > 7) {\n pp[i].shift();\n var pi = pp[i];\n\n while (pi.length) {\n pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved\n\n p2 && (pcoms2[i] = 'A'); // the same as above\n\n pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));\n }\n\n pp.splice(i, 1);\n ii = Math.max(p.length, p2 && p2.length || 0);\n }\n };\n\n var fixM = function fixM(path1, path2, a1, a2, i) {\n if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {\n path2.splice(i, 0, ['M', a2.x, a2.y]);\n a1.bx = 0;\n a1.by = 0;\n a1.x = path1[i][1];\n a1.y = path1[i][2];\n ii = Math.max(p.length, p2 && p2.length || 0);\n }\n };\n\n ii = Math.max(p.length, p2 && p2.length || 0);\n\n for (var i = 0; i < ii; i++) {\n p[i] && (pfirst = p[i][0]); // save current path command\n\n if (pfirst !== 'C') {\n // C is not saved yet, because it may be result of conversion\n pcoms1[i] = pfirst; // Save current path command\n\n i && (pcom = pcoms1[i - 1]); // Get previous path command pcom\n }\n\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\n\n if (pcoms1[i] !== 'A' && pfirst === 'C') pcoms1[i] = 'C'; // A is the only command\n // which may produce multiple C:s\n // so we have to make sure that C is also C in original path\n\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\n\n if (p2) {\n // the same procedures is done to p2\n p2[i] && (pfirst = p2[i][0]);\n\n if (pfirst !== 'C') {\n pcoms2[i] = pfirst;\n i && (pcom = pcoms2[i - 1]);\n }\n\n p2[i] = processPath(p2[i], attrs2, pcom);\n\n if (pcoms2[i] !== 'A' && pfirst === 'C') {\n pcoms2[i] = 'C';\n }\n\n fixArc(p2, i);\n }\n\n fixM(p, p2, attrs, attrs2, i);\n fixM(p2, p, attrs2, attrs, i);\n var seg = p[i];\n var seg2 = p2 && p2[i];\n var seglen = seg.length;\n var seg2len = p2 && seg2.length;\n attrs.x = seg[seglen - 2];\n attrs.y = seg[seglen - 1];\n attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;\n attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;\n attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);\n attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);\n attrs2.x = p2 && seg2[seg2len - 2];\n attrs2.y = p2 && seg2[seg2len - 1];\n }\n\n return p2 ? [p, p2] : p;\n};\n\nvar p2s = /,?([a-z]),?/gi;\n\nvar parsePathArray = function parsePathArray(path) {\n return path.join(',').replace(p2s, '$1');\n};\n\nvar base3 = function base3(t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;\n var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n};\n\nvar bezlen = function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (z === null) {\n z = 1;\n }\n\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816];\n var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472];\n var sum = 0;\n\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2;\n var xbase = base3(ct, x1, x2, x3, x4);\n var ybase = base3(ct, y1, y2, y3, y4);\n var comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n\n return z2 * sum;\n};\n\nvar curveDim = function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [];\n var bounds = [[], []];\n var a;\n var b;\n var c;\n var t;\n\n for (var i = 0; i < 2; ++i) {\n if (i === 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) < 1e-12) {\n continue;\n }\n\n t = -c / b;\n\n if (t > 0 && t < 1) {\n tvalues.push(t);\n }\n\n continue;\n }\n\n var b2ac = b * b - 4 * c * a;\n var sqrtb2ac = Math.sqrt(b2ac);\n\n if (b2ac < 0) {\n continue;\n }\n\n var t1 = (-b + sqrtb2ac) / (2 * a);\n\n if (t1 > 0 && t1 < 1) {\n tvalues.push(t1);\n }\n\n var t2 = (-b - sqrtb2ac) / (2 * a);\n\n if (t2 > 0 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var j = tvalues.length;\n var jlen = j;\n var mt;\n\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n return {\n min: {\n x: Math.min.apply(0, bounds[0]),\n y: Math.min.apply(0, bounds[1])\n },\n max: {\n x: Math.max.apply(0, bounds[0]),\n y: Math.max.apply(0, bounds[1])\n }\n };\n};\n\nvar intersect = function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n if (Math.max(x1, x2) < Math.min(x3, x4) || Math.min(x1, x2) > Math.max(x3, x4) || Math.max(y1, y2) < Math.min(y3, y4) || Math.min(y1, y2) > Math.max(y3, y4)) {\n return;\n }\n\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4);\n var ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4);\n var denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n\n if (!denominator) {\n return;\n }\n\n var px = nx / denominator;\n var py = ny / denominator;\n var px2 = +px.toFixed(2);\n var py2 = +py.toFixed(2);\n\n if (px2 < +Math.min(x1, x2).toFixed(2) || px2 > +Math.max(x1, x2).toFixed(2) || px2 < +Math.min(x3, x4).toFixed(2) || px2 > +Math.max(x3, x4).toFixed(2) || py2 < +Math.min(y1, y2).toFixed(2) || py2 > +Math.max(y1, y2).toFixed(2) || py2 < +Math.min(y3, y4).toFixed(2) || py2 > +Math.max(y3, y4).toFixed(2)) {\n return;\n }\n\n return {\n x: px,\n y: py\n };\n};\n\nvar isPointInsideBBox = function isPointInsideBBox(bbox, x, y) {\n return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height;\n};\n\nvar rectPath = function rectPath(x, y, w, h, r) {\n if (r) {\n return [['M', +x + +r, y], ['l', w - r * 2, 0], ['a', r, r, 0, 0, 1, r, r], ['l', 0, h - r * 2], ['a', r, r, 0, 0, 1, -r, r], ['l', r * 2 - w, 0], ['a', r, r, 0, 0, 1, -r, -r], ['l', 0, r * 2 - h], ['a', r, r, 0, 0, 1, r, -r], ['z']];\n }\n\n var res = [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']];\n res.parsePathArray = parsePathArray;\n return res;\n};\n\nvar box = function box(x, y, width, height) {\n if (x === null) {\n x = y = width = height = 0;\n }\n\n if (y === null) {\n y = x.y;\n width = x.width;\n height = x.height;\n x = x.x;\n }\n\n return {\n x: x,\n y: y,\n width: width,\n w: width,\n height: height,\n h: height,\n x2: x + width,\n y2: y + height,\n cx: x + width / 2,\n cy: y + height / 2,\n r1: Math.min(width, height) / 2,\n r2: Math.max(width, height) / 2,\n r0: Math.sqrt(width * width + height * height) / 2,\n path: rectPath(x, y, width, height),\n vb: [x, y, width, height].join(' ')\n };\n};\n\nvar isBBoxIntersect = function isBBoxIntersect(bbox1, bbox2) {\n bbox1 = box(bbox1);\n bbox2 = box(bbox2);\n return isPointInsideBBox(bbox2, bbox1.x, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);\n};\n\nvar bezierBBox = function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\n if (!Util.isArray(p1x)) {\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\n }\n\n var bbox = curveDim.apply(null, p1x);\n return box(bbox.min.x, bbox.min.y, bbox.max.x - bbox.min.x, bbox.max.y - bbox.min.y);\n};\n\nvar findDotsAtSegment = function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n var t1 = 1 - t;\n var t13 = Math.pow(t1, 3);\n var t12 = Math.pow(t1, 2);\n var t2 = t * t;\n var t3 = t2 * t;\n var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x;\n var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y;\n var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x);\n var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y);\n var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x);\n var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y);\n var ax = t1 * p1x + t * c1x;\n var ay = t1 * p1y + t * c1y;\n var cx = t1 * c2x + t * p2x;\n var cy = t1 * c2y + t * p2y;\n var alpha = 90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI; // (mx > nx || my < ny) && (alpha += 180);\n\n return {\n x: x,\n y: y,\n m: {\n x: mx,\n y: my\n },\n n: {\n x: nx,\n y: ny\n },\n start: {\n x: ax,\n y: ay\n },\n end: {\n x: cx,\n y: cy\n },\n alpha: alpha\n };\n};\n\nvar interHelper = function interHelper(bez1, bez2, justCount) {\n var bbox1 = bezierBBox(bez1);\n var bbox2 = bezierBBox(bez2);\n\n if (!isBBoxIntersect(bbox1, bbox2)) {\n return justCount ? 0 : [];\n }\n\n var l1 = bezlen.apply(0, bez1);\n var l2 = bezlen.apply(0, bez2);\n var n1 = ~~(l1 / 8);\n var n2 = ~~(l2 / 8);\n var dots1 = [];\n var dots2 = [];\n var xy = {};\n var res = justCount ? 0 : [];\n\n for (var i = 0; i < n1 + 1; i++) {\n var d = findDotsAtSegment.apply(0, bez1.concat(i / n1));\n dots1.push({\n x: d.x,\n y: d.y,\n t: i / n1\n });\n }\n\n for (var _i = 0; _i < n2 + 1; _i++) {\n var _d = findDotsAtSegment.apply(0, bez2.concat(_i / n2));\n\n dots2.push({\n x: _d.x,\n y: _d.y,\n t: _i / n2\n });\n }\n\n for (var _i2 = 0; _i2 < n1; _i2++) {\n for (var j = 0; j < n2; j++) {\n var di = dots1[_i2];\n var di1 = dots1[_i2 + 1];\n var dj = dots2[j];\n var dj1 = dots2[j + 1];\n var ci = Math.abs(di1.x - di.x) < 0.001 ? 'y' : 'x';\n var cj = Math.abs(dj1.x - dj.x) < 0.001 ? 'y' : 'x';\n var is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\n\n if (is) {\n if (xy[is.x.toFixed(4)] === is.y.toFixed(4)) {\n continue;\n }\n\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\n var t1 = di.t + Math.abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t);\n var t2 = dj.t + Math.abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\n\n if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) {\n if (justCount) {\n res++;\n } else {\n res.push({\n x: is.x,\n y: is.y,\n t1: t1,\n t2: t2\n });\n }\n }\n }\n }\n }\n\n return res;\n};\n\nvar interPathHelper = function interPathHelper(path1, path2, justCount) {\n path1 = pathTocurve(path1);\n path2 = pathTocurve(path2);\n var x1;\n var y1;\n var x2;\n var y2;\n var x1m;\n var y1m;\n var x2m;\n var y2m;\n var bez1;\n var bez2;\n var res = justCount ? 0 : [];\n\n for (var i = 0, ii = path1.length; i < ii; i++) {\n var pi = path1[i];\n\n if (pi[0] === 'M') {\n x1 = x1m = pi[1];\n y1 = y1m = pi[2];\n } else {\n if (pi[0] === 'C') {\n bez1 = [x1, y1].concat(pi.slice(1));\n x1 = bez1[6];\n y1 = bez1[7];\n } else {\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\n x1 = x1m;\n y1 = y1m;\n }\n\n for (var j = 0, jj = path2.length; j < jj; j++) {\n var pj = path2[j];\n\n if (pj[0] === 'M') {\n x2 = x2m = pj[1];\n y2 = y2m = pj[2];\n } else {\n if (pj[0] === 'C') {\n bez2 = [x2, y2].concat(pj.slice(1));\n x2 = bez2[6];\n y2 = bez2[7];\n } else {\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\n x2 = x2m;\n y2 = y2m;\n }\n\n var intr = interHelper(bez1, bez2, justCount);\n\n if (justCount) {\n res += intr;\n } else {\n for (var k = 0, kk = intr.length; k < kk; k++) {\n intr[k].segment1 = i;\n intr[k].segment2 = j;\n intr[k].bez1 = bez1;\n intr[k].bez2 = bez2;\n }\n\n res = res.concat(intr);\n }\n }\n }\n }\n }\n\n return res;\n};\n\nvar pathIntersection = function pathIntersection(path1, path2) {\n return interPathHelper(path1, path2);\n};\n\nfunction decasteljau(points, t) {\n var left = [];\n var right = [];\n\n function recurse(points, t) {\n if (points.length === 1) {\n left.push(points[0]);\n right.push(points[0]);\n } else {\n var middlePoints = [];\n\n for (var i = 0; i < points.length - 1; i++) {\n if (i === 0) {\n left.push(points[0]);\n }\n\n if (i === points.length - 2) {\n right.push(points[i + 1]);\n }\n\n middlePoints[i] = [(1 - t) * points[i][0] + t * points[i + 1][0], (1 - t) * points[i][1] + t * points[i + 1][1]];\n }\n\n recurse(middlePoints, t);\n }\n }\n\n if (points.length) {\n recurse(points, t);\n }\n\n return {\n left: left,\n right: right.reverse()\n };\n}\n\nfunction splitCurve(start, end, count) {\n var points = [[start[1], start[2]]];\n count = count || 2;\n var segments = [];\n\n if (end[0] === 'A') {\n points.push(end[6]);\n points.push(end[7]);\n } else if (end[0] === 'C') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n points.push([end[5], end[6]]);\n } else if (end[0] === 'S' || end[0] === 'Q') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n } else {\n points.push([end[1], end[2]]);\n }\n\n var leftSegments = points;\n var t = 1 / count;\n\n for (var i = 0; i < count - 1; i++) {\n var rt = t / (1 - t * i);\n var split = decasteljau(leftSegments, rt);\n segments.push(split.left);\n leftSegments = split.right;\n }\n\n segments.push(leftSegments);\n var result = segments.map(function (segment) {\n var cmd = [];\n\n if (segment.length === 4) {\n cmd.push('C');\n cmd = cmd.concat(segment[2]);\n }\n\n if (segment.length >= 3) {\n if (segment.length === 3) {\n cmd.push('Q');\n }\n\n cmd = cmd.concat(segment[1]);\n }\n\n if (segment.length === 2) {\n cmd.push('L');\n }\n\n cmd = cmd.concat(segment[segment.length - 1]);\n return cmd;\n });\n return result;\n}\n\nvar splitSegment = function splitSegment(start, end, count) {\n if (count === 1) {\n return [[].concat(start)];\n }\n\n var segments = [];\n\n if (end[0] === 'L' || end[0] === 'C' || end[0] === 'Q') {\n segments = segments.concat(splitCurve(start, end, count));\n } else {\n var temp = [].concat(start);\n\n if (temp[0] === 'M') {\n temp[0] = 'L';\n }\n\n for (var i = 0; i <= count - 1; i++) {\n segments.push(temp);\n }\n }\n\n return segments;\n};\n\nvar fillPath = function fillPath(source, target) {\n if (source.length === 1) {\n return source;\n }\n\n var sourceLen = source.length - 1;\n var targetLen = target.length - 1;\n var ratio = sourceLen / targetLen;\n var segmentsToFill = [];\n\n if (source.length === 1 && source[0][0] === 'M') {\n for (var i = 0; i < targetLen - sourceLen; i++) {\n source.push(source[0]);\n }\n\n return source;\n }\n\n for (var _i3 = 0; _i3 < targetLen; _i3++) {\n var index = Math.floor(ratio * _i3);\n segmentsToFill[index] = (segmentsToFill[index] || 0) + 1;\n }\n\n var filled = segmentsToFill.reduce(function (filled, count, i) {\n if (i === sourceLen) {\n return filled.concat(source[sourceLen]);\n }\n\n return filled.concat(splitSegment(source[i], source[i + 1], count));\n }, []);\n filled.unshift(source[0]);\n\n if (target[targetLen] === 'Z' || target[targetLen] === 'z') {\n filled.push('Z');\n }\n\n return filled;\n};\n\nvar isEqual = function isEqual(obj1, obj2) {\n if (obj1.length !== obj2.length) {\n return false;\n }\n\n var result = true;\n Util.each(obj1, function (item, i) {\n if (item !== obj2[i]) {\n result = false;\n return false;\n }\n });\n return result;\n};\n\nfunction getMinDiff(del, add, modify) {\n var type = null;\n var min = modify;\n\n if (add < min) {\n min = add;\n type = 'add';\n }\n\n if (del < min) {\n min = del;\n type = 'del';\n }\n\n return {\n type: type,\n min: min\n };\n}\n/*\n * https://en.wikipedia.org/wiki/Levenshtein_distance\n * 计算两条path的编辑距离\n */\n\n\nvar levenshteinDistance = function levenshteinDistance(source, target) {\n var sourceLen = source.length;\n var targetLen = target.length;\n var sourceSegment, targetSegment;\n var temp = 0;\n\n if (sourceLen === 0 || targetLen === 0) {\n return null;\n }\n\n var dist = [];\n\n for (var i = 0; i <= sourceLen; i++) {\n dist[i] = [];\n dist[i][0] = {\n min: i\n };\n }\n\n for (var j = 0; j <= targetLen; j++) {\n dist[0][j] = {\n min: j\n };\n }\n\n for (var _i4 = 1; _i4 <= sourceLen; _i4++) {\n sourceSegment = source[_i4 - 1];\n\n for (var _j2 = 1; _j2 <= targetLen; _j2++) {\n targetSegment = target[_j2 - 1];\n\n if (isEqual(sourceSegment, targetSegment)) {\n temp = 0;\n } else {\n temp = 1;\n }\n\n var del = dist[_i4 - 1][_j2].min + 1;\n var add = dist[_i4][_j2 - 1].min + 1;\n var modify = dist[_i4 - 1][_j2 - 1].min + temp;\n dist[_i4][_j2] = getMinDiff(del, add, modify);\n }\n }\n\n return dist;\n};\n\nvar fillPathByDiff = function fillPathByDiff(source, target) {\n var diffMatrix = levenshteinDistance(source, target);\n var sourceLen = source.length;\n var targetLen = target.length;\n var changes = [];\n var index = 1;\n var minPos = 1; // 如果source和target不是完全不相等\n\n if (diffMatrix[sourceLen][targetLen] !== sourceLen) {\n // 获取从source到target所需改动\n for (var i = 1; i <= sourceLen; i++) {\n var min = diffMatrix[i][i].min;\n minPos = i;\n\n for (var j = index; j <= targetLen; j++) {\n if (diffMatrix[i][j].min < min) {\n min = diffMatrix[i][j].min;\n minPos = j;\n }\n }\n\n index = minPos;\n\n if (diffMatrix[i][index].type) {\n changes.push({\n index: i - 1,\n type: diffMatrix[i][index].type\n });\n }\n } // 对source进行增删path\n\n\n for (var _i5 = changes.length - 1; _i5 >= 0; _i5--) {\n index = changes[_i5].index;\n\n if (changes[_i5].type === 'add') {\n source.splice(index, 0, [].concat(source[index]));\n } else {\n source.splice(index, 1);\n }\n }\n } // source尾部补齐\n\n\n sourceLen = source.length;\n var diff = targetLen - sourceLen;\n\n if (sourceLen < targetLen) {\n for (var _i6 = 0; _i6 < diff; _i6++) {\n if (source[sourceLen - 1][0] === 'z' || source[sourceLen - 1][0] === 'Z') {\n source.splice(sourceLen - 2, 0, source[sourceLen - 2]);\n } else {\n source.push(source[sourceLen - 1]);\n }\n\n sourceLen += 1;\n }\n }\n\n return source;\n}; // 将两个点均分成count个点\n\n\nfunction _splitPoints(points, former, count) {\n var result = [].concat(points);\n var index;\n var t = 1 / (count + 1);\n\n var formerEnd = _getSegmentPoints(former)[0];\n\n for (var i = 1; i <= count; i++) {\n t *= i;\n index = Math.floor(points.length * t);\n\n if (index === 0) {\n result.unshift([formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]);\n } else {\n result.splice(index, 0, [formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]);\n }\n }\n\n return result;\n}\n/*\n * 抽取pathSegment中的关键点\n * M,L,A,Q,H,V一个端点\n * Q, S抽取一个端点,一个控制点\n * C抽取一个端点,两个控制点\n */\n\n\nfunction _getSegmentPoints(segment) {\n var points = [];\n\n switch (segment[0]) {\n case 'M':\n points.push([segment[1], segment[2]]);\n break;\n\n case 'L':\n points.push([segment[1], segment[2]]);\n break;\n\n case 'A':\n points.push([segment[6], segment[7]]);\n break;\n\n case 'Q':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n\n case 'T':\n points.push([segment[1], segment[2]]);\n break;\n\n case 'C':\n points.push([segment[5], segment[6]]);\n points.push([segment[1], segment[2]]);\n points.push([segment[3], segment[4]]);\n break;\n\n case 'S':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n\n case 'H':\n points.push([segment[1], segment[1]]);\n break;\n\n case 'V':\n points.push([segment[1], segment[1]]);\n break;\n\n default:\n }\n\n return points;\n}\n\nvar formatPath = function formatPath(fromPath, toPath) {\n if (fromPath.length <= 1) {\n return fromPath;\n }\n\n var points;\n\n for (var i = 0; i < toPath.length; i++) {\n if (fromPath[i][0] !== toPath[i][0]) {\n // 获取fromPath的pathSegment的端点,根据toPath的指令对其改造\n points = _getSegmentPoints(fromPath[i]);\n\n switch (toPath[i][0]) {\n case 'M':\n fromPath[i] = ['M'].concat(points[0]);\n break;\n\n case 'L':\n fromPath[i] = ['L'].concat(points[0]);\n break;\n\n case 'A':\n fromPath[i] = [].concat(toPath[i]);\n fromPath[i][6] = points[0][0];\n fromPath[i][7] = points[0][1];\n break;\n\n case 'Q':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n } else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n\n fromPath[i] = ['Q'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n\n case 'T':\n fromPath[i] = ['T'].concat(points[0]);\n break;\n\n case 'C':\n if (points.length < 3) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 2);\n } else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n\n fromPath[i] = ['C'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n\n case 'S':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n } else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n\n fromPath[i] = ['S'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n\n default:\n fromPath[i] = toPath[i];\n }\n }\n }\n\n return fromPath;\n};\n\nmodule.exports = {\n parsePathString: parsePathString,\n parsePathArray: parsePathArray,\n pathTocurve: pathTocurve,\n pathToAbsolute: pathToAbsolute,\n catmullRomToBezier: catmullRom2bezier,\n rectPath: rectPath,\n fillPath: fillPath,\n fillPathByDiff: fillPathByDiff,\n formatPath: formatPath,\n intersection: pathIntersection\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/util/path.js\n// module id = 82\n// module chunks = 0 1 2","var frame = 0,\n // is an animation frame pending?\ntimeout = 0,\n // is a timeout pending?\ninterval = 0,\n // are any timers active?\npokeDelay = 1000,\n // how frequently we check for clock skew\ntaskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {\n setTimeout(f, 17);\n};\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call = this._time = this._next = null;\n}\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function (callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;else taskHead = this;\n taskTail = this;\n }\n\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function () {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\nexport function timer(callback, delay, time) {\n var t = new Timer();\n t.restart(callback, delay, time);\n return t;\n}\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n\n var t = taskHead,\n e;\n\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(),\n delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0,\n t1 = taskHead,\n t2,\n time = Infinity;\n\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-timer/src/timer.js\n// module id = 83\n// module chunks = 0 1 2","import { color } from \"d3-color\";\nimport rgb from \"./rgb\";\nimport array from \"./array\";\nimport date from \"./date\";\nimport number from \"./number\";\nimport object from \"./object\";\nimport string from \"./string\";\nimport constant from \"./constant\";\nexport default function (a, b) {\n var t = typeof b,\n c;\n return b == null || t === \"boolean\" ? constant(b) : (t === \"number\" ? number : t === \"string\" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : Array.isArray(b) ? array : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object : number)(a, b);\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/value.js\n// module id = 84\n// module chunks = 0 1 2","import define, { extend } from \"./define.js\";\nexport function Color() {}\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\ndefine(Color, color, {\n copy: function (channels) {\n return Object.assign(new this.constructor(), this, channels);\n },\n displayable: function () {\n return this.rgb().displayable();\n },\n hex: color_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000\n : null // invalid hex\n ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0) : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb();\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\ndefine(Rgb, rgb, extend(Color, {\n brighter: function (k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function (k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function () {\n return this;\n },\n displayable: function () {\n return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;\n },\n hex: rgb_formatHex,\n // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity;\n a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \" + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \" + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl();\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n\n return new Hsl(h, s, l, o.opacity);\n}\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function (k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function (k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function () {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);\n },\n displayable: function () {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;\n },\n formatHsl: function () {\n var a = this.opacity;\n a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\") + (this.h || 0) + \", \" + (this.s || 0) * 100 + \"%, \" + (this.l || 0) * 100 + \"%\" + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n/* From FvD 13.37, CSS Color Module Level 3 */\n\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-color/src/color.js\n// module id = 85\n// module chunks = 0 1 2","export default function (constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n\n for (var key in definition) prototype[key] = definition[key];\n\n return prototype;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-color/src/define.js\n// module id = 86\n// module chunks = 0 1 2","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1,\n t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;\n}\nexport default function (values) {\n var n = values.length - 1;\n return function (t) {\n var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/basis.js\n// module id = 87\n// module chunks = 0 1 2","var each = require('./each');\n\nvar isArrayLike = require('./type/is-array-like');\n\nvar filter = function filter(arr, func) {\n if (!isArrayLike(arr)) {\n return arr;\n }\n\n var result = [];\n each(arr, function (value, index) {\n if (func(value, index)) {\n result.push(value);\n }\n });\n return result;\n};\n\nmodule.exports = filter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/filter.js\n// module id = 88\n// module chunks = 0 1 2","var isNil = require('../type/is-nil');\n\nvar isArray = require('../type/is-array');\n\nvar each = require('../each');\n\nmodule.exports = function valuesOfKey(data, name) {\n var rst = [];\n var tmpMap = {};\n\n for (var i = 0; i < data.length; i++) {\n var obj = data[i];\n var value = obj[name];\n\n if (!isNil(value)) {\n if (!isArray(value)) {\n value = [value];\n }\n\n each(value, function (val) {\n if (!tmpMap[val]) {\n rst.push(val);\n tmpMap[val] = true;\n }\n });\n }\n }\n\n return rst;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/array/values-of-key.js\n// module id = 89\n// module chunks = 0 1 2","/*!\n * EventEmitter v5.1.0 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n;\n\n(function (exports) {\n 'use strict';\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n\n function EventEmitter() {} // Shortcuts to improve speed and size\n\n\n var proto = EventEmitter.prototype;\n var originalGlobalValue = exports.EventEmitter;\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n\n\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n\n\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n\n var response;\n var key; // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n\n if (evt instanceof RegExp) {\n response = {};\n\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n } else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n\n\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n\n\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n function isValidListener(listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true;\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener);\n } else {\n return false;\n }\n }\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.addListener = function addListener(evt, listener) {\n if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n /**\n * Alias of addListener\n */\n\n\n proto.on = alias('addListener');\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n /**\n * Alias of addOnceListener.\n */\n\n\n proto.once = alias('addOnceListener');\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n\n return this;\n };\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n /**\n * Alias of removeListener\n */\n\n\n proto.off = alias('removeListener');\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners; // If evt is an object then pass each of its properties to this method\n\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n } else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n } else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n\n var events = this._getEvents();\n\n var key; // Remove different things depending on the state of evt\n\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n } else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n } else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n\n\n proto.removeAllListeners = alias('removeEvent');\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n\n for (i = 0; i < listeners.length; i++) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n /**\n * Alias of emitEvent\n */\n\n\n proto.trigger = alias('emitEvent');\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n\n\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n\n\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n } else {\n return true;\n }\n };\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n\n\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n\n\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n }; // Expose the class either via AMD, CommonJS or the global object\n\n\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n } else if (typeof module === 'object' && module.exports) {\n module.exports = EventEmitter;\n } else {\n exports.EventEmitter = EventEmitter;\n }\n})(this || {});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/wolfy87-eventemitter/EventEmitter.js\n// module id = 90\n// module chunks = 0 1 2","var _require = require('../../renderer'),\n Group = _require.Group;\n\nvar _require2 = require('@antv/component/lib'),\n Label = _require2.Label; // const visualCenter = require('@antv/component/lib/label/utils/visual-center');\n\n\nvar Global = require('../../global');\n\nvar Util = require('../../util');\n\nvar IGNORE_ARR = ['line', 'point', 'path'];\nvar ORIGIN = '_origin';\n\nfunction avg(arr) {\n var sum = 0;\n Util.each(arr, function (value) {\n sum += value;\n });\n return sum / arr.length;\n} // 计算多边形重心: https://en.wikipedia.org/wiki/Centroid#Of_a_polygon\n\n\nfunction getCentroid(xs, ys) {\n if (Util.isNumber(xs) && Util.isNumber(ys)) {\n return [xs, ys];\n }\n\n var i = -1,\n x = 0,\n y = 0;\n var former,\n current = xs.length - 1;\n var diff,\n k = 0;\n\n while (++i < xs.length) {\n former = current;\n current = i;\n k += diff = xs[former] * ys[current] - xs[current] * ys[former];\n x += (xs[former] + xs[current]) * diff;\n y += (ys[former] + ys[current]) * diff;\n }\n\n k *= 3;\n return [x / k, y / k];\n}\n\nvar GeomLabels = function GeomLabels(cfg) {\n GeomLabels.superclass.constructor.call(this, cfg);\n};\n\nUtil.extend(GeomLabels, Group);\nUtil.augment(GeomLabels, {\n getDefaultCfg: function getDefaultCfg() {\n return {\n label: Global.label,\n\n /**\n * 用户传入的文本配置信息\n * @type {Object}\n */\n labelCfg: null,\n\n /**\n * 所在的坐标系\n * @type {Object}\n */\n coord: null,\n\n /**\n * 图表的类型\n * @type {String}\n */\n geomType: null,\n zIndex: 6\n };\n },\n _renderUI: function _renderUI() {\n GeomLabels.superclass._renderUI.call(this);\n\n this.initLabelsCfg();\n var labelsGroup = this.addGroup();\n var lineGroup = this.addGroup({\n elCls: 'x-line-group'\n });\n var labelRenderer = this.get('labelRenderer');\n this.set('labelsGroup', labelsGroup);\n this.set('lineGroup', lineGroup);\n this.get('labelRenderer').set('group', labelsGroup);\n labelRenderer.set('group', labelsGroup);\n labelRenderer.set('lineGroup', lineGroup);\n },\n // 初始化labels的配置项\n initLabelsCfg: function initLabelsCfg() {\n var self = this;\n var labelRenderer = new Label();\n var labels = self.getDefaultLabelCfg();\n var labelCfg = self.get('labelCfg'); // Util.merge(labels, labelCfg.cfg);\n\n Util.deepMix(labels, labelCfg.globalCfg || labelCfg.cfg);\n labelRenderer.set('config', false);\n\n if (labels.labelLine) {\n labelRenderer.set('labelLine', labels.labelLine);\n }\n\n labelRenderer.set('coord', self.get('coord'));\n this.set('labelRenderer', labelRenderer);\n self.set('label', labels);\n },\n\n /**\n * @protected\n * 默认的文本样式\n * @return {Object} default label config\n */\n getDefaultLabelCfg: function getDefaultLabelCfg() {\n var self = this;\n var labelCfg = self.get('labelCfg').cfg || self.get('labelCfg').globalCfg;\n var geomType = self.get('geomType');\n var viewTheme = self.get('viewTheme') || Global;\n\n if (geomType === 'polygon' || labelCfg && labelCfg.offset < 0 && Util.indexOf(IGNORE_ARR, geomType) === -1) {\n return Util.deepMix({}, self.get('label'), viewTheme.innerLabels, labelCfg);\n }\n\n return Util.deepMix({}, self.get('label'), viewTheme.label, labelCfg);\n },\n\n /**\n * @protected\n * 获取labels\n * @param {Array} points points\n * @param {Array} shapes shapes\n * @return {Array} label items\n */\n getLabelsItems: function getLabelsItems(points, shapes) {\n var self = this;\n var items = [];\n var geom = self.get('geom');\n var coord = self.get('coord');\n\n self._getLabelCfgs(points, shapes);\n\n var labelCfg = self.get('labelItemCfgs'); // 获取label相关的x,y的值,获取具体的x,y,防止存在数组\n\n Util.each(points, function (point, i) {\n var origin = point[ORIGIN];\n var label = labelCfg[i];\n\n if (!label) {\n items.push(null);\n return;\n }\n\n if (!Util.isArray(label.text)) {\n label.text = [label.text];\n }\n\n var total = label.text.length;\n Util.each(label.text, function (sub, subIndex) {\n if (Util.isNil(sub) || sub === '') {\n items.push(null);\n return;\n }\n\n var obj = self.getLabelPoint(label, point, subIndex);\n obj = Util.mix({}, label, obj);\n\n if (!obj.textAlign) {\n obj.textAlign = self.getLabelAlign(obj, subIndex, total);\n }\n\n if (geom) {\n obj._id = geom._getShapeId(origin) + '-glabel-' + subIndex + '-' + obj.text;\n }\n\n obj.coord = coord;\n items.push(obj);\n });\n });\n return items;\n },\n\n /* /!*\n * @protected\n * 如果发生冲突则会调整文本的位置\n * @param {Array} items 文本的集合\n * @param {Array} shapes 关联形状\n * @return {Array} adjusted items\n *!/\n adjustItems(items, shapes) {\n // 多边形shape的label位于其可视中心\n if (this.get('geomType') === 'polygon') {\n let index,\n shape,\n path,\n center,\n points;\n Util.each(items, (item, i) => {\n if (!item) return;\n shape = shapes[ i ];\n path = shape.attr('path');\n points = [[]];\n index = 0;\n path.forEach((segment, i) => {\n if (segment[ 0 ] === 'z' || segment[ 0 ] === 'Z' && i !== path.length - 1) {\n points.push([]);\n index += 1;\n }\n if (segment.length === 3) {\n points[ index ].push([ segment[ 1 ], segment[ 2 ] ]);\n }\n });\n center = visualCenter(points);\n item.x = center.x;\n item.y = center.y;\n });\n }\n return items;\n }\n */\n adjustItems: function adjustItems(items) {\n Util.each(items, function (item) {\n if (!item) {\n return;\n }\n\n if (item.offsetX) {\n item.x += item.offsetX;\n }\n\n if (item.offsetY) {\n item.y += item.offsetY;\n }\n });\n return items;\n },\n\n /**\n * drawing lines to labels\n * @param {Array} items labels\n * @param {Object} labelLine configuration for label lines\n */\n drawLines: function drawLines(items) {\n var self = this;\n Util.each(items, function (point) {\n if (!point) {\n return;\n }\n\n if (point.offset > 0) {\n self.lineToLabel(point);\n }\n });\n },\n // 定义连接线\n lineToLabel: function lineToLabel() {},\n\n /**\n * @protected\n * 获取文本的位置信息\n * @param {Array} labelCfg labels\n * @param {Object} point point\n * @param {Number} index index\n * @return {Object} point\n */\n getLabelPoint: function getLabelPoint(labelCfg, point, index) {\n var self = this;\n var coord = self.get('coord');\n var total = labelCfg.text.length;\n\n function getDimValue(value, idx) {\n if (Util.isArray(value)) {\n if (labelCfg.text.length === 1) {\n // 如果仅一个label,多个y,取最后一个y\n if (value.length <= 2) {\n value = value[value.length - 1]; // value = value[0];\n } else {\n value = avg(value);\n }\n } else {\n value = value[idx];\n }\n }\n\n return value;\n }\n\n var label = {\n text: labelCfg.text[index]\n }; // 多边形场景,多用于地图\n\n if (point && this.get('geomType') === 'polygon') {\n var centroid = getCentroid(point.x, point.y); // 多边形的场景也有 x 和 y 只是数字的情况,譬如当 x 和 y 都是分类字段的时候 @see #1184\n\n label.x = centroid[0];\n label.y = centroid[1];\n } else {\n label.x = getDimValue(point.x, index);\n label.y = getDimValue(point.y, index);\n } // get nearest point of the shape as the label line start point\n\n\n if (point && point.nextPoints && (point.shape === 'funnel' || point.shape === 'pyramid')) {\n var maxX = -Infinity;\n point.nextPoints.forEach(function (p) {\n p = coord.convert(p);\n\n if (p.x > maxX) {\n maxX = p.x;\n }\n });\n label.x = (label.x + maxX) / 2;\n } // sharp edge of the pyramid\n\n\n if (point.shape === 'pyramid' && !point.nextPoints && point.points) {\n point.points.forEach(function (p) {\n p = coord.convert(p);\n\n if (Util.isArray(p.x) && !point.x.includes(p.x) || Util.isNumber(p.x) && point.x !== p.x) {\n label.x = (label.x + p.x) / 2;\n }\n });\n }\n\n if (labelCfg.position) {\n self.setLabelPosition(label, point, index, labelCfg.position);\n }\n\n var offsetPoint = self.getLabelOffset(labelCfg, index, total);\n\n if (labelCfg.offsetX) {\n offsetPoint.x += labelCfg.offsetX;\n }\n\n if (labelCfg.offsetY) {\n offsetPoint.y += labelCfg.offsetY;\n }\n\n self.transLabelPoint(label);\n label.start = {\n x: label.x,\n y: label.y\n };\n label.x += offsetPoint.x;\n label.y += offsetPoint.y;\n label.color = point.color;\n return label;\n },\n setLabelPosition: function setLabelPosition() {},\n transLabelPoint: function transLabelPoint(point) {\n var self = this;\n var coord = self.get('coord');\n var tmpPoint = coord.applyMatrix(point.x, point.y, 1);\n point.x = tmpPoint[0];\n point.y = tmpPoint[1];\n },\n getOffsetVector: function getOffsetVector(point) {\n var self = this;\n var offset = point.offset || 0;\n var coord = self.get('coord');\n var vector;\n\n if (coord.isTransposed) {\n // 如果x,y翻转,则偏移x\n vector = coord.applyMatrix(offset, 0);\n } else {\n // 否则,偏转y\n vector = coord.applyMatrix(0, offset);\n }\n\n return vector;\n },\n // 获取默认的偏移量\n getDefaultOffset: function getDefaultOffset(point) {\n var self = this;\n var offset = 0;\n var coord = self.get('coord');\n var vector = self.getOffsetVector(point);\n\n if (coord.isTransposed) {\n // 如果x,y翻转,则偏移x\n offset = vector[0];\n } else {\n // 否则,偏转y\n offset = vector[1];\n }\n\n var yScale = this.get('yScale');\n\n if (yScale && point.point) {\n // 仅考虑 y 单值的情况,多值的情况在这里不考虑\n var yValue = point.point[yScale.field];\n\n if (yValue < 0) {\n offset = offset * -1; // 如果 y 值是负值,则反向\n }\n }\n\n return offset;\n },\n // 获取文本的偏移位置,x,y\n getLabelOffset: function getLabelOffset(point, index, total) {\n var self = this;\n var offset = self.getDefaultOffset(point);\n var coord = self.get('coord');\n var transposed = coord.isTransposed;\n var yField = transposed ? 'x' : 'y';\n var factor = transposed ? 1 : -1; // y 方向上越大,像素的坐标越小,所以transposed时将系数变成\n\n var offsetPoint = {\n x: 0,\n y: 0\n };\n\n if (index > 0 || total === 1) {\n // 判断是否小于0\n offsetPoint[yField] = offset * factor;\n } else {\n offsetPoint[yField] = offset * factor * -1;\n }\n\n return offsetPoint;\n },\n getLabelAlign: function getLabelAlign(point, index, total) {\n var self = this;\n var align = 'center';\n var coord = self.get('coord');\n\n if (coord.isTransposed) {\n var offset = self.getDefaultOffset(point); // var vector = coord.applyMatrix(offset,0);\n\n if (offset < 0) {\n align = 'right';\n } else if (offset === 0) {\n align = 'center';\n } else {\n align = 'left';\n }\n\n if (total > 1 && index === 0) {\n if (align === 'right') {\n align = 'left';\n } else if (align === 'left') {\n align = 'right';\n }\n }\n }\n\n return align;\n },\n _getLabelValue: function _getLabelValue(origin, scales) {\n if (!Util.isArray(scales)) {\n scales = [scales];\n }\n\n var text = [];\n Util.each(scales, function (scale) {\n var value = origin[scale.field];\n\n if (Util.isArray(value)) {\n var tmp = [];\n Util.each(value, function (subVal) {\n tmp.push(scale.getText(subVal));\n });\n value = tmp;\n } else {\n value = scale.getText(value);\n }\n\n if (Util.isNil(value) || value === '') {\n text.push(null);\n }\n\n text.push(value);\n });\n return text;\n },\n // 获取每个label的配置\n _getLabelCfgs: function _getLabelCfgs(points) {\n var self = this;\n var labelCfg = this.get('labelCfg');\n var scales = labelCfg.scales;\n var defaultCfg = this.get('label');\n var viewTheme = self.get('viewTheme') || Global;\n var cfgs = [];\n\n if (labelCfg.globalCfg && labelCfg.globalCfg.type) {\n self.set('type', labelCfg.globalCfg.type);\n }\n\n Util.each(points, function (point, i) {\n var cfg = {};\n var origin = point[ORIGIN];\n\n var originText = self._getLabelValue(origin, scales);\n\n if (labelCfg.callback) {\n // callback中应使用原始数据,而不是数据字符串\n var originValues = scales.map(function (scale) {\n return origin[scale.field];\n }); // 将point信息以及index信息也返回,方便能够根据point以及index,返回不同的配置\n\n cfg = labelCfg.callback.apply(null, [].concat(originValues, [point, i]));\n }\n\n if (!cfg && cfg !== 0) {\n cfgs.push(null);\n return;\n }\n\n if (Util.isString(cfg) || Util.isNumber(cfg)) {\n cfg = {\n text: cfg\n };\n } else {\n cfg.text = cfg.content || originText[0];\n delete cfg.content;\n }\n\n cfg = Util.mix({}, defaultCfg, labelCfg.globalCfg || {}, cfg); // 兼容旧的源数据写在item.point中\n\n point.point = origin;\n cfg.point = origin;\n\n if (cfg.htmlTemplate) {\n cfg.useHtml = true;\n cfg.text = cfg.htmlTemplate.call(null, cfg.text, point, i);\n delete cfg.htmlTemplate;\n }\n\n if (cfg.formatter) {\n cfg.text = cfg.formatter.call(null, cfg.text, point, i);\n delete cfg.formatter;\n }\n\n if (cfg.label) {\n // 兼容有些直接写在labelCfg.label的配置\n var label = cfg.label;\n delete cfg.label;\n cfg = Util.mix(cfg, label);\n }\n\n if (cfg.textStyle) {\n // 兼容旧写法,globalCfg的offset优先级高\n delete cfg.textStyle.offset;\n var textStyle = cfg.textStyle;\n\n if (Util.isFunction(textStyle)) {\n cfg.textStyle = textStyle.call(null, cfg.text, point, i);\n }\n }\n\n if (cfg.labelLine) {\n cfg.labelLine = Util.mix({}, defaultCfg.labelLine, cfg.labelLine);\n } // 因为 defaultCfg.textStyle 有可能是函数,所以这里可能没有把主题的 label 样式合进来\n\n\n cfg.textStyle = Util.mix({}, defaultCfg.textStyle, viewTheme.label.textStyle, cfg.textStyle);\n delete cfg.items;\n cfgs.push(cfg);\n });\n this.set('labelItemCfgs', cfgs);\n },\n showLabels: function showLabels(points, shapes) {\n var self = this;\n var labelRenderer = self.get('labelRenderer');\n var items = self.getLabelsItems(points, shapes);\n shapes = [].concat(shapes);\n var type = self.get('type');\n items = self.adjustItems(items, shapes);\n self.drawLines(items);\n labelRenderer.set('items', items.filter(function (item, i) {\n if (!item) {\n shapes.splice(i, 1);\n return false;\n }\n\n return true;\n }));\n\n if (type) {\n labelRenderer.set('shapes', shapes);\n labelRenderer.set('type', type);\n labelRenderer.set('points', points);\n }\n\n labelRenderer.set('canvas', this.get('canvas'));\n labelRenderer.draw();\n },\n destroy: function destroy() {\n this.get('labelRenderer').destroy(); // 清理文本\n\n GeomLabels.superclass.destroy.call(this);\n }\n}); // Util.assign(GeomLabels.prototype, Labels.LabelslabelRenderer);\n\nmodule.exports = GeomLabels;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/geom/label/geom-labels.js\n// module id = 91\n// module chunks = 0 1 2","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n/**\n * @fileOverview Chart、View、Geometry 的基类\n * @author dxq613@gmail.com\n */\n\n\nvar EventEmitter = require('wolfy87-eventemitter');\n\nvar Util = require('./util');\n\nvar Base = /*#__PURE__*/function (_EventEmitter) {\n _inheritsLoose(Base, _EventEmitter);\n\n var _proto = Base.prototype;\n\n _proto.getDefaultCfg = function getDefaultCfg() {\n return {};\n };\n\n function Base(cfg) {\n var _this;\n\n _this = _EventEmitter.call(this) || this;\n\n var self = _assertThisInitialized(_this);\n\n var attrs = {\n visible: true\n };\n var defaultCfg = self.getDefaultCfg();\n self._attrs = attrs;\n Util.deepMix(attrs, defaultCfg, cfg);\n return _this;\n }\n\n _proto.get = function get(name) {\n return this._attrs[name];\n };\n\n _proto.set = function set(name, value) {\n this._attrs[name] = value;\n }\n /**\n * @protected\n * @param {Boolean} visible 是否可见\n * 显示、隐藏\n */\n ;\n\n _proto.changeVisible = function changeVisible() {};\n\n _proto.destroy = function destroy() {\n var self = this;\n self._attrs = {};\n self.removeAllListeners();\n self.destroyed = true;\n };\n\n return Base;\n}(EventEmitter);\n\nmodule.exports = Base;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/base.js\n// module id = 92\n// module chunks = 0 1 2","var Line = require('../math/line');\n\nvar Quadratic = require('../math/quadratic');\n\nvar Cubic = require('../math/cubic');\n\nvar Arc = require('../math/arc');\n\nmodule.exports = {\n line: function line(x1, y1, x2, y2, lineWidth, x, y) {\n var box = Line.box(x1, y1, x2, y2, lineWidth);\n\n if (!this.box(box.minX, box.maxX, box.minY, box.maxY, x, y)) {\n return false;\n }\n\n var d = Line.pointDistance(x1, y1, x2, y2, x, y);\n\n if (isNaN(d)) {\n return false;\n }\n\n return d <= lineWidth / 2;\n },\n polyline: function polyline(points, lineWidth, x, y) {\n var l = points.length - 1;\n\n if (l < 1) {\n return false;\n }\n\n for (var i = 0; i < l; i++) {\n var x1 = points[i][0];\n var y1 = points[i][1];\n var x2 = points[i + 1][0];\n var y2 = points[i + 1][1];\n\n if (this.line(x1, y1, x2, y2, lineWidth, x, y)) {\n return true;\n }\n }\n\n return false;\n },\n cubicline: function cubicline(x1, y1, x2, y2, x3, y3, x4, y4, lineWidth, x, y) {\n return Cubic.pointDistance(x1, y1, x2, y2, x3, y3, x4, y4, x, y) <= lineWidth / 2;\n },\n quadraticline: function quadraticline(x1, y1, x2, y2, x3, y3, lineWidth, x, y) {\n return Quadratic.pointDistance(x1, y1, x2, y2, x3, y3, x, y) <= lineWidth / 2;\n },\n arcline: function arcline(cx, cy, r, startAngle, endAngle, clockwise, lineWidth, x, y) {\n return Arc.pointDistance(cx, cy, r, startAngle, endAngle, clockwise, x, y) <= lineWidth / 2;\n },\n rect: function rect(rx, ry, width, height, x, y) {\n return rx <= x && x <= rx + width && ry <= y && y <= ry + height;\n },\n circle: function circle(cx, cy, r, x, y) {\n return Math.pow(x - cx, 2) + Math.pow(y - cy, 2) <= Math.pow(r, 2);\n },\n box: function box(minX, maxX, minY, maxY, x, y) {\n return minX <= x && x <= maxX && minY <= y && y <= maxY;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/util/inside.js\n// module id = 93\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nvar vec2 = Util.vec2;\n\nfunction cubicAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return onet * onet * (onet * p3 + 3 * t * p2) + t * t * (t * p0 + 3 * onet * p1);\n}\n\nfunction cubicDerivativeAt(p0, p1, p2, p3, t) {\n var onet = 1 - t;\n return 3 * (((p1 - p0) * onet + 2 * (p2 - p1) * t) * onet + (p3 - p2) * t * t);\n}\n\nfunction cubicProjectPoint(x1, y1, x2, y2, x3, y3, x4, y4, x, y, out) {\n var t;\n var interval = 0.005;\n var d = Infinity;\n\n var _t;\n\n var v1;\n var d1;\n var d2;\n var v2;\n var prev;\n var next;\n var EPSILON = 0.0001;\n var v0 = [x, y];\n\n for (_t = 0; _t < 1; _t += 0.05) {\n v1 = [cubicAt(x1, x2, x3, x4, _t), cubicAt(y1, y2, y3, y4, _t)];\n d1 = vec2.squaredDistance(v0, v1);\n\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n\n d = Infinity;\n\n for (var i = 0; i < 32; i++) {\n if (interval < EPSILON) {\n break;\n }\n\n prev = t - interval;\n next = t + interval;\n v1 = [cubicAt(x1, x2, x3, x4, prev), cubicAt(y1, y2, y3, y4, prev)];\n d1 = vec2.squaredDistance(v0, v1);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n v2 = [cubicAt(x1, x2, x3, x4, next), cubicAt(y1, y2, y3, y4, next)];\n d2 = vec2.squaredDistance(v0, v2);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n }\n\n if (out) {\n out.x = cubicAt(x1, x2, x3, x4, t);\n out.y = cubicAt(y1, y2, y3, y4, t);\n }\n\n return Math.sqrt(d);\n}\n\nfunction cubicExtrema(p0, p1, p2, p3) {\n var a = 3 * p0 - 9 * p1 + 9 * p2 - 3 * p3;\n var b = 6 * p1 - 12 * p2 + 6 * p3;\n var c = 3 * p2 - 3 * p3;\n var extrema = [];\n var t1;\n var t2;\n var discSqrt;\n\n if (Util.isNumberEqual(a, 0)) {\n if (!Util.isNumberEqual(b, 0)) {\n t1 = -c / b;\n\n if (t1 >= 0 && t1 <= 1) {\n extrema.push(t1);\n }\n }\n } else {\n var disc = b * b - 4 * a * c;\n\n if (Util.isNumberEqual(disc, 0)) {\n extrema.push(-b / (2 * a));\n } else if (disc > 0) {\n discSqrt = Math.sqrt(disc);\n t1 = (-b + discSqrt) / (2 * a);\n t2 = (-b - discSqrt) / (2 * a);\n\n if (t1 >= 0 && t1 <= 1) {\n extrema.push(t1);\n }\n\n if (t2 >= 0 && t2 <= 1) {\n extrema.push(t2);\n }\n }\n }\n\n return extrema;\n}\n\nfunction base3(t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;\n var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n}\n\nfunction cubiclLen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (Util.isNil(z)) {\n z = 1;\n }\n\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816];\n var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472];\n var sum = 0;\n\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2;\n var xbase = base3(ct, x1, x2, x3, x4);\n var ybase = base3(ct, y1, y2, y3, y4);\n var comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n\n return z2 * sum;\n}\n\nmodule.exports = {\n at: cubicAt,\n derivativeAt: cubicDerivativeAt,\n projectPoint: function projectPoint(x1, y1, x2, y2, x3, y3, x4, y4, x, y) {\n var rst = {};\n cubicProjectPoint(x1, y1, x2, y2, x3, y3, x4, y4, x, y, rst);\n return rst;\n },\n pointDistance: cubicProjectPoint,\n extrema: cubicExtrema,\n len: cubiclLen\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/math/cubic.js\n// module id = 94\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Format = require('../util/format');\n\nvar PathSegment = require('./util/path-segment');\n\nvar Marker = function Marker(cfg) {\n Marker.superclass.constructor.call(this, cfg);\n};\n\nMarker.Symbols = {\n // 圆\n circle: function circle(x, y, r) {\n return [['M', x, y], ['m', -r, 0], ['a', r, r, 0, 1, 0, r * 2, 0], ['a', r, r, 0, 1, 0, -r * 2, 0]];\n },\n // 正方形\n square: function square(x, y, r) {\n return [['M', x - r, y - r], ['L', x + r, y - r], ['L', x + r, y + r], ['L', x - r, y + r], ['Z']];\n },\n // 菱形\n diamond: function diamond(x, y, r) {\n return [['M', x - r, y], ['L', x, y - r], ['L', x + r, y], ['L', x, y + r], ['Z']];\n },\n // 三角形\n triangle: function triangle(x, y, r) {\n var diffY = r * Math.sin(1 / 3 * Math.PI);\n return [['M', x - r, y + diffY], ['L', x, y - diffY], ['L', x + r, y + diffY], ['z']];\n },\n // 倒三角形\n 'triangle-down': function triangleDown(x, y, r) {\n var diffY = r * Math.sin(1 / 3 * Math.PI);\n return [['M', x - r, y - diffY], ['L', x + r, y - diffY], ['L', x, y + diffY], ['Z']];\n }\n};\nMarker.ATTRS = {\n path: null,\n lineWidth: 1\n};\nUtil.extend(Marker, Shape);\nUtil.augment(Marker, {\n type: 'marker',\n canFill: true,\n canStroke: true,\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n x: 0,\n y: 0,\n lineWidth: 1\n };\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.radius;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2 + r;\n return {\n minX: cx - halfWidth,\n minY: cy - halfWidth,\n maxX: cx + halfWidth,\n maxY: cy + halfWidth\n };\n },\n _getPath: function _getPath() {\n var attrs = this._attrs;\n var x = attrs.x;\n var y = attrs.y;\n var r = attrs.radius || attrs.r;\n var symbol = attrs.symbol || 'circle';\n var method;\n\n if (Util.isFunction(symbol)) {\n method = symbol;\n } else {\n method = Marker.Symbols[symbol];\n }\n\n if (!method) {\n console.warn(symbol + \" marker is not supported.\");\n return null;\n }\n\n return method(x, y, r);\n },\n createPath: function createPath(context) {\n var segments = this._cfg.segments;\n\n if (segments && !this._cfg.hasUpdate) {\n context.beginPath();\n\n for (var i = 0; i < segments.length; i++) {\n segments[i].draw(context);\n }\n\n return;\n }\n\n var path = Format.parsePath(this._getPath());\n context.beginPath();\n var preSegment;\n segments = [];\n\n for (var _i = 0; _i < path.length; _i++) {\n var item = path[_i];\n preSegment = new PathSegment(item, preSegment, _i === path.length - 1);\n segments.push(preSegment);\n preSegment.draw(context);\n }\n\n this._cfg.segments = segments;\n this._cfg.hasUpdate = false;\n }\n});\nmodule.exports = Marker;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/shapes/marker.js\n// module id = 95\n// module chunks = 0 1 2","var Util = require('./common');\n\nvar SPACES = \"\\t\\n\\x0B\\f\\r \\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\";\nvar PATH_COMMAND = new RegExp('([a-z])[' + SPACES + ',]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[' + SPACES + ']*,?[' + SPACES + ']*)+)', 'ig');\nvar PATH_VALUES = new RegExp('(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[' + SPACES + ']*,?[' + SPACES + ']*', 'ig'); // Parses given path string into an array of arrays of path segments\n\nvar parsePathString = function parsePathString(pathString) {\n if (!pathString) {\n return null;\n }\n\n if (typeof pathString === typeof []) {\n return pathString;\n }\n\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n\n if (name === 'r') {\n data.push([b].concat(params));\n } else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n });\n return data;\n}; // http://schepers.cc/getting-to-the-point\n\n\nvar catmullRom2bezier = function catmullRom2bezier(crp, z) {\n var d = [];\n\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\n var p = [{\n x: +crp[i - 2],\n y: +crp[i - 1]\n }, {\n x: +crp[i],\n y: +crp[i + 1]\n }, {\n x: +crp[i + 2],\n y: +crp[i + 3]\n }, {\n x: +crp[i + 4],\n y: +crp[i + 5]\n }];\n\n if (z) {\n if (!i) {\n p[0] = {\n x: +crp[iLen - 2],\n y: +crp[iLen - 1]\n };\n } else if (iLen - 4 === i) {\n p[3] = {\n x: +crp[0],\n y: +crp[1]\n };\n } else if (iLen - 2 === i) {\n p[2] = {\n x: +crp[0],\n y: +crp[1]\n };\n p[3] = {\n x: +crp[2],\n y: +crp[3]\n };\n }\n } else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n } else if (!i) {\n p[0] = {\n x: +crp[i],\n y: +crp[i + 1]\n };\n }\n }\n\n d.push(['C', (-p[0].x + 6 * p[1].x + p[2].x) / 6, (-p[0].y + 6 * p[1].y + p[2].y) / 6, (p[1].x + 6 * p[2].x - p[3].x) / 6, (p[1].y + 6 * p[2].y - p[3].y) / 6, p[2].x, p[2].y]);\n }\n\n return d;\n};\n\nvar ellipsePath = function ellipsePath(x, y, rx, ry, a) {\n var res = [];\n\n if (a === null && ry === null) {\n ry = rx;\n }\n\n x = +x;\n y = +y;\n rx = +rx;\n ry = +ry;\n\n if (a !== null) {\n var rad = Math.PI / 180;\n var x1 = x + rx * Math.cos(-ry * rad);\n var x2 = x + rx * Math.cos(-a * rad);\n var y1 = y + rx * Math.sin(-ry * rad);\n var y2 = y + rx * Math.sin(-a * rad);\n res = [['M', x1, y1], ['A', rx, rx, 0, +(a - ry > 180), 0, x2, y2]];\n } else {\n res = [['M', x, y], ['m', 0, -ry], ['a', rx, ry, 0, 1, 1, 0, 2 * ry], ['a', rx, ry, 0, 1, 1, 0, -2 * ry], ['z']];\n }\n\n return res;\n};\n\nvar pathToAbsolute = function pathToAbsolute(pathArray) {\n pathArray = parsePathString(pathArray);\n\n if (!pathArray || !pathArray.length) {\n return [['M', 0, 0]];\n }\n\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0;\n var dots;\n\n if (pathArray[0][0] === 'M') {\n x = +pathArray[0][1];\n y = +pathArray[0][2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n\n var crz = pathArray.length === 3 && pathArray[0][0] === 'M' && pathArray[1][0].toUpperCase() === 'R' && pathArray[2][0].toUpperCase() === 'Z';\n\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\n res.push(r = []);\n pa = pathArray[i];\n pa0 = pa[0];\n\n if (pa0 !== pa0.toUpperCase()) {\n r[0] = pa0.toUpperCase();\n\n switch (r[0]) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n\n case 'V':\n r[1] = +pa[1] + y;\n break;\n\n case 'H':\n r[1] = +pa[1] + x;\n break;\n\n case 'R':\n dots = [x, y].concat(pa.slice(1));\n\n for (var j = 2, jj = dots.length; j < jj; j++) {\n dots[j] = +dots[j] + x;\n dots[++j] = +dots[j] + y;\n }\n\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n break;\n\n case 'O':\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n break;\n\n case 'U':\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n break;\n\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n break;\n // for lint\n\n default:\n for (var _j = 1, _jj = pa.length; _j < _jj; _j++) {\n r[_j] = +pa[_j] + (_j % 2 ? x : y);\n }\n\n }\n } else if (pa0 === 'R') {\n dots = [x, y].concat(pa.slice(1));\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n r = ['R'].concat(pa.slice(-2));\n } else if (pa0 === 'O') {\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n } else if (pa0 === 'U') {\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n } else {\n for (var k = 0, kk = pa.length; k < kk; k++) {\n r[k] = pa[k];\n }\n }\n\n pa0 = pa0.toUpperCase();\n\n if (pa0 !== 'O') {\n switch (r[0]) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n\n case 'H':\n x = r[1];\n break;\n\n case 'V':\n y = r[1];\n break;\n\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break;\n // for lint\n\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n }\n }\n\n return res;\n};\n\nvar l2c = function l2c(x1, y1, x2, y2) {\n return [x1, y1, x2, y2, x2, y2];\n};\n\nvar q2c = function q2c(x1, y1, ax, ay, x2, y2) {\n var _13 = 1 / 3;\n\n var _23 = 2 / 3;\n\n return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2];\n};\n\nvar a2c = function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\n // for more information of where this math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n if (rx === ry) {\n rx += 1;\n }\n\n var _120 = Math.PI * 120 / 180;\n\n var rad = Math.PI / 180 * (+angle || 0);\n var res = [];\n var xy;\n var f1;\n var f2;\n var cx;\n var cy;\n\n var rotate = function rotate(x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return {\n x: X,\n y: Y\n };\n };\n\n if (!recursive) {\n xy = rotate(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotate(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n\n if (x1 === x2 && y1 === y2) {\n // 若弧的起始点和终点重叠则错开一点\n x2 += 1;\n y2 += 1;\n } // const cos = Math.cos(Math.PI / 180 * angle);\n // const sin = Math.sin(Math.PI / 180 * angle);\n\n\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = x * x / (rx * rx) + y * y / (ry * ry);\n\n if (h > 1) {\n h = Math.sqrt(h);\n rx = h * rx;\n ry = h * ry;\n }\n\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (large_arc_flag === sweep_flag ? -1 : 1) * Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = k * rx * y / ry + (x1 + x2) / 2;\n cy = k * -ry * x / rx + (y1 + y2) / 2;\n f1 = Math.asin(((y1 - cy) / ry).toFixed(9));\n f2 = Math.asin(((y2 - cy) / ry).toFixed(9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n f1 < 0 && (f1 = Math.PI * 2 + f1);\n f2 < 0 && (f2 = Math.PI * 2 + f2);\n\n if (sweep_flag && f1 > f2) {\n f1 = f1 - Math.PI * 2;\n }\n\n if (!sweep_flag && f2 > f1) {\n f2 = f2 - Math.PI * 2;\n }\n } else {\n f1 = recursive[0];\n f2 = recursive[1];\n cx = recursive[2];\n cy = recursive[3];\n }\n\n var df = f2 - f1;\n\n if (Math.abs(df) > _120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\n }\n\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = 4 / 3 * rx * t;\n var hy = 4 / 3 * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n\n if (recursive) {\n return [m2, m3, m4].concat(res);\n }\n\n res = [m2, m3, m4].concat(res).join().split(',');\n var newres = [];\n\n for (var i = 0, ii = res.length; i < ii; i++) {\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\n }\n\n return newres;\n};\n\nvar pathTocurve = function pathTocurve(path, path2) {\n var p = pathToAbsolute(path);\n var p2 = path2 && pathToAbsolute(path2);\n var attrs = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null\n };\n var attrs2 = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null\n };\n var pcoms1 = []; // path commands of original path p\n\n var pcoms2 = []; // path commands of original path p2\n\n var pfirst = ''; // temporary holder for original path command\n\n var pcom = ''; // holder for previous path command of original path\n\n var ii;\n\n var processPath = function processPath(path, d, pcom) {\n var nx, ny;\n\n if (!path) {\n return ['C', d.x, d.y, d.x, d.y, d.x, d.y];\n }\n\n !(path[0] in {\n T: 1,\n Q: 1\n }) && (d.qx = d.qy = null);\n\n switch (path[0]) {\n case 'M':\n d.X = path[1];\n d.Y = path[2];\n break;\n\n case 'A':\n path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));\n break;\n\n case 'S':\n if (pcom === 'C' || pcom === 'S') {\n // In \"S\" case we have to take into account, if the previous command is C/S.\n nx = d.x * 2 - d.bx; // And reflect the previous\n\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\n } else {\n // or some else or nothing\n nx = d.x;\n ny = d.y;\n }\n\n path = ['C', nx, ny].concat(path.slice(1));\n break;\n\n case 'T':\n if (pcom === 'Q' || pcom === 'T') {\n // In \"T\" case we have to take into account, if the previous command is Q/T.\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\n\n d.qy = d.y * 2 - d.qy; // to case \"S\".\n } else {\n // or something else or nothing\n d.qx = d.x;\n d.qy = d.y;\n }\n\n path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\n break;\n\n case 'Q':\n d.qx = path[1];\n d.qy = path[2];\n path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\n break;\n\n case 'L':\n path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));\n break;\n\n case 'H':\n path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));\n break;\n\n case 'V':\n path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));\n break;\n\n case 'Z':\n path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));\n break;\n\n default:\n break;\n }\n\n return path;\n };\n\n var fixArc = function fixArc(pp, i) {\n if (pp[i].length > 7) {\n pp[i].shift();\n var pi = pp[i];\n\n while (pi.length) {\n pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved\n\n p2 && (pcoms2[i] = 'A'); // the same as above\n\n pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));\n }\n\n pp.splice(i, 1);\n ii = Math.max(p.length, p2 && p2.length || 0);\n }\n };\n\n var fixM = function fixM(path1, path2, a1, a2, i) {\n if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {\n path2.splice(i, 0, ['M', a2.x, a2.y]);\n a1.bx = 0;\n a1.by = 0;\n a1.x = path1[i][1];\n a1.y = path1[i][2];\n ii = Math.max(p.length, p2 && p2.length || 0);\n }\n };\n\n ii = Math.max(p.length, p2 && p2.length || 0);\n\n for (var i = 0; i < ii; i++) {\n p[i] && (pfirst = p[i][0]); // save current path command\n\n if (pfirst !== 'C') {\n // C is not saved yet, because it may be result of conversion\n pcoms1[i] = pfirst; // Save current path command\n\n i && (pcom = pcoms1[i - 1]); // Get previous path command pcom\n }\n\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\n\n if (pcoms1[i] !== 'A' && pfirst === 'C') pcoms1[i] = 'C'; // A is the only command\n // which may produce multiple C:s\n // so we have to make sure that C is also C in original path\n\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\n\n if (p2) {\n // the same procedures is done to p2\n p2[i] && (pfirst = p2[i][0]);\n\n if (pfirst !== 'C') {\n pcoms2[i] = pfirst;\n i && (pcom = pcoms2[i - 1]);\n }\n\n p2[i] = processPath(p2[i], attrs2, pcom);\n\n if (pcoms2[i] !== 'A' && pfirst === 'C') {\n pcoms2[i] = 'C';\n }\n\n fixArc(p2, i);\n }\n\n fixM(p, p2, attrs, attrs2, i);\n fixM(p2, p, attrs2, attrs, i);\n var seg = p[i];\n var seg2 = p2 && p2[i];\n var seglen = seg.length;\n var seg2len = p2 && seg2.length;\n attrs.x = seg[seglen - 2];\n attrs.y = seg[seglen - 1];\n attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;\n attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;\n attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);\n attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);\n attrs2.x = p2 && seg2[seg2len - 2];\n attrs2.y = p2 && seg2[seg2len - 1];\n }\n\n return p2 ? [p, p2] : p;\n};\n\nvar p2s = /,?([a-z]),?/gi;\n\nvar parsePathArray = function parsePathArray(path) {\n return path.join(',').replace(p2s, '$1');\n};\n\nvar base3 = function base3(t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4;\n var t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n};\n\nvar bezlen = function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (z === null) {\n z = 1;\n }\n\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [-0.1252, 0.1252, -0.3678, 0.3678, -0.5873, 0.5873, -0.7699, 0.7699, -0.9041, 0.9041, -0.9816, 0.9816];\n var Cvalues = [0.2491, 0.2491, 0.2335, 0.2335, 0.2032, 0.2032, 0.1601, 0.1601, 0.1069, 0.1069, 0.0472, 0.0472];\n var sum = 0;\n\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2;\n var xbase = base3(ct, x1, x2, x3, x4);\n var ybase = base3(ct, y1, y2, y3, y4);\n var comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n\n return z2 * sum;\n};\n\nvar curveDim = function curveDim(x0, y0, x1, y1, x2, y2, x3, y3) {\n var tvalues = [];\n var bounds = [[], []];\n var a;\n var b;\n var c;\n var t;\n\n for (var i = 0; i < 2; ++i) {\n if (i === 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) < 1e-12) {\n continue;\n }\n\n t = -c / b;\n\n if (t > 0 && t < 1) {\n tvalues.push(t);\n }\n\n continue;\n }\n\n var b2ac = b * b - 4 * c * a;\n var sqrtb2ac = Math.sqrt(b2ac);\n\n if (b2ac < 0) {\n continue;\n }\n\n var t1 = (-b + sqrtb2ac) / (2 * a);\n\n if (t1 > 0 && t1 < 1) {\n tvalues.push(t1);\n }\n\n var t2 = (-b - sqrtb2ac) / (2 * a);\n\n if (t2 > 0 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n\n var j = tvalues.length;\n var jlen = j;\n var mt;\n\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n return {\n min: {\n x: Math.min.apply(0, bounds[0]),\n y: Math.min.apply(0, bounds[1])\n },\n max: {\n x: Math.max.apply(0, bounds[0]),\n y: Math.max.apply(0, bounds[1])\n }\n };\n};\n\nvar intersect = function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\n if (Math.max(x1, x2) < Math.min(x3, x4) || Math.min(x1, x2) > Math.max(x3, x4) || Math.max(y1, y2) < Math.min(y3, y4) || Math.min(y1, y2) > Math.max(y3, y4)) {\n return;\n }\n\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4);\n var ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4);\n var denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n\n if (!denominator) {\n return;\n }\n\n var px = nx / denominator;\n var py = ny / denominator;\n var px2 = +px.toFixed(2);\n var py2 = +py.toFixed(2);\n\n if (px2 < +Math.min(x1, x2).toFixed(2) || px2 > +Math.max(x1, x2).toFixed(2) || px2 < +Math.min(x3, x4).toFixed(2) || px2 > +Math.max(x3, x4).toFixed(2) || py2 < +Math.min(y1, y2).toFixed(2) || py2 > +Math.max(y1, y2).toFixed(2) || py2 < +Math.min(y3, y4).toFixed(2) || py2 > +Math.max(y3, y4).toFixed(2)) {\n return;\n }\n\n return {\n x: px,\n y: py\n };\n};\n\nvar isPointInsideBBox = function isPointInsideBBox(bbox, x, y) {\n return x >= bbox.x && x <= bbox.x + bbox.width && y >= bbox.y && y <= bbox.y + bbox.height;\n};\n\nvar rectPath = function rectPath(x, y, w, h, r) {\n if (r) {\n return [['M', +x + +r, y], ['l', w - r * 2, 0], ['a', r, r, 0, 0, 1, r, r], ['l', 0, h - r * 2], ['a', r, r, 0, 0, 1, -r, r], ['l', r * 2 - w, 0], ['a', r, r, 0, 0, 1, -r, -r], ['l', 0, r * 2 - h], ['a', r, r, 0, 0, 1, r, -r], ['z']];\n }\n\n var res = [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']];\n res.parsePathArray = parsePathArray;\n return res;\n};\n\nvar box = function box(x, y, width, height) {\n if (x === null) {\n x = y = width = height = 0;\n }\n\n if (y === null) {\n y = x.y;\n width = x.width;\n height = x.height;\n x = x.x;\n }\n\n return {\n x: x,\n y: y,\n width: width,\n w: width,\n height: height,\n h: height,\n x2: x + width,\n y2: y + height,\n cx: x + width / 2,\n cy: y + height / 2,\n r1: Math.min(width, height) / 2,\n r2: Math.max(width, height) / 2,\n r0: Math.sqrt(width * width + height * height) / 2,\n path: rectPath(x, y, width, height),\n vb: [x, y, width, height].join(' ')\n };\n};\n\nvar isBBoxIntersect = function isBBoxIntersect(bbox1, bbox2) {\n bbox1 = box(bbox1);\n bbox2 = box(bbox2);\n return isPointInsideBBox(bbox2, bbox1.x, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y) || isPointInsideBBox(bbox2, bbox1.x, bbox1.y2) || isPointInsideBBox(bbox2, bbox1.x2, bbox1.y2) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y) || isPointInsideBBox(bbox1, bbox2.x, bbox2.y2) || isPointInsideBBox(bbox1, bbox2.x2, bbox2.y2) || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x) && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);\n};\n\nvar bezierBBox = function bezierBBox(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\n if (!Util.isArray(p1x)) {\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\n }\n\n var bbox = curveDim.apply(null, p1x);\n return box(bbox.min.x, bbox.min.y, bbox.max.x - bbox.min.x, bbox.max.y - bbox.min.y);\n};\n\nvar findDotsAtSegment = function findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n var t1 = 1 - t;\n var t13 = Math.pow(t1, 3);\n var t12 = Math.pow(t1, 2);\n var t2 = t * t;\n var t3 = t2 * t;\n var x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x;\n var y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y;\n var mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x);\n var my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y);\n var nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x);\n var ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y);\n var ax = t1 * p1x + t * c1x;\n var ay = t1 * p1y + t * c1y;\n var cx = t1 * c2x + t * p2x;\n var cy = t1 * c2y + t * p2y;\n var alpha = 90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI; // (mx > nx || my < ny) && (alpha += 180);\n\n return {\n x: x,\n y: y,\n m: {\n x: mx,\n y: my\n },\n n: {\n x: nx,\n y: ny\n },\n start: {\n x: ax,\n y: ay\n },\n end: {\n x: cx,\n y: cy\n },\n alpha: alpha\n };\n};\n\nvar interHelper = function interHelper(bez1, bez2, justCount) {\n var bbox1 = bezierBBox(bez1);\n var bbox2 = bezierBBox(bez2);\n\n if (!isBBoxIntersect(bbox1, bbox2)) {\n return justCount ? 0 : [];\n }\n\n var l1 = bezlen.apply(0, bez1);\n var l2 = bezlen.apply(0, bez2);\n var n1 = ~~(l1 / 8);\n var n2 = ~~(l2 / 8);\n var dots1 = [];\n var dots2 = [];\n var xy = {};\n var res = justCount ? 0 : [];\n\n for (var i = 0; i < n1 + 1; i++) {\n var d = findDotsAtSegment.apply(0, bez1.concat(i / n1));\n dots1.push({\n x: d.x,\n y: d.y,\n t: i / n1\n });\n }\n\n for (var _i = 0; _i < n2 + 1; _i++) {\n var _d = findDotsAtSegment.apply(0, bez2.concat(_i / n2));\n\n dots2.push({\n x: _d.x,\n y: _d.y,\n t: _i / n2\n });\n }\n\n for (var _i2 = 0; _i2 < n1; _i2++) {\n for (var j = 0; j < n2; j++) {\n var di = dots1[_i2];\n var di1 = dots1[_i2 + 1];\n var dj = dots2[j];\n var dj1 = dots2[j + 1];\n var ci = Math.abs(di1.x - di.x) < 0.001 ? 'y' : 'x';\n var cj = Math.abs(dj1.x - dj.x) < 0.001 ? 'y' : 'x';\n var is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\n\n if (is) {\n if (xy[is.x.toFixed(4)] === is.y.toFixed(4)) {\n continue;\n }\n\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\n var t1 = di.t + Math.abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t);\n var t2 = dj.t + Math.abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\n\n if (t1 >= 0 && t1 <= 1 && t2 >= 0 && t2 <= 1) {\n if (justCount) {\n res++;\n } else {\n res.push({\n x: is.x,\n y: is.y,\n t1: t1,\n t2: t2\n });\n }\n }\n }\n }\n }\n\n return res;\n};\n\nvar interPathHelper = function interPathHelper(path1, path2, justCount) {\n path1 = pathTocurve(path1);\n path2 = pathTocurve(path2);\n var x1;\n var y1;\n var x2;\n var y2;\n var x1m;\n var y1m;\n var x2m;\n var y2m;\n var bez1;\n var bez2;\n var res = justCount ? 0 : [];\n\n for (var i = 0, ii = path1.length; i < ii; i++) {\n var pi = path1[i];\n\n if (pi[0] === 'M') {\n x1 = x1m = pi[1];\n y1 = y1m = pi[2];\n } else {\n if (pi[0] === 'C') {\n bez1 = [x1, y1].concat(pi.slice(1));\n x1 = bez1[6];\n y1 = bez1[7];\n } else {\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\n x1 = x1m;\n y1 = y1m;\n }\n\n for (var j = 0, jj = path2.length; j < jj; j++) {\n var pj = path2[j];\n\n if (pj[0] === 'M') {\n x2 = x2m = pj[1];\n y2 = y2m = pj[2];\n } else {\n if (pj[0] === 'C') {\n bez2 = [x2, y2].concat(pj.slice(1));\n x2 = bez2[6];\n y2 = bez2[7];\n } else {\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\n x2 = x2m;\n y2 = y2m;\n }\n\n var intr = interHelper(bez1, bez2, justCount);\n\n if (justCount) {\n res += intr;\n } else {\n for (var k = 0, kk = intr.length; k < kk; k++) {\n intr[k].segment1 = i;\n intr[k].segment2 = j;\n intr[k].bez1 = bez1;\n intr[k].bez2 = bez2;\n }\n\n res = res.concat(intr);\n }\n }\n }\n }\n }\n\n return res;\n};\n\nvar pathIntersection = function pathIntersection(path1, path2) {\n return interPathHelper(path1, path2);\n};\n\nfunction decasteljau(points, t) {\n var left = [];\n var right = [];\n\n function recurse(points, t) {\n if (points.length === 1) {\n left.push(points[0]);\n right.push(points[0]);\n } else {\n var middlePoints = [];\n\n for (var i = 0; i < points.length - 1; i++) {\n if (i === 0) {\n left.push(points[0]);\n }\n\n if (i === points.length - 2) {\n right.push(points[i + 1]);\n }\n\n middlePoints[i] = [(1 - t) * points[i][0] + t * points[i + 1][0], (1 - t) * points[i][1] + t * points[i + 1][1]];\n }\n\n recurse(middlePoints, t);\n }\n }\n\n if (points.length) {\n recurse(points, t);\n }\n\n return {\n left: left,\n right: right.reverse()\n };\n}\n\nfunction splitCurve(start, end, count) {\n var points = [[start[1], start[2]]];\n count = count || 2;\n var segments = [];\n\n if (end[0] === 'A') {\n points.push(end[6]);\n points.push(end[7]);\n } else if (end[0] === 'C') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n points.push([end[5], end[6]]);\n } else if (end[0] === 'S' || end[0] === 'Q') {\n points.push([end[1], end[2]]);\n points.push([end[3], end[4]]);\n } else {\n points.push([end[1], end[2]]);\n }\n\n var leftSegments = points;\n var t = 1 / count;\n\n for (var i = 0; i < count - 1; i++) {\n var rt = t / (1 - t * i);\n var split = decasteljau(leftSegments, rt);\n segments.push(split.left);\n leftSegments = split.right;\n }\n\n segments.push(leftSegments);\n var result = segments.map(function (segment) {\n var cmd = [];\n\n if (segment.length === 4) {\n cmd.push('C');\n cmd = cmd.concat(segment[2]);\n }\n\n if (segment.length >= 3) {\n if (segment.length === 3) {\n cmd.push('Q');\n }\n\n cmd = cmd.concat(segment[1]);\n }\n\n if (segment.length === 2) {\n cmd.push('L');\n }\n\n cmd = cmd.concat(segment[segment.length - 1]);\n return cmd;\n });\n return result;\n}\n\nvar splitSegment = function splitSegment(start, end, count) {\n if (count === 1) {\n return [[].concat(start)];\n }\n\n var segments = [];\n\n if (end[0] === 'L' || end[0] === 'C' || end[0] === 'Q') {\n segments = segments.concat(splitCurve(start, end, count));\n } else {\n var temp = [].concat(start);\n\n if (temp[0] === 'M') {\n temp[0] = 'L';\n }\n\n for (var i = 0; i <= count - 1; i++) {\n segments.push(temp);\n }\n }\n\n return segments;\n};\n\nvar fillPath = function fillPath(source, target) {\n if (source.length === 1) {\n return source;\n }\n\n var sourceLen = source.length - 1;\n var targetLen = target.length - 1;\n var ratio = sourceLen / targetLen;\n var segmentsToFill = [];\n\n if (source.length === 1 && source[0][0] === 'M') {\n for (var i = 0; i < targetLen - sourceLen; i++) {\n source.push(source[0]);\n }\n\n return source;\n }\n\n for (var _i3 = 0; _i3 < targetLen; _i3++) {\n var index = Math.floor(ratio * _i3);\n segmentsToFill[index] = (segmentsToFill[index] || 0) + 1;\n }\n\n var filled = segmentsToFill.reduce(function (filled, count, i) {\n if (i === sourceLen) {\n return filled.concat(source[sourceLen]);\n }\n\n return filled.concat(splitSegment(source[i], source[i + 1], count));\n }, []);\n filled.unshift(source[0]);\n\n if (target[targetLen] === 'Z' || target[targetLen] === 'z') {\n filled.push('Z');\n }\n\n return filled;\n};\n\nvar isEqual = function isEqual(obj1, obj2) {\n if (obj1.length !== obj2.length) {\n return false;\n }\n\n var result = true;\n Util.each(obj1, function (item, i) {\n if (item !== obj2[i]) {\n result = false;\n return false;\n }\n });\n return result;\n};\n\nfunction getMinDiff(del, add, modify) {\n var type = null;\n var min = modify;\n\n if (add < min) {\n min = add;\n type = 'add';\n }\n\n if (del < min) {\n min = del;\n type = 'del';\n }\n\n return {\n type: type,\n min: min\n };\n}\n/*\n * https://en.wikipedia.org/wiki/Levenshtein_distance\n * 计算两条path的编辑距离\n */\n\n\nvar levenshteinDistance = function levenshteinDistance(source, target) {\n var sourceLen = source.length;\n var targetLen = target.length;\n var sourceSegment, targetSegment;\n var temp = 0;\n\n if (sourceLen === 0 || targetLen === 0) {\n return null;\n }\n\n var dist = [];\n\n for (var i = 0; i <= sourceLen; i++) {\n dist[i] = [];\n dist[i][0] = {\n min: i\n };\n }\n\n for (var j = 0; j <= targetLen; j++) {\n dist[0][j] = {\n min: j\n };\n }\n\n for (var _i4 = 1; _i4 <= sourceLen; _i4++) {\n sourceSegment = source[_i4 - 1];\n\n for (var _j2 = 1; _j2 <= targetLen; _j2++) {\n targetSegment = target[_j2 - 1];\n\n if (isEqual(sourceSegment, targetSegment)) {\n temp = 0;\n } else {\n temp = 1;\n }\n\n var del = dist[_i4 - 1][_j2].min + 1;\n var add = dist[_i4][_j2 - 1].min + 1;\n var modify = dist[_i4 - 1][_j2 - 1].min + temp;\n dist[_i4][_j2] = getMinDiff(del, add, modify);\n }\n }\n\n return dist;\n};\n\nvar fillPathByDiff = function fillPathByDiff(source, target) {\n var diffMatrix = levenshteinDistance(source, target);\n var sourceLen = source.length;\n var targetLen = target.length;\n var changes = [];\n var index = 1;\n var minPos = 1; // 如果source和target不是完全不相等\n\n if (diffMatrix[sourceLen][targetLen] !== sourceLen) {\n // 获取从source到target所需改动\n for (var i = 1; i <= sourceLen; i++) {\n var min = diffMatrix[i][i].min;\n minPos = i;\n\n for (var j = index; j <= targetLen; j++) {\n if (diffMatrix[i][j].min < min) {\n min = diffMatrix[i][j].min;\n minPos = j;\n }\n }\n\n index = minPos;\n\n if (diffMatrix[i][index].type) {\n changes.push({\n index: i - 1,\n type: diffMatrix[i][index].type\n });\n }\n } // 对source进行增删path\n\n\n for (var _i5 = changes.length - 1; _i5 >= 0; _i5--) {\n index = changes[_i5].index;\n\n if (changes[_i5].type === 'add') {\n source.splice(index, 0, [].concat(source[index]));\n } else {\n source.splice(index, 1);\n }\n }\n } // source尾部补齐\n\n\n sourceLen = source.length;\n var diff = targetLen - sourceLen;\n\n if (sourceLen < targetLen) {\n for (var _i6 = 0; _i6 < diff; _i6++) {\n if (source[sourceLen - 1][0] === 'z' || source[sourceLen - 1][0] === 'Z') {\n source.splice(sourceLen - 2, 0, source[sourceLen - 2]);\n } else {\n source.push(source[sourceLen - 1]);\n }\n\n sourceLen += 1;\n }\n }\n\n return source;\n}; // 将两个点均分成count个点\n\n\nfunction _splitPoints(points, former, count) {\n var result = [].concat(points);\n var index;\n var t = 1 / (count + 1);\n\n var formerEnd = _getSegmentPoints(former)[0];\n\n for (var i = 1; i <= count; i++) {\n t *= i;\n index = Math.floor(points.length * t);\n\n if (index === 0) {\n result.unshift([formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]);\n } else {\n result.splice(index, 0, [formerEnd[0] * t + points[index][0] * (1 - t), formerEnd[1] * t + points[index][1] * (1 - t)]);\n }\n }\n\n return result;\n}\n/*\n * 抽取pathSegment中的关键点\n * M,L,A,Q,H,V一个端点\n * Q, S抽取一个端点,一个控制点\n * C抽取一个端点,两个控制点\n */\n\n\nfunction _getSegmentPoints(segment) {\n var points = [];\n\n switch (segment[0]) {\n case 'M':\n points.push([segment[1], segment[2]]);\n break;\n\n case 'L':\n points.push([segment[1], segment[2]]);\n break;\n\n case 'A':\n points.push([segment[6], segment[7]]);\n break;\n\n case 'Q':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n\n case 'T':\n points.push([segment[1], segment[2]]);\n break;\n\n case 'C':\n points.push([segment[5], segment[6]]);\n points.push([segment[1], segment[2]]);\n points.push([segment[3], segment[4]]);\n break;\n\n case 'S':\n points.push([segment[3], segment[4]]);\n points.push([segment[1], segment[2]]);\n break;\n\n case 'H':\n points.push([segment[1], segment[1]]);\n break;\n\n case 'V':\n points.push([segment[1], segment[1]]);\n break;\n\n default:\n }\n\n return points;\n}\n\nvar formatPath = function formatPath(fromPath, toPath) {\n if (fromPath.length <= 1) {\n return fromPath;\n }\n\n var points;\n\n for (var i = 0; i < toPath.length; i++) {\n if (fromPath[i][0] !== toPath[i][0]) {\n // 获取fromPath的pathSegment的端点,根据toPath的指令对其改造\n points = _getSegmentPoints(fromPath[i]);\n\n switch (toPath[i][0]) {\n case 'M':\n fromPath[i] = ['M'].concat(points[0]);\n break;\n\n case 'L':\n fromPath[i] = ['L'].concat(points[0]);\n break;\n\n case 'A':\n fromPath[i] = [].concat(toPath[i]);\n fromPath[i][6] = points[0][0];\n fromPath[i][7] = points[0][1];\n break;\n\n case 'Q':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n } else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n\n fromPath[i] = ['Q'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n\n case 'T':\n fromPath[i] = ['T'].concat(points[0]);\n break;\n\n case 'C':\n if (points.length < 3) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 2);\n } else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n\n fromPath[i] = ['C'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n\n case 'S':\n if (points.length < 2) {\n if (i > 0) {\n points = _splitPoints(points, fromPath[i - 1], 1);\n } else {\n fromPath[i] = toPath[i];\n break;\n }\n }\n\n fromPath[i] = ['S'].concat(points.reduce(function (arr, i) {\n return arr.concat(i);\n }, []));\n break;\n\n default:\n fromPath[i] = toPath[i];\n }\n }\n }\n\n return fromPath;\n};\n\nmodule.exports = {\n parsePathString: parsePathString,\n parsePathArray: parsePathArray,\n pathTocurve: pathTocurve,\n pathToAbsolute: pathToAbsolute,\n catmullRomToBezier: catmullRom2bezier,\n rectPath: rectPath,\n fillPath: fillPath,\n fillPathByDiff: fillPathByDiff,\n formatPath: formatPath,\n intersection: pathIntersection\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/node_modules/@antv/g/lib/util/path.js\n// module id = 96\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n/**\n * @fileOverview The base class of continuous legend\n * @author sima.zhang\n */\n\n\nvar Util = require('../util');\n\nvar Legend = require('./base');\n\nvar Slider = require('./slider');\n\nvar _require = require('../const'),\n FONT_FAMILY = _require.FONT_FAMILY;\n\nvar TRIGGER_WIDTH = 8;\nvar Event = Util.Event;\nvar Group = Util.Group;\n\nvar Continuous = /*#__PURE__*/function (_Legend) {\n _inheritsLoose(Continuous, _Legend);\n\n function Continuous() {\n return _Legend.apply(this, arguments) || this;\n }\n\n var _proto = Continuous.prototype;\n\n _proto.getDefaultCfg = function getDefaultCfg() {\n var cfg = _Legend.prototype.getDefaultCfg.call(this);\n\n return Util.mix({}, cfg, {\n /**\n * 类型\n * @type {String}\n */\n type: 'continuous-legend',\n\n /**\n * 子项\n * @type {Array}\n */\n items: null,\n\n /**\n * 布局方式\n * horizontal 水平\n * vertical 垂直\n * @type {String}\n */\n layout: 'vertical',\n\n /**\n * 宽度\n * @type {Number}\n */\n width: 20,\n\n /**\n * 高度\n * @type {Number}\n */\n height: 156,\n\n /**\n * 默认文本图形属性\n * @type {ATTRS}\n */\n textStyle: {\n fill: '#333',\n textAlign: 'center',\n textBaseline: 'middle',\n stroke: '#fff',\n lineWidth: 5,\n fontFamily: FONT_FAMILY\n },\n hoverTextStyle: {\n fill: 'rgba(0,0,0,0.25)'\n },\n\n /**\n * 连续图例是否可滑动\n * @type {Boolean}\n */\n slidable: true,\n\n /**\n * 两头滑块的样式\n * @type {object}\n */\n triggerAttr: {\n fill: '#fff',\n // shadowOffsetX: -2,\n // shadowOffsetY: 2,\n shadowBlur: 10,\n shadowColor: 'rgba(0,0,0,0.65)',\n radius: 2\n },\n\n /**\n * slider 的范围\n * @type {array}}\n */\n _range: [0, 100],\n\n /**\n * 中间 bar 背景灰色\n * @type {ATTRS}\n */\n middleBackgroundStyle: {\n fill: '#D9D9D9'\n },\n\n /**\n * 文本与图例间距\n * @type {Number}\n */\n textOffset: 4,\n\n /**\n * line segment to seperate the unslidable slider blocks\n * @type {object}\n */\n lineStyle: {\n lineWidth: 1,\n stroke: '#fff'\n },\n\n /**\n * the pointer while activate the legend by mouse hovering or called by outside\n * @type {object}\n */\n pointerStyle: {\n // color: '#ccc',\n fill: 'rgb(230, 230, 230)'\n }\n });\n };\n\n _proto._calStartPoint = function _calStartPoint() {\n var start = {\n x: 10,\n y: this.get('titleGap') - TRIGGER_WIDTH\n };\n var titleShape = this.get('titleShape');\n\n if (titleShape) {\n var titleBox = titleShape.getBBox();\n start.y += titleBox.height;\n }\n\n return start;\n };\n\n _proto.beforeRender = function beforeRender() {\n var items = this.get('items');\n\n if (!Util.isArray(items) || Util.isEmpty(items)) {\n return;\n }\n\n _Legend.prototype.beforeRender.call(this);\n\n this.set('firstItem', items[0]);\n this.set('lastItem', items[items.length - 1]);\n };\n\n _proto._formatItemValue = function _formatItemValue(value) {\n var formatter = this.get('formatter') || this.get('itemFormatter');\n\n if (formatter) {\n value = formatter.call(this, value);\n }\n\n return value;\n };\n\n _proto.render = function render() {\n _Legend.prototype.render.call(this);\n\n if (this.get('slidable')) {\n this._renderSlider();\n } else {\n this._renderUnslidable();\n }\n };\n\n _proto._renderSlider = function _renderSlider() {\n var minHandleElement = new Group();\n var maxHandleElement = new Group();\n var backgroundElement = new Group();\n\n var start = this._calStartPoint();\n\n var group = this.get('group');\n var slider = group.addGroup(Slider, {\n minHandleElement: minHandleElement,\n maxHandleElement: maxHandleElement,\n backgroundElement: backgroundElement,\n layout: this.get('layout'),\n range: this.get('_range'),\n width: this.get('width'),\n height: this.get('height')\n });\n slider.translate(start.x, start.y);\n this.set('slider', slider);\n\n var shape = this._renderSliderShape();\n\n shape.attr('clip', slider.get('middleHandleElement'));\n\n this._renderTrigger();\n } // the middle bar\n ;\n\n _proto._addMiddleBar = function _addMiddleBar(parent, name, attrs) {\n // background of the middle bar\n parent.addShape(name, {\n attrs: Util.mix({}, attrs, this.get('middleBackgroundStyle'))\n }); // frontground of the middle bar\n\n return parent.addShape(name, {\n attrs: attrs\n });\n };\n\n _proto._renderTrigger = function _renderTrigger() {\n var min = this.get('firstItem');\n var max = this.get('lastItem');\n var layout = this.get('layout');\n var textStyle = this.get('textStyle');\n var triggerAttr = this.get('triggerAttr');\n var minBlockAttr = Util.mix({}, triggerAttr);\n var maxBlockAttr = Util.mix({}, triggerAttr);\n var minTextAttr = Util.mix({\n text: this._formatItemValue(min.value) + ''\n }, textStyle);\n var maxTextAttr = Util.mix({\n text: this._formatItemValue(max.value) + ''\n }, textStyle);\n\n if (layout === 'vertical') {\n this._addVerticalTrigger('min', minBlockAttr, minTextAttr);\n\n this._addVerticalTrigger('max', maxBlockAttr, maxTextAttr);\n } else {\n this._addHorizontalTrigger('min', minBlockAttr, minTextAttr);\n\n this._addHorizontalTrigger('max', maxBlockAttr, maxTextAttr);\n }\n };\n\n _proto._addVerticalTrigger = function _addVerticalTrigger(type, blockAttr, textAttr) {\n var slider = this.get('slider');\n var trigger = slider.get(type + 'HandleElement');\n var width = this.get('width');\n var button = trigger.addShape('rect', {\n attrs: Util.mix({\n x: width / 2 - TRIGGER_WIDTH - 2,\n y: type === 'min' ? 0 : -TRIGGER_WIDTH,\n width: 2 * TRIGGER_WIDTH + 2,\n height: TRIGGER_WIDTH\n }, blockAttr)\n });\n var text = trigger.addShape('text', {\n attrs: Util.mix(textAttr, {\n x: width + this.get('textOffset'),\n y: type === 'max' ? -4 : 4,\n textAlign: 'start',\n lineHeight: 1,\n textBaseline: 'middle'\n })\n });\n var layout = this.get('layout');\n var trigerCursor = layout === 'vertical' ? 'ns-resize' : 'ew-resize';\n button.attr('cursor', trigerCursor);\n text.attr('cursor', trigerCursor);\n this.set(type + 'ButtonElement', button);\n this.set(type + 'TextElement', text);\n };\n\n _proto._addHorizontalTrigger = function _addHorizontalTrigger(type, blockAttr, textAttr) {\n var slider = this.get('slider');\n var trigger = slider.get(type + 'HandleElement');\n var button = trigger.addShape('rect', {\n attrs: Util.mix({\n x: type === 'min' ? -TRIGGER_WIDTH : 0,\n y: -TRIGGER_WIDTH - this.get('height') / 2,\n width: TRIGGER_WIDTH,\n height: 2 * TRIGGER_WIDTH\n }, blockAttr)\n });\n var text = trigger.addShape('text', {\n attrs: Util.mix(textAttr, {\n x: type === 'min' ? -TRIGGER_WIDTH - 4 : TRIGGER_WIDTH + 4,\n y: TRIGGER_WIDTH / 2 + this.get('textOffset') + 10,\n textAlign: type === 'min' ? 'end' : 'start',\n textBaseline: 'middle'\n })\n });\n var layout = this.get('layout');\n var trigerCursor = layout === 'vertical' ? 'ns-resize' : 'ew-resize';\n button.attr('cursor', trigerCursor);\n text.attr('cursor', trigerCursor);\n this.set(type + 'ButtonElement', button);\n this.set(type + 'TextElement', text);\n };\n\n _proto._bindEvents = function _bindEvents() {\n var _this = this;\n\n if (this.get('slidable')) {\n var slider = this.get('slider');\n slider.on('sliderchange', function (ev) {\n var range = ev.range;\n\n var firstItemValue = _this.get('firstItem').value;\n\n var lastItemValue = _this.get('lastItem').value;\n\n var minValue = firstItemValue + range[0] / 100 * (lastItemValue - firstItemValue);\n var maxValue = firstItemValue + range[1] / 100 * (lastItemValue - firstItemValue);\n\n _this._updateElement(minValue, maxValue);\n\n var itemFiltered = new Event('itemfilter', ev, true, true);\n itemFiltered.range = [minValue, maxValue];\n\n _this.emit('itemfilter', itemFiltered);\n });\n }\n\n if (this.get('hoverable')) {\n this.get('group').on('mousemove', Util.wrapBehavior(this, '_onMouseMove'));\n this.get('group').on('mouseleave', Util.wrapBehavior(this, '_onMouseLeave'));\n }\n } // update the text of min and max trigger\n ;\n\n _proto._updateElement = function _updateElement(min, max) {\n var minTextElement = this.get('minTextElement');\n var maxTextElement = this.get('maxTextElement');\n\n if (max > 1) {\n // 对于大于 1 的值,默认显示为整数\n min = parseInt(min, 10);\n max = parseInt(max, 10);\n }\n\n minTextElement.attr('text', this._formatItemValue(min) + '');\n maxTextElement.attr('text', this._formatItemValue(max) + '');\n };\n\n _proto._onMouseLeave = function _onMouseLeave() {\n var hoverPointer = this.get('group').findById('hoverPointer');\n hoverPointer && hoverPointer.destroy();\n var hoverText = this.get('group').findById('hoverText');\n hoverText && hoverText.destroy();\n this.get('canvas').draw();\n } // activate the legend while mouse moving\n ;\n\n _proto._onMouseMove = function _onMouseMove(ev) {\n var height = this.get('height');\n var width = this.get('width');\n var items = this.get('items');\n var el = this.get('canvas').get('el');\n var el_bbox = el.getBoundingClientRect();\n var bbox = this.get('group').getBBox();\n var value;\n\n if (this.get('layout') === 'vertical') {\n var valuePadding = 5;\n\n if (this.get('type') === 'color-legend') {\n valuePadding = 30;\n }\n\n var titleOffset = this.get('titleGap');\n var titleShape = this.get('titleShape');\n if (titleShape) titleOffset += titleShape.getBBox().maxY - titleShape.getBBox().minY;\n var currentPage = ev.clientY || ev.event.clientY;\n currentPage = currentPage - el_bbox.y - this.get('group').attr('matrix')[7] + bbox.y - valuePadding + titleOffset;\n value = items[0].value + (1 - currentPage / height) * (items[items.length - 1].value - items[0].value);\n } else {\n var _currentPage = ev.clientX || ev.event.clientX;\n\n _currentPage = _currentPage - el_bbox.x - this.get('group').attr('matrix')[6];\n value = items[0].value + _currentPage / width * (items[items.length - 1].value - items[0].value);\n }\n\n value = value.toFixed(2);\n this.activate(value);\n this.emit('mousehover', {\n value: value\n });\n } // activated by mouse moving or being called\n ;\n\n _proto.activate = function activate(value) {\n if (!value) {\n return;\n }\n\n var hoverPointer = this.get('group').findById('hoverPointer');\n var hoverText = this.get('group').findById('hoverText');\n var items = this.get('items');\n\n if (value < items[0].value || value > items[items.length - 1].value) {\n return;\n }\n\n var height = this.get('height');\n var width = this.get('width');\n var titleShape = this.get('titleShape');\n var titleGap = this.get('titleGap');\n var points = [];\n var page = (value - items[0].value) / (items[items.length - 1].value - items[0].value);\n var textStyle;\n\n if (this.get('layout') === 'vertical') {\n // revise the offset\n var paddingY = 0,\n paddingX = 0;\n\n if (this.get('type') === 'color-legend') {\n paddingY = titleGap;\n if (titleShape) paddingY += titleShape.getBBox().height;\n }\n\n if (this.get('slidable')) {\n if (this.get('type') === 'color-legend') {\n paddingY -= 13;\n } else {\n paddingY = titleGap - 15;\n if (titleShape) paddingY += titleShape.getBBox().height;\n }\n\n paddingX += 10;\n }\n\n page = (1 - page) * height;\n points = [[paddingX, page + paddingY], [paddingX - 10, page + paddingY - 5], [paddingX - 10, page + paddingY + 5]];\n textStyle = Util.mix({}, {\n x: width + this.get('textOffset') / 2 + paddingX,\n y: page + paddingY,\n text: this._formatItemValue(value) + '' // 以字符串格式展示\n\n }, this.get('textStyle'), {\n textAlign: 'start'\n });\n } else {\n var _paddingY = 0,\n _paddingX = 0;\n\n if (this.get('type') === 'color-legend') {\n _paddingY = titleGap;\n if (titleShape) _paddingY += titleShape.getBBox().height;\n }\n\n if (this.get('slidable')) {\n if (this.get('type') === 'color-legend') {\n // hoverPointer三角形的高\n _paddingY -= 7;\n } else {\n _paddingY = titleGap;\n if (!titleShape) _paddingY -= 7;\n }\n\n _paddingX += 10;\n }\n\n page *= width;\n points = [[page + _paddingX, _paddingY], [page + _paddingX - 5, _paddingY - 10], [page + _paddingX + 5, _paddingY - 10]];\n textStyle = Util.mix({}, {\n x: page - 5,\n y: height + this.get('textOffset') + _paddingY,\n text: this._formatItemValue(value) + '' // 以字符串格式展示\n\n }, this.get('textStyle'));\n }\n\n var hoverTextStyle = Util.mix(textStyle, this.get('hoverTextStyle'));\n\n if (!hoverText) {\n // mouse enter the legend, add hoverText\n hoverText = this.get('group').addShape('text', {\n attrs: hoverTextStyle\n });\n hoverText.set('id', 'hoverText');\n } else {\n // mouse move, update hoverText\n hoverText.attr(hoverTextStyle);\n }\n\n if (!hoverPointer) {\n // mouse enter the legend, add hoverPointer\n hoverPointer = this.get('group').addShape('Polygon', {\n attrs: Util.mix({\n points: points\n }, this.get('pointerStyle'))\n });\n hoverPointer.set('id', 'hoverPointer');\n } else {\n // mouse move, update hoverPointer\n hoverPointer.attr(Util.mix({\n points: points\n }, this.get('pointerStyle')));\n }\n\n this.get('canvas').draw();\n };\n\n _proto.deactivate = function deactivate() {\n var hoverPointer = this.get('group').findById('hoverPointer');\n hoverPointer && hoverPointer.destroy();\n var hoverText = this.get('group').findById('hoverText');\n hoverText && hoverText.destroy();\n this.get('canvas').draw();\n };\n\n return Continuous;\n}(Legend);\n\nmodule.exports = Continuous;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/legend/continuous.js\n// module id = 97\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nvar Component = require('../base');\n\nvar Util = require('../util');\n\nvar Tooltip = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Tooltip, _Component);\n\n function Tooltip() {\n return _Component.apply(this, arguments) || this;\n }\n\n var _proto = Tooltip.prototype;\n\n _proto.getDefaultCfg = function getDefaultCfg() {\n var cfg = _Component.prototype.getDefaultCfg.call(this);\n\n return Util.mix({}, cfg, {\n /**\n * tooltip container\n * @type {Dom / String}\n */\n\n /**\n * 右下角坐标\n * @type {Number}\n */\n x: 0,\n\n /**\n * y 右下角坐标\n * @type {Number}\n */\n y: 0,\n\n /**\n * tooltip 记录项\n * @type {Array}\n */\n items: null,\n\n /**\n * tooltip 标题\n * @type {Array}\n */\n titleContent: null,\n\n /**\n * 是否展示 title\n * @type {Boolean}\n */\n showTitle: true,\n\n /**\n * 视图范围\n * @type {Object}\n */\n plotRange: null,\n\n /**\n * x轴上,移动到位置的偏移量\n * @type {Number}\n */\n offset: 10,\n // TODO:支持xy两个方向上的offset\n\n /**\n * 时间戳\n * @type {Number}\n */\n timeStamp: 0,\n\n /**\n * 将 tooltip 展示在指定区域内\n * @type {Boolean}\n */\n inPlot: true,\n\n /**\n * tooltip 辅助线配置\n * @type {Object}\n */\n crosshairs: null\n });\n };\n\n _proto.isContentChange = function isContentChange(title, items) {\n var titleContent = this.get('titleContent');\n var lastItems = this.get('items');\n var isChanged = !(title === titleContent && lastItems.length === items.length);\n\n if (!isChanged) {\n Util.each(items, function (item, index) {\n var preItem = lastItems[index];\n\n for (var key in item) {\n if (item.hasOwnProperty(key)) {\n if (!Util.isObject(item[key]) && item[key] !== preItem[key]) {\n isChanged = true;\n break;\n }\n }\n }\n\n if (isChanged) {\n return false;\n }\n });\n }\n\n return isChanged;\n };\n\n _proto.setContent = function setContent(title, items) {\n var timeStamp = new Date().valueOf();\n this.set('items', items);\n this.set('titleContent', title);\n this.set('timeStamp', timeStamp);\n this.render();\n return this;\n };\n\n _proto.setPosition = function setPosition(x, y) {\n this.set('x', x);\n this.set('y', y);\n };\n\n _proto.render = function render() {};\n\n _proto.clear = function clear() {};\n\n _proto.show = function show() {\n this.set('visible', true);\n };\n\n _proto.hide = function hide() {\n this.set('visible', false);\n };\n\n return Tooltip;\n}(Component);\n\nmodule.exports = Tooltip;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/component/lib/tooltip/base.js\n// module id = 98\n// module chunks = 0 1 2","/**\n * @fileOverview 提取公共代码到util方法\n * @author dxq613@gmail.com\n */\nvar isString = require('@antv/util/lib/type/is-string');\n\nvar isDate = require('@antv/util/lib/type/is-date');\n\nmodule.exports = {\n toTimeStamp: function toTimeStamp(value) {\n if (isString(value)) {\n if (value.indexOf('T') > 0) {\n value = new Date(value).getTime();\n } else {\n value = new Date(value.replace(/-/ig, '/')).getTime();\n }\n }\n\n if (isDate(value)) {\n value = value.getTime();\n }\n\n return value;\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/time-util.js\n// module id = 100\n// module chunks = 0 1 2","export { now, timer, timerFlush } from \"./timer.js\";\nexport { default as timeout } from \"./timeout.js\";\nexport { default as interval } from \"./interval.js\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-timer/src/index.js\n// module id = 101\n// module chunks = 0 1 2","export { linear as easeLinear } from \"./linear.js\";\nexport { quadInOut as easeQuad, quadIn as easeQuadIn, quadOut as easeQuadOut, quadInOut as easeQuadInOut } from \"./quad.js\";\nexport { cubicInOut as easeCubic, cubicIn as easeCubicIn, cubicOut as easeCubicOut, cubicInOut as easeCubicInOut } from \"./cubic.js\";\nexport { polyInOut as easePoly, polyIn as easePolyIn, polyOut as easePolyOut, polyInOut as easePolyInOut } from \"./poly.js\";\nexport { sinInOut as easeSin, sinIn as easeSinIn, sinOut as easeSinOut, sinInOut as easeSinInOut } from \"./sin.js\";\nexport { expInOut as easeExp, expIn as easeExpIn, expOut as easeExpOut, expInOut as easeExpInOut } from \"./exp.js\";\nexport { circleInOut as easeCircle, circleIn as easeCircleIn, circleOut as easeCircleOut, circleInOut as easeCircleInOut } from \"./circle.js\";\nexport { bounceOut as easeBounce, bounceIn as easeBounceIn, bounceOut as easeBounceOut, bounceInOut as easeBounceInOut } from \"./bounce.js\";\nexport { backInOut as easeBack, backIn as easeBackIn, backOut as easeBackOut, backInOut as easeBackInOut } from \"./back.js\";\nexport { elasticOut as easeElastic, elasticIn as easeElasticIn, elasticOut as easeElasticOut, elasticInOut as easeElasticInOut } from \"./elastic.js\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-ease/src/index.js\n// module id = 103\n// module chunks = 0 1 2","module.exports = {\n Position: require('./position'),\n Color: require('./color'),\n Shape: require('./shape'),\n Size: require('./size'),\n Opacity: require('./opacity'),\n ColorUtil: require('./color-util')\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/attr/lib/index.js\n// module id = 104\n// module chunks = 0 1 2","/**\n * @fileOverview Scale entry, used to reference all the scales\n * @author dxq613@gmail.com\n */\nvar lowerFirst = require('@antv/util/lib/string/lower-first');\n\nvar Base = require('./base');\n\nBase.Linear = require('./linear');\nBase.Identity = require('./identity');\nBase.Cat = require('./category');\nBase.Time = require('./time');\nBase.TimeCat = require('./time-cat');\nBase.Log = require('./log');\nBase.Pow = require('./pow');\n\nvar _loop = function _loop(k) {\n if (Base.hasOwnProperty(k)) {\n var methodName = lowerFirst(k);\n\n Base[methodName] = function (cfg) {\n return new Base[k](cfg);\n };\n }\n};\n\nfor (var k in Base) {\n _loop(k);\n}\n\nvar CAT_ARR = ['cat', 'timeCat'];\n\nBase.isCategory = function (type) {\n return CAT_ARR.indexOf(type) >= 0;\n};\n\nmodule.exports = Base;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/index.js\n// module id = 105\n// module chunks = 0 1 2","var toString = require('../to-string');\n\nvar lowerFirst = function lowerFirst(value) {\n var str = toString(value);\n return str.charAt(0).toLowerCase() + str.substring(1);\n};\n\nmodule.exports = lowerFirst;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/string/lower-first.js\n// module id = 106\n// module chunks = 0 1 2","/**\n * @fileOverview 计算方法\n * @author dxq613@gmail.com\n */\n// 如果小数点后面超过 10 位浮点数时进行一下处理\nvar DECIMAL_LENGTH = 12; // 获取系数\n\nfunction getFactor(v) {\n var factor = 1;\n\n if (v === Infinity || v === -Infinity) {\n throw new Error('Not support Infinity!');\n }\n\n if (v < 1) {\n var count = 0;\n\n while (v < 1) {\n factor = factor / 10;\n v = v * 10;\n count++;\n } // 浮点数计算出现问题\n\n\n if (factor.toString().length > DECIMAL_LENGTH) {\n factor = parseFloat(factor.toFixed(count));\n }\n } else {\n while (v > 10) {\n factor = factor * 10;\n v = v / 10;\n }\n }\n\n return factor;\n} // 取小于当前值的\n\n\nfunction arrayFloor(values, value) {\n var length = values.length;\n\n if (length === 0) {\n return NaN;\n }\n\n var pre = values[0];\n\n if (value < values[0]) {\n return NaN;\n }\n\n if (value >= values[length - 1]) {\n return values[length - 1];\n }\n\n for (var i = 1; i < values.length; i++) {\n if (value < values[i]) {\n break;\n }\n\n pre = values[i];\n }\n\n return pre;\n} // 大于当前值的第一个\n\n\nfunction arrayCeiling(values, value) {\n var length = values.length;\n\n if (length === 0) {\n return NaN;\n } // var pre = values[0];\n\n\n var rst;\n\n if (value > values[length - 1]) {\n return NaN;\n }\n\n if (value < values[0]) {\n return values[0];\n }\n\n for (var i = 1; i < values.length; i++) {\n if (value <= values[i]) {\n rst = values[i];\n break;\n }\n }\n\n return rst;\n}\n\nvar Util = {\n // 获取逼近的数值\n snapFactorTo: function snapFactorTo(v, arr, snapType) {\n // 假设 v = -512,isFloor = true\n if (isNaN(v)) {\n return NaN;\n }\n\n var factor = 1; // 计算系数\n\n if (v !== 0) {\n if (v < 0) {\n factor = -1;\n }\n\n v = v * factor; // v = 512\n\n var tmpFactor = getFactor(v);\n factor = factor * tmpFactor; // factor = -100\n\n v = v / tmpFactor; // v = 5.12\n }\n\n if (snapType === 'floor') {\n v = Util.snapFloor(arr, v); // v = 5\n } else if (snapType === 'ceil') {\n v = Util.snapCeiling(arr, v); // v = 6\n } else {\n v = Util.snapTo(arr, v); // 四舍五入 5\n }\n\n var rst = parseFloat((v * factor).toPrecision(DECIMAL_LENGTH)); // 如果出现浮点数计算问题,需要处理一下\n // 如果出现浮点数计算问题,需要处理一下\n\n if (Math.abs(factor) < 1 && rst.toString().length > DECIMAL_LENGTH) {\n var decimalVal = parseInt(1 / factor);\n var symbol = factor > 0 ? 1 : -1;\n rst = v / decimalVal * symbol;\n }\n\n return rst;\n },\n // 获取逼近的倍数\n snapMultiple: function snapMultiple(v, base, snapType) {\n var div;\n\n if (snapType === 'ceil') {\n div = Math.ceil(v / base);\n } else if (snapType === 'floor') {\n div = Math.floor(v / base);\n } else {\n div = Math.round(v / base);\n }\n\n return div * base;\n },\n\n /**\n * 获取逼近的值,用于对齐数据\n * @param {Array} values 数据集合\n * @param {Number} value 数值\n * @return {Number} 逼近的值\n */\n snapTo: function snapTo(values, value) {\n // 这里假定values是升序排列\n var floorVal = arrayFloor(values, value);\n var ceilingVal = arrayCeiling(values, value);\n\n if (isNaN(floorVal) || isNaN(ceilingVal)) {\n if (values[0] >= value) {\n return values[0];\n }\n\n var last = values[values.length - 1];\n\n if (last <= value) {\n return last;\n }\n }\n\n if (Math.abs(value - floorVal) < Math.abs(ceilingVal - value)) {\n return floorVal;\n }\n\n return ceilingVal;\n },\n\n /**\n * 获取逼近的最小值,用于对齐数据\n * @param {Array} values 数据集合\n * @param {Number} value 数值\n * @return {Number} 逼近的最小值\n */\n snapFloor: function snapFloor(values, value) {\n // 这里假定values是升序排列\n return arrayFloor(values, value);\n },\n\n /**\n * 获取逼近的最大值,用于对齐数据\n * @param {Array} values 数据集合\n * @param {Number} value 数值\n * @return {Number} 逼近的最大值\n */\n snapCeiling: function snapCeiling(values, value) {\n // 这里假定values是升序排列\n return arrayCeiling(values, value);\n },\n fixedBase: function fixedBase(v, base) {\n var str = base.toString();\n var index = str.indexOf('.');\n var indexOfExp = str.indexOf('e-'); // 判断是否带小数点,1.000001 1.23e-9\n\n if (index < 0 && indexOfExp < 0) {\n // base为整数\n return Math.round(v);\n }\n\n var length = indexOfExp >= 0 ? parseInt(str.substr(indexOfExp + 2), 10) : str.substr(index + 1).length;\n\n if (length > 20) {\n length = 20;\n }\n\n return parseFloat(v.toFixed(length));\n }\n};\nmodule.exports = Util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/auto/util.js\n// module id = 107\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar Base = require('./base');\n\nvar catAuto = require('./auto/cat');\n\nvar each = require('@antv/util/lib/each');\n\nvar isNumber = require('@antv/util/lib/type/is-number');\n\nvar isString = require('@antv/util/lib/type/is-string');\n\nvar Category = /*#__PURE__*/function (_Base) {\n _inheritsLoose(Category, _Base);\n\n function Category() {\n return _Base.apply(this, arguments) || this;\n }\n\n var _proto = Category.prototype;\n\n _proto._initDefaultCfg = function _initDefaultCfg() {\n _Base.prototype._initDefaultCfg.call(this);\n\n this.type = 'cat';\n /**\n * 是否分类度量\n * @type {Boolean}\n */\n\n this.isCategory = true;\n this.isRounding = true; // 是否进行取整操作\n }\n /**\n * @override\n */\n ;\n\n _proto.init = function init() {\n var self = this;\n var values = self.values;\n var tickCount = self.tickCount;\n each(values, function (v, i) {\n values[i] = v.toString();\n });\n\n if (!self.ticks) {\n var ticks = values;\n\n if (tickCount) {\n var temp = catAuto({\n maxCount: tickCount,\n data: values,\n isRounding: self.isRounding\n });\n ticks = temp.ticks;\n }\n\n this.ticks = ticks;\n }\n }\n /**\n * @override\n */\n ;\n\n _proto.getText = function getText(value) {\n if (this.values.indexOf(value) === -1 && isNumber(value)) {\n value = this.values[Math.round(value)];\n }\n\n return _Base.prototype.getText.call(this, value);\n }\n /**\n * @override\n */\n ;\n\n _proto.translate = function translate(value) {\n var index = this.values.indexOf(value);\n\n if (index === -1 && isNumber(value)) {\n index = value;\n } else if (index === -1) {\n index = NaN;\n }\n\n return index;\n }\n /**\n * @override\n */\n ;\n\n _proto.scale = function scale(value) {\n var rangeMin = this.rangeMin();\n var rangeMax = this.rangeMax();\n var percent;\n\n if (isString(value) || this.values.indexOf(value) !== -1) {\n value = this.translate(value);\n }\n\n if (this.values.length > 1) {\n percent = value / (this.values.length - 1);\n } else {\n percent = value;\n }\n\n return rangeMin + percent * (rangeMax - rangeMin);\n }\n /**\n * @override\n */\n ;\n\n _proto.invert = function invert(value) {\n if (isString(value)) {\n // 如果已经是字符串\n return value;\n }\n\n var min = this.rangeMin();\n var max = this.rangeMax(); // 归一到 范围内\n\n if (value < min) {\n value = min;\n }\n\n if (value > max) {\n value = max;\n }\n\n var percent = (value - min) / (max - min);\n var index = Math.round(percent * (this.values.length - 1)) % this.values.length;\n index = index || 0;\n return this.values[index];\n };\n\n return Category;\n}(Base);\n\nBase.Cat = Category;\nmodule.exports = Category;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/category.js\n// module id = 108\n// module chunks = 0 1 2","/**\n * @fileOverview 计算分类的的坐标点\n * @author dxq613@gmail.com\n */\nvar each = require('@antv/util/lib/each');\n\nvar MAX_COUNT = 8;\nvar SUB_COUNT = 4; // 控制个数不能过小\n\nfunction getSimpleArray(data) {\n var arr = [];\n each(data, function (sub) {\n arr = arr.concat(sub);\n });\n return arr;\n}\n\nfunction getGreatestFactor(count, number) {\n var i;\n\n for (i = number; i > 0; i--) {\n if (count % i === 0) {\n break;\n }\n } // 如果是素数,没有可以整除的数字\n\n\n if (i === 1) {\n for (i = number; i > 0; i--) {\n if ((count - 1) % i === 0) {\n break;\n }\n }\n }\n\n return i;\n}\n\nmodule.exports = function (info) {\n var rst = {};\n var ticks = [];\n var isRounding = info.isRounding;\n var categories = getSimpleArray(info.data);\n var length = categories.length;\n var maxCount = info.maxCount || MAX_COUNT;\n var tickCount;\n\n if (isRounding) {\n // 取整操作\n tickCount = getGreatestFactor(length - 1, maxCount - 1) + 1; // 如果计算出来只有两个坐标点,则直接使用传入的 maxCount\n\n if (tickCount === 2) {\n tickCount = maxCount;\n } else if (tickCount < maxCount - SUB_COUNT) {\n tickCount = maxCount - SUB_COUNT;\n }\n } else {\n tickCount = maxCount;\n }\n\n if (!isRounding && length <= tickCount + tickCount / 2) {\n ticks = [].concat(categories);\n } else {\n var step = parseInt(length / (tickCount - 1), 10);\n var groups = categories.map(function (e, i) {\n return i % step === 0 ? categories.slice(i, i + step) : null;\n }).filter(function (e) {\n return e;\n });\n\n for (var i = 1, groupLen = groups.length; i < groupLen && (isRounding ? i * step < length - step : i < tickCount - 1); i++) {\n ticks.push(groups[i][0]);\n }\n\n if (categories.length) {\n ticks.unshift(categories[0]);\n var last = categories[length - 1];\n\n if (ticks.indexOf(last) === -1) {\n ticks.push(last);\n }\n }\n }\n\n rst.categories = categories;\n rst.ticks = ticks;\n return rst;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/scale/lib/auto/cat.js\n// module id = 109\n// module chunks = 0 1 2","(function (main) {\n 'use strict';\n /**\n * Parse or format dates\n * @class fecha\n */\n\n var fecha = {};\n var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\n var twoDigits = /\\d\\d?/;\n var threeDigits = /\\d{3}/;\n var fourDigits = /\\d{4}/;\n var word = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n var literal = /\\[([^]*?)\\]/gm;\n\n var noop = function () {};\n\n function shorten(arr, sLen) {\n var newArr = [];\n\n for (var i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n\n return newArr;\n }\n\n function monthUpdate(arrName) {\n return function (d, v, i18n) {\n var index = i18n[arrName].indexOf(v.charAt(0).toUpperCase() + v.substr(1).toLowerCase());\n\n if (~index) {\n d.month = index;\n }\n };\n }\n\n function pad(val, len) {\n val = String(val);\n len = len || 2;\n\n while (val.length < len) {\n val = '0' + val;\n }\n\n return val;\n }\n\n var dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n var monthNamesShort = shorten(monthNames, 3);\n var dayNamesShort = shorten(dayNames, 3);\n fecha.i18n = {\n dayNamesShort: dayNamesShort,\n dayNames: dayNames,\n monthNamesShort: monthNamesShort,\n monthNames: monthNames,\n amPm: ['am', 'pm'],\n DoFn: function DoFn(D) {\n return D + ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D - D % 10 !== 10) * D % 10];\n }\n };\n var formatFlags = {\n D: function (dateObj) {\n return dateObj.getDate();\n },\n DD: function (dateObj) {\n return pad(dateObj.getDate());\n },\n Do: function (dateObj, i18n) {\n return i18n.DoFn(dateObj.getDate());\n },\n d: function (dateObj) {\n return dateObj.getDay();\n },\n dd: function (dateObj) {\n return pad(dateObj.getDay());\n },\n ddd: function (dateObj, i18n) {\n return i18n.dayNamesShort[dateObj.getDay()];\n },\n dddd: function (dateObj, i18n) {\n return i18n.dayNames[dateObj.getDay()];\n },\n M: function (dateObj) {\n return dateObj.getMonth() + 1;\n },\n MM: function (dateObj) {\n return pad(dateObj.getMonth() + 1);\n },\n MMM: function (dateObj, i18n) {\n return i18n.monthNamesShort[dateObj.getMonth()];\n },\n MMMM: function (dateObj, i18n) {\n return i18n.monthNames[dateObj.getMonth()];\n },\n YY: function (dateObj) {\n return String(dateObj.getFullYear()).substr(2);\n },\n YYYY: function (dateObj) {\n return pad(dateObj.getFullYear(), 4);\n },\n h: function (dateObj) {\n return dateObj.getHours() % 12 || 12;\n },\n hh: function (dateObj) {\n return pad(dateObj.getHours() % 12 || 12);\n },\n H: function (dateObj) {\n return dateObj.getHours();\n },\n HH: function (dateObj) {\n return pad(dateObj.getHours());\n },\n m: function (dateObj) {\n return dateObj.getMinutes();\n },\n mm: function (dateObj) {\n return pad(dateObj.getMinutes());\n },\n s: function (dateObj) {\n return dateObj.getSeconds();\n },\n ss: function (dateObj) {\n return pad(dateObj.getSeconds());\n },\n S: function (dateObj) {\n return Math.round(dateObj.getMilliseconds() / 100);\n },\n SS: function (dateObj) {\n return pad(Math.round(dateObj.getMilliseconds() / 10), 2);\n },\n SSS: function (dateObj) {\n return pad(dateObj.getMilliseconds(), 3);\n },\n a: function (dateObj, i18n) {\n return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];\n },\n A: function (dateObj, i18n) {\n return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();\n },\n ZZ: function (dateObj) {\n var o = dateObj.getTimezoneOffset();\n return (o > 0 ? '-' : '+') + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4);\n }\n };\n var parseFlags = {\n D: [twoDigits, function (d, v) {\n d.day = v;\n }],\n Do: [new RegExp(twoDigits.source + word.source), function (d, v) {\n d.day = parseInt(v, 10);\n }],\n M: [twoDigits, function (d, v) {\n d.month = v - 1;\n }],\n YY: [twoDigits, function (d, v) {\n var da = new Date(),\n cent = +('' + da.getFullYear()).substr(0, 2);\n d.year = '' + (v > 68 ? cent - 1 : cent) + v;\n }],\n h: [twoDigits, function (d, v) {\n d.hour = v;\n }],\n m: [twoDigits, function (d, v) {\n d.minute = v;\n }],\n s: [twoDigits, function (d, v) {\n d.second = v;\n }],\n YYYY: [fourDigits, function (d, v) {\n d.year = v;\n }],\n S: [/\\d/, function (d, v) {\n d.millisecond = v * 100;\n }],\n SS: [/\\d{2}/, function (d, v) {\n d.millisecond = v * 10;\n }],\n SSS: [threeDigits, function (d, v) {\n d.millisecond = v;\n }],\n d: [twoDigits, noop],\n ddd: [word, noop],\n MMM: [word, monthUpdate('monthNamesShort')],\n MMMM: [word, monthUpdate('monthNames')],\n a: [word, function (d, v, i18n) {\n var val = v.toLowerCase();\n\n if (val === i18n.amPm[0]) {\n d.isPm = false;\n } else if (val === i18n.amPm[1]) {\n d.isPm = true;\n }\n }],\n ZZ: [/([\\+\\-]\\d\\d:?\\d\\d|Z)/, function (d, v) {\n if (v === 'Z') v = '+00:00';\n var parts = (v + '').match(/([\\+\\-]|\\d\\d)/gi),\n minutes;\n\n if (parts) {\n minutes = +(parts[1] * 60) + parseInt(parts[2], 10);\n d.timezoneOffset = parts[0] === '+' ? minutes : -minutes;\n }\n }]\n };\n parseFlags.dd = parseFlags.d;\n parseFlags.dddd = parseFlags.ddd;\n parseFlags.DD = parseFlags.D;\n parseFlags.mm = parseFlags.m;\n parseFlags.hh = parseFlags.H = parseFlags.HH = parseFlags.h;\n parseFlags.MM = parseFlags.M;\n parseFlags.ss = parseFlags.s;\n parseFlags.A = parseFlags.a; // Some common format strings\n\n fecha.masks = {\n default: 'ddd MMM DD YYYY HH:mm:ss',\n shortDate: 'M/D/YY',\n mediumDate: 'MMM D, YYYY',\n longDate: 'MMMM D, YYYY',\n fullDate: 'dddd, MMMM D, YYYY',\n shortTime: 'HH:mm',\n mediumTime: 'HH:mm:ss',\n longTime: 'HH:mm:ss.SSS'\n };\n /***\n * Format a date\n * @method format\n * @param {Date|number} dateObj\n * @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'\n */\n\n fecha.format = function (dateObj, mask, i18nSettings) {\n var i18n = i18nSettings || fecha.i18n;\n\n if (typeof dateObj === 'number') {\n dateObj = new Date(dateObj);\n }\n\n if (Object.prototype.toString.call(dateObj) !== '[object Date]' || isNaN(dateObj.getTime())) {\n throw new Error('Invalid Date in fecha.format');\n }\n\n mask = fecha.masks[mask] || mask || fecha.masks['default'];\n var literals = []; // Make literals inactive by replacing them with ??\n\n mask = mask.replace(literal, function ($0, $1) {\n literals.push($1);\n return '??';\n }); // Apply formatting rules\n\n mask = mask.replace(token, function ($0) {\n return $0 in formatFlags ? formatFlags[$0](dateObj, i18n) : $0.slice(1, $0.length - 1);\n }); // Inline literal values back into the formatted value\n\n return mask.replace(/\\?\\?/g, function () {\n return literals.shift();\n });\n };\n /**\n * Parse a date string into an object, changes - into /\n * @method parse\n * @param {string} dateStr Date string\n * @param {string} format Date parse format\n * @returns {Date|boolean}\n */\n\n\n fecha.parse = function (dateStr, format, i18nSettings) {\n var i18n = i18nSettings || fecha.i18n;\n\n if (typeof format !== 'string') {\n throw new Error('Invalid format in fecha.parse');\n }\n\n format = fecha.masks[format] || format; // Avoid regular expression denial of service, fail early for really long strings\n // https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS\n\n if (dateStr.length > 1000) {\n return false;\n }\n\n var isValid = true;\n var dateInfo = {};\n format.replace(token, function ($0) {\n if (parseFlags[$0]) {\n var info = parseFlags[$0];\n var index = dateStr.search(info[0]);\n\n if (!~index) {\n isValid = false;\n } else {\n dateStr.replace(info[0], function (result) {\n info[1](dateInfo, result, i18n);\n dateStr = dateStr.substr(index + result.length);\n return result;\n });\n }\n }\n\n return parseFlags[$0] ? '' : $0.slice(1, $0.length - 1);\n });\n\n if (!isValid) {\n return false;\n }\n\n var today = new Date();\n\n if (dateInfo.isPm === true && dateInfo.hour != null && +dateInfo.hour !== 12) {\n dateInfo.hour = +dateInfo.hour + 12;\n } else if (dateInfo.isPm === false && +dateInfo.hour === 12) {\n dateInfo.hour = 0;\n }\n\n var date;\n\n if (dateInfo.timezoneOffset != null) {\n dateInfo.minute = +(dateInfo.minute || 0) - +dateInfo.timezoneOffset;\n date = new Date(Date.UTC(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0));\n } else {\n date = new Date(dateInfo.year || today.getFullYear(), dateInfo.month || 0, dateInfo.day || 1, dateInfo.hour || 0, dateInfo.minute || 0, dateInfo.second || 0, dateInfo.millisecond || 0);\n }\n\n return date;\n };\n /* istanbul ignore next */\n\n\n if (typeof module !== 'undefined' && module.exports) {\n module.exports = fecha;\n } else if (typeof define === 'function' && define.amd) {\n define(function () {\n return fecha;\n });\n } else {\n main.fecha = fecha;\n }\n})(this);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fecha/fecha.js\n// module id = 110\n// module chunks = 0 1 2","var isType = require('./is-type');\n\nvar isDate = function isDate(value) {\n return isType(value, 'Date');\n};\n\nmodule.exports = isDate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-date.js\n// module id = 111\n// module chunks = 0 1 2","module.exports = {\n Canvas: require('./canvas'),\n Group: require('./core/group'),\n Shape: require('./core/shape'),\n Arc: require('./shapes/arc'),\n Circle: require('./shapes/circle'),\n Dom: require('./shapes/dom'),\n Ellipse: require('./shapes/ellipse'),\n Fan: require('./shapes/fan'),\n Image: require('./shapes/image'),\n Line: require('./shapes/line'),\n Marker: require('./shapes/marker'),\n Path: require('./shapes/path'),\n Polygon: require('./shapes/polygon'),\n Polyline: require('./shapes/polyline'),\n Rect: require('./shapes/rect'),\n Text: require('./shapes/text'),\n PathSegment: require('./shapes/util/path-segment'),\n PathUtil: require('./util/path'),\n Event: require('./event'),\n EventEmitter: require('./core/event-emitter'),\n // version, etc.\n version: '3.4.10'\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/index.js\n// module id = 112\n// module chunks = 0 1 2","var toString = {}.toString;\n\nvar getType = function getType(value) {\n return toString.call(value).replace(/^\\[object /, '').replace(/\\]$/, '');\n};\n\nmodule.exports = getType;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/get-type.js\n// module id = 113\n// module chunks = 0 1 2","var objectProto = Object.prototype;\n\nvar isPrototype = function isPrototype(value) {\n var Ctor = value && value.constructor;\n var proto = typeof Ctor === 'function' && Ctor.prototype || objectProto;\n return value === proto;\n};\n\nmodule.exports = isPrototype;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/type/is-prototype.js\n// module id = 114\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Element = require('./element');\n\nvar Shape = require('../shapes/index');\n\nvar SHAPE_MAP = {}; // 缓存图形类型\n\nvar INDEX = '_INDEX';\nvar CLONE_CFGS = ['zIndex', 'capture', 'visible'];\n\nfunction getComparer(compare) {\n return function (left, right) {\n var result = compare(left, right);\n return result === 0 ? left[INDEX] - right[INDEX] : result;\n };\n}\n\nfunction find(children, x, y) {\n var rst;\n\n for (var i = children.length - 1; i >= 0; i--) {\n var child = children[i];\n\n if (child._cfg.visible && child._cfg.capture) {\n if (child.isGroup) {\n rst = child.getShape(x, y);\n } else if (child.isHit(x, y)) {\n rst = child;\n }\n }\n\n if (rst) {\n break;\n }\n }\n\n return rst;\n}\n\nfunction _cloneArrayAttr(arr) {\n var result = [];\n\n for (var i = 0; i < arr.length; i++) {\n result.push(arr[i]);\n }\n\n return result;\n}\n\nvar Group = function Group(cfg) {\n Group.superclass.constructor.call(this, cfg);\n this.set('children', []);\n this.set('tobeRemoved', []);\n\n this._beforeRenderUI();\n\n this._renderUI();\n\n this._bindUI();\n};\n\nfunction initClassCfgs(c) {\n if (c._cfg || c === Group) {\n return;\n }\n\n var superCon = c.superclass.constructor;\n\n if (superCon && !superCon._cfg) {\n initClassCfgs(superCon);\n }\n\n c._cfg = {};\n Util.merge(c._cfg, superCon._cfg);\n Util.merge(c._cfg, c.CFG);\n}\n\nUtil.extend(Group, Element);\nUtil.augment(Group, {\n isGroup: true,\n type: 'group',\n canFill: true,\n canStroke: true,\n getDefaultCfg: function getDefaultCfg() {\n initClassCfgs(this.constructor);\n return Util.merge({}, this.constructor._cfg);\n },\n _beforeRenderUI: function _beforeRenderUI() {},\n _renderUI: function _renderUI() {},\n _bindUI: function _bindUI() {},\n addShape: function addShape(type, cfg) {\n var canvas = this.get('canvas');\n cfg = cfg || {};\n var shapeType = SHAPE_MAP[type];\n\n if (!shapeType) {\n shapeType = Util.upperFirst(type);\n SHAPE_MAP[type] = shapeType;\n }\n\n if (cfg.attrs && canvas) {\n var attrs = cfg.attrs;\n\n if (type === 'text') {\n // 临时解决\n var topFontFamily = canvas.get('fontFamily');\n\n if (topFontFamily) {\n attrs.fontFamily = attrs.fontFamily ? attrs.fontFamily : topFontFamily;\n }\n }\n }\n\n cfg.canvas = canvas;\n cfg.type = type;\n var rst = new Shape[shapeType](cfg);\n this.add(rst);\n return rst;\n },\n\n /** 添加图组\n * @param {Function|Object|undefined} param 图组类\n * @param {Object} cfg 配置项\n * @return {Object} rst 图组\n */\n addGroup: function addGroup(param, cfg) {\n var canvas = this.get('canvas');\n var rst;\n cfg = Util.merge({}, cfg);\n\n if (Util.isFunction(param)) {\n if (cfg) {\n cfg.canvas = canvas;\n cfg.parent = this;\n rst = new param(cfg);\n } else {\n rst = new param({\n canvas: canvas,\n parent: this\n });\n }\n\n this.add(rst);\n } else if (Util.isObject(param)) {\n param.canvas = canvas;\n rst = new Group(param);\n this.add(rst);\n } else if (param === undefined) {\n rst = new Group();\n this.add(rst);\n } else {\n return false;\n }\n\n return rst;\n },\n\n /** 绘制背景\n * @param {Array} padding 内边距\n * @param {Attrs} attrs 图形属性\n * @param {Shape} backShape 背景图形\n * @return {Object} 背景层对象\n */\n renderBack: function renderBack(padding, attrs) {\n var backShape = this.get('backShape');\n var innerBox = this.getBBox(); // const parent = this.get('parent'); // getParent\n\n Util.merge(attrs, {\n x: innerBox.minX - padding[3],\n y: innerBox.minY - padding[0],\n width: innerBox.width + padding[1] + padding[3],\n height: innerBox.height + padding[0] + padding[2]\n });\n\n if (backShape) {\n backShape.attr(attrs);\n } else {\n backShape = this.addShape('rect', {\n zIndex: -1,\n attrs: attrs\n });\n }\n\n this.set('backShape', backShape);\n this.sort();\n return backShape;\n },\n removeChild: function removeChild(item, destroy) {\n if (arguments.length >= 2) {\n if (this.contain(item)) {\n item.remove(destroy);\n }\n } else {\n if (arguments.length === 1) {\n if (Util.isBoolean(item)) {\n destroy = item;\n } else {\n if (this.contain(item)) {\n item.remove(true);\n }\n\n return this;\n }\n }\n\n if (arguments.length === 0) {\n destroy = true;\n }\n\n Group.superclass.remove.call(this, destroy);\n }\n\n return this;\n },\n\n /**\n * 向组中添加shape或者group\n * @param {Object} items 图形或者分组\n * @return {Object} group 本尊\n */\n add: function add(items) {\n var self = this;\n var children = self.get('children');\n\n if (Util.isArray(items)) {\n Util.each(items, function (item) {\n var parent = item.get('parent');\n\n if (parent) {\n parent.removeChild(item, false);\n }\n\n self._setCfgProperty(item);\n });\n self._cfg.children = children.concat(items);\n } else {\n var item = items;\n var parent = item.get('parent');\n\n if (parent) {\n parent.removeChild(item, false);\n }\n\n self._setCfgProperty(item);\n\n children.push(item);\n }\n\n return self;\n },\n _setCfgProperty: function _setCfgProperty(item) {\n var cfg = this._cfg;\n item.set('parent', this);\n item.set('canvas', cfg.canvas);\n\n if (cfg.timeline) {\n item.set('timeline', cfg.timeline);\n }\n },\n contain: function contain(item) {\n var children = this.get('children');\n return children.indexOf(item) > -1;\n },\n getChildByIndex: function getChildByIndex(index) {\n var children = this.get('children');\n return children[index];\n },\n getFirst: function getFirst() {\n return this.getChildByIndex(0);\n },\n getLast: function getLast() {\n var lastIndex = this.get('children').length - 1;\n return this.getChildByIndex(lastIndex);\n },\n getBBox: function getBBox() {\n var self = this;\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n var children = self.get('children');\n\n if (children.length > 0) {\n Util.each(children, function (child) {\n if (child.get('visible')) {\n if (child.isGroup && child.get('children').length === 0) {\n return;\n }\n\n var _box = child.getBBox();\n\n if (!_box) {\n return true;\n }\n\n var leftTop = [_box.minX, _box.minY, 1];\n var leftBottom = [_box.minX, _box.maxY, 1];\n var rightTop = [_box.maxX, _box.minY, 1];\n var rightBottom = [_box.maxX, _box.maxY, 1];\n child.apply(leftTop);\n child.apply(leftBottom);\n child.apply(rightTop);\n child.apply(rightBottom);\n var boxMinX = Math.min(leftTop[0], leftBottom[0], rightTop[0], rightBottom[0]);\n var boxMaxX = Math.max(leftTop[0], leftBottom[0], rightTop[0], rightBottom[0]);\n var boxMinY = Math.min(leftTop[1], leftBottom[1], rightTop[1], rightBottom[1]);\n var boxMaxY = Math.max(leftTop[1], leftBottom[1], rightTop[1], rightBottom[1]);\n\n if (boxMinX < minX) {\n minX = boxMinX;\n }\n\n if (boxMaxX > maxX) {\n maxX = boxMaxX;\n }\n\n if (boxMinY < minY) {\n minY = boxMinY;\n }\n\n if (boxMaxY > maxY) {\n maxY = boxMaxY;\n }\n }\n });\n } else {\n minX = 0;\n maxX = 0;\n minY = 0;\n maxY = 0;\n }\n\n var box = {\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY\n };\n box.x = box.minX;\n box.y = box.minY;\n box.width = box.maxX - box.minX;\n box.height = box.maxY - box.minY;\n return box;\n },\n getCount: function getCount() {\n return this.get('children').length;\n },\n sort: function sort() {\n var children = this.get('children'); // 稳定排序\n\n Util.each(children, function (child, index) {\n child[INDEX] = index;\n return child;\n });\n children.sort(getComparer(function (obj1, obj2) {\n return obj1.get('zIndex') - obj2.get('zIndex');\n }));\n return this;\n },\n findById: function findById(id) {\n return this.find(function (item) {\n return item.get('id') === id;\n });\n },\n\n /**\n * 根据查找函数查找分组或者图形\n * @param {Function} fn 匹配函数\n * @return {Canvas.Base} 分组或者图形\n */\n find: function find(fn) {\n if (Util.isString(fn)) {\n return this.findById(fn);\n }\n\n var children = this.get('children');\n var rst = null;\n Util.each(children, function (item) {\n if (fn(item)) {\n rst = item;\n } else if (item.find) {\n rst = item.find(fn);\n }\n\n if (rst) {\n return false;\n }\n });\n return rst;\n },\n\n /**\n * @param {Function} fn filter mathod\n * @return {Array} all the matching shapes and groups\n */\n findAll: function findAll(fn) {\n var children = this.get('children');\n var rst = [];\n var childRst = [];\n Util.each(children, function (item) {\n if (fn(item)) {\n rst.push(item);\n }\n\n if (item.findAllBy) {\n childRst = item.findAllBy(fn);\n rst = rst.concat(childRst);\n }\n });\n return rst;\n },\n\n /**\n * @Deprecated\n * @param {Function} fn filter method\n * @return {Object} found shape or group\n */\n findBy: function findBy(fn) {\n var children = this.get('children');\n var rst = null;\n Util.each(children, function (item) {\n if (fn(item)) {\n rst = item;\n } else if (item.findBy) {\n rst = item.findBy(fn);\n }\n\n if (rst) {\n return false;\n }\n });\n return rst;\n },\n\n /**\n * @Deprecated\n * @param {Function} fn filter mathod\n * @return {Array} all the matching shapes and groups\n */\n findAllBy: function findAllBy(fn) {\n var children = this.get('children');\n var rst = [];\n var childRst = [];\n Util.each(children, function (item) {\n if (fn(item)) {\n rst.push(item);\n }\n\n if (item.findAllBy) {\n childRst = item.findAllBy(fn);\n rst = rst.concat(childRst);\n }\n });\n return rst;\n },\n getShape: function getShape(x, y) {\n var self = this;\n var clip = self._attrs.clip;\n var children = self._cfg.children;\n var rst;\n\n if (clip) {\n var v = [x, y, 1];\n clip.invert(v, self.get('canvas')); // 已经在外面转换\n\n if (clip.isPointInPath(v[0], v[1])) {\n rst = find(children, x, y);\n }\n } else {\n rst = find(children, x, y);\n }\n\n return rst;\n },\n clearTotalMatrix: function clearTotalMatrix() {\n var m = this.get('totalMatrix');\n\n if (m) {\n this.setSilent('totalMatrix', null);\n var children = this._cfg.children;\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n child.clearTotalMatrix();\n }\n }\n },\n clear: function clear(delayRemove) {\n if (this.get('destroyed')) {\n return;\n }\n\n var children = this._cfg.children;\n\n for (var i = children.length - 1; i >= 0; i--) {\n children[i].remove(true, delayRemove);\n }\n\n this._cfg.children = [];\n return this;\n },\n destroy: function destroy() {\n if (this.get('destroyed')) {\n return;\n }\n\n this.clear();\n Group.superclass.destroy.call(this);\n },\n clone: function clone() {\n var self = this;\n var children = self._cfg.children;\n var _attrs = self._attrs;\n var attrs = {};\n Util.each(_attrs, function (i, k) {\n if (k === 'matrix') {\n attrs[k] = _cloneArrayAttr(_attrs[k]);\n } else {\n attrs[k] = _attrs[k];\n }\n });\n var clone = new Group({\n attrs: attrs,\n canvas: self.get('canvas')\n });\n Util.each(children, function (child) {\n clone.add(child.clone());\n }); // 对于一些在 cfg 中的特殊属性做 clone\n\n Util.each(CLONE_CFGS, function (cfg) {\n clone._cfg[cfg] = self._cfg[cfg];\n });\n return clone;\n }\n});\nmodule.exports = Group;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/core/group.js\n// module id = 115\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Attribute = require('./mixin/attribute');\n\nvar Transform = require('./mixin/transform');\n\nvar Animate = require('./mixin/animation');\n\nvar EventEmitter = require('./advanced-event-emitter');\n\nvar Element = function Element(cfg) {\n this._cfg = {\n zIndex: 0,\n capture: true,\n visible: true,\n destroyed: false\n }; // 配置存放地\n\n Util.assign(this._cfg, this.getDefaultCfg(), cfg); // Element.CFG不合并,提升性能 合并默认配置,用户配置->继承默认配置->Element默认配置\n\n this.initAttrs(this._cfg.attrs); // 初始化绘图属性\n\n this._cfg.attrs = {};\n this.initTransform(); // 初始化变换\n\n this.init(); // 类型初始化\n};\n\nElement.CFG = {\n /**\n * 唯一标示\n * @type {Number}\n */\n id: null,\n\n /**\n * Z轴的层叠关系,Z值越大离用户越近\n * @type {Number}\n */\n zIndex: 0,\n\n /**\n * Canvas对象\n * @type: {Object}\n */\n canvas: null,\n\n /**\n * 父元素指针\n * @type {Object}\n */\n parent: null,\n\n /**\n * 用来设置当前对象是否能被捕捉\n * true 能\n * false 不能\n * 对象默认是都可以被捕捉的, 当capture为false时,group.getShape(x, y)方法无法获得该元素\n * 通过将不必要捕捉的元素的该属性设置成false, 来提高捕捉性能\n * @type {Boolean}\n **/\n capture: true,\n\n /**\n * 画布的上下文\n * @type {Object}\n */\n context: null,\n\n /**\n * 是否显示\n * @type {Boolean}\n */\n visible: true,\n\n /**\n * 是否被销毁\n * @type: {Boolean}\n */\n destroyed: false\n};\nUtil.augment(Element, Attribute, Transform, EventEmitter, Animate, {\n init: function init() {\n this.setSilent('animable', true);\n this.setSilent('animating', false); // 初始时不处于动画状态\n },\n getParent: function getParent() {\n return this._cfg.parent;\n },\n\n /**\n * 获取默认的配置信息\n * @protected\n * @return {Object} 默认的属性\n */\n getDefaultCfg: function getDefaultCfg() {\n return {};\n },\n set: function set(name, value) {\n if (name === 'zIndex' && this._beforeSetZIndex) {\n this._beforeSetZIndex(value);\n }\n\n if (name === 'loading' && this._beforeSetLoading) {\n this._beforeSetLoading(value);\n }\n\n this._cfg[name] = value;\n return this;\n },\n // deprecated\n setSilent: function setSilent(name, value) {\n this._cfg[name] = value;\n },\n get: function get(name) {\n return this._cfg[name];\n },\n show: function show() {\n this._cfg.visible = true;\n return this;\n },\n hide: function hide() {\n this._cfg.visible = false;\n return this;\n },\n remove: function remove(destroy, delayRemove) {\n var cfg = this._cfg;\n var parent = cfg.parent;\n var el = cfg.el;\n\n if (parent) {\n Util.remove(parent.get('children'), this);\n }\n\n if (el) {\n if (delayRemove) {\n parent && parent._cfg.tobeRemoved.push(el);\n } else {\n el.parentNode.removeChild(el);\n }\n }\n\n if (destroy || destroy === undefined) {\n this.destroy();\n }\n\n return this;\n },\n destroy: function destroy() {\n var destroyed = this.get('destroyed');\n\n if (destroyed) {\n return;\n }\n\n this._attrs = null;\n this.removeEvent(); // 移除所有的事件\n\n this._cfg = {\n destroyed: true\n };\n },\n toFront: function toFront() {\n var cfg = this._cfg;\n var parent = cfg.parent;\n\n if (!parent) {\n return;\n }\n\n var children = parent._cfg.children;\n var el = cfg.el;\n var index = children.indexOf(this);\n children.splice(index, 1);\n children.push(this);\n\n if (el) {\n el.parentNode.removeChild(el);\n cfg.el = null;\n }\n },\n toBack: function toBack() {\n var cfg = this._cfg;\n var parent = cfg.parent;\n\n if (!parent) {\n return;\n }\n\n var children = parent._cfg.children;\n var el = cfg.el;\n var index = children.indexOf(this);\n children.splice(index, 1);\n children.unshift(this);\n\n if (el) {\n var parentNode = el.parentNode;\n parentNode.removeChild(el);\n parentNode.insertBefore(el, parentNode.firstChild);\n }\n },\n _beforeSetZIndex: function _beforeSetZIndex(zIndex) {\n var parent = this._cfg.parent;\n this._cfg.zIndex = zIndex;\n\n if (!Util.isNil(parent)) {\n parent.sort();\n }\n\n var el = this._cfg.el;\n\n if (el) {\n var children = parent._cfg.children;\n var index = children.indexOf(this);\n var parentNode = el.parentNode;\n parentNode.removeChild(el);\n\n if (index === children.length - 1) {\n parentNode.appendChild(el);\n } else {\n parentNode.insertBefore(el, parentNode.childNodes[index]);\n }\n }\n\n return zIndex;\n },\n _setAttrs: function _setAttrs(attrs) {\n this.attr(attrs);\n return attrs;\n },\n setZIndex: function setZIndex(zIndex) {\n this._cfg.zIndex = zIndex;\n return this._beforeSetZIndex(zIndex);\n },\n clone: function clone() {\n return Util.clone(this);\n },\n getBBox: function getBBox() {}\n});\nmodule.exports = Element;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/core/element.js\n// module id = 116\n// module chunks = 0 1 2","var Util = require('../util/common');\n\nvar slice = Array.prototype.slice;\n\nfunction indexOfCallback(events, callback) {\n var i = events.length;\n\n while (i--) {\n if (events[i].callback === callback) {\n return i;\n }\n }\n\n return -1;\n}\n\nvar EventEmitter = function EventEmitter() {};\n\nUtil.augment(EventEmitter, {\n on: function on(evt, callback, one) {\n var self = this;\n\n if (!Util.isFunction(callback)) {\n throw new TypeError('listener should be a function');\n }\n\n if (!self._cfg._events) {\n self._cfg._events = {};\n }\n\n if (!self._cfg._events[evt]) {\n self._cfg._events[evt] = [];\n }\n\n self._cfg._events[evt].push({\n callback: callback,\n one: one\n });\n\n return this;\n },\n one: function one(evt, callback) {\n this.on(evt, callback, true);\n return this;\n },\n emit: function emit(evt) {\n if (this.get('destroyed')) {\n return;\n }\n\n if (!this._cfg._events || Util.isEmpty(this._cfg._events)) {\n return;\n }\n\n var events = this._cfg._events[evt];\n\n if (Util.isEmpty(events)) {\n return;\n }\n\n var args = arguments;\n var arg = slice.call(args, 1);\n var length = events.length;\n\n for (var i = 0; i < length;) {\n if (!events[i]) {\n continue;\n }\n\n events[i].callback.apply(this, arg);\n\n if (events[i] && events[i].one) {\n events.splice(i, 1);\n length--;\n } else {\n i++;\n }\n }\n },\n trigger: function trigger() {\n this.emit.apply(this, arguments);\n },\n off: function off(evt, callback) {\n var events = this._cfg._events;\n\n if (!events || Util.isEmpty(events)) {\n return;\n }\n\n if (arguments.length === 0) {\n this._cfg._events = {};\n return this;\n }\n\n if (events[evt]) {\n var index = indexOfCallback(events[evt], callback);\n\n if (index >= 0) {\n events[evt].splice(index, 1);\n }\n\n if (events[evt].length === 0) {\n delete events[evt];\n }\n }\n },\n removeEvent: function removeEvent(evt) {\n if (typeof evt === 'undefined') {\n this._cfg._events = {};\n } else {\n delete this._cfg._events[evt];\n }\n\n return this;\n },\n _getEvents: function _getEvents() {\n return this._cfg._events || {};\n }\n});\nmodule.exports = EventEmitter;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/core/event-emitter.js\n// module id = 117\n// module chunks = 0 1 2","var Util = require('../../util/index');\n\nvar vec2 = Util.vec2;\n\nfunction quadraticAt(p0, p1, p2, t) {\n var onet = 1 - t;\n return onet * (onet * p0 + 2 * t * p1) + t * t * p2;\n}\n\nfunction quadraticProjectPoint(x1, y1, x2, y2, x3, y3, x, y, out) {\n var t;\n var interval = 0.005;\n var d = Infinity;\n var d1;\n var v1;\n var v2;\n\n var _t;\n\n var d2;\n var i;\n var EPSILON = 0.0001;\n var v0 = [x, y];\n\n for (_t = 0; _t < 1; _t += 0.05) {\n v1 = [quadraticAt(x1, x2, x3, _t), quadraticAt(y1, y2, y3, _t)];\n d1 = vec2.squaredDistance(v0, v1);\n\n if (d1 < d) {\n t = _t;\n d = d1;\n }\n }\n\n d = Infinity;\n\n for (i = 0; i < 32; i++) {\n if (interval < EPSILON) {\n break;\n }\n\n var prev = t - interval;\n var next = t + interval;\n v1 = [quadraticAt(x1, x2, x3, prev), quadraticAt(y1, y2, y3, prev)];\n d1 = vec2.squaredDistance(v0, v1);\n\n if (prev >= 0 && d1 < d) {\n t = prev;\n d = d1;\n } else {\n v2 = [quadraticAt(x1, x2, x3, next), quadraticAt(y1, y2, y3, next)];\n d2 = vec2.squaredDistance(v0, v2);\n\n if (next <= 1 && d2 < d) {\n t = next;\n d = d2;\n } else {\n interval *= 0.5;\n }\n }\n }\n\n if (out) {\n out.x = quadraticAt(x1, x2, x3, t);\n out.y = quadraticAt(y1, y2, y3, t);\n }\n\n return Math.sqrt(d);\n}\n\nfunction quadraticExtrema(p0, p1, p2) {\n var a = p0 + p2 - 2 * p1;\n\n if (Util.isNumberEqual(a, 0)) {\n return [0.5];\n }\n\n var rst = (p0 - p1) / a;\n\n if (rst <= 1 && rst >= 0) {\n return [rst];\n }\n\n return [];\n}\n\nmodule.exports = {\n at: quadraticAt,\n projectPoint: function projectPoint(x1, y1, x2, y2, x3, y3, x, y) {\n var rst = {};\n quadraticProjectPoint(x1, y1, x2, y2, x3, y3, x, y, rst);\n return rst;\n },\n pointDistance: quadraticProjectPoint,\n extrema: quadraticExtrema\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/math/quadratic.js\n// module id = 118\n// module chunks = 0 1 2","module.exports = {\n xAt: function xAt(psi, rx, ry, cx, t) {\n return rx * Math.cos(psi) * Math.cos(t) - ry * Math.sin(psi) * Math.sin(t) + cx;\n },\n yAt: function yAt(psi, rx, ry, cy, t) {\n return rx * Math.sin(psi) * Math.cos(t) + ry * Math.cos(psi) * Math.sin(t) + cy;\n },\n xExtrema: function xExtrema(psi, rx, ry) {\n return Math.atan(-ry / rx * Math.tan(psi));\n },\n yExtrema: function yExtrema(psi, rx, ry) {\n return Math.atan(ry / (rx * Math.tan(psi)));\n }\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/math/ellipse.js\n// module id = 119\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar ArcMath = require('./math/arc');\n\nvar Arrow = require('./util/arrow');\n\nfunction _getArcX(x, radius, angle) {\n return x + radius * Math.cos(angle);\n}\n\nfunction _getArcY(y, radius, angle) {\n return y + radius * Math.sin(angle);\n}\n\nvar Arc = function Arc(cfg) {\n Arc.superclass.constructor.call(this, cfg);\n};\n\nArc.ATTRS = {\n x: 0,\n y: 0,\n r: 0,\n startAngle: 0,\n endAngle: 0,\n clockwise: false,\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n};\nUtil.extend(Arc, Shape);\nUtil.augment(Arc, {\n canStroke: true,\n type: 'arc',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n x: 0,\n y: 0,\n r: 0,\n startAngle: 0,\n endAngle: 0,\n clockwise: false,\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n };\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n var x = attrs.x,\n y = attrs.y,\n r = attrs.r,\n startAngle = attrs.startAngle,\n endAngle = attrs.endAngle,\n clockwise = attrs.clockwise;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2;\n var box = ArcMath.box(x, y, r, startAngle, endAngle, clockwise);\n box.minX -= halfWidth;\n box.minY -= halfWidth;\n box.maxX += halfWidth;\n box.maxY += halfWidth;\n return box;\n },\n getStartTangent: function getStartTangent() {\n var attrs = this._attrs;\n var x = attrs.x,\n y = attrs.y,\n startAngle = attrs.startAngle,\n r = attrs.r,\n clockwise = attrs.clockwise;\n var diff = Math.PI / 180;\n\n if (clockwise) {\n diff *= -1;\n }\n\n var result = [];\n\n var x1 = _getArcX(x, r, startAngle + diff);\n\n var y1 = _getArcY(y, r, startAngle + diff);\n\n var x2 = _getArcX(x, r, startAngle);\n\n var y2 = _getArcY(y, r, startAngle);\n\n result.push([x1, y1]);\n result.push([x2, y2]);\n return result;\n },\n getEndTangent: function getEndTangent() {\n var attrs = this._attrs;\n var x = attrs.x,\n y = attrs.y,\n endAngle = attrs.endAngle,\n r = attrs.r,\n clockwise = attrs.clockwise;\n var diff = Math.PI / 180;\n var result = [];\n\n if (clockwise) {\n diff *= -1;\n }\n\n var x1 = _getArcX(x, r, endAngle + diff);\n\n var y1 = _getArcY(y, r, endAngle + diff);\n\n var x2 = _getArcX(x, r, endAngle);\n\n var y2 = _getArcY(y, r, endAngle);\n\n result.push([x2, y2]);\n result.push([x1, y1]);\n return result;\n },\n createPath: function createPath(context) {\n var attrs = this._attrs;\n var x = attrs.x,\n y = attrs.y,\n r = attrs.r,\n startAngle = attrs.startAngle,\n endAngle = attrs.endAngle,\n clockwise = attrs.clockwise;\n context = context || self.get('context');\n context.beginPath();\n context.arc(x, y, r, startAngle, endAngle, clockwise);\n },\n afterPath: function afterPath(context) {\n var attrs = this._attrs;\n context = context || this.get('context');\n\n if (attrs.startArrow) {\n var startPoints = this.getStartTangent();\n Arrow.addStartArrow(context, attrs, startPoints[0][0], startPoints[0][1], startPoints[1][0], startPoints[1][1]);\n }\n\n if (attrs.endArrow) {\n var endPoints = this.getEndTangent();\n Arrow.addEndArrow(context, attrs, endPoints[0][0], endPoints[0][1], endPoints[1][0], endPoints[1][1]);\n }\n }\n});\nmodule.exports = Arc;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/arc.js\n// module id = 120\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Circle = function Circle(cfg) {\n Circle.superclass.constructor.call(this, cfg);\n};\n\nCircle.ATTRS = {\n x: 0,\n y: 0,\n r: 0,\n lineWidth: 1\n};\nUtil.extend(Circle, Shape);\nUtil.augment(Circle, {\n canFill: true,\n canStroke: true,\n type: 'circle',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1\n };\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.r;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2 + r;\n return {\n minX: cx - halfWidth,\n minY: cy - halfWidth,\n maxX: cx + halfWidth,\n maxY: cy + halfWidth\n };\n },\n createPath: function createPath(context) {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var r = attrs.r;\n context.beginPath();\n context.arc(cx, cy, r, 0, Math.PI * 2, false);\n context.closePath();\n }\n});\nmodule.exports = Circle;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/circle.js\n// module id = 121\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Dom = function Dom(cfg) {\n Dom.superclass.constructor.call(this, cfg);\n};\n\nUtil.extend(Dom, Shape);\nUtil.augment(Dom, {\n canFill: true,\n canStroke: true,\n type: 'dom',\n calculateBox: function calculateBox() {\n var self = this;\n var attrs = self._attrs;\n var x = attrs.x;\n var y = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2;\n return {\n minX: x - halfWidth,\n minY: y - halfWidth,\n maxX: x + width + halfWidth,\n maxY: y + height + halfWidth\n };\n }\n});\nmodule.exports = Dom;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/dom.js\n// module id = 122\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Ellipse = function Ellipse(cfg) {\n Ellipse.superclass.constructor.call(this, cfg);\n};\n\nEllipse.ATTRS = {\n x: 0,\n y: 0,\n rx: 1,\n ry: 1,\n lineWidth: 1\n};\nUtil.extend(Ellipse, Shape);\nUtil.augment(Ellipse, {\n canFill: true,\n canStroke: true,\n type: 'ellipse',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1\n };\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var rx = attrs.rx;\n var ry = attrs.ry;\n var lineWidth = this.getHitLineWidth();\n var halfXWidth = rx + lineWidth / 2;\n var halfYWidth = ry + lineWidth / 2;\n return {\n minX: cx - halfXWidth,\n minY: cy - halfYWidth,\n maxX: cx + halfXWidth,\n maxY: cy + halfYWidth\n };\n },\n createPath: function createPath(context) {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var rx = attrs.rx;\n var ry = attrs.ry;\n context = context || self.get('context');\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n var m = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n Util.mat3.scale(m, m, [scaleX, scaleY]);\n Util.mat3.translate(m, m, [cx, cy]);\n context.beginPath();\n context.save();\n context.transform(m[0], m[1], m[3], m[4], m[6], m[7]);\n context.arc(0, 0, r, 0, Math.PI * 2);\n context.restore();\n context.closePath();\n }\n});\nmodule.exports = Ellipse;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/ellipse.js\n// module id = 123\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar ArcMath = require('./math/arc');\n\nvar Fan = function Fan(cfg) {\n Fan.superclass.constructor.call(this, cfg);\n};\n\nFan.ATTRS = {\n x: 0,\n y: 0,\n rs: 0,\n re: 0,\n startAngle: 0,\n endAngle: 0,\n clockwise: false,\n lineWidth: 1\n};\nUtil.extend(Fan, Shape);\nUtil.augment(Fan, {\n canFill: true,\n canStroke: true,\n type: 'fan',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n clockwise: false,\n lineWidth: 1,\n rs: 0,\n re: 0\n };\n },\n calculateBox: function calculateBox() {\n var self = this;\n var attrs = self._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var rs = attrs.rs;\n var re = attrs.re;\n var startAngle = attrs.startAngle;\n var endAngle = attrs.endAngle;\n var clockwise = attrs.clockwise;\n var lineWidth = this.getHitLineWidth();\n var boxs = ArcMath.box(cx, cy, rs, startAngle, endAngle, clockwise);\n var boxe = ArcMath.box(cx, cy, re, startAngle, endAngle, clockwise);\n var minX = Math.min(boxs.minX, boxe.minX);\n var minY = Math.min(boxs.minY, boxe.minY);\n var maxX = Math.max(boxs.maxX, boxe.maxX);\n var maxY = Math.max(boxs.maxY, boxe.maxY);\n var halfWidth = lineWidth / 2;\n return {\n minX: minX - halfWidth,\n minY: minY - halfWidth,\n maxX: maxX + halfWidth,\n maxY: maxY + halfWidth\n };\n },\n createPath: function createPath(context) {\n var attrs = this._attrs;\n var cx = attrs.x;\n var cy = attrs.y;\n var rs = attrs.rs;\n var re = attrs.re;\n var startAngle = attrs.startAngle;\n var endAngle = attrs.endAngle;\n var clockwise = attrs.clockwise;\n var ssp = {\n x: Math.cos(startAngle) * rs + cx,\n y: Math.sin(startAngle) * rs + cy\n };\n var sep = {\n x: Math.cos(startAngle) * re + cx,\n y: Math.sin(startAngle) * re + cy\n };\n var esp = {\n x: Math.cos(endAngle) * rs + cx,\n y: Math.sin(endAngle) * rs + cy\n };\n context = context || self.get('context');\n context.beginPath();\n context.moveTo(ssp.x, ssp.y);\n context.lineTo(sep.x, sep.y);\n context.arc(cx, cy, re, startAngle, endAngle, clockwise);\n context.lineTo(esp.x, esp.y);\n context.arc(cx, cy, rs, endAngle, startAngle, !clockwise);\n context.closePath();\n }\n});\nmodule.exports = Fan;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/fan.js\n// module id = 124\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar CImage = function CImage(cfg) {\n CImage.superclass.constructor.call(this, cfg);\n};\n\nCImage.ATTRS = {\n x: 0,\n y: 0,\n img: undefined,\n width: 0,\n height: 0,\n sx: null,\n sy: null,\n swidth: null,\n sheight: null\n};\nUtil.extend(CImage, Shape);\nUtil.augment(CImage, {\n type: 'image',\n isHitBox: function isHitBox() {\n return false;\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n\n if (!this._cfg.attrs || this._cfg.attrs.img !== attrs.img) {\n this._setAttrImg();\n }\n\n var x = attrs.x;\n var y = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n return {\n minX: x,\n minY: y,\n maxX: x + width,\n maxY: y + height\n };\n },\n _beforeSetLoading: function _beforeSetLoading(loading) {\n var canvas = this.get('canvas');\n\n if (loading === false && this.get('toDraw') === true) {\n this._cfg.loading = false;\n canvas.draw();\n }\n\n return loading;\n },\n _setAttrImg: function _setAttrImg() {\n var self = this;\n var attrs = self._attrs;\n var img = attrs.img;\n\n if (Util.isString(img)) {\n var image = new Image();\n\n image.onload = function () {\n if (self.get('destroyed')) return false;\n self.attr('imgSrc', img);\n self.attr('img', image);\n var callback = self.get('callback');\n\n if (callback) {\n callback.call(self);\n }\n\n self.set('loading', false);\n };\n\n image.src = img;\n image.crossOrigin = 'Anonymous';\n self.set('loading', true);\n } else if (img instanceof Image) {\n if (!attrs.width) {\n self.attr('width', img.width);\n }\n\n if (!attrs.height) {\n self.attr('height', img.height);\n }\n\n return img;\n } else if (img instanceof HTMLElement && Util.isString(img.nodeName) && img.nodeName.toUpperCase() === 'CANVAS') {\n if (!attrs.width) {\n self.attr('width', Number(img.getAttribute('width')));\n }\n\n if (!attrs.height) {\n self.attr('height', Number(img.getAttribute('height')));\n }\n\n return img;\n } else if (img instanceof ImageData) {\n if (!attrs.width) {\n self.attr('width', img.width);\n }\n\n if (!attrs.height) {\n self.attr('height', img.height);\n }\n\n return img;\n } else {\n return null;\n }\n },\n drawInner: function drawInner(context) {\n if (this._cfg.hasUpdate) {\n this._setAttrImg();\n }\n\n if (this.get('loading')) {\n this.set('toDraw', true);\n return;\n }\n\n this._drawImage(context);\n\n this._cfg.hasUpdate = false;\n },\n _drawImage: function _drawImage(context) {\n var attrs = this._attrs;\n var x = attrs.x;\n var y = attrs.y;\n var image = attrs.img;\n var width = attrs.width;\n var height = attrs.height;\n var sx = attrs.sx;\n var sy = attrs.sy;\n var swidth = attrs.swidth;\n var sheight = attrs.sheight;\n this.set('toDraw', false);\n var img = image;\n\n if (img instanceof ImageData) {\n img = new Image();\n img.src = image;\n }\n\n if (img instanceof Image || img instanceof HTMLElement && Util.isString(img.nodeName) && img.nodeName.toUpperCase() === 'CANVAS') {\n if (Util.isNil(sx) || Util.isNil(sy) || Util.isNil(swidth) || Util.isNil(sheight)) {\n context.drawImage(img, x, y, width, height);\n return;\n }\n\n if (!Util.isNil(sx) && !Util.isNil(sy) && !Util.isNil(swidth) && !Util.isNil(sheight)) {\n context.drawImage(img, sx, sy, swidth, sheight, x, y, width, height);\n return;\n }\n }\n\n return;\n }\n});\nmodule.exports = CImage;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/image.js\n// module id = 125\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Arrow = require('./util/arrow');\n\nvar LineMath = require('./math/line');\n\nvar Line = function Line(cfg) {\n Line.superclass.constructor.call(this, cfg);\n};\n\nLine.ATTRS = {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n};\nUtil.extend(Line, Shape);\nUtil.augment(Line, {\n canStroke: true,\n type: 'line',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n };\n },\n calculateBox: function calculateBox() {\n var attrs = this._attrs;\n var x1 = attrs.x1,\n y1 = attrs.y1,\n x2 = attrs.x2,\n y2 = attrs.y2;\n var lineWidth = this.getHitLineWidth();\n return LineMath.box(x1, y1, x2, y2, lineWidth);\n },\n createPath: function createPath(context) {\n var self = this;\n var attrs = this._attrs;\n var x1 = attrs.x1,\n y1 = attrs.y1,\n x2 = attrs.x2,\n y2 = attrs.y2; // 如果定义了箭头,并且是自定义箭头,线条相应缩进\n\n if (attrs.startArrow && attrs.startArrow.d) {\n var dist = Arrow.getShortenOffset(x1, y1, x2, y2, attrs.startArrow.d);\n x1 += dist.dx;\n y1 += dist.dy;\n }\n\n if (attrs.endArrow && attrs.endArrow.d) {\n var _dist = Arrow.getShortenOffset(x1, y1, x2, y2, attrs.endArrow.d);\n\n x2 -= _dist.dx;\n y2 -= _dist.dy;\n }\n\n context = context || self.get('context');\n context.beginPath();\n context.moveTo(x1, y1);\n context.lineTo(x2, y2);\n },\n afterPath: function afterPath(context) {\n var self = this;\n var attrs = self._attrs;\n var x1 = attrs.x1,\n y1 = attrs.y1,\n x2 = attrs.x2,\n y2 = attrs.y2;\n context = context || self.get('context');\n\n if (attrs.startArrow) {\n Arrow.addStartArrow(context, attrs, x2, y2, x1, y1);\n }\n\n if (attrs.endArrow) {\n Arrow.addEndArrow(context, attrs, x1, y1, x2, y2);\n }\n },\n getPoint: function getPoint(t) {\n var attrs = this._attrs;\n return {\n x: LineMath.at(attrs.x1, attrs.x2, t),\n y: LineMath.at(attrs.y1, attrs.y2, t)\n };\n }\n});\nmodule.exports = Line;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/line.js\n// module id = 126\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar PathSegment = require('./util/path-segment');\n\nvar Format = require('../util/format');\n\nvar Arrow = require('./util/arrow');\n\nvar PathUtil = require('../util/path');\n\nvar CubicMath = require('./math/cubic');\n\nvar Path = function Path(cfg) {\n Path.superclass.constructor.call(this, cfg);\n};\n\nPath.ATTRS = {\n path: null,\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n};\nUtil.extend(Path, Shape);\nUtil.augment(Path, {\n canFill: true,\n canStroke: true,\n type: 'path',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n };\n },\n _afterSetAttrPath: function _afterSetAttrPath(path) {\n var self = this;\n\n if (Util.isNil(path)) {\n self.setSilent('segments', null);\n self.setSilent('box', undefined);\n return;\n }\n\n var pathArray = Format.parsePath(path);\n var preSegment;\n var segments = [];\n\n if (!Util.isArray(pathArray) || pathArray.length === 0 || pathArray[0][0] !== 'M' && pathArray[0][0] !== 'm') {\n return;\n }\n\n var count = pathArray.length;\n\n for (var i = 0; i < pathArray.length; i++) {\n var item = pathArray[i];\n preSegment = new PathSegment(item, preSegment, i === count - 1);\n segments.push(preSegment);\n }\n\n self.setSilent('segments', segments);\n self.setSilent('tCache', null);\n self.setSilent('totalLength', null);\n self.setSilent('box', null);\n },\n calculateBox: function calculateBox() {\n var self = this;\n var segments = self.get('segments');\n\n if (!segments) {\n return null;\n }\n\n var lineWidth = this.getHitLineWidth();\n var minX = Infinity;\n var maxX = -Infinity;\n var minY = Infinity;\n var maxY = -Infinity;\n Util.each(segments, function (segment) {\n segment.getBBox(lineWidth);\n var box = segment.box;\n\n if (box) {\n if (box.minX < minX) {\n minX = box.minX;\n }\n\n if (box.maxX > maxX) {\n maxX = box.maxX;\n }\n\n if (box.minY < minY) {\n minY = box.minY;\n }\n\n if (box.maxY > maxY) {\n maxY = box.maxY;\n }\n }\n });\n\n if (minX === Infinity || minY === Infinity) {\n return {\n minX: 0,\n minY: 0,\n maxX: 0,\n maxY: 0\n };\n }\n\n return {\n minX: minX,\n minY: minY,\n maxX: maxX,\n maxY: maxY\n };\n },\n _setTcache: function _setTcache() {\n var totalLength = 0;\n var tempLength = 0;\n var tCache = [];\n var segmentT;\n var segmentL;\n var segmentN;\n var l;\n var curve = this._cfg.curve;\n\n if (!curve) {\n return;\n }\n\n Util.each(curve, function (segment, i) {\n segmentN = curve[i + 1];\n l = segment.length;\n\n if (segmentN) {\n totalLength += CubicMath.len(segment[l - 2], segment[l - 1], segmentN[1], segmentN[2], segmentN[3], segmentN[4], segmentN[5], segmentN[6]);\n }\n });\n this._cfg.totalLength = totalLength;\n\n if (totalLength === 0) {\n this._cfg.tCache = [];\n return;\n }\n\n Util.each(curve, function (segment, i) {\n segmentN = curve[i + 1];\n l = segment.length;\n\n if (segmentN) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = CubicMath.len(segment[l - 2], segment[l - 1], segmentN[1], segmentN[2], segmentN[3], segmentN[4], segmentN[5], segmentN[6]);\n tempLength += segmentL;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this._cfg.tCache = tCache;\n },\n getTotalLength: function getTotalLength() {\n var totalLength = this.get('totalLength');\n\n if (!Util.isNil(totalLength)) {\n return totalLength;\n }\n\n this._calculateCurve();\n\n this._setTcache();\n\n return this.get('totalLength');\n },\n _calculateCurve: function _calculateCurve() {\n var self = this;\n var attrs = self._attrs;\n var path = attrs.path;\n this._cfg.curve = PathUtil.pathTocurve(path);\n },\n getStartTangent: function getStartTangent() {\n var segments = this.get('segments');\n var startPoint, endPoint, tangent, result;\n\n if (segments.length > 1) {\n startPoint = segments[0].endPoint;\n endPoint = segments[1].endPoint;\n tangent = segments[1].startTangent;\n result = [];\n\n if (Util.isFunction(tangent)) {\n var v = tangent();\n result.push([startPoint.x - v[0], startPoint.y - v[1]]);\n result.push([startPoint.x, startPoint.y]);\n } else {\n result.push([endPoint.x, endPoint.y]);\n result.push([startPoint.x, startPoint.y]);\n }\n }\n\n return result;\n },\n getEndTangent: function getEndTangent() {\n var segments = this.get('segments');\n var segmentsLen = segments.length;\n var startPoint, endPoint, tangent, result;\n\n if (segmentsLen > 1) {\n startPoint = segments[segmentsLen - 2].endPoint;\n endPoint = segments[segmentsLen - 1].endPoint;\n tangent = segments[segmentsLen - 1].endTangent;\n result = [];\n\n if (Util.isFunction(tangent)) {\n var v = tangent();\n result.push([endPoint.x - v[0], endPoint.y - v[1]]);\n result.push([endPoint.x, endPoint.y]);\n } else {\n result.push([startPoint.x, startPoint.y]);\n result.push([endPoint.x, endPoint.y]);\n }\n }\n\n return result;\n },\n getPoint: function getPoint(t) {\n var tCache = this._cfg.tCache;\n var subt;\n var index;\n\n if (!tCache) {\n this._calculateCurve();\n\n this._setTcache();\n\n tCache = this._cfg.tCache;\n }\n\n var curve = this._cfg.curve;\n\n if (!tCache || tCache.length === 0) {\n if (curve) {\n return {\n x: curve[0][1],\n y: curve[0][2]\n };\n }\n\n return null;\n }\n\n Util.each(tCache, function (v, i) {\n if (t >= v[0] && t <= v[1]) {\n subt = (t - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n var seg = curve[index];\n\n if (Util.isNil(seg) || Util.isNil(index)) {\n return null;\n }\n\n var l = seg.length;\n var nextSeg = curve[index + 1];\n return {\n x: CubicMath.at(seg[l - 2], nextSeg[1], nextSeg[3], nextSeg[5], 1 - subt),\n y: CubicMath.at(seg[l - 1], nextSeg[2], nextSeg[4], nextSeg[6], 1 - subt)\n };\n },\n createPath: function createPath(context) {\n var self = this;\n var attrs = self._attrs;\n var segments = self.get('segments');\n\n if (!Util.isArray(segments)) {\n return;\n }\n\n var segmentsLen = segments.length;\n\n if (segmentsLen === 0) {\n return;\n }\n\n context = context || self.get('context');\n context.beginPath();\n\n if (attrs.startArrow && attrs.startArrow.d) {\n // 如果 startArrow 需要做偏移,为了保证 path 长度一定,需要向内缩进一定距离\n // 如果直接修改 PathSegment 的 params 会导致画布每重绘一次线条便缩短一截\n // 所以在绘制时计算要缩进的距离,直接绘制出来\n var tangent = self.getStartTangent();\n var dist = Arrow.getShortenOffset(tangent[0][0], tangent[0][1], tangent[1][0], tangent[1][1], attrs.startArrow.d);\n segments[0].shortenDraw(context, dist.dx, dist.dy);\n } else {\n segments[0].draw(context);\n }\n\n for (var i = 1; i < segmentsLen - 2; i++) {\n segments[i].draw(context);\n }\n\n if (attrs.endArrow && attrs.endArrow.d) {\n // 如果 endArrow 需要做偏移,跟 startArrow 一样处理\n // 为了防止结尾为 'Z' 的 segment 缩短不起效,需要取最后两个 segment 特殊处理\n var _tangent = self.getEndTangent();\n\n var _dist = Arrow.getShortenOffset(_tangent[0][0], _tangent[0][1], _tangent[1][0], _tangent[1][1], attrs.endArrow.d);\n\n var segment = segments[segmentsLen - 1];\n\n if (segment.command.toUpperCase() === 'Z') {\n if (segments[segmentsLen - 2]) {\n segments[segmentsLen - 2].shortenDraw(context, _dist.dx, _dist.dy);\n }\n\n segment.draw(context);\n } else {\n if (segmentsLen > 2) {\n segments[segmentsLen - 2].draw(context);\n }\n\n segment.shortenDraw(context, _dist.dx, _dist.dy);\n }\n } else {\n if (segments[segmentsLen - 2]) {\n segments[segmentsLen - 2].draw(context);\n }\n\n segments[segmentsLen - 1].draw(context);\n }\n },\n afterPath: function afterPath(context) {\n var self = this;\n var attrs = self._attrs;\n var segments = self.get('segments');\n var path = attrs.path;\n context = context || self.get('context');\n\n if (!Util.isArray(segments)) {\n return;\n }\n\n if (segments.length === 1) {\n return;\n }\n\n if (!attrs.startArrow && !attrs.endArrow) {\n return;\n }\n\n if (path[path.length - 1] === 'z' || path[path.length - 1] === 'Z' || attrs.fill) {\n // 闭合路径不绘制箭头\n return;\n }\n\n var startPoints = self.getStartTangent();\n Arrow.addStartArrow(context, attrs, startPoints[0][0], startPoints[0][1], startPoints[1][0], startPoints[1][1]);\n var endPoints = self.getEndTangent();\n Arrow.addEndArrow(context, attrs, endPoints[0][0], endPoints[0][1], endPoints[1][0], endPoints[1][1]);\n }\n});\nmodule.exports = Path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/path.js\n// module id = 127\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Polygon = function Polygon(cfg) {\n Polygon.superclass.constructor.call(this, cfg);\n};\n\nPolygon.ATTRS = {\n points: null,\n lineWidth: 1\n};\nUtil.extend(Polygon, Shape);\nUtil.augment(Polygon, {\n canFill: true,\n canStroke: true,\n type: 'polygon',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1\n };\n },\n calculateBox: function calculateBox() {\n var self = this;\n var attrs = self._attrs;\n var points = attrs.points;\n var lineWidth = this.getHitLineWidth();\n\n if (!points || points.length === 0) {\n return null;\n }\n\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n Util.each(points, function (point) {\n var x = point[0];\n var y = point[1];\n\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n });\n var halfWidth = lineWidth / 2;\n return {\n minX: minX - halfWidth,\n minY: minY - halfWidth,\n maxX: maxX + halfWidth,\n maxY: maxY + halfWidth\n };\n },\n createPath: function createPath(context) {\n var self = this;\n var attrs = self._attrs;\n var points = attrs.points;\n\n if (points.length < 2) {\n return;\n }\n\n context = context || self.get('context');\n context.beginPath();\n Util.each(points, function (point, index) {\n if (index === 0) {\n context.moveTo(point[0], point[1]);\n } else {\n context.lineTo(point[0], point[1]);\n }\n });\n context.closePath();\n }\n});\nmodule.exports = Polygon;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/polygon.js\n// module id = 128\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar Arrow = require('./util/arrow');\n\nvar LineMath = require('./math/line');\n\nvar Polyline = function Polyline(cfg) {\n Polyline.superclass.constructor.call(this, cfg);\n};\n\nPolyline.ATTRS = {\n points: null,\n lineWidth: 1,\n startArrow: false,\n endArrow: false,\n tCache: null\n};\nUtil.extend(Polyline, Shape);\nUtil.augment(Polyline, {\n canStroke: true,\n type: 'polyline',\n tCache: null,\n // 缓存各点的t\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1,\n startArrow: false,\n endArrow: false\n };\n },\n calculateBox: function calculateBox() {\n var self = this;\n var attrs = self._attrs;\n var lineWidth = this.getHitLineWidth();\n var points = attrs.points;\n\n if (!points || points.length === 0) {\n return null;\n }\n\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n Util.each(points, function (point) {\n var x = point[0];\n var y = point[1];\n\n if (x < minX) {\n minX = x;\n }\n\n if (x > maxX) {\n maxX = x;\n }\n\n if (y < minY) {\n minY = y;\n }\n\n if (y > maxY) {\n maxY = y;\n }\n });\n var halfWidth = lineWidth / 2;\n return {\n minX: minX - halfWidth,\n minY: minY - halfWidth,\n maxX: maxX + halfWidth,\n maxY: maxY + halfWidth\n };\n },\n _setTcache: function _setTcache() {\n var self = this;\n var attrs = self._attrs;\n var points = attrs.points;\n var totalLength = 0;\n var tempLength = 0;\n var tCache = [];\n var segmentT;\n var segmentL;\n\n if (!points || points.length === 0) {\n return;\n }\n\n Util.each(points, function (p, i) {\n if (points[i + 1]) {\n totalLength += LineMath.len(p[0], p[1], points[i + 1][0], points[i + 1][1]);\n }\n });\n\n if (totalLength <= 0) {\n return;\n }\n\n Util.each(points, function (p, i) {\n if (points[i + 1]) {\n segmentT = [];\n segmentT[0] = tempLength / totalLength;\n segmentL = LineMath.len(p[0], p[1], points[i + 1][0], points[i + 1][1]);\n tempLength += segmentL;\n segmentT[1] = tempLength / totalLength;\n tCache.push(segmentT);\n }\n });\n this.tCache = tCache;\n },\n createPath: function createPath(context) {\n var self = this;\n var attrs = self._attrs;\n var points = attrs.points;\n var i;\n\n if (points.length < 2) {\n return;\n }\n\n var len = points.length - 1;\n var x1 = points[0][0],\n y1 = points[0][1],\n x2 = points[len][0],\n y2 = points[len][1]; // 如果定义了箭头,并且是自定义箭头,线条相应缩进\n\n if (attrs.startArrow && attrs.startArrow.d) {\n var dist = Arrow.getShortenOffset(points[0][0], points[0][1], points[1][0], points[1][1], attrs.startArrow.d);\n x1 += dist.dx;\n y1 += dist.dy;\n }\n\n if (attrs.endArrow && attrs.endArrow.d) {\n var _dist = Arrow.getShortenOffset(points[len - 1][0], points[len - 1][1], points[len][0], points[len][1], attrs.endArrow.d);\n\n x2 -= _dist.dx;\n y2 -= _dist.dy;\n }\n\n context = context || self.get('context');\n context.beginPath();\n context.moveTo(x1, y1);\n\n for (i = 1; i < len; i++) {\n context.lineTo(points[i][0], points[i][1]);\n }\n\n context.lineTo(x2, y2);\n },\n getStartTangent: function getStartTangent() {\n var points = this.__attrs.points;\n var result = [];\n result.push([points[1][0], points[1][1]]);\n result.push([points[0][0], points[0][1]]);\n return result;\n },\n getEndTangent: function getEndTangent() {\n var points = this.__attrs.points;\n var l = points.length - 1;\n var result = [];\n result.push([points[l - 1][0], points[l - 1][1]]);\n result.push([points[l][0], points[l][1]]);\n return result;\n },\n afterPath: function afterPath(context) {\n var self = this;\n var attrs = self._attrs;\n var points = attrs.points;\n var l = points.length - 1;\n context = context || self.get('context');\n\n if (attrs.startArrow) {\n Arrow.addStartArrow(context, attrs, points[1][0], points[1][1], points[0][0], points[0][1]);\n }\n\n if (attrs.endArrow) {\n Arrow.addEndArrow(context, attrs, points[l - 1][0], points[l - 1][1], points[l][0], points[l][1]);\n }\n },\n getPoint: function getPoint(t) {\n var attrs = this._attrs;\n var points = attrs.points;\n var tCache = this.tCache;\n var subt;\n var index;\n\n if (!tCache) {\n this._setTcache();\n\n tCache = this.tCache;\n }\n\n Util.each(tCache, function (v, i) {\n if (t >= v[0] && t <= v[1]) {\n subt = (t - v[0]) / (v[1] - v[0]);\n index = i;\n }\n });\n return {\n x: LineMath.at(points[index][0], points[index + 1][0], subt),\n y: LineMath.at(points[index][1], points[index + 1][1], subt)\n };\n }\n});\nmodule.exports = Polyline;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/polyline.js\n// module id = 129\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar _require = require('../util/format'),\n parseRadius = _require.parseRadius;\n\nvar Shape = require('../core/shape');\n\nvar Rect = function Rect(cfg) {\n Rect.superclass.constructor.call(this, cfg);\n};\n\nRect.ATTRS = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n radius: 0,\n lineWidth: 1\n};\nUtil.extend(Rect, Shape);\nUtil.augment(Rect, {\n canFill: true,\n canStroke: true,\n type: 'rect',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1,\n radius: 0\n };\n },\n calculateBox: function calculateBox() {\n var self = this;\n var attrs = self._attrs;\n var x = attrs.x;\n var y = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var lineWidth = this.getHitLineWidth();\n var halfWidth = lineWidth / 2;\n return {\n minX: x - halfWidth,\n minY: y - halfWidth,\n maxX: x + width + halfWidth,\n maxY: y + height + halfWidth\n };\n },\n createPath: function createPath(context) {\n var self = this;\n var attrs = self._attrs;\n var x = attrs.x;\n var y = attrs.y;\n var width = attrs.width;\n var height = attrs.height;\n var radius = attrs.radius;\n context = context || self.get('context');\n context.beginPath();\n\n if (radius === 0) {\n // 改成原生的rect方法\n context.rect(x, y, width, height);\n } else {\n var r = parseRadius(radius);\n context.moveTo(x + r.r1, y);\n context.lineTo(x + width - r.r2, y);\n r.r2 !== 0 && context.arc(x + width - r.r2, y + r.r2, r.r2, -Math.PI / 2, 0);\n context.lineTo(x + width, y + height - r.r3);\n r.r3 !== 0 && context.arc(x + width - r.r3, y + height - r.r3, r.r3, 0, Math.PI / 2);\n context.lineTo(x + r.r4, y + height);\n r.r4 !== 0 && context.arc(x + r.r4, y + height - r.r4, r.r4, Math.PI / 2, Math.PI);\n context.lineTo(x, y + r.r1);\n r.r1 !== 0 && context.arc(x + r.r1, y + r.r1, r.r1, Math.PI, Math.PI * 1.5);\n context.closePath();\n }\n }\n});\nmodule.exports = Rect;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/rect.js\n// module id = 130\n// module chunks = 0 1 2","var Util = require('../util/index');\n\nvar Shape = require('../core/shape');\n\nvar CText = function CText(cfg) {\n CText.superclass.constructor.call(this, cfg);\n};\n\nCText.ATTRS = {\n x: 0,\n y: 0,\n text: null,\n fontSize: 12,\n fontFamily: 'sans-serif',\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontVariant: 'normal',\n textAlign: 'start',\n textBaseline: 'bottom',\n lineHeight: null,\n textArr: null\n};\nUtil.extend(CText, Shape);\nUtil.augment(CText, {\n canFill: true,\n canStroke: true,\n type: 'text',\n getDefaultAttrs: function getDefaultAttrs() {\n return {\n lineWidth: 1,\n lineCount: 1,\n fontSize: 12,\n fontFamily: 'sans-serif',\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontVariant: 'normal',\n textAlign: 'start',\n textBaseline: 'bottom'\n };\n },\n initTransform: function initTransform() {\n var fontSize = this._attrs.fontSize;\n\n if (fontSize && +fontSize < 12) {\n // 小于 12 像素的文本进行 scale 处理\n this.transform([['t', -1 * this._attrs.x, -1 * this._attrs.y], ['s', +fontSize / 12, +fontSize / 12], ['t', this._attrs.x, this._attrs.y]]);\n }\n },\n _assembleFont: function _assembleFont() {\n // var self = this;\n var attrs = this._attrs;\n var fontSize = attrs.fontSize;\n var fontFamily = attrs.fontFamily;\n var fontWeight = attrs.fontWeight;\n var fontStyle = attrs.fontStyle; // self.attr('fontStyle');\n\n var fontVariant = attrs.fontVariant; // self.attr('fontVariant');\n // self.attr('font', [fontStyle, fontVariant, fontWeight, fontSize + 'px', fontFamily].join(' '));\n\n attrs.font = [fontStyle, fontVariant, fontWeight, fontSize + 'px', fontFamily].join(' ');\n },\n _setAttrText: function _setAttrText() {\n var attrs = this._attrs;\n var text = attrs.text;\n var textArr = null;\n\n if (Util.isString(text)) {\n if (text.indexOf('\\n') !== -1) {\n textArr = text.split('\\n');\n var lineCount = textArr.length;\n attrs.lineCount = lineCount;\n } else {\n attrs.lineCount = 1;\n }\n }\n\n attrs.textArr = textArr;\n },\n _getTextHeight: function _getTextHeight() {\n var attrs = this._attrs;\n var lineCount = attrs.lineCount;\n var fontSize = attrs.fontSize * 1;\n\n if (lineCount > 1) {\n var spaceingY = this._getSpaceingY();\n\n return fontSize * lineCount + spaceingY * (lineCount - 1);\n }\n\n return fontSize;\n },\n isHitBox: function isHitBox() {\n return false;\n },\n calculateBox: function calculateBox() {\n var self = this;\n var attrs = self._attrs;\n var cfg = this._cfg;\n\n if (!cfg.attrs || cfg.hasUpdate) {\n this._assembleFont();\n\n this._setAttrText();\n }\n\n if (!attrs.textArr) {\n this._setAttrText();\n }\n\n var x = attrs.x;\n var y = attrs.y;\n var width = self.measureText(); // attrs.width\n\n if (!width) {\n // 如果width不存在,四点共其实点\n return {\n minX: x,\n minY: y,\n maxX: x,\n maxY: y\n };\n }\n\n var height = self._getTextHeight(); // attrs.height\n\n\n var textAlign = attrs.textAlign;\n var textBaseline = attrs.textBaseline;\n var lineWidth = self.getHitLineWidth();\n var point = {\n x: x,\n y: y - height\n };\n\n if (textAlign) {\n if (textAlign === 'end' || textAlign === 'right') {\n point.x -= width;\n } else if (textAlign === 'center') {\n point.x -= width / 2;\n }\n }\n\n if (textBaseline) {\n if (textBaseline === 'top') {\n point.y += height;\n } else if (textBaseline === 'middle') {\n point.y += height / 2;\n }\n }\n\n this.set('startPoint', point);\n var halfWidth = lineWidth / 2;\n return {\n minX: point.x - halfWidth,\n minY: point.y - halfWidth,\n maxX: point.x + width + halfWidth,\n maxY: point.y + height + halfWidth\n };\n },\n _getSpaceingY: function _getSpaceingY() {\n var attrs = this._attrs;\n var lineHeight = attrs.lineHeight;\n var fontSize = attrs.fontSize * 1;\n return lineHeight ? lineHeight - fontSize : fontSize * 0.14;\n },\n drawInner: function drawInner(context) {\n var self = this;\n var attrs = self._attrs;\n var cfg = this._cfg;\n\n if (!cfg.attrs || cfg.hasUpdate) {\n this._assembleFont();\n\n this._setAttrText();\n }\n\n context.font = attrs.font;\n var text = attrs.text;\n\n if (!text) {\n return;\n }\n\n var textArr = attrs.textArr;\n var x = attrs.x;\n var y = attrs.y;\n context.beginPath();\n\n if (self.hasStroke()) {\n var strokeOpacity = attrs.strokeOpacity;\n\n if (!Util.isNil(strokeOpacity) && strokeOpacity !== 1) {\n context.globalAlpha = strokeOpacity;\n }\n\n if (textArr) {\n self._drawTextArr(context, false);\n } else {\n context.strokeText(text, x, y);\n }\n\n context.globalAlpha = 1;\n }\n\n if (self.hasFill()) {\n var fillOpacity = attrs.fillOpacity;\n\n if (!Util.isNil(fillOpacity) && fillOpacity !== 1) {\n context.globalAlpha = fillOpacity;\n }\n\n if (textArr) {\n self._drawTextArr(context, true);\n } else {\n context.fillText(text, x, y);\n }\n }\n\n cfg.hasUpdate = false;\n },\n _drawTextArr: function _drawTextArr(context, fill) {\n var textArr = this._attrs.textArr;\n var textBaseline = this._attrs.textBaseline;\n var fontSize = this._attrs.fontSize * 1;\n\n var spaceingY = this._getSpaceingY();\n\n var x = this._attrs.x;\n var y = this._attrs.y;\n var box = this.getBBox();\n var height = box.maxY - box.minY;\n var subY;\n Util.each(textArr, function (subText, index) {\n subY = y + index * (spaceingY + fontSize) - height + fontSize; // bottom;\n\n if (textBaseline === 'middle') subY += height - fontSize - (height - fontSize) / 2;\n if (textBaseline === 'top') subY += height - fontSize;\n\n if (fill) {\n context.fillText(subText, x, subY);\n } else {\n context.strokeText(subText, x, subY);\n }\n });\n },\n measureText: function measureText() {\n var self = this;\n var attrs = self._attrs;\n var text = attrs.text;\n var font = attrs.font;\n var textArr = attrs.textArr;\n var measureWidth;\n var width = 0;\n if (Util.isNil(text)) return undefined;\n var context = document.createElement('canvas').getContext('2d');\n context.save();\n context.font = font;\n\n if (textArr) {\n Util.each(textArr, function (subText) {\n measureWidth = context.measureText(subText).width;\n\n if (width < measureWidth) {\n width = measureWidth;\n }\n\n context.restore();\n });\n } else {\n width = context.measureText(text).width;\n context.restore();\n }\n\n return width;\n }\n});\nmodule.exports = CText;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/g/lib/shapes/text.js\n// module id = 131\n// module chunks = 0 1 2","// tpmt is two power minus ten times t scaled to [0,1]\nexport function tpmt(x) {\n return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-ease/src/math.js\n// module id = 132\n// module chunks = 0 1 2","export { default as interpolate } from \"./src/value\";\nexport { default as interpolateArray } from \"./src/array\";\nexport { default as interpolateBasis } from \"./src/basis\";\nexport { default as interpolateBasisClosed } from \"./src/basisClosed\";\nexport { default as interpolateDate } from \"./src/date\";\nexport { default as interpolateNumber } from \"./src/number\";\nexport { default as interpolateObject } from \"./src/object\";\nexport { default as interpolateRound } from \"./src/round\";\nexport { default as interpolateString } from \"./src/string\";\nexport { interpolateTransformCss, interpolateTransformSvg } from \"./src/transform/index\";\nexport { default as interpolateZoom } from \"./src/zoom\";\nexport { default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed } from \"./src/rgb\";\nexport { default as interpolateHsl, hslLong as interpolateHslLong } from \"./src/hsl\";\nexport { default as interpolateLab } from \"./src/lab\";\nexport { default as interpolateHcl, hclLong as interpolateHclLong } from \"./src/hcl\";\nexport { default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong } from \"./src/cubehelix\";\nexport { default as quantize } from \"./src/quantize\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/index.js\n// module id = 133\n// module chunks = 0 1 2","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-color/src/math.js\n// module id = 134\n// module chunks = 0 1 2","import { rgb as colorRgb } from \"d3-color\";\nimport basis from \"./basis\";\nimport basisClosed from \"./basisClosed\";\nimport nogamma, { gamma } from \"./color\";\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function (t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function (colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i,\n color;\n\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function (t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/rgb.js\n// module id = 135\n// module chunks = 0 1 2","import { basis } from \"./basis\";\nexport default function (values) {\n var n = values.length;\n return function (t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/basisClosed.js\n// module id = 136\n// module chunks = 0 1 2","export default function (x) {\n return function () {\n return x;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/constant.js\n// module id = 137\n// module chunks = 0 1 2","import value from \"./value\";\nexport default function (a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n\n for (; i < nb; ++i) c[i] = b[i];\n\n return function (t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n\n return c;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/array.js\n// module id = 138\n// module chunks = 0 1 2","export default function (a, b) {\n var d = new Date();\n return a = +a, b -= a, function (t) {\n return d.setTime(a + b * t), d;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/date.js\n// module id = 139\n// module chunks = 0 1 2","import value from \"./value\";\nexport default function (a, b) {\n var i = {},\n c = {},\n k;\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function (t) {\n for (k in i) c[k] = i[k](t);\n\n return c;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/object.js\n// module id = 140\n// module chunks = 0 1 2","import number from \"./number\";\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function () {\n return b;\n };\n}\n\nfunction one(b) {\n return function (t) {\n return b(t) + \"\";\n };\n}\n\nexport default function (a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0,\n // scan index for next number in b\n am,\n // current match in a\n bm,\n // current match in b\n bs,\n // string preceding current number in b, if any\n i = -1,\n // index in s\n s = [],\n // string constants and placeholders\n q = []; // number interpolators\n // Coerce inputs to strings.\n\n a = a + \"\", b = b + \"\"; // Interpolate pairs of numbers in a & b.\n\n while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) {\n // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n if ((am = am[0]) === (bm = bm[0])) {\n // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else {\n // interpolate non-matching numbers\n s[++i] = null;\n q.push({\n i: i,\n x: number(am, bm)\n });\n }\n\n bi = reB.lastIndex;\n } // Add remains of b.\n\n\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n } // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n\n\n return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n\n return s.join(\"\");\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/d3-interpolate/src/string.js\n// module id = 141\n// module chunks = 0 1 2","/**\n * @fileOverview Default animation configuration for geoms\n * @author sima.zhang\n */\nvar Util = require('../util');\n\nvar Action = require('./action');\n\nvar defaultAnimationCfg = {\n appear: {\n duration: 450,\n easing: 'easeQuadOut'\n },\n // 初始入场动画配置\n update: {\n duration: 450,\n easing: 'easeQuadInOut'\n },\n // 更新时发生变更的动画配置\n enter: {\n duration: 400,\n easing: 'easeQuadInOut',\n delay: 100\n },\n // 更新时新增元素的入场动画配置\n leave: {\n duration: 350,\n easing: 'easeQuadIn'\n } // 更新时销毁动画配置\n\n};\nvar Animate = {\n line: {\n appear: function appear() {\n return Action.appear.clipIn;\n },\n enter: function enter() {\n return Action.enter.clipIn;\n },\n leave: function leave() {\n return Action.leave.lineWidthOut;\n }\n },\n path: {\n appear: function appear() {\n return Action.appear.clipIn;\n },\n enter: function enter() {\n return Action.enter.clipIn;\n },\n leave: function leave() {\n return Action.leave.lineWidthOut;\n }\n },\n area: {\n appear: function appear() {\n return Action.appear.clipIn;\n },\n enter: function enter() {\n return Action.enter.fadeIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n cfg: {\n appear: {\n duration: 500,\n easing: 'easeQuadOut'\n },\n update: {\n duration: 450,\n easing: 'easeQuadInOut'\n },\n enter: {\n duration: 600,\n delay: 150,\n easing: 'easeQuadInOut'\n },\n leave: {\n easing: 'easeQuadOut',\n duration: 350\n }\n }\n },\n polygon: {\n appear: function appear() {\n return Action.appear.zoomIn;\n },\n enter: function enter() {\n return Action.enter.zoomIn;\n },\n leave: function leave() {\n return Action.leave.zoomOut;\n }\n },\n edge: {\n appear: function appear() {\n return Action.appear.pathIn;\n },\n enter: function enter() {\n return Action.enter.pathIn;\n },\n leave: function leave() {\n return Action.leave.pathOut;\n }\n },\n interval: {\n appear: function appear(coord) {\n var result;\n\n if (coord.isPolar) {\n result = Action.appear.zoomIn;\n\n if (coord.isTransposed || coord.type === 'theta') {\n result = Action.appear.fanIn;\n }\n } else if (coord.isRect) {\n result = coord.isTransposed ? Action.appear.scaleInX : Action.appear.scaleInY;\n } else {\n result = Action.appear.zoomIn;\n }\n\n return result;\n },\n enter: function enter(coord) {\n if (coord.isRect || coord.isTransposed || coord.type === 'theta') {\n return Action.enter.fadeIn;\n }\n\n return Action.enter.zoomIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n update: function update(coord) {\n if (coord.type === 'theta') {\n return Action.update.fanIn;\n }\n }\n },\n point: {\n appear: function appear() {\n return Action.appear.zoomIn;\n },\n enter: function enter() {\n return Action.enter.zoomIn;\n },\n leave: function leave() {\n return Action.leave.zoomOut;\n }\n },\n schema: {\n appear: function appear() {\n return Action.appear.clipIn;\n },\n enter: function enter() {\n return Action.enter.clipIn;\n },\n leave: function leave() {\n return Action.leave.lineWidthOut;\n }\n },\n contour: null,\n heatmap: null,\n label: {\n appear: function appear() {\n return Action.appear.fadeIn;\n },\n enter: function enter() {\n return Action.enter.fadeIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n cfg: {\n appear: {\n duration: 900\n }\n }\n },\n 'axis-label': {\n enter: function enter() {\n return Action.appear.fadeIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n update: function update(coord) {\n if (coord.isPolar) {\n return Action.appear.fadeIn;\n }\n }\n },\n 'axis-ticks': {\n enter: function enter() {\n return Action.appear.fadeIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n update: function update(coord) {\n if (coord.isPolar) {\n return Action.appear.fadeIn;\n }\n }\n },\n 'axis-grid': {\n enter: function enter() {\n return Action.appear.fadeIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n update: function update(coord) {\n if (coord.isPolar) {\n return Action.appear.fadeIn;\n }\n }\n },\n 'axis-grid-rect': {\n enter: function enter() {\n return Action.appear.fadeIn;\n },\n leave: function leave() {\n return Action.leave.fadeOut;\n },\n update: function update() {\n return Action.leave.fadeIn;\n }\n },\n labelLine: {\n appear: function appear() {\n return Action.appear.pathIn;\n },\n enter: function enter() {\n return Action.enter.pathIn;\n },\n leave: function leave() {\n return Action.leave.pathOut;\n }\n }\n};\nAnimate.Action = Action;\nAnimate.defaultCfg = defaultAnimationCfg; // 获取动画\n\nAnimate.getAnimation = function (geomType, coord, animationType) {\n var geomAnimateCfg = this[geomType];\n\n if (geomAnimateCfg) {\n var animation = geomAnimateCfg[animationType];\n\n if (Util.isFunction(animation)) {\n return animation(coord);\n }\n }\n\n return false;\n}; // 获取动画配置\n\n\nAnimate.getAnimateCfg = function (geomType, animationType) {\n var defaultCfg = defaultAnimationCfg[animationType];\n\n if (this[geomType] && this[geomType].cfg && this[geomType].cfg[animationType]) {\n return Util.deepMix({}, defaultCfg, this[geomType].cfg[animationType]);\n }\n\n return defaultCfg;\n}; // 注册动画\n\n\nAnimate.registerAnimation = function (animationType, animationName, animationFun) {\n if (!this.Action[animationType]) {\n this.Action[animationType] = {};\n }\n\n this.Action[animationType][animationName] = animationFun;\n};\n\nmodule.exports = Animate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/animate/animate.js\n// module id = 142\n// module chunks = 0 1 2","var each = require('./each');\n\nvar mix = require('./mix'); // collections\n\n\nvar DOMUtil = require('./dom/');\n\nvar arrayUtil = require('./array/');\n\nvar eventUtil = require('./event/');\n\nvar formatUtil = require('./format');\n\nvar mathUtil = require('./math/');\n\nvar matrixUtil = require('./matrix/');\n\nvar objectUtil = require('./object/');\n\nvar pathUtil = require('./path/');\n\nvar stringUtil = require('./string/');\n\nvar typeUtil = require('./type/');\n\nvar util = {\n // collections\n DOMUtil: DOMUtil,\n DomUtil: DOMUtil,\n MatrixUtil: matrixUtil,\n PathUtil: pathUtil,\n arrayUtil: arrayUtil,\n domUtil: DOMUtil,\n eventUtil: eventUtil,\n formatUtil: formatUtil,\n mathUtil: mathUtil,\n matrixUtil: matrixUtil,\n objectUtil: objectUtil,\n stringUtil: stringUtil,\n pathUtil: pathUtil,\n typeUtil: typeUtil,\n // others\n augment: require('./augment'),\n clone: require('./clone'),\n debounce: require('./debounce'),\n deepMix: require('./deep-mix'),\n each: each,\n extend: require('./extend'),\n filter: require('./filter'),\n group: require('./group'),\n groupBy: require('./group-by'),\n groupToMap: require('./group-to-map'),\n indexOf: require('./index-of'),\n isEmpty: require('./is-empty'),\n isEqual: require('./is-equal'),\n isEqualWith: require('./is-equal-with'),\n map: require('./map'),\n mix: mix,\n pick: require('./pick'),\n throttle: require('./throttle'),\n toArray: require('./to-array'),\n toString: require('./to-string'),\n uniqueId: require('./unique-id')\n};\neach([DOMUtil, arrayUtil, eventUtil, formatUtil, mathUtil, matrixUtil, objectUtil, pathUtil, stringUtil, typeUtil], function (collection) {\n mix(util, collection);\n});\nmodule.exports = util;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/index.js\n// module id = 143\n// module chunks = 0 1 2","var keys = require('./keys');\n\nvar isNil = require('../type/is-nil');\n\nfunction isMatch(obj, attrs) {\n var _keys = keys(attrs);\n\n var length = _keys.length;\n if (isNil(obj)) return !length;\n\n for (var i = 0; i < length; i += 1) {\n var key = _keys[i];\n\n if (attrs[key] !== obj[key] || !(key in obj)) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = isMatch;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/object/is-match.js\n// module id = 144\n// module chunks = 0 1 2","var each = require('../each');\n\nvar isFunction = require('../type/is-function');\n\nvar keys = Object.keys ? function (obj) {\n return Object.keys(obj);\n} : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(key);\n }\n });\n return result;\n};\nmodule.exports = keys;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/object/keys.js\n// module id = 145\n// module chunks = 0 1 2","var isArrayLike = require('../type/is-array-like');\n\nvar splice = Array.prototype.splice;\n\nvar pullAt = function pullAt(arr, indexes) {\n if (!isArrayLike(arr)) {\n return [];\n }\n\n var length = arr ? indexes.length : 0;\n var last = length - 1;\n\n while (length--) {\n var previous = void 0;\n var index = indexes[length];\n\n if (length === last || index !== previous) {\n previous = index;\n splice.call(arr, index, 1);\n }\n }\n\n return arr;\n};\n\nmodule.exports = pullAt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/array/pull-at.js\n// module id = 146\n// module chunks = 0 1 2","var each = require('../each');\n\nvar contains = require('./contains');\n\nvar uniq = function uniq(arr) {\n var resultArr = [];\n each(arr, function (item) {\n if (!contains(resultArr, item)) {\n resultArr.push(item);\n }\n });\n return resultArr;\n};\n\nmodule.exports = uniq;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/array/uniq.js\n// module id = 147\n// module chunks = 0 1 2","var isArray = require('../type/is-array');\n\nvar isFunction = require('../type/is-function');\n\nvar each = require('../each');\n/**\n * @param {Array} arr The array to iterate over.\n * @param {Function} [fn] The iteratee invoked per element.\n * @return {*} Returns the maximum value.\n * @example\n *\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\n *\n * maxBy(objects, function(o) { return o.n; });\n * // => { 'n': 2 }\n *\n * maxBy(objects, 'n');\n * // => { 'n': 2 }\n */\n\n\nvar maxBy = function maxBy(arr, fn) {\n if (!isArray(arr)) {\n return undefined;\n }\n\n var max = arr[0];\n var maxData = void 0;\n\n if (isFunction(fn)) {\n maxData = fn(arr[0]);\n } else {\n maxData = arr[0][fn];\n }\n\n var data = void 0;\n each(arr, function (val) {\n if (isFunction(fn)) {\n data = fn(val);\n } else {\n data = val[fn];\n }\n\n if (data > maxData) {\n max = val;\n maxData = data;\n }\n });\n return max;\n};\n\nmodule.exports = maxBy;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/max-by.js\n// module id = 148\n// module chunks = 0 1 2","module.exports = parseInt;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/math/to-integer.js\n// module id = 149\n// module chunks = 0 1 2","module.exports = function (obj, key) {\n return obj.hasOwnProperty(key);\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/object/has.js\n// module id = 150\n// module chunks = 0 1 2","var each = require('../each');\n\nvar isFunction = require('../type/is-function');\n\nvar values = Object.values ? function (obj) {\n return Object.values(obj);\n} : function (obj) {\n var result = [];\n each(obj, function (value, key) {\n if (!(isFunction(obj) && key === 'prototype')) {\n result.push(value);\n }\n });\n return result;\n};\nmodule.exports = values;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/object/values.js\n// module id = 151\n// module chunks = 0 1 2","var parsePathArray = require('./parse-path-array');\n\nmodule.exports = function rectPath(x, y, w, h, r) {\n if (r) {\n return [['M', +x + +r, y], ['l', w - r * 2, 0], ['a', r, r, 0, 0, 1, r, r], ['l', 0, h - r * 2], ['a', r, r, 0, 0, 1, -r, r], ['l', r * 2 - w, 0], ['a', r, r, 0, 0, 1, -r, -r], ['l', 0, r * 2 - h], ['a', r, r, 0, 0, 1, r, -r], ['z']];\n }\n\n var res = [['M', x, y], ['l', w, 0], ['l', 0, h], ['l', -w, 0], ['z']];\n res.parsePathArray = parsePathArray;\n return res;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/path/rect-path.js\n// module id = 152\n// module chunks = 0 1 2","var p2s = /,?([a-z]),?/gi;\n\nmodule.exports = function parsePathArray(path) {\n return path.join(',').replace(p2s, '$1');\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/path/parse-path-array.js\n// module id = 153\n// module chunks = 0 1 2","var pathToAbsolute = require('./path2absolute');\n\nvar a2c = function a2c(x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\n // for more information of where this math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n if (rx === ry) {\n rx += 1;\n }\n\n var _120 = Math.PI * 120 / 180;\n\n var rad = Math.PI / 180 * (+angle || 0);\n var res = [];\n var xy = void 0;\n var f1 = void 0;\n var f2 = void 0;\n var cx = void 0;\n var cy = void 0;\n\n var rotate = function rotate(x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad);\n var Y = x * Math.sin(rad) + y * Math.cos(rad);\n return {\n x: X,\n y: Y\n };\n };\n\n if (!recursive) {\n xy = rotate(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotate(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n\n if (x1 === x2 && y1 === y2) {\n // 若弧的起始点和终点重叠则错开一点\n x2 += 1;\n y2 += 1;\n } // const cos = Math.cos(Math.PI / 180 * angle);\n // const sin = Math.sin(Math.PI / 180 * angle);\n\n\n var x = (x1 - x2) / 2;\n var y = (y1 - y2) / 2;\n var h = x * x / (rx * rx) + y * y / (ry * ry);\n\n if (h > 1) {\n h = Math.sqrt(h);\n rx = h * rx;\n ry = h * ry;\n }\n\n var rx2 = rx * rx;\n var ry2 = ry * ry;\n var k = (large_arc_flag === sweep_flag ? -1 : 1) * Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)));\n cx = k * rx * y / ry + (x1 + x2) / 2;\n cy = k * -ry * x / rx + (y1 + y2) / 2;\n f1 = Math.asin(((y1 - cy) / ry).toFixed(9));\n f2 = Math.asin(((y2 - cy) / ry).toFixed(9));\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n f1 < 0 && (f1 = Math.PI * 2 + f1);\n f2 < 0 && (f2 = Math.PI * 2 + f2);\n\n if (sweep_flag && f1 > f2) {\n f1 = f1 - Math.PI * 2;\n }\n\n if (!sweep_flag && f2 > f1) {\n f2 = f2 - Math.PI * 2;\n }\n } else {\n f1 = recursive[0];\n f2 = recursive[1];\n cx = recursive[2];\n cy = recursive[3];\n }\n\n var df = f2 - f1;\n\n if (Math.abs(df) > _120) {\n var f2old = f2;\n var x2old = x2;\n var y2old = y2;\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\n }\n\n df = f2 - f1;\n var c1 = Math.cos(f1);\n var s1 = Math.sin(f1);\n var c2 = Math.cos(f2);\n var s2 = Math.sin(f2);\n var t = Math.tan(df / 4);\n var hx = 4 / 3 * rx * t;\n var hy = 4 / 3 * ry * t;\n var m1 = [x1, y1];\n var m2 = [x1 + hx * s1, y1 - hy * c1];\n var m3 = [x2 + hx * s2, y2 - hy * c2];\n var m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n\n if (recursive) {\n return [m2, m3, m4].concat(res);\n }\n\n res = [m2, m3, m4].concat(res).join().split(',');\n var newres = [];\n\n for (var i = 0, ii = res.length; i < ii; i++) {\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\n }\n\n return newres;\n};\n\nvar l2c = function l2c(x1, y1, x2, y2) {\n return [x1, y1, x2, y2, x2, y2];\n};\n\nvar q2c = function q2c(x1, y1, ax, ay, x2, y2) {\n var _13 = 1 / 3;\n\n var _23 = 2 / 3;\n\n return [_13 * x1 + _23 * ax, _13 * y1 + _23 * ay, _13 * x2 + _23 * ax, _13 * y2 + _23 * ay, x2, y2];\n};\n\nmodule.exports = function pathTocurve(path, path2) {\n var p = pathToAbsolute(path);\n var p2 = path2 && pathToAbsolute(path2);\n var attrs = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null\n };\n var attrs2 = {\n x: 0,\n y: 0,\n bx: 0,\n by: 0,\n X: 0,\n Y: 0,\n qx: null,\n qy: null\n };\n var pcoms1 = []; // path commands of original path p\n\n var pcoms2 = []; // path commands of original path p2\n\n var pfirst = ''; // temporary holder for original path command\n\n var pcom = ''; // holder for previous path command of original path\n\n var ii = void 0;\n\n var processPath = function processPath(path, d, pcom) {\n var nx = void 0,\n ny = void 0;\n\n if (!path) {\n return ['C', d.x, d.y, d.x, d.y, d.x, d.y];\n }\n\n !(path[0] in {\n T: 1,\n Q: 1\n }) && (d.qx = d.qy = null);\n\n switch (path[0]) {\n case 'M':\n d.X = path[1];\n d.Y = path[2];\n break;\n\n case 'A':\n path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));\n break;\n\n case 'S':\n if (pcom === 'C' || pcom === 'S') {\n // In \"S\" case we have to take into account, if the previous command is C/S.\n nx = d.x * 2 - d.bx; // And reflect the previous\n\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\n } else {\n // or some else or nothing\n nx = d.x;\n ny = d.y;\n }\n\n path = ['C', nx, ny].concat(path.slice(1));\n break;\n\n case 'T':\n if (pcom === 'Q' || pcom === 'T') {\n // In \"T\" case we have to take into account, if the previous command is Q/T.\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\n\n d.qy = d.y * 2 - d.qy; // to case \"S\".\n } else {\n // or something else or nothing\n d.qx = d.x;\n d.qy = d.y;\n }\n\n path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\n break;\n\n case 'Q':\n d.qx = path[1];\n d.qy = path[2];\n path = ['C'].concat(q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\n break;\n\n case 'L':\n path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));\n break;\n\n case 'H':\n path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));\n break;\n\n case 'V':\n path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));\n break;\n\n case 'Z':\n path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));\n break;\n\n default:\n break;\n }\n\n return path;\n };\n\n var fixArc = function fixArc(pp, i) {\n if (pp[i].length > 7) {\n pp[i].shift();\n var pi = pp[i];\n\n while (pi.length) {\n pcoms1[i] = 'A'; // if created multiple C:s, their original seg is saved\n\n p2 && (pcoms2[i] = 'A'); // the same as above\n\n pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));\n }\n\n pp.splice(i, 1);\n ii = Math.max(p.length, p2 && p2.length || 0);\n }\n };\n\n var fixM = function fixM(path1, path2, a1, a2, i) {\n if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {\n path2.splice(i, 0, ['M', a2.x, a2.y]);\n a1.bx = 0;\n a1.by = 0;\n a1.x = path1[i][1];\n a1.y = path1[i][2];\n ii = Math.max(p.length, p2 && p2.length || 0);\n }\n };\n\n ii = Math.max(p.length, p2 && p2.length || 0);\n\n for (var i = 0; i < ii; i++) {\n p[i] && (pfirst = p[i][0]); // save current path command\n\n if (pfirst !== 'C') {\n // C is not saved yet, because it may be result of conversion\n pcoms1[i] = pfirst; // Save current path command\n\n i && (pcom = pcoms1[i - 1]); // Get previous path command pcom\n }\n\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\n\n if (pcoms1[i] !== 'A' && pfirst === 'C') pcoms1[i] = 'C'; // A is the only command\n // which may produce multiple C:s\n // so we have to make sure that C is also C in original path\n\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\n\n if (p2) {\n // the same procedures is done to p2\n p2[i] && (pfirst = p2[i][0]);\n\n if (pfirst !== 'C') {\n pcoms2[i] = pfirst;\n i && (pcom = pcoms2[i - 1]);\n }\n\n p2[i] = processPath(p2[i], attrs2, pcom);\n\n if (pcoms2[i] !== 'A' && pfirst === 'C') {\n pcoms2[i] = 'C';\n }\n\n fixArc(p2, i);\n }\n\n fixM(p, p2, attrs, attrs2, i);\n fixM(p2, p, attrs2, attrs, i);\n var seg = p[i];\n var seg2 = p2 && p2[i];\n var seglen = seg.length;\n var seg2len = p2 && seg2.length;\n attrs.x = seg[seglen - 2];\n attrs.y = seg[seglen - 1];\n attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;\n attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;\n attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);\n attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);\n attrs2.x = p2 && seg2[seg2len - 2];\n attrs2.y = p2 && seg2[seg2len - 1];\n }\n\n return p2 ? [p, p2] : p;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/path/path2curve.js\n// module id = 154\n// module chunks = 0 1 2","var parsePathString = require('./parse-path-string');\n\nvar catmullRom2bezier = require('./catmull-rom2bezier');\n\nfunction ellipsePath(x, y, rx, ry, a) {\n var res = [];\n\n if (a === null && ry === null) {\n ry = rx;\n }\n\n x = +x;\n y = +y;\n rx = +rx;\n ry = +ry;\n\n if (a !== null) {\n var rad = Math.PI / 180;\n var x1 = x + rx * Math.cos(-ry * rad);\n var x2 = x + rx * Math.cos(-a * rad);\n var y1 = y + rx * Math.sin(-ry * rad);\n var y2 = y + rx * Math.sin(-a * rad);\n res = [['M', x1, y1], ['A', rx, rx, 0, +(a - ry > 180), 0, x2, y2]];\n } else {\n res = [['M', x, y], ['m', 0, -ry], ['a', rx, ry, 0, 1, 1, 0, 2 * ry], ['a', rx, ry, 0, 1, 1, 0, -2 * ry], ['z']];\n }\n\n return res;\n}\n\nmodule.exports = function pathToAbsolute(pathArray) {\n pathArray = parsePathString(pathArray);\n\n if (!pathArray || !pathArray.length) {\n return [['M', 0, 0]];\n }\n\n var res = [];\n var x = 0;\n var y = 0;\n var mx = 0;\n var my = 0;\n var start = 0;\n var pa0 = void 0;\n var dots = void 0;\n\n if (pathArray[0][0] === 'M') {\n x = +pathArray[0][1];\n y = +pathArray[0][2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n\n var crz = pathArray.length === 3 && pathArray[0][0] === 'M' && pathArray[1][0].toUpperCase() === 'R' && pathArray[2][0].toUpperCase() === 'Z';\n\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\n res.push(r = []);\n pa = pathArray[i];\n pa0 = pa[0];\n\n if (pa0 !== pa0.toUpperCase()) {\n r[0] = pa0.toUpperCase();\n\n switch (r[0]) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +pa[6] + x;\n r[7] = +pa[7] + y;\n break;\n\n case 'V':\n r[1] = +pa[1] + y;\n break;\n\n case 'H':\n r[1] = +pa[1] + x;\n break;\n\n case 'R':\n dots = [x, y].concat(pa.slice(1));\n\n for (var j = 2, jj = dots.length; j < jj; j++) {\n dots[j] = +dots[j] + x;\n dots[++j] = +dots[j] + y;\n }\n\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n break;\n\n case 'O':\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n break;\n\n case 'U':\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n break;\n\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n break;\n // for lint\n\n default:\n for (var _j = 1, _jj = pa.length; _j < _jj; _j++) {\n r[_j] = +pa[_j] + (_j % 2 ? x : y);\n }\n\n }\n } else if (pa0 === 'R') {\n dots = [x, y].concat(pa.slice(1));\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n r = ['R'].concat(pa.slice(-2));\n } else if (pa0 === 'O') {\n res.pop();\n dots = ellipsePath(x, y, pa[1], pa[2]);\n dots.push(dots[0]);\n res = res.concat(dots);\n } else if (pa0 === 'U') {\n res.pop();\n res = res.concat(ellipsePath(x, y, pa[1], pa[2], pa[3]));\n r = ['U'].concat(res[res.length - 1].slice(-2));\n } else {\n for (var k = 0, kk = pa.length; k < kk; k++) {\n r[k] = pa[k];\n }\n }\n\n pa0 = pa0.toUpperCase();\n\n if (pa0 !== 'O') {\n switch (r[0]) {\n case 'Z':\n x = +mx;\n y = +my;\n break;\n\n case 'H':\n x = r[1];\n break;\n\n case 'V':\n y = r[1];\n break;\n\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break;\n // for lint\n\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n }\n }\n\n return res;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/path/path2absolute.js\n// module id = 155\n// module chunks = 0 1 2","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar SPACES = '\\t\\n\\x0B\\f\\r \\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029';\nvar PATH_COMMAND = new RegExp('([a-z])[' + SPACES + ',]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[' + SPACES + ']*,?[' + SPACES + ']*)+)', 'ig');\nvar PATH_VALUES = new RegExp('(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[' + SPACES + ']*,?[' + SPACES + ']*', 'ig'); // Parses given path string into an array of arrays of path segments\n\nmodule.exports = function parsePathString(pathString) {\n if (!pathString) {\n return null;\n }\n\n if ((typeof pathString === 'undefined' ? 'undefined' : _typeof(pathString)) === _typeof([])) {\n return pathString;\n }\n\n var paramCounts = {\n a: 7,\n c: 6,\n o: 2,\n h: 1,\n l: 2,\n m: 2,\n r: 4,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n u: 3,\n z: 0\n };\n var data = [];\n String(pathString).replace(PATH_COMMAND, function (a, b, c) {\n var params = [];\n var name = b.toLowerCase();\n c.replace(PATH_VALUES, function (a, b) {\n b && params.push(+b);\n });\n\n if (name === 'm' && params.length > 2) {\n data.push([b].concat(params.splice(0, 2)));\n name = 'l';\n b = b === 'm' ? 'l' : 'L';\n }\n\n if (name === 'o' && params.length === 1) {\n data.push([b, params[0]]);\n }\n\n if (name === 'r') {\n data.push([b].concat(params));\n } else {\n while (params.length >= paramCounts[name]) {\n data.push([b].concat(params.splice(0, paramCounts[name])));\n\n if (!paramCounts[name]) {\n break;\n }\n }\n }\n });\n return data;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/path/parse-path-string.js\n// module id = 156\n// module chunks = 0 1 2","// http://schepers.cc/getting-to-the-point\nmodule.exports = function catmullRom2bezier(crp, z) {\n var d = [];\n\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\n var p = [{\n x: +crp[i - 2],\n y: +crp[i - 1]\n }, {\n x: +crp[i],\n y: +crp[i + 1]\n }, {\n x: +crp[i + 2],\n y: +crp[i + 3]\n }, {\n x: +crp[i + 4],\n y: +crp[i + 5]\n }];\n\n if (z) {\n if (!i) {\n p[0] = {\n x: +crp[iLen - 2],\n y: +crp[iLen - 1]\n };\n } else if (iLen - 4 === i) {\n p[3] = {\n x: +crp[0],\n y: +crp[1]\n };\n } else if (iLen - 2 === i) {\n p[2] = {\n x: +crp[0],\n y: +crp[1]\n };\n p[3] = {\n x: +crp[2],\n y: +crp[3]\n };\n }\n } else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n } else if (!i) {\n p[0] = {\n x: +crp[i],\n y: +crp[i + 1]\n };\n }\n }\n\n d.push(['C', (-p[0].x + 6 * p[1].x + p[2].x) / 6, (-p[0].y + 6 * p[1].y + p[2].y) / 6, (p[1].x + 6 * p[2].x - p[3].x) / 6, (p[1].y + 6 * p[2].y - p[3].y) / 6, p[2].x, p[2].y]);\n }\n\n return d;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/path/catmull-rom2bezier.js\n// module id = 157\n// module chunks = 0 1 2","var toString = require('../to-string');\n\nvar lowerCase = function lowerCase(str) {\n return toString(str).toLowerCase();\n};\n\nmodule.exports = lowerCase;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/string/lower-case.js\n// module id = 158\n// module chunks = 0 1 2","var toString = require('../to-string');\n\nvar upperCase = function upperCase(str) {\n return toString(str).toUpperCase();\n};\n\nmodule.exports = upperCase;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/string/upper-case.js\n// module id = 159\n// module chunks = 0 1 2","var groupToMap = require('./group-to-map');\n\nvar group = function group(data, condition) {\n if (!condition) {\n return [data];\n }\n\n var groups = groupToMap(data, condition);\n var array = [];\n\n for (var i in groups) {\n array.push(groups[i]);\n }\n\n return array;\n};\n\nmodule.exports = group;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/group.js\n// module id = 160\n// module chunks = 0 1 2","var isFunction = require('./type/is-function');\n\nvar isArray = require('./type/is-array');\n\nvar groupBy = require('./group-by');\n\nvar groupToMap = function groupToMap(data, condition) {\n if (!condition) {\n return {\n 0: data\n };\n }\n\n if (!isFunction(condition)) {\n var paramsCondition = isArray(condition) ? condition : condition.replace(/\\s+/g, '').split('*');\n\n condition = function condition(row) {\n var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序\n\n for (var i = 0, l = paramsCondition.length; i < l; i++) {\n unique += row[paramsCondition[i]] && row[paramsCondition[i]].toString();\n }\n\n return unique;\n };\n }\n\n var groups = groupBy(data, condition);\n return groups;\n};\n\nmodule.exports = groupToMap;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/group-to-map.js\n// module id = 161\n// module chunks = 0 1 2","var each = require('./each');\n\nvar isArray = require('./type/is-array');\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar groupBy = function groupBy(data, condition) {\n if (!condition || !isArray(data)) {\n return data;\n }\n\n var result = {};\n var key = null;\n each(data, function (item) {\n key = condition(item);\n\n if (hasOwnProperty.call(result, key)) {\n result[key].push(item);\n } else {\n result[key] = [item];\n }\n });\n return result;\n};\n\nmodule.exports = groupBy;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/@antv/util/lib/group-by.js\n// module id = 162\n// module chunks = 0 1 2","function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * @fileOverview G2 图表的入口文件\n * @author dxq613@gmail.com\n */\nvar Util = require('../util');\n\nvar View = require('./view');\n\nvar G = require('../renderer');\n\nvar Canvas = G.Canvas;\nvar DomUtil = Util.DomUtil;\n\nvar Global = require('../global');\n\nvar Plot = require('../component/plot');\n\nvar Controller = require('./controller/index');\n\nvar mergeBBox = require('./util/merge-bbox');\n\nvar bboxOfBackPlot = require('./util/bbox-of-back-plot');\n\nvar plotRange2BBox = require('./util/plot-range2bbox');\n\nvar AUTO_STR = 'auto';\n\nfunction _isScaleExist(scales, compareScale) {\n var flag = false;\n Util.each(scales, function (scale) {\n var scaleValues = [].concat(scale.values);\n var compareScaleValues = [].concat(compareScale.values);\n\n if (scale.type === compareScale.type && scale.field === compareScale.field && scaleValues.sort().toString() === compareScaleValues.sort().toString()) {\n flag = true;\n return;\n }\n });\n return flag;\n}\n\nfunction isEqualArray(arr1, arr2) {\n return Util.isEqualWith(arr1, arr2, function (v1, v2) {\n return v1 === v2;\n });\n}\n/**\n * 图表的入口\n * @class Chart\n */\n\n\nvar Chart = /*#__PURE__*/function (_View) {\n _inheritsLoose(Chart, _View);\n\n function Chart() {\n return _View.apply(this, arguments) || this;\n }\n\n var _proto = Chart.prototype;\n\n /**\n * 获取默认的配置属性\n * @protected\n * @return {Object} 默认属性\n */\n _proto.getDefaultCfg = function getDefaultCfg() {\n var viewCfg = _View.prototype.getDefaultCfg.call(this);\n\n return Util.mix(viewCfg, {\n id: null,\n forceFit: false,\n container: null,\n wrapperEl: null,\n canvas: null,\n width: 500,\n height: 500,\n pixelRatio: null,\n backPlot: null,\n frontPlot: null,\n plotBackground: null,\n padding: Global.plotCfg.padding,\n background: null,\n autoPaddingAppend: 5,\n limitInPlot: false,\n renderer: Global.renderer,\n // renderer: 'svg',\n views: []\n });\n };\n\n _proto.init = function init() {\n var self = this;\n var viewTheme = self.get('viewTheme');\n\n self._initCanvas();\n\n self._initPlot();\n\n self._initEvents();\n\n _View.prototype.init.call(this);\n\n var tooltipController = new Controller.Tooltip({\n chart: self,\n viewTheme: viewTheme,\n options: {}\n });\n self.set('tooltipController', tooltipController);\n var legendController = new Controller.Legend({\n chart: self,\n viewTheme: viewTheme\n });\n self.set('legendController', legendController);\n self.set('_id', 'chart'); // 防止同用户设定的 id 同名\n\n self.emit('afterinit'); // 初始化完毕\n };\n\n _proto._isAutoPadding = function _isAutoPadding() {\n var padding = this.get('padding');\n\n if (Util.isArray(padding)) {\n return padding.includes(AUTO_STR);\n }\n\n return padding === AUTO_STR;\n };\n\n _proto._getAutoPadding = function _getAutoPadding() {\n var padding = this.get('padding'); // 图例在最前面的一层\n\n var frontPlot = this.get('frontPlot');\n var frontBBox = frontPlot.getBBox(); // 坐标轴在最后面的一层\n\n var backPlot = this.get('backPlot'); // 这段代码临时处理了title 过长的情况,但是是非常不好的代码\n\n var backBBox = bboxOfBackPlot(backPlot, plotRange2BBox(this.get('plotRange')));\n var box = mergeBBox(frontBBox, backBBox);\n var outter = [0 - box.minY, // 上面超出的部分\n box.maxX - this.get('width'), // 右边超出的部分\n box.maxY - this.get('height'), // 下边超出的部分\n 0 - box.minX]; // 如果原始的 padding 内部存在 'auto' 则替换对应的边\n\n var autoPadding = Util.toAllPadding(padding);\n\n for (var i = 0; i < autoPadding.length; i++) {\n if (autoPadding[i] === AUTO_STR) {\n var tmp = Math.max(0, outter[i]);\n autoPadding[i] = tmp + this.get('autoPaddingAppend');\n }\n }\n\n return autoPadding;\n } // 初始化画布\n ;\n\n _proto._initCanvas = function _initCanvas() {\n var container = this.get('container');\n var id = this.get('id'); // 如果未设置 container 使用 ID, 兼容 2.x 版本\n\n if (!container && id) {\n container = id;\n this.set('container', id);\n }\n\n var width = this.get('width');\n var height = this.get('height');\n\n if (Util.isString(container)) {\n container = document.getElementById(container);\n\n if (!container) {\n throw new Error('Please specify the container for the chart!');\n }\n\n this.set('container', container);\n }\n\n var wrapperEl = DomUtil.createDom('
1
' + ' ' + '' + '