/*
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 { EventArgs, Base, markType, typeCast, Point_$type, String_$type, runOn, Number_$type, enumGetBox, fromEnum, toEnum, Date_$type, markDep, Delegate_$type } from "igniteui-angular-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-angular-core";
import { IFastItemColumn$1_$type } from "igniteui-angular-core";
import { Series } from "./Series";
import { Rect } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-angular-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "./HighlightingInfo";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { CategoryFrame } from "./CategoryFrame";
import { CategoryMode_$type } from "./CategoryMode";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FastReflectionHelper } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Dictionary$2 } from "igniteui-angular-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { FinancialValueList } from "./FinancialValueList";
import { CategoryXAxis } from "./CategoryXAxis";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { SafeReadOnlyDoubleCollection } from "./SafeReadOnlyDoubleCollection";
import { SafeEnumerable } from "./SafeEnumerable";
import { CalculatedColumn } from "./CalculatedColumn";
import { TrendCalculators } from "igniteui-angular-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
import { dateToStringFormat } from "igniteui-angular-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export class FinancialEventArgs extends EventArgs {
    constructor(a, b, c, d, e) {
        super();
        this._position = 0;
        this._count = 0;
        this._dataSource = null;
        this._supportingCalculations = null;
        this._basedOn = null;
        this.position = a;
        this.count = b;
        this.dataSource = c;
        this.supportingCalculations = d;
        if (c != null) {
            c.series = e;
        }
    }
    get position() {
        return this._position;
    }
    set position(a) {
        this._position = a;
    }
    get count() {
        return this._count;
    }
    set count(a) {
        this._count = a;
    }
    get dataSource() {
        return this._dataSource;
    }
    set dataSource(a) {
        this._dataSource = a;
    }
    get supportingCalculations() {
        return this._supportingCalculations;
    }
    set supportingCalculations(a) {
        this._supportingCalculations = a;
    }
    get basedOn() {
        return this._basedOn;
    }
    set basedOn(a) {
        this._basedOn = a;
    }
}
FinancialEventArgs.$t = markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
/**
 * @hidden
 */
export class FinancialBucketCalculator extends Base {
    constructor(a) {
        super();
        this.a = null;
        this.c = 0;
        this.d = 0;
        this.b = 0;
        if (a == null) {
            throw new ArgumentNullException(0, "view");
        }
        this.a = a;
        this.c = -1;
        this.d = this.d;
        this.b = 0;
    }
    getBucket(a) {
        return null;
    }
    getBucketWithoutUnknowns(a) {
        return this.getBucket(a);
    }
    getErrorBucket(a, b) {
        return NaN;
    }
    getBucketInfo(a, b, c, d) {
        a = this.c;
        b = this.d;
        c = this.b;
        d = this.a.bw.eu;
        return {
            p0: a,
            p1: b,
            p2: c,
            p3: d
        };
    }
    e(a) {
        let b = this.a.bs;
        let c = this.a.br;
        let d = this.a.br;
        if (this.a.bw != null) {
            d = this.a.bw.getEffectiveViewport1(this.a);
        }
        if (b.isEmpty || c.isEmpty || this.a.bw.l8 == null) {
            this.b = 0;
            return;
        }
        let e = (this.a.bw.l8 != null) ? this.a.bw.l8.b8 : false;
        let f = new ScalerParams(0, b, c, e, d);
        let g = this.a.bw.lq(this.a);
        let h = typeCast(ISortingAxis_$type, this.a.bw.l8);
        if (h == null || h.i$b == null) {
            let i = Math.floor(this.a.bw.l8.dz(g.left, f));
            let j = Math.ceil(this.a.bw.l8.dz(g.right, f));
            if (this.a.bw.l8.b8) {
                j = Math.ceil(this.a.bw.l8.dz(g.left, f));
                i = Math.floor(this.a.bw.l8.dz(g.right, f));
            }
            let k = Math.floor((j - i + 1) * a / g.width);
            this.b = truncate(Math.max(1, k));
            this.c = truncate(Math.floor(i / this.b));
            this.d = truncate(Math.ceil(j / this.b));
        }
        else {
            this.c = h.i$e(b, c, d, g);
            this.d = h.i$g(b, c, d, g);
            this.b = 1;
        }
    }
    cacheValues() {
    }
    unCacheValues() {
    }
}
FinancialBucketCalculator.$t = markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
/**
 * @hidden
 */
export class FinancialSeries extends Series {
    constructor() {
        super();
        this.m1 = null;
        this.mx = null;
        this.mz = null;
        this.mv = null;
        this.m4 = null;
        this.m8 = false;
        this.assigningCategoryStyle = null;
        this.mg = null;
        this.nj = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
        this.nk = new Dictionary$2(String_$type, String_$type, 0);
        this.m7 = false;
        this.mr = null;
        this.mb = null;
        this.md = null;
        this.ma = null;
        this.mj = null;
        this.typical = null;
        this.typicalBasedOn = null;
        this.m6 = false;
        this.nw = null;
        this.nu = null;
        this.nv = null;
        this.nt = null;
        this.nx = null;
        this.mc = null;
        this.l9 = null;
        this.me = 0;
        this.ms = null;
        this.mu = null;
        this.mg = new CategorySeriesRenderManager();
        this.m8 = false;
        this.mj = new CategoryTransitionSourceFramePreparer();
        this.mc = new CategoryFrame(3);
        this.ab = FinancialSeries.$;
        this.mf = 0;
    }
    iu(a) {
        super.iu(a);
        this.mo = a;
    }
    get_cr() {
        return true;
    }
    ag() {
        return [this.l8, this.mt];
    }
    fs(a, b) {
        let c = this.gu(b);
        if (c == FinancialSeries.$$p[6]) {
            return this.ft(a, b, this.oo);
        }
        if (c == FinancialSeries.$$p[1]) {
            return this.ft(a, b, this.of);
        }
        if (c == FinancialSeries.$$p[4]) {
            return this.ft(a, b, this.ok);
        }
        if (c == FinancialSeries.$$p[0]) {
            return this.ft(a, b, this.oc);
        }
        if (c == FinancialSeries.$$p[8]) {
            return this.ft(a, b, this.os);
        }
        return super.fs(a, b);
    }
    n8() {
        return 2;
    }
    n6() {
        return 4;
    }
    ah(a) {
        let b = this.aj(this.l8, this.ma.f, this.n5(this.bi), this.n7(this.bi), this.lo(a), true);
        if (b == null) {
            return null;
        }
        let c = b[0];
        let d = b[1];
        let e = new Array(1);
        let f = new Array(2);
        let g = this.n8();
        f[0] = { $type: Point_$type, x: c[0], y: c[g] };
        f[1] = { $type: Point_$type, x: d[0], y: d[g] };
        e[0] = f;
        return e;
    }
    ai(a) {
        let b = this.aj(this.l8, this.ma.f, this.n5(this.bi), this.n7(this.bi), this.lo(a), true);
        if (b == null) {
            return null;
        }
        let c = b[0];
        let d = b[1];
        let e = new Array(1);
        let f = new Array(2);
        f[0] = { $type: Point_$type, x: c[0], y: c[1] };
        f[1] = { $type: Point_$type, x: d[0], y: d[1] };
        e[0] = f;
        return e;
    }
    k9() {
        return this.pe;
    }
    ht() {
        super.ht();
        this.l8 = null;
        this.mt = null;
    }
    get m2() {
        return this.m1;
    }
    set m2(a) {
        if (this.m1 != a) {
            let b = this.m1;
            this.m1 = a;
            this.raisePropertyChanged("OpenColumn", b, this.m1);
        }
    }
    get my() {
        return this.mx;
    }
    set my(a) {
        if (this.mx != a) {
            let b = this.mx;
            this.mx = a;
            this.raisePropertyChanged("HighColumn", b, this.mx);
        }
    }
    get m0() {
        return this.mz;
    }
    set m0(a) {
        if (this.mz != a) {
            let b = this.mz;
            this.mz = a;
            this.raisePropertyChanged("LowColumn", b, this.mz);
        }
    }
    get mw() {
        return this.mv;
    }
    set mw(a) {
        if (this.mv != a) {
            let b = this.mv;
            this.mv = a;
            this.raisePropertyChanged("CloseColumn", b, this.mv);
        }
    }
    get m5() {
        return this.m4;
    }
    set m5(a) {
        if (this.m4 != a) {
            let b = this.m4;
            this.m4 = a;
            this.raisePropertyChanged("VolumeColumn", b, this.m4);
        }
    }
    ng() {
        return (this.assigningCategoryStyle != null && this.m8) || this.cu;
    }
    o0(a) {
        if (this.assigningCategoryStyle != null && this.m8) {
            this.assigningCategoryStyle(this, a);
        }
    }
    oy(a, b, c, d, e, f) {
        let g = this.b9;
        this.mg.ac(a, b, c, d, e, f, g);
        let h = this.mg.c;
        let i = null;
        let j = this.bz;
        if (g && this.bs != null) {
            i = this.bs.az.getHighlightingInfo(this, j, d, h.m, h.l, false);
            h.b = i;
        }
        h.f = f;
        this.o0(h);
        this.mg.aa(i, f, g);
    }
    ny(a) {
        return this.ed(a, this.l8);
    }
    fe(a, b) {
        return this.ff(a, b, this.l8, runOn(this, this.ny), new FinancialValueList(this.m2, this.my, this.m0, this.mw, this.m5));
    }
    fc(a, b) {
        return this.fd(a, b, this.l8, runOn(this, this.ny), new FinancialValueList(this.m2, this.my, this.m0, this.mw, this.m5));
    }
    d9(a, b, c, d, e) {
        if (c == null) {
            return Number.POSITIVE_INFINITY;
        }
        let f = this.l8.jy;
        return this.ea(a, b, this.l8, d, e, f, runOn(this, this.ny));
    }
    getOffsetValue() {
        return this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
    }
    getCategoryWidth() {
        return this.l8.getCategorySize(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
    }
    ll(a, b, c) {
        return this.ln(a, b, c, this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.mt, this.l8, null, null, null);
    }
    en(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nz(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l8.b8, d);
        return this.ep(new FinancialValueList(this.m2, this.my, this.m0, this.mw, this.m5), a, this.l8, f, e, runOn(this, this.ny), b, c);
    }
    ej(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nz(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l8.b8, d);
        return this.ep(this.my, a, this.l8, f, e, runOn(this, this.ny), b, c);
    }
    el(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nz(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l8.b8, d);
        return this.ep(this.m0, a, this.l8, f, e, runOn(this, this.ny), b, c);
    }
    n0(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nz(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l8.b8, d);
        return this.ep(this.mw, a, this.l8, f, e, runOn(this, this.ny), b, c);
    }
    n1(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nz(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l8.b8, d);
        return this.ep(this.m2, a, this.l8, f, e, runOn(this, this.ny), b, c);
    }
    n2(a, b, c) {
        let d = this.getEffectiveViewport1(this.bi);
        let e = this.nz(this.bi.bs, this.bi.br, d);
        let f = new ScalerParams(0, this.bi.bs, this.bi.br, this.l8.b8, d);
        return this.ep(this.m5, a, this.l8, f, e, runOn(this, this.ny), b, c);
    }
    lh(a, b, c) {
        return this.ln(a, b, c, this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.mt, this.l8, runOn(this, this.ej), (d, e) => this.ff(d, e, this.l8, runOn(this, this.ny), this.my), (d, e) => this.fd(d, e, this.l8, runOn(this, this.ny), this.my));
    }
    lj(a, b, c) {
        return this.ln(a, b, c, this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.mt, this.l8, runOn(this, this.el), (d, e) => this.ff(d, e, this.l8, runOn(this, this.ny), this.m0), (d, e) => this.fd(d, e, this.l8, runOn(this, this.ny), this.m0));
    }
    pg(a, b, c) {
        return this.ln(a, b, c, this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.mt, this.l8, runOn(this, this.n1), (d, e) => this.ff(d, e, this.l8, runOn(this, this.ny), this.m2), (d, e) => this.fd(d, e, this.l8, runOn(this, this.ny), this.m2));
    }
    pf(a, b, c) {
        return this.ln(a, b, c, this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.mt, this.l8, runOn(this, this.n0), (d, e) => this.ff(d, e, this.l8, runOn(this, this.ny), this.mw), (d, e) => this.fd(d, e, this.l8, runOn(this, this.ny), this.mw));
    }
    ph(a, b, c) {
        return this.ln(a, b, c, this.nz(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.mt, this.l8, runOn(this, this.n2), (d, e) => this.ff(d, e, this.l8, runOn(this, this.ny), this.m5), (d, e) => this.fd(d, e, this.l8, runOn(this, this.ny), this.m5));
    }
    ib() {
        super.ib();
        if (this.l8 != null) {
            this.l8.g6(false);
        }
        if (this.mt != null) {
            this.mt.g6(false);
        }
    }
    jt(a, b) {
        this.mo.bu.e(this.eu);
        this.jd(false);
    }
    js(a, b) {
        if (this.dm && this.ez < 0.05) {
            this.dn = true;
        }
        this.mo.bu.e(this.eu);
        this.jd(false);
    }
    m3(a, b, c) {
        let d = this.bw(b);
        this.nj.addItem(d, b);
        this.nk.addItem(b, c);
        return d;
    }
    ox(a, b) {
        if (b == null) {
            return;
        }
        a.deregisterColumn(b);
        let c = this.nj.item(b);
        this.nk.removeItem(c);
        this.nj.removeItem(b);
    }
    iz(a, b, c, d) {
        super.iz(a, b, c, d);
        switch (b) {
            case "SyncLink":
                if (this.bn != null && this.bs != null) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                break;
            case "SeriesViewer":
                if (c != null && d == null) {
                    if (this.l8 != null) {
                        this.l8.bv(this);
                    }
                    if (this.mt != null) {
                        this.mt.bv(this);
                    }
                }
                if (c == null && d != null) {
                    if (this.l8 != null) {
                        this.l8.ci(this);
                    }
                    if (this.mt != null) {
                        this.mt.ci(this);
                    }
                }
                this.mo.bu.e(this.eu);
                this.jd(false);
                break;
            case "FastItemsSource":
                this.m7 = true;
                if (typeCast(IFastItemsSource_$type, c) != null) {
                    this.ox(typeCast(IFastItemsSource_$type, c), this.m2);
                    this.ox(typeCast(IFastItemsSource_$type, c), this.my);
                    this.ox(typeCast(IFastItemsSource_$type, c), this.m0);
                    this.ox(typeCast(IFastItemsSource_$type, c), this.mw);
                    this.ox(typeCast(IFastItemsSource_$type, c), this.m5);
                    this.m2 = null;
                    this.my = null;
                    this.m0 = null;
                    this.mw = null;
                    this.m5 = null;
                }
                if (typeCast(IFastItemsSource_$type, d) != null) {
                    if (stringIsNullOrEmpty(this.oo) == false) {
                        this.m2 = this.m3(typeCast(IFastItemsSource_$type, d), this.oo, "OpenColumn");
                    }
                    if (stringIsNullOrEmpty(this.of) == false) {
                        this.my = this.m3(typeCast(IFastItemsSource_$type, d), this.of, "HighColumn");
                    }
                    if (stringIsNullOrEmpty(this.ok) == false) {
                        this.m0 = this.m3(typeCast(IFastItemsSource_$type, d), this.ok, "LowColumn");
                    }
                    if (stringIsNullOrEmpty(this.oc) == false) {
                        this.mw = this.m3(typeCast(IFastItemsSource_$type, d), this.oc, "CloseColumn");
                    }
                    if (stringIsNullOrEmpty(this.os) == false) {
                        this.m5 = this.m3(typeCast(IFastItemsSource_$type, d), this.os, "VolumeColumn");
                    }
                }
                this.m7 = false;
                if (this.mt != null && !this.mt.cl()) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                break;
            case FinancialSeries.$$p[6]:
                if (this.bz != null) {
                    this.ox(this.bz, this.m2);
                    this.m2 = this.m3(this.bz, this.oo, "OpenColumn");
                }
                break;
            case "OpenColumn":
                if (this.mt != null && !this.mt.cl() && !this.m7) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                break;
            case FinancialSeries.$$p[1]:
                if (this.bz != null) {
                    this.ox(this.bz, this.my);
                    this.my = this.m3(this.bz, this.of, "HighColumn");
                }
                break;
            case "HighColumn":
                if (this.mt != null && !this.mt.cl() && !this.m7) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                break;
            case FinancialSeries.$$p[4]:
                if (this.bz != null) {
                    this.ox(this.bz, this.m0);
                    this.m0 = this.m3(this.bz, this.ok, "LowColumn");
                }
                break;
            case "LowColumn":
                if (this.mt != null && !this.mt.cl() && !this.m7) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                break;
            case FinancialSeries.$$p[0]:
                if (this.bz != null) {
                    this.ox(this.bz, this.mw);
                    this.mw = this.m3(this.bz, this.oc, "CloseColumn");
                }
                break;
            case "CloseColumn":
                if (this.mt != null && !this.mt.cl() && !this.m7) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                this.o2();
                break;
            case FinancialSeries.$$p[8]:
                if (this.bz != null) {
                    this.ox(this.bz, this.m5);
                    this.m5 = this.m3(this.bz, this.os, "VolumeColumn");
                }
                break;
            case "VolumeColumn":
                if (this.mt != null && !this.mt.cl() && !this.m7) {
                    this.mo.bu.e(this.eu);
                    this.jd(false);
                }
                break;
            case FinancialSeries.$$p[9]:
                if (c != null) {
                    c.bv(this);
                }
                if (d != null) {
                    d.ci(this);
                }
                this.mo.bu.e(this.eu);
                this.jd(false);
                this.ik();
                this.ms = typeCast(ITimeRangeSelectorAxis_$type, this.l8);
                break;
            case FinancialSeries.$$p[10]:
                if (c != null) {
                    c.bv(this);
                }
                if (d != null) {
                    d.ci(this);
                }
                this.mo.bu.e(this.eu);
                if (this.mt != null) {
                    this.mt.cl();
                }
                {
                    this.jd(false);
                }
                this.ik();
                break;
            case "TransitionProgress":
                this.md.c(this.ez, this.mb, this.ma);
                if (this.cc(this.bi)) {
                    return;
                }
                if (this.ez == 1) {
                    this.ma.v();
                    this.o1(this.ma, this.mo);
                    if (this.dm) {
                        this.dm = false;
                        this.hw();
                        this.bt.r = truncate(this.eq());
                        this.bt.b = this.bu;
                    }
                }
                else {
                    this.o1(this.md, this.mo);
                }
                if (this.bs != null) {
                    this.bs.jj(this);
                }
                break;
            case FinancialSeries.$$p[5]:
                this.jd(false);
                break;
            case "IsCustomCategoryStyleAllowed":
                this.m8 = this.nb();
                this.jd(false);
                break;
            case "CategoryMode":
                if (this.l8 != null) {
                    this.l8.kn(true);
                }
                break;
        }
    }
    na(a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    }
    m9(a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.b5) {
            return true;
        }
        return false;
    }
    l1(a, b, c) {
        if (b < a || a < 0 || a > this.bz.count || b < 0 || b > this.bz.count || c == null) {
            return null;
        }
        let d = new Array((b - a) + 1);
        let e = c.cd;
        let f = null;
        if (e) {
            f = c.i$b;
        }
        for (let g = a; g <= b; g++) {
            let h = g;
            if (e) {
                h = f._inner[h];
            }
            d[g - a] = this.bz.item(g);
        }
        return d;
    }
    n5(a) {
        return a.bu.b;
    }
    n7(a) {
        return a.bu.c;
    }
    l0(a, b) {
        return this.l1(a, b, this.mt);
    }
    get_nc() {
        return false;
    }
    get nc() {
        return this.get_nc();
    }
    get_cv() {
        return true;
    }
    at(a, b) {
        if (this.nc) {
            let c = this.mq(a, b, this.mr);
            this.mr = c;
            return c;
        }
        else {
            let d = this.mp(a, b, this.mr);
            this.mr = d;
            return d;
        }
    }
    n9(a) {
        let b = this.ma;
        if (this.ca()) {
            b = this.md;
        }
        let c = this.bi.br;
        let d = this.bi.bs;
        let e = this.l8;
        let f = 0;
        if (e.cf) {
            let g = (a.y - d.top) / d.height;
            f = g * c.height + c.top;
        }
        else {
            let h = (a.x - d.left) / d.width;
            f = h * c.width + c.left;
        }
        let i = b.f.count;
        let j = 0;
        for (j = 0; j < i; j++) {
            let k = b.f._inner[j];
            let l = null;
            if (j < i - 1) {
                l = b.f._inner[j + 1];
            }
            if (k[0] <= f && l == null || l[0] >= f) {
                if (l != null) {
                    if (Math.abs(k[0] - f) < Math.abs(l[0] - f)) {
                        return j;
                    }
                    else {
                        return j + 1;
                    }
                }
                else {
                    return j;
                }
            }
        }
        return j;
    }
    mq(a, b, c) {
        let d = this.bz.count;
        let e = this.mo.bu.c;
        let f = this.mo.bu.d;
        let g = this.mo.bu.b;
        let h = this.l8;
        let i = -1;
        let j = -1;
        if (h.cd) {
            let k = this.ma;
            if (this.ca()) {
                k = this.md;
            }
            let l = this.n9(b);
            i = l;
            j = l;
        }
        else {
            let m = this.e8(b);
            i = truncate(Math.floor((intDivide(m, g)))) * g;
            j = i + (g - 1);
        }
        if (c != null && c.f == i && c.e == j) {
            return c;
        }
        let n = new HighlightingInfo();
        n.b = this;
        n.f = i;
        n.e = j;
        return n;
    }
    mp(a, b, c) {
        let d = new HighlightingInfo();
        d.b = this;
        d.f = 0;
        d.e = this.bz.count - 1;
        if (c != null && c.f == d.f && c.e == d.e) {
            return c;
        }
        return d;
    }
    nb() {
        return this.ne;
    }
    eb(a) {
        let b = this.bi.bs;
        let c = this.bi.br;
        let d = -1;
        if (!b.isEmpty && !c.isEmpty && this.l8 != null) {
            let e = this.getEffectiveViewport1(this.bi);
            let f = new ScalerParams(0, b, c, this.l8.b8, e);
            let g = this.lq(this.bi);
            let h = this.l8.dz(g.left, f);
            let i = this.l8.dz(g.right, f);
            let j = (a.x - b.left) / b.width;
            let k = h + (j * (i - h));
            if (this.l8.categoryMode != 0) {
                k -= 0.5;
            }
            d = k;
        }
        return d;
    }
    e8(a) {
        return truncate(Math.round(this.eb(a)));
    }
    get_c1() {
        return typeCast(ISortingAxis_$type, this.l8) !== null;
    }
    ap() {
        return this.l8;
    }
    fa(a) {
        let b = this.bi.bs;
        let c = this.bi.br;
        let d = this.getEffectiveViewport1(this.bi);
        if (b.isEmpty || c.isEmpty) {
            return -1;
        }
        let e = new Rect(0, 0, 0, 1, 1);
        let f = new ScalerParams(0, b, c, this.l8.b8, d);
        let g = typeCast(ISortingAxis_$type, this.l8);
        let h = this.lq(this.bi);
        let i = h.left;
        let j = h.right;
        let k = this.lg(a).x;
        let l = this.l8.dz(k, f);
        let m = this.l8.dz(i, f);
        let n = this.l8.dz(j, f);
        l = Math.max(m, Math.min(n, l));
        let o = g.i$f(l);
        return o;
    }
    fp(a) {
        let b = 0;
        if (typeCast(ISortingAxis_$type, this.l8) !== null) {
            b = this.fa(a);
            if (b == -1) {
                return null;
            }
        }
        else {
            b = this.e8(a);
        }
        return b >= 0 && this.bz != null && b < this.bz.count ? this.bz.item(b) : null;
    }
    nz(a, b, c) {
        if (this.l8 == null) {
            return 0;
        }
        return this.l8.js(a, b, c, this.fh);
    }
    dc() {
        return this.nf;
    }
    mh() {
        return 11;
    }
    bo() {
        return 3;
    }
    o1(a, b) {
        this.lp = a.aa;
        b.ar();
    }
    oz(a, b) {
        a.u();
    }
    dw(a, b, c) {
        let d = super.dw(a, b, c);
        let e = c;
        if (this.bz == null || this.bz.count == 0 || !c.l() || b.isEmpty || a.isEmpty || this.l8 == null || this.mt == null || e.bu.b < 1 || this.l8.bf == null || this.mt.bf == null || this.mt.j4 == this.mt.j3 || this.l8.itemsSource == null || this.l8.jy < 1) {
            e.bu.b = 0;
            d = false;
        }
        return d;
    }
    getViewInfo(a, b) {
        b = this.bi.bs;
        a = this.bi.br;
        return {
            p0: a,
            p1: b
        };
    }
    n3(a) {
        let b = 0;
        let c = a.bs;
        let d = a.br;
        let e = this.getEffectiveViewport1(this.bi);
        if (!c.isEmpty && !d.isEmpty && this.mt != null) {
            let f = new ScalerParams(0, c, d, this.mt.b8, e);
            f.b = this.eh();
            b = this.mt.dw(this.mt.ke, f);
        }
        return b;
    }
    hw() {
        super.hw();
        this.mb.v();
        this.ma.v();
        this.md.v();
    }
    je(a) {
        super.je(a);
        this.mo.bu.e(this.eu);
        if (this.cc(this.bi)) {
            return;
        }
        if (this.de) {
            if (this.ca()) {
                this.o1(this.md, this.mo);
            }
            else {
                this.o1(this.ma, this.mo);
            }
            return;
        }
        if (this.da(a)) {
            let b = this.mb;
            if (this.ca()) {
                if (this.bt.g) {
                    this.bt.t();
                }
                this.mb = this.md;
                this.md = b;
            }
            else {
                this.mb = this.ma;
                this.ma = b;
            }
            this.oz(this.ma, this.mo);
            if (this.dp) {
                this.bt.w();
                this.bt.r = truncate(this.er());
                this.bt.b = this.bv != null ? this.bv : this.bu;
                this.mj.p(this.mb, this.ma, this.isVertical, this.l8, this.mt, this.mi, this.mh(), this.bp, this.bo(), () => this.n3(this.mo), this.mo.br);
            }
            this.hs();
            this.jl();
            if (this.dp) {
                this.dn = false;
                this.dm = true;
            }
        }
        else {
            this.oz(this.ma, this.mo);
            this.o1(this.ma, this.mo);
        }
    }
    nh(a) {
        for (let b of fromEnum(a)) {
            switch (b) {
                case "HighColumn":
                    if (this.my == null) {
                        return false;
                    }
                    break;
                case "LowColumn":
                    if (this.m0 == null) {
                        return false;
                    }
                    break;
                case "OpenColumn":
                    if (this.m2 == null) {
                        return false;
                    }
                    break;
                case "CloseColumn":
                    if (this.mw == null) {
                        return false;
                    }
                    break;
                case "VolumeColumn":
                    if (this.m5 == null) {
                        return false;
                    }
                    break;
            }
        }
        return true;
    }
    get ni() {
        return this.l8 != null && typeCast(ISortingAxis_$type, this.l8) !== null;
    }
    nd() {
        return this.typical != null;
    }
    ow(a) {
        this.typical(this, a);
    }
    get nq() {
        return this.nn();
    }
    *_nn() {
        let a = false;
        if (this.nd()) {
            let b = this.mk(0, this.bz.count);
            this.ow(new FinancialEventArgs(0, this.bz.count, b, this.ml(b), this));
            if (b.typicalColumn != null) {
                a = true;
                for (let c of fromEnum(b.typicalColumn)) {
                    yield c;
                }
            }
        }
        if (!a) {
            if (this.ni && this.l8.i$b != null) {
                let d = this.bz.count;
                let e = this.l8.i$b;
                for (let f = 0; f < d; ++f) {
                    yield (this.my.item(e.item(f)) + this.m0.item(e.item(f)) + this.mw.item(e.item(f))) / 3;
                }
            }
            else {
                let g = this.bz.count;
                for (let h = 0; h < g; ++h) {
                    yield (this.my.item(h) + this.m0.item(h) + this.mw.item(h)) / 3;
                }
            }
        }
    }
    nn() {
        return toEnum(() => this._nn());
    }
    get np() {
        return this.nm();
    }
    *_nm() {
        if (this.ni && this.l8.i$b != null) {
            let a = this.my.count;
            let b = this.l8.i$b;
            if (a > 0) {
                yield this.n4(this.my.item(b.item(0)) - this.m0.item(b.item(0)));
            }
            for (let c = 1; c < a; ++c) {
                yield Math.max(this.n4(this.my.item(b.item(c)) - this.m0.item(b.item(c))), Math.max(this.n4(Math.abs(this.my.item(b.item(c)) - this.mw.item(b.item(c - 1)))), this.n4(Math.abs(this.m0.item(b.item(c)) - this.mw.item(b.item(c - 1))))));
            }
        }
        else {
            let d = this.my.count;
            if (d > 0) {
                yield this.n4(this.my.item(0) - this.m0.item(0));
            }
            for (let e = 1; e < d; ++e) {
                yield Math.max(this.n4(this.my.item(e) - this.m0.item(e)), Math.max(this.n4(Math.abs(this.my.item(e) - this.mw.item(e - 1))), this.n4(Math.abs(this.m0.item(e) - this.mw.item(e - 1)))));
            }
        }
    }
    nm() {
        return toEnum(() => this._nm());
    }
    get no() {
        return this.nl();
    }
    *_nl() {
        if (this.ni && this.l8.i$b != null) {
            let a = this.m0.count;
            let b = this.l8.i$b;
            if (a > 0) {
                yield this.n4(this.m0.item(b.item(0)));
            }
            for (let c = 1; c < a; c++) {
                yield Math.min(this.n4(this.m0.item(b.item(c))), this.n4(this.mw.item(b.item(c - 1))));
            }
        }
        else {
            let d = this.m0.count;
            if (d > 0) {
                yield this.n4(this.m0.item(0));
            }
            for (let e = 1; e < d; e++) {
                yield Math.min(this.n4(this.m0.item(e)), this.n4(this.mw.item(e - 1)));
            }
        }
    }
    nl() {
        return toEnum(() => this._nl());
    }
    ns(a) {
        if (a == null) {
            return null;
        }
        if (this.ni && this.l8.i$b != null) {
            return new SafeSortedReadOnlyDoubleCollection(0, a, this.l8.i$b);
        }
        return new SafeReadOnlyDoubleCollection(0, a);
    }
    nr() {
        let a = new List$1(String_$type, 0);
        a.add("HighColumn");
        a.add("LowColumn");
        a.add("CloseColumn");
        if (this.typicalBasedOn != null && this.bz != null && !this.m6) {
            this.m6 = true;
            let b = this.mk(0, this.bz.count);
            this.m6 = false;
            let c = new FinancialEventArgs(0, this.bz.count, b, this.ml(b), this);
            this.typicalBasedOn(this, c);
            if (c.basedOn != null && c.basedOn.count > 0) {
                return c.basedOn;
            }
        }
        return a;
    }
    getOpenColumnAsArray() {
        if (this.m2 == null) {
            return null;
        }
        if (this.l8 != null && typeCast(ISortingAxis_$type, this.l8) !== null) {
            if (this.nw != null) {
                return this.nw.asArray();
            }
            let a = new List$1(Number_$type, 2, this.m2.count);
            let b = this.l8.i$b;
            let c = this.m2.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nw = a;
            return this.nw.asArray();
        }
        else {
            return this.m2.asArray();
        }
    }
    getHighColumnAsArray() {
        if (this.my == null) {
            return null;
        }
        if (this.l8 != null && typeCast(ISortingAxis_$type, this.l8) !== null) {
            if (this.nu != null) {
                return this.nu.asArray();
            }
            let a = new List$1(Number_$type, 2, this.my.count);
            let b = this.l8.i$b;
            let c = this.my.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nu = a;
            return this.nu.asArray();
        }
        else {
            return this.my.asArray();
        }
    }
    getLowColumnAsArray() {
        if (this.m0 == null) {
            return null;
        }
        if (this.l8 != null && typeCast(ISortingAxis_$type, this.l8) !== null) {
            if (this.nv != null) {
                return this.nv.asArray();
            }
            let a = new List$1(Number_$type, 2, this.m0.count);
            let b = this.l8.i$b;
            let c = this.m0.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nv = a;
            return this.nv.asArray();
        }
        else {
            return this.m0.asArray();
        }
    }
    getCloseColumnAsArray() {
        if (this.mw == null) {
            return null;
        }
        if (this.l8 != null && typeCast(ISortingAxis_$type, this.l8) !== null) {
            if (this.nt != null) {
                return this.nt.asArray();
            }
            let a = new List$1(Number_$type, 2, this.mw.count);
            let b = this.l8.i$b;
            let c = this.mw.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nt = a;
            return this.nt.asArray();
        }
        else {
            return this.mw.asArray();
        }
    }
    getVolumeColumnAsArray() {
        if (this.m5 == null) {
            return null;
        }
        if (this.l8 != null && typeCast(ISortingAxis_$type, this.l8) !== null) {
            if (this.nx != null) {
                return this.nx.asArray();
            }
            let a = new List$1(Number_$type, 2, this.m5.count);
            let b = this.l8.i$b;
            let c = this.m5.asArray();
            for (let d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.nx = a;
            return this.nx.asArray();
        }
        else {
            return this.m5.asArray();
        }
    }
    hy(a, b, c, d) {
        super.hy(a, b, c, d);
        if (this.l8 == null || !(typeCast(ISortingAxis_$type, this.l8) !== null)) {
            return;
        }
        let e = this.l8.i$b;
        switch (a) {
            case 1:
                for (let f = b; f < c; f++) {
                    let g = e._inner[f];
                    if (this.nw != null) {
                        this.nw.insert(f, this.m2.item(g));
                    }
                    if (this.nu != null) {
                        this.nu.insert(f, this.my.item(g));
                    }
                    if (this.nv != null) {
                        this.nv.insert(f, this.m0.item(g));
                    }
                    if (this.nt != null) {
                        this.nt.insert(f, this.mw.item(g));
                    }
                    if (this.nx != null) {
                        this.nx.insert(f, this.m5.item(g));
                    }
                }
                break;
            case 0:
                if (this.nw != null) {
                    this.nw.v(b, c);
                }
                if (this.nu != null) {
                    this.nu.v(b, c);
                }
                if (this.nv != null) {
                    this.nv.v(b, c);
                }
                if (this.nt != null) {
                    this.nt.v(b, c);
                }
                if (this.nx != null) {
                    this.nx.v(b, c);
                }
                break;
            case 4:
                if (this.nw != null) {
                    this.nw = new List$1(Number_$type, 0);
                }
                if (this.nu != null) {
                    this.nu = new List$1(Number_$type, 0);
                }
                if (this.nv != null) {
                    this.nv = new List$1(Number_$type, 0);
                }
                if (this.nt != null) {
                    this.nt = new List$1(Number_$type, 0);
                }
                if (this.nx != null) {
                    this.nx = new List$1(Number_$type, 0);
                }
                break;
            case 3:
            case 2:
                for (let h = b; h < c; h++) {
                    let i = e._inner[h];
                    if (this.nw != null) {
                        this.nw._inner[h] = this.m2.item(i);
                    }
                    if (this.nu != null) {
                        this.nu._inner[h] = this.my.item(i);
                    }
                    if (this.nv != null) {
                        this.nv._inner[h] = this.m0.item(i);
                    }
                    if (this.nt != null) {
                        this.nt._inner[h] = this.mw.item(i);
                    }
                    if (this.nx != null) {
                        this.nx._inner[h] = this.m5.item(i);
                    }
                }
                break;
        }
        this.o2();
        this.jq();
    }
    mk(a, b) {
        let c = this.ns(this.m2);
        let d = this.ns(this.mw);
        let e = this.ns(this.my);
        let f = this.ns(this.m0);
        let g = this.ns(this.m5);
        let h = ((() => {
            let $ret = new FinancialCalculationDataSource();
            $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(this.nq), this.nr());
            $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(this.np), ((() => {
                let $ret = new List$1(String_$type, 0);
                $ret.add("HighColumn");
                $ret.add("LowColumn");
                $ret.add("CloseColumn");
                return $ret;
            })()));
            $ret.trueLow = new CalculatedColumn(1, new SafeEnumerable(this.no), ((() => {
                let $ret = new List$1(String_$type, 0);
                $ret.add("LowColumn");
                $ret.add("CloseColumn");
                return $ret;
            })()));
            $ret.openColumn = c;
            $ret.closeColumn = d;
            $ret.highColumn = e;
            $ret.lowColumn = f;
            $ret.volumeColumn = g;
            $ret.calculateFrom = a;
            $ret.calculateCount = b;
            $ret.minimumValue = NaN;
            $ret.maximumValue = NaN;
            $ret.count = this.bz != null ? this.bz.count : 0;
            return $ret;
        })());
        return h;
    }
    n4(a) {
        if (isInfinity(a) || isNaN_(a)) {
            return 0;
        }
        return a;
    }
    ml(a) {
        return ((() => {
            let $ret = new FinancialCalculationSupportingCalculations();
            $ret.a = new ColumnSupportingCalculation(1, TrendCalculators.b, new List$1(String_$type, 0));
            $ret.c = new ColumnSupportingCalculation(1, TrendCalculators.e, new List$1(String_$type, 0));
            $ret.d = new ColumnSupportingCalculation(1, TrendCalculators.f, new List$1(String_$type, 0));
            $ret.b = new ColumnSupportingCalculation(1, TrendCalculators.d, new List$1(String_$type, 0));
            $ret.h = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.volumeColumn, b.shortPeriod), ((() => {
                let $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.f = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.volumeColumn, b.longPeriod), ((() => {
                let $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.g = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.typicalColumn, b.shortPeriod), a.typicalColumn.basedOn);
            $ret.e = new DataSourceSupportingCalculation(1, (b) => TrendCalculators.b(b.typicalColumn, b.longPeriod), a.typicalColumn.basedOn);
            $ret.k = Series.d1;
            $ret.j = Series.d0;
            $ret.i = runOn(this, this.n4);
            return $ret;
        })());
    }
    get categoryAxis() {
        return this.l8;
    }
    jf(a, b) {
        super.jf(a, b);
        if (!this.dl) {
            this.bi.az(b);
            return;
        }
        let c = typeCast(FinancialSeriesView.$, this.bh);
        this.bi.az(b);
        c.bu.e(this.eu);
        if (this.cc(this.bh)) {
            return;
        }
        if (!this.df) {
            this.oz(this.mc, c);
        }
        this.df = false;
        this.o1(this.mc, c);
        this.dl = false;
    }
    jc(a, b, c, d, e) {
        super.jc(a, b, c, d, e);
        let f = this.a0.a$h.item(d);
        let g = f;
        g.bu.e(this.eu);
        f.ay(c);
        if (this.cc(g)) {
            return;
        }
        if (this.l9 == null) {
            this.l9 = new CategoryFrame(3);
        }
        this.l9.u();
        this.oz(this.l9, g);
        this.o1(this.l9, g);
    }
    am(a) {
        if (this.l8 == a) {
            return this.mt;
        }
        if (this.mt == a) {
            return this.l8;
        }
        return null;
    }
    preferredCategoryMode(a) {
        let b = typeCast(IDateTimeAxis_$type, this.l8);
        return b != null ? b.preferredCategoryMode(this) : this.mf;
    }
    get mf() {
        return this.me;
    }
    set mf(a) {
        let b = this.mf;
        if (a != b) {
            this.me = a;
            this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.mf));
        }
    }
    get_cz() {
        return true;
    }
    ji(a, b) {
        super.ji(a, b);
        this.pe = a;
    }
    o2() {
        this.d8 = this.mw == null || this.mw.count == 0 ? NaN : this.mw.item(this.mw.count - 1);
    }
    fr(a) {
        if (this.ms != null && a != null) {
            if (this.mu == null || this.mu.propertyName != this.ms.dateTimeMemberPath) {
                this.mu = new FastReflectionHelper(false, this.ms.dateTimeMemberPath);
            }
            let b = this.mu.getPropertyValue(a);
            if (typeCast(Date_$type, b) !== null) {
                return dateToStringFormat(b, this.ms.itemLabelFormat());
            }
        }
        return super.fr(a);
    }
}
FinancialSeries.$t = markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
FinancialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:oc:o3', [2, null], 'HighMemberPath:of:o4', [2, null], 'IsCustomCategoryStyleAllowed:ne:o5', [0, false], 'IsTransitionInEnabled:nf:o6', [0, false], 'LowMemberPath:ok:o7', [2, null], 'NegativeBrush:pe:o8', [Brush.$, null], 'OpenMemberPath:oo:o9', [2, null], 'TransitionInMode:mi:pa', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:os:pb', [2, null], 'XAxis:l8:pc', [CategoryAxisBase.$, null], 'YAxis:mt:pd', [NumericYAxis.$, null]]);
/**
 * @hidden
 */
export class FinancialCalculationSupportingCalculations extends Base {
    constructor() {
        super(...arguments);
        this.a = null;
        this.c = null;
        this.d = null;
        this.b = null;
        this.h = null;
        this.f = null;
        this.g = null;
        this.e = null;
        this.k = null;
        this.j = null;
        this.i = null;
    }
}
FinancialCalculationSupportingCalculations.$t = markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
/**
 * @hidden
 */
export class DataSourceSupportingCalculation extends SupportingCalculation$1 {
    constructor(a, ..._rest) {
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0:
                {
                    let c = _rest[0];
                    super(Delegate_$type, 0, c);
                }
                break;
            case 1:
                {
                    let c = _rest[0];
                    let d = _rest[1];
                    super(Delegate_$type, 1, c, d);
                }
                break;
        }
    }
}
DataSourceSupportingCalculation.$t = markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', SupportingCalculation$1.$.specialize(Delegate_$type));
/**
 * @hidden
 */
export class FinancialCalculationDataSource extends Base {
    constructor() {
        super(...arguments);
        this._openColumn = null;
        this._closeColumn = null;
        this._highColumn = null;
        this._lowColumn = null;
        this._volumeColumn = null;
        this._indicatorColumn = null;
        this._typicalColumn = null;
        this._trueRange = null;
        this._trueLow = null;
        this._period = 0;
        this._shortPeriod = 0;
        this._longPeriod = 0;
        this._count = 0;
        this._calculateFrom = 0;
        this._calculateCount = 0;
        this._multiplier = 0;
        this._minimumValue = 0;
        this._maximumValue = 0;
        this._specifiesRange = false;
        this._series = null;
    }
    get openColumn() {
        return this._openColumn;
    }
    set openColumn(a) {
        this._openColumn = a;
    }
    get closeColumn() {
        return this._closeColumn;
    }
    set closeColumn(a) {
        this._closeColumn = a;
    }
    get highColumn() {
        return this._highColumn;
    }
    set highColumn(a) {
        this._highColumn = a;
    }
    get lowColumn() {
        return this._lowColumn;
    }
    set lowColumn(a) {
        this._lowColumn = a;
    }
    get volumeColumn() {
        return this._volumeColumn;
    }
    set volumeColumn(a) {
        this._volumeColumn = a;
    }
    get indicatorColumn() {
        return this._indicatorColumn;
    }
    set indicatorColumn(a) {
        this._indicatorColumn = a;
    }
    get typicalColumn() {
        return this._typicalColumn;
    }
    set typicalColumn(a) {
        this._typicalColumn = a;
    }
    get trueRange() {
        return this._trueRange;
    }
    set trueRange(a) {
        this._trueRange = a;
    }
    get trueLow() {
        return this._trueLow;
    }
    set trueLow(a) {
        this._trueLow = a;
    }
    get period() {
        return this._period;
    }
    set period(a) {
        this._period = a;
    }
    get shortPeriod() {
        return this._shortPeriod;
    }
    set shortPeriod(a) {
        this._shortPeriod = a;
    }
    get longPeriod() {
        return this._longPeriod;
    }
    set longPeriod(a) {
        this._longPeriod = a;
    }
    get count() {
        return this._count;
    }
    set count(a) {
        this._count = a;
    }
    get calculateFrom() {
        return this._calculateFrom;
    }
    set calculateFrom(a) {
        this._calculateFrom = a;
    }
    get calculateCount() {
        return this._calculateCount;
    }
    set calculateCount(a) {
        this._calculateCount = a;
    }
    get multiplier() {
        return this._multiplier;
    }
    set multiplier(a) {
        this._multiplier = a;
    }
    get minimumValue() {
        return this._minimumValue;
    }
    set minimumValue(a) {
        this._minimumValue = a;
    }
    get maximumValue() {
        return this._maximumValue;
    }
    set maximumValue(a) {
        this._maximumValue = a;
    }
    get specifiesRange() {
        return this._specifiesRange;
    }
    set specifiesRange(a) {
        this._specifiesRange = a;
    }
    get series() {
        return this._series;
    }
    set series(a) {
        this._series = a;
    }
}
FinancialCalculationDataSource.$t = markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
/**
 * @hidden
 */
export class FinancialSeriesView extends SeriesView {
    constructor(a) {
        super(a);
        this.bw = null;
        this.bu = null;
        this.by = 0;
        this.by = -1;
        this.bw = a;
        this.bu = this.bv();
    }
    bx(a) {
        if (this.by != a.t) {
            return true;
        }
        return false;
    }
    bz(a) {
        this.by = a.t;
    }
    ap() {
        super.ap();
        if (!this.n) {
            this.e.bj = 6;
        }
    }
    getDefaultTooltipTemplate() {
        let a = "<div class='ui-chart-default-tooltip-content'>";
        if (this.bw.l8.b5) {
            a += "<span>${itemLabel}</span><br/>";
        }
        else if (this.bw.l8.e7 != null) {
            a += "<span>${item." + this.bw.l8.e7 + "}</span><br/>";
        }
        a += "<span class='ui-priority-primary'";
        let b = this.e.a0.a$q(this.e);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        let c = new SRProvider(this.t);
        let d = c.al("financialSeries_Open");
        let e = c.al("financialSeries_High");
        let f = c.al("financialSeries_Low");
        let g = c.al("financialSeries_Close");
        d = stringIsNullOrEmpty(d) ? "Open" : d;
        e = stringIsNullOrEmpty(e) ? "High" : e;
        f = stringIsNullOrEmpty(f) ? "Low" : f;
        g = stringIsNullOrEmpty(g) ? "Close" : g;
        a += ">" + this.bw.fx + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.bw.oo + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.bw.of + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.bw.ok + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.bw.oc + "}</td></tr>";
        if (!stringIsNullOrEmpty(this.bw.os)) {
            let h = c.al("financialSeries_Volume");
            h = stringIsNullOrEmpty(h) ? "Volume" : h;
            a += "<tr><td>" + h + ":</td><td>" + "${item." + this.bw.os + "}</td></tr>";
        }
        a += "</table></div>";
        return a;
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.la = a;
        this.e.ev = 5;
        this.e.ew = 2;
        this.e.ex = 2;
    }
}
FinancialSeriesView.$t = markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
//# sourceMappingURL=FinancialEventArgs_combined.js.map