/*
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 { PathGeometry } from "igniteui-angular-core";
import { GeometryGroup } from "igniteui-angular-core";
import { Pool$1 } from "igniteui-angular-core";
import { LineGeometry } 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.aba = null;
            this.xk = new CategoryFrame(3);
            this.xm = new CategoryFrame(3);
            this.xi = new CategoryFrame(3);
            this.indicatorColumn = new List$1(Number_$type, 0);
            this.aba = new AxisRange(-100, 100);
        }
        get_e9() {
            return true;
        }
        ct() {
            return new FinancialIndicatorView(this);
        }
        q7(a) {
            super.q7(a);
            this.abb = a;
        }
        abo(a) {
            if (this.xz != null && !this.xz.d2()) {
                this.ry(true);
            }
        }
        abg(a, b, c) {
            if (isNaN_(b.x) || isNaN_(b.y)) {
                return false;
            }
            let d = this.xz;
            let e = 0;
            if (d != null) {
                e = d.gg(d.p5);
            }
            if ((a.y >= e && a.y <= b.y) || (a.y <= e && a.y >= b.y)) {
                return true;
            }
            return false;
        }
        b3() {
            if (this.b4 == 0) {
                return 1;
            }
            else {
                return super.b3();
            }
        }
        wx(a) {
            if (this.xg == null || this.xz == null) {
                return Rect.empty;
            }
            let b = this.wh(a);
            let c = this.cw.ca;
            let d = this.cw.b9;
            let e = this.getEffectiveViewport1(this.cw);
            let f = new ScalerParams(0, c, d, this.xz.df, e);
            f.b = this.i0();
            let g = this.an(this.xg, this.xi.h, this.zd(this.cw), this.zf(this.cw), 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.xz.ft(this.xz.p5, 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));
            }
        }
        gx(a, b) {
            let c = this.wm(this.wr(a), true, false);
            if (this.abd == 1) {
                if (this.abg(a, c, b)) {
                    return true;
                }
            }
            if (this.abd == 1 || this.abd == 0) {
                if (this.gw(a, b)) {
                    return true;
                }
            }
            if (this.abd == 2) {
                if (this.g0(a, b)) {
                    return true;
                }
            }
            return false;
        }
        ph(a, b, c, d) {
            super.ph(a, b, c, d);
            if (this.xg != null && typeCast(ISortingAxis_$type, this.xg) !== null) {
                this.xg.i$i();
            }
            if (this.abb.cn) {
                this.abb.cl.g$i(a, b, c, d);
            }
            if (d != null && this.ys.containsKey(d)) {
                let e = this.ys.tryGetValue(d, d);
                d = e.p1;
            }
            if (this.xg != null && typeCast(ISortingAxis_$type, this.xg) !== null) {
                a = 4;
                b = 0;
                c = this.dp.count;
            }
            switch (a) {
                case 3:
                    if (this.abf(b, c, d)) {
                        this.abq(b, c, d);
                        this.abo(true);
                    }
                    break;
                case 2:
                    if (this.abf(b, this.dp.count - b, d)) {
                        this.abq(b, this.dp.count - b, d);
                        this.abo(true);
                    }
                    break;
                case 1:
                    if (this.abf(b, this.dp.count - b, d)) {
                        let f = new Array(c);
                        for (let g = 0; g < c; g++) {
                            f[g] = 0;
                        }
                        this.indicatorColumn.s(b, f);
                        this.abq(b, this.dp.count - b, d);
                        this.abo(true);
                    }
                    break;
                case 0:
                    if (this.abf(b, this.dp.count - b, d)) {
                        this.indicatorColumn.v(b, c);
                        this.abq(b, this.dp.count - b, d);
                        this.abo(true);
                    }
                    break;
                case 4:
                    if (this.abf(b, this.dp.count - b, d)) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.dp.count);
                        let h = new Array(c);
                        for (let i = 0; i < c; i++) {
                            h[i] = 0;
                        }
                        this.indicatorColumn.s(0, h);
                        this.abq(b, this.dp.count - b, d);
                        this.abo(true);
                    }
                    break;
            }
        }
        get_abc() {
            return 0;
        }
        get abc() {
            return this.get_abc();
        }
        get ab1() {
            return this.c(FinancialIndicator.abr);
        }
        set ab1(a) {
            this.h(FinancialIndicator.abr, a);
        }
        abl() {
            return -1;
        }
        get indicatorColumn() {
            return this._indicatorColumn;
        }
        set indicatorColumn(a) {
            this._indicatorColumn = a;
        }
        rg(a, b, c, d) {
            switch (b) {
                case "XAxis":
                    this.abb.ct();
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.abb.cl = CategoryTrendLineManagerFactory.a(this.abb.cl, this.xg, this.s3, this, this.ds);
                    }
                    break;
            }
            super.rg(a, b, c, d);
            if (this.abb.cn && this.abb.cl.g$e(a, b, c, d)) {
                this.ry(false);
                let f = typeCast(FinancialIndicatorView.$, this.cv);
                if (f != null && f.cn) {
                    f.cl.g$e(a, b, c, d);
                }
                this.qr();
            }
            switch (b) {
                case "FastItemsSource":
                    if (this.dp != null) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.dp.count);
                        let g = new Array(this.dp.count);
                        for (let h = 0; h < this.dp.count; h++) {
                            g[h] = 0;
                        }
                        this.indicatorColumn.s(0, g);
                        this.abq(0, this.dp.count, null);
                        if (this.xz != null && !this.xz.d2()) {
                            this.xx.cd.e(this.ie);
                            this.ry(this.gh && c != null);
                        }
                    }
                    break;
                case "TrendLineBrush":
                    this.rm(b);
                    break;
                case FinancialIndicator.$$p[0]:
                    this.pb(true, this.cw);
                    this.sq();
                    this.ry(false);
                    this.qr();
                    break;
                case "OpenColumn":
                case "HighColumn":
                case "LowColumn":
                case "CloseColumn":
                case "VolumeColumn":
                    if (this.dp != null) {
                        if (this.indicatorColumn.count != this.dp.count) {
                            this.indicatorColumn = new List$1(Number_$type, 2, this.dp.count);
                            let i = new Array(this.dp.count);
                            for (let j = 0; j < this.dp.count; j++) {
                                i[j] = 0;
                            }
                            this.indicatorColumn.s(0, i);
                        }
                        if (this.abf(0, this.dp.count - 1, b)) {
                            this.abp();
                        }
                    }
                    break;
                case "XAxis":
                    if (this.xg != null && (typeCast(ISortingAxis_$type, this.xg) !== null || typeCast(ISortingAxis_$type, c) !== null)) {
                        this.abp();
                    }
                    break;
                case "YAxis":
                case FinancialIndicator.$$p[1]:
                    this.abp();
                    this.qr();
                    break;
                case "TrendLineType":
                    this.qr();
                    break;
            }
        }
        i8(a, b, c) {
            if (this.indicatorColumn == null) {
                return super.i8(a, b, c);
            }
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y7(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xg.df, d);
            f.c = this.dc.x4;
            return this.ja(this.indicatorColumn, a, this.xg, f, e, runOn(this, this.y6), b, c);
        }
        ke(a, b) {
            if (this.indicatorColumn == null) {
                return super.ke(a, b);
            }
            return this.kf(a, b, this.xg, runOn(this, this.y6), this.indicatorColumn);
        }
        kc(a, b) {
            if (this.indicatorColumn == null) {
                return super.kc(a, b);
            }
            return this.kd(a, b, this.xg, runOn(this, this.y6), this.indicatorColumn);
        }
        get_he() {
            return true;
        }
        abf(a, b, c) {
            if (c == null) {
                return true;
            }
            if (this.abh(a, b).contains(c)) {
                return true;
            }
            return false;
        }
        abq(a, b, c) {
            this.abe(a, b);
        }
        ay(a) {
            if (this.dp == null) {
                return null;
            }
            if (a != null && a == this.xz) {
                return this.aba;
            }
            return null;
        }
        ge(a) {
            let b = this.dp != null ? this.dp.indexOf(a) : -1;
            let c = this.cw.ca;
            c = c.copy();
            let d = this.cw.b9;
            let e = new Rect(0, 0, 0, 1, 1);
            let f = this.wv(this.cw);
            if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
                if (this.xg != null) {
                    let g = new ScalerParams(0, e, e, this.xg.df, f);
                    let h = this.xg.ft(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.xz != null && this.indicatorColumn != null && b < this.indicatorColumn.count) {
                    let i = new ScalerParams(0, e, e, this.xz.df, f);
                    i.b = this.i0();
                    let j = this.xz.ft(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.c4.au(this.dc, c, true);
            }
            return b >= 0;
        }
        hf(a, b, c) {
            let d = super.hf(a, b, c);
            if (this.indicatorColumn == null || this.indicatorColumn.count == 0) {
                d = false;
            }
            return d;
        }
        aam(a, b) {
            super.aam(a, b);
            let c = b.ca;
            let d = b.b9;
            let e = this.getEffectiveViewport1(b);
            let f = this.xg;
            let g = this.xz;
            let h = new ScalerParams(0, c, d, f.df, e);
            let i = new ScalerParams(0, c, d, g.df, e);
            i.b = this.i0();
            let j = this.xg.ag();
            let k = j[0];
            let l = j[1];
            a.h.clear();
            a.p.clear();
            a.s.clear();
            let m = 0;
            let n = typeCast(ISortingAxis_$type, this.xg);
            if (n != null && n.i$b.count != this.dp.count) {
                return;
            }
            m = this.y7(c, d, e);
            let o = this.abl();
            if (o == -1) {
                o = this.trendLinePeriod;
            }
            let p = typeCast(FinancialIndicatorView.$, b);
            if (p.cn) {
                p.cl.prepareLineCore(a.s, this.trendLineType, this.indicatorColumn, o, (q) => this.xg.ft(q, h), (q) => this.xz.ft(q, i), ((() => {
                    let $ret = new TrendResolutionParams();
                    $ret.e = b.cd.b;
                    $ret.f = b.cd.c;
                    $ret.g = b.cd.d;
                    $ret.a = m;
                    $ret.d = this.ie;
                    $ret.i = d;
                    $ret.j = c;
                    $ret.h = e;
                    $ret.b = l;
                    $ret.c = k;
                    return $ret;
                })()));
            }
            let q = this.xg.fw(2, h) - this.xg.fw(1, h);
            for (let r = b.cd.c; r <= b.cd.d; ++r) {
                let s;
                if (n == null) {
                    s = b.cd.getBucket(r);
                }
                else {
                    let t = n.i$b._inner[r];
                    let u = n.i$d(t);
                    let v = this.indicatorColumn._inner[r];
                    let w = v;
                    let x = u;
                    while (r < b.cd.d) {
                        t = n.i$b._inner[r + 1];
                        x = n.i$d(t);
                        if (x - u > q) {
                            break;
                        }
                        r++;
                        let y = this.indicatorColumn._inner[r];
                        v = Math.min(v, y);
                        w = Math.max(w, y);
                    }
                    let z = NaN;
                    if (!isNaN_(u)) {
                        z = this.xg.ft(u, h);
                    }
                    s = [z, v, w];
                }
                if (!isNaN_(s[0])) {
                    if (this.xg != null && typeCast(ISortingAxis_$type, this.xg) !== null) {
                        s[0] = s[0] + m;
                    }
                    else {
                        s[0] = f.ft(s[0], h) + m;
                    }
                    s[1] = g.ft(s[1], i);
                    if (b.cd.b > 1 || n != null) {
                        s[2] = g.ft(s[2], i);
                    }
                    else {
                        s[2] = s[1];
                    }
                    a.h.add(s);
                }
            }
            return;
        }
        pb(a, b) {
            super.pb(a, b);
            let c = b;
            c.co(a);
            if (c.cn) {
                c.cl.g$h();
            }
        }
        xq() {
            switch (this.abd) {
                case 1: return 1;
                case 2: return 1;
                case 0: return 12;
            }
            return 1;
        }
        aao(a, b) {
            super.aao(a, b);
            let c = typeCast(FinancialIndicatorView.$, b);
            let d = (e) => a.h._inner[e][0];
            let e = (f) => a.h._inner[f][1];
            if (c.cn) {
                c.cl.g$h();
                c.cl.g$k(a.s);
            }
            let f = b.b9;
            let g = this.getEffectiveViewport1(b);
            let h = 0;
            let i = this.vj;
            let j = this.aa6;
            if (b.cg(a)) {
                c.co(false);
                if (a.h.count > 0) {
                    switch (this.abd) {
                        case 0:
                            let k = CategorySeries.yx(a.h, a.h.count - 1, f, b.ca, false);
                            c.cs(a.h.count, d, e, true, k);
                            break;
                        case 1:
                            if (this.xz != null) {
                                h = this.zb(b);
                            }
                            else {
                                h = 0.5 * (f.top + f.bottom);
                            }
                            let l = CategorySeries.yx(a.h, a.h.count - 1, f, b.ca, false);
                            c.cq(a.h.count, d, e, true, h, l);
                            break;
                        case 2:
                            h = this.zb(b);
                            c.cr(a.h.count, d, e, true, h);
                            break;
                        default: throw new NotImplementedException(0);
                    }
                }
                b.ci(a);
            }
            let m = a.h;
            let n = this.dp.count;
            this.xp.a2(this, this.yo(), runOn(this, this.w8), this.zd(b), this.zf(b));
            let o = false;
            let p = this.xp.b;
            if (p != null) {
                o = true;
            }
            this.xp.ak = i;
            this.xp.ag = i;
            if (o) {
                let q = new ScalerParams(0, b.ca, b.b9, this.xg.df, g);
                this.xp.f = false;
                this.aal(m, -1, n, this.xg, q, b.t, -1);
            }
            this.xp.ad(c.da, true, false, true, false);
            this.xp.ad(c.dc, true, false, true, false);
            this.xp.ad(c.db, false, true, false, false);
            c.db._opacity = 0.8 * this.xp.j * this.ia;
            this.xp.ad(c.c9, true, false, false, false);
            this.xp.ak = j;
            this.xp.ag = j;
            if (o) {
                let r = new ScalerParams(0, b.ca, b.b9, this.xg.df, g);
                this.xp.f = true;
                this.aal(m, -1, n, this.xg, r, b.t, -1);
            }
            this.xp.ad(c.c6, true, false, true, false);
            this.xp.ad(c.c8, true, false, true, false);
            this.xp.ad(c.c7, false, true, false, false);
            c.c7._opacity = 0.8 * this.xp.j * this.ia;
            this.xp.ad(c.c5, true, false, false, false);
            c.cu();
        }
        sp() {
            super.sp();
            if (this.index < 0) {
                return;
            }
            if (this.abb.cn) {
                this.abb.cv();
            }
        }
        abp() {
            if (this.abb.cn) {
                this.abb.cl.g$m();
            }
            this.abe(0, this.indicatorColumn.count);
            if (this.xz != null && !this.xz.d2()) {
                this.ry(this.gh && this.d9);
            }
        }
        p5(a) {
            super.p5(a);
            this.bc.exportTrendlineData(this, a, this.abb.cl.g$n);
        }
        bf(a) {
            if (this.abd == 1 || this.abd == 2) {
                return 3;
            }
            else if (this.abd == 0) {
                return 2;
            }
            return a;
        }
    }
    FinancialIndicator.$t = markType(FinancialIndicator, 'FinancialIndicator', FinancialSeries.$, [ITrendLineSeries_$type]);
    FinancialIndicator.abr = 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:abd:abs', [IndicatorDisplayType_$type, enumGetBox(IndicatorDisplayType_$type, 0)], 'IgnoreFirst:abj:abt', [1, 0], 'TrendLineType::abz', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::aby', [1, 1.5], 'TrendLinePeriod::abx', [1, 7], 'TrendLineBrush::abu', [Brush.$, null], 'TrendLineZIndex:abk:ab0', [1, 1001], 'TrendLineDashArray:ab2:abv', [DoubleCollection.$], 'TrendLineDashCap:ab3:abw', [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.cj.indicatorColumn.count - 1);
            let d = NaN;
            let e = NaN;
            for (let f = b; f <= c; ++f) {
                let g = this.f.cj.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.cj = null;
            this.cm = null;
            this.da = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.c6 = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.db = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.c7 = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.dc = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.c8 = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.c9 = ((() => {
                let $ret = new Path();
                $ret.an = new GeometryGroup();
                return $ret;
            })());
            this.c5 = ((() => {
                let $ret = new Path();
                $ret.an = new GeometryGroup();
                return $ret;
            })());
            this.ck = null;
            this.c2 = new Path();
            this.c4 = new Path();
            this.c3 = new Path();
            this.c1 = new Path();
            this.cy = new Path();
            this.c0 = new Path();
            this.cz = new Path();
            this.cx = new Path();
            this.cj = a;
            this.cm = ((() => {
                let $ret = new Pool$1(LineGeometry.$);
                $ret.create = runOn(this, this.cw);
                $ret.destroy = runOn(this, this.cp);
                return $ret;
            })());
        }
        ce() {
            return new FinancialIndicatorBucketCalculator(this);
        }
        a4() {
            super.a4();
            if (!this.t) {
                this.cj.aa6 = Defaults.financialSeries_NegativeBrush;
                this.cj.abd = this.cj.abc;
            }
        }
        cw() {
            return new LineGeometry();
        }
        cp(a) {
        }
        get cl() {
            if (this.ck == null) {
                this.ck = CategoryTrendLineManagerFactory.a(this.ck, this.f.a0(), this.f.s3, this.f, this.f.ds);
            }
            return this.ck;
        }
        set cl(a) {
            this.ck = a;
        }
        get cn() {
            return this.ck != null;
        }
        co(a) {
            Extensions.e(this.da.an);
            Extensions.e(this.db.an);
            Extensions.e(this.dc.an);
            Extensions.e(this.c6.an);
            Extensions.e(this.c7.an);
            Extensions.e(this.c8.an);
            Extensions.d(this.c9.an);
            Extensions.d(this.c5.an);
            if (a) {
                this.cm.count = 0;
            }
            this.a2();
        }
        cu() {
        }
        cs(a, b, c, d, e) {
            IndicatorRenderer.g(a, b, c, d, this.ca, this.b9, this.da, this.c6, this.cd.b, this.f.ie, e);
            this.a2();
        }
        cq(a, b, c, d, e, f) {
            IndicatorRenderer.e(a, b, c, d, this.ca, this.b9, this.da, this.db, this.c6, this.c7, e, this.cd.b, this.f.ie, f);
            this.a2();
        }
        cr(a, b, c, d, e) {
            IndicatorRenderer.f(a, b, c, d, this.b9, e, this.cm, this.c9, this.c5);
            this.a2();
        }
        cv() {
            this.cj.ab1 = null;
            if (this.cj.trendLineBrush != null) {
                this.cj.ab1 = this.cj.trendLineBrush;
            }
            else {
                this.cj.ab1 = this.cj.vj;
            }
        }
        bq() {
            super.bq();
            let a = this.b3();
            this.c2.an = this.da.an;
            this.c4.an = this.dc.an;
            this.c3.an = this.db.an;
            this.c1.an = this.c9.an;
            this.cy.an = this.c6.an;
            this.c0.an = this.c8.an;
            this.cz.an = this.c7.an;
            this.cx.an = this.c5.an;
            this.c2._stroke = a;
            this.c4._stroke = a;
            this.c2.ad = this.f.ig + 3;
            this.c4.ad = this.f.ig + 3;
            this.c3._fill = a;
            this.c3._opacity = 1;
            this.c1._stroke = a;
            this.c1.ad = this.f.ig + 3;
            this.cy._stroke = a;
            this.c0._stroke = a;
            this.cy.ad = this.f.ig + 3;
            this.c0.ad = this.f.ig + 3;
            this.cz._fill = a;
            this.cz._opacity = 1;
            this.cx._stroke = a;
            this.cx.ad = this.f.ig + 3;
        }
        bj(a, b) {
            super.bj(a, b);
            if (a.d) {
                if (b) {
                    if (this.cj.abd == 2) {
                        a.t(this.c1);
                        a.t(this.cx);
                    }
                    else {
                        a.t(this.c3);
                        a.t(this.c2);
                        a.t(this.c4);
                        a.t(this.cz);
                        a.t(this.cy);
                        a.t(this.c0);
                    }
                }
                else {
                    if (this.cj.abd == 2) {
                        a.t(this.c9);
                        a.t(this.c5);
                    }
                    else {
                        a.t(this.db);
                        a.t(this.da);
                        a.t(this.dc);
                        a.t(this.c7);
                        a.t(this.c6);
                        a.t(this.c8);
                    }
                }
            }
        }
        bi(a, b) {
            if (a.d) {
                if (this.cj.trendLineType != 0 && !b) {
                    let c = this.cl.g$n;
                    c.ad = this.cj.trendLineThickness;
                    c._stroke = this.cj.ab1;
                    c.aj = this.cj.ab3;
                    c.ai = this.cj.ab2;
                    a.v(c);
                }
            }
            super.bi(a, b);
        }
        ax(a) {
            super.ax(a);
            this.f.bc.exportPathData(a, this.c9, "positiveColumnsShape", ["Positive", "Main"]);
            this.f.bc.exportPathData(a, this.c5, "negativeColumnsShape", ["Negative"]);
            this.f.bc.exportPathData(a, this.da, "positive0", ["Positive", "Main"]);
            this.f.bc.exportPathData(a, this.dc, "positive1", ["Positive"]);
            this.f.bc.exportPathData(a, this.db, "positive01", ["PositiveFill"]);
            this.f.bc.exportPathData(a, this.c6, "negative0", ["Negative", "Main"]);
            this.f.bc.exportPathData(a, this.c8, "negative1", ["Negative"]);
            this.f.bc.exportPathData(a, this.c7, "negative01", ["NegativeFill"]);
        }
        ct() {
            if (this.cn) {
                this.ck = CategoryTrendLineManagerFactory.a(this.ck, this.f.a0(), this.f.s3, this.f, this.f.ds);
            }
        }
    }
    FinancialIndicatorView.$t = markType(FinancialIndicatorView, 'FinancialIndicatorView', FinancialSeriesView.$);
    return FinancialIndicatorView;
})();
