/*
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, runOn, delegateCombine, enumGetBox, Point_$type, String_$type, Number_$type, fromEnum, toEnum, Date_$type, markDep, Delegate_$type } from "igniteui-react-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-react-core";
import { IFastItemColumn$1_$type } from "igniteui-react-core";
import { Series } from "./Series";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-react-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-react-core";
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-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-react-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-react-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-react-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { dateToStringFormat } from "igniteui-react-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let FinancialEventArgs = /*@__PURE__*/ (() => {
    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 = /*@__PURE__*/ markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
    return FinancialEventArgs;
})();
/**
 * @hidden
 */
export let FinancialBucketCalculator = /*@__PURE__*/ (() => {
    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.b2.hk;
            return {
                p0: a,
                p1: b,
                p2: c,
                p3: d
            };
        }
        e(a) {
            let b = this.a.by;
            let c = this.a.bx;
            let d = this.a.bx;
            if (this.a.b2 != null) {
                d = this.a.b2.getEffectiveViewport1(this.a);
            }
            if (b.isEmpty || c.isEmpty || this.a.b2.ub == null) {
                this.b = 0;
                return;
            }
            let e = (this.a.b2.ub != null) ? this.a.b2.ub.ch : false;
            let f = new ScalerParams(0, b, c, e, d);
            let g = this.a.b2.tq(this.a);
            let h = typeCast(ISortingAxis_$type, this.a.b2.ub);
            if (h == null || h.i$b == null) {
                let i = Math.floor(this.a.b2.ub.em(g.left, f));
                let j = Math.ceil(this.a.b2.ub.em(g.right, f));
                if (this.a.b2.ub.ch) {
                    j = Math.ceil(this.a.b2.ub.em(g.left, f));
                    i = Math.floor(this.a.b2.ub.em(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 = /*@__PURE__*/ markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
    return FinancialBucketCalculator;
})();
/**
 * @hidden
 */
export let FinancialSeries = /*@__PURE__*/ (() => {
    class FinancialSeries extends Series {
        g1() {
            let a = super.g1();
            {
                let b = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "OpenMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedOpenMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.xe));
                a.add(b);
            }
            {
                let c = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "HighMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedHighMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.xc));
                a.add(c);
            }
            {
                let d = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "LowMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedLowMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.xd));
                a.add(d);
            }
            {
                let e = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "CloseMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedCloseMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.xb));
                a.add(e);
            }
            {
                let f = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "VolumeMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedVolumeMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.xf));
                a.add(f);
            }
            {
                let g = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "Brush";
                    $ret.p = true;
                    $ret.y = "ActualBrush";
                    $ret.q = true;
                    return $ret;
                })());
                g.valueResolving = delegateCombine(g.valueResolving, runOn(this, this.pz));
                a.add(g);
            }
            {
                let h = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "Outline";
                    $ret.p = true;
                    $ret.y = "ActualOutline";
                    $ret.q = true;
                    return $ret;
                })());
                h.valueResolving = delegateCombine(h.valueResolving, runOn(this, this.pz));
                a.add(h);
            }
            {
                let i = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "NegativeBrush";
                    $ret.p = true;
                    $ret.q = true;
                    return $ret;
                })());
                i.valueResolving = delegateCombine(i.valueResolving, runOn(this, this.pz));
                a.add(i);
            }
            {
                let j = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "NegativeOutline";
                    $ret.p = true;
                    $ret.q = true;
                    return $ret;
                })());
                j.valueResolving = delegateCombine(j.valueResolving, runOn(this, this.pz));
                a.add(j);
            }
            let k = ((() => {
                let $ret = new SeriesLayerPropertyOverlay();
                $ret.p = true;
                $ret.ad = "IsTransitionInEnabled";
                $ret.x = true;
                $ret.q = true;
                return $ret;
            })());
            a.add(k);
            let l = ((() => {
                let $ret = new SeriesLayerPropertyOverlay();
                $ret.p = true;
                $ret.ad = "TransitionInMode";
                $ret.x = enumGetBox(CategoryTransitionInMode_$type, 20);
                $ret.q = true;
                return $ret;
            })());
            a.add(l);
            return a;
        }
        xe(a, b) {
            if (this.wo != null) {
                b.value = this.wo;
                return;
            }
            b.value = this.w1;
        }
        xc(a, b) {
            if (this.wk != null) {
                b.value = this.wk;
                return;
            }
            b.value = this.ws;
        }
        xd(a, b) {
            if (this.wm != null) {
                b.value = this.wm;
                return;
            }
            b.value = this.wx;
        }
        xb(a, b) {
            if (this.wi != null) {
                b.value = this.wi;
                return;
            }
            b.value = this.wf;
        }
        xf(a, b) {
            if (this.wq != null) {
                b.value = this.wq;
                return;
            }
            b.value = this.w5;
        }
        jx() {
            if (this.dk()) {
                return this.bf.uh;
            }
            else {
                return this.bf.ud;
            }
        }
        o2(a) {
            super.o2(a);
            this.us = a;
        }
        get_el() {
            return true;
        }
        ag() {
            return [this.ub, this.uu];
        }
        jv(a, b) {
            let c = this.lw(b);
            if (c == FinancialSeries.$$p[11]) {
                return this.jw(a, b, this.w1);
            }
            if (c == FinancialSeries.$$p[1]) {
                return this.jw(a, b, this.ws);
            }
            if (c == FinancialSeries.$$p[9]) {
                return this.jw(a, b, this.wx);
            }
            if (c == FinancialSeries.$$p[0]) {
                return this.jw(a, b, this.wf);
            }
            if (c == FinancialSeries.$$p[13]) {
                return this.jw(a, b, this.w5);
            }
            return super.jv(a, b);
        }
        wb() {
            return 2;
        }
        v9() {
            return 4;
        }
        ah(a) {
            let b = this.aj(this.ub, this.ud.f, this.v8(this.cg), this.wa(this.cg), this.to(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.wb();
            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.ub, this.ud.f, this.v8(this.cg), this.wa(this.cg), this.to(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;
        }
        constructor() {
            super();
            this.u2 = null;
            this.u0 = null;
            this.u1 = null;
            this.uz = null;
            this.u3 = null;
            this.vc = false;
            this.assigningCategoryStyle = null;
            this.uk = null;
            this.vm = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
            this.vn = new Dictionary$2(String_$type, String_$type, 0);
            this.vb = false;
            this.uy = null;
            this.uf = null;
            this.uh = null;
            this.ud = null;
            this.un = null;
            this.typical = null;
            this.typicalBasedOn = null;
            this.va = false;
            this.vz = null;
            this.vx = null;
            this.vy = null;
            this.vw = null;
            this.v0 = null;
            this.ug = null;
            this.uc = null;
            this.ui = 0;
            this.ut = null;
            this.uv = null;
            this.uk = new CategorySeriesRenderManager();
            this.vc = false;
            this.un = new CategoryTransitionSourceFramePreparer();
            this.ug = new CategoryFrame(3);
            this.ab = FinancialSeries.$;
            this.uj = 0;
        }
        s5() {
            return this.x1;
        }
        s6() {
            return this.x1;
        }
        nh() {
            super.nh();
            this.ub = null;
            this.uu = null;
        }
        get_d0() {
            return true;
        }
        get_fj() {
            return this.uu != null && this.uu.ch;
        }
        get u7() {
            return this.u2;
        }
        set u7(a) {
            if (this.u2 != a) {
                let b = this.u2;
                this.u2 = a;
                this.raisePropertyChanged("OpenColumn", b, this.u2);
            }
        }
        get u5() {
            return this.u0;
        }
        set u5(a) {
            if (this.u0 != a) {
                let b = this.u0;
                this.u0 = a;
                this.raisePropertyChanged("HighColumn", b, this.u0);
            }
        }
        get u6() {
            return this.u1;
        }
        set u6(a) {
            if (this.u1 != a) {
                let b = this.u1;
                this.u1 = a;
                this.raisePropertyChanged("LowColumn", b, this.u1);
            }
        }
        get u4() {
            return this.uz;
        }
        set u4(a) {
            if (this.uz != a) {
                let b = this.uz;
                this.uz = a;
                this.raisePropertyChanged("CloseColumn", b, this.uz);
            }
        }
        get u9() {
            return this.u3;
        }
        set u9(a) {
            if (this.u3 != a) {
                let b = this.u3;
                this.u3 = a;
                this.raisePropertyChanged("VolumeColumn", b, this.u3);
            }
        }
        fo() {
            return this.highlightedItemsSource != null || (this.wo != null && this.wk != null && this.wm != null && this.wi != null);
        }
        vj() {
            return (this.assigningCategoryStyle != null && this.vc) || this.bp != 1;
        }
        xi(a) {
            if (this.assigningCategoryStyle != null && this.vc) {
                this.assigningCategoryStyle(this, a);
            }
        }
        xg(a, b, c, d, e, f) {
            let g = this.bp != 1;
            this.uk.a3(this.uk.b, d.cn, a, b, c, d, e, f, false);
            this.uk.ab(this.hi);
            let h = this.uk.ay;
            let i = null;
            let j = this.c7;
            if (g && this.cv != null) {
                i = this.cv.c2.getHighlightingInfo(this, j, h.o, h.n, false);
                h.b = i;
            }
            h.f = f;
            this.xi(h);
            this.uk.z(this, i, f, g, b < 0);
        }
        v1(a) {
            return this.hy(a, this.ub);
        }
        jg(a, b) {
            return this.jh(a, b, this.ub, runOn(this, this.v1), new FinancialValueList(this.u7, this.u5, this.u6, this.u4, this.u9));
        }
        je(a, b) {
            return this.jf(a, b, this.ub, runOn(this, this.v1), new FinancialValueList(this.u7, this.u5, this.u6, this.u4, this.u9));
        }
        hu(a, b, c, d, e) {
            if (c == null) {
                return Number.POSITIVE_INFINITY;
            }
            let f = this.ub.lf;
            return this.hv(a, b, this.ub, d, e, f, runOn(this, this.v1));
        }
        getOffsetValue() {
            return this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg));
        }
        getCategoryWidth() {
            return this.ub.getCategorySize(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg));
        }
        tj(a, b, c) {
            return this.tl(a, b, c, this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg)), this.uu, this.ub, null, null, null);
        }
        ia(a, b, c) {
            let d = this.getEffectiveViewport1(this.cg);
            let e = this.v2(this.cg.by, this.cg.bx, d);
            let f = new ScalerParams(0, this.cg.by, this.cg.bx, this.ub.ch, d);
            return this.ic(new FinancialValueList(this.u7, this.u5, this.u6, this.u4, this.u9), a, this.ub, f, e, runOn(this, this.v1), b, c);
        }
        h6(a, b, c) {
            let d = this.getEffectiveViewport1(this.cg);
            let e = this.v2(this.cg.by, this.cg.bx, d);
            let f = new ScalerParams(0, this.cg.by, this.cg.bx, this.ub.ch, d);
            return this.ic(this.u5, a, this.ub, f, e, runOn(this, this.v1), b, c);
        }
        h8(a, b, c) {
            let d = this.getEffectiveViewport1(this.cg);
            let e = this.v2(this.cg.by, this.cg.bx, d);
            let f = new ScalerParams(0, this.cg.by, this.cg.bx, this.ub.ch, d);
            return this.ic(this.u6, a, this.ub, f, e, runOn(this, this.v1), b, c);
        }
        v3(a, b, c) {
            let d = this.getEffectiveViewport1(this.cg);
            let e = this.v2(this.cg.by, this.cg.bx, d);
            let f = new ScalerParams(0, this.cg.by, this.cg.bx, this.ub.ch, d);
            return this.ic(this.u4, a, this.ub, f, e, runOn(this, this.v1), b, c);
        }
        v4(a, b, c) {
            let d = this.getEffectiveViewport1(this.cg);
            let e = this.v2(this.cg.by, this.cg.bx, d);
            let f = new ScalerParams(0, this.cg.by, this.cg.bx, this.ub.ch, d);
            return this.ic(this.u7, a, this.ub, f, e, runOn(this, this.v1), b, c);
        }
        v5(a, b, c) {
            let d = this.getEffectiveViewport1(this.cg);
            let e = this.v2(this.cg.by, this.cg.bx, d);
            let f = new ScalerParams(0, this.cg.by, this.cg.bx, this.ub.ch, d);
            return this.ic(this.u9, a, this.ub, f, e, runOn(this, this.v1), b, c);
        }
        tf(a, b, c) {
            return this.tl(a, b, c, this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg)), this.uu, this.ub, runOn(this, this.h6), (d, e) => this.jh(d, e, this.ub, runOn(this, this.v1), this.u5), (d, e) => this.jf(d, e, this.ub, runOn(this, this.v1), this.u5));
        }
        th(a, b, c) {
            return this.tl(a, b, c, this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg)), this.uu, this.ub, runOn(this, this.h8), (d, e) => this.jh(d, e, this.ub, runOn(this, this.v1), this.u6), (d, e) => this.jf(d, e, this.ub, runOn(this, this.v1), this.u6));
        }
        x3(a, b, c) {
            return this.tl(a, b, c, this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg)), this.uu, this.ub, runOn(this, this.v4), (d, e) => this.jh(d, e, this.ub, runOn(this, this.v1), this.u7), (d, e) => this.jf(d, e, this.ub, runOn(this, this.v1), this.u7));
        }
        x2(a, b, c) {
            return this.tl(a, b, c, this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg)), this.uu, this.ub, runOn(this, this.v3), (d, e) => this.jh(d, e, this.ub, runOn(this, this.v1), this.u4), (d, e) => this.jf(d, e, this.ub, runOn(this, this.v1), this.u4));
        }
        x4(a, b, c) {
            return this.tl(a, b, c, this.v2(this.cg.by, this.cg.bx, this.getEffectiveViewport1(this.cg)), this.uu, this.ub, runOn(this, this.v5), (d, e) => this.jh(d, e, this.ub, runOn(this, this.v1), this.u9), (d, e) => this.jf(d, e, this.ub, runOn(this, this.v1), this.u9));
        }
        oc() {
            super.oc();
            if (this.ub != null) {
                this.ub.h8(false);
            }
            if (this.uu != null) {
                this.uu.h8(false);
            }
        }
        qp(a, b) {
            this.us.b0.e(this.hk);
            this.pr(false);
        }
        qo(a, b) {
            if (this.ga && this.iw < 0.05) {
                this.gb = true;
                this.ge = false;
                this.fu = false;
            }
            this.us.b0.e(this.hk);
            this.pr(false);
        }
        u8(a, b, c) {
            let d = this.c4(b);
            this.vm.addItem(d, b);
            this.vn.addItem(b, c);
            return d;
        }
        xa(a, b) {
            if (b == null) {
                return;
            }
            a.deregisterColumn(b);
            let c = this.vm.item(b);
            this.vn.removeItem(c);
            this.vm.removeItem(b);
        }
        pa(a, b, c, d) {
            super.pa(a, b, c, d);
            switch (b) {
                case "SyncLink":
                    if (this.co != null && this.cv != null) {
                        this.us.b0.e(this.hk);
                        this.pr(false);
                    }
                    break;
                case "SeriesViewer":
                    if (c != null && d == null) {
                        if (this.ub != null) {
                            this.ub.b0(this);
                        }
                        if (this.uu != null) {
                            this.uu.b0(this);
                        }
                    }
                    if (c == null && d != null) {
                        if (this.ub != null) {
                            this.ub.ct(this);
                        }
                        if (this.uu != null) {
                            this.uu.ct(this);
                        }
                    }
                    this.us.b0.e(this.hk);
                    this.pr(false);
                    break;
                case "FastItemsSource":
                    this.vb = true;
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        this.xa(typeCast(IFastItemsSource_$type, c), this.u7);
                        this.xa(typeCast(IFastItemsSource_$type, c), this.u5);
                        this.xa(typeCast(IFastItemsSource_$type, c), this.u6);
                        this.xa(typeCast(IFastItemsSource_$type, c), this.u4);
                        this.xa(typeCast(IFastItemsSource_$type, c), this.u9);
                        this.u7 = null;
                        this.u5 = null;
                        this.u6 = null;
                        this.u4 = null;
                        this.u9 = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        if (stringIsNullOrEmpty(this.w1) == false) {
                            this.u7 = this.u8(typeCast(IFastItemsSource_$type, d), this.w1, "OpenColumn");
                        }
                        if (stringIsNullOrEmpty(this.ws) == false) {
                            this.u5 = this.u8(typeCast(IFastItemsSource_$type, d), this.ws, "HighColumn");
                        }
                        if (stringIsNullOrEmpty(this.wx) == false) {
                            this.u6 = this.u8(typeCast(IFastItemsSource_$type, d), this.wx, "LowColumn");
                        }
                        if (stringIsNullOrEmpty(this.wf) == false) {
                            this.u4 = this.u8(typeCast(IFastItemsSource_$type, d), this.wf, "CloseColumn");
                        }
                        if (stringIsNullOrEmpty(this.w5) == false) {
                            this.u9 = this.u8(typeCast(IFastItemsSource_$type, d), this.w5, "VolumeColumn");
                        }
                    }
                    this.vb = false;
                    if (this.uu != null && !this.uu.c1()) {
                        this.us.b0.e(this.hk);
                        this.pr(this.fr && c != null);
                    }
                    break;
                case FinancialSeries.$$p[11]:
                    if (this.c7 != null) {
                        this.xa(this.c7, this.u7);
                        this.u7 = this.u8(this.c7, this.w1, "OpenColumn");
                    }
                    break;
                case "OpenColumn":
                    if (this.uu != null && !this.uu.c1() && !this.vb) {
                        this.us.b0.e(this.hk);
                        this.pr(this.fr && this.dp);
                    }
                    break;
                case FinancialSeries.$$p[1]:
                    if (this.c7 != null) {
                        this.xa(this.c7, this.u5);
                        this.u5 = this.u8(this.c7, this.ws, "HighColumn");
                    }
                    break;
                case "HighColumn":
                    if (this.uu != null && !this.uu.c1() && !this.vb) {
                        this.us.b0.e(this.hk);
                        this.pr(this.fr && this.dp);
                    }
                    break;
                case FinancialSeries.$$p[9]:
                    if (this.c7 != null) {
                        this.xa(this.c7, this.u6);
                        this.u6 = this.u8(this.c7, this.wx, "LowColumn");
                    }
                    break;
                case "LowColumn":
                    if (this.uu != null && !this.uu.c1() && !this.vb) {
                        this.us.b0.e(this.hk);
                        this.pr(this.fr && this.dp);
                    }
                    break;
                case FinancialSeries.$$p[0]:
                    if (this.c7 != null) {
                        this.xa(this.c7, this.u4);
                        this.u4 = this.u8(this.c7, this.wf, "CloseColumn");
                    }
                    break;
                case "CloseColumn":
                    if (this.uu != null && !this.uu.c1() && !this.vb) {
                        this.us.b0.e(this.hk);
                        this.pr(this.fr && this.dp);
                    }
                    this.xk();
                    break;
                case FinancialSeries.$$p[13]:
                    if (this.c7 != null) {
                        this.xa(this.c7, this.u9);
                        this.u9 = this.u8(this.c7, this.w5, "VolumeColumn");
                    }
                    break;
                case "VolumeColumn":
                    if (this.uu != null && !this.uu.c1() && !this.vb) {
                        this.us.b0.e(this.hk);
                        this.pr(this.fr && this.dp);
                    }
                    break;
                case FinancialSeries.$$p[14]:
                    if (c != null) {
                        c.b0(this);
                    }
                    if (d != null) {
                        d.ct(this);
                    }
                    this.us.b0.e(this.hk);
                    this.pr(false);
                    this.om();
                    this.ut = typeCast(ITimeRangeSelectorAxis_$type, this.ub);
                    break;
                case FinancialSeries.$$p[15]:
                    if (c != null) {
                        c.b0(this);
                    }
                    if (d != null) {
                        d.ct(this);
                    }
                    this.us.b0.e(this.hk);
                    if (this.uu != null) {
                        this.uu.c1();
                    }
                    {
                        this.pr(false);
                    }
                    this.om();
                    break;
                case "TransitionProgress":
                    this.uh.c(this.iw, this.uf, this.ud);
                    if (this.dm(this.cg)) {
                        return;
                    }
                    if (this.iw == 1) {
                        this.ud.v();
                        this.xj(this.ud, this.us);
                        if (this.ga) {
                            this.ga = false;
                            this.nl();
                            this.cw.r = truncate(this.ie());
                            this.cw.b = this.cx;
                        }
                        if (this.gd) {
                            this.gd = false;
                            this.nl();
                            this.cw.r = truncate(this.ie());
                            this.cw.b = this.cx;
                            this.o1();
                        }
                        this.op();
                    }
                    else {
                        this.xj(this.uh, this.us);
                    }
                    if (this.cv != null) {
                        this.cv.or(this);
                    }
                    break;
                case FinancialSeries.$$p[10]:
                    this.pr(false);
                    break;
                case "IsCustomCategoryStyleAllowed":
                    this.vc = this.vf();
                    this.pr(false);
                    break;
                case "CategoryMode":
                    if (this.ub != null) {
                        this.ub.l5(true);
                    }
                    break;
            }
        }
        ve(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        vd(a) {
            if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
                return true;
            }
            return false;
        }
        t4(a, b, c) {
            if (b < a || a < 0 || a > this.c7.count || b < 0 || b > this.c7.count || c == null) {
                return null;
            }
            let d = new Array((b - a) + 1);
            let e = c.cn;
            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.c7.item(g);
            }
            return d;
        }
        v8(a) {
            return a.b0.b;
        }
        wa(a) {
            return a.b0.c;
        }
        t3(a, b) {
            return this.t4(a, b, this.uu);
        }
        get_et() {
            return true;
        }
        ni() {
            super.ni();
            this.uy = null;
        }
        c0(a, b, c) {
            if (this.dv && this.fd(this.bp) && !c) {
                let d = this.ux(a, b, this.uy);
                this.uy = d;
                return d;
            }
            else {
                let e = this.uw(a, b, this.uy);
                this.uy = e;
                return e;
            }
        }
        wc(a) {
            let b = this.ue();
            let c = this.cg.bx;
            let d = this.cg.by;
            let e = this.ub;
            let f = 0;
            if (e.cp) {
                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;
        }
        ux(a, b, c) {
            let d = this.c7.count;
            let e = this.us.b0.c;
            let f = this.us.b0.d;
            let g = this.us.b0.b;
            let h = this.ub;
            let i = -1;
            let j = -1;
            if (h.cn) {
                let k = this.ue();
                let l = this.wc(b);
                i = l;
                j = l;
            }
            else {
                let m = this.i9(b);
                i = truncate(Math.floor((intDivide(m, g)))) * g;
                j = i + (g - 1);
            }
            if (c != null && c.g == i && c.f == j) {
                return c;
            }
            let n = new HighlightingInfo();
            n.i = this;
            n.g = i;
            n.f = j;
            return n;
        }
        uw(a, b, c) {
            let d = new HighlightingInfo();
            d.i = this;
            d.g = 0;
            d.f = this.c7.count - 1;
            d.c = true;
            if (c != null && c.g == d.g && c.f == d.f) {
                return c;
            }
            return d;
        }
        vf() {
            return this.vh;
        }
        hw(a) {
            let b = this.cg.by;
            let c = this.cg.bx;
            let d = -1;
            if (!b.isEmpty && !c.isEmpty && this.ub != null) {
                let e = this.getEffectiveViewport1(this.cg);
                let f = new ScalerParams(0, b, c, this.ub.ch, e);
                let g = this.tq(this.cg);
                let h = this.ub.em(g.left, f);
                let i = this.ub.em(g.right, f);
                let j = (a.x - b.left) / b.width;
                let k = h + (j * (i - h));
                if (this.ub.categoryMode != 0) {
                    k -= 0.5;
                }
                d = k;
            }
            return d;
        }
        i9(a) {
            return truncate(Math.round(this.hw(a)));
        }
        get_e6() {
            return typeCast(ISortingAxis_$type, this.ub) !== null;
        }
        as() {
            return this.ub;
        }
        jb(a) {
            let b = this.cg.by;
            let c = this.cg.bx;
            let d = this.getEffectiveViewport1(this.cg);
            if (b.isEmpty || c.isEmpty) {
                return -1;
            }
            let e = new Rect(0, 0, 0, 1, 1);
            let f = new ScalerParams(0, b, c, this.ub.ch, d);
            let g = typeCast(ISortingAxis_$type, this.ub);
            let h = this.tq(this.cg);
            let i = h.left;
            let j = h.right;
            let k = this.te(a).x;
            let l = this.ub.em(k, f);
            let m = this.ub.em(i, f);
            let n = this.ub.em(j, f);
            l = Math.max(m, Math.min(n, l));
            let o = g.i$f(l);
            return o;
        }
        js(a) {
            let b = 0;
            if (typeCast(ISortingAxis_$type, this.ub) !== null) {
                b = this.jb(a);
                if (b == -1) {
                    return null;
                }
            }
            else {
                b = this.i9(a);
            }
            return b >= 0 && this.c7 != null && b < this.c7.count ? this.c7.item(b) : null;
        }
        ue() {
            let a = this.ud;
            if (this.dk()) {
                if (this.cw.g) {
                    this.cw.t();
                }
                a = this.uh;
            }
            return a;
        }
        v2(a, b, c) {
            if (this.ub == null) {
                return 0;
            }
            return this.ub.k5(a, b, c, this.index);
        }
        fx() {
            return this.vi;
        }
        ul() {
            return 11;
        }
        cp() {
            return 3;
        }
        cr() {
            return 3;
        }
        xj(a, b) {
            this.oy();
            this.tp = a.aa;
            b.aw();
        }
        xh(a, b) {
            a.u();
        }
        gm(a, b, c) {
            let d = super.gm(a, b, c);
            let e = c;
            if (this.c7 == null || this.c7.count == 0 || !c.o() || b.isEmpty || a.isEmpty || this.ub == null || this.uu == null || e.b0.b < 1 || this.ub.bi == null || this.uu.bi == null || this.uu.lx == this.uu.lw || this.ub.itemsSource == null || this.ub.lf < 1) {
                e.b0.b = 0;
                d = false;
            }
            return d;
        }
        getViewInfo(a, b) {
            b = this.cg.by;
            a = this.cg.bx;
            return {
                p0: a,
                p1: b
            };
        }
        v6(a) {
            let b = 0;
            let c = a.by;
            let d = a.bx;
            let e = this.getEffectiveViewport1(this.cg);
            if (!c.isEmpty && !d.isEmpty && this.uu != null) {
                let f = new ScalerParams(0, c, d, this.uu.ch, e);
                f.b = this.h3();
                b = this.uu.ej(this.uu.l7, f);
            }
            return b;
        }
        nl() {
            super.nl();
            this.uf.v();
            this.ud.v();
            this.uh.v();
        }
        ps(a) {
            super.ps(a);
            this.us.b0.e(this.hk);
            if (this.dm(this.cg)) {
                return;
            }
            if (this.f1) {
                if (this.dk()) {
                    this.xj(this.uh, this.us);
                }
                else {
                    this.xj(this.ud, this.us);
                }
                return;
            }
            if (this.fq(a)) {
                let b = this.uf;
                if (this.dk()) {
                    if (this.cw.g) {
                        this.cw.t();
                    }
                    this.uf = this.uh;
                    this.uh = b;
                }
                else {
                    this.uf = this.ud;
                    this.ud = b;
                }
                this.xh(this.ud, this.us);
                let c = false;
                if (this.gc) {
                    this.cw.w();
                    this.cw.r = truncate(this.ig());
                    this.cw.b = this.cy != null ? this.cy : this.cx;
                    if (this.gd) {
                        let d = this.uh;
                        this.uh = this.uf;
                        this.uf = d;
                        c = true;
                    }
                    this.un.s(this, this.uf, this.ud, this.isVertical, this.ub, this.uu, this.um, this.ul(), this.cq, this.cp(), () => this.v6(this.us), this.us.bx);
                    if (this.gd) {
                        let e = this.uh;
                        this.uh = this.uf;
                        this.uf = e;
                    }
                    this.gd = false;
                }
                if (this.gf) {
                    this.cw.w();
                    this.cw.r = truncate(this.ih());
                    this.cw.b = this.cz != null ? this.cz : this.cx;
                    if (this.ga) {
                        let f = this.uh;
                        this.uh = this.uf;
                        this.uf = f;
                        c = true;
                    }
                    this.un.s(this, this.uf, this.ud, this.isVertical, this.ub, this.uu, this.um, this.ul(), this.cq, this.cp(), () => this.v6(this.us), this.us.bx);
                    let g = this.ud;
                    this.ud = this.uf;
                    this.uf = g;
                    if (this.ga) {
                        let h = this.uh;
                        this.uh = this.uf;
                        this.uf = h;
                    }
                    this.ga = false;
                }
                this.dr = false;
                if (!c) {
                    this.ng();
                }
                this.p5();
                if (this.gc) {
                    this.gb = false;
                    this.ge = false;
                    this.fu = false;
                    this.ga = true;
                }
                if (this.gf) {
                    this.ge = false;
                    this.gd = true;
                }
            }
            else {
                this.xh(this.ud, this.us);
                this.xj(this.ud, this.us);
            }
        }
        fy() {
            return true;
        }
        vk(a) {
            for (let b of fromEnum(a)) {
                switch (b) {
                    case "HighColumn":
                        if (this.u5 == null) {
                            return false;
                        }
                        break;
                    case "LowColumn":
                        if (this.u6 == null) {
                            return false;
                        }
                        break;
                    case "OpenColumn":
                        if (this.u7 == null) {
                            return false;
                        }
                        break;
                    case "CloseColumn":
                        if (this.u4 == null) {
                            return false;
                        }
                        break;
                    case "VolumeColumn":
                        if (this.u9 == null) {
                            return false;
                        }
                        break;
                }
            }
            return true;
        }
        get vl() {
            return this.ub != null && typeCast(ISortingAxis_$type, this.ub) !== null;
        }
        vg() {
            return this.typical != null;
        }
        w9(a) {
            this.typical(this, a);
        }
        get vt() {
            return this.vq();
        }
        *_vq() {
            let a = false;
            if (this.vg()) {
                let b = this.uo(0, this.c7.count);
                this.w9(new FinancialEventArgs(0, this.c7.count, b, this.up(b), this));
                if (b.typicalColumn != null) {
                    a = true;
                    for (let c of fromEnum(b.typicalColumn)) {
                        yield c;
                    }
                }
            }
            if (!a) {
                if (this.vl && this.ub.i$b != null) {
                    let d = this.c7.count;
                    let e = this.ub.i$b;
                    for (let f = 0; f < d; ++f) {
                        yield (this.u5.item(e.item(f)) + this.u6.item(e.item(f)) + this.u4.item(e.item(f))) / 3;
                    }
                }
                else {
                    let g = this.c7.count;
                    for (let h = 0; h < g; ++h) {
                        yield (this.u5.item(h) + this.u6.item(h) + this.u4.item(h)) / 3;
                    }
                }
            }
        }
        vq() {
            return toEnum(() => this._vq());
        }
        get vs() {
            return this.vp();
        }
        *_vp() {
            if (this.vl && this.ub.i$b != null) {
                let a = this.u5.count;
                let b = this.ub.i$b;
                if (a > 0) {
                    yield this.v7(this.u5.item(b.item(0)) - this.u6.item(b.item(0)));
                }
                for (let c = 1; c < a; ++c) {
                    yield Math.max(this.v7(this.u5.item(b.item(c)) - this.u6.item(b.item(c))), Math.max(this.v7(Math.abs(this.u5.item(b.item(c)) - this.u4.item(b.item(c - 1)))), this.v7(Math.abs(this.u6.item(b.item(c)) - this.u4.item(b.item(c - 1))))));
                }
            }
            else {
                let d = this.u5.count;
                if (d > 0) {
                    yield this.v7(this.u5.item(0) - this.u6.item(0));
                }
                for (let e = 1; e < d; ++e) {
                    yield Math.max(this.v7(this.u5.item(e) - this.u6.item(e)), Math.max(this.v7(Math.abs(this.u5.item(e) - this.u4.item(e - 1))), this.v7(Math.abs(this.u6.item(e) - this.u4.item(e - 1)))));
                }
            }
        }
        vp() {
            return toEnum(() => this._vp());
        }
        get vr() {
            return this.vo();
        }
        *_vo() {
            if (this.vl && this.ub.i$b != null) {
                let a = this.u6.count;
                let b = this.ub.i$b;
                if (a > 0) {
                    yield this.v7(this.u6.item(b.item(0)));
                }
                for (let c = 1; c < a; c++) {
                    yield Math.min(this.v7(this.u6.item(b.item(c))), this.v7(this.u4.item(b.item(c - 1))));
                }
            }
            else {
                let d = this.u6.count;
                if (d > 0) {
                    yield this.v7(this.u6.item(0));
                }
                for (let e = 1; e < d; e++) {
                    yield Math.min(this.v7(this.u6.item(e)), this.v7(this.u4.item(e - 1)));
                }
            }
        }
        vo() {
            return toEnum(() => this._vo());
        }
        vv(a) {
            if (a == null) {
                return null;
            }
            if (this.vl && this.ub.i$b != null) {
                return new SafeSortedReadOnlyDoubleCollection(0, a, this.ub.i$b);
            }
            return new SafeReadOnlyDoubleCollection(0, a);
        }
        vu() {
            let a = new List$1(String_$type, 0);
            a.add("HighColumn");
            a.add("LowColumn");
            a.add("CloseColumn");
            if (this.typicalBasedOn != null && this.c7 != null && !this.va) {
                this.va = true;
                let b = this.uo(0, this.c7.count);
                this.va = false;
                let c = new FinancialEventArgs(0, this.c7.count, b, this.up(b), this);
                this.typicalBasedOn(this, c);
                if (c.basedOn != null && c.basedOn.count > 0) {
                    return c.basedOn;
                }
            }
            return a;
        }
        getOpenColumnAsArray() {
            if (this.u7 == null) {
                return null;
            }
            if (this.ub != null && typeCast(ISortingAxis_$type, this.ub) !== null) {
                if (this.vz != null) {
                    return this.vz.asArray();
                }
                let a = new List$1(Number_$type, 2, this.u7.count);
                let b = this.ub.i$b;
                let c = this.u7.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.vz = a;
                return this.vz.asArray();
            }
            else {
                return this.u7.asArray();
            }
        }
        getHighColumnAsArray() {
            if (this.u5 == null) {
                return null;
            }
            if (this.ub != null && typeCast(ISortingAxis_$type, this.ub) !== null) {
                if (this.vx != null) {
                    return this.vx.asArray();
                }
                let a = new List$1(Number_$type, 2, this.u5.count);
                let b = this.ub.i$b;
                let c = this.u5.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.vx = a;
                return this.vx.asArray();
            }
            else {
                return this.u5.asArray();
            }
        }
        getLowColumnAsArray() {
            if (this.u6 == null) {
                return null;
            }
            if (this.ub != null && typeCast(ISortingAxis_$type, this.ub) !== null) {
                if (this.vy != null) {
                    return this.vy.asArray();
                }
                let a = new List$1(Number_$type, 2, this.u6.count);
                let b = this.ub.i$b;
                let c = this.u6.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.vy = a;
                return this.vy.asArray();
            }
            else {
                return this.u6.asArray();
            }
        }
        getCloseColumnAsArray() {
            if (this.u4 == null) {
                return null;
            }
            if (this.ub != null && typeCast(ISortingAxis_$type, this.ub) !== null) {
                if (this.vw != null) {
                    return this.vw.asArray();
                }
                let a = new List$1(Number_$type, 2, this.u4.count);
                let b = this.ub.i$b;
                let c = this.u4.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.vw = a;
                return this.vw.asArray();
            }
            else {
                return this.u4.asArray();
            }
        }
        getVolumeColumnAsArray() {
            if (this.u9 == null) {
                return null;
            }
            if (this.ub != null && typeCast(ISortingAxis_$type, this.ub) !== null) {
                if (this.v0 != null) {
                    return this.v0.asArray();
                }
                let a = new List$1(Number_$type, 2, this.u9.count);
                let b = this.ub.i$b;
                let c = this.u9.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.v0 = a;
                return this.v0.asArray();
            }
            else {
                return this.u9.asArray();
            }
        }
        np(a, b, c, d) {
            super.np(a, b, c, d);
            if (this.ub == null || !(typeCast(ISortingAxis_$type, this.ub) !== null)) {
                return;
            }
            let e = this.ub.i$b;
            switch (a) {
                case 1:
                    for (let f = b; f < c; f++) {
                        let g = e._inner[f];
                        if (this.vz != null) {
                            this.vz.insert(f, this.u7.item(g));
                        }
                        if (this.vx != null) {
                            this.vx.insert(f, this.u5.item(g));
                        }
                        if (this.vy != null) {
                            this.vy.insert(f, this.u6.item(g));
                        }
                        if (this.vw != null) {
                            this.vw.insert(f, this.u4.item(g));
                        }
                        if (this.v0 != null) {
                            this.v0.insert(f, this.u9.item(g));
                        }
                    }
                    break;
                case 0:
                    if (this.vz != null) {
                        this.vz.v(b, c);
                    }
                    if (this.vx != null) {
                        this.vx.v(b, c);
                    }
                    if (this.vy != null) {
                        this.vy.v(b, c);
                    }
                    if (this.vw != null) {
                        this.vw.v(b, c);
                    }
                    if (this.v0 != null) {
                        this.v0.v(b, c);
                    }
                    break;
                case 4:
                    if (this.vz != null) {
                        this.vz = new List$1(Number_$type, 0);
                    }
                    if (this.vx != null) {
                        this.vx = new List$1(Number_$type, 0);
                    }
                    if (this.vy != null) {
                        this.vy = new List$1(Number_$type, 0);
                    }
                    if (this.vw != null) {
                        this.vw = new List$1(Number_$type, 0);
                    }
                    if (this.v0 != null) {
                        this.v0 = 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.vz != null) {
                            this.vz._inner[h] = this.u7.item(i);
                        }
                        if (this.vx != null) {
                            this.vx._inner[h] = this.u5.item(i);
                        }
                        if (this.vy != null) {
                            this.vy._inner[h] = this.u6.item(i);
                        }
                        if (this.vw != null) {
                            this.vw._inner[h] = this.u4.item(i);
                        }
                        if (this.v0 != null) {
                            this.v0._inner[h] = this.u9.item(i);
                        }
                    }
                    break;
            }
            this.xk();
            this.ql();
        }
        uo(a, b) {
            let c = this.vv(this.u7);
            let d = this.vv(this.u4);
            let e = this.vv(this.u5);
            let f = this.vv(this.u6);
            let g = this.vv(this.u9);
            let h = ((() => {
                let $ret = new FinancialCalculationDataSource();
                $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(this.vt), this.vu());
                $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(this.vs), ((() => {
                    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.vr), ((() => {
                    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.c7 != null ? this.c7.count : 0;
                return $ret;
            })());
            return h;
        }
        v7(a) {
            if (isInfinity(a) || isNaN_(a)) {
                return 0;
            }
            return a;
        }
        up(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.gy;
                $ret.j = Series.gx;
                $ret.i = runOn(this, this.v7);
                return $ret;
            })());
        }
        get categoryAxis() {
            return this.ub;
        }
        pt(a, b) {
            super.pt(a, b);
            if (!this.f9) {
                this.cg.a4(b);
                return;
            }
            let c = typeCast(FinancialSeriesView.$, this.cf);
            this.cg.a4(b);
            c.b0.e(this.hk);
            if (this.dm(this.cf)) {
                return;
            }
            if (!this.f2) {
                this.xh(this.ug, c);
            }
            this.f2 = false;
            this.xj(this.ug, c);
            this.f9 = false;
        }
        pq(a, b, c, d, e) {
            super.pq(a, b, c, d, e);
            let f = this.a3.a$h.item(d);
            let g = f;
            g.b0.e(this.hk);
            f.a3(c);
            if (this.dm(g)) {
                return;
            }
            if (this.uc == null) {
                this.uc = new CategoryFrame(3);
            }
            this.uc.u();
            this.xh(this.uc, g);
            this.xj(this.uc, g);
        }
        ao(a) {
            if (this.ub == a) {
                return this.uu;
            }
            if (this.uu == a) {
                return this.ub;
            }
            return null;
        }
        preferredCategoryMode(a) {
            let b = typeCast(IDateTimeAxis_$type, this.ub);
            return b != null ? b.preferredCategoryMode(this) : this.uj;
        }
        get uj() {
            return this.ui;
        }
        set uj(a) {
            let b = this.uj;
            if (a != b) {
                this.ui = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.uj));
            }
        }
        get_e0() {
            return true;
        }
        p1(a, b) {
            super.p1(a, b);
            this.x1 = a;
        }
        xk() {
            this.hs = this.u4 == null || this.u4.count == 0 ? NaN : this.u4.item(this.u4.count - 1);
        }
        ju(a) {
            if (this.ut != null && a != null) {
                if (this.uv == null || this.uv.propertyName != this.ut.dateTimeMemberPath) {
                    this.uv = new FastReflectionHelper(false, this.ut.dateTimeMemberPath);
                }
                let b = this.uv.getPropertyValue(a);
                if (typeCast(Date_$type, b) !== null) {
                    return dateToStringFormat(b, this.ut.itemLabelFormat());
                }
            }
            return super.ju(a);
        }
    }
    FinancialSeries.$t = /*@__PURE__*/ markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
    FinancialSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:wf:xl', [2, null], 'HighMemberPath:ws:xr', [2, null], 'HighlightedCloseMemberPath:wi:xm', [2, null], 'HighlightedHighMemberPath:wk:xn', [2, null], 'HighlightedLowMemberPath:wm:xo', [2, null], 'HighlightedOpenMemberPath:wo:xp', [2, null], 'HighlightedVolumeMemberPath:wq:xq', [2, null], 'IsCustomCategoryStyleAllowed:vh:xs', [0, false], 'IsTransitionInEnabled:vi:xt', [0, false], 'LowMemberPath:wx:xu', [2, null], 'NegativeBrush:x1:xv', [Brush.$, null], 'OpenMemberPath:w1:xw', [2, null], 'TransitionInMode:um:xx', [CategoryTransitionInMode_$type, /*@__PURE__*/ enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:w5:xy', [2, null], 'XAxis:ub:xz', [CategoryAxisBase.$, null], 'YAxis:uu:x0', [NumericYAxis.$, null]]);
    return FinancialSeries;
})();
/**
 * @hidden
 */
export let FinancialCalculationSupportingCalculations = /*@__PURE__*/ (() => {
    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 = /*@__PURE__*/ markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
    return FinancialCalculationSupportingCalculations;
})();
/**
 * @hidden
 */
export let DataSourceSupportingCalculation = /*@__PURE__*/ (() => {
    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 = /*@__PURE__*/ markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', /*@__PURE__*/ SupportingCalculation$1.$.specialize(Delegate_$type));
    return DataSourceSupportingCalculation;
})();
/**
 * @hidden
 */
export let FinancialCalculationDataSource = /*@__PURE__*/ (() => {
    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 = /*@__PURE__*/ markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
    return FinancialCalculationDataSource;
})();
/**
 * @hidden
 */
export let FinancialSeriesView = /*@__PURE__*/ (() => {
    class FinancialSeriesView extends SeriesView {
        b3(a) {
            if (this.b4 != a.t) {
                return true;
            }
            return false;
        }
        b5(a) {
            this.b4 = a.t;
        }
        constructor(a) {
            super(a);
            this.b2 = null;
            this.b0 = null;
            this.b4 = 0;
            this.b4 = -1;
            this.b2 = a;
            this.b0 = this.b1();
        }
        au() {
            super.au();
            if (!this.q) {
            }
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'>";
            if (this.b2.ub.ce) {
                a += "<span>${itemLabel}</span><br/>";
            }
            else if (this.b2.ub.f0 != null) {
                a += "<span>${item." + this.b2.ub.f0 + "}</span><br/>";
            }
            a += "<span class='ui-priority-primary'";
            let b = this.e.a3.a$r(this.e);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            let c = new SRProvider(this.w);
            let d = c.b1("financialSeries_Open");
            let e = c.b1("financialSeries_High");
            let f = c.b1("financialSeries_Low");
            let g = c.b1("financialSeries_Close");
            d = stringIsNullOrEmpty(d) ? "Open" : d;
            e = stringIsNullOrEmpty(e) ? "High" : e;
            f = stringIsNullOrEmpty(f) ? "Low" : f;
            g = stringIsNullOrEmpty(g) ? "Close" : g;
            a += ">" + this.b2.title + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.b2.w1 + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.b2.ws + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.b2.wx + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.b2.wf + "}</td></tr>";
            if (!stringIsNullOrEmpty(this.b2.w5)) {
                let h = c.b1("financialSeries_Volume");
                h = stringIsNullOrEmpty(h) ? "Volume" : h;
                a += "<tr><td>" + h + ":</td><td>" + "${item." + this.b2.w5 + "}</td></tr>";
            }
            a += "</table></div>";
            return a;
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.s8 = a;
            this.e.is = 5;
            this.e.it = 2;
            this.e.iu = 2;
        }
    }
    FinancialSeriesView.$t = /*@__PURE__*/ markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
    return FinancialSeriesView;
})();
