/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { ScatterBase } from "./ScatterBase";
import { IScaleLegendSeries_$type } from "igniteui-angular-core";
import { ISupportsSizeScale_$type } from "./ISupportsSizeScale";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { List$1 } from "igniteui-angular-core";
import { UIElement } from "igniteui-angular-core";
import { Base, typeCast, Point_$type, fromEnum, markType, markDep, enumGetBox, runOn } from "igniteui-angular-core";
import { ActualRange } from "./ActualRange";
import { DependencyProperty } from "igniteui-angular-core";
import { SizeScale } from "./SizeScale";
import { BrushScale } from "./BrushScale";
import { ScatterFrame } from "./ScatterFrame";
import { IChartLegend_$type } from "igniteui-angular-core";
import { ValueBrushScale } from "./ValueBrushScale";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { ScatterBaseView } from "./ScatterBaseView";
import { ScalerParams } from "./ScalerParams";
import { OwnedPoint } from "./OwnedPoint";
import { Dictionary$2 } from "igniteui-angular-core";
import { BubbleMarkerManager } from "./BubbleMarkerManager";
import { IChartItemLegend_$type } from "igniteui-angular-core";
import { IChartScaleLegend_$type } from "igniteui-angular-core";
import { ContentControl } from "igniteui-angular-core";
import { DataContext } from "igniteui-angular-core";
import { DeviceUtils } from "igniteui-angular-core";
import { BrushUtil } from "igniteui-angular-core";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { isNaN_, isInfinity, logBase } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
import { BrushSelectionMode_$type } from "./BrushSelectionMode";
import { ScatterTrendLineManager } from "./ScatterTrendLineManager";
import { Defaults } from "./Defaults";
/**
 * @hidden
 */
export let BubbleSeries = /*@__PURE__*/ (() => {
    class BubbleSeries extends ScatterBase {
        constructor() {
            super();
            this.wz = null;
            this.wy = null;
            this.vm = null;
            this.ve = null;
            this.vd = null;
            this.vc = null;
            this.va = null;
            this.ab = BubbleSeries.$;
            this.r7 = new ScatterFrame();
            this.r9 = new ScatterFrame();
            this.r5 = new ScatterFrame();
        }
        get_c4() {
            return true;
        }
        bx() {
            return new BubbleSeriesView(this);
        }
        l2(a) {
            super.l2(a);
            this.u9 = a;
        }
        gx() {
            return 0.7;
        }
        qb() {
            if (this.qa == 0) {
                return 2;
            }
            return super.qb();
        }
        isAttachedTo(a) {
            return this.a1 == a;
        }
        c3() {
            return true;
        }
        lc(a) {
            super.lc(a);
            if (this.vh != null && this.vm != null && this.vm.count > 0) {
                for (let b = 0; b < this.vm.count; b++) {
                    a(this.vm._inner[b]);
                }
            }
        }
        get vg() {
            return this.vi;
        }
        wx(a) {
            let b = typeCast(CustomPaletteBrushScale.$, this.u8);
            let c = typeCast(ValueBrushScale.$, this.u8);
            let d = this.u8;
            if (b != null && this.ck != null) {
                return b.getBrush1(a, this.ck.count);
            }
            else if (c != null) {
                return c.getBrushByIndex(a, this.vf);
            }
            else if (d != null) {
                return d.getBrush(a);
            }
            return null;
        }
        get legendReady() {
            return this.vi != null && this.vi.count != 0;
        }
        get minScaleText() {
            let a = this.u7(this.vb).b;
            return (Math.round(a * 1000) / 1000).toString();
        }
        get maxScaleText() {
            let a = this.u7(this.vb).a;
            return (Math.round(a * 1000) / 1000).toString();
        }
        forScaleColors(a) {
            for (let b = 0; b < this.vi.count; b++) {
                if (this.u8 == null || !this.u8.isReady) {
                    return false;
                }
                let c = NaN;
                if (this.vf != null) {
                    c = (this.vf.item(b) - this.vf.minimum) / (this.vf.maximum - this.vf.minimum);
                }
                let d = (this.vi.item(b) - this.vi.minimum) / (this.vi.maximum - this.vi.minimum);
                if (isNaN_(c)) {
                    c = 0;
                }
                if (isNaN_(d)) {
                    d = c;
                }
                let e = this.rh;
                let f = this.wx(b);
                let g = f != null ? f : e;
                a(g, d);
            }
            return true;
        }
        hy(a, b) {
            let c = this.js(b);
            if (c == BubbleSeries.$$p[5]) {
                return this.hz(a, b, this.v1);
            }
            if (c == BubbleSeries.$$p[11]) {
                return this.hz(a, b, this.wb);
            }
            if (c == ScatterBase.$$p[10]) {
                return this.hz(a, b, this.ti);
            }
            if (c == ScatterBase.$$p[14]) {
                return this.hz(a, b, this.tq);
            }
            if (c == BubbleSeries.$$p[2]) {
                return this.hz(a, b, this.vw);
            }
            return super.hy(a, b);
        }
        get vi() {
            return this.ve;
        }
        set vi(a) {
            if (this.ve != a) {
                let b = this.vi;
                this.ve = a;
                this.raisePropertyChanged("RadiusColumn", b, this.vi);
            }
        }
        get vh() {
            return this.vd;
        }
        set vh(a) {
            if (this.vd != a) {
                let b = this.vh;
                this.vd = a;
                this.raisePropertyChanged("LabelColumn", b, this.vh);
            }
        }
        get vf() {
            return this.vc;
        }
        set vf(a) {
            if (this.vc != a) {
                let b = this.vf;
                this.vc = a;
                this.raisePropertyChanged("FillColumn", b, this.vf);
            }
        }
        tt(a, b, c, d, e) {
            if (c <= this.s2) {
                b.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, c);
            }
            let f = this.s2;
            let g = this.ck;
            let h;
            let i;
            let j = this.getEffectiveViewport1(a);
            let k = new ScalerParams(0, d, e, this.r1.d, j);
            let l = new ScalerParams(0, d, e, this.r1.e, j);
            let m = false;
            let n = 0;
            if (this.cd != null) {
                if (this.cd.e8()) {
                    let o = this.cd.lh(d, k);
                    m = o.c;
                    n = o.d;
                }
            }
            for (let p = 0; p < c; p++) {
                h = this.sh.item(p);
                i = this.si.item(p);
                let q = { $type: Point_$type, x: this.r1.a.ei(h, k), y: this.r1.b.ei(i, l) };
                if (m) {
                    if (q.x < e.left || q.x > e.right) {
                        if (q.x + n >= e.left && q.x + n <= e.right) {
                            q = { $type: Point_$type, x: q.x + n, y: i };
                        }
                    }
                }
                if (!isInfinity(q.x) && !isInfinity(q.y)) {
                    let r = g.item(p);
                    if (c <= f) {
                        if (!b.g.containsKey(r)) {
                            let s = { $type: Point_$type, x: h, y: i };
                            b.g.addItem(r, ((() => {
                                let $ret = new OwnedPoint();
                                $ret.a = r;
                                $ret.b = s;
                                $ret.c = q;
                                return $ret;
                            })()));
                        }
                    }
                }
            }
        }
        t1(a, b) {
            let c = typeCast(BubbleSeriesView.$, b);
            let d = c.cv;
            d.m = this.vi;
            super.t1(a, b);
            let e = Math.min(this.sh != null ? this.sh.count : 0, this.si != null ? this.si.count : 0);
            if (e < 1) {
                return;
            }
            c.dh();
            c.di();
        }
        wg() {
            if (this.cd == null) {
                return;
            }
            if (this.a1 == null) {
                return;
            }
            if (this.a1.isItemwise) {
                let a = this.a1;
                this.a1.clearLegendItemsForSeries(this);
                this.wf();
                a.renderItemwiseContent(this);
            }
            if (this.a1.isScale) {
                let b = this.a1;
                b.restoreOriginalState();
                b.initializeLegend(this);
            }
        }
        static vn(a, b, c, d, e) {
            if (e <= a || isNaN_(e) || isInfinity(e)) {
                return c;
            }
            if (e >= b) {
                return d;
            }
            let f = c + ((d - c) / (b - a)) * (e - a);
            return f;
        }
        static vo(a, b, c, d, logBase_, e) {
            let f = logBase(e, logBase_);
            let g = logBase(a, logBase_);
            let h = logBase(b, logBase_);
            return BubbleSeries.vn(g, h, c, d, f);
        }
        fb(a, b, c) {
            let d = super.fb(a, b, c);
            if (this.vi == null || this.ck == null || this.vi.count == 0 || this.ck.count != this.vi.count) {
                d = false;
            }
            return d;
        }
        sq(a, b) {
            if (b != 3) {
                return true;
            }
            if (a == null) {
                return true;
            }
            if (this.ti == a || this.tq == a || this.wb == a) {
                return true;
            }
            return false;
        }
        wf() {
            let a = typeCast(IChartLegend_$type, this.a1);
            if (a == null || this.ck == null) {
                return;
            }
            this.vm = new List$1(UIElement.$, 0);
            let b = typeCast(CustomPaletteBrushScale.$, this.u8);
            let c = typeCast(ValueBrushScale.$, this.u8);
            let d = this.u8;
            let e = this.u6();
            let f = e.b;
            let g = e.a;
            let h = this.ck;
            for (let i = 0; i < h.count; i++) {
                let j = null;
                if (c != null && this.vf != null) {
                    let k = this.vf.item(i);
                    j = c.getBrushByRange(k, f, g);
                }
                else if (b != null) {
                    j = b.getBrush1(i, h.count);
                }
                else if (d != null) {
                    j = d.getBrush(i);
                }
                let l = new ContentControl();
                let m = this.vh != null && this.vh.item(i) != null ? this.vh.item(i).toString() : "";
                l.content = ((() => {
                    let $ret = new DataContext();
                    $ret.series = this;
                    $ret.item = h.item(i);
                    $ret.itemBrush = j;
                    $ret.itemLabel = m;
                    return $ret;
                })());
                let n = this.nf;
                if (n == null) {
                    n = this.b0.bl(this.b5);
                }
                l.ah = n;
                this.vm.add(l);
            }
        }
        k3(a, b, c, d) {
            super.k3(a, b, c, d);
            if (this.vb != null) {
                this.vb.aa();
            }
            if (this.u8 != null) {
                this.u8.x();
            }
            this.wg();
        }
        ll() {
            super.ll();
            this.wg();
        }
        lr() {
            super.lr();
            this.wg();
        }
        l7(a, b, c, d) {
            super.l7(a, b, c, d);
            switch (b) {
                case "FastItemsSource":
                    if (this.vb != null) {
                        this.vb.aa();
                    }
                    if (this.u8 != null) {
                        this.u8.x();
                    }
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        c.deregisterColumn(this.vi);
                        c.deregisterColumn(this.vf);
                        c.deregisterColumn(this.vh);
                        this.vi = null;
                        this.vf = null;
                        this.vh = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        this.vi = this.ch(this.wb);
                        if (!stringIsNullOrEmpty(this.vw)) {
                            this.vf = this.ch(this.vw);
                        }
                        this.vh = this.cj(this.v1);
                    }
                    this.ml(false);
                    this.wg();
                    break;
                case BubbleSeries.$$p[11]:
                    if (this.vb != null) {
                        this.vb.aa();
                    }
                    if (this.ck != null) {
                        this.ck.deregisterColumn(this.vi);
                        this.vi = this.ch(this.wb);
                        this.wg();
                    }
                    break;
                case "RadiusColumn":
                    if (this.vb != null) {
                        this.vb.aa();
                    }
                    this.r2.cx.g$i();
                    this.ml(false);
                    this.lt();
                    break;
                case BubbleSeries.$$p[12]:
                    if (c != null) {
                        c.l.remove(this);
                        c.aa();
                    }
                    if (d != null) {
                        d.l.add(this);
                        d.aa();
                    }
                    this.ml(false);
                    this.ls();
                    break;
                case BubbleSeries.$$p[13]:
                    this.ml(false);
                    this.ls();
                    break;
                case "DiscreteLegendItemTemplate":
                    this.wg();
                    break;
                case BubbleSeries.$$p[3]:
                    if (c != null) {
                        c.o.remove(this);
                        c.x();
                    }
                    if (d != null) {
                        d.o.add(this);
                        d.x();
                    }
                    this.ml(false);
                    this.wg();
                    this.ls();
                    break;
                case BubbleSeries.$$p[4]:
                case BubbleSeries.$$p[8]:
                case BubbleSeries.$$p[7]:
                case BubbleSeries.$$p[6]:
                    this.ml(false);
                    this.wg();
                    this.ls();
                    break;
                case "FillColumn":
                    this.ml(false);
                    this.ls();
                    break;
                case BubbleSeries.$$p[2]:
                    if (this.u8 != null) {
                        this.u8.x();
                    }
                    if (this.ck != null) {
                        this.ck.deregisterColumn(this.vf);
                        this.vf = this.ch(this.vw);
                        this.wg();
                    }
                    break;
                case BubbleSeries.$$p[5]:
                    if (this.ck != null) {
                        this.ck.deregisterColumn(this.vh);
                        this.vh = this.cj(this.v1);
                        this.wg();
                    }
                    break;
                case "ActualLegend":
                    let e = typeCast(IChartLegend_$type, c);
                    if (e != null && e.isItemwise) {
                        let f = typeCast(IChartItemLegend_$type, e);
                        f.clearLegendItemsForSeries(this);
                    }
                    if (e != null && e.isScale) {
                        let g = typeCast(IChartScaleLegend_$type, e);
                        let h = true;
                        let i = null;
                        if (this.cd != null) {
                            for (let j of fromEnum(this.cd.series)) {
                                if (j.legend == g) {
                                    i = j;
                                    h = false;
                                }
                            }
                        }
                        if (h) {
                            g.restoreOriginalState();
                        }
                        else {
                            g.initializeLegend(typeCast(IScaleLegendSeries_$type, i));
                        }
                    }
                    this.wg();
                    break;
                case "SeriesViewer":
                    this.wg();
                    break;
            }
        }
        updateSizeScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.vi != null) {
                a.b = this.vi.minimum;
                a.a = this.vi.maximum;
            }
            if (this.vb != null) {
                this.vb.ab(a.b, a.a);
            }
        }
        updateFillScaleGlobals() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.vf != null) {
                a.b = this.vf.minimum;
                a.a = this.vf.maximum;
            }
            if (this.u8 != null) {
                this.u8.z(a.b, a.a);
            }
        }
        u7(a) {
            let b = new ActualRange();
            b.b = NaN;
            b.a = NaN;
            if (this.vi != null) {
                b.b = this.vi.minimum;
                b.a = this.vi.maximum;
            }
            if (a != null) {
                a.x();
                if (this.vl) {
                    b.b = a.globalMinimum;
                    b.a = a.globalMaximum;
                }
            }
            return b;
        }
        u6() {
            let a = new ActualRange();
            a.b = NaN;
            a.a = NaN;
            if (this.vf != null) {
                a.b = this.vf.minimum;
                a.a = this.vf.maximum;
            }
            let b = typeCast(ValueBrushScale.$, this.u8);
            if (b != null) {
                b.s();
                if (this.vj && this.u8.o.count > 1) {
                    a.b = b.q;
                    a.a = b.p;
                }
            }
            return a;
        }
        wi(a, b, c, d) {
            let e = c.width;
            if (!this.b0.bu.isEmpty) {
                e = this.b0.bu.width;
            }
            else if (this.cd != null && !this.cd.to.isEmpty) {
                e = this.cd.to.width;
            }
            let f = DeviceUtils.c(e);
            this.va = this.vb || ((() => {
                let $ret = new SizeScale();
                $ret.minimumValue = f / 10;
                $ret.maximumValue = f / 5;
                return $ret;
            })());
            if (this.va != null) {
                let g = this.va.minimumValue;
                let h = this.va.maximumValue;
                let i = this.va.logarithmBase;
                let j = this.u7(this.va);
                let k = j.b;
                let l = j.a;
                if (this.va.isLogarithmic) {
                    for (let m = 0; m < b.count; m++) {
                        b._inner[m] = BubbleSeries.vo(k, l, g, h, i, b._inner[m]);
                    }
                }
                else {
                    for (let n = 0; n < b.count; n++) {
                        b._inner[n] = BubbleSeries.vn(k, l, g, h, b._inner[n]);
                    }
                }
            }
            let o = 1;
            o = DeviceUtils.d();
            let p = this.vb == null;
            if (d) {
                let q = c.width / e;
                for (let r = 0; r < b.count; r++) {
                    if (p) {
                        b._inner[r] = b._inner[r] / o;
                    }
                    b._inner[r] = b._inner[r] * q;
                }
            }
            for (let s = 0; s < a.count; s++) {
                let t = a._inner[s];
                if (p && !d) {
                    t.width = Math.max(0, b._inner[s] / o);
                    t.height = Math.max(0, b._inner[s] / o);
                }
                else {
                    t.width = Math.max(0, b._inner[s]);
                    t.height = Math.max(0, b._inner[s]);
                }
            }
        }
        wh(a) {
            let b = typeCast(BubbleSeriesView.$, this.bz);
            this.u9.b3 = false;
            if (b != null) {
                b.b3 = false;
            }
            let c = typeCast(CustomPaletteBrushScale.$, this.u8);
            let d = typeCast(ValueBrushScale.$, this.u8);
            let e = this.u8;
            let f = this.u6();
            let g = f.b;
            let h = f.a;
            let i = this.u8 == null || !this.u8.isReady || (d != null && this.vw == null);
            if (i) {
                this.u9.dg();
                if (b != null) {
                    b.dg();
                }
                return;
            }
            this.u9.b3 = true;
            if (b != null) {
                b.b3 = true;
            }
            let j = a.count;
            let k = this.ck;
            for (let l = 0; l < j; l++) {
                let m = a._inner[l];
                let n = typeCast(DataContext.$, m.content);
                if (n != null) {
                    let o = null;
                    let p = k.indexOf(n.item);
                    if (c != null) {
                        o = c.getBrush1(p, k.count);
                    }
                    else if (d != null && this.vf != null) {
                        let q = this.vf.item(p);
                        o = d.getBrushByRange(q, g, h);
                    }
                    else if (e != null) {
                        o = e.getBrush(p);
                    }
                    else {
                        if (this.rj == null) {
                            o = this.rh;
                        }
                        else {
                            o = this.rj;
                        }
                    }
                    let r = null;
                    if (this.rk == null) {
                        r = this.ri;
                    }
                    else {
                        r = this.rk;
                    }
                    if (this.vk && o != null) {
                        r = o;
                    }
                    if (r != null && !isNaN_(this.vq)) {
                        r = BrushUtil.l(r, this.vq);
                    }
                    if (o != null && !isNaN_(this.vp)) {
                        o = BrushUtil.l(o, this.vp);
                    }
                    n.itemBrush = o;
                    n.actualItemBrush = o;
                    n.outline = r;
                }
            }
        }
        getDataLegendSeriesContextAt(a, b) {
            let c = { $type: Point_$type, x: a, y: b };
            let d = this.hv(c);
            let e = d == null ? NaN : this.gd(d, "XMemberPath");
            let f = d == null ? NaN : this.gd(d, "YMemberPath");
            let g = new DataLegendSeriesValueInfo();
            g.a = 13;
            g.l = e;
            g.p = "X";
            g.q = this.ti != null ? this.ti : "X";
            g.r = this.te != null ? this.te : "X:";
            g.s = this.tg != null ? this.tg : "";
            let h = new DataLegendSeriesValueInfo();
            h.l = f;
            h.a = 14;
            h.p = "Y";
            h.q = this.tq != null ? this.tq : "Y";
            h.r = this.tm != null ? this.tm : "Y:";
            h.s = this.to != null ? this.to : "";
            let i = new DataLegendSeriesContext();
            i.f = ((() => {
                let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(g);
                $ret.add(h);
                return $ret;
            })());
            i.b = this.av();
            if (!stringIsNullOrEmpty(this.wb)) {
                let j = d == null ? NaN : this.gd(d, "RadiusMemberPath");
                let k = new DataLegendSeriesValueInfo();
                k.l = j;
                k.a = 11;
                k.p = "Radius";
                k.q = this.wb != null ? this.wb : "Radius";
                k.r = this.v7 != null ? this.v7 : "R:";
                k.s = this.v9 != null ? this.v9 : "";
                i.f.add(k);
            }
            else if (this.va != null) {
                let l = new DataLegendSeriesValueInfo();
                l.l = this.va.maximumValue;
                l.a = 11;
                l.p = "Radius";
                l.q = this.wb != null ? this.wb : "Radius";
                l.r = this.v7 != null ? this.v7 : "R:";
                l.s = this.v9 != null ? this.v9 : "";
                i.f.add(l);
            }
            if (!stringIsNullOrEmpty(this.vw)) {
                let m = d == null ? NaN : this.gd(d, "FillMemberPath");
                let n = new DataLegendSeriesValueInfo();
                n.l = m;
                n.a = 12;
                n.p = "Fill";
                n.q = this.vw != null ? this.vw : "Fill";
                n.r = this.vs != null ? this.vs : "F:";
                n.s = this.vu != null ? this.vu : "";
                i.f.add(n);
            }
            return i;
        }
        get actualMarkerBrush() {
            return this.rh;
        }
    }
    BubbleSeries.$t = markType(BubbleSeries, 'BubbleSeries', ScatterBase.$, [IScaleLegendSeries_$type, ISupportsSizeScale_$type, ISupportsFillScale_$type]);
    BubbleSeries.$$p = markDep(DependencyProperty, PropertyMetadata, BubbleSeries, 'raisePropertyChanged', ['FillMemberAsLegendLabel:vs:wj', [2, null], 'FillMemberAsLegendUnit:vu:wk', [2, null], 'FillMemberPath:vw:wl', [2], 'FillScale:u8:wm', [BrushScale.$], 'FillScaleUseGlobalValues:vj:wn', [0, false], 'LabelMemberPath:v1:wo', [2], 'MarkerBrushBrightness:vp:wp', [1, NaN], 'MarkerOutlineBrightness:vq:wq', [1, NaN], 'MarkerOutlineUsesFillScale:vk:wr', [0, false], 'RadiusMemberAsLegendLabel:v7:ws', [2, null], 'RadiusMemberAsLegendUnit:v9:wt', [2, null], 'RadiusMemberPath:wb:wu', [2, null], 'RadiusScale:vb:wv', [SizeScale.$], 'RadiusScaleUseGlobalValues:vl:ww', [0, false]]);
    return BubbleSeries;
})();
/**
 * @hidden
 */
export let CustomPaletteBrushScale = /*@__PURE__*/ (() => {
    class CustomPaletteBrushScale extends BrushScale {
        constructor() {
            super();
        }
        getBrush1(a, b) {
            if (this.brushes == null || this.brushes.count == 0) {
                return null;
            }
            if (this.brushSelectionMode == 0) {
                return super.getBrush(a % this.brushes.count);
            }
            let c = BubbleSeries.vn(0, b - 1, 0, this.brushes.count - 1, a);
            return this.ab(c);
        }
        get_isReady() {
            return this.brushes != null && this.brushes.count > 0;
        }
    }
    CustomPaletteBrushScale.$t = markType(CustomPaletteBrushScale, 'CustomPaletteBrushScale', BrushScale.$);
    CustomPaletteBrushScale.$$p = markDep(DependencyProperty, PropertyMetadata, CustomPaletteBrushScale, 'v', ['BrushSelectionMode', [BrushSelectionMode_$type, enumGetBox(BrushSelectionMode_$type, 0)]]);
    return CustomPaletteBrushScale;
})();
/**
 * @hidden
 */
export let BubbleSeriesView = /*@__PURE__*/ (() => {
    class BubbleSeriesView extends ScatterBaseView {
        constructor(a) {
            super(a);
            this.df = null;
            this.df = a;
            this.cx = new ScatterTrendLineManager();
        }
        as() {
            super.as();
            if (!this.q) {
                this.b1.qh = Defaults.e;
            }
        }
        cu() {
            return new BubbleMarkerManager((a) => this.cy.item(a), (a) => this.cw.r1.c.item(a), runOn(this, this.c9), runOn(this, this.cr), runOn(this, this.cz));
        }
        dh() {
            let a = this.cv;
            this.df.wi(a.n, a.o, this.bu, this == this.e.bz);
            this.aq();
        }
        di() {
            let a = this.cv;
            this.df.wh(a.n);
        }
        dg() {
            let a = this.cv;
            for (let b of fromEnum(a.n)) {
                let c = typeCast(DataContext.$, b.content);
                if (c != null) {
                    c.itemBrush = null;
                    c.outline = null;
                }
            }
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'><span";
            let b = this.e.a6.a$r(this.e);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            a += ">" + this.df.title + "</span><br/><span>" + "(${item." + this.df.ti + "}, ${item." + this.df.tq + "})</span>";
            if (!stringIsNullOrEmpty(this.df.wb)) {
                a += "<span>, Radius: ${item." + this.df.wb + "}</span>";
            }
            a += "</div>";
            return a;
        }
    }
    BubbleSeriesView.$t = markType(BubbleSeriesView, 'BubbleSeriesView', ScatterBaseView.$);
    return BubbleSeriesView;
})();
