/*
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-react-core";
import { TrendLineType_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { AxisRange } from "./AxisRange";
import { CategoryFrame } from "./CategoryFrame";
import { Number_$type, typeCast, enumGetBox, EnumUtil, runOn, markType, markDep } from "igniteui-react-core";
import { Rect } from "igniteui-react-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-react-core";
import { Path } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
import { LineGeometry } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { GeometryGroup } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { Extensions } from "igniteui-react-core";
import { IndicatorRenderer } from "./IndicatorRenderer";
/**
 * @hidden
 */
export let FinancialIndicator = /*@__PURE__*/ (() => {
    class FinancialIndicator extends FinancialSeries {
        get_dt() {
            return true;
        }
        by() {
            return new FinancialIndicatorView(this);
        }
        l4(a) {
            super.l4(a);
            this.tv = a;
        }
        constructor() {
            super();
            this._indicatorColumn = null;
            this.tu = null;
            this.qo = new CategoryFrame(3);
            this.qq = new CategoryFrame(3);
            this.qm = new CategoryFrame(3);
            this.indicatorColumn = new List$1(Number_$type, 0);
            this.tu = new AxisRange(-100, 100);
        }
        t8(a) {
            if (this.q6 != null && !this.q6.c1()) {
                this.mn(true);
            }
        }
        t0(a, b, c) {
            if (isNaN_(b.x) || isNaN_(b.y)) {
                return false;
            }
            let d = this.q6;
            let e = 0;
            if (d != null) {
                e = d.e4(d.l7);
            }
            if ((a.y >= e && a.y <= b.y) || (a.y <= e && a.y >= b.y)) {
                return true;
            }
            return false;
        }
        bq() {
            if (this.br == 0) {
                return 1;
            }
            else {
                return super.bq();
            }
        }
        p3(a) {
            if (this.qk == null || this.q6 == null) {
                return Rect.empty;
            }
            let b = this.pn(a);
            let c = this.b1.bv;
            let d = this.b1.bu;
            let e = this.getEffectiveViewport1(this.b1);
            let f = new ScalerParams(0, c, d, this.q6.ch, e);
            f.b = this.gg();
            let g = this.aj(this.qk, this.qm.f, this.sh(this.b1), this.sj(this.b1), 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.q6.ej(this.q6.l7, 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));
            }
        }
        ez(a, b) {
            let c = this.ps(this.px(a), true, false);
            if (this.tx == 1) {
                if (this.t0(a, c, b)) {
                    return true;
                }
            }
            if (this.tx == 1 || this.tx == 0) {
                if (this.ey(a, b)) {
                    return true;
                }
            }
            if (this.tx == 2) {
                if (this.e2(a, b)) {
                    return true;
                }
            }
            return false;
        }
        k5(a, b, c, d) {
            super.k5(a, b, c, d);
            if (this.qk != null && typeCast(ISortingAxis_$type, this.qk) !== null) {
                this.qk.i$i();
            }
            if (this.tv.b7) {
                this.tv.b5.g$e(a, b, c, d);
            }
            if (d != null && this.rw.containsKey(d)) {
                let e = this.rw.tryGetValue(d, d);
                d = e.p1;
            }
            if (this.qk != null && typeCast(ISortingAxis_$type, this.qk) !== null) {
                a = 4;
                b = 0;
                c = this.cl.count;
            }
            switch (a) {
                case 3:
                    if (this.tz(b, c, d)) {
                        this.ua(b, c, d);
                        this.t8(true);
                    }
                    break;
                case 2:
                    if (this.tz(b, this.cl.count - b, d)) {
                        this.ua(b, this.cl.count - b, d);
                        this.t8(true);
                    }
                    break;
                case 1:
                    if (this.tz(b, this.cl.count - b, d)) {
                        let f = new Array(c);
                        for (let g = 0; g < c; g++) {
                            f[g] = 0;
                        }
                        this.indicatorColumn.s(b, f);
                        this.ua(b, this.cl.count - b, d);
                        this.t8(true);
                    }
                    break;
                case 0:
                    if (this.tz(b, this.cl.count - b, d)) {
                        this.indicatorColumn.v(b, c);
                        this.ua(b, this.cl.count - b, d);
                        this.t8(true);
                    }
                    break;
                case 4:
                    if (this.tz(b, this.cl.count - b, d)) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.cl.count);
                        let h = new Array(c);
                        for (let i = 0; i < c; i++) {
                            h[i] = 0;
                        }
                        this.indicatorColumn.s(0, h);
                        this.ua(b, this.cl.count - b, d);
                        this.t8(true);
                    }
                    break;
            }
        }
        get_tw() {
            return 0;
        }
        get tw() {
            return this.get_tw();
        }
        get ul() {
            return this.c(FinancialIndicator.ub);
        }
        set ul(a) {
            this.h(FinancialIndicator.ub, a);
        }
        t5() {
            return -1;
        }
        get indicatorColumn() {
            return this._indicatorColumn;
        }
        set indicatorColumn(a) {
            this._indicatorColumn = a;
        }
        l9(a, b, c, d) {
            switch (b) {
                case "XAxis":
                    this.tv.cd();
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.tv.b5 = CategoryTrendLineManagerFactory.a(this.tv.b5, this.qk, this.nf, this, this.co);
                    }
                    break;
            }
            super.l9(a, b, c, d);
            if (this.tv.b7 && this.tv.b5.g$b(a, b, c, d)) {
                this.mn(false);
                let f = typeCast(FinancialIndicatorView.$, this.b0);
                if (f != null && f.b7) {
                    f.b5.g$b(a, b, c, d);
                }
                this.lu();
            }
            switch (b) {
                case "FastItemsSource":
                    if (this.cl != null) {
                        this.indicatorColumn = new List$1(Number_$type, 2, this.cl.count);
                        let g = new Array(this.cl.count);
                        for (let h = 0; h < this.cl.count; h++) {
                            g[h] = 0;
                        }
                        this.indicatorColumn.s(0, g);
                        this.ua(0, this.cl.count, null);
                        if (this.q6 != null && !this.q6.c1()) {
                            this.q1.bx.e(this.fx);
                            this.mn(false);
                        }
                    }
                    break;
                case "TrendLineBrush":
                    this.m1();
                    break;
                case FinancialIndicator.$$p[0]:
                    this.k2(true, this.b1);
                    this.m2();
                    this.mn(false);
                    this.lu();
                    break;
                case "OpenColumn":
                case "HighColumn":
                case "LowColumn":
                case "CloseColumn":
                case "VolumeColumn":
                    if (this.cl != null) {
                        if (this.indicatorColumn.count != this.cl.count) {
                            this.indicatorColumn = new List$1(Number_$type, 2, this.cl.count);
                            let i = new Array(this.cl.count);
                            for (let j = 0; j < this.cl.count; j++) {
                                i[j] = 0;
                            }
                            this.indicatorColumn.s(0, i);
                        }
                        if (this.tz(0, this.cl.count - 1, b)) {
                            this.t9();
                        }
                    }
                    break;
                case "XAxis":
                    if (this.qk != null && (typeCast(ISortingAxis_$type, this.qk) !== null || typeCast(ISortingAxis_$type, c) !== null)) {
                        this.t9();
                    }
                    break;
                case "YAxis":
                case FinancialIndicator.$$p[1]:
                    this.t9();
                    this.lu();
                    break;
                case "TrendLineType":
                    this.lu();
                    break;
            }
        }
        gn(a, b, c) {
            if (this.indicatorColumn == null) {
                return super.gn(a, b, c);
            }
            let d = this.getEffectiveViewport1(this.b1);
            let e = this.sb(this.b1.bv, this.b1.bu, d);
            let f = new ScalerParams(0, this.b1.bv, this.b1.bu, this.qk.ch, d);
            f.c = this.ce.ty;
            return this.gp(this.indicatorColumn, a, this.qk, f, e, runOn(this, this.sa), b, c);
        }
        ho(a, b) {
            if (this.indicatorColumn == null) {
                return super.ho(a, b);
            }
            return this.hp(a, b, this.qk, runOn(this, this.sa), this.indicatorColumn);
        }
        hm(a, b) {
            if (this.indicatorColumn == null) {
                return super.hm(a, b);
            }
            return this.hn(a, b, this.qk, runOn(this, this.sa), this.indicatorColumn);
        }
        get_fc() {
            return true;
        }
        tz(a, b, c) {
            if (c == null) {
                return true;
            }
            if (this.t1(a, b).contains(c)) {
                return true;
            }
            return false;
        }
        ua(a, b, c) {
            this.ty(a, b);
        }
        aq(a) {
            if (this.cl == null) {
                return null;
            }
            if (a != null && a == this.q6) {
                return this.tu;
            }
            return null;
        }
        eq(a) {
            let b = this.cl != null ? this.cl.indexOf(a) : -1;
            let c = this.b1.bv;
            c = c.copy();
            let d = this.b1.bu;
            let e = new Rect(0, 0, 0, 1, 1);
            let f = this.p1(this.b1);
            if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
                if (this.qk != null) {
                    let g = new ScalerParams(0, e, e, this.qk.ch, f);
                    let h = this.qk.ej(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.q6 != null && this.indicatorColumn != null && b < this.indicatorColumn.count) {
                    let i = new ScalerParams(0, e, e, this.q6.ch, f);
                    i.b = this.gg();
                    let j = this.q6.ej(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.b9.au(this.ce, c, true);
            }
            return b >= 0;
        }
        fd(a, b, c) {
            let d = super.fd(a, b, c);
            if (this.indicatorColumn == null || this.indicatorColumn.count == 0) {
                d = false;
            }
            return d;
        }
        tb(a, b) {
            super.tb(a, b);
            let c = b.bv;
            let d = b.bu;
            let e = this.getEffectiveViewport1(b);
            let f = this.qk;
            let g = this.q6;
            let h = new ScalerParams(0, c, d, f.ch, e);
            let i = new ScalerParams(0, c, d, g.ch, e);
            i.b = this.gg();
            let j = this.qk.ag();
            let k = j[0];
            let l = j[1];
            a.f.clear();
            a.m.clear();
            a.p.clear();
            let m = 0;
            let n = typeCast(ISortingAxis_$type, this.qk);
            if (n != null && n.i$b.count != this.cl.count) {
                return;
            }
            m = this.sb(c, d, e);
            let o = this.t5();
            if (o == -1) {
                o = this.trendLinePeriod;
            }
            let p = typeCast(FinancialIndicatorView.$, b);
            if (p.b7) {
                p.b5.prepareLineCore(a.p, this.trendLineType, this.indicatorColumn, o, (q) => this.qk.ej(q, h), (q) => this.q6.ej(q, i), ((() => {
                    let $ret = new TrendResolutionParams();
                    $ret.e = b.bx.b;
                    $ret.f = b.bx.c;
                    $ret.g = b.bx.d;
                    $ret.a = m;
                    $ret.d = this.fx;
                    $ret.h = d;
                    $ret.i = c;
                    $ret.b = l;
                    $ret.c = k;
                    return $ret;
                })()));
            }
            let q = this.qk.em(2, h) - this.qk.em(1, h);
            for (let r = b.bx.c; r <= b.bx.d; ++r) {
                let s;
                if (n == null) {
                    s = b.bx.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.bx.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.qk.ej(u, h);
                    }
                    s = [z, v, w];
                }
                if (!isNaN_(s[0])) {
                    if (this.qk != null && typeCast(ISortingAxis_$type, this.qk) !== null) {
                        s[0] = s[0] + m;
                    }
                    else {
                        s[0] = f.ej(s[0], h) + m;
                    }
                    s[1] = g.ej(s[1], i);
                    if (b.bx.b > 1 || n != null) {
                        s[2] = g.ej(s[2], i);
                    }
                    else {
                        s[2] = s[1];
                    }
                    a.f.add(s);
                }
            }
            return;
        }
        k2(a, b) {
            super.k2(a, b);
            let c = b;
            c.b8(a);
            if (c.b7) {
                c.b5.g$d();
            }
        }
        qu() {
            switch (this.tx) {
                case 1: return 1;
                case 2: return 1;
                case 0: return 12;
            }
            return 1;
        }
        td(a, b) {
            super.td(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.o5;
            let j = this.tq;
            if (b.b0(a)) {
                c.b8(false);
                if (a.f.count > 0) {
                    switch (this.tx) {
                        case 0:
                            let k = CategorySeries.rr(a.f, a.f.count - 1, f, b.bv, false);
                            c.cc(a.f.count, d, e, true, k);
                            break;
                        case 1:
                            if (this.q6 != null) {
                                h = this.sf(b);
                            }
                            else {
                                h = 0.5 * (f.top + f.bottom);
                            }
                            let l = CategorySeries.rr(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.sf(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.cl.count;
            this.qt.a2(this, this.rs(), runOn(this, this.qc), this.sh(b), this.sj(b));
            let o = false;
            let p = this.qt.b;
            if (p != null) {
                o = true;
            }
            this.qt.ak = i;
            this.qt.ag = i;
            if (o) {
                let q = new ScalerParams(0, b.bv, b.bu, this.qk.ch, g);
                this.qt.f = false;
                this.ta(m, -1, n, this.qk, q, b.q);
            }
            this.qt.ad(c.cu, true, false, true, false);
            this.qt.ad(c.cw, true, false, true, false);
            this.qt.ad(c.cv, false, true, false, false);
            c.cv._opacity = 0.8 * this.qt.j * this.fu;
            this.qt.ad(c.ct, true, false, false, false);
            this.qt.ak = j;
            this.qt.ag = j;
            if (o) {
                let r = new ScalerParams(0, b.bv, b.bu, this.qk.ch, g);
                this.qt.f = true;
                this.ta(m, -1, n, this.qk, r, b.q);
            }
            this.qt.ad(c.cq, true, false, true, false);
            this.qt.ad(c.cs, true, false, true, false);
            this.qt.ad(c.cr, false, true, false, false);
            c.cr._opacity = 0.8 * this.qt.j * this.fu;
            this.qt.ad(c.cp, true, false, false, false);
            c.ce();
        }
        m1() {
            super.m1();
            if (this.index < 0) {
                return;
            }
            if (this.tv.b7) {
                this.tv.cf();
            }
        }
        t9() {
            if (this.tv.b7) {
                this.tv.b5.g$i();
            }
            this.ty(0, this.indicatorColumn.count);
            if (this.q6 != null && !this.q6.c1()) {
                this.mn(false);
            }
        }
        lc(a) {
            super.lc(a);
            this.a9.exportTrendlineData(this, a, this.tv.b5.g$j);
        }
        bb(a) {
            if (this.tx == 1 || this.tx == 2) {
                return 3;
            }
            else if (this.tx == 0) {
                return 2;
            }
            return a;
        }
    }
    FinancialIndicator.$t = /*@__PURE__*/ markType(FinancialIndicator, 'FinancialIndicator', FinancialSeries.$, [ITrendLineSeries_$type]);
    FinancialIndicator.ub = /*@__PURE__*/ DependencyProperty.i("ActualTrendLineBrush", Brush.$, FinancialIndicator.$, /*@__PURE__*/ new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
    FinancialIndicator.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinancialIndicator, 'raisePropertyChanged', ['DisplayType:tx:uc', [IndicatorDisplayType_$type, /*@__PURE__*/ enumGetBox(IndicatorDisplayType_$type, 0)], 'IgnoreFirst:t3:ud', [1, 0], 'TrendLineType::uj', [TrendLineType_$type, /*@__PURE__*/ enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::ui', [1, 1.5], 'TrendLinePeriod::uh', [1, 7], 'TrendLineBrush::ue', [Brush.$, null], 'TrendLineZIndex:t4:uk', [1, 1001], 'TrendLineDashArray:um:uf', [DoubleCollection.$], 'TrendLineDashCap:un:ug', [PenLineCap_$type, /*@__PURE__*/ 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 = /*@__PURE__*/ 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.an = new PathGeometry();
                return $ret;
            })());
            this.cq = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cv = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cr = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cw = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.cs = ((() => {
                let $ret = new Path();
                $ret.an = new PathGeometry();
                return $ret;
            })());
            this.ct = ((() => {
                let $ret = new Path();
                $ret.an = new GeometryGroup();
                return $ret;
            })());
            this.cp = ((() => {
                let $ret = new Path();
                $ret.an = 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.tq = Defaults.ah;
                this.b3.tx = this.b3.tw;
            }
        }
        cg() {
            return new LineGeometry();
        }
        b9(a) {
        }
        get b5() {
            if (this.b4 == null) {
                this.b4 = CategoryTrendLineManagerFactory.a(this.b4, this.e.as(), this.e.nf, this.e, this.e.co);
            }
            return this.b4;
        }
        set b5(a) {
            this.b4 = a;
        }
        get b7() {
            return this.b4 != null;
        }
        b8(a) {
            Extensions.e(this.cu.an);
            Extensions.e(this.cv.an);
            Extensions.e(this.cw.an);
            Extensions.e(this.cq.an);
            Extensions.e(this.cr.an);
            Extensions.e(this.cs.an);
            Extensions.d(this.ct.an);
            Extensions.d(this.cp.an);
            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.fx, 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.fx, 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.ul = null;
            if (this.b3.trendLineBrush != null) {
                this.b3.ul = this.b3.trendLineBrush;
            }
            else {
                this.b3.ul = this.b3.o5;
            }
        }
        bc() {
            super.bc();
            let a = this.bo();
            this.cm.an = this.cu.an;
            this.co.an = this.cw.an;
            this.cn.an = this.cv.an;
            this.cl.an = this.ct.an;
            this.ci.an = this.cq.an;
            this.ck.an = this.cs.an;
            this.cj.an = this.cr.an;
            this.ch.an = this.cp.an;
            this.cm._stroke = a;
            this.co._stroke = a;
            this.cm.ad = this.e.fy + 3;
            this.co.ad = this.e.fy + 3;
            this.cn._fill = a;
            this.cn._opacity = 1;
            this.cl._stroke = a;
            this.cl.ad = this.e.fy + 3;
            this.ci._stroke = a;
            this.ck._stroke = a;
            this.ci.ad = this.e.fy + 3;
            this.ck.ad = this.e.fy + 3;
            this.cj._fill = a;
            this.cj._opacity = 1;
            this.ch._stroke = a;
            this.ch.ad = this.e.fy + 3;
        }
        a6(a, b) {
            super.a6(a, b);
            if (a.d) {
                if (b) {
                    if (this.b3.tx == 2) {
                        a.t(this.cl);
                        a.t(this.ch);
                    }
                    else {
                        a.t(this.cn);
                        a.t(this.cm);
                        a.t(this.co);
                        a.t(this.cj);
                        a.t(this.ci);
                        a.t(this.ck);
                    }
                }
                else {
                    if (this.b3.tx == 2) {
                        a.t(this.ct);
                        a.t(this.cp);
                    }
                    else {
                        a.t(this.cv);
                        a.t(this.cu);
                        a.t(this.cw);
                        a.t(this.cr);
                        a.t(this.cq);
                        a.t(this.cs);
                    }
                }
            }
        }
        a5(a, b) {
            if (a.d) {
                if (this.b3.trendLineType != 0 && !b) {
                    let c = this.b5.g$j;
                    c.ad = this.b3.trendLineThickness;
                    c._stroke = this.b3.ul;
                    c.aj = this.b3.un;
                    c.ai = this.b3.um;
                    a.v(c);
                }
            }
            super.a5(a, b);
        }
        al(a) {
            super.al(a);
            this.e.a9.exportPathData(a, this.ct, "positiveColumnsShape", ["Positive", "Main"]);
            this.e.a9.exportPathData(a, this.cp, "negativeColumnsShape", ["Negative"]);
            this.e.a9.exportPathData(a, this.cu, "positive0", ["Positive", "Main"]);
            this.e.a9.exportPathData(a, this.cw, "positive1", ["Positive"]);
            this.e.a9.exportPathData(a, this.cv, "positive01", ["PositiveFill"]);
            this.e.a9.exportPathData(a, this.cq, "negative0", ["Negative", "Main"]);
            this.e.a9.exportPathData(a, this.cs, "negative1", ["Negative"]);
            this.e.a9.exportPathData(a, this.cr, "negative01", ["NegativeFill"]);
        }
        cd() {
            if (this.b7) {
                this.b4 = CategoryTrendLineManagerFactory.a(this.b4, this.e.as(), this.e.nf, this.e, this.e.co);
            }
        }
    }
    FinancialIndicatorView.$t = /*@__PURE__*/ markType(FinancialIndicatorView, 'FinancialIndicatorView', FinancialSeriesView.$);
    return FinancialIndicatorView;
})();
