/*
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 { FinancialSeries } from "./FinancialSeries";
import { ITrendLineSeries_$type } from "./ITrendLineSeries";
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { DependencyProperty } from "igniteui-angular-core";
import { TrendLineType_$type } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { PenLineCap_$type } from "igniteui-angular-core";
import { DoubleCollection } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { AxisRange } from "./AxisRange";
import { CategoryFrame } from "./CategoryFrame";
import { Number_$type, typeCast, enumGetBox, EnumUtil, runOn, markType, markDep } from "igniteui-angular-core";
import { Rect } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { FinancialSeriesView } from "./FinancialSeriesView";
import { FinancialBucketCalculator } from "./FinancialBucketCalculator";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { CategorySeries } from "./CategorySeries";
import { NotImplementedException } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
import { Pool$1 } from "igniteui-angular-core";
import { LineGeometry } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { GeometryGroup } from "igniteui-angular-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-angular-core";
import { IndicatorRenderer } from "./IndicatorRenderer";
/**
 * @hidden
 */
export let FinancialIndicator = /*@__PURE__*/ (() => {
    class FinancialIndicator extends FinancialSeries {
        constructor() {
            super();
            this._indicatorColumn = null;
            this.tl = null;
            this.qf = new CategoryFrame(3);
            this.qh = new CategoryFrame(3);
            this.qd = new CategoryFrame(3);
            this.indicatorColumn = new List$1(Number_$type, 0);
            this.tl = new AxisRange(-100, 100);
        }
        get_dq() {
            return true;
        }
        bx() {
            return new FinancialIndicatorView(this);
        }
        ly(a) {
            super.ly(a);
            this.tm = a;
        }
        tz(a) {
            if (this.qx != null && !this.qx.c0()) {
                this.mh(true);
            }
        }
        tr(a, b, c) {
            if (isNaN_(b.x) || isNaN_(b.y)) {
                return false;
            }
            let d = this.qx;
            let e = 0;
            if (d != null) {
                e = d.e3(d.l5);
            }
            if ((a.y >= e && a.y <= b.y) || (a.y <= e && a.y >= b.y)) {
                return true;
            }
            return false;
        }
        bp() {
            if (this.bq == 0) {
                return 1;
            }
            else {
                return super.bp();
            }
        }
        pu(a) {
            if (this.qb == null || this.qx == null) {
                return Rect.empty;
            }
            let b = this.pg(a);
            let c = this.b0.bv;
            let d = this.b0.bu;
            let e = this.getEffectiveViewport1(this.b0);
            let f = new ScalerParams(0, c, d, this.qx.cg, e);
            f.b = this.gc();
            let g = this.aj(this.qb, this.qd.f, this.r8(this.b0), this.sa(this.b0), a, true);
            if (g == null) {
                return Rect.empty;
            }
            let h = g[0];
            let i = g[1];
            let j = Math.abs(b.x - h[0]);
            let k = Math.abs(b.x - i[0]);
            let l = this.qx.ei(this.qx.l5, f);
            let m = 1;
            if (j < k) {
                let n = h[0] - 0.5 * m;
                let o = h[1];
                let p = l;
                return new Rect(0, n, Math.min(o, p), m, Math.max(o, p) - Math.min(o, p));
            }
            else {
                let q = i[0] - 0.5 * m;
                let r = i[1];
                let s = l;
                return new Rect(0, q, Math.min(r, s), m, Math.max(r, s) - Math.min(r, s));
            }
        }
        ev(a, b) {
            let c = this.pl(this.po(a), true, false);
            if (this.to == 1) {
                if (this.tr(a, c, b)) {
                    return true;
                }
            }
            if (this.to == 1 || this.to == 0) {
                if (this.eu(a, b)) {
                    return true;
                }
            }
            if (this.to == 2) {
                if (this.ey(a, b)) {
                    return true;
                }
            }
            return false;
        }
        k0(a, b, c, d) {
            super.k0(a, b, c, d);
            if (this.qb != null && typeCast(ISortingAxis_$type, this.qb) !== null) {
                this.qb.i$i();
            }
            if (this.tm.b7) {
                this.tm.b5.g$e(a, b, c, d);
            }
            if (d != null && this.rn.containsKey(d)) {
                let e = this.rn.tryGetValue(d, d);
                d = e.p1;
            }
            if (this.qb != null && typeCast(ISortingAxis_$type, this.qb) !== null) {
                a = 4;
                b = 0;
                c = this.ck.count;
            }
            switch (a) {
                case 3:
                    if (this.tq(b, c, d)) {
                        this.t1(b, c, d);
                        this.tz(true);
                    }
                    break;
                case 2:
                    if (this.tq(b, this.ck.count - b, d)) {
                        this.t1(b, this.ck.count - b, d);
                        this.tz(true);
                    }
                    break;
                case 1:
                    if (this.tq(b, this.ck.count - b, d)) {
                        let f = new Array(c);
                        for (let g = 0; g < c; g++) {
                            f[g] = 0;
                        }
                        this.indicatorColumn.s(b, f);
                        this.t1(b, this.ck.count - b, d);
                        this.tz(true);
                    }
                    break;
                case 0:
                    if (this.tq(b, this.ck.count - b, d)) {
                        this.indicatorColumn.v(b, c);
                        this.t1(b, this.ck.count - b, d);
                        this.tz(true);
                    }
                    break;
                case 4:
                    if (this.tq(b, this.ck.count - b, d)) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.ck.count);
                        let h = new Array(c);
                        for (let i = 0; i < c; i++) {
                            h[i] = 0;
                        }
                        this.indicatorColumn.s(0, h);
                        this.t1(b, this.ck.count - b, d);
                        this.tz(true);
                    }
                    break;
            }
        }
        get_tn() {
            return 0;
        }
        get tn() {
            return this.get_tn();
        }
        get uc() {
            return this.c(FinancialIndicator.t2);
        }
        set uc(a) {
            this.h(FinancialIndicator.t2, a);
        }
        tw() {
            return -1;
        }
        get indicatorColumn() {
            return this._indicatorColumn;
        }
        set indicatorColumn(a) {
            this._indicatorColumn = a;
        }
        l3(a, b, c, d) {
            switch (b) {
                case "XAxis":
                    this.tm.cd();
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.tm.b5 = CategoryTrendLineManagerFactory.a(this.tm.b5, this.qb, this.m9, this, this.cn);
                    }
                    break;
            }
            super.l3(a, b, c, d);
            if (this.tm.b7 && this.tm.b5.g$b(a, b, c, d)) {
                this.mh(false);
                let f = typeCast(FinancialIndicatorView.$, this.bz);
                if (f != null && f.b7) {
                    f.b5.g$b(a, b, c, d);
                }
                this.lo();
            }
            switch (b) {
                case "FastItemsSource":
                    if (this.ck != null) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.ck.count);
                        let g = new Array(this.ck.count);
                        for (let h = 0; h < this.ck.count; h++) {
                            g[h] = 0;
                        }
                        this.indicatorColumn.s(0, g);
                        this.t1(0, this.ck.count, null);
                        if (this.qx != null && !this.qx.c0()) {
                            this.qs.bx.e(this.ft);
                            this.mh(false);
                        }
                    }
                    break;
                case "TrendLineBrush":
                    this.mv();
                    break;
                case FinancialIndicator.$$p[0]:
                    this.kx(true, this.b0);
                    this.mw();
                    this.mh(false);
                    this.lo();
                    break;
                case "OpenColumn":
                case "HighColumn":
                case "LowColumn":
                case "CloseColumn":
                case "VolumeColumn":
                    if (this.ck != null) {
                        if (this.indicatorColumn.count != this.ck.count) {
                            this.indicatorColumn = new List$1(Number_$type, 2, this.ck.count);
                            let i = new Array(this.ck.count);
                            for (let j = 0; j < this.ck.count; j++) {
                                i[j] = 0;
                            }
                            this.indicatorColumn.s(0, i);
                        }
                        if (this.tq(0, this.ck.count - 1, b)) {
                            this.t0();
                        }
                    }
                    break;
                case "XAxis":
                    if (this.qb != null && (typeCast(ISortingAxis_$type, this.qb) !== null || typeCast(ISortingAxis_$type, c) !== null)) {
                        this.t0();
                    }
                    break;
                case "YAxis":
                case FinancialIndicator.$$p[1]:
                    this.t0();
                    this.lo();
                    break;
                case "TrendLineType":
                    this.lo();
                    break;
            }
        }
        gj(a, b, c) {
            if (this.indicatorColumn == null) {
                return super.gj(a, b, c);
            }
            let d = this.getEffectiveViewport1(this.b0);
            let e = this.r2(this.b0.bv, this.b0.bu, d);
            let f = new ScalerParams(0, this.b0.bv, this.b0.bu, this.qb.cg, d);
            f.c = this.cd.su;
            return this.gl(this.indicatorColumn, a, this.qb, f, e, runOn(this, this.r1), b, c);
        }
        hj(a, b) {
            if (this.indicatorColumn == null) {
                return super.hj(a, b);
            }
            return this.hk(a, b, this.qb, runOn(this, this.r1), this.indicatorColumn);
        }
        hh(a, b) {
            if (this.indicatorColumn == null) {
                return super.hh(a, b);
            }
            return this.hi(a, b, this.qb, runOn(this, this.r1), this.indicatorColumn);
        }
        get_e8() {
            return true;
        }
        tq(a, b, c) {
            if (c == null) {
                return true;
            }
            if (this.ts(a, b).contains(c)) {
                return true;
            }
            return false;
        }
        t1(a, b, c) {
            this.tp(a, b);
        }
        ap(a) {
            if (this.ck == null) {
                return null;
            }
            if (a != null && a == this.qx) {
                return this.tl;
            }
            return null;
        }
        en(a) {
            let b = this.ck != null ? this.ck.indexOf(a) : -1;
            let c = this.b0.bv;
            c = c.copy();
            let d = this.b0.bu;
            let e = new Rect(0, 0, 0, 1, 1);
            let f = this.ps(this.b0);
            if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
                if (this.qb != null) {
                    let g = new ScalerParams(0, e, e, this.qb.cg, f);
                    let h = this.qb.ei(b, g);
                    if (h < c.left + 0.1 * c.width) {
                        h = h + 0.4 * c.width;
                    }
                    if (h > c.right - 0.1 * c.width) {
                        h = h - 0.4 * c.width;
                    }
                    c.x = h - 0.5 * c.width;
                }
                if (this.qx != null && this.indicatorColumn != null && b < this.indicatorColumn.count) {
                    let i = new ScalerParams(0, e, e, this.qx.cg, f);
                    i.b = this.gc();
                    let j = this.qx.ei(this.indicatorColumn._inner[b], i);
                    if (j < c.top + 0.1 * c.height) {
                        j = j + 0.4 * c.height;
                    }
                    if (j > c.bottom - 0.1 * c.height) {
                        j = j - 0.4 * c.height;
                    }
                    c.y = j - 0.5 * c.height;
                }
                this.b8.au(this.cd, c, true);
            }
            return b >= 0;
        }
        e9(a, b, c) {
            let d = super.e9(a, b, c);
            if (this.indicatorColumn == null || this.indicatorColumn.count == 0) {
                d = false;
            }
            return d;
        }
        s2(a, b) {
            super.s2(a, b);
            let c = b.bv;
            let d = b.bu;
            let e = this.getEffectiveViewport1(b);
            let f = this.qb;
            let g = this.qx;
            let h = new ScalerParams(0, c, d, f.cg, e);
            let i = new ScalerParams(0, c, d, g.cg, e);
            i.b = this.gc();
            a.f.clear();
            a.m.clear();
            a.p.clear();
            let j = 0;
            let k = typeCast(ISortingAxis_$type, this.qb);
            if (k != null && k.i$b.count != this.ck.count) {
                return;
            }
            j = this.r2(c, d, e);
            let l = this.tw();
            if (l == -1) {
                l = this.trendLinePeriod;
            }
            let m = typeCast(FinancialIndicatorView.$, b);
            if (m.b7) {
                m.b5.prepareLineCore(a.p, this.trendLineType, this.indicatorColumn, l, (n) => this.qb.ei(n, h), (n) => this.qx.ei(n, i), ((() => {
                    let $ret = new TrendResolutionParams();
                    $ret.c = b.bx.b;
                    $ret.d = b.bx.c;
                    $ret.e = b.bx.d;
                    $ret.a = j;
                    $ret.b = this.ft;
                    $ret.f = d;
                    $ret.g = c;
                    return $ret;
                })()));
            }
            let n = this.qb.el(2, h) - this.qb.el(1, h);
            for (let o = b.bx.c; o <= b.bx.d; ++o) {
                let p;
                if (k == null) {
                    p = b.bx.getBucket(o);
                }
                else {
                    let q = k.i$b._inner[o];
                    let r = k.i$d(q);
                    let s = this.indicatorColumn._inner[o];
                    let t = s;
                    let u = r;
                    while (o < b.bx.d) {
                        q = k.i$b._inner[o + 1];
                        u = k.i$d(q);
                        if (u - r > n) {
                            break;
                        }
                        o++;
                        let v = this.indicatorColumn._inner[o];
                        s = Math.min(s, v);
                        t = Math.max(t, v);
                    }
                    let w = NaN;
                    if (!isNaN_(r)) {
                        w = this.qb.ei(r, h);
                    }
                    p = [w, s, t];
                }
                if (!isNaN_(p[0])) {
                    if (this.qb != null && typeCast(ISortingAxis_$type, this.qb) !== null) {
                        p[0] = p[0] + j;
                    }
                    else {
                        p[0] = f.ei(p[0], h) + j;
                    }
                    p[1] = g.ei(p[1], i);
                    if (b.bx.b > 1 || k != null) {
                        p[2] = g.ei(p[2], i);
                    }
                    else {
                        p[2] = p[1];
                    }
                    a.f.add(p);
                }
            }
            return;
        }
        kx(a, b) {
            super.kx(a, b);
            let c = b;
            c.b8(a);
            if (c.b7) {
                c.b5.g$d();
            }
        }
        ql() {
            switch (this.to) {
                case 1: return 1;
                case 2: return 1;
                case 0: return 12;
            }
            return 1;
        }
        s4(a, b) {
            super.s4(a, b);
            let c = typeCast(FinancialIndicatorView.$, b);
            let d = (e) => a.f._inner[e][0];
            let e = (f) => a.f._inner[f][1];
            if (c.b7) {
                c.b5.g$d();
                c.b5.g$g(a.p);
            }
            let f = b.bu;
            let g = this.getEffectiveViewport1(b);
            let h = 0;
            let i = this.oy;
            let j = this.th;
            if (b.b0(a)) {
                c.b8(false);
                if (a.f.count > 0) {
                    switch (this.to) {
                        case 0:
                            let k = CategorySeries.ri(a.f, a.f.count - 1, f, b.bv, false);
                            c.cc(a.f.count, d, e, true, k);
                            break;
                        case 1:
                            if (this.qx != null) {
                                h = this.r6(b);
                            }
                            else {
                                h = 0.5 * (f.top + f.bottom);
                            }
                            let l = CategorySeries.ri(a.f, a.f.count - 1, f, b.bv, false);
                            c.ca(a.f.count, d, e, true, h, l);
                            break;
                        case 2:
                            h = this.r6(b);
                            c.cb(a.f.count, d, e, true, h);
                            break;
                        default: throw new NotImplementedException(0);
                    }
                }
                b.b2(a);
            }
            let m = a.f;
            let n = this.ck.count;
            this.qk.a0(this, this.rj(), runOn(this, this.p3), this.r8(b), this.sa(b));
            let o = false;
            let p = this.qk.b;
            if (p != null) {
                o = true;
            }
            this.qk.ak = i;
            this.qk.ag = i;
            if (o) {
                let q = new ScalerParams(0, b.bv, b.bu, this.qb.cg, g);
                this.qk.f = false;
                this.s1(m, -1, n, this.qb, q, b.q);
            }
            this.qk.ad(c.cu, true, false, true, false);
            this.qk.ad(c.cw, true, false, true, false);
            this.qk.ad(c.cv, false, true, false, false);
            c.cv._opacity = 0.8 * this.qk.j * this.fq;
            this.qk.ad(c.ct, true, false, false, false);
            this.qk.ak = j;
            this.qk.ag = j;
            if (o) {
                let r = new ScalerParams(0, b.bv, b.bu, this.qb.cg, g);
                this.qk.f = true;
                this.s1(m, -1, n, this.qb, r, b.q);
            }
            this.qk.ad(c.cq, true, false, true, false);
            this.qk.ad(c.cs, true, false, true, false);
            this.qk.ad(c.cr, false, true, false, false);
            c.cr._opacity = 0.8 * this.qk.j * this.fq;
            this.qk.ad(c.cp, true, false, false, false);
            c.ce();
        }
        mv() {
            super.mv();
            if (this.index < 0) {
                return;
            }
            if (this.tm.b7) {
                this.tm.cf();
            }
        }
        t0() {
            if (this.tm.b7) {
                this.tm.b5.g$i();
            }
            this.tp(0, this.indicatorColumn.count);
            if (this.qx != null && !this.qx.c0()) {
                this.mh(false);
            }
        }
        k7(a) {
            super.k7(a);
            this.a8.exportTrendlineData(this, a, this.tm.b5.g$j);
        }
        ba(a) {
            if (this.to == 1 || this.to == 2) {
                return 3;
            }
            else if (this.to == 0) {
                return 2;
            }
            return a;
        }
    }
    FinancialIndicator.$t = markType(FinancialIndicator, 'FinancialIndicator', FinancialSeries.$, [ITrendLineSeries_$type]);
    FinancialIndicator.t2 = DependencyProperty.i("ActualTrendLineBrush", Brush.$, FinancialIndicator.$, new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
    FinancialIndicator.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialIndicator, 'raisePropertyChanged', ['DisplayType:to:t3', [IndicatorDisplayType_$type, enumGetBox(IndicatorDisplayType_$type, 0)], 'IgnoreFirst:tu:t4', [1, 0], 'TrendLineType::ua', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::t9', [1, 1.5], 'TrendLinePeriod::t8', [1, 7], 'TrendLineBrush::t5', [Brush.$, null], 'TrendLineZIndex:tv:ub', [1, 1001], 'TrendLineDashArray:ud:t6', [DoubleCollection.$], 'TrendLineDashCap:ue:t7', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]);
    return FinancialIndicator;
})();
/**
 * @hidden
 */
export let FinancialIndicatorBucketCalculator = /*@__PURE__*/ (() => {
    class FinancialIndicatorBucketCalculator extends FinancialBucketCalculator {
        constructor(a) {
            super(a);
            this.f = null;
            this.f = a;
        }
        getBucket(a) {
            let b = a * this.b;
            let c = Math.min(b + this.b - 1, this.f.b3.indicatorColumn.count - 1);
            let d = NaN;
            let e = NaN;
            for (let f = b; f <= c; ++f) {
                let g = this.f.b3.indicatorColumn._inner[f];
                if (!isNaN_(d)) {
                    if (!isNaN_(g)) {
                        d = Math.min(d, g);
                        e = Math.max(e, g);
                    }
                }
                else {
                    d = g;
                    e = g;
                }
            }
            if (!isNaN_(d)) {
                return [0.5 * (b + c), d, e];
            }
            return [NaN, NaN, NaN];
        }
    }
    FinancialIndicatorBucketCalculator.$t = markType(FinancialIndicatorBucketCalculator, 'FinancialIndicatorBucketCalculator', FinancialBucketCalculator.$);
    return FinancialIndicatorBucketCalculator;
})();
/**
 * @hidden
 */
export let FinancialIndicatorView = /*@__PURE__*/ (() => {
    class FinancialIndicatorView extends FinancialSeriesView {
        constructor(a) {
            super(a);
            this.b3 = null;
            this.b6 = null;
            this.cu = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cq = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cv = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cr = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cw = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.cs = ((() => {
                let $ret = new Path();
                $ret.ak = new PathGeometry();
                return $ret;
            })());
            this.ct = ((() => {
                let $ret = new Path();
                $ret.ak = new GeometryGroup();
                return $ret;
            })());
            this.cp = ((() => {
                let $ret = new Path();
                $ret.ak = new GeometryGroup();
                return $ret;
            })());
            this.b4 = null;
            this.cm = new Path();
            this.co = new Path();
            this.cn = new Path();
            this.cl = new Path();
            this.ci = new Path();
            this.ck = new Path();
            this.cj = new Path();
            this.ch = new Path();
            this.b3 = a;
            this.b6 = ((() => {
                let $ret = new Pool$1(LineGeometry.$);
                $ret.create = runOn(this, this.cg);
                $ret.destroy = runOn(this, this.b9);
                return $ret;
            })());
        }
        by() {
            return new FinancialIndicatorBucketCalculator(this);
        }
        as() {
            super.as();
            if (!this.q) {
                this.b3.th = Defaults.ah;
                this.b3.to = this.b3.tn;
            }
        }
        cg() {
            return new LineGeometry();
        }
        b9(a) {
        }
        get b5() {
            if (this.b4 == null) {
                this.b4 = CategoryTrendLineManagerFactory.a(this.b4, this.e.ar(), this.e.m9, this.e, this.e.cn);
            }
            return this.b4;
        }
        set b5(a) {
            this.b4 = a;
        }
        get b7() {
            return this.b4 != null;
        }
        b8(a) {
            Extensions.e(this.cu.ak);
            Extensions.e(this.cv.ak);
            Extensions.e(this.cw.ak);
            Extensions.e(this.cq.ak);
            Extensions.e(this.cr.ak);
            Extensions.e(this.cs.ak);
            Extensions.d(this.ct.ak);
            Extensions.d(this.cp.ak);
            if (a) {
                this.b6.count = 0;
            }
            this.aq();
        }
        ce() {
        }
        cc(a, b, c, d, e) {
            IndicatorRenderer.g(a, b, c, d, this.bv, this.bu, this.cu, this.cq, this.bx.b, this.e.ft, e);
            this.aq();
        }
        ca(a, b, c, d, e, f) {
            IndicatorRenderer.e(a, b, c, d, this.bv, this.bu, this.cu, this.cv, this.cq, this.cr, e, this.bx.b, this.e.ft, f);
            this.aq();
        }
        cb(a, b, c, d, e) {
            IndicatorRenderer.f(a, b, c, d, this.bu, e, this.b6, this.ct, this.cp);
            this.aq();
        }
        cf() {
            this.b3.uc = null;
            if (this.b3.trendLineBrush != null) {
                this.b3.uc = this.b3.trendLineBrush;
            }
            else {
                this.b3.uc = this.b3.oy;
            }
        }
        bc() {
            super.bc();
            let a = this.bo();
            this.cm.ak = this.cu.ak;
            this.co.ak = this.cw.ak;
            this.cn.ak = this.cv.ak;
            this.cl.ak = this.ct.ak;
            this.ci.ak = this.cq.ak;
            this.ck.ak = this.cs.ak;
            this.cj.ak = this.cr.ak;
            this.ch.ak = this.cp.ak;
            this.cm._stroke = a;
            this.co._stroke = a;
            this.cm.ac = this.e.fu + 3;
            this.co.ac = this.e.fu + 3;
            this.cn._fill = a;
            this.cn._opacity = 1;
            this.cl._stroke = a;
            this.cl.ac = this.e.fu + 3;
            this.ci._stroke = a;
            this.ck._stroke = a;
            this.ci.ac = this.e.fu + 3;
            this.ck.ac = this.e.fu + 3;
            this.cj._fill = a;
            this.cj._opacity = 1;
            this.ch._stroke = a;
            this.ch.ac = this.e.fu + 3;
        }
        a6(a, b) {
            super.a6(a, b);
            if (a.d) {
                if (b) {
                    if (this.b3.to == 2) {
                        a.s(this.cl);
                        a.s(this.ch);
                    }
                    else {
                        a.s(this.cn);
                        a.s(this.cm);
                        a.s(this.co);
                        a.s(this.cj);
                        a.s(this.ci);
                        a.s(this.ck);
                    }
                }
                else {
                    if (this.b3.to == 2) {
                        a.s(this.ct);
                        a.s(this.cp);
                    }
                    else {
                        a.s(this.cv);
                        a.s(this.cu);
                        a.s(this.cw);
                        a.s(this.cr);
                        a.s(this.cq);
                        a.s(this.cs);
                    }
                }
            }
        }
        a5(a, b) {
            if (a.d) {
                if (this.b3.trendLineType != 0 && !b) {
                    let c = this.b5.g$j;
                    c.ac = this.b3.trendLineThickness;
                    c._stroke = this.b3.uc;
                    c.ad = this.b3.ue;
                    c.ai = this.b3.ud;
                    a.u(c);
                }
            }
            super.a5(a, b);
        }
        al(a) {
            super.al(a);
            this.e.a8.exportPathData(a, this.ct, "positiveColumnsShape", ["Positive", "Main"]);
            this.e.a8.exportPathData(a, this.cp, "negativeColumnsShape", ["Negative"]);
            this.e.a8.exportPathData(a, this.cu, "positive0", ["Positive", "Main"]);
            this.e.a8.exportPathData(a, this.cw, "positive1", ["Positive"]);
            this.e.a8.exportPathData(a, this.cv, "positive01", ["PositiveFill"]);
            this.e.a8.exportPathData(a, this.cq, "negative0", ["Negative", "Main"]);
            this.e.a8.exportPathData(a, this.cs, "negative1", ["Negative"]);
            this.e.a8.exportPathData(a, this.cr, "negative01", ["NegativeFill"]);
        }
        cd() {
            if (this.b7) {
                this.b4 = CategoryTrendLineManagerFactory.a(this.b4, this.e.ar(), this.e.m9, this.e, this.e.cn);
            }
        }
    }
    FinancialIndicatorView.$t = markType(FinancialIndicatorView, 'FinancialIndicatorView', FinancialSeriesView.$);
    return FinancialIndicatorView;
})();
