UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

2,086 lines 74.8 kB
/*
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-webcomponents-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-webcomponents-core";
import { IFastItemColumn$1_$type } from "igniteui-webcomponents-core";
import { Series } from "./Series";
import { Rect } from "igniteui-webcomponents-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-webcomponents-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-webcomponents-core";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-webcomponents-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-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-webcomponents-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-webcomponents-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-webcomponents-core";
import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
import { dateToStringFormat } from "igniteui-webcomponents-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-webcomponents-core";
import { Color } from "igniteui-webcomponents-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.cf.ie;
            return {
                p0: a,
                p1: b,
                p2: c,
                p3: d
            };
        }
        e(a) {
            let b = this.a.ca;
            let c = this.a.b9;
            let d = this.a.b9;
            if (this.a.cf != null) {
                d = this.a.cf.getEffectiveViewport1(this.a);
            }
            if (b.isEmpty || c.isEmpty || this.a.cf.xb == null) {
                this.b = 0;
                return;
            }
            let e = (this.a.cf.xb != null) ? this.a.cf.xb.ch : false;
            let f = new ScalerParams(0, b, c, e, d);
            let g = this.a.cf.wo(this.a);
            let h = typeCast(ISortingAxis_$type, this.a.cf.xb);
            if (h == null || h.i$b == null) {
                let i = Math.floor(this.a.cf.xb.eo(g.left, f));
                let j = Math.ceil(this.a.cf.xb.eo(g.right, f));
                if (this.a.cf.xb.ch) {
                    j = Math.ceil(this.a.cf.xb.eo(g.left, f));
                    i = Math.floor(this.a.cf.xb.eo(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 {
        hu() {
            let a = super.hu();
            {
                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.aae));
                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.aac));
                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.aad));
                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.aab));
                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.aaf));
                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.r4));
                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.r4));
                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.r4));
                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.r4));
                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;
        }
        aae(a, b) {
            if (this.zo != null) {
                b.value = this.zo;
                return;
            }
            b.value = this.z1;
        }
        aac(a, b) {
            if (this.zk != null) {
                b.value = this.zk;
                return;
            }
            b.value = this.zs;
        }
        aad(a, b) {
            if (this.zm != null) {
                b.value = this.zm;
                return;
            }
            b.value = this.zx;
        }
        aab(a, b) {
            if (this.zi != null) {
                b.value = this.zi;
                return;
            }
            b.value = this.zf;
        }
        aaf(a, b) {
            if (this.zq != null) {
                b.value = this.zq;
                return;
            }
            b.value = this.z5;
        }
        kw() {
            if (this.d4()) {
                return this.bo.xh;
            }
            else {
                return this.bo.xd;
            }
        }
        q3(a) {
            super.q3(a);
            this.xs = a;
        }
        get_e8() {
            return true;
        }
        ai() {
            return [this.xb, this.xu];
        }
        kr(a, b) {
            let c = this.nf(b);
            if (c == FinancialSeries.$$p[11]) {
                return this.ks(a, b, this.z1);
            }
            if (c == FinancialSeries.$$p[1]) {
                return this.ks(a, b, this.zs);
            }
            if (c == FinancialSeries.$$p[9]) {
                return this.ks(a, b, this.zx);
            }
            if (c == FinancialSeries.$$p[0]) {
                return this.ks(a, b, this.zf);
            }
            if (c == FinancialSeries.$$p[13]) {
                return this.ks(a, b, this.z5);
            }
            if (c == FinancialSeries.$$p[5]) {
                return this.ks(a, b, this.zo);
            }
            if (c == FinancialSeries.$$p[3]) {
                return this.ks(a, b, this.zk);
            }
            if (c == FinancialSeries.$$p[4]) {
                return this.ks(a, b, this.zm);
            }
            if (c == FinancialSeries.$$p[2]) {
                return this.ks(a, b, this.zi);
            }
            if (c == FinancialSeries.$$p[6]) {
                return this.ks(a, b, this.zq);
            }
            return super.kr(a, b);
        }
        mf(a) {
            let b = this.nf(a);
            if (b == FinancialSeries.$$p[11]) {
                return this.z1;
            }
            if (b == FinancialSeries.$$p[1]) {
                return this.zs;
            }
            if (b == FinancialSeries.$$p[9]) {
                return this.zx;
            }
            if (b == FinancialSeries.$$p[0]) {
                return this.zf;
            }
            if (b == FinancialSeries.$$p[13]) {
                return this.z5;
            }
            if (b == FinancialSeries.$$p[5]) {
                return this.zo;
            }
            if (b == FinancialSeries.$$p[3]) {
                return this.zk;
            }
            if (b == FinancialSeries.$$p[4]) {
                return this.zm;
            }
            if (b == FinancialSeries.$$p[2]) {
                return this.zi;
            }
            if (b == FinancialSeries.$$p[6]) {
                return this.zq;
            }
            return super.mf(a);
        }
        zb() {
            return 2;
        }
        y9() {
            return 4;
        }
        aj(a) {
            let b = this.an(this.xb, this.xd.h, this.y8(this.cw), this.za(this.cw), this.wm(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.zb();
            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;
        }
        al(a) {
            let b = this.an(this.xb, this.xd.h, this.y8(this.cw), this.za(this.cw), this.wm(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.x2 = null;
            this.x0 = null;
            this.x1 = null;
            this.xz = null;
            this.x3 = null;
            this.yc = false;
            this.assigningCategoryStyle = null;
            this.xk = null;
            this.ym = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
            this.yn = new Dictionary$2(String_$type, String_$type, 0);
            this.yb = false;
            this.xy = null;
            this.xf = null;
            this.xh = null;
            this.xd = null;
            this.xn = null;
            this.typical = null;
            this.typicalBasedOn = null;
            this.ya = false;
            this.yz = null;
            this.yx = null;
            this.yy = null;
            this.yw = null;
            this.y0 = null;
            this.xg = null;
            this.xc = null;
            this.xi = 0;
            this.xt = null;
            this.xv = null;
            this.xk = new CategorySeriesRenderManager();
            this.yc = false;
            this.xn = new CategoryTransitionSourceFramePreparer();
            this.xg = new CategoryFrame(3);
            this.ab = FinancialSeries.$;
            this.xj = 0;
        }
        v1() {
            return this.aa1;
        }
        v2() {
            return this.aa1;
        }
        o4() {
            super.o4();
            this.xb = null;
            this.xu = null;
        }
        get_em() {
            return true;
        }
        get_f6() {
            return this.xu != null && this.xu.ch;
        }
        get x7() {
            return this.x2;
        }
        set x7(a) {
            if (this.x2 != a) {
                let b = this.x2;
                this.x2 = a;
                this.raisePropertyChanged("OpenColumn", b, this.x2);
            }
        }
        get x5() {
            return this.x0;
        }
        set x5(a) {
            if (this.x0 != a) {
                let b = this.x0;
                this.x0 = a;
                this.raisePropertyChanged("HighColumn", b, this.x0);
            }
        }
        get x6() {
            return this.x1;
        }
        set x6(a) {
            if (this.x1 != a) {
                let b = this.x1;
                this.x1 = a;
                this.raisePropertyChanged("LowColumn", b, this.x1);
            }
        }
        get x4() {
            return this.xz;
        }
        set x4(a) {
            if (this.xz != a) {
                let b = this.xz;
                this.xz = a;
                this.raisePropertyChanged("CloseColumn", b, this.xz);
            }
        }
        get x9() {
            return this.x3;
        }
        set x9(a) {
            if (this.x3 != a) {
                let b = this.x3;
                this.x3 = a;
                this.raisePropertyChanged("VolumeColumn", b, this.x3);
            }
        }
        gc() {
            return this.highlightedItemsSource != null || (this.zo != null && this.zk != null && this.zm != null && this.zi != null);
        }
        yj() {
            return (this.assigningCategoryStyle != null && this.yc) || this.by != 1 || this.cq != 1 || this.cp != 1;
        }
        aai(a) {
            if (this.assigningCategoryStyle != null && this.yc) {
                this.assigningCategoryStyle(this, a);
            }
        }
        aag(a, b, c, d, e, f, g) {
            let h = this.by != 1;
            let i = this.cq != 1;
            let j = this.cp != 1;
            this.xk.a3(this.xk.b, d.cn, a, b, c, d, e, f, false, g);
            this.xk.ab(this.ic);
            let k = this.xk.ay;
            let l = null;
            let m = null;
            let n = null;
            let o = this.dp;
            if (h && this.dc != null) {
                l = this.dc.dk.getHighlightingInfo(this, o, k.z, k.y, false);
                k.c = l;
            }
            if (i && this.dc != null) {
                m = this.dc.dl.getHighlightingInfo(this, o, k.z, k.y, false);
                if (m == null && this.bo != null) {
                    m = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false);
                }
                k.d = m;
            }
            if (j && this.dc != null) {
                n = this.dc.dj.getHighlightingInfo(this, o, k.z, k.y, false);
                k.b = n;
            }
            k.h = f;
            this.aai(k);
            this.xk.z(this, l, m, n, f, h, i, j, b < 0);
        }
        y1(a) {
            return this.iu(a, this.xb);
        }
        kb(a, b) {
            return this.kc(a, b, this.xb, runOn(this, this.y1), new FinancialValueList(this.x7, this.x5, this.x6, this.x4, this.x9));
        }
        j9(a, b) {
            return this.ka(a, b, this.xb, runOn(this, this.y1), new FinancialValueList(this.x7, this.x5, this.x6, this.x4, this.x9));
        }
        iq(a, b, c, d, e) {
            if (c == null) {
                return Number.POSITIVE_INFINITY;
            }
            let f = this.xb.lj;
            return this.ir(a, b, this.xb, d, e, f, runOn(this, this.y1));
        }
        getOffsetValue() {
            return this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
        }
        getCategoryWidth() {
            return this.xb.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
        }
        wh(a, b, c) {
            return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, null, null, null);
        }
        i6(a, b, c) {
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y2(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
            return this.i8(new FinancialValueList(this.x7, this.x5, this.x6, this.x4, this.x9), a, this.xb, f, e, runOn(this, this.y1), b, c);
        }
        i2(a, b, c) {
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y2(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
            return this.i8(this.x5, a, this.xb, f, e, runOn(this, this.y1), b, c);
        }
        i4(a, b, c) {
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y2(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
            return this.i8(this.x6, a, this.xb, f, e, runOn(this, this.y1), b, c);
        }
        y3(a, b, c) {
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y2(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
            return this.i8(this.x4, a, this.xb, f, e, runOn(this, this.y1), b, c);
        }
        y4(a, b, c) {
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y2(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
            return this.i8(this.x7, a, this.xb, f, e, runOn(this, this.y1), b, c);
        }
        y5(a, b, c) {
            let d = this.getEffectiveViewport1(this.cw);
            let e = this.y2(this.cw.ca, this.cw.b9, d);
            let f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
            return this.i8(this.x9, a, this.xb, f, e, runOn(this, this.y1), b, c);
        }
        wd(a, b, c) {
            return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.i2), (d, e) => this.kc(d, e, this.xb, runOn(this, this.y1), this.x5), (d, e) => this.ka(d, e, this.xb, runOn(this, this.y1), this.x5));
        }
        wf(a, b, c) {
            return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.i4), (d, e) => this.kc(d, e, this.xb, runOn(this, this.y1), this.x6), (d, e) => this.ka(d, e, this.xb, runOn(this, this.y1), this.x6));
        }
        aa3(a, b, c) {
            return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.y4), (d, e) => this.kc(d, e, this.xb, runOn(this, this.y1), this.x7), (d, e) => this.ka(d, e, this.xb, runOn(this, this.y1), this.x7));
        }
        aa2(a, b, c) {
            return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.y3), (d, e) => this.kc(d, e, this.xb, runOn(this, this.y1), this.x4), (d, e) => this.ka(d, e, this.xb, runOn(this, this.y1), this.x4));
        }
        aa4(a, b, c) {
            return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.y5), (d, e) => this.kc(d, e, this.xb, runOn(this, this.y1), this.x9), (d, e) => this.ka(d, e, this.xb, runOn(this, this.y1), this.x9));
        }
        qd() {
            super.qd();
            if (this.xb != null) {
                this.xb.ib(false);
            }
            if (this.xu != null) {
                this.xu.ib(false);
            }
        }
        sv(a, b) {
            this.xs.cd.e(this.ie);
            this.ru(false);
        }
        su(a, b) {
            if (this.g2 && this.jr < 0.05) {
                this.g3 = true;
                this.g6 = false;
                this.gl = false;
            }
            this.xs.cd.e(this.ie);
            this.ru(false);
        }
        x8(a, b, c) {
            let d = this.dl(b);
            this.ym.addItem(d, b);
            this.yn.addItem(b, c);
            return d;
        }
        aaa(a, b) {
            if (b == null) {
                return;
            }
            a.deregisterColumn(b);
            let c = this.ym.item(b);
            this.yn.removeItem(c);
            this.ym.removeItem(b);
        }
        rc(a, b, c, d) {
            super.rc(a, b, c, d);
            switch (b) {
                case "SyncLink":
                    if (this.c4 != null && this.dc != null) {
                        this.xs.cd.e(this.ie);
                        this.ru(false);
                    }
                    break;
                case "SeriesViewer":
                    if (c != null && d == null) {
                        if (this.xb != null) {
                            this.xb.b0(this);
                        }
                        if (this.xu != null) {
                            this.xu.b0(this);
                        }
                    }
                    if (c == null && d != null) {
                        if (this.xb != null) {
                            this.xb.ct(this);
                        }
                        if (this.xu != null) {
                            this.xu.ct(this);
                        }
                    }
                    this.xs.cd.e(this.ie);
                    this.ru(false);
                    break;
                case "FastItemsSource":
                    this.yb = true;
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        this.aaa(typeCast(IFastItemsSource_$type, c), this.x7);
                        this.aaa(typeCast(IFastItemsSource_$type, c), this.x5);
                        this.aaa(typeCast(IFastItemsSource_$type, c), this.x6);
                        this.aaa(typeCast(IFastItemsSource_$type, c), this.x4);
                        this.aaa(typeCast(IFastItemsSource_$type, c), this.x9);
                        this.x7 = null;
                        this.x5 = null;
                        this.x6 = null;
                        this.x4 = null;
                        this.x9 = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        if (stringIsNullOrEmpty(this.z1) == false) {
                            this.x7 = this.x8(typeCast(IFastItemsSource_$type, d), this.z1, "OpenColumn");
                        }
                        if (stringIsNullOrEmpty(this.zs) == false) {
                            this.x5 = this.x8(typeCast(IFastItemsSource_$type, d), this.zs, "HighColumn");
                        }
                        if (stringIsNullOrEmpty(this.zx) == false) {
                            this.x6 = this.x8(typeCast(IFastItemsSource_$type, d), this.zx, "LowColumn");
                        }
                        if (stringIsNullOrEmpty(this.zf) == false) {
                            this.x4 = this.x8(typeCast(IFastItemsSource_$type, d), this.zf, "CloseColumn");
                        }
                        if (stringIsNullOrEmpty(this.z5) == false) {
                            this.x9 = this.x8(typeCast(IFastItemsSource_$type, d), this.z5, "VolumeColumn");
                        }
                    }
                    this.yb = false;
                    if (this.xu != null && !this.xu.c1()) {
                        this.xs.cd.e(this.ie);
                        this.ru(this.gh && c != null);
                    }
                    break;
                case FinancialSeries.$$p[11]:
                    if (this.dp != null) {
                        this.aaa(this.dp, this.x7);
                        this.x7 = this.x8(this.dp, this.z1, "OpenColumn");
                    }
                    break;
                case "OpenColumn":
                    if (this.xu != null && !this.xu.c1() && !this.yb) {
                        this.xs.cd.e(this.ie);
                        this.ru(this.gh && this.d9);
                    }
                    break;
                case FinancialSeries.$$p[1]:
                    if (this.dp != null) {
                        this.aaa(this.dp, this.x5);
                        this.x5 = this.x8(this.dp, this.zs, "HighColumn");
                    }
                    break;
                case "HighColumn":
                    if (this.xu != null && !this.xu.c1() && !this.yb) {
                        this.xs.cd.e(this.ie);
                        this.ru(this.gh && this.d9);
                    }
                    break;
                case FinancialSeries.$$p[9]:
                    if (this.dp != null) {
                        this.aaa(this.dp, this.x6);
                        this.x6 = this.x8(this.dp, this.zx, "LowColumn");
                    }
                    break;
                case "LowColumn":
                    if (this.xu != null && !this.xu.c1() && !this.yb) {
                        this.xs.cd.e(this.ie);
                        this.ru(this.gh && this.d9);
                    }
                    break;
                case FinancialSeries.$$p[0]:
                    if (this.dp != null) {
                        this.aaa(this.dp, this.x4);
                        this.x4 = this.x8(this.dp, this.zf, "CloseColumn");
                    }
                    break;
                case "CloseColumn":
                    if (this.xu != null && !this.xu.c1() && !this.yb) {
                        this.xs.cd.e(this.ie);
                        this.ru(this.gh && this.d9);
                    }
                    this.aak();
                    break;
                case FinancialSeries.$$p[13]:
                    if (this.dp != null) {
                        this.aaa(this.dp, this.x9);
                        this.x9 = this.x8(this.dp, this.z5, "VolumeColumn");
                    }
                    break;
                case "VolumeColumn":
                    if (this.xu != null && !this.xu.c1() && !this.yb) {
                        this.xs.cd.e(this.ie);
                        this.ru(this.gh && this.d9);
                    }
                    break;
                case FinancialSeries.$$p[14]:
                    if (c != null) {
                        c.b0(this);
                    }
                    if (d != null) {
                        d.ct(this);
                    }
                    this.xs.cd.e(this.ie);
                    this.ru(false);
                    this.qn();
                    this.xt = typeCast(ITimeRangeSelectorAxis_$type, this.xb);
                    break;
                case FinancialSeries.$$p[15]:
                    if (c != null) {
                        c.b0(this);
                    }
                    if (d != null) {
                        d.ct(this);
                    }
                    this.xs.cd.e(this.ie);
                    if (this.xu != null) {
                        this.xu.c1();
                    }
                    {
                        this.ru(false);
                    }
                    this.qn();
                    break;
                case "TransitionProgress":
                    this.xh.c(this.jr, this.xf, this.xd);
                    if (this.d7(this.cw)) {
                        return;
                    }
                    if (this.jr == 1) {
                        this.xd.y();
                        this.aaj(this.xd, this.xs);
                        if (this.g2) {
                            this.g2 = false;
                            this.o8();
                            this.dd.r = truncate(this.ja());
                            this.dd.b = this.de;
                        }
                        if (this.g5) {
                            this.g5 = false;
                            this.o8();
                            this.dd.r = truncate(this.ja());
                            this.dd.b = this.de;
                            this.q2();
                        }
                        this.qq();
                    }
                    else {
                        this.aaj(this.xh, this.xs);
                    }
                    if (this.dc != null) {
                        this.dc.qx(this);
                    }
                    break;
                case FinancialSeries.$$p[10]:
                    this.ru(false);
                    break;
                case "IsCustomCategoryStyleAllowed":
                    this.yc = this.yf();
                    this.ru(false);
                    break;
                case "CategoryMode":
                    if (this.xb != null) {
                        this.xb.ma(true);
                    }
                    break;
            }
        }
        ye(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        yd(a) {
            if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
                return true;
            }
            return false;
        }
        w4(a, b, c) {
            if (b < a || a < 0 || a > this.dp.count || b < 0 || b > this.dp.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.dp.item(g);
            }
            return d;
        }
        y8(a) {
            return a.cd.b;
        }
        za(a) {
            return a.cd.c;
        }
        w3(a, b) {
            return this.w4(a, b, this.xu);
        }
        get_ff() {
            return true;
        }
        o5() {
            super.o5();
            this.xy = null;
        }
        dh(a, b, c) {
            if (this.ef && this.f0(this.by) && !c) {
                let d = this.xx(a, b, this.xy);
                this.xy = d;
                return d;
            }
            else {
                let e = this.xw(a, b, this.xy);
                this.xy = e;
                return e;
            }
        }
        zc(a) {
            let b = this.xe();
            let c = this.cw.b9;
            let d = this.cw.ca;
            let e = this.xb;
            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.h.count;
            let j = 0;
            for (j = 0; j < i; j++) {
                let k = b.h._inner[j];
                let l = null;
                if (j < i - 1) {
                    l = b.h._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;
        }
        xx(a, b, c) {
            if (this.dp == null) {
                return null;
            }
            let d = this.dp.count;
            let e = this.xs.cd.c;
            let f = this.xs.cd.d;
            let g = this.xs.cd.b;
            let h = this.xb;
            let i = -1;
            let j = -1;
            if (h.cn) {
                let k = this.xe();
                let l = this.zc(b);
                if (k.o != null && l >= 0 && l < k.o.count) {
                    l = truncate(Math.round(k.o._inner[l]));
                }
                i = l;
                j = l;
            }
            else {
                let m = this.j4(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;
        }
        xw(a, b, c) {
            let d = new HighlightingInfo();
            d.i = this;
            d.g = 0;
            d.f = this.dp.count - 1;
            d.c = true;
            if (c != null && c.g == d.g && c.f == d.f) {
                return c;
            }
            return d;
        }
        yf() {
            return this.yh;
        }
        is(a) {
            let b = this.cw.ca;
            let c = this.cw.b9;
            let d = -1;
            if (!b.isEmpty && !c.isEmpty && this.xb != null) {
                let e = this.getEffectiveViewport1(this.cw);
                let f = new ScalerParams(0, b, c, this.xb.ch, e);
                let g = this.wo(this.cw);
                let h = this.xb.eo(g.left, f);
                let i = this.xb.eo(g.right, f);
                let j = (a.x - b.left) / b.width;
                let k = h + (j * (i - h));
                if (this.xb.categoryMode != 0) {
                    k -= 0.5;
                }
                d = k;
            }
            return d;
        }
        j4(a) {
            return truncate(Math.round(this.is(a)));
        }
        get_ft() {
            return typeCast(ISortingAxis_$type, this.xb) !== null;
        }
        a0() {
            return this.xb;
        }
        j6(a) {
            let b = this.cw.ca;
            let c = this.cw.b9;
            let d = this.getEffectiveViewport1(this.cw);
            if (b.isEmpty || c.isEmpty) {
                return -1;
            }
            let e = new Rect(0, 0, 0, 1, 1);
            let f = new ScalerParams(0, b, c, this.xb.ch, d);
            let g = typeCast(ISortingAxis_$type, this.xb);
            let h = this.wo(this.cw);
            let i = h.left;
            let j = h.right;
            let k = this.wc(a).x;
            let l = this.xb.eo(k, f);
            let m = this.xb.eo(i, f);
            let n = this.xb.eo(j, f);
            l = Math.max(m, Math.min(n, l));
            let o = g.i$f(l);
            return o;
        }
        ko(a) {
            let b = 0;
            if (typeCast(ISortingAxis_$type, this.xb) !== null) {
                b = this.j6(a);
                if (b == -1) {
                    return null;
                }
            }
            else {
                b = this.j4(a);
            }
            return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
        }
        xe() {
            let a = this.xd;
            if (this.d4()) {
                if (this.dd.g) {
                    this.dd.t();
                }
                a = this.xh;
            }
            return a;
        }
        y2(a, b, c) {
            if (this.xb == null) {
                return 0;
            }
            return this.xb.k9(a, b, c, this.index);
        }
        go() {
            return this.yi;
        }
        xl() {
            return 11;
        }
        c5() {
            return 3;
        }
        c8() {
            return 3;
        }
        aaj(a, b) {
            this.qz();
            this.wn = a.ad;
            b.a6();
        }
        aah(a, b) {
            a.x();
        }
        hf(a, b, c) {
            let d = super.hf(a, b, c);
            let e = c;
            if (this.dp == null || this.dp.count == 0 || !c.r() || b.isEmpty || a.isEmpty || this.xb == null || this.xu == null || e.cd.b < 1 || this.xb.bi == null || this.xu.bi == null || this.xu.l4 == this.xu.l3 || this.xb.itemsSource == null || this.xb.lj < 1) {
                e.cd.b = 0;
                d = false;
            }
            return d;
        }
        getViewInfo(a, b) {
            b = this.cw.ca;
            a = this.cw.b9;
            return {
                p0: a,
                p1: b
            };
        }
        y6(a) {
            let b = 0;
            let c = a.ca;
            let d = a.b9;
            let e = this.getEffectiveViewport1(this.cw);
            if (!c.isEmpty && !d.isEmpty && this.xu != null) {
                let f = new ScalerParams(0, c, d, this.xu.ch, e);
                f.b = this.iz();
                b = this.xu.el(this.xu.me, f);
            }
            return b;
        }
        o8() {
            super.o8();
            this.xf.y();
            this.xd.y();
            this.xh.y();
        }
        rv(a) {
            super.rv(a);
            this.xs.cd.e(this.ie);
            if (this.d7(this.cw)) {
                return;
            }
            if (this.gs) {
                if (this.d4()) {
                    this.aaj(this.xh, this.xs);
                }
                else {
                    this.aaj(this.xd, this.xs);
                }
                return;
            }
            if (this.gg(a)) {
                let b = this.xf;
                if (this.d4()) {
                    if (this.dd.g) {
                        this.dd.t();
                    }
                    this.xf = this.xh;
                    this.xh = b;
                }
                else {
                    this.xf = this.xd;
                    this.xd = b;
                }
                this.aah(this.xd, this.xs);
                let c = false;
                if (this.g4) {
                    this.dd.w();
                    this.dd.r = truncate(this.jb());
                    this.dd.b = this.df != null ? this.df : this.de;
                    if (this.g5) {
                        let d = this.xh;
                        this.xh = this.xf;
                        this.xf = d;
                        c = true;
                    }
                    this.xn.x(this, this.xf, this.xd, this.isVertical, this.xb, this.xu, this.xm, this.xl(), this.c6, this.c5(), () => this.y6(this.xs), this.xs.b9);
                    if (this.g5) {
                        let e = this.xh;
                        this.xh = this.xf;
                        this.xf = e;
                    }
                    this.g5 = false;
                }
                if (this.g7) {
                    this.dd.w();
                    this.dd.r = truncate(this.jc());
                    this.dd.b = this.dg != null ? this.dg : this.de;
                    if (this.g2) {
                        let f = this.xh;
                        this.xh = this.xf;
                        this.xf = f;
                        c = true;
                    }
                    this.xn.x(this, this.xf, this.xd, this.isVertical, this.xb, this.xu, this.xm, this.xl(), this.c6, this.c5(), () => this.y6(this.xs), this.xs.b9);
                    let g = this.xd;
                    this.xd = this.xf;
                    this.xf = g;
                    if (this.g2) {
                        let h = this.xh;
                        this.xh = this.xf;
                        this.xf = h;
                    }
                    this.g2 = false;
                }
                this.eb = false;
                if (!c) {
                    this.o3();
                }
                this.sb();
                if (this.g4) {
                    this.g3 = false;
                    this.g6 = false;
                    this.gl = false;
                    this.g2 = true;
                }
                if (this.g7) {
                    this.g6 = false;
                    this.g5 = true;
                }
            }
            else {
                this.aah(this.xd, this.xs);
                this.aaj(this.xd, this.xs);
            }
        }
        gp() {
            return true;
        }
        yk(a) {
            for (let b of fromEnum(a)) {
                switch (b) {
                    case "HighColumn":
                        if (this.x5 == null) {
                            return false;
                        }
                        break;
                    case "LowColumn":
                        if (this.x6 == null) {
                            return false;
                        }
                        break;
                    case "OpenColumn":
                        if (this.x7 == null) {
                            return false;
                        }
                        break;
                    case "CloseColumn":
                        if (this.x4 == null) {
                            return false;
                        }
                        break;
                    case "VolumeColumn":
                        if (this.x9 == null) {
                            return false;
                        }
                        break;
                }
            }
            return true;
        }
        get yl() {
            return this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null;
        }
        yg() {
            return this.typical != null;
        }
        z9(a) {
            this.typical(this, a);
        }
        get yt() {
            return this.yq();
        }
        *_yq() {
            let a = false;
            if (this.yg()) {
                let b = this.xo(0, this.dp.count);
                this.z9(new FinancialEventArgs(0, this.dp.count, b, this.xp(b), this));
                if (b.typicalColumn != null) {
                    a = true;
                    for (let c of fromEnum(b.typicalColumn)) {
                        yield c;
                    }
                }
            }
            if (!a) {
                if (this.yl && this.xb.i$b != null) {
                    let d = this.dp.count;
                    let e = this.xb.i$b;
                    for (let f = 0; f < d; ++f) {
                        yield (this.x5.item(e.item(f)) + this.x6.item(e.item(f)) + this.x4.item(e.item(f))) / 3;
                    }
                }
                else {
                    let g = this.dp.count;
                    for (let h = 0; h < g; ++h) {
                        yield (this.x5.item(h) + this.x6.item(h) + this.x4.item(h)) / 3;
                    }
                }
            }
        }
        yq() {
            return toEnum(() => this._yq());
        }
        get ys() {
            return this.yp();
        }
        *_yp() {
            if (this.yl && this.xb.i$b != null) {
                let a = this.x5.count;
                let b = this.xb.i$b;
                if (a > 0) {
                    yield this.y7(this.x5.item(b.item(0)) - this.x6.item(b.item(0)));
                }
                for (let c = 1; c < a; ++c) {
                    yield Math.max(this.y7(this.x5.item(b.item(c)) - this.x6.item(b.item(c))), Math.max(this.y7(Math.abs(this.x5.item(b.item(c)) - this.x4.item(b.item(c - 1)))), this.y7(Math.abs(this.x6.item(b.item(c)) - this.x4.item(b.item(c - 1))))));
                }
            }
            else {
                let d = this.x5.count;
                if (d > 0) {
                    yield this.y7(this.x5.item(0) - this.x6.item(0));
                }
                for (let e = 1; e < d; ++e) {
                    yield Math.max(this.y7(this.x5.item(e) - this.x6.item(e)), Math.max(this.y7(Math.abs(this.x5.item(e) - this.x4.item(e - 1))), this.y7(Math.abs(this.x6.item(e) - this.x4.item(e - 1)))));
                }
            }
        }
        yp() {
            return toEnum(() => this._yp());
        }
        get yr() {
            return this.yo();
        }
        *_yo() {
            if (this.yl && this.xb.i$b != null) {
                let a = this.x6.count;
                let b = this.xb.i$b;
                if (a > 0) {
                    yield this.y7(this.x6.item(b.item(0)));
                }
                for (let c = 1; c < a; c++) {
                    yield Math.min(this.y7(this.x6.item(b.item(c))), this.y7(this.x4.item(b.item(c - 1))));
                }
            }
            else {
                let d = this.x6.count;
                if (d > 0) {
                    yield this.y7(this.x6.item(0));
                }
                for (let e = 1; e < d; e++) {
                    yield Math.min(this.y7(this.x6.item(e)), this.y7(this.x4.item(e - 1)));
                }
            }
        }
        yo() {
            return toEnum(() => this._yo());
        }
        yv(a) {
            if (a == null) {
                return null;
            }
            if (this.yl && this.xb.i$b != null) {
                return new SafeSortedReadOnlyDoubleCollection(0, a, this.xb.i$b);
            }
            return new SafeReadOnlyDoubleCollection(0, a);
        }
        yu() {
            let a = new List$1(String_$type, 0);
            a.add("HighColumn");
            a.add("LowColumn");
            a.add("CloseColumn");
            if (this.typicalBasedOn != null && this.dp != null && !this.ya) {
                this.ya = true;
                let b = this.xo(0, this.dp.count);
                this.ya = false;
                let c = new FinancialEventArgs(0, this.dp.count, b, this.xp(b), this);
                this.typicalBasedOn(this, c);
                if (c.basedOn != null && c.basedOn.count > 0) {
                    return c.basedOn;
                }
            }
            return a;
        }
        getOpenColumnAsArray() {
            if (this.x7 == null) {
                return null;
            }
            if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
                if (this.yz != null) {
                    return this.yz.asArray();
                }
                let a = new List$1(Number_$type, 2, this.x7.count);
                let b = this.xb.i$b;
                let c = this.x7.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.yz = a;
                return this.yz.asArray();
            }
            else {
                return this.x7.asArray();
            }
        }
        getHighColumnAsArray() {
            if (this.x5 == null) {
                return null;
            }
            if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
                if (this.yx != null) {
                    return this.yx.asArray();
                }
                let a = new List$1(Number_$type, 2, this.x5.count);
                let b = this.xb.i$b;
                let c = this.x5.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.yx = a;
                return this.yx.asArray();
            }
            else {
                return this.x5.asArray();
            }
        }
        getLowColumnAsArray() {
            if (this.x6 == null) {
                return null;
            }
            if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
                if (this.yy != null) {
                    return this.yy.asArray();
                }
                let a = new List$1(Number_$type, 2, this.x6.count);
                let b = this.xb.i$b;
                let c = this.x6.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.yy = a;
                return this.yy.asArray();
            }
            else {
                return this.x6.asArray();
            }
        }
        getCloseColumnAsArray() {
            if (this.x4 == null) {
                return null;
            }
            if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
                if (this.yw != null) {
                    return this.yw.asArray();
                }
                let a = new List$1(Number_$type, 2, this.x4.count);
                let b = this.xb.i$b;
                let c = this.x4.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.yw = a;
                return this.yw.asArray();
            }
            else {
                return this.x4.asArray();
            }
        }
        getVolumeColumnAsArray() {
            if (this.x9 == null) {
                return null;
            }
            if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
                if (this.y0 != null) {
                    return this.y0.asArray();
                }
                let a = new List$1(Number_$type, 2, this.x9.count);
                let b = this.xb.i$b;
                let c = this.x9.asArray();
                for (let d = 0; d < b.count; d++) {
                    a.add(c[b._inner[d]]);
                }
                this.y0 = a;
                return this.y0.asArray();
            }
            else {
                return this.x9.asArray();
            }
        }
        pd(a, b, c, d) {
            super.pd(a, b, c, d);
            if (this.xb == null || !(typeCast(ISortingAxis_$type, this.xb) !== null)) {
                return;
            }
            let e = this.xb.i$b;
            switch (a) {
                case 1:
                    for (let f = b; f < c; f++) {
                        let g = e._inner[f];
                        if (this.yz != null) {
                            this.yz.insert(f, this.x7.item(g));
                        }
                        if (this.yx != null) {
                            this.yx.insert(f, this.x5.item(g));
                        }
                        if (this.yy != null) {
                            this.yy.insert(f, this.x6.item(g));
                        }
                        if (this.yw != null) {
                            this.yw.insert(f, this.x4.item(g));
                        }
                        if (this.y0 != null) {
                            this.y0.insert(f, this.x9.item(g));
                        }
                    }
                    break;
                case 0:
                    if (this.yz != null) {
                        this.yz.v(b, c);
                    }
                    if (this.yx != null) {
                        this.yx.v(b, c);
                    }
                    if (this.yy != null) {
                        this.yy.v(b, c);
                    }
                    if (this.yw != null) {
                        this.yw.v(b, c);
                    }
                    if (this.y0 != null) {
                        this.y0.v(b, c);
                    }
                    break;
                case 4:
                    if (this.yz != null) {
                        this.yz = new List$1(Number_$type, 0);
                    }
                    if (this.yx != null) {
                        this.yx = new List$1(Number_$type, 0);
                    }
                    if (this.yy != null) {
                        this.yy = new List$1(Number_$type, 0);
                    }
                    if (this.yw != null) {
                        this.yw = new List$1(Number_$type, 0);
                    }
                    if (this.y0 != null) {
                        this.y0 = 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.yz != null) {
                            this.yz._inner[h] = this.x7.item(i);
                        }
                        if (this.yx != null) {
                            this.yx._inner[h] = this.x5.item(i);
                        }
                        if (this.yy != null) {
                            this.yy._inner[h] = this.x6.item(i);
                        }
                        if (this.yw != null) {
                            this.yw._inner[h] = this.x4.item(i);
                        }
                        if (this.y0 != null) {
                            this.y0._inner[h] = this.x9.item(i);
                        }
                    }
                    break;
            }
            this.aak();
            this.sr();
        }
        xo(a, b) {
            let c = this.yv(this.x7);
            let d = this.yv(this.x4);
            let e = this.yv(this.x5);
            let f = this.yv(this.x6);
            let g = this.yv(this.x9);
            let h = ((() => {
                let $ret = new FinancialCalculationDataSource();
                $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(this.yt), this.yu());
                $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(this.ys), ((() => {
                    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.yr), ((() => {
                    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.dp != null ? this.dp.count : 0;
                return $ret;
            })());
            return h;
        }
        y7(a) {
            if (isInfinity(a) || isNaN_(a)) {
                return 0;
            }
            return a;
        }
        xp(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.hr;
                $ret.j = Series.hq;
                $ret.i = runOn(this, this.y7);
                return $ret;
            })());
        }
        get categoryAxis() {
            return this.xb;
        }
        rw(a, b) {
            super.rw(a, b);
            if (!this.g1) {
                this.cw.be(b);
                return;
            }
            let c = typeCast(FinancialSeriesView.$, this.cv);
            this.cw.be(b);
            c.cd.e(this.ie);
            if (this.d7(this.cv)) {
                return;
            }
            this.rx();
            this.g1 = false;
        }
        rx() {
            super.rx();
            let a = typeCast(FinancialSeriesView.$, this.cv);
            if (!this.gt) {
                this.aah(this.xg, a);
            }
            this.gt = false;
            this.aaj(this.xg, a);
        }
        rt(a, b, c, d, e) {
            super.rt(a, b, c, d, e);
            let f = this.ba.a$j.item(d);
            let g = f;
            g.cd.e(this.ie);
            f.bd(c);
            if (this.d7(g)) {
                return;
            }
            if (this.xc == null) {
                this.xc = new CategoryFrame(3);
            }
            this.xc.x();
            this.aah(this.xc, g);
            this.aaj(this.xc, g);
        }
        aw(a) {
            if (this.xb == a) {
                return this.xu;
            }
            if (this.xu == a) {
                return this.xb;
            }
            return null;
        }
        preferredCategoryMode(a) {
            let b = typeCast(IDateTimeAxis_$type, this.xb);
            return b != null ? b.preferredCategoryMode(this) : this.xj;
        }
        get xj() {
            return this.xi;
        }
        set xj(a) {
            let b = this.xj;
            if (a != b) {
                this.xi = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.xj));
            }
        }
        get_fn() {
            return true;
        }
        r7(a, b) {
            super.r7(a, b);
            this.aa1 = a;
        }
        aak() {
            this.io = this.x4 == null || this.x4.count == 0 ? NaN : this.x4.item(this.x4.count - 1);
        }
        kq(a) {
            if (this.xt != null && a != null) {
                if (this.xv == null || this.xv.propertyName != this.xt.dateTimeMemberPath) {
                    this.xv = new FastReflectionHelper(false, this.xt.dateTimeMemberPath);
                }
                let b = this.xv.getPropertyValue(a);
                if (typeCast(Date_$type, b) !== null) {
                    return dateToStringFormat(b, this.xt.itemLabelFormat());
                }
            }
            return super.kq(a);
        }
    }
    FinancialSeries.$t = /*@__PURE__*/ markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
    FinancialSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:zf:aal', [2, null], 'HighMemberPath:zs:aar', [2, null], 'HighlightedCloseMemberPath:zi:aam', [2, null], 'HighlightedHighMemberPath:zk:aan', [2, null], 'HighlightedLowMemberPath:zm:aao', [2, null], 'HighlightedOpenMemberPath:zo:aap', [2, null], 'HighlightedVolumeMemberPath:zq:aaq', [2, null], 'IsCustomCategoryStyleAllowed:yh:aas', [0, false], 'IsTransitionInEnabled:yi:aat', [0, false], 'LowMemberPath:zx:aau', [2, null], 'NegativeBrush:aa1:aav', [Brush.$, null], 'OpenMemberPath:z1:aaw', [2, null], 'TransitionInMode:xm:aax', [CategoryTransitionInMode_$type, /*@__PURE__*/ enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:z5:aay', [2, null], 'XAxis:xb:aaz', [CategoryAxisBase.$, null], 'YAxis:xu:aa0', [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 {
        cg(a) {
            if (this.ch != a.w) {
                return true;
            }
            return false;
        }
        ci(a) {
            this.ch = a.w;
        }
        constructor(a) {
            super(a);
            this.cf = null;
            this.cd = null;
            this.ch = 0;
            this.ch = -1;
            this.cf = a;
            this.cd = this.ce();
        }
        a4() {
            super.a4();
            if (!this.t) {
            }
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'>";
            if (this.cf.xb.ce) {
                a += "<span>${itemLabel}</span><br/>";
            }
            else if (this.cf.xb.f2 != null) {
                a += "<span>${item." + this.cf.xb.f2 + "}</span><br/>";
            }
            a += "<span class='ui-priority-primary'";
            let b = this.f.ba.a$u(this.f);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            let c = new SRProvider(this.ae);
            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.cf.title + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.cf.z1 + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.cf.zs + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.cf.zx + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.cf.zf + "}</td></tr>";
            if (!stringIsNullOrEmpty(this.cf.z5)) {
                let h = c.b1("financialSeries_Volume");
                h = stringIsNullOrEmpty(h) ? "Volume" : h;
                a += "<tr><td>" + h + ":</td><td>" + "${item." + this.cf.z5 + "}</td></tr>";
            }
            a += "</table></div>";
            return a;
        }
        an() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.f.v6 = a;
            this.f.jn = 5;
            this.f.jo = 2;
            this.f.jp = 2;
        }
    }
    FinancialSeriesView.$t = /*@__PURE__*/ markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
    return FinancialSeriesView;
})();