UNPKG

igniteui-webcomponents-charts

Version:

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

8,151 lines 286 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 { __extends, __values } from "tslib";
import { EventArgs, Base, markType, Point_$type, runOn, typeCast, IList$1_$type, Number_$type, markDep, IEnumerable_$type, Array_$type, delegateCombine, fromEnum, Boolean_$type, enumGetBox, fromEn, String_$type, getInstanceType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, Delegate_$type, toNullable, TypeRegistrar } from "igniteui-webcomponents-core";
import { Brush } from "igniteui-webcomponents-core";
import { DataTemplate } from "igniteui-webcomponents-core";
import { Visibility_$type } from "igniteui-webcomponents-core";
import { DoubleCollection } from "igniteui-webcomponents-core";
import { PenLineCap_$type } from "igniteui-webcomponents-core";
import { Style } from "igniteui-webcomponents-core";
import { MarkerType_$type } from "./MarkerType";
import { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { Series } from "./Series";
import { List$1 } from "igniteui-webcomponents-core";
import { AnchoredCategorySeries } from "./AnchoredCategorySeries";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { CategorySeries } from "./CategorySeries";
import { CategoryFramePreparer } from "./CategoryFramePreparer";
import { NumericAxisBase } from "./NumericAxisBase";
import { ISupportsMarkers_$type } from "./ISupportsMarkers";
import { CategoryFrame } from "./CategoryFrame";
import { Rect } from "igniteui-webcomponents-core";
import { CategorySeriesView } from "./CategorySeriesView";
import { Axis } from "./Axis";
import { ScalerParams } from "./ScalerParams";
import { ObservableCollection$1 } from "igniteui-webcomponents-core";
import { AxisRange } from "./AxisRange";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { CategoryBucketCalculator } from "./CategoryBucketCalculator";
import { isNaN_, isInfinity, truncate } from "igniteui-webcomponents-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { Path } from "igniteui-webcomponents-core";
import { ISortingAxis_$type } from "./ISortingAxis";
import { FrameworkElement } from "igniteui-webcomponents-core";
import { XamDataChart } from "./XamDataChart";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { DependencyObject } from "igniteui-webcomponents-core";
import { NumericYAxis } from "./NumericYAxis";
import { Defaults } from "./Defaults";
import { Pool$1 } from "igniteui-webcomponents-core";
import { Rectangle } from "igniteui-webcomponents-core";
import { DataContext } from "igniteui-webcomponents-core";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { IScaler_$type } from "./IScaler";
import { IIsCategoryBased_$type } from "./IIsCategoryBased";
import { CategoryMarkerManager } from "./CategoryMarkerManager";
import { PropertyMetadata } from "igniteui-webcomponents-core";
import { dateMinValue, dateMaxValue } from "igniteui-webcomponents-core";
import { NumericXAxis } from "./NumericXAxis";
import { CategoryYAxis } from "./CategoryYAxis";
import { AnchoredCategoryBucketCalculator } from "./AnchoredCategoryBucketCalculator";
import { IStacked100Series_$type } from "./IStacked100Series";
import { NotImplementedException } from "igniteui-webcomponents-core";
import { SplineSeriesBase } from "./SplineSeriesBase";
import { CollisionAvoider } from "./CollisionAvoider";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { Numeric } from "igniteui-webcomponents-core";
import { ICategoryScaler_$type } from "./ICategoryScaler";
import { ChartSelection } from "./ChartSelection";
import { CategoryXAxis } from "./CategoryXAxis";
import { IBarSeries_$type } from "./IBarSeries";
import { Color } from "igniteui-webcomponents-core";
import { LegendItemBadgeShape_$type } from "igniteui-webcomponents-core";
import { LegendItemBadgeMode_$type } from "igniteui-webcomponents-core";
import { MarkerFillMode_$type } from "./MarkerFillMode";
import { MarkerOutlineMode_$type } from "./MarkerOutlineMode";
import { SeriesOutlineMode_$type } from "./SeriesOutlineMode";
import { SeriesHighlightedValuesDisplayMode_$type } from "igniteui-webcomponents-core";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { PropertyUpdatedEventArgs } from "igniteui-webcomponents-core";
import { DataLegendSeriesValueInfo } from "igniteui-webcomponents-core";
import { DataLegendSeriesContext } from "igniteui-webcomponents-core";
import { SingleValuesHolder } from "./SingleValuesHolder";
import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { Canvas } from "igniteui-webcomponents-core";
import { Panel } from "igniteui-webcomponents-core";
import { PlatformConstants } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
var StackedSeriesCreatedEventArgs = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSeriesCreatedEventArgs, _super);
    function StackedSeriesCreatedEventArgs(a) {
        var _this = _super.call(this) || this;
        _this.c = null;
        _this.c = a;
        return _this;
    }
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "brush", {
        get: function () {
            return this.c.kz;
        },
        set: function (a) {
            this.c.kz = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "legendItemTemplate", {
        get: function () {
            return this.c.hr;
        },
        set: function (a) {
            this.c.hr = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "legendItemBadgeTemplate", {
        get: function () {
            return this.c.hq;
        },
        set: function (a) {
            this.c.hq = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "legendItemVisibility", {
        get: function () {
            return this.c.lu;
        },
        set: function (a) {
            this.c.lu = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "outline", {
        get: function () {
            return this.c.k3;
        },
        set: function (a) {
            this.c.k3 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "dashArray", {
        get: function () {
            return this.c.k8;
        },
        set: function (a) {
            this.c.k8 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "dashCap", {
        get: function () {
            return this.c.lb;
        },
        set: function (a) {
            this.c.lb = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "index", {
        get: function () {
            return this.c.cc;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "thickness", {
        get: function () {
            return this.c.b4;
        },
        set: function (a) {
            this.c.b4 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "title", {
        get: function () {
            return this.c.cj;
        },
        set: function (a) {
            this.c.cj = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "transitionDuration", {
        get: function () {
            return this.c.cd;
        },
        set: function (a) {
            this.c.cd = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "transitionEasingFunction", {
        get: function () {
            return this.c.ai;
        },
        set: function (a) {
            this.c.ai = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerBrush", {
        get: function () {
            return this.c.k0;
        },
        set: function (a) {
            this.c.k0 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerOutline", {
        get: function () {
            return this.c.k1;
        },
        set: function (a) {
            this.c.k1 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerStyle", {
        get: function () {
            return this.c.lr;
        },
        set: function (a) {
            this.c.lr = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerTemplate", {
        get: function () {
            return this.c.hs;
        },
        set: function (a) {
            this.c.hs = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerType", {
        get: function () {
            return this.c.x;
        },
        set: function (a) {
            this.c.x = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerThickness", {
        get: function () {
            return this.c.bx;
        },
        set: function (a) {
            this.c.bx = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "lineCap", {
        get: function () {
            return this.c.la;
        },
        set: function (a) {
            this.c.lc = a;
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesCreatedEventArgs.$t = markType(StackedSeriesCreatedEventArgs, 'StackedSeriesCreatedEventArgs', EventArgs.$);
    return StackedSeriesCreatedEventArgs;
}(EventArgs));
export { StackedSeriesCreatedEventArgs };
/**
 * @hidden
 */
var FragmentBase = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FragmentBase, _super);
    function FragmentBase() {
        var _this = _super.call(this) || this;
        _this.___neverPassByValue = true;
        _this.ac1 = null;
        _this._logicalSeriesLink = null;
        _this.ac3 = null;
        _this.ac1 = new CategoryLineRasterizer();
        return _this;
    }
    Object.defineProperty(FragmentBase.prototype, "logicalSeriesLink", {
        get: function () {
            return this._logicalSeriesLink;
        },
        set: function (a) {
            this._logicalSeriesLink = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FragmentBase.prototype, "parentSeries", {
        get: function () {
            return this.ac3;
        },
        set: function (a) {
            this.ac3 = a;
        },
        enumerable: false,
        configurable: true
    });
    FragmentBase.prototype.get_e7 = function () {
        return false;
    };
    FragmentBase.prototype.get_isFragment = function () {
        return true;
    };
    FragmentBase.prototype.ne = function () {
        if (this.logicalSeriesLink != null) {
            return this.logicalSeriesLink.e0;
        }
        return null;
    };
    FragmentBase.prototype.j3 = function () {
        var a = this.parentSeries;
        if (a.index == -1 || a.aa5 == null || a.aa5.f.indexOf(this) == -1) {
            return -1;
        }
        return a.aa5.f.indexOf(this);
    };
    FragmentBase.prototype.qc = function (a) {
        _super.prototype.qc.call(this, a);
        a.parentSeries = this.parentSeries;
        a.logicalSeriesLink = this.logicalSeriesLink;
    };
    FragmentBase.prototype.j8 = function () {
        var a = this.parentSeries;
        if (a.index == -1 || a.series.count == 0 || a.series.indexOf(this.logicalSeriesLink) == -1) {
            return -1;
        }
        return a.series.indexOf(this.logicalSeriesLink);
    };
    FragmentBase.prototype.resolveLegendIndex = function () {
        var a = this.parentSeries;
        if (a.aa9) {
            return -1 + a.index + a.aa0.count - a.aa5.f.indexOf(this);
        }
        return _super.prototype.resolveLegendIndex.call(this);
    };
    FragmentBase.prototype.bq = function () {
        return this.parentSeries;
    };
    FragmentBase.prototype.yx = function () {
        if (this.parentSeries == null) {
            return null;
        }
        return this.parentSeries.fetchXAxis();
    };
    FragmentBase.prototype.ac0 = function () {
        if (this.parentSeries == null) {
            return this.y4;
        }
        return this.parentSeries.y4;
    };
    FragmentBase.prototype.ze = function () {
        if (this.parentSeries == null) {
            return null;
        }
        return this.parentSeries.fetchYAxis();
    };
    FragmentBase.prototype.ac6 = function (a, b, c, d, e, f, g, h) {
        var i = c[0];
        var j = c[1];
        var k = new Rect(0, i - 5, j - 5, 11, 11);
        if (!isNaN_(i) && !isNaN_(j) && !isInfinity(i) && !isInfinity(j) && d.tryAdd(k)) {
            b.p.add({ $type: Point_$type, x: i, y: j });
            a.updateMarkerTemplate(g, f, h);
            return true;
        }
        return false;
    };
    FragmentBase.prototype.aam = function (a, b) {
        a.x();
        if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null) {
            return;
        }
        if (this.logicalSeriesLink.a8.count == 0 || this.logicalSeriesLink.a7.count == 0) {
            return;
        }
        this.y5(b).d(a, b);
    };
    FragmentBase.prototype.wh = function (a, b, c) {
        var _this = this;
        return this.wj(a, b, c, this.ac0().r(this.yx(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ze(), this.yx(), runOn(this, this.ac7), function (d, e) { return _this.kc(d, e, _this.yx(), runOn(_this, _this.zy), _this.valueColumn != null ? new FragmentBaseValueList(_this) : null); }, function (d, e) { return _this.ka(d, e, _this.yx(), runOn(_this, _this.zy), _this.valueColumn != null ? new FragmentBaseValueList(_this) : null); });
    };
    FragmentBase.prototype.ai = function () {
        return [this.yx(), this.ze()];
    };
    FragmentBase.prototype.ac7 = function (a, b, c) {
        if (this.dc == null) {
            return NaN;
        }
        var d = this.getEffectiveViewport1(this.cw);
        var e = new ScalerParams(0, this.dc.wh, this.cw.b9, this.yx().ch, d);
        var f = this.y4.r(this.yx(), this.dc.wh, this.cw.b9, d);
        return this.i8(this.valueColumn != null ? new FragmentBaseValueList(this) : null, a, this.yx(), e, f, runOn(this, this.zy), b, c);
    };
    FragmentBase.prototype.ac9 = function (a, b, c) {
        var d = this.abd(c);
        var e = d;
        var f = this.logicalSeriesLink.az;
        var g = f ? this.parentSeries.aa5.e : this.parentSeries.aa5.d;
        var h = this;
        if (this.bo != null) {
            h = this.bo;
        }
        var i = g.indexOf(h);
        if (a.count == 0) {
            return;
        }
        if (i == -1) {
            return;
        }
        var j = false;
        for (var k = i; k >= 0; k--) {
            if (j) {
                break;
            }
            if (k == 0) {
                a.add({ $type: Point_$type, x: a._inner[a.count - 1].x, y: e });
                a.add({ $type: Point_$type, x: a._inner[0].x, y: e });
                break;
            }
            var l = typeCast(FragmentBase.$, g._inner[k - 1]);
            if (l != null && l.ac1 != null && l.ac1.o.count > 0 && this.cw != null && l.hf(this.cw.b9, this.cw.ca, this.cw)) {
                j = true;
                for (var m = l.ac1.o.count - 1; m >= 0; m--) {
                    a.add(l.ac1.o._inner[m]);
                }
            }
        }
    };
    FragmentBase.prototype.hf = function (a, b, c) {
        var d = _super.prototype.hf.call(this, a, b, c);
        var e = typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis());
        var f = this.parentSeries.fetchYAxis();
        if (this.parentSeries == null || e == null || e.itemsSource == null || f == null || this.parentSeries.dp == null || e.bi == null || f.bi == null) {
            d = false;
        }
        if (this.valueColumn == null) {
            return false;
        }
        if (isInfinity(this.valueColumn.minimum) && isInfinity(this.valueColumn.maximum)) {
            d = false;
        }
        if (isNaN_(this.valueColumn.minimum) && isNaN_(this.valueColumn.maximum)) {
            d = false;
        }
        return d;
    };
    FragmentBase.prototype.abd = function (a) {
        var b = 0;
        var c = a.ca;
        var d = a.b9;
        var e = this.getEffectiveViewport1(a);
        var f = new ScalerParams(0, c, d, this.ze().ch, e);
        f.b = this.iz();
        if (!c.isEmpty && !d.isEmpty && this.ze() != null) {
            b = this.ze().el(0, f);
        }
        return b;
    };
    FragmentBase.prototype.ay = function (a) {
        return null;
    };
    FragmentBase.prototype.ac8 = function () {
        if (this.parentSeries == null) {
            return -1;
        }
        var a = this.parentSeries.index;
        var b = 0;
        var c = 1;
        if (this.parentSeries.aa9) {
            b = this.parentSeries.aa0.count - 1;
            c = -1;
        }
        for (var d = b; this.parentSeries.aa9 ? d >= 0 : d < this.parentSeries.aa0.count; d += c) {
            var e = this.parentSeries.aa0._inner[d];
            if (e.visualSeriesLink == this) {
                return a;
            }
            if (this.parentSeries.a5 == null || e.lt != 0 || e.ls != 0) {
                continue;
            }
            a++;
        }
        return -1;
    };
    FragmentBase.prototype.ada = function (a) {
        if (a == null) {
        }
    };
    FragmentBase.prototype.rc = function (a, b, c, d) {
        _super.prototype.rc.call(this, a, b, c, d);
        if (this.parentSeries == null) {
            return;
        }
        var e = typeCast(NumericAxisBase.$, this.parentSeries.fetchYAxis());
        if (e == null) {
            return;
        }
        switch (b) {
            case "ValueColumn":
                if (this.aaz.dl) {
                    this.aaz.dk.g$m();
                }
                if (e != null && !e.c1()) {
                    this.parentSeries.aaz().c9.g(this.ie);
                    this.ru(this.gh && this.d9);
                }
                break;
            case "ActualBrush":
                if (this.logicalSeriesLink != null) {
                    this.logicalSeriesLink.ku = this.ve;
                }
                break;
        }
    };
    FragmentBase.prototype.rw = function (a, b) {
        _super.prototype.rw.call(this, a, b);
    };
    Object.defineProperty(FragmentBase.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    FragmentBase.$t = markType(FragmentBase, 'FragmentBase', HorizontalAnchoredCategorySeries.$);
    return FragmentBase;
}(HorizontalAnchoredCategorySeries));
export { FragmentBase };
/**
 * @hidden
 */
var AreaFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(AreaFragment, _super);
    function AreaFragment() {
        var _this = _super.call(this) || this;
        _this.ab = AreaFragment.$;
        return _this;
    }
    AreaFragment.prototype.bk = function () {
        return new AreaFragment();
    };
    AreaFragment.prototype.ct = function () {
        return new AreaFragmentView(this);
    };
    AreaFragment.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.adb = a;
    };
    AreaFragment.prototype.get_ex = function () {
        return true;
    };
    AreaFragment.prototype.get_ew = function () {
        return true;
    };
    AreaFragment.prototype.y9 = function () {
        return 1;
    };
    AreaFragment.prototype.add = function (a, b) {
        var c = this.adb.dz.an;
        if (this.gz(a, c)) {
            return true;
        }
        var d = this.adb.d0.an;
        if (this.gz(a, d)) {
            return true;
        }
        return false;
    };
    AreaFragment.prototype.gx = function (a, b) {
        if (this.adc(a, b)) {
            return true;
        }
        if (this.add(a, b)) {
            return true;
        }
        if (this.xm(a, b)) {
            return true;
        }
        return false;
    };
    AreaFragment.prototype.adc = function (a, b) {
        var c = this.adb.d1.an;
        if (this.gy(a, b, c)) {
            return true;
        }
        var d = this.adb.d2.an;
        if (this.gy(a, b, d)) {
            return true;
        }
        return false;
    };
    AreaFragment.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    AreaFragment.prototype.o7 = function (a, b) {
        _super.prototype.o7.call(this, a, b);
        var c = b;
        c.du();
    };
    AreaFragment.prototype.aap = function (a, b) {
        var _this = this;
        _super.prototype.aap.call(this, a, b);
        this.ac1.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false;
        var c = typeCast(AreaFragmentView.$, b);
        var d = a.h;
        var e = this.getEffectiveViewport1(c);
        this.y7.a2(this, this.zr(), runOn(this, this.yr), this.z0(b), this.z1(b));
        var f = false;
        var g = this.y7.b;
        if (g != null) {
            f = true;
        }
        if (f) {
            var h = new ScalerParams(0, b.ca, b.b9, this.ach.ch, e);
            this.aal(d, -1, this.valueColumn.count, this.ach, h, b.t, -1);
        }
        this.y7.ad(c.d1, true, false, true, true);
        this.y7.ad(c.d2, true, false, true, true);
        this.y7.ad(c.dz, false, true, false, false);
        this.y7.ad(c.d0, false, true, false, false);
        var i = c.c9.d;
        this.ac1.i(c.dz, c.d1, c.d0, c.d2, a.h.count, a.h, true, i, this.ie, function (j, k, l, m, n) { return _this.ac9(j, a.h, b); }, 0);
        c.dz._opacity = this.y7.j * this.ia;
        c.d0._opacity = 0.5 * this.y7.j * this.ia;
    };
    AreaFragment.prototype.sh = function () {
        var a = (typeCast(XamDataChart.$, this.dc));
        if (a != null) {
            this.ia = isNaN_(this.il) ? this.parentSeries.ia : this.il;
        }
    };
    Object.defineProperty(AreaFragment.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    AreaFragment.$t = markType(AreaFragment, 'AreaFragment', FragmentBase.$);
    return AreaFragment;
}(FragmentBase));
export { AreaFragment };
/**
 * @hidden
 */
var ColumnFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ColumnFragment, _super);
    function ColumnFragment() {
        var _this = _super.call(this) || this;
        _this.ab = ColumnFragment.$;
        return _this;
    }
    ColumnFragment.prototype.bk = function () {
        return new ColumnFragment();
    };
    ColumnFragment.prototype.get_e1 = function () {
        return true;
    };
    ColumnFragment.prototype.get_fm = function () {
        return true;
    };
    ColumnFragment.prototype.jl = function () {
        if (!isNaN_(this.jk)) {
            return _super.prototype.jl.call(this);
        }
        return Defaults.h;
    };
    ColumnFragment.prototype.y9 = function () {
        return 1;
    };
    ColumnFragment.prototype.ct = function () {
        return new ColumnFragmentView(this);
    };
    ColumnFragment.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.adc = a;
    };
    Object.defineProperty(ColumnFragment.prototype, "fragmentXAxis", {
        get: function () {
            return this.parentSeries != null ? typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis()) : null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ColumnFragment.prototype, "fragmentYAxis", {
        get: function () {
            return this.parentSeries != null ? typeCast(NumericYAxis.$, this.parentSeries.fetchYAxis()) : null;
        },
        enumerable: false,
        configurable: true
    });
    ColumnFragment.prototype.preferredCategoryMode = function (a) {
        return 2;
    };
    ColumnFragment.prototype.yx = function () {
        return this.fragmentXAxis;
    };
    ColumnFragment.prototype.ze = function () {
        return this.fragmentYAxis;
    };
    ColumnFragment.prototype.get_ef = function () {
        return true;
    };
    ColumnFragment.prototype.fetchXAxis = function () {
        return null;
    };
    ColumnFragment.prototype.fetchYAxis = function () {
        return null;
    };
    ColumnFragment.prototype.o7 = function (a, b) {
        _super.prototype.o7.call(this, a, b);
        var c = b;
        if (a && c.du != null) {
            this.yz.p.clear();
            c.du.count = 0;
        }
    };
    ColumnFragment.prototype.ay = function (a) {
        if (this.valueColumn == null || this.valueColumn.count == 0) {
            return null;
        }
        return new AxisRange(this.valueColumn.minimum, this.valueColumn.maximum);
    };
    ColumnFragment.prototype.hf = function (a, b, c) {
        if (this.parentSeries == null) {
            return false;
        }
        return this.parentSeries.aba(this, a, b, this.ade(c));
    };
    ColumnFragment.prototype.hc = function () {
        return true;
    };
    ColumnFragment.prototype.z0 = function (a) {
        if (this.parentSeries != null) {
            return this.parentSeries.z0(this.parentSeries.cw);
        }
        return _super.prototype.z0.call(this, a);
    };
    ColumnFragment.prototype.z1 = function (a) {
        if (this.parentSeries != null) {
            return this.parentSeries.z1(this.parentSeries.cw);
        }
        return _super.prototype.z0.call(this, a);
    };
    ColumnFragment.prototype.z2 = function (a) {
        if (this.parentSeries != null) {
            return this.parentSeries.z2(this.parentSeries.cw);
        }
        return _super.prototype.z2.call(this, a);
    };
    ColumnFragment.prototype.ws = function (a) {
        if (this.yx() == null || this.fragmentYAxis == null) {
            return Rect.empty;
        }
        var b = this.wc(a);
        var c = this.cw.ca;
        var d = this.cw.b9;
        var e = this.getEffectiveViewport1(this.cw);
        var f = new ScalerParams(0, c, d, this.fragmentYAxis.ch, e);
        var g = this.an(this.yx(), this.yz.h, this.z0(this.cw), this.z1(this.cw), a, true);
        if (g == null) {
            return Rect.empty;
        }
        var h = g[0];
        var i = g[1];
        var j = Math.abs(b.x - h[0]);
        var k = Math.abs(b.x - i[0]);
        var l = this.yx().k8(c, d, e);
        if (j < k) {
            var m = h[0] - 0.5 * l;
            var n = h[1];
            var o = h[2];
            return new Rect(0, m, Math.min(n, o), l, Math.max(n, o) - Math.min(n, o));
        }
        else {
            var p = i[0] - 0.5 * l;
            var q = i[1];
            var r = i[2];
            return new Rect(0, p, Math.min(q, r), l, Math.max(q, r) - Math.min(q, r));
        }
    };
    ColumnFragment.prototype.gx = function (a, b) {
        if (this.g0(a, b)) {
            return true;
        }
        if (this.xm(a, b)) {
            return true;
        }
        return false;
    };
    ColumnFragment.prototype.g0 = function (a, b) {
        var c = this.wt(a);
        if (c.isEmpty) {
            return false;
        }
        var d = this.adl(c, this.iv(b));
        return d.containsPoint(a);
    };
    ColumnFragment.prototype.adl = function (a, b) {
        var c = a.left + a.width / 2;
        var d = a.top + a.height / 2;
        var e = c - ((a.width / 2) + b);
        var f = d - (a.height / 2);
        var g = a.height;
        var h = a.width + b * 2;
        return new Rect(0, e, f, h, g);
    };
    ColumnFragment.prototype.ky = function (a, b) {
        var c = typeCast(FrameworkElement.$, a);
        var d = c != null ? typeCast(DataContext.$, c.dataContext) : null;
        var e = d != null ? d.item : null;
        if (e == null) {
            var f = this.cw.b9;
            var g = this.dc != null ? this.dc.wh : Rect.empty;
            var h = { $type: Point_$type, x: g.left + g.width * (b.x - f.left) / f.width, y: g.top + g.height * (b.y - f.top) / f.height };
            e = this.ko(h);
        }
        return e;
    };
    ColumnFragment.prototype.ko = function (a) {
        var b = 0;
        if (typeCast(ISortingAxis_$type, this.yx()) !== 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;
    };
    ColumnFragment.prototype.j6 = function (a) {
        var b = this.cw.ca;
        var c = this.cw.b9;
        var d = this.getEffectiveViewport1(this.cw);
        if (b.isEmpty || c.isEmpty) {
            return -1;
        }
        var e = this.yx();
        var f = new ScalerParams(0, b, c, e.ch, d);
        var g = typeCast(ISortingAxis_$type, this.fragmentXAxis);
        var h = this.wo(this.cw);
        var i = e.eo(h.left, f);
        var j = e.eo(h.right, f);
        var k = (a.x - b.left) / b.width;
        var l = i + ((j - i) * k);
        if (truncate(l) <= dateMinValue().getTime() || truncate(l) >= dateMaxValue().getTime()) {
            return -1;
        }
        var m = g.i$f(l);
        return m;
    };
    ColumnFragment.prototype.j4 = function (a) {
        if (this.parentSeries == null) {
            return -1;
        }
        return this.parentSeries.abh(a);
    };
    ColumnFragment.prototype.ac6 = function (a, b, c, d, e, f, g, h) {
        var i = 0;
        var j = c[0];
        var k = e < i ? c[2] : c[1];
        var l = new Rect(0, j - 5, k - 5, 11, 11);
        if (!isNaN_(j) && !isNaN_(k) && !isInfinity(j) && !isInfinity(k) && d.tryAdd(l)) {
            b.p.add({ $type: Point_$type, x: j, y: k });
            a.updateMarkerTemplate(g, f, h);
            return true;
        }
        return false;
    };
    ColumnFragment.prototype.ade = function (a) {
        if (a.s) {
            return this.parentSeries.ba.a$j.item(a.al);
        }
        else if (a == this.cv) {
            return this.parentSeries.cv;
        }
        else {
            return this.parentSeries.y8;
        }
    };
    ColumnFragment.prototype.rt = function (a, b, c, d, e) {
        this.ba.a$z(this, a, b, d, e);
        var f = this.ba.a$j.item(d);
        var g = f;
        f.bd(c);
        var h = this.ade(f);
        h.c9.g(this.ie);
        if (this.d7(g)) {
            return;
        }
        if (this.aa0 == null) {
            this.aa0 = new CategoryFrame(3);
        }
        this.aa0.x();
        this.aam(this.aa0, g);
        this.aap(this.aa0, g);
    };
    ColumnFragment.prototype.aam = function (a, b) {
        a.x();
        if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null || this.logicalSeriesLink.a7.count == 0 || this.logicalSeriesLink.a8.count == 0) {
            return;
        }
        var c;
        if (b.s) {
            c = this.parentSeries.aay;
        }
        else if (b == this.cv) {
            c = this.parentSeries.y2;
        }
        else {
            c = this.parentSeries.yz;
        }
        var d = typeCast(CategorySeriesView.$, this.ade(b));
        a.h.clear();
        if (a.o != null) {
            a.o.clear();
        }
        a.p.clear();
        var e = d.c9.e;
        var f = d.c9.f;
        var g = this.parentSeries.y4.h.yScaler;
        var h = typeCast(ISortingAxis_$type, this.parentSeries.y4.h.scaler);
        var i = typeCast(NumericAxisBase.$, g) !== null && g.lp;
        var j = typeCast(StackedBucketCalculator.$, d.c9);
        var k = d.c9.d;
        var l = 0;
        if (e <= f) {
            for (var m = e; m <= f; m++) {
                var n = m * k;
                if (this._visibility != 0) {
                    break;
                }
                if (m >= this.valueColumn.count || m >= c.h.count + e) {
                    continue;
                }
                var o = this.valueColumn.item(m);
                var p = !i || (i && o > 0);
                var q = void 0;
                if (h == null) {
                    q = j.getBucket1(this, m, m, b.ca, b.b9, c);
                }
                else {
                    q = j.getBucket1(this, m, h.i$b._inner[m], b.ca, b.b9, c);
                }
                a.h.add(q);
                if (h != null) {
                    if (a.o == null) {
                        a.o = new List$1(Number_$type, 0);
                    }
                    a.o.add(n);
                }
                if (p) {
                    if (this.ac6(b, a, q, this.y4.h.provideCollisionDetector(), o, n, l, a.h.count - 1)) {
                        l++;
                    }
                }
            }
        }
        b.dc.count = l;
    };
    ColumnFragment.prototype.aap = function (a, b) {
        _super.prototype.aap.call(this, a, b);
        if (this.parentSeries == null) {
            return;
        }
        this.parentSeries.abq(this, a, b, runOn(this, this.yr));
        CategoryMarkerManager.e(this, a.p, b.dc, this.xn);
    };
    ColumnFragment.prototype.rc = function (a, b, c, d) {
        _super.prototype.rc.call(this, a, b, c, d);
    };
    Object.defineProperty(ColumnFragment.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    ColumnFragment.$t = markType(ColumnFragment, 'ColumnFragment', FragmentBase.$);
    ColumnFragment.$$p = markDep(DependencyProperty, PropertyMetadata, ColumnFragment, 'raisePropertyChanged', ['RadiusX:adf:adj', [1, 0], 'RadiusY:adg:adk', [1, 0]]);
    return ColumnFragment;
}(FragmentBase));
export { ColumnFragment };
/**
 * @hidden
 */
var BarFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(BarFragment, _super);
    function BarFragment() {
        var _this = _super.call(this) || this;
        _this.ab = BarFragment.$;
        return _this;
    }
    BarFragment.prototype.get_ez = function () {
        return true;
    };
    BarFragment.prototype.get_fm = function () {
        return true;
    };
    BarFragment.prototype.get_e1 = function () {
        return false;
    };
    BarFragment.prototype.y9 = function () {
        return 1;
    };
    Object.defineProperty(BarFragment.prototype, "barFragmentXAxis", {
        get: function () {
            return this.parentSeries != null ? this.parentSeries.xAxis : null;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(BarFragment.prototype, "barFragmentYAxis", {
        get: function () {
            return this.parentSeries != null ? this.parentSeries.yAxis : null;
        },
        enumerable: false,
        configurable: true
    });
    BarFragment.prototype.yx = function () {
        if (this.parentSeries == null) {
            return null;
        }
        return this.parentSeries.fetchYAxis();
    };
    BarFragment.prototype.get_isVertical = function () {
        return true;
    };
    BarFragment.prototype.is = function (a) {
        var b = this.dc != null ? this.dc.wh : Rect.empty;
        var c = this.cw.b9;
        var d = this.wo(this.cw);
        var e = this.getEffectiveViewport1(this.cw);
        var f = this.yx();
        var g = -1;
        if (f != null && !b.isEmpty && !c.isEmpty) {
            var h = new ScalerParams(0, b, c, f.ch, e);
            var i = f.eo(d.top, h);
            var j = f.eo(d.bottom, h);
            var k = (a.y - b.top) / b.height;
            var l = i + (k * (j - i));
            if (f.categoryMode != 0) {
                l -= 0.5;
            }
            g = l;
        }
        return g;
    };
    BarFragment.prototype.ze = function () {
        if (this.parentSeries == null) {
            return null;
        }
        return this.parentSeries.ze();
    };
    BarFragment.prototype.adl = function (a, b) {
        var c = a.left + a.width / 2;
        var d = a.top + a.height / 2;
        var e = c - (a.width / 2);
        var f = d - ((a.height / 2) + b);
        var g = a.height + b * 2;
        var h = a.width;
        return new Rect(0, e, f, h, g);
    };
    BarFragment.prototype.ws = function (a) {
        if (this.yx() == null) {
            return Rect.empty;
        }
        var b = this.wc(a);
        var c = this.cw.ca;
        var d = this.cw.b9;
        var e = this.getEffectiveViewport1(this.cw);
        var f = this.yx();
        var g = new ScalerParams(0, c, d, f.ch, e);
        var h = this.an(this.yx(), this.yz.h, this.z0(this.cw), this.z1(this.cw), a, true);
        if (h == null) {
            return Rect.empty;
        }
        var i = h[0];
        var j = h[1];
        var k = Math.abs(b.y - i[0]);
        var l = Math.abs(b.y - j[0]);
        var m = f.k8(c, d, e);
        if (k < l) {
            var n = i[0] - 0.5 * m;
            var o = i[2];
            var p = i[1];
            return new Rect(0, o, n, Math.max(p, o) - Math.min(p, o), m);
        }
        else {
            var q = j[0] - 0.5 * m;
            var r = j[2];
            var s = j[1];
            return new Rect(0, r, q, Math.max(s, r) - Math.min(s, r), m);
        }
    };
    BarFragment.prototype.gx = function (a, b) {
        if (this.g0(a, b)) {
            return true;
        }
        if (this.xm(a, b)) {
            return true;
        }
        return false;
    };
    BarFragment.prototype.ac6 = function (a, b, c, d, e, f, g, h) {
        var i = c[0];
        var j = e < 0 ? c[2] : c[1];
        var k = new Rect(0, j - 5, i - 5, 11, 11);
        if (!isNaN_(j) && !isNaN_(i) && !isInfinity(j) && !isInfinity(i) && d.tryAdd(k)) {
            b.p.add({ $type: Point_$type, x: j, y: i });
            a.updateMarkerTemplate(g, f, h);
            return true;
        }
        return false;
    };
    BarFragment.prototype.ko = function (a) {
        var b = 0;
        if (typeCast(ISortingAxis_$type, this.barFragmentYAxis) !== 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;
    };
    BarFragment.prototype.j6 = function (a) {
        var b = this.cw.ca;
        var c = this.cw.b9;
        if (b.isEmpty || c.isEmpty) {
            return -1;
        }
        var d = this.getEffectiveViewport1(this.cw);
        var e = new ScalerParams(0, b, c, this.barFragmentYAxis.ch, d);
        var f = typeCast(ISortingAxis_$type, this.barFragmentYAxis);
        var g = this.wo(this.cw);
        var h = this.barFragmentYAxis.eo(g.top, e);
        var i = this.barFragmentYAxis.eo(g.bottom, e);
        var j = (a.y - b.top) / b.height;
        var k = h + ((i - h) * j);
        if (truncate(k) <= dateMinValue().getTime() || truncate(k) >= dateMaxValue().getTime()) {
            return -1;
        }
        var l = f.i$f(k);
        return l;
    };
    BarFragment.prototype.abd = function (a) {
        var b = 0;
        var c = a.ca;
        var d = a.b9;
        var e = this.getEffectiveViewport1(a);
        var f = new ScalerParams(0, c, d, this.barFragmentXAxis.ch, e);
        if (!c.isEmpty && !d.isEmpty && this.barFragmentXAxis != null) {
            b = this.barFragmentXAxis.el(0, f);
        }
        return b;
    };
    BarFragment.prototype.rc = function (a, b, c, d) {
        _super.prototype.rc.call(this, a, b, c, d);
        if (this.parentSeries == null || this.barFragmentXAxis == null) {
            return;
        }
        var e = this.barFragmentXAxis;
        switch (b) {
            case "ValueColumn":
                if (this.aaz.dl) {
                    this.aaz.dk.g$m();
                }
                if (e != null && !e.c1()) {
                    this.parentSeries.aaz().c9.g(this.ie);
                    this.ru(this.gh && this.d9);
                }
                break;
        }
    };
    Object.defineProperty(BarFragment.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    BarFragment.$t = markType(BarFragment, 'BarFragment', ColumnFragment.$);
    return BarFragment;
}(ColumnFragment));
export { BarFragment };
/**
 * @hidden
 */
var AreaFragmentBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(AreaFragmentBucketCalculator, _super);
    function AreaFragmentBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    AreaFragmentBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) {
        return this.getBucket(a);
    };
    AreaFragmentBucketCalculator.prototype.getBucket = function (a) {
        var b = Math.min(a * this.d, this.i.di.valueColumn.count - 1);
        var c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1);
        var d = NaN;
        var e = NaN;
        var f = this.i.di;
        var g = f.parentSeries;
        var h = typeCast(IStacked100Series_$type, g) !== null;
        var i = this.i.di.valueColumn;
        var j = g.aaw;
        var k = g.aax;
        var l = f.logicalSeriesLink.a8;
        var m = f.logicalSeriesLink.a7;
        for (var n = b; n <= c; ++n) {
            var o = i.item(n);
            if (isNaN_(o) || isInfinity(o)) {
                o = 0;
            }
            var p = Math.abs(k[n]) + j[n];
            if (h) {
                if (p == 0) {
                    o = 0;
                }
                else if (o < 0) {
                    o = (l._inner[n] + o) / p * 100;
                }
                else {
                    o = (m._inner[n] + o) / p * 100;
                }
            }
            else {
                o = o < 0 ? l._inner[n] + o : m._inner[n] + o;
            }
            if (!isNaN_(d)) {
                if (!isNaN_(o)) {
                    d = Math.min(d, o);
                    e = Math.max(e, o);
                }
            }
            else {
                d = o;
                e = o;
            }
        }
        if (!isNaN_(d)) {
            return [0.5 * (b + c), d, e];
        }
        return [0.5 * (b + c), NaN, NaN];
    };
    AreaFragmentBucketCalculator.$t = markType(AreaFragmentBucketCalculator, 'AreaFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$);
    return AreaFragmentBucketCalculator;
}(AnchoredCategoryBucketCalculator));
export { AreaFragmentBucketCalculator };
/**
 * @hidden
 */
var LineFragmentBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineFragmentBucketCalculator, _super);
    function LineFragmentBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    LineFragmentBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) {
        return this.getBucket(a);
    };
    LineFragmentBucketCalculator.prototype.getBucket = function (a) {
        var b = Math.min(a * this.d, this.i.di.valueColumn.count - 1);
        var c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1);
        var d = NaN;
        var e = NaN;
        var f = typeCast(FragmentBase.$, this.i.di);
        var g = f.parentSeries;
        for (var h = b; h <= c; ++h) {
            var i = this.i.di.valueColumn.item(h);
            var j = Math.abs(g.aax[h]) + g.aaw[h];
            if (isNaN_(i) || isInfinity(i)) {
                i = 0;
            }
            if (typeCast(IStacked100Series_$type, g) !== null) {
                if (j == 0) {
                    i = 0;
                }
                else if (i < 0) {
                    i = (f.logicalSeriesLink.a8._inner[h] + i) / j * 100;
                }
                else {
                    i = (f.logicalSeriesLink.a7._inner[h] + i) / j * 100;
                }
            }
            else {
                i = i < 0 ? f.logicalSeriesLink.a8._inner[h] + i : f.logicalSeriesLink.a7._inner[h] + i;
            }
            if (!isNaN_(d)) {
                if (!isNaN_(i)) {
                    d = Math.min(d, i);
                    e = Math.max(e, i);
                }
            }
            else {
                d = i;
                e = i;
            }
        }
        if (!isNaN_(d)) {
            return [0.5 * (b + c), d, e];
        }
        return [0.5 * (b + c), NaN, NaN];
    };
    LineFragmentBucketCalculator.$t = markType(LineFragmentBucketCalculator, 'LineFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$);
    return LineFragmentBucketCalculator;
}(AnchoredCategoryBucketCalculator));
export { LineFragmentBucketCalculator };
/**
 * @hidden
 */
var SplineFragmentBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineFragmentBucketCalculator, _super);
    function SplineFragmentBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    SplineFragmentBucketCalculator.prototype.getBucket = function (a) {
        var b = Math.min(a * this.d, this.i.di.valueColumn.count - 1);
        var c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1);
        var d = NaN;
        var e = NaN;
        var f = typeCast(SplineFragmentBase.$, this.i.di);
        var g = f.parentSeries;
        for (var h = b; h <= c; ++h) {
            var i = this.i.di.valueColumn.item(h);
            var j = Math.abs(g.aax[h]) + g.aaw[h];
            if (isNaN_(i) || isInfinity(i)) {
                i = 0;
            }
            if (typeCast(IStacked100Series_$type, g) !== null) {
                if (j == 0) {
                    i = 0;
                }
                else if (i < 0) {
                    i = (f.logicalSeriesLink.a8._inner[h] + i) / j * 100;
                }
                else {
                    i = (f.logicalSeriesLink.a7._inner[h] + i) / j * 100;
                }
            }
            else {
                i = i < 0 ? f.logicalSeriesLink.a8._inner[h] + i : f.logicalSeriesLink.a7._inner[h] + i;
            }
            if (!isNaN_(d)) {
                if (!isNaN_(i)) {
                    d = Math.min(d, i);
                    e = Math.max(e, i);
                }
            }
            else {
                d = i;
                e = i;
            }
        }
        if (!isNaN_(d)) {
            return [0.5 * (b + c), d, e];
        }
        return [0.5 * (b + c), NaN, NaN];
    };
    SplineFragmentBucketCalculator.$t = markType(SplineFragmentBucketCalculator, 'SplineFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$);
    return SplineFragmentBucketCalculator;
}(AnchoredCategoryBucketCalculator));
export { SplineFragmentBucketCalculator };
/**
 * @hidden
 */
var StackedBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedBucketCalculator, _super);
    function StackedBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    StackedBucketCalculator.prototype.getBucket = function (a) {
        var b = typeCast(StackedSeriesBase.$, this.c.db);
        var c = Math.min(b.aax != null ? b.aax.length : 0, b.aaw != null ? b.aaw.length : 0);
        var d = Math.min(a * this.d, c - 1);
        var e = Math.min(d + this.d - 1, c - 1);
        var f = NaN;
        var g = NaN;
        for (var h = d; h <= e; ++h) {
            var i = Math.min(b.aax[h], b.aaw[h]);
            var j = Math.max(b.aax[h], b.aaw[h]);
            if (!isNaN_(f)) {
                if (!isNaN_(i)) {
                    f = Math.min(f, i);
                    g = Math.max(g, i);
                }
                if (!isNaN_(j)) {
                    f = Math.min(f, j);
                    g = Math.max(g, j);
                }
            }
            else {
                f = i;
                g = j;
            }
        }
        if (!isNaN_(f) && !isNaN_(g)) {
            return [0.5 * (d + e), f, g];
        }
        return [NaN, NaN, NaN];
    };
    StackedBucketCalculator.prototype.getBucket1 = function (a, b, c, d, e, f) {
        return null;
    };
    StackedBucketCalculator.$t = markType(StackedBucketCalculator, 'StackedBucketCalculator', CategoryBucketCalculator.$);
    return StackedBucketCalculator;
}(CategoryBucketCalculator));
export { StackedBucketCalculator };
/**
 * @hidden
 */
var StackedBarBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedBarBucketCalculator, _super);
    function StackedBarBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    StackedBarBucketCalculator.prototype.g = function (a) {
        var b = this.c.ca;
        var c = this.c.b9;
        var d = typeCast(StackedBarSeries.$, this.c.db);
        var e = this.c.db.dp;
        if (b.isEmpty || c.isEmpty || d.yAxis == null || e == null || e.count == 0) {
            this.d = 0;
            return;
        }
        var f = d.getEffectiveViewport1(this.c);
        var g = new ScalerParams(0, b, c, d.yAxis.ch, f);
        var h = d.wo(this.c);
        var i = Math.floor(d.yAxis.ep(h.top, g, 0));
        var j = Math.ceil(d.yAxis.ep(h.bottom, g, 0));
        if (!d.yAxis.ch) {
            j = Math.ceil(d.yAxis.ep(h.top, g, 0));
            i = Math.floor(d.yAxis.ep(h.bottom, g, 0));
        }
        var k = Math.floor((j - i + 1) * a / h.height);
        this.d = truncate(Math.max(1, k));
        this.e = truncate(Math.max(0, Math.floor(i / this.d) - 1));
        this.f = truncate(Math.ceil(j / this.d));
    };
    StackedBarBucketCalculator.prototype.getBucket = function (a) {
        return _super.prototype.getBucket.call(this, a);
    };
    StackedBarBucketCalculator.prototype.getBucket1 = function (a, b, c, d, e, f) {
        var g = [NaN, NaN, NaN];
        var h = typeCast(BarFragment.$, a);
        if (h == null || h.logicalSeriesLink == null) {
            return g;
        }
        var i = typeCast(StackedBarSeries.$, this.c.db);
        var j = a.valueColumn.item(c);
        var k = 0;
        var l = NaN;
        var m = NaN;
        var n = Number.NEGATIVE_INFINITY;
        var o = Number.POSITIVE_INFINITY;
        var p = i.getEffectiveViewport1(this.c);
        var q = Math.min(i.aax != null ? i.aax.length : 0, i.aaw != null ? i.aaw.length : 0);
        var r = c * this.d;
        var s = Math.min(r + this.d - 1, q - 1);
        if (r <= s) {
            for (var t = r; t <= s; ++t) {
                j = a.valueColumn.item(t);
                if (j < k) {
                    o = Math.min(o, h.logicalSeriesLink.a8._inner[t] + j);
                    n = Math.max(n, h.logicalSeriesLink.a8._inner[t]);
                }
                else {
                    o = Math.min(o, h.logicalSeriesLink.a7._inner[t]);
                    n = Math.max(n, h.logicalSeriesLink.a7._inner[t] + j);
                }
                if (!isNaN_(l)) {
                    if (!isNaN_(o)) {
                        l = Math.min(l, o);
                        m = Math.max(m, o);
                    }
                    if (!isNaN_(n)) {
                        l = Math.min(l, n);
                        m = Math.max(m, n);
                    }
                }
                else {
                    l = o;
                    m = n;
                }
            }
        }
        var u = new ScalerParams(0, d, e, i.xAxis.ch, p);
        g = [f.h._inner[b - this.e][0], i.xAxis.el(m, u), i.xAxis.el(l, u)];
        return g;
    };
    StackedBarBucketCalculator.$t = markType(StackedBarBucketCalculator, 'StackedBarBucketCalculator', StackedBucketCalculator.$);
    return StackedBarBucketCalculator;
}(StackedBucketCalculator));
export { StackedBarBucketCalculator };
/**
 * @hidden
 */
var StackedColumnBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedColumnBucketCalculator, _super);
    function StackedColumnBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    StackedColumnBucketCalculator.prototype.getBucket = function (a) {
        return _super.prototype.getBucket.call(this, a);
    };
    StackedColumnBucketCalculator.prototype.getBucket1 = function (a, b, c, d, e, f) {
        var g = [NaN, NaN, NaN];
        var h = typeCast(ColumnFragment.$, a);
        if (h == null || h.logicalSeriesLink == null) {
            return g;
        }
        var i = typeCast(StackedColumnSeries.$, this.c.db);
        var j = a.valueColumn.item(c);
        var k = 0;
        var l = NaN;
        var m = NaN;
        var n = Number.NEGATIVE_INFINITY;
        var o = Number.POSITIVE_INFINITY;
        var p = i.getEffectiveViewport1(this.c);
        var q = Math.min(i.aax != null ? i.aax.length : 0, i.aaw != null ? i.aaw.length : 0);
        var r = c * this.d;
        var s = Math.min(r + this.d - 1, q - 1);
        if (r <= s) {
            for (var t = r; t <= s; ++t) {
                j = a.valueColumn.item(t);
                if (j < k) {
                    o = Math.min(o, h.logicalSeriesLink.a8._inner[t] + j);
                    n = Math.max(n, h.logicalSeriesLink.a8._inner[t]);
                }
                else {
                    o = Math.min(o, h.logicalSeriesLink.a7._inner[t]);
                    n = Math.max(n, h.logicalSeriesLink.a7._inner[t] + j);
                }
                if (!isNaN_(l)) {
                    if (!isNaN_(o)) {
                        l = Math.min(l, o);
                        m = Math.max(m, o);
                    }
                    if (!isNaN_(n)) {
                        l = Math.min(l, n);
                        m = Math.max(m, n);
                    }
                }
                else {
                    l = o;
                    m = n;
                }
            }
        }
        var u = new ScalerParams(0, d, e, i.yAxis.ch, p);
        g = [f.h._inner[b - this.e][0], i.yAxis.el(m, u), i.yAxis.el(l, u)];
        return g;
    };
    StackedColumnBucketCalculator.$t = markType(StackedColumnBucketCalculator, 'StackedColumnBucketCalculator', StackedBucketCalculator.$);
    return StackedColumnBucketCalculator;
}(StackedBucketCalculator));
export { StackedColumnBucketCalculator };
/**
 * @hidden
 */
var FragmentBaseValueList = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FragmentBaseValueList, _super);
    function FragmentBaseValueList(a) {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.a = a;
        return _this;
    }
    FragmentBaseValueList.prototype.indexOf = function (a) {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.insert = function (a, b) {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.removeAt = function (a) {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.item = function (a, b) {
        if (arguments.length === 2) {
            throw new NotImplementedException(0);
            return b;
        }
        else {
            var b_1 = false;
            if (this.a.parentSeries != null) {
                b_1 = this.a.parentSeries.aa8;
            }
            var c = this.a.parentSeries;
            if (c == null) {
                return NaN;
            }
            if (c.aax == null || c.aaw == null || c.aax.length == 0 || c.aaw.length == 0) {
                return NaN;
            }
            var d = this.a.valueColumn.item(a);
            var e = Math.abs(c.aax[a]) + c.aaw[a];
            var f = this.a.logicalSeriesLink.a7;
            var g = this.a.logicalSeriesLink.a8;
            if (isNaN_(d) || isInfinity(d)) {
                d = 0;
            }
            if (b_1) {
                if (e == 0) {
                    d = 0;
                }
                else if (d < 0) {
                    d = (g._inner[a] + d) / e * 100;
                }
                else {
                    d = (f._inner[a] + d) / e * 100;
                }
            }
            else {
                d = d < 0 ? g._inner[a] + d : f._inner[a] + d;
            }
            return d;
        }
    };
    FragmentBaseValueList.prototype.add = function (a) {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.clear = function () {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.contains = function (a) {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.copyTo = function (a, b) {
        throw new NotImplementedException(0);
    };
    Object.defineProperty(FragmentBaseValueList.prototype, "count", {
        get: function () {
            return this.a.valueColumn.count;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FragmentBaseValueList.prototype, "isReadOnly", {
        get: function () {
            throw new NotImplementedException(0);
        },
        enumerable: false,
        configurable: true
    });
    FragmentBaseValueList.prototype.remove = function (a) {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.getEnumerator = function () {
        throw new NotImplementedException(0);
    };
    FragmentBaseValueList.prototype.getEnumeratorObject = function () {
        return this.getEnumerator();
    };
    FragmentBaseValueList.$t = markType(FragmentBaseValueList, 'FragmentBaseValueList', Base.$, [IList$1_$type.specialize(Number_$type)]);
    return FragmentBaseValueList;
}(Base));
export { FragmentBaseValueList };
/**
 * @hidden
 */
var LineFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineFragment, _super);
    function LineFragment() {
        var _this = _super.call(this) || this;
        _this.ab = LineFragment.$;
        return _this;
    }
    LineFragment.prototype.bk = function () {
        return new LineFragment();
    };
    LineFragment.prototype.get_fl = function () {
        return true;
    };
    LineFragment.prototype.zt = function () {
        return true;
    };
    LineFragment.prototype.ct = function () {
        return new LineFragmentView(this);
    };
    LineFragment.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.adb = a;
    };
    LineFragment.prototype.add = function (a, b) {
        var c = this.adb.dy.an;
        if (this.gz(a, c)) {
            return true;
        }
        return false;
    };
    LineFragment.prototype.get_ex = function () {
        return true;
    };
    LineFragment.prototype.gx = function (a, b) {
        if (this.adc(a, b)) {
            return true;
        }
        if (this.add(a, b)) {
            return true;
        }
        if (this.xm(a, b)) {
            return true;
        }
        return false;
    };
    LineFragment.prototype.adc = function (a, b) {
        var c = this.adb.dz.an;
        if (this.gy(a, b, c)) {
            return true;
        }
        var d = this.adb.d0.an;
        if (this.gy(a, b, d)) {
            return true;
        }
        return false;
    };
    LineFragment.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    LineFragment.prototype.o7 = function (a, b) {
        _super.prototype.o7.call(this, a, b);
        var c = b;
        c.du();
    };
    LineFragment.prototype.aap = function (a, b) {
        _super.prototype.aap.call(this, a, b);
        var c = function (d) { return a.h._inner[d][0]; };
        var d = function (e) { return a.h._inner[e][1]; };
        var e = function (f) { return a.h._inner[f][0]; };
        var f = function (g) { return a.h._inner[g][2]; };
        this.ac1.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false;
        var g = b.c9.d;
        var h = typeCast(LineFragmentView.$, b);
        var i = this.getEffectiveViewport1(b);
        var j = a.h;
        this.y7.a2(this, this.zr(), runOn(this, this.yr), this.z0(b), this.z1(b));
        var k = false;
        var l = this.y7.b;
        if (l != null) {
            k = true;
        }
        if (k) {
            var m = new ScalerParams(0, b.ca, b.b9, this.ach.ch, i);
            this.aal(j, -1, this.valueColumn.count, this.ach, m, b.t, -1);
        }
        this.y7.ad(h.dz, true, false, true, false);
        this.y7.ad(h.d0, true, false, true, false);
        this.y7.ad(h.dy, false, true, false, false);
        h.dy._opacity = 0.75 * this.y7.j;
        this.ac1.m(h.dz, h.dy, h.d0, a.h.count, a.h, true, 0, this.aax(a.h, a.h.count - 1, b.b9, b.ca), g, this.ie);
    };
    Object.defineProperty(LineFragment.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    LineFragment.$t = markType(LineFragment, 'LineFragment', FragmentBase.$);
    return LineFragment;
}(FragmentBase));
export { LineFragment };
/**
 * @hidden
 */
var SplineFragmentBase = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineFragmentBase, _super);
    function SplineFragmentBase() {
        var _this = _super.call(this) || this;
        _this._logicalSeriesLink = null;
        _this.adk = null;
        _this.adm = null;
        _this.adk = new CategoryLineRasterizer();
        return _this;
    }
    Object.defineProperty(SplineFragmentBase.prototype, "logicalSeriesLink", {
        get: function () {
            return this._logicalSeriesLink;
        },
        set: function (a) {
            this._logicalSeriesLink = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineFragmentBase.prototype, "parentSeries", {
        get: function () {
            return this.adm;
        },
        set: function (a) {
            this.adm = a;
        },
        enumerable: false,
        configurable: true
    });
    SplineFragmentBase.prototype.qc = function (a) {
        _super.prototype.qc.call(this, a);
        a.parentSeries = this.parentSeries;
        a.logicalSeriesLink = this.logicalSeriesLink;
    };
    SplineFragmentBase.prototype.get_e7 = function () {
        return false;
    };
    SplineFragmentBase.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineFragmentBase.prototype.get_isFragment = function () {
        return true;
    };
    SplineFragmentBase.prototype.ne = function () {
        if (this.logicalSeriesLink != null) {
            return this.logicalSeriesLink.e0;
        }
        return null;
    };
    SplineFragmentBase.prototype.wh = function (a, b, c) {
        var _this = this;
        return this.wj(a, b, c, this.y4.r(this.yx(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ze(), this.yx(), runOn(this, this.ado), function (d, e) { return _this.kc(d, e, _this.yx(), runOn(_this, _this.zy), new SplineFragmentBaseValueList(_this)); }, function (d, e) { return _this.ka(d, e, _this.yx(), runOn(_this, _this.zy), new SplineFragmentBaseValueList(_this)); });
    };
    SplineFragmentBase.prototype.ai = function () {
        return [this.yx(), this.ze()];
    };
    SplineFragmentBase.prototype.ado = function (a, b, c) {
        if (this.dc == null) {
            return NaN;
        }
        var d = this.getEffectiveViewport1(this.cw);
        var e = new ScalerParams(0, this.dc.wh, this.cw.b9, this.yx().ch, d);
        var f = this.y4.r(this.yx(), this.dc.wh, this.cw.b9, d);
        return this.i8(new SplineFragmentBaseValueList(this), a, this.yx(), e, f, runOn(this, this.zy), b, c);
    };
    SplineFragmentBase.prototype.j3 = function () {
        var a = this.parentSeries;
        if (a.index == -1 || a.aa5 == null || a.aa5.f.indexOf(this) == -1) {
            return -1;
        }
        return a.aa5.f.indexOf(this);
    };
    SplineFragmentBase.prototype.resolveLegendIndex = function () {
        var a = this.parentSeries;
        if (a.aa9) {
            return -1 + a.index + a.aa0.count - a.aa5.f.indexOf(this);
        }
        return _super.prototype.resolveLegendIndex.call(this);
    };
    SplineFragmentBase.prototype.j8 = function () {
        var a = this.parentSeries;
        if (a.index == -1 || a.series.count == 0 || a.series.indexOf(this.logicalSeriesLink) == -1) {
            return -1;
        }
        return a.series.indexOf(this.logicalSeriesLink);
    };
    SplineFragmentBase.prototype.bq = function () {
        return this.parentSeries;
    };
    SplineFragmentBase.prototype.ac6 = function (a, b, c, d, e, f, g) {
        var h = b[0];
        var i = b[1];
        var j = new Rect(0, h - 5, i - 5, 11, 11);
        if (!isNaN_(h) && !isNaN_(i) && !isInfinity(h) && !isInfinity(i) && c.tryAdd(j)) {
            a.p.add({ $type: Point_$type, x: h, y: i });
            var k = f.dc.item(e);
            k.content.item = this.dp.item(d);
            k.al = g;
            return true;
        }
        return false;
    };
    SplineFragmentBase.prototype.hf = function (a, b, c) {
        var d = _super.prototype.hf.call(this, a, b, c);
        var e = typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis());
        var f = this.parentSeries.fetchYAxis();
        if (this.parentSeries == null || e == null || e.itemsSource == null || f == null || this.parentSeries.dp == null || e.bi == null || f.bi == null) {
            d = false;
        }
        if (this.valueColumn == null) {
            return false;
        }
        if (isInfinity(this.valueColumn.minimum) && isInfinity(this.valueColumn.maximum)) {
            d = false;
        }
        if (isNaN_(this.valueColumn.minimum) && isNaN_(this.valueColumn.maximum)) {
            d = false;
        }
        return d;
    };
    SplineFragmentBase.prototype.ay = function (a) {
        return null;
    };
    SplineFragmentBase.prototype.adp = function (a, b, c, d, e, f) {
        var _this = this;
        var g = typeCast(ISortingAxis_$type, d);
        if (g == null) {
            return;
        }
        var h = this.getEffectiveViewport1(f);
        var i = new ScalerParams(0, b, c, d.ch, h);
        var j = new ScalerParams(0, b, c, e.ch, h);
        var k = d.eo(2, i) - d.eo(1, i);
        var l = this.xl();
        var m = 0;
        var n = this.ada(d, b, c, h);
        var o = function (p) { return Math.abs(_this.parentSeries.aax[p]) + _this.parentSeries.aaw[p]; };
        var p = function (q) { return q; };
        var q = function (r) {
            var s = g.i$b._inner[r];
            if (typeCast(IStacked100Series_$type, _this.parentSeries) !== null) {
                return _this.valueColumn.item(s) < 0 ? (_this.logicalSeriesLink.a8._inner[s] + _this.valueColumn.item(s)) / o(s) * 100 : (_this.logicalSeriesLink.a7._inner[s] + _this.valueColumn.item(s)) / o(s) * 100;
            }
            else {
                return _this.valueColumn.item(s) < 0 ? _this.logicalSeriesLink.a8._inner[s] + _this.valueColumn.item(s) : _this.logicalSeriesLink.a7._inner[s] + _this.valueColumn.item(s);
            }
        };
        var r = this.y8.c9.f;
        var s = this.y8.c9.e;
        var t = truncate(Math.ceil(c.width / (r - s)));
        var u = new CollisionAvoider();
        var v = this.y8.c9.d;
        if (v <= 0 || (s <= 0 && r <= 0)) {
            this.y8.dc.count = m;
            return;
        }
        var w = 0;
        for (var x = s; x < r + 1; ++x) {
            var y = null;
            var z = x * v;
            if (g != null && g.i$b != null && z >= 0 && z < g.i$b.count) {
                z = g.i$b._inner[z];
            }
            if (x >= (this.valueColumn.count - 1)) {
                if (l && this.ac6(a, a.h._inner[a.h.count - 1], u, Math.min(z, this.dp.count - 1), m, f, w - 1)) {
                    ++m;
                }
                break;
            }
            var aa = p(x);
            var ab = q(x);
            var ac = p(x + 1);
            var ad = q(x + 1);
            var ae = ac - aa;
            var af = this.ac2[x];
            var ag = this.ac2[x + 1];
            var ah = g.i$d(g.i$b._inner[x]);
            var ai = d.el(ah, i) + n;
            var aj = e.el(ab, j);
            a.h.add([ai, aj, aj]);
            w++;
            for (var ak = 1; ak < t; ++ak) {
                var al = ak / t;
                var am = aa + ae * al;
                var an = (ac - am) / ae;
                var ao = (am - aa) / ae;
                var ap = an * ab + ao * ad + ((an * an * an - an) * af + (ao * ao * ao - ao) * ag) * (ae * ae) / 6;
                var aq = g.i$d(g.i$b._inner[x]);
                var ar = g.i$d(g.i$b._inner[x + 1]);
                if (aq == ar && ab == ad) {
                    break;
                }
                var as = aq + (ar - aq) * al;
                am = d.el(as, i) + n;
                ap = e.el(ap, j);
                a.h.add([am, ap, ap]);
                w++;
            }
            if (l) {
                y = [ai, aj, aj];
            }
            if (l && this.ac6(a, y, u, Math.min(z, this.dp.count - 1), m, f, w - 1)) {
                ++m;
            }
        }
        this.y8.dc.count = m;
    };
    SplineFragmentBase.prototype.aam = function (a, b) {
        var _this = this;
        a.x();
        if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null) {
            return;
        }
        if (this.logicalSeriesLink.a8.count == 0 || this.logicalSeriesLink.a7.count == 0) {
            return;
        }
        if (this.y8.c9.d == 0) {
            return;
        }
        _super.prototype.aam.call(this, a, b);
        if (a.h.count <= 1) {
            return;
        }
        var c = b.ca;
        var d = b.b9;
        var e = this.getEffectiveViewport1(b);
        var f = typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis());
        var g = typeCast(NumericYAxis.$, this.parentSeries.fetchYAxis());
        var h = new ScalerParams(0, c, d, f.ch, e);
        var i = new ScalerParams(0, c, d, g.ch, e);
        a.h.clear();
        a.p.clear();
        var j = this.xl();
        var k = 0;
        var l;
        var m;
        if (b.s) {
            l = this.parentSeries.aay;
            m = this.parentSeries.ba.a$j.item(b.al);
        }
        else if (b == this.cv) {
            l = this.parentSeries.y2;
            m = typeCast(CategorySeriesView.$, this.parentSeries.cv);
        }
        else {
            l = this.parentSeries.yz;
            m = this.parentSeries.y8;
        }
        var n = m.c9.d;
        var o = typeCast(ISortingAxis_$type, f);
        if (o != null && o.i$b.count != this.dp.count) {
            return;
        }
        var p = this.preferredCategoryMode(f);
        if (p == 0 && f.categoryMode != 0) {
            p = 1;
        }
        var q = 0;
        switch (p) {
            case 0:
                q = 0;
                break;
            case 1:
                q = 0.5 * f.getCategorySize(c, d, e);
                break;
            case 2:
                var r = this.index;
                q = f.getGroupCenter(this.index, c, d, e);
                break;
        }
        if (f.ch) {
            q = -q;
        }
        var s = function (t) { return Math.abs(_this.parentSeries.aax[t]) + _this.parentSeries.aaw[t]; };
        var t = function (u) { return u; };
        var u = function (v) {
            var w = _this.valueColumn.item(v);
            if (isNaN_(w) || isInfinity(w)) {
                w = 0;
            }
            if (typeCast(IStacked100Series_$type, _this.parentSeries) !== null) {
                if (s(v) == 0) {
                    return 0;
                }
                return w < 0 ? (_this.logicalSeriesLink.a8._inner[v] + w) / s(v) * 100 : (_this.logicalSeriesLink.a7._inner[v] + w) / s(v) * 100;
            }
            return w < 0 ? _this.logicalSeriesLink.a8._inner[v] + w : _this.logicalSeriesLink.a7._inner[v] + w;
        };
        var v = b.c9.d;
        this.adf(b);
        var w = m.c9.e;
        var x = m.c9.f;
        var y = truncate(Math.ceil(d.width / (x - w)));
        var z = new CollisionAvoider();
        if (o != null) {
            this.adp(a, c, d, f, g, b);
            return;
        }
        var aa = 0;
        var ab = 0;
        for (var ac = w; ac < x + 1; ++ac) {
            if (ac >= this.valueColumn.count) {
                break;
            }
            var ad = null;
            if (v == 1) {
                if (ac >= (this.valueColumn.count - 1)) {
                    if (j && a.h.count > 0 && this.ac6(a, a.h._inner[a.h.count - 1], z, Math.min(ac * v, this.dp.count - 1), k, b, aa - 1)) {
                        ++k;
                    }
                    break;
                }
                var ae = t(ac);
                var af = t(ac + 1);
                var ag = u(ac);
                var ah = u(ac + 1);
                var ai = af - ae;
                var aj = this.ac2[ac];
                var ak = this.ac2[ac + 1];
                var al = f.el(ae, h) + q;
                var am = g.el(ag, i);
                a.h.add([al, am, am]);
                aa++;
                ab = aa;
                for (var an = 1; an < y; ++an) {
                    var ao = ae + ai * an / y;
                    var ap = (af - ao) / ai;
                    var aq = (ao - ae) / ai;
                    var ar = ap * ag + aq * ah + ((ap * ap * ap - ap) * aj + (aq * aq * aq - aq) * ak) * (ai * ai) / 6;
                    ao = f.el(ao, h) + q;
                    ar = g.el(ar, i);
                    a.h.add([ao, ar, ar]);
                    aa++;
                }
                if (j) {
                    ad = [al, am, am];
                }
            }
            else {
                ad = b.c9.getBucket(ac);
                if (!isNaN_(ad[0])) {
                    ad[0] = f.el(ad[0], h) + q;
                    ad[1] = g.el(ad[1], i);
                    ad[2] = g.el(ad[2], i);
                    a.h.add(ad);
                    aa++;
                    ab = aa;
                }
            }
            if (j && this.ac6(a, ad, z, Math.min(ac * v, this.dp.count - 1), k, b, ab - 1)) {
                ++k;
            }
        }
        b.dc.count = k;
    };
    SplineFragmentBase.prototype.ac0 = function (a) {
        var _this = this;
        var b = function (c) { return Math.abs(_this.parentSeries.aax[c]) + _this.parentSeries.aaw[c]; };
        var c = function (d) { return d; };
        var d = function (e) {
            var f = _this.valueColumn.item(e);
            if (isNaN_(f) || isInfinity(f)) {
                f = 0;
            }
            if (typeCast(IStacked100Series_$type, _this.parentSeries) !== null) {
                if (b(e) == 0) {
                    return 0;
                }
                return f < 0 ? (_this.logicalSeriesLink.a8._inner[e] + f) / b(e) * 100 : (_this.logicalSeriesLink.a7._inner[e] + f) / b(e) * 100;
            }
            return f < 0 ? _this.logicalSeriesLink.a8._inner[e] + f : _this.logicalSeriesLink.a7._inner[e] + f;
        };
        var e = new List$1(Array_$type, 0);
        var f = a.ca;
        var g = a.b9;
        var h = typeCast(ISortingAxis_$type, this.ach);
        var i = 0;
        var j = 0;
        var k = 0;
        var l = this.ie;
        var m = this.wo(this.cw);
        var n = this.ach;
        var o = this.getEffectiveViewport1(a);
        if (h == null || h.i$b == null) {
            var p = new ScalerParams(0, f, g, n.ch, o);
            var q = 0;
            var r = n.lk - 1;
            var s = Math.floor((r - q + 1) * l / m.width);
            i = truncate(Math.max(1, s));
            j = truncate(Math.max(0, Math.floor(q / i) - 1));
            k = truncate(Math.ceil(r / i));
        }
        else {
            j = 0;
            k = n.lk - 1;
            i = 1;
        }
        var t = truncate(Math.ceil(g.width / (k - j)));
        var u = new CollisionAvoider();
        if (h != null) {
            return this.ac1(a);
        }
        var v = 0;
        var w = 0;
        for (var x = j; x < k + 1; ++x) {
            if (x >= this.valueColumn.count) {
                break;
            }
            var y = null;
            if (i == 1) {
                if (x >= (this.valueColumn.count - 1)) {
                    break;
                }
                var z = c(x);
                var aa = c(x + 1);
                var ab = d(x);
                var ac = d(x + 1);
                var ad = aa - z;
                var ae = this.ac2[x];
                var af = this.ac2[x + 1];
                e.add([ab, ab]);
                for (var ag = 1; ag < t; ++ag) {
                    var ah = z + ad * ag / t;
                    var ai = (aa - ah) / ad;
                    var aj = (ah - z) / ad;
                    var ak = ai * ab + aj * ac + ((ai * ai * ai - ai) * ae + (aj * aj * aj - aj) * af) * (ad * ad) / 6;
                    e.add([ak, ak]);
                }
            }
            else {
                y = a.c9.getBucket(x);
                if (!isNaN_(y[0])) {
                    e.add([y[0], y[1]]);
                }
            }
        }
        return e.toArray();
    };
    SplineFragmentBase.prototype.ac1 = function (a) {
        var _this = this;
        var b = new List$1(Array_$type, 0);
        var c = a.ca;
        var d = a.b9;
        var e = this.ach;
        var f = typeCast(ISortingAxis_$type, e);
        if (f == null) {
            return null;
        }
        var g = this.getEffectiveViewport1(a);
        var h = this.xl();
        var i = 0;
        var j = function (k) { return Math.abs(_this.parentSeries.aax[k]) + _this.parentSeries.aaw[k]; };
        var k = function (l) { return l; };
        var l = function (m) {
            var n = f.i$b._inner[m];
            if (typeCast(IStacked100Series_$type, _this.parentSeries) !== null) {
                return _this.valueColumn.item(n) < 0 ? (_this.logicalSeriesLink.a8._inner[n] + _this.valueColumn.item(n)) / j(n) * 100 : (_this.logicalSeriesLink.a7._inner[n] + _this.valueColumn.item(n)) / j(n) * 100;
            }
            else {
                return _this.valueColumn.item(n) < 0 ? _this.logicalSeriesLink.a8._inner[n] + _this.valueColumn.item(n) : _this.logicalSeriesLink.a7._inner[n] + _this.valueColumn.item(n);
            }
        };
        var m = 0;
        var n = 0;
        var o = 0;
        var p = this.ie;
        var q = this.wo(this.cw);
        if (f == null || f.i$b == null) {
            var r = 0;
            var s = e.lk - 1;
            var t = Math.floor((s - r + 1) * p / q.width);
            m = truncate(Math.max(1, t));
            n = truncate(Math.max(0, Math.floor(r / m) - 1));
            o = truncate(Math.ceil(s / m));
        }
        else {
            n = 0;
            o = e.lk - 1;
            m = 1;
        }
        if (m <= 0 || (n <= 0 && o <= 0)) {
            this.y8.dc.count = i;
            return null;
        }
        var u = truncate(Math.ceil(d.width / (o - n)));
        var v = new CollisionAvoider();
        var w = 0;
        for (var x = n; x < o + 1; ++x) {
            var y = null;
            if (x >= (this.valueColumn.count - 1)) {
                break;
            }
            var z = k(x);
            var aa = l(x);
            var ab = k(x + 1);
            var ac = l(x + 1);
            var ad = ab - z;
            var ae = this.ac2[x];
            var af = this.ac2[x + 1];
            b.add([aa, aa]);
            for (var ag = 1; ag < u; ++ag) {
                var ah = ag / u;
                var ai = z + ad * ah;
                var aj = (ab - ai) / ad;
                var ak = (ai - z) / ad;
                var al = aj * aa + ak * ac + ((aj * aj * aj - aj) * ae + (ak * ak * ak - ak) * af) * (ad * ad) / 6;
                b.add([al, al]);
            }
        }
        return b.toArray();
    };
    SplineFragmentBase.prototype.adf = function (a) {
        var _this = this;
        _super.prototype.adf.call(this, a);
        var b = function (c) { return Math.abs(_this.parentSeries.aax[c]) + _this.parentSeries.aaw[c]; };
        var c = function (d) { return d; };
        var d = function (e) {
            var f = _this.valueColumn.item(e);
            if (isNaN_(f) || isInfinity(f)) {
                f = 0;
            }
            if (typeCast(IStacked100Series_$type, _this.parentSeries) !== null) {
                if (b(e) == 0) {
                    return 0;
                }
                return f < 0 ? (_this.logicalSeriesLink.a8._inner[e] + f) / b(e) * 100 : (_this.logicalSeriesLink.a7._inner[e] + f) / b(e) * 100;
            }
            return f < 0 ? _this.logicalSeriesLink.a8._inner[e] + f : _this.logicalSeriesLink.a7._inner[e] + f;
        };
        var e = this.ach;
        var f = this.ac4 == 0 ? NaN : 0;
        if (e != null && typeCast(ISortingAxis_$type, e) !== null && e.i$b != null) {
            var g_1 = new SafeSortedReadOnlyDoubleCollection(0, this.valueColumn, e.i$b);
            d = function (h) { return g_1.item(h); };
        }
        this.ac2 = Numeric.c(this.valueColumn.count, c, d, f, f);
        if (this.ac5) {
            var h = -1.7976931348623157E+308;
            var i = 1.7976931348623157E+308;
            var j = this.ac0(a);
            if (j == null) {
                return;
            }
            for (var k = 0; k < j.length; k++) {
                if (isNaN_(j[k][0]) || isNaN_(j[k][1])) {
                    continue;
                }
                if (j[k][1] > h) {
                    h = j[k][1];
                }
                if (j[k][0] < i) {
                    i = j[k][0];
                }
            }
            this.adc = i;
            this.adb = h;
        }
    };
    SplineFragmentBase.prototype.rc = function (a, b, c, d) {
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case "ActualBrush":
                if (this.logicalSeriesLink != null) {
                    this.logicalSeriesLink.ku = this.ve;
                }
                break;
        }
    };
    Object.defineProperty(SplineFragmentBase.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    SplineFragmentBase.$t = markType(SplineFragmentBase, 'SplineFragmentBase', SplineSeriesBase.$);
    return SplineFragmentBase;
}(SplineSeriesBase));
export { SplineFragmentBase };
/**
 * @hidden
 */
var SplineAreaFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaFragment, _super);
    function SplineAreaFragment() {
        var _this = _super.call(this) || this;
        _this.adu = null;
        _this.ab = SplineAreaFragment.$;
        return _this;
    }
    SplineAreaFragment.prototype.bk = function () {
        return new SplineAreaFragment();
    };
    SplineAreaFragment.prototype.ct = function () {
        return new SplineAreaFragmentView(this);
    };
    SplineAreaFragment.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.adq = typeCast(SplineAreaFragmentView.$, a);
    };
    SplineAreaFragment.prototype.ac = function () {
        _super.prototype.ac.call(this);
        this.ru(false);
    };
    SplineAreaFragment.prototype.get_ex = function () {
        return true;
    };
    SplineAreaFragment.prototype.get_ew = function () {
        return true;
    };
    SplineAreaFragment.prototype.get_f1 = function () {
        return true;
    };
    SplineAreaFragment.prototype.y9 = function () {
        return 1;
    };
    SplineAreaFragment.prototype.ads = function (a, b) {
        var c = this.adq.d1.an;
        if (this.gz(a, c)) {
            return true;
        }
        var d = this.adq.d2.an;
        if (this.gz(a, d)) {
            return true;
        }
        return false;
    };
    SplineAreaFragment.prototype.gx = function (a, b) {
        if (this.adr(a, b)) {
            return true;
        }
        if (this.ads(a, b)) {
            return true;
        }
        if (this.xm(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaFragment.prototype.adr = function (a, b) {
        var c = this.adq.d3.an;
        if (this.gy(a, b, c)) {
            return true;
        }
        var d = this.adq.d4.an;
        if (this.gy(a, b, d)) {
            return true;
        }
        return false;
    };
    SplineAreaFragment.prototype.o7 = function (a, b) {
        _super.prototype.o7.call(this, a, b);
        var c = b;
        c.dw();
    };
    SplineAreaFragment.prototype.aap = function (a, b) {
        var _this = this;
        _super.prototype.aap.call(this, a, b);
        this.adk.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false;
        var c = a.h;
        var d = this.getEffectiveViewport1(b);
        this.y7.a2(this, this.zr(), runOn(this, this.yr), this.z0(b), this.z1(b));
        var e = false;
        var f = this.y7.b;
        if (f != null) {
            e = true;
        }
        if (e) {
            var g = new ScalerParams(0, b.ca, b.b9, this.ach.ch, d);
            this.aal(c, -1, this.valueColumn.count, this.ach, g, b.t, -1);
        }
        var h = typeCast(SplineAreaFragmentView.$, b);
        var i = b.c9.d;
        this.y7.ad(h.d3, true, false, true, true);
        this.y7.ad(h.d4, true, false, true, true);
        this.y7.ad(h.d1, false, true, false, false);
        this.y7.ad(h.d2, false, true, false, false);
        h.d1._opacity = this.y7.j * this.ia;
        h.d2._opacity = 0.5 * this.y7.j * this.ia;
        this.adk.i(h.d1, h.d3, h.d2, h.d4, a.h.count, a.h, true, i, this.ie, function (j, k, l, m, n) { return _this.adt(j, a.h, b); }, 1);
    };
    SplineAreaFragment.prototype.rw = function (a, b) {
        _super.prototype.rw.call(this, a, b);
    };
    SplineAreaFragment.prototype.adt = function (a, b, c) {
        var d = this.abd(c);
        var e = d;
        var f = this.logicalSeriesLink.az;
        var g = f ? this.parentSeries.aa5.e : this.parentSeries.aa5.d;
        var h = g.indexOf(this);
        if (a.count == 0) {
            return;
        }
        if (h == -1) {
            return;
        }
        var i = false;
        for (var j = h; j >= 0; j--) {
            if (i) {
                break;
            }
            if (j == 0) {
                a.add({ $type: Point_$type, x: a._inner[a.count - 1].x, y: e });
                a.add({ $type: Point_$type, x: a._inner[0].x, y: e });
                break;
            }
            var k = typeCast(SplineFragmentBase.$, g._inner[j - 1]);
            if (k != null && k.adk != null && k.adk.o.count > 0 && this.cw != null && k.hf(this.cw.b9, this.cw.ca, this.cw)) {
                i = true;
                for (var l = k.adk.o.count - 1; l >= 0; l--) {
                    a.add(k.adk.o._inner[l]);
                }
            }
        }
    };
    SplineAreaFragment.prototype.abd = function (a) {
        var b = 0;
        var c = a.ca;
        var d = a.b9;
        var e = this.getEffectiveViewport1(a);
        var f = new ScalerParams(0, c, d, this.yAxis.ch, e);
        if (!c.isEmpty && !d.isEmpty && this.yAxis != null) {
            b = this.yAxis.el(0, f);
        }
        return b;
    };
    SplineAreaFragment.prototype.sh = function () {
        var a = (typeCast(XamDataChart.$, this.dc));
        if (a != null) {
            this.ia = isNaN_(this.il) ? this.parentSeries.ia : this.il;
        }
    };
    Object.defineProperty(SplineAreaFragment.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    SplineAreaFragment.$t = markType(SplineAreaFragment, 'SplineAreaFragment', SplineFragmentBase.$);
    return SplineAreaFragment;
}(SplineFragmentBase));
export { SplineAreaFragment };
/**
 * @hidden
 */
var SplineFragment = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineFragment, _super);
    function SplineFragment() {
        var _this = _super.call(this) || this;
        _this.ab = SplineFragment.$;
        return _this;
    }
    SplineFragment.prototype.bk = function () {
        return new SplineFragment();
    };
    SplineFragment.prototype.get_f1 = function () {
        return true;
    };
    SplineFragment.prototype.zt = function () {
        return true;
    };
    SplineFragment.prototype.ct = function () {
        return new SplineFragmentView(this);
    };
    SplineFragment.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.adq = a;
    };
    SplineFragment.prototype.ads = function (a, b) {
        var c = this.adq.d0.an;
        if (this.gz(a, c)) {
            return true;
        }
        return false;
    };
    SplineFragment.prototype.get_ex = function () {
        return true;
    };
    SplineFragment.prototype.gx = function (a, b) {
        if (this.adr(a, b)) {
            return true;
        }
        if (this.ads(a, b)) {
            return true;
        }
        if (this.xm(a, b)) {
            return true;
        }
        return false;
    };
    SplineFragment.prototype.adr = function (a, b) {
        var c = this.adq.d1.an;
        if (this.gy(a, b, c)) {
            return true;
        }
        var d = this.adq.d2.an;
        if (this.gy(a, b, d)) {
            return true;
        }
        return false;
    };
    SplineFragment.prototype.o7 = function (a, b) {
        _super.prototype.o7.call(this, a, b);
        var c = b;
        c.dw();
    };
    SplineFragment.prototype.aap = function (a, b) {
        _super.prototype.aap.call(this, a, b);
        this.adk.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false;
        var c = typeCast(SplineFragmentView.$, b);
        var d = a.h;
        var e = this.getEffectiveViewport1(b);
        this.y7.a2(this, this.zr(), runOn(this, this.yr), this.z0(b), this.z1(b));
        var f = false;
        var g = this.y7.b;
        if (g != null) {
            f = true;
        }
        if (f) {
            var h = new ScalerParams(0, b.ca, b.b9, this.ach.ch, e);
            this.aal(d, -1, this.valueColumn.count, this.ach, h, b.t, -1);
        }
        this.y7.ad(c.d1, true, false, true, false);
        this.y7.ad(c.d2, true, false, true, false);
        this.y7.ad(c.d0, false, true, false, false);
        c.d0._opacity = 0.75 * this.y7.j;
        var i = c.c9.d;
        this.adk.m(c.d1, c.d0, c.d2, a.h.count, a.h, true, 1, this.aax(a.h, a.h.count - 1, b.b9, b.ca), i, this.ie);
    };
    Object.defineProperty(SplineFragment.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    SplineFragment.$t = markType(SplineFragment, 'SplineFragment', SplineFragmentBase.$);
    return SplineFragment;
}(SplineFragmentBase));
export { SplineFragment };
/**
 * @hidden
 */
var SplineFragmentBaseValueList = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineFragmentBaseValueList, _super);
    function SplineFragmentBaseValueList(a) {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.a = a;
        return _this;
    }
    SplineFragmentBaseValueList.prototype.indexOf = function (a) {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.insert = function (a, b) {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.removeAt = function (a) {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.item = function (a, b) {
        if (arguments.length === 2) {
            throw new NotImplementedException(0);
            return b;
        }
        else {
            var b_2 = false;
            if (this.a.parentSeries != null) {
                b_2 = this.a.parentSeries.aa8;
            }
            var c = this.a.parentSeries;
            if (c == null) {
                return NaN;
            }
            var d = this.a.valueColumn.item(a);
            var e = Math.abs(c.aax[a]) + c.aaw[a];
            var f = this.a.logicalSeriesLink.a7;
            var g = this.a.logicalSeriesLink.a8;
            if (isNaN_(d) || isInfinity(d)) {
                d = 0;
            }
            if (b_2) {
                if (e == 0) {
                    d = 0;
                }
                else if (d < 0) {
                    d = (g._inner[a] + d) / e * 100;
                }
                else {
                    d = (f._inner[a] + d) / e * 100;
                }
            }
            else {
                d = d < 0 ? g._inner[a] + d : f._inner[a] + d;
            }
            return d;
        }
    };
    SplineFragmentBaseValueList.prototype.add = function (a) {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.clear = function () {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.contains = function (a) {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.copyTo = function (a, b) {
        throw new NotImplementedException(0);
    };
    Object.defineProperty(SplineFragmentBaseValueList.prototype, "count", {
        get: function () {
            return this.a.valueColumn.count;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineFragmentBaseValueList.prototype, "isReadOnly", {
        get: function () {
            throw new NotImplementedException(0);
        },
        enumerable: false,
        configurable: true
    });
    SplineFragmentBaseValueList.prototype.remove = function (a) {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.getEnumerator = function () {
        throw new NotImplementedException(0);
    };
    SplineFragmentBaseValueList.prototype.getEnumeratorObject = function () {
        return this.getEnumerator();
    };
    SplineFragmentBaseValueList.$t = markType(SplineFragmentBaseValueList, 'SplineFragmentBaseValueList', Base.$, [IList$1_$type.specialize(Number_$type)]);
    return SplineFragmentBaseValueList;
}(Base));
export { SplineFragmentBaseValueList };
/**
 * @hidden
 */
var StackedSeriesBase = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSeriesBase, _super);
    function StackedSeriesBase() {
        var _this = _super.call(this) || this;
        _this._series = null;
        _this.seriesCreated = null;
        _this.abg = 0;
        _this.abf = 0;
        _this.aaw = null;
        _this.aax = null;
        _this.aa4 = null;
        _this.aa1 = null;
        _this.abb = new Dictionary$2(String_$type, Boolean_$type, 0);
        _this.aay = null;
        _this.series = new StackedSeriesCollection();
        var a = _this.series;
        a.collectionResetting = delegateCombine(a.collectionResetting, runOn(_this, _this.abs));
        var b = _this.series;
        b.collectionChanged = delegateCombine(b.collectionChanged, runOn(_this, _this.abr));
        _this.y4 = new StackedSeriesFramePreparer(1, _this, _this.aa6, _this, _this, _this.aa6.c9);
        _this.aa1 = new StackedSeriesCollection();
        var c = _this.aa1;
        c.collectionChanged = delegateCombine(c.collectionChanged, runOn(_this, _this.abr));
        var d = _this.aa1;
        d.collectionResetting = delegateCombine(d.collectionResetting, runOn(_this, _this.abm));
        return _this;
    }
    StackedSeriesBase.prototype.qi = function () {
        var e_1, _a;
        try {
            for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var a = _c.value;
                a.gw();
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        _super.prototype.qi.call(this);
    };
    StackedSeriesBase.prototype.get_ff = function () {
        return false;
    };
    StackedSeriesBase.prototype.getHostReferenceValue = function () {
        return this.iz();
    };
    StackedSeriesBase.prototype.ct = function () {
        return new StackedSeriesView(this);
    };
    StackedSeriesBase.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.aa6 = a;
    };
    StackedSeriesBase.prototype.q4 = function (a, b) {
        var e_2, _a;
        _super.prototype.q4.call(this, a, b);
        try {
            for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                c.visualSeriesLink.cw.b9 = b;
            }
        }
        catch (e_2_1) {
            e_2 = { error: e_2_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_2)
                    throw e_2.error;
            }
        }
    };
    Object.defineProperty(StackedSeriesBase.prototype, "series", {
        get: function () {
            return this._series;
        },
        set: function (a) {
            this._series = a;
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesBase.prototype.kd = function () {
        if (this.series == null) {
            return -1;
        }
        return this.series.count;
    };
    StackedSeriesBase.prototype.p5 = function (a) {
        for (var b = 0; b < this.aa5.f.count; b++) {
            var c = this.aa5.f._inner[b];
            if (!a(c)) {
                break;
            }
        }
        _super.prototype.p5.call(this, a);
    };
    StackedSeriesBase.prototype.get_isStacked = function () {
        return true;
    };
    Object.defineProperty(StackedSeriesBase.prototype, "aa5", {
        get: function () {
            if (this.aa4 == null) {
                this.aa4 = new StackedSeriesManager(this);
            }
            return this.aa4;
        },
        set: function (a) {
            this.aa4 = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesBase.prototype, "aa0", {
        get: function () {
            return this.aa7 ? this.aa1 : this.series;
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesBase.prototype.abm = function (a, b) {
        var e_3, _a;
        try {
            for (var _b = __values(fromEnum(this.aa1)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                if (this.aa5 != null && this.aa5.c.contains(c)) {
                    c.parentSeries = null;
                    this.aa5.c.remove(c);
                }
            }
        }
        catch (e_3_1) {
            e_3 = { error: e_3_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_3)
                    throw e_3.error;
            }
        }
    };
    StackedSeriesBase.prototype.abs = function (a, b) {
        var e_4, _a;
        try {
            for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                if (this.aa5 != null && this.aa5.c.contains(c)) {
                    c.parentSeries = null;
                    this.aa5.c.remove(c);
                }
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
    };
    StackedSeriesBase.prototype.abr = function (a, b) {
        var e_5, _a, e_6, _b;
        if (b.oldItems != null) {
            try {
                for (var _c = __values(fromEn(b.oldItems)), _d = _c.next(); !_d.done; _d = _c.next()) {
                    var c = _d.value;
                    if (this.aa5 != null && this.aa5.c.contains(c)) {
                        c.parentSeries = null;
                        this.aa5.c.remove(c);
                    }
                }
            }
            catch (e_5_1) {
                e_5 = { error: e_5_1 };
            }
            finally {
                try {
                    if (_d && !_d.done && (_a = _c.return))
                        _a.call(_c);
                }
                finally {
                    if (e_5)
                        throw e_5.error;
                }
            }
        }
        if (b.newItems != null) {
            var d = b.newStartingIndex;
            try {
                for (var _e = __values(fromEn(b.newItems)), _f = _e.next(); !_f.done; _f = _e.next()) {
                    var e = _f.value;
                    if (this.aa5 != null && !this.aa5.c.contains(e)) {
                        e.parentSeries = this;
                        e.gc();
                        e.g3();
                        e.g4();
                        e.hi();
                        e.g5();
                        e.g6();
                        e.f4();
                        e.f5();
                        e.gb();
                        e.ga();
                        e.f6();
                        e.gd();
                        e.gj();
                        e.gk();
                        e.gl();
                        e.gu();
                        e.gw();
                        e.go();
                        e.gr();
                        e.gt();
                        e.gu();
                        e.gv();
                        e.gs();
                        e.gp();
                        e.hg();
                        e.hk();
                        e.hj();
                        e.f7();
                        e.f8();
                        e.gx();
                        e.gy();
                        e.gz();
                        e.f9();
                        e.f3();
                        e.g1();
                        e.g2();
                        e.gm();
                        e.g7();
                        e.gn();
                        e.g9();
                        e.gq();
                        e.g0();
                        e.ha();
                        e.hb();
                        e.gf();
                        e.hf();
                        e.hc();
                        e.he();
                        e.hh();
                        e.hm();
                        if (!this.aa7) {
                            this.aa5.c.insert(d, e);
                            d++;
                        }
                    }
                }
            }
            catch (e_6_1) {
                e_6 = { error: e_6_1 };
            }
            finally {
                try {
                    if (_f && !_f.done && (_b = _e.return))
                        _b.call(_e);
                }
                finally {
                    if (e_6)
                        throw e_6.error;
                }
            }
        }
        if (!this.aa7) {
            this.abt();
        }
    };
    StackedSeriesBase.prototype.sa = function (a) {
        this.da.c9.c8(a, true, false);
    };
    StackedSeriesBase.prototype.y5 = function (a) {
        if (a != null && a.t) {
            if (a.s) {
                return new StackedSeriesFramePreparer(1, typeCast(IIsCategoryBased_$type, this), typeCast(ISupportsMarkers_$type, a), a, this, a.c9);
            }
            else {
                var b = typeCast(CategorySeriesView.$, this.cv);
                return new StackedSeriesFramePreparer(1, this, typeCast(ISupportsMarkers_$type, b), this.dc.c9.o, this, b.c9);
            }
        }
        else {
            return this.y4;
        }
    };
    StackedSeriesBase.prototype.aam = function (a, b) {
        a.x();
        this.abp();
        this.y5(b).d(a, b);
    };
    StackedSeriesBase.prototype.rv = function (a) {
        _super.prototype.rv.call(this, a);
        this.aa5.i(a);
    };
    StackedSeriesBase.prototype.get_gu = function () {
        return false;
    };
    StackedSeriesBase.prototype.o7 = function (a, b) {
        var e_7, _a;
        _super.prototype.o7.call(this, a, b);
        try {
            for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                if (c.visualSeriesLink != null) {
                    c.visualSeriesLink.o7(a, c.visualSeriesLink.cw);
                }
            }
        }
        catch (e_7_1) {
            e_7 = { error: e_7_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_7)
                    throw e_7.error;
            }
        }
    };
    StackedSeriesBase.prototype.abn = function () {
        this.abp();
    };
    StackedSeriesBase.prototype.abt = function () {
        var a = this.fetchXAxis();
        if (a != null) {
            a.c2(true);
        }
        var b = this.fetchYAxis();
        if (b != null) {
            b.c2(true);
        }
    };
    StackedSeriesBase.prototype.get_aa8 = function () {
        return false;
    };
    Object.defineProperty(StackedSeriesBase.prototype, "aa8", {
        get: function () {
            return this.get_aa8();
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesBase.prototype.ge = function (a) {
        var b = this.dp != null ? this.dp.indexOf(a) : -1;
        var c = this.dc != null ? this.dc.wh : Rect.empty;
        c = c.copy();
        var d = this.cw.b9;
        var e = new Rect(0, 0, 0, 1, 1);
        var f = this.wq(this.cw);
        if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
            var g = this.fetchXAxis();
            if (g != null) {
                var h = new ScalerParams(0, e, e, g.ch, f);
                var i = g.el(b, h);
                if (i < c.left + 0.1 * c.width) {
                    i = i + 0.4 * c.width;
                }
                if (i > c.right - 0.1 * c.width) {
                    i = i - 0.4 * c.width;
                }
                c.x = i - 0.5 * c.width;
            }
            var j = this.fetchYAxis();
            if (j != null && this.aaw != null && b < this.aaw.length) {
                var k = new ScalerParams(0, e, e, j.ch, f);
                var l = j.el(this.aaw[b], k);
                var m = j.el(this.aax[b], k);
                if (!isNaN_(l) && !isNaN_(m)) {
                    var n = Math.abs(m - l);
                    if (c.height < n) {
                        c.height = n;
                        c.y = Math.min(m, l);
                    }
                    else {
                        if (m < c.top + 0.1 * c.height) {
                            m = m + 0.4 * c.height;
                        }
                        if (m > c.bottom - 0.1 * c.height) {
                            m = m - 0.4 * c.height;
                        }
                        c.y = m - 0.5 * c.height;
                    }
                }
            }
            this.c4.au(this.dc, c, true);
        }
        return b >= 0;
    };
    StackedSeriesBase.prototype.ay = function (a) {
        if (this.aax == null || this.aax.length == 0 || this.aaw == null || this.aaw.length == 0) {
            return null;
        }
        if (a == this.fetchXAxis()) {
            var b = Math.min(this.aax.length, this.aaw.length);
            return new AxisRange(0, b - 1);
        }
        if (a == this.fetchYAxis()) {
            return new AxisRange(this.abg, this.abf);
        }
        return null;
    };
    StackedSeriesBase.prototype.xl = function () {
        return false;
    };
    StackedSeriesBase.prototype.pd = function (a, b, c, d) {
        this.abp();
        this.zu();
        this.ru(true);
    };
    StackedSeriesBase.prototype.aaz = function () {
        return this.aa6;
    };
    StackedSeriesBase.prototype.abc = function () {
        var a = 0;
        var b = this.cw.ca;
        var c = this.cw.b9;
        var d = this.getEffectiveViewport1(this.cw);
        var e = typeCast(NumericYAxis.$, this.fetchYAxis());
        if (!b.isEmpty && !c.isEmpty && e != null) {
            var f = new ScalerParams(0, b, c, e.ch, d);
            a = e.el(e.me, f);
        }
        return a;
    };
    StackedSeriesBase.prototype.abd = function () {
        var a = typeCast(NumericYAxis.$, this.fetchYAxis());
        if (a != null) {
            return a.me;
        }
        return 0;
    };
    StackedSeriesBase.prototype.abi = function (a) {
        return this.index < 0 || this.aa0 == null || this.aa0.count == 0 ? -1 : this.index + this.aa0.indexOf(a);
    };
    StackedSeriesBase.prototype.abh = function (a) {
        var b = this.dc != null ? this.dc.wh : Rect.empty;
        var c = this.cw.b9;
        var d = this.getEffectiveViewport1(this.cw);
        var e = typeCast(CategoryAxisBase.$, this.fetchXAxis());
        var f = -1;
        if (e != null && !b.isEmpty && !c.isEmpty) {
            var g = new ScalerParams(0, b, c, e.ch, d);
            var h = this.wo(this.cw);
            var i = e.eo(h.left, g);
            var j = e.eo(h.right, g);
            var k = (a.x - b.left) / b.width;
            var l = i + (k * (j - i));
            if (e.categoryMode != 0) {
                l -= 0.5;
            }
            var m = truncate(Math.round(l));
            f = m;
        }
        return f;
    };
    StackedSeriesBase.prototype.aba = function (a, b, c, d) {
        var e = true;
        var f = typeCast(CategoryAxisBase.$, this.fetchXAxis());
        var g = typeCast(NumericYAxis.$, this.fetchYAxis());
        if (!d.r() || c.isEmpty || b.isEmpty || f == null || f.itemsSource == null || g == null || this.dp == null || f.bi == null || g.bi == null || g.l4 == g.l3) {
            e = false;
        }
        var h = d;
        var i = h.c9.d;
        if (a.valueColumn == null || a.valueColumn.count == 0 || i < 1 || a._visibility != 0) {
            e = false;
        }
        return e;
    };
    StackedSeriesBase.prototype.abo = function () {
        var e_8, _a;
        if (this.dc == null || this.aa5 == null) {
            return;
        }
        if (!this.aa7) {
            this.aa1.clear();
            try {
                for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var a = _c.value;
                    if (!this.aa5.c.contains(a)) {
                        this.aa5.c.add(a);
                    }
                }
            }
            catch (e_8_1) {
                e_8 = { error: e_8_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_8)
                        throw e_8.error;
                }
            }
            this.abt();
            return;
        }
    };
    StackedSeriesBase.prototype.aap = function (a, b) {
        _super.prototype.aap.call(this, a, b);
    };
    StackedSeriesBase.prototype.abq = function (a, b, c, d) {
    };
    StackedSeriesBase.prototype.az = function (a) {
        if (a.isEmpty && this.dc != null) {
            a = this.dc.wh;
        }
        var b = this.yx();
        if (this.aaw == null || this.aax == null) {
            return null;
        }
        var c = this.wo(this.cw);
        var d = new ScalerParams(0, a, this.dc.wz, b.ch, this.getEffectiveViewport());
        var e = (b.eo(c.left, d));
        var f = (b.eo(c.right, d));
        if (b.ch) {
            var g = e;
            e = f;
            f = g;
        }
        var h = null;
        if (b.cn) {
            h = b;
            e = h.i$f(e);
            f = h.i$f(f);
        }
        else {
            e = Math.floor(e);
            f = Math.ceil(f);
        }
        e = Math.max(0, Math.min(this.aax.length - 1, e));
        f = Math.max(0, Math.min(this.aax.length - 1, f));
        var i = 1.7976931348623157E+308;
        var j = -1.7976931348623157E+308;
        for (var k = truncate(e); k <= truncate(f); k++) {
            var l = k;
            if (h != null) {
                l = h.i$b._inner[k];
            }
            var m = this.aax[l];
            if (isInfinity(m) || isNaN_(m)) {
                continue;
            }
            var n = this.aaw[l];
            if (isInfinity(n) || isNaN_(n)) {
                continue;
            }
            i = Math.min(i, m);
            j = Math.max(j, n);
        }
        var o = new AxisRange(i, j);
        var p = this.ze();
        o = this.ax(o, p, a);
        return o;
    };
    StackedSeriesBase.prototype.rz = function () {
        var e_9, _a;
        _super.prototype.rz.call(this);
        try {
            for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var a = _c.value;
                a.f1();
            }
        }
        catch (e_9_1) {
            e_9 = { error: e_9_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_9)
                    throw e_9.error;
            }
        }
    };
    StackedSeriesBase.prototype.abp = function () {
        var e_10, _a;
        if (this.dp == null) {
            return;
        }
        var a = this.dp.count;
        this.aaw = new Array(a);
        this.aax = new Array(a);
        for (var b = 0; b < a; b++) {
            this.aaw[b] = 0;
            this.aax[b] = 0;
        }
        this.abg = Number.POSITIVE_INFINITY;
        this.abf = Number.NEGATIVE_INFINITY;
        var c = 0;
        try {
            for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                if (d.itemsSource != null && d.visualSeriesLink == null) {
                    continue;
                }
                if (d.itemsSource != null) {
                    d.ak = d.visualSeriesLink.valueColumn;
                }
                if (d.itemsSource == null) {
                    this.dp.deregisterColumn(d.ak);
                    d.ak = this.dl(d.ft);
                }
                if (d.visualSeriesLink != null && d.itemsSource == null) {
                    d.visualSeriesLink.aba = true;
                    d.visualSeriesLink.valueColumn = d.ak;
                    d.visualSeriesLink.aba = false;
                }
                d.az = true;
                if (d.ak != null) {
                    d.a7.clear();
                    d.a8.clear();
                    for (var e = 0; e < d.ak.count; e++) {
                        var f = d.ak.item(e);
                        if (f < c) {
                            d.a7.add(c);
                            d.a8.add(this.aax[e]);
                            this.aax[e] = this.aax[e] + f;
                            if (d.az) {
                                d.az = false;
                            }
                        }
                        else if (f >= c) {
                            d.a7.add(this.aaw[e]);
                            d.a8.add(c);
                            this.aaw[e] = this.aaw[e] + f;
                        }
                        else if (isNaN_(f) || isInfinity(f)) {
                            d.a7.add(this.aaw[e]);
                            d.a8.add(this.aax[e]);
                        }
                    }
                }
            }
        }
        catch (e_10_1) {
            e_10 = { error: e_10_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_10)
                    throw e_10.error;
            }
        }
        for (var g = 0; g < a; g++) {
            this.abg = Math.min(this.abg, this.aax[g]);
            this.abf = Math.max(this.abf, this.aaw[g]);
        }
    };
    StackedSeriesBase.prototype.rc = function (a, b, c, d) {
        var e_11, _a, e_12, _b, e_13, _c, e_14, _d, e_15, _e, e_16, _f, e_17, _g, e_18, _h, e_19, _j, e_20, _k, e_21, _l, e_22, _m, e_23, _o, e_24, _p, e_25, _q, e_26, _r, e_27, _s, e_28, _t, e_29, _u, e_30, _v, e_31, _w, e_32, _x, e_33, _y, e_34, _z, e_35, _0, e_36, _1, e_37, _2, e_38, _3, e_39, _4, e_40, _5, e_41, _6, e_42, _7, e_43, _8, e_44, _9, e_45, _10, e_46, _11, e_47, _12, e_48, _13, e_49, _14, e_50, _15, e_51, _16, e_52, _17, e_53, _18, e_54, _19, e_55, _20, e_56, _21, e_57, _22, e_58, _23;
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case "SeriesViewer":
                if (c != null && d == null) {
                    this.pe(this.fetchXAxis());
                    this.pe(this.fetchYAxis());
                }
                if (c == null && d != null) {
                    this.rk(this.fetchXAxis());
                    this.rk(this.fetchYAxis());
                }
                if (this.aa0 != null) {
                    try {
                        for (var _24 = __values(fromEnum(this.aa0)), _25 = _24.next(); !_25.done; _25 = _24.next()) {
                            var e = _25.value;
                            e.af = this.dc;
                            if (e.visualSeriesLink != null) {
                                e.visualSeriesLink.dc = this.dc;
                            }
                        }
                    }
                    catch (e_11_1) {
                        e_11 = { error: e_11_1 };
                    }
                    finally {
                        try {
                            if (_25 && !_25.done && (_a = _24.return))
                                _a.call(_24);
                        }
                        finally {
                            if (e_11)
                                throw e_11.error;
                        }
                    }
                    this.ru(false);
                }
                break;
            case "ItemsSource":
                if (this.aa0 != null) {
                    try {
                        for (var _26 = __values(fromEnum(this.aa0)), _27 = _26.next(); !_27.done; _27 = _26.next()) {
                            var f = _27.value;
                            if (f.itemsSource == null) {
                                if (f.visualSeriesLink != null) {
                                    f.visualSeriesLink.itemsSource = d;
                                }
                            }
                        }
                    }
                    catch (e_12_1) {
                        e_12 = { error: e_12_1 };
                    }
                    finally {
                        try {
                            if (_27 && !_27.done && (_b = _26.return))
                                _b.call(_26);
                        }
                        finally {
                            if (e_12)
                                throw e_12.error;
                        }
                    }
                }
                break;
            case "HighlightedItemsSource":
                if (this.aa0 != null) {
                    try {
                        for (var _28 = __values(fromEnum(this.aa0)), _29 = _28.next(); !_29.done; _29 = _28.next()) {
                            var g = _29.value;
                            if (g.highlightedItemsSource == null) {
                                if (g.visualSeriesLink != null) {
                                    g.visualSeriesLink.highlightedItemsSource = d;
                                }
                            }
                        }
                    }
                    catch (e_13_1) {
                        e_13 = { error: e_13_1 };
                    }
                    finally {
                        try {
                            if (_29 && !_29.done && (_c = _28.return))
                                _c.call(_28);
                        }
                        finally {
                            if (e_13)
                                throw e_13.error;
                        }
                    }
                }
                break;
            case "FastItemsSource":
                if (this.aa7) {
                    this.abo();
                }
                if (!this.zu()) {
                    this.aa6.c9.g(this.ie);
                }
                this.ru(this.gh && c != null);
                break;
            case StackedSeriesBase.$$p[0]:
                this.abo();
                break;
            case StackedSeriesBase.$$p[1]:
                if (this.dc != null) {
                    this.dc.po(this.aa5.f);
                }
                break;
            case StackedSeriesBase.$$p[2]:
                try {
                    for (var _30 = __values(fromEnum(this.aa0)), _31 = _30.next(); !_31.done; _31 = _30.next()) {
                        var h = _31.value;
                        h.hm();
                    }
                }
                catch (e_14_1) {
                    e_14 = { error: e_14_1 };
                }
                finally {
                    try {
                        if (_31 && !_31.done && (_d = _30.return))
                            _d.call(_30);
                    }
                    finally {
                        if (e_14)
                            throw e_14.error;
                    }
                }
                break;
            case "Brush":
                try {
                    for (var _32 = __values(fromEnum(this.aa0)), _33 = _32.next(); !_33.done; _33 = _32.next()) {
                        var i = _33.value;
                        i.f4();
                    }
                }
                catch (e_15_1) {
                    e_15 = { error: e_15_1 };
                }
                finally {
                    try {
                        if (_33 && !_33.done && (_e = _32.return))
                            _e.call(_32);
                    }
                    finally {
                        if (e_15)
                            throw e_15.error;
                    }
                }
                break;
            case "DashArray":
                try {
                    for (var _34 = __values(fromEnum(this.aa0)), _35 = _34.next(); !_35.done; _35 = _34.next()) {
                        var j = _35.value;
                        j.f5();
                    }
                }
                catch (e_16_1) {
                    e_16 = { error: e_16_1 };
                }
                finally {
                    try {
                        if (_35 && !_35.done && (_f = _34.return))
                            _f.call(_34);
                    }
                    finally {
                        if (e_16)
                            throw e_16.error;
                    }
                }
                break;
            case "HighlightingFadeOpacity":
                try {
                    for (var _36 = __values(fromEnum(this.aa0)), _37 = _36.next(); !_37.done; _37 = _36.next()) {
                        var k = _37.value;
                        k.gb();
                    }
                }
                catch (e_17_1) {
                    e_17 = { error: e_17_1 };
                }
                finally {
                    try {
                        if (_37 && !_37.done && (_g = _36.return))
                            _g.call(_36);
                    }
                    finally {
                        if (e_17)
                            throw e_17.error;
                    }
                }
                break;
            case "HighlightedValuesDisplayMode":
                try {
                    for (var _38 = __values(fromEnum(this.aa0)), _39 = _38.next(); !_39.done; _39 = _38.next()) {
                        var l = _39.value;
                        l.ga();
                    }
                }
                catch (e_18_1) {
                    e_18 = { error: e_18_1 };
                }
                finally {
                    try {
                        if (_39 && !_39.done && (_h = _38.return))
                            _h.call(_38);
                    }
                    finally {
                        if (e_18)
                            throw e_18.error;
                    }
                }
                break;
            case "DashCap":
                try {
                    for (var _40 = __values(fromEnum(this.aa0)), _41 = _40.next(); !_41.done; _41 = _40.next()) {
                        var m = _41.value;
                        m.f6();
                    }
                }
                catch (e_19_1) {
                    e_19 = { error: e_19_1 };
                }
                finally {
                    try {
                        if (_41 && !_41.done && (_j = _40.return))
                            _j.call(_40);
                    }
                    finally {
                        if (e_19)
                            throw e_19.error;
                    }
                }
                break;
            case "IsDropShadowEnabled":
                try {
                    for (var _42 = __values(fromEnum(this.aa0)), _43 = _42.next(); !_43.done; _43 = _42.next()) {
                        var n = _43.value;
                        n.gc();
                    }
                }
                catch (e_20_1) {
                    e_20 = { error: e_20_1 };
                }
                finally {
                    try {
                        if (_43 && !_43.done && (_k = _42.return))
                            _k.call(_42);
                    }
                    finally {
                        if (e_20)
                            throw e_20.error;
                    }
                }
                break;
            case "ShadowBlur":
                try {
                    for (var _44 = __values(fromEnum(this.aa0)), _45 = _44.next(); !_45.done; _45 = _44.next()) {
                        var o = _45.value;
                        o.g3();
                    }
                }
                catch (e_21_1) {
                    e_21 = { error: e_21_1 };
                }
                finally {
                    try {
                        if (_45 && !_45.done && (_l = _44.return))
                            _l.call(_44);
                    }
                    finally {
                        if (e_21)
                            throw e_21.error;
                    }
                }
                break;
            case "ShadowColor":
                try {
                    for (var _46 = __values(fromEnum(this.aa0)), _47 = _46.next(); !_47.done; _47 = _46.next()) {
                        var p = _47.value;
                        p.g4();
                    }
                }
                catch (e_22_1) {
                    e_22 = { error: e_22_1 };
                }
                finally {
                    try {
                        if (_47 && !_47.done && (_m = _46.return))
                            _m.call(_46);
                    }
                    finally {
                        if (e_22)
                            throw e_22.error;
                    }
                }
                break;
            case "UseSingleShadow":
                try {
                    for (var _48 = __values(fromEnum(this.aa0)), _49 = _48.next(); !_49.done; _49 = _48.next()) {
                        var q = _49.value;
                        q.hi();
                    }
                }
                catch (e_23_1) {
                    e_23 = { error: e_23_1 };
                }
                finally {
                    try {
                        if (_49 && !_49.done && (_o = _48.return))
                            _o.call(_48);
                    }
                    finally {
                        if (e_23)
                            throw e_23.error;
                    }
                }
                break;
            case "ShadowOffsetX":
                try {
                    for (var _50 = __values(fromEnum(this.aa0)), _51 = _50.next(); !_51.done; _51 = _50.next()) {
                        var r = _51.value;
                        r.g5();
                    }
                }
                catch (e_24_1) {
                    e_24 = { error: e_24_1 };
                }
                finally {
                    try {
                        if (_51 && !_51.done && (_p = _50.return))
                            _p.call(_50);
                    }
                    finally {
                        if (e_24)
                            throw e_24.error;
                    }
                }
                break;
            case "ShadowOffsetY":
                try {
                    for (var _52 = __values(fromEnum(this.aa0)), _53 = _52.next(); !_53.done; _53 = _52.next()) {
                        var s = _53.value;
                        s.g6();
                    }
                }
                catch (e_25_1) {
                    e_25 = { error: e_25_1 };
                }
                finally {
                    try {
                        if (_53 && !_53.done && (_q = _52.return))
                            _q.call(_52);
                    }
                    finally {
                        if (e_25)
                            throw e_25.error;
                    }
                }
                break;
            case "IsHitTestVisible":
                try {
                    for (var _54 = __values(fromEnum(this.aa0)), _55 = _54.next(); !_55.done; _55 = _54.next()) {
                        var t = _55.value;
                        t.gd();
                    }
                }
                catch (e_26_1) {
                    e_26 = { error: e_26_1 };
                }
                finally {
                    try {
                        if (_55 && !_55.done && (_r = _54.return))
                            _r.call(_54);
                    }
                    finally {
                        if (e_26)
                            throw e_26.error;
                    }
                }
                break;
            case "LegendItemBadgeTemplate":
                try {
                    for (var _56 = __values(fromEnum(this.aa0)), _57 = _56.next(); !_57.done; _57 = _56.next()) {
                        var u = _57.value;
                        u.gj();
                    }
                }
                catch (e_27_1) {
                    e_27 = { error: e_27_1 };
                }
                finally {
                    try {
                        if (_57 && !_57.done && (_s = _56.return))
                            _s.call(_56);
                    }
                    finally {
                        if (e_27)
                            throw e_27.error;
                    }
                }
                break;
            case "LegendItemTemplate":
                try {
                    for (var _58 = __values(fromEnum(this.aa0)), _59 = _58.next(); !_59.done; _59 = _58.next()) {
                        var v = _59.value;
                        v.gk();
                    }
                }
                catch (e_28_1) {
                    e_28 = { error: e_28_1 };
                }
                finally {
                    try {
                        if (_59 && !_59.done && (_t = _58.return))
                            _t.call(_58);
                    }
                    finally {
                        if (e_28)
                            throw e_28.error;
                    }
                }
                break;
            case "LegendItemVisibility":
                try {
                    for (var _60 = __values(fromEnum(this.aa0)), _61 = _60.next(); !_61.done; _61 = _60.next()) {
                        var w = _61.value;
                        w.gl();
                    }
                }
                catch (e_29_1) {
                    e_29 = { error: e_29_1 };
                }
                finally {
                    try {
                        if (_61 && !_61.done && (_u = _60.return))
                            _u.call(_60);
                    }
                    finally {
                        if (e_29)
                            throw e_29.error;
                    }
                }
                break;
            case "LegendItemBadgeShape":
                try {
                    for (var _62 = __values(fromEnum(this.aa0)), _63 = _62.next(); !_63.done; _63 = _62.next()) {
                        var x = _63.value;
                        x.gi();
                    }
                }
                catch (e_30_1) {
                    e_30 = { error: e_30_1 };
                }
                finally {
                    try {
                        if (_63 && !_63.done && (_v = _62.return))
                            _v.call(_62);
                    }
                    finally {
                        if (e_30)
                            throw e_30.error;
                    }
                }
                break;
            case "LegendItemBadgeMode":
                try {
                    for (var _64 = __values(fromEnum(this.aa0)), _65 = _64.next(); !_65.done; _65 = _64.next()) {
                        var y = _65.value;
                        y.gh();
                    }
                }
                catch (e_31_1) {
                    e_31 = { error: e_31_1 };
                }
                finally {
                    try {
                        if (_65 && !_65.done && (_w = _64.return))
                            _w.call(_64);
                    }
                    finally {
                        if (e_31)
                            throw e_31.error;
                    }
                }
                break;
            case "MarkerTemplate":
                try {
                    for (var _66 = __values(fromEnum(this.aa0)), _67 = _66.next(); !_67.done; _67 = _66.next()) {
                        var z = _67.value;
                        z.gu();
                    }
                }
                catch (e_32_1) {
                    e_32 = { error: e_32_1 };
                }
                finally {
                    try {
                        if (_67 && !_67.done && (_x = _66.return))
                            _x.call(_66);
                    }
                    finally {
                        if (e_32)
                            throw e_32.error;
                    }
                }
                break;
            case "MarkerType":
                try {
                    for (var _68 = __values(fromEnum(this.aa0)), _69 = _68.next(); !_69.done; _69 = _68.next()) {
                        var aa = _69.value;
                        aa.gw();
                    }
                }
                catch (e_33_1) {
                    e_33 = { error: e_33_1 };
                }
                finally {
                    try {
                        if (_69 && !_69.done && (_y = _68.return))
                            _y.call(_68);
                    }
                    finally {
                        if (e_33)
                            throw e_33.error;
                    }
                }
                break;
            case "MarkerThickness":
                try {
                    for (var _70 = __values(fromEnum(this.aa0)), _71 = _70.next(); !_71.done; _71 = _70.next()) {
                        var ab = _71.value;
                        ab.gv();
                    }
                }
                catch (e_34_1) {
                    e_34 = { error: e_34_1 };
                }
                finally {
                    try {
                        if (_71 && !_71.done && (_z = _70.return))
                            _z.call(_70);
                    }
                    finally {
                        if (e_34)
                            throw e_34.error;
                    }
                }
                break;
            case "MarkerBrush":
                try {
                    for (var _72 = __values(fromEnum(this.aa0)), _73 = _72.next(); !_73.done; _73 = _72.next()) {
                        var ac = _73.value;
                        ac.go();
                    }
                }
                catch (e_35_1) {
                    e_35 = { error: e_35_1 };
                }
                finally {
                    try {
                        if (_73 && !_73.done && (_0 = _72.return))
                            _0.call(_72);
                    }
                    finally {
                        if (e_35)
                            throw e_35.error;
                    }
                }
                break;
            case "MarkerOutline":
                try {
                    for (var _74 = __values(fromEnum(this.aa0)), _75 = _74.next(); !_75.done; _75 = _74.next()) {
                        var ad = _75.value;
                        ad.gr();
                    }
                }
                catch (e_36_1) {
                    e_36 = { error: e_36_1 };
                }
                finally {
                    try {
                        if (_75 && !_75.done && (_1 = _74.return))
                            _1.call(_74);
                    }
                    finally {
                        if (e_36)
                            throw e_36.error;
                    }
                }
                break;
            case "MarkerOutlineMode":
                try {
                    for (var _76 = __values(fromEnum(this.aa0)), _77 = _76.next(); !_77.done; _77 = _76.next()) {
                        var ae = _77.value;
                        ae.gs();
                    }
                }
                catch (e_37_1) {
                    e_37 = { error: e_37_1 };
                }
                finally {
                    try {
                        if (_77 && !_77.done && (_2 = _76.return))
                            _2.call(_76);
                    }
                    finally {
                        if (e_37)
                            throw e_37.error;
                    }
                }
                break;
            case "MarkerFillMode":
                try {
                    for (var _78 = __values(fromEnum(this.aa0)), _79 = _78.next(); !_79.done; _79 = _78.next()) {
                        var af = _79.value;
                        af.gp();
                    }
                }
                catch (e_38_1) {
                    e_38 = { error: e_38_1 };
                }
                finally {
                    try {
                        if (_79 && !_79.done && (_3 = _78.return))
                            _3.call(_78);
                    }
                    finally {
                        if (e_38)
                            throw e_38.error;
                    }
                }
                break;
            case "MarkerStyle":
                try {
                    for (var _80 = __values(fromEnum(this.aa0)), _81 = _80.next(); !_81.done; _81 = _80.next()) {
                        var ag = _81.value;
                        ag.gt();
                    }
                }
                catch (e_39_1) {
                    e_39 = { error: e_39_1 };
                }
                finally {
                    try {
                        if (_81 && !_81.done && (_4 = _80.return))
                            _4.call(_80);
                    }
                    finally {
                        if (e_39)
                            throw e_39.error;
                    }
                }
                break;
            case "Opacity":
                try {
                    for (var _82 = __values(fromEnum(this.aa0)), _83 = _82.next(); !_83.done; _83 = _82.next()) {
                        var ah = _83.value;
                        ah.gx();
                    }
                }
                catch (e_40_1) {
                    e_40 = { error: e_40_1 };
                }
                finally {
                    try {
                        if (_83 && !_83.done && (_5 = _82.return))
                            _5.call(_82);
                    }
                    finally {
                        if (e_40)
                            throw e_40.error;
                    }
                }
                break;
            case "OpacityMask":
                try {
                    for (var _84 = __values(fromEnum(this.aa0)), _85 = _84.next(); !_85.done; _85 = _84.next()) {
                        var ai = _85.value;
                        ai.gy();
                    }
                }
                catch (e_41_1) {
                    e_41 = { error: e_41_1 };
                }
                finally {
                    try {
                        if (_85 && !_85.done && (_6 = _84.return))
                            _6.call(_84);
                    }
                    finally {
                        if (e_41)
                            throw e_41.error;
                    }
                }
                break;
            case "AreaFillOpacity":
                try {
                    for (var _86 = __values(fromEnum(this.aa0)), _87 = _86.next(); !_87.done; _87 = _86.next()) {
                        var aj = _87.value;
                        aj.f3();
                    }
                }
                catch (e_42_1) {
                    e_42 = { error: e_42_1 };
                }
                finally {
                    try {
                        if (_87 && !_87.done && (_7 = _86.return))
                            _7.call(_86);
                    }
                    finally {
                        if (e_42)
                            throw e_42.error;
                    }
                }
                break;
            case "Outline":
                try {
                    for (var _88 = __values(fromEnum(this.aa0)), _89 = _88.next(); !_89.done; _89 = _88.next()) {
                        var ak = _89.value;
                        ak.gz();
                    }
                }
                catch (e_43_1) {
                    e_43 = { error: e_43_1 };
                }
                finally {
                    try {
                        if (_89 && !_89.done && (_8 = _88.return))
                            _8.call(_88);
                    }
                    finally {
                        if (e_43)
                            throw e_43.error;
                    }
                }
                break;
            case "LineCap":
                try {
                    for (var _90 = __values(fromEnum(this.aa0)), _91 = _90.next(); !_91.done; _91 = _90.next()) {
                        var al = _91.value;
                        al.gm();
                    }
                }
                catch (e_44_1) {
                    e_44 = { error: e_44_1 };
                }
                finally {
                    try {
                        if (_91 && !_91.done && (_9 = _90.return))
                            _9.call(_90);
                    }
                    finally {
                        if (e_44)
                            throw e_44.error;
                    }
                }
                break;
            case "OutlineMode":
                try {
                    for (var _92 = __values(fromEnum(this.aa0)), _93 = _92.next(); !_93.done; _93 = _92.next()) {
                        var am = _93.value;
                        am.g0();
                    }
                }
                catch (e_45_1) {
                    e_45 = { error: e_45_1 };
                }
                finally {
                    try {
                        if (_93 && !_93.done && (_10 = _92.return))
                            _10.call(_92);
                    }
                    finally {
                        if (e_45)
                            throw e_45.error;
                    }
                }
                break;
            case "MarkerFillOpacity":
                try {
                    for (var _94 = __values(fromEnum(this.aa0)), _95 = _94.next(); !_95.done; _95 = _94.next()) {
                        var an = _95.value;
                        an.gq();
                    }
                }
                catch (e_46_1) {
                    e_46 = { error: e_46_1 };
                }
                finally {
                    try {
                        if (_95 && !_95.done && (_11 = _94.return))
                            _11.call(_94);
                    }
                    finally {
                        if (e_46)
                            throw e_46.error;
                    }
                }
                break;
            case "Thickness":
                try {
                    for (var _96 = __values(fromEnum(this.aa0)), _97 = _96.next(); !_97.done; _97 = _96.next()) {
                        var ao = _97.value;
                        ao.g7();
                    }
                }
                catch (e_47_1) {
                    e_47 = { error: e_47_1 };
                }
                finally {
                    try {
                        if (_97 && !_97.done && (_12 = _96.return))
                            _12.call(_96);
                    }
                    finally {
                        if (e_47)
                            throw e_47.error;
                    }
                }
                break;
            case "LineJoin":
                try {
                    for (var _98 = __values(fromEnum(this.aa0)), _99 = _98.next(); !_99.done; _99 = _98.next()) {
                        var ap = _99.value;
                        ap.gn();
                    }
                }
                catch (e_48_1) {
                    e_48 = { error: e_48_1 };
                }
                finally {
                    try {
                        if (_99 && !_99.done && (_13 = _98.return))
                            _13.call(_98);
                    }
                    finally {
                        if (e_48)
                            throw e_48.error;
                    }
                }
                break;
            case "ToolTip":
                try {
                    for (var _100 = __values(fromEnum(this.aa0)), _101 = _100.next(); !_101.done; _101 = _100.next()) {
                        var aq = _101.value;
                        aq.g9();
                    }
                }
                catch (e_49_1) {
                    e_49 = { error: e_49_1 };
                }
                finally {
                    try {
                        if (_101 && !_101.done && (_14 = _100.return))
                            _14.call(_100);
                    }
                    finally {
                        if (e_49)
                            throw e_49.error;
                    }
                }
                break;
            case "TransitionEasingFunction":
                try {
                    for (var _102 = __values(fromEnum(this.aa0)), _103 = _102.next(); !_103.done; _103 = _102.next()) {
                        var ar = _103.value;
                        ar.hb();
                    }
                }
                catch (e_50_1) {
                    e_50 = { error: e_50_1 };
                }
                finally {
                    try {
                        if (_103 && !_103.done && (_15 = _102.return))
                            _15.call(_102);
                    }
                    finally {
                        if (e_50)
                            throw e_50.error;
                    }
                }
                break;
            case "TransitionDuration":
                try {
                    for (var _104 = __values(fromEnum(this.aa0)), _105 = _104.next(); !_105.done; _105 = _104.next()) {
                        var as = _105.value;
                        as.ha();
                    }
                }
                catch (e_51_1) {
                    e_51 = { error: e_51_1 };
                }
                finally {
                    try {
                        if (_105 && !_105.done && (_16 = _104.return))
                            _16.call(_104);
                    }
                    finally {
                        if (e_51)
                            throw e_51.error;
                    }
                }
                break;
            case "IsTransitionInEnabled":
                try {
                    for (var _106 = __values(fromEnum(this.aa0)), _107 = _106.next(); !_107.done; _107 = _106.next()) {
                        var at = _107.value;
                        at.gf();
                    }
                }
                catch (e_52_1) {
                    e_52 = { error: e_52_1 };
                }
                finally {
                    try {
                        if (_107 && !_107.done && (_17 = _106.return))
                            _17.call(_106);
                    }
                    finally {
                        if (e_52)
                            throw e_52.error;
                    }
                }
                break;
            case "TransitionInMode":
                try {
                    for (var _108 = __values(fromEnum(this.aa0)), _109 = _108.next(); !_109.done; _109 = _108.next()) {
                        var au = _109.value;
                        au.he();
                    }
                }
                catch (e_53_1) {
                    e_53 = { error: e_53_1 };
                }
                finally {
                    try {
                        if (_109 && !_109.done && (_18 = _108.return))
                            _18.call(_108);
                    }
                    finally {
                        if (e_53)
                            throw e_53.error;
                    }
                }
                break;
            case "TransitionInDuration":
                try {
                    for (var _110 = __values(fromEnum(this.aa0)), _111 = _110.next(); !_111.done; _111 = _110.next()) {
                        var av = _111.value;
                        av.gf();
                    }
                }
                catch (e_54_1) {
                    e_54 = { error: e_54_1 };
                }
                finally {
                    try {
                        if (_111 && !_111.done && (_19 = _110.return))
                            _19.call(_110);
                    }
                    finally {
                        if (e_54)
                            throw e_54.error;
                    }
                }
                break;
            case "TransitionInSpeedType":
                try {
                    for (var _112 = __values(fromEnum(this.aa0)), _113 = _112.next(); !_113.done; _113 = _112.next()) {
                        var aw = _113.value;
                        aw.gf();
                    }
                }
                catch (e_55_1) {
                    e_55 = { error: e_55_1 };
                }
                finally {
                    try {
                        if (_113 && !_113.done && (_20 = _112.return))
                            _20.call(_112);
                    }
                    finally {
                        if (e_55)
                            throw e_55.error;
                    }
                }
                break;
            case "TransitionInEasingFunction":
                try {
                    for (var _114 = __values(fromEnum(this.aa0)), _115 = _114.next(); !_115.done; _115 = _114.next()) {
                        var ax = _115.value;
                        ax.hd();
                    }
                }
                catch (e_56_1) {
                    e_56 = { error: e_56_1 };
                }
                finally {
                    try {
                        if (_115 && !_115.done && (_21 = _114.return))
                            _21.call(_114);
                    }
                    finally {
                        if (e_56)
                            throw e_56.error;
                    }
                }
                break;
            case "UseLightweightMarkers":
                try {
                    for (var _116 = __values(fromEnum(this.aa0)), _117 = _116.next(); !_117.done; _117 = _116.next()) {
                        var ay = _117.value;
                        ay.hh();
                    }
                }
                catch (e_57_1) {
                    e_57 = { error: e_57_1 };
                }
                finally {
                    try {
                        if (_117 && !_117.done && (_22 = _116.return))
                            _22.call(_116);
                    }
                    finally {
                        if (e_57)
                            throw e_57.error;
                    }
                }
                break;
            case "UseHighMarkerFidelity":
                try {
                    for (var _118 = __values(fromEnum(this.aa0)), _119 = _118.next(); !_119.done; _119 = _118.next()) {
                        var az = _119.value;
                        az.hg();
                    }
                }
                catch (e_58_1) {
                    e_58 = { error: e_58_1 };
                }
                finally {
                    try {
                        if (_119 && !_119.done && (_23 = _118.return))
                            _23.call(_118);
                    }
                    finally {
                        if (e_58)
                            throw e_58.error;
                    }
                }
                break;
        }
    };
    Object.defineProperty(StackedSeriesBase.prototype, "currentCategoryMode", {
        get: function () {
            return this.preferredCategoryMode(typeCast(CategoryAxisBase.$, this.yx()));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesBase.prototype, "scaler", {
        get: function () {
            return typeCast(ICategoryScaler_$type, this.yx());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesBase.prototype, "yScaler", {
        get: function () {
            return typeCast(IScaler_$type, this.ze());
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesBase.prototype, "bucketizer", {
        get: function () {
            return this.y8.c9;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesBase.prototype, "currentMode2Index", {
        get: function () {
            return this.z3();
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesBase.prototype.provideCollisionDetector = function () {
        return new CollisionAvoider();
    };
    StackedSeriesBase.prototype.go = function () {
        return false;
    };
    StackedSeriesBase.prototype.get_e7 = function () {
        return false;
    };
    StackedSeriesBase.prototype.rw = function (a, b) {
        var e_59, _a;
        var c = this.g1;
        _super.prototype.rw.call(this, a, b);
        if (!c) {
            this.cw.be(b);
            return;
        }
        this.cw.be(b);
        if (this.d7(this.cv)) {
            return;
        }
        try {
            for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                d.visualSeriesLink.rw(a, b);
            }
        }
        catch (e_59_1) {
            e_59 = { error: e_59_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_59)
                    throw e_59.error;
            }
        }
        this.g1 = false;
    };
    StackedSeriesBase.prototype.rt = function (a, b, c, d, e) {
        var e_60, _a;
        _super.prototype.rt.call(this, a, b, c, d, e);
        var f = this.ba.a$j.item(d);
        f.c9.g(this.ie);
        f.bd(c);
        if (this.d7(f)) {
            return;
        }
        if (this.aay == null) {
            this.aay = new CategoryFrame(3);
        }
        this.aay.x();
        this.abp();
        this.y5(f).d(this.aay, f);
        this.aap(this.aay, f);
        try {
            for (var _b = __values(fromEnum(this.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var g = _c.value;
                g.visualSeriesLink.rt(a, b, c, d, e);
            }
        }
        catch (e_60_1) {
            e_60 = { error: e_60_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_60)
                    throw e_60.error;
            }
        }
    };
    StackedSeriesBase.prototype.aai = function (a, b, c, d, e, f, g) {
        var _this = this;
        var _loop_1 = function (h) {
            var i = 0;
            var _loop_2 = function (j) {
                var k = i + this_1.abe(j, h);
                var l = a == 1 ? i : k;
                if (l < f && e < k) {
                    if (g == 7 || g == 6) {
                        b.add(((function () {
                            var $ret = new ChartSelection();
                            $ret.series = _this.series._inner[j].visualSeriesLink;
                            return $ret;
                        })()));
                    }
                    else if (g == 2 || g == 1) {
                        b.add(((function () {
                            var $ret = new ChartSelection();
                            $ret.item = _this.dp.item(h);
                            return $ret;
                        })()));
                    }
                    else {
                        b.add(((function () {
                            var $ret = new ChartSelection();
                            $ret.item = _this.dp.item(h);
                            $ret.series = _this.series._inner[j].visualSeriesLink;
                            return $ret;
                        })()));
                    }
                }
                i = k;
            };
            for (var j = 0; j < this_1.series.count; j++) {
                _loop_2(j);
            }
        };
        var this_1 = this;
        for (var h = c; h <= d; h++) {
            _loop_1(h);
        }
    };
    StackedSeriesBase.prototype.abe = function (a, b) {
        var c = this.series._inner[a];
        return c.ak.item(b);
    };
    StackedSeriesBase.prototype.aac = function (a, b, c) {
        var _this = this;
        var _loop_3 = function (d) {
            if (c == 2 || c == 1) {
                a.add(((function () {
                    var $ret = new ChartSelection();
                    $ret.item = _this.dp.item(b);
                    return $ret;
                })()));
            }
            else {
                a.add(((function () {
                    var $ret = new ChartSelection();
                    $ret.item = _this.dp.item(b);
                    $ret.series = _this.series._inner[d].visualSeriesLink;
                    return $ret;
                })()));
            }
        };
        for (var d = 0; d < this.series.count; d++) {
            _loop_3(d);
        }
    };
    StackedSeriesBase.prototype.kn = function () {
        var e_61, _a, e_62, _b;
        var a = this.bc.exportStackedVisualData(this, this.wx);
        try {
            for (var _c = __values(fromEnum(this.series)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var b = _d.value;
                var c = this.bc.createFragmentVisualData(this, this.wx, getInstanceType(b).typeName, b.e0);
                b.visualSeriesLink.cw.ax(c);
                this.bc.addSubSeriesVisualData(a, c);
                try {
                    for (var _e = (e_62 = void 0, __values(fromEnum(b.visualSeriesLink.actualLayers))), _f = _e.next(); !_f.done; _f = _e.next()) {
                        var d = _f.value;
                        var e = this.bc.createFragmentVisualData(this, this.wx, getInstanceType(d.target).typeName, d.target.name);
                        d.target.cw.ax(e);
                        this.bc.addSubSeriesLayerVisualData(c, e);
                    }
                }
                catch (e_62_1) {
                    e_62 = { error: e_62_1 };
                }
                finally {
                    try {
                        if (_f && !_f.done && (_b = _e.return))
                            _b.call(_e);
                    }
                    finally {
                        if (e_62)
                            throw e_62.error;
                    }
                }
            }
        }
        catch (e_61_1) {
            e_61 = { error: e_61_1 };
        }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return))
                    _a.call(_c);
            }
            finally {
                if (e_61)
                    throw e_61.error;
            }
        }
        this.p1(a);
        this.cw.ax(a);
        return a;
    };
    Object.defineProperty(StackedSeriesBase.prototype, "mayContainUnknowns", {
        get: function () {
            return true;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesBase.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesBase.$t = markType(StackedSeriesBase, 'StackedSeriesBase', CategorySeries.$, [IIsCategoryBased_$type]);
    StackedSeriesBase.$$p = markDep(DependencyProperty, PropertyMetadata, StackedSeriesBase, 'raisePropertyChanged', ['AutoGenerateSeries:aa7:abu', [0, false], 'ReverseLegendOrder:aa9:abv', [0, false], 'SeriesVisibility:abx:abw', [Visibility_$type, enumGetBox(Visibility_$type, 0)]]);
    return StackedSeriesBase;
}(CategorySeries));
export { StackedSeriesBase };
/**
 * @hidden
 */
var HorizontalStackedSeriesBase = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(HorizontalStackedSeriesBase, _super);
    function HorizontalStackedSeriesBase() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    HorizontalStackedSeriesBase.prototype.get_em = function () {
        return true;
    };
    HorizontalStackedSeriesBase.prototype.get_f6 = function () {
        return this.ze() != null && this.ze().ch;
    };
    HorizontalStackedSeriesBase.prototype.o4 = function () {
        _super.prototype.o4.call(this);
        this.xAxis = null;
        this.yAxis = null;
        this.aa5.g();
    };
    HorizontalStackedSeriesBase.prototype.cl = function () {
        return 1;
    };
    HorizontalStackedSeriesBase.prototype.cm = function () {
        if (this.yAxis != null && this.yAxis.ch) {
            return 4;
        }
        return 3;
    };
    HorizontalStackedSeriesBase.prototype.getOffsetValue = function () {
        return this.y4.r(this.xAxis, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    HorizontalStackedSeriesBase.prototype.getCategoryWidth = function () {
        return this.xAxis.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    HorizontalStackedSeriesBase.prototype.fetchXAxis = function () {
        return this.xAxis;
    };
    HorizontalStackedSeriesBase.prototype.fetchYAxis = function () {
        return this.yAxis;
    };
    HorizontalStackedSeriesBase.prototype.ai = function () {
        return [this.fetchXAxis(), this.fetchYAxis()];
    };
    HorizontalStackedSeriesBase.prototype.zu = function () {
        return this.yAxis != null && this.yAxis.c1();
    };
    HorizontalStackedSeriesBase.prototype.sh = function () {
        var e_63, _a;
        var a = (typeCast(XamDataChart.$, this.dc));
        if (a != null) {
            this.ia = isNaN_(this.il) ? a.xk.fp : this.il;
            try {
                for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var b = _c.value;
                    b.f3();
                }
            }
            catch (e_63_1) {
                e_63 = { error: e_63_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_63)
                        throw e_63.error;
                }
            }
        }
    };
    HorizontalStackedSeriesBase.prototype.rc = function (a, b, c, d) {
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case "Resolution":
                this.aa5.k();
                break;
            case HorizontalStackedSeriesBase.$$p[0]:
                if (c != d) {
                    this.pe(typeCast(Axis.$, c));
                    this.rk(typeCast(Axis.$, d));
                    this.y8.c9.g(this.ie);
                    this.ru(false);
                    this.qn();
                }
                break;
            case HorizontalStackedSeriesBase.$$p[1]:
                if (c != d) {
                    this.pe(typeCast(Axis.$, c));
                    this.rk(typeCast(Axis.$, d));
                    this.y8.c9.g(this.ie);
                    if (this.dc != null) {
                        this.dc.ob();
                    }
                    this.zu();
                    this.ru(false);
                    this.qn();
                }
                break;
        }
    };
    HorizontalStackedSeriesBase.prototype.ab1 = function (a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    HorizontalStackedSeriesBase.prototype.ab0 = function (a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
            return true;
        }
        return false;
    };
    Object.defineProperty(HorizontalStackedSeriesBase.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    HorizontalStackedSeriesBase.$t = markType(HorizontalStackedSeriesBase, 'HorizontalStackedSeriesBase', StackedSeriesBase.$);
    HorizontalStackedSeriesBase.$$p = markDep(DependencyProperty, PropertyMetadata, HorizontalStackedSeriesBase, 'raisePropertyChanged', ['XAxis::ab4', [CategoryAxisBase.$, null], 'YAxis::ab5', [NumericYAxis.$, null]]);
    return HorizontalStackedSeriesBase;
}(StackedSeriesBase));
export { HorizontalStackedSeriesBase };
/**
 * @hidden
 */
var StackedAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedAreaSeries, _super);
    function StackedAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = StackedAreaSeries.$;
        return _this;
    }
    StackedAreaSeries.prototype.bk = function () {
        return new StackedAreaSeries();
    };
    StackedAreaSeries.prototype.get_ew = function () {
        return true;
    };
    StackedAreaSeries.prototype.ac = function () {
        _super.prototype.ac.call(this);
        this.ru(false);
    };
    StackedAreaSeries.prototype.ct = function () {
        return new StackedAreaSeriesView(this);
    };
    StackedAreaSeries.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.ab6 = a;
    };
    StackedAreaSeries.prototype.ay = function (a) {
        if (this.itemsSource == null) {
            return null;
        }
        if (a == this.xAxis) {
            return new AxisRange(0, this.dp.count - 1);
        }
        if (a == this.yAxis) {
            this.abp();
            return new AxisRange(this.abg, this.abf);
        }
        return null;
    };
    StackedAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    StackedAreaSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.p6(a, c, b);
        return c.toArray();
    };
    StackedAreaSeries.prototype.p6 = function (a, b, c) {
        this.aah(a, b, c, this.yy, 0);
    };
    Object.defineProperty(StackedAreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    StackedAreaSeries.$t = markType(StackedAreaSeries, 'StackedAreaSeries', HorizontalStackedSeriesBase.$);
    return StackedAreaSeries;
}(HorizontalStackedSeriesBase));
export { StackedAreaSeries };
/**
 * @hidden
 */
var VerticalStackedSeriesBase = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(VerticalStackedSeriesBase, _super);
    function VerticalStackedSeriesBase() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    VerticalStackedSeriesBase.prototype.yx = function () {
        return this.yAxis;
    };
    VerticalStackedSeriesBase.prototype.ze = function () {
        return this.xAxis;
    };
    VerticalStackedSeriesBase.prototype.o4 = function () {
        _super.prototype.o4.call(this);
        this.xAxis = null;
        this.yAxis = null;
        this.aa5.g();
    };
    VerticalStackedSeriesBase.prototype.cl = function () {
        if (this.xAxis != null && this.xAxis.ch) {
            return 4;
        }
        return 3;
    };
    VerticalStackedSeriesBase.prototype.cm = function () {
        return 1;
    };
    VerticalStackedSeriesBase.prototype.az = function (a) {
        if (a.isEmpty && this.dc != null) {
            a = this.dc.wh;
        }
        var b = this.yx();
        if (this.aaw == null || this.aax == null) {
            return null;
        }
        var c = this.wo(this.cw);
        var d = new ScalerParams(0, a, this.dc.wz, b.ch, this.getEffectiveViewport());
        var e = (b.eo(c.top, d));
        var f = (b.eo(c.bottom, d));
        if (!b.ch) {
            var g = e;
            e = f;
            f = g;
        }
        var h = null;
        if (b.cn) {
            h = b;
            e = h.i$f(e);
            f = h.i$f(f);
        }
        else {
            e = Math.floor(e);
            f = Math.ceil(f);
        }
        e = Math.max(0, Math.min(this.aax.length - 1, e));
        f = Math.max(0, Math.min(this.aax.length - 1, f));
        var i = 1.7976931348623157E+308;
        var j = -1.7976931348623157E+308;
        for (var k = truncate(e); k <= truncate(f); k++) {
            var l = k;
            if (h != null) {
                l = h.i$b._inner[k];
            }
            var m = this.aax[l];
            if (isInfinity(m) || isNaN_(m)) {
                continue;
            }
            var n = this.aaw[l];
            if (isInfinity(n) || isNaN_(n)) {
                continue;
            }
            i = Math.min(i, m);
            j = Math.max(j, n);
        }
        var o = new AxisRange(i, j);
        var p = this.ze();
        o = this.ax(o, p, a);
        return o;
    };
    VerticalStackedSeriesBase.prototype.getOffsetValue = function () {
        return this.y4.r(this.yAxis, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    VerticalStackedSeriesBase.prototype.getCategoryWidth = function () {
        return this.yAxis.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    VerticalStackedSeriesBase.prototype.get_isVertical = function () {
        return true;
    };
    VerticalStackedSeriesBase.prototype.fetchXAxis = function () {
        return this.xAxis;
    };
    VerticalStackedSeriesBase.prototype.fetchYAxis = function () {
        return this.yAxis;
    };
    VerticalStackedSeriesBase.prototype.zu = function () {
        return this.xAxis != null && this.xAxis.c1();
    };
    VerticalStackedSeriesBase.prototype.rc = function (a, b, c, d) {
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case VerticalStackedSeriesBase.$$p[0]:
                if (c != d) {
                    this.pe(typeCast(Axis.$, c));
                    this.rk(typeCast(Axis.$, d));
                    this.y8.c9.g(this.ie);
                    if (this.dc != null) {
                        this.dc.ob();
                    }
                    this.ru(false);
                    this.qn();
                }
                break;
            case VerticalStackedSeriesBase.$$p[1]:
                if (c != d) {
                    this.pe(typeCast(Axis.$, c));
                    this.rk(typeCast(Axis.$, d));
                    this.y8.c9.g(this.ie);
                    this.zu();
                    this.ru(false);
                    this.qn();
                }
                break;
        }
    };
    VerticalStackedSeriesBase.prototype.ab1 = function (a) {
        if (typeCast(CategoryYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    VerticalStackedSeriesBase.prototype.ab0 = function (a) {
        if (typeCast(NumericXAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    Object.defineProperty(VerticalStackedSeriesBase.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    VerticalStackedSeriesBase.$t = markType(VerticalStackedSeriesBase, 'VerticalStackedSeriesBase', StackedSeriesBase.$);
    VerticalStackedSeriesBase.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalStackedSeriesBase, 'raisePropertyChanged', ['XAxis::ab4', [NumericXAxis.$, null], 'YAxis::ab5', [CategoryYAxis.$, null]]);
    return VerticalStackedSeriesBase;
}(StackedSeriesBase));
export { VerticalStackedSeriesBase };
/**
 * @hidden
 */
var StackedBarSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedBarSeries, _super);
    function StackedBarSeries() {
        var _this = _super.call(this) || this;
        _this.ab = StackedBarSeries.$;
        return _this;
    }
    StackedBarSeries.prototype.bk = function () {
        return new StackedBarSeries();
    };
    StackedBarSeries.prototype.get_ez = function () {
        return true;
    };
    StackedBarSeries.prototype.get_fm = function () {
        return true;
    };
    StackedBarSeries.prototype.jl = function () {
        if (!isNaN_(this.jk)) {
            return _super.prototype.jl.call(this);
        }
        return Defaults.h;
    };
    StackedBarSeries.prototype.ac = function () {
        _super.prototype.ac.call(this);
        this.ru(false);
    };
    StackedBarSeries.prototype.ct = function () {
        return new StackedBarSeriesView(this);
    };
    StackedBarSeries.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.ab6 = a;
    };
    StackedBarSeries.prototype.aaz = function () {
        return this.ab6;
    };
    StackedBarSeries.prototype.preferredCategoryMode = function (a) {
        return 2;
    };
    StackedBarSeries.prototype.z3 = function () {
        var e_64, _a;
        var a = 0;
        try {
            for (var _b = __values(fromEnum(this.dc.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                if (b == this) {
                    return a;
                }
                var c = typeCast(IBarSeries_$type, b);
                if (c != null && c.yAxis == this.yAxis && c.getPreferredCategoryMode() == 2) {
                    a++;
                }
            }
        }
        catch (e_64_1) {
            e_64 = { error: e_64_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_64)
                    throw e_64.error;
            }
        }
        return -1;
    };
    StackedBarSeries.prototype.abc = function () {
        var a = 0;
        var b = this.dc != null ? this.dc.wh : Rect.empty;
        var c = this.cw.b9;
        if (!b.isEmpty && !c.isEmpty && this.xAxis != null) {
            var d = this.getEffectiveViewport1(this.cw);
            var e = new ScalerParams(0, b, c, this.xAxis.ch, d);
            a = this.xAxis.el(this.xAxis.me, e);
        }
        return a;
    };
    StackedBarSeries.prototype.abd = function () {
        if (this.xAxis != null) {
            return this.xAxis.me;
        }
        return 0;
    };
    StackedBarSeries.prototype.ay = function (a) {
        if (this.itemsSource == null) {
            return null;
        }
        if (a == this.yAxis) {
            return new AxisRange(0, this.dp.count - 1);
        }
        if (a == this.xAxis) {
            this.abp();
            return new AxisRange(this.abg, this.abf);
        }
        return null;
    };
    StackedBarSeries.prototype.ge = function (a) {
        var b = this.dp != null ? this.dp.indexOf(a) : -1;
        var c = this.dc != null ? this.dc.wh : Rect.empty;
        c = c.copy();
        var d = this.cw.b9;
        var e = new Rect(0, 0, 0, 1, 1);
        var f = this.wq(this.cw);
        var g = new ScalerParams(0, e, e, this.xAxis.ch, f);
        var h = new ScalerParams(0, e, e, this.yAxis.ch, f);
        if (b >= 0 && Rect.l_op_Inequality(c, null) && Rect.l_op_Inequality(d, null)) {
            if (this.yAxis != null) {
                var i = this.yAxis.el(b, h);
                if (i < c.top + 0.1 * c.height) {
                    i = i + 0.4 * c.height;
                }
                if (i > c.bottom - 0.1 * c.height) {
                    i = i - 0.4 * c.height;
                }
                c.y = i - 0.5 * c.height;
            }
            if (this.xAxis != null && this.aaw != null && b < this.aaw.length) {
                var j = this.xAxis.el(this.aaw[b], g);
                var k = this.xAxis.el(this.aax[b], g);
                if (!isNaN_(j) && !isNaN_(k)) {
                    var l = Math.abs(k - j);
                    if (c.width < l) {
                        c.width = l;
                        c.x = Math.min(k, j);
                    }
                    else {
                        if (k < c.left + 0.1 * c.width) {
                            k = k + 0.4 * c.width;
                        }
                        if (k > c.right - 0.1 * c.width) {
                            k = k - 0.4 * c.width;
                        }
                        c.x = k - 0.5 * c.width;
                    }
                }
            }
            this.c4.au(this.dc, c, true);
        }
        return b >= 0;
    };
    StackedBarSeries.prototype.hf = function (a, b, c) {
        var d = true;
        var e = c;
        if (!c.r() || b.isEmpty || a.isEmpty || this.yAxis == null || this.yAxis.itemsSource == null || this.xAxis == null || this.dp == null || this.xAxis.bi == null || this.yAxis.bi == null || this.xAxis.l4 == this.xAxis.l3) {
            e.c9.d = 0;
            d = false;
        }
        return d;
    };
    StackedBarSeries.prototype.pd = function (a, b, c, d) {
        switch (a) {
            case 4:
            case 1:
            case 0:
                this.y8.c9.g(this.ie);
                break;
        }
        switch (a) {
            case 4:
                if (this.xAxis != null && !this.xAxis.c1()) {
                    this.ru(true);
                }
                break;
            case 1:
                if (this.xAxis != null && !this.xAxis.c1()) {
                    this.ru(true);
                }
                break;
            case 0:
                if (this.xAxis != null && !this.xAxis.c1()) {
                    this.ru(true);
                }
                break;
            case 2:
                if (this.y8.c9.d > 0) {
                    this.ru(true);
                }
                break;
            case 3:
                if (this.xAxis != null && !this.xAxis.c1()) {
                    this.ru(true);
                }
                break;
        }
    };
    StackedBarSeries.prototype.j4 = function (a) {
        var b = this.dc != null ? this.dc.wh : Rect.empty;
        var c = this.cw.b9;
        var d = this.getEffectiveViewport1(this.cw);
        var e = -1;
        if (this.yAxis != null && !b.isEmpty && !c.isEmpty) {
            var f = new ScalerParams(0, b, c, this.yAxis.ch, d);
            var g = this.wo(this.cw);
            var h = this.yAxis.eo(g.top, f);
            var i = this.yAxis.eo(g.bottom, f);
            var j = (a.y - b.top) / b.height;
            var k = h + (j * (i - h));
            if (this.yAxis.categoryMode != 0) {
                k -= 0.5;
            }
            var l = truncate(Math.round(k));
            e = l;
        }
        return e;
    };
    StackedBarSeries.prototype.ko = function (a) {
        var b = this.j4(a);
        return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
    };
    StackedBarSeries.prototype.abt = function () {
        if (this.xAxis != null) {
            this.xAxis.c2(true);
        }
        if (this.yAxis != null) {
            this.yAxis.c2(true);
        }
    };
    StackedBarSeries.prototype.abh = function (a) {
        return this.j4(a);
    };
    StackedBarSeries.prototype.aba = function (a, b, c, d) {
        var e = true;
        if (!d.r() || c.isEmpty || b.isEmpty || this.yAxis == null || this.yAxis.itemsSource == null || this.xAxis == null || this.dp == null || this.xAxis.bi == null || this.yAxis.bi == null) {
            e = false;
        }
        var f = d;
        if (a.valueColumn == null || a.valueColumn.count == 0 || f.c9.d < 1) {
            e = false;
        }
        return e;
    };
    StackedBarSeries.prototype.ix = function () {
        return this.yAxis.k8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    StackedBarSeries.prototype.abq = function (a, b, c, d) {
        var e_65, _a;
        var e = typeCast(BarFragment.$, a);
        var f = typeCast(ColumnFragmentView.$, c);
        if (!this.hf(c.b9, c.ca, c) || e == null || f == null) {
            return;
        }
        var g = this.yAxis.k8(c.ca, c.b9, this.getEffectiveViewport1(c));
        if (isNaN_(g) || isInfinity(g)) {
            e.adc.du.count = 0;
            return;
        }
        var h = 0;
        e.y7.a2(e, e.zr(), d, e.z0(c), e.z1(c));
        e.y7.r = e.adf;
        e.y7.s = e.adg;
        e.y7.k = e.adf;
        e.y7.l = e.adg;
        var i = e.valueColumn.count;
        var j = c.ca;
        var k = c.b9;
        var l = this.getEffectiveViewport1(c);
        var m = false;
        var n = e.y7.b;
        if (n != null) {
            m = true;
        }
        var o = b.h;
        var p = e.yx();
        var q = p.cn ? p : null;
        var r = new ScalerParams(0, j, k, p.ch, l);
        var s = 0;
        try {
            for (var _b = __values(fromEnum(b.h)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var t = _c.value;
                if (isInfinity(t[0]) || isNaN_(t[0]) || isInfinity(t[1]) || isInfinity(t[2]) || isNaN_(t[1]) || isNaN_(t[2])) {
                    s++;
                    continue;
                }
                var u = t[0] - 0.5 * g;
                var v = t[1];
                var w = t[2];
                w = Math.max(w, -100);
                v = Math.min(v, c.b9.right + 100);
                var x = f.du.item(h);
                x.height = g;
                x.width = Math.abs(v - w);
                var y = e.y7.aw(i, s)[0];
                if (m) {
                    e.aal(o, s, i, p, r, c.t, y);
                }
                if (x.dataContext != null) {
                    var z = x.dataContext;
                    if (e.y7.az == 1) {
                        if (y >= 0 && y < this.dp.count) {
                            if (q != null && q.i$b != null && q.i$b.count > y) {
                                y = q.i$b._inner[y];
                            }
                            z.item = this.dp.item(y);
                        }
                    }
                    else {
                        z.item = null;
                    }
                }
                e.y7.ad(x, false, false, false, false);
                x.ap = e.y7.k;
                x.aq = e.y7.l;
                f.d1(x, Math.min(v, w), u);
                h++;
                s++;
            }
        }
        catch (e_65_1) {
            e_65 = { error: e_65_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_65)
                    throw e_65.error;
            }
        }
        f.du.count = h;
    };
    StackedBarSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.p6(a, c, b);
        return c.toArray();
    };
    StackedBarSeries.prototype.p6 = function (a, b, c) {
        this.aah(a, b, c, this.yy, 1);
    };
    StackedBarSeries.prototype.rc = function (a, b, c, d) {
        var e_66, _a;
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case StackedBarSeries.$$p[0]:
            case StackedBarSeries.$$p[1]:
                try {
                    for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                        var e = _c.value;
                        e.g1();
                        e.g2();
                    }
                }
                catch (e_66_1) {
                    e_66 = { error: e_66_1 };
                }
                finally {
                    try {
                        if (_c && !_c.done && (_a = _b.return))
                            _a.call(_b);
                    }
                    finally {
                        if (e_66)
                            throw e_66.error;
                    }
                }
                this.ru(false);
                break;
            case "SyncLink":
                if (this.xAxis != null) {
                    this.xAxis.c1();
                }
                break;
            case "FastItemsSource":
                if (this.xAxis != null && !this.xAxis.c1()) {
                    this.ab6.c9.g(this.ie);
                }
                this.ru(this.gh && c != null);
                break;
            case "SeriesViewer":
                if (c != null && d == null) {
                    this.pe(this.xAxis);
                    this.pe(this.yAxis);
                }
                if (c == null && d != null) {
                    this.rk(this.xAxis);
                    this.rk(this.yAxis);
                }
                this.ab6.c9.g(this.ie);
                this.ru(false);
                if (this.xAxis != null) {
                    this.xAxis.c1();
                }
                break;
        }
    };
    StackedBarSeries.prototype.getPreferredCategoryMode = function () {
        return this.preferredCategoryMode(this.yAxis);
    };
    Object.defineProperty(StackedBarSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    StackedBarSeries.$t = markType(StackedBarSeries, 'StackedBarSeries', VerticalStackedSeriesBase.$, [IBarSeries_$type]);
    StackedBarSeries.$$p = markDep(DependencyProperty, PropertyMetadata, StackedBarSeries, 'raisePropertyChanged', ['RadiusX:ab7:acb', [1, 0], 'RadiusY:ab8:acc', [1, 0]]);
    return StackedBarSeries;
}(VerticalStackedSeriesBase));
export { StackedBarSeries };
/**
 * @hidden
 */
var StackedColumnSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedColumnSeries, _super);
    function StackedColumnSeries() {
        var _this = _super.call(this) || this;
        _this.ab = StackedColumnSeries.$;
        return _this;
    }
    StackedColumnSeries.prototype.bk = function () {
        return new StackedColumnSeries();
    };
    StackedColumnSeries.prototype.get_e1 = function () {
        return true;
    };
    StackedColumnSeries.prototype.get_fm = function () {
        return true;
    };
    StackedColumnSeries.prototype.jl = function () {
        if (!isNaN_(this.jk)) {
            return _super.prototype.jl.call(this);
        }
        return Defaults.h;
    };
    StackedColumnSeries.prototype.ct = function () {
        return new StackedColumnSeriesView(this);
    };
    StackedColumnSeries.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.ab6 = a;
    };
    StackedColumnSeries.prototype.aaz = function () {
        return this.ab6;
    };
    StackedColumnSeries.prototype.preferredCategoryMode = function (a) {
        return 2;
    };
    StackedColumnSeries.prototype.ay = function (a) {
        if (this.itemsSource == null) {
            return null;
        }
        if (a == this.xAxis) {
            return new AxisRange(0, this.dp.count - 1);
        }
        if (a == this.yAxis) {
            this.abp();
            return new AxisRange(this.abg, this.abf);
        }
        return null;
    };
    StackedColumnSeries.prototype.ix = function () {
        var a = this.getEffectiveViewport1(this.cw);
        return this.xAxis.k8(this.cw.ca, this.cw.b9, a);
    };
    StackedColumnSeries.prototype.abq = function (a, b, c, d) {
        var e_67, _a;
        var e = typeCast(ColumnFragment.$, a);
        var f = typeCast(ColumnFragmentView.$, c);
        if (!this.hf(c.b9, c.ca, c) || e == null || f == null) {
            return;
        }
        if (e == null) {
            return;
        }
        var g = this.getEffectiveViewport1(c);
        var h = this.xAxis.k8(c.ca, c.b9, g);
        if (isNaN_(h) || isInfinity(h)) {
            e.adc.du.count = 0;
            return;
        }
        var i = 0;
        e.y7.a2(e, e.zr(), d, e.z0(c), e.z1(c));
        e.y7.r = e.adf;
        e.y7.s = e.adg;
        e.y7.k = e.adf;
        e.y7.l = e.adg;
        var j = c.ca;
        var k = c.b9;
        var l = this.getEffectiveViewport1(c);
        var m = false;
        var n = e.y7.b;
        if (n != null) {
            m = true;
        }
        var o = b.h;
        var p = e.yx();
        var q = p.cn ? p : null;
        var r = new ScalerParams(0, j, k, p.ch, l);
        var s = e.valueColumn.count;
        var t = typeCast(ISortingAxis_$type, this.xAxis) !== null;
        var u = 0;
        try {
            for (var _b = __values(fromEnum(b.h)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var v = _c.value;
                if (isInfinity(v[0]) || isNaN_(v[0]) || isInfinity(v[1]) || isInfinity(v[2]) || isNaN_(v[1]) || isNaN_(v[2])) {
                    u++;
                    continue;
                }
                var w = v[0] - 0.5 * h;
                var x = v[1];
                var y = v[2];
                x = Math.max(x, -100);
                y = Math.min(y, c.b9.bottom + 100);
                var z = f.du.item(u);
                z.width = h;
                z.height = Math.abs(y - x);
                var aa = e.y7.aw(s, u)[0];
                if (t && b.o != null && i >= 0 && i < b.o.count) {
                    aa = truncate(Math.round(b.o._inner[i]));
                }
                if (m) {
                    e.aal(o, u, s, p, r, c.t, aa);
                }
                if (z.dataContext != null) {
                    var ab = z.dataContext;
                    if (e.y7.az == 1) {
                        if (aa >= 0 && aa < this.dp.count) {
                            if (q != null && q.i$b != null && q.i$b.count > aa) {
                                aa = q.i$b._inner[aa];
                            }
                            ab.item = this.dp.item(aa);
                        }
                    }
                    else {
                        ab.item = null;
                    }
                }
                e.y7.ad(z, false, false, false, false);
                z.ap = e.y7.k;
                z.aq = e.y7.l;
                f.d1(z, w, Math.min(y, x));
                i++;
                u++;
            }
        }
        catch (e_67_1) {
            e_67 = { error: e_67_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_67)
                    throw e_67.error;
            }
        }
        f.du.count = u;
    };
    StackedColumnSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.p6(a, c, b);
        return c.toArray();
    };
    StackedColumnSeries.prototype.p6 = function (a, b, c) {
        this.aah(a, b, c, this.yy, 1);
    };
    StackedColumnSeries.prototype.rc = function (a, b, c, d) {
        var e_68, _a;
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case StackedColumnSeries.$$p[0]:
            case StackedColumnSeries.$$p[1]:
                try {
                    for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                        var e = _c.value;
                        e.g1();
                        e.g2();
                    }
                }
                catch (e_68_1) {
                    e_68 = { error: e_68_1 };
                }
                finally {
                    try {
                        if (_c && !_c.done && (_a = _b.return))
                            _a.call(_b);
                    }
                    finally {
                        if (e_68)
                            throw e_68.error;
                    }
                }
                this.ru(false);
                break;
            case "SyncLink":
                if (this.yAxis != null) {
                    this.yAxis.c1();
                }
                break;
            case "SeriesViewer":
                if (this.yAxis != null) {
                    this.yAxis.c1();
                }
                break;
        }
    };
    Object.defineProperty(StackedColumnSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    StackedColumnSeries.$t = markType(StackedColumnSeries, 'StackedColumnSeries', HorizontalStackedSeriesBase.$);
    StackedColumnSeries.$$p = markDep(DependencyProperty, PropertyMetadata, StackedColumnSeries, 'raisePropertyChanged', ['RadiusX:ab7:acb', [1, 0], 'RadiusY:ab8:acc', [1, 0]]);
    return StackedColumnSeries;
}(HorizontalStackedSeriesBase));
export { StackedColumnSeries };
/**
 * @hidden
 */
var StackedSplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSplineAreaSeries, _super);
    function StackedSplineAreaSeries() {
        var _this = _super.call(this) || this;
        _this.ab = StackedSplineAreaSeries.$;
        return _this;
    }
    StackedSplineAreaSeries.prototype.bk = function () {
        return new StackedSplineAreaSeries();
    };
    StackedSplineAreaSeries.prototype.jl = function () {
        if (!isNaN_(this.jk)) {
            return _super.prototype.jl.call(this);
        }
        return this.ab6.dn();
    };
    StackedSplineAreaSeries.prototype.get_ew = function () {
        return true;
    };
    StackedSplineAreaSeries.prototype.get_f1 = function () {
        return true;
    };
    StackedSplineAreaSeries.prototype.ac = function () {
        _super.prototype.ac.call(this);
        this.ru(false);
    };
    StackedSplineAreaSeries.prototype.ct = function () {
        return new StackedSplineAreaSeriesView(this);
    };
    StackedSplineAreaSeries.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.ab6 = a;
    };
    StackedSplineAreaSeries.prototype.ay = function (a) {
        if (this.itemsSource == null) {
            return null;
        }
        if (a == this.xAxis) {
            return new AxisRange(0, this.dp.count - 1);
        }
        if (a == this.yAxis) {
            this.abp();
            return new AxisRange(this.abg, this.abf);
        }
        return null;
    };
    StackedSplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    StackedSplineAreaSeries.prototype.rc = function (a, b, c, d) {
        var e_69, _a;
        _super.prototype.rc.call(this, a, b, c, d);
        switch (b) {
            case StackedSplineAreaSeries.$$p[0]:
                try {
                    for (var _b = __values(fromEnum(this.aa0)), _c = _b.next(); !_c.done; _c = _b.next()) {
                        var e = _c.value;
                        e.ge();
                    }
                }
                catch (e_69_1) {
                    e_69 = { error: e_69_1 };
                }
                finally {
                    try {
                        if (_c && !_c.done && (_a = _b.return))
                            _a.call(_b);
                    }
                    finally {
                        if (e_69)
                            throw e_69.error;
                    }
                }
                break;
        }
    };
    StackedSplineAreaSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.p6(a, c, b);
        return c.toArray();
    };
    StackedSplineAreaSeries.prototype.p6 = function (a, b, c) {
        this.aah(a, b, c, this.yy, 0);
    };
    Object.defineProperty(StackedSplineAreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    StackedSplineAreaSeries.$t = markType(StackedSplineAreaSeries, 'StackedSplineAreaSeries', HorizontalStackedSeriesBase.$);
    StackedSplineAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, StackedSplineAreaSeries, 'raisePropertyChanged', ['IsSplineShapePartOfRange:ab7:ab9', [0, false]]);
    return StackedSplineAreaSeries;
}(HorizontalStackedSeriesBase));
export { StackedSplineAreaSeries };
/**
 * @hidden
 */
var StackedSplineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSplineSeries, _super);
    function StackedSplineSeries() {
        var _this = _super.call(this) || this;
        _this.ab = StackedSplineSeries.$;
        return _this;
    }
    StackedSplineSeries.prototype.bk = function () {
        return new StackedSplineSeries();
    };
    StackedSplineSeries.prototype.get_f1 = function () {
        return true;
    };
    StackedSplineSeries.prototype.jl = function () {
        if (!isNaN_(this.jk)) {
            return _super.prototype.jl.call(this);
        }
        return this.ab6.dn();
    };
    StackedSplineSeries.prototype.ac = function () {
        _super.prototype.ac.call(this);
        this.ru(false);
    };
    StackedSplineSeries.prototype.ct = function () {
        return new StackedSplineSeriesView(this);
    };
    StackedSplineSeries.prototype.q3 = function (a) {
        _super.prototype.q3.call(this, a);
        this.ab6 = a;
    };
    StackedSplineSeries.prototype.ay = function (a) {
        if (this.itemsSource == null) {
            return null;
        }
        if (a == this.xAxis) {
            return new AxisRange(0, this.dp.count - 1);
        }
        if (a == this.yAxis) {
            this.abp();
            return new AxisRange(this.abg, this.abf);
        }
        return null;
    };
    StackedSplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    StackedSplineSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.p6(a, c, b);
        return c.toArray();
    };
    StackedSplineSeries.prototype.p6 = function (a, b, c) {
        this.aah(a, b, c, this.yy, 0);
    };
    Object.defineProperty(StackedSplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zv;
        },
        enumerable: false,
        configurable: true
    });
    StackedSplineSeries.$t = markType(StackedSplineSeries, 'StackedSplineSeries', HorizontalStackedSeriesBase.$);
    StackedSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, StackedSplineSeries, 'raisePropertyChanged', ['IsSplineShapePartOfRange:ab7:ab9', [0, false]]);
    return StackedSplineSeries;
}(HorizontalStackedSeriesBase));
export { StackedSplineSeries };
/**
 * @hidden
 */
var StackedFragmentSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedFragmentSeries, _super);
    function StackedFragmentSeries() {
        var _this = _super.call(this) || this;
        _this._parentSeries = null;
        _this.cc = 0;
        _this.af = null;
        _this.ak = null;
        _this._visualSeriesLink = null;
        _this.a7 = null;
        _this.a8 = null;
        _this.a6 = null;
        _this.az = false;
        _this.b5 = null;
        _this.propertyChanged = null;
        _this.propertyUpdated = null;
        _this.a5 = new List$1(String_$type, 0);
        _this.a7 = new List$1(Number_$type, 0);
        _this.a8 = new List$1(Number_$type, 0);
        _this.a6 = new List$1(Array_$type, 0);
        _this.propertyUpdated = delegateCombine(_this.propertyUpdated, function (a, b) { return _this.fy(a, b.propertyName, b.oldValue, b.newValue); });
        return _this;
    }
    StackedFragmentSeries.prototype.cg = function (a, b) {
        var c = new DataLegendSeriesValueInfo();
        c.l = this.bt({ $type: Point_$type, x: a, y: b }, false, false);
        c.q = "Value";
        c.r = this.ft != null ? this.ft : "Value";
        c.s = this.fp != null ? this.fp : "";
        c.t = this.fr != null ? this.fr : "";
        var d = new DataLegendSeriesContext();
        d.e = ((function () {
            var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
            $ret.add(c);
            return $ret;
        })());
        d.h = this.eb();
        return d;
    };
    StackedFragmentSeries.prototype.eb = function () {
        return "Stacked";
    };
    Object.defineProperty(StackedFragmentSeries.prototype, "parentSeries", {
        get: function () {
            return this._parentSeries;
        },
        set: function (a) {
            this._parentSeries = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedFragmentSeries.prototype, "visualSeriesLink", {
        get: function () {
            return this._visualSeriesLink;
        },
        set: function (a) {
            this._visualSeriesLink = a;
        },
        enumerable: false,
        configurable: true
    });
    StackedFragmentSeries.prototype.b8 = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.j4(a);
        }
        return -1;
    };
    StackedFragmentSeries.prototype.ch = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ko(a);
        }
        return null;
    };
    StackedFragmentSeries.prototype.cb = function (a, b) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.kb(a, b);
        }
        return -1;
    };
    StackedFragmentSeries.prototype.ca = function (a, b) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.j9(a, b);
        }
        return -1;
    };
    StackedFragmentSeries.prototype.bt = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.i6(a, b, c);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.li = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wh(a, b, c);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.lm = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ws(a);
        }
        return Rect.empty;
    };
    StackedFragmentSeries.prototype.j = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ao(a);
        }
        return null;
    };
    StackedFragmentSeries.prototype.ln = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wt(a);
        }
        return Rect.empty;
    };
    StackedFragmentSeries.prototype.k = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ap(a);
        }
        return null;
    };
    StackedFragmentSeries.prototype.lo = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wu(a);
        }
        return Rect.empty;
    };
    StackedFragmentSeries.prototype.lp = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wv(a);
        }
        return Rect.empty;
    };
    StackedFragmentSeries.prototype.bp = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.i2(a, b, c);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.le = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wd(a, b, c);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.br = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.i4(a, b, c);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.lg = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wf(a, b, c);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.lj = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wi(a, b, c);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.bu = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.i7(a, b, c);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.lf = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.we(a, b, c);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.bq = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.i3(a, b, c);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.lh = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wg(a, b, c);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.bs = function (a, b, c) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.i5(a, b, c);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.b9 = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.j5(a);
        }
        return -1;
    };
    StackedFragmentSeries.prototype.bo = function () {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ix();
        }
        return 0;
    };
    StackedFragmentSeries.prototype.bn = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.it(a);
        }
        return NaN;
    };
    StackedFragmentSeries.prototype.ci = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.kp(a);
        }
        return null;
    };
    StackedFragmentSeries.prototype.as = function (a, b, c, d, e) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ed(a, b, c, d, e);
        }
        return false;
    };
    StackedFragmentSeries.prototype.lk = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wm(a);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.ld = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.wc(a);
        }
        return { $type: Point_$type, x: NaN, y: NaN };
    };
    StackedFragmentSeries.prototype.a0 = function (a) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.ge(a);
        }
        return false;
    };
    StackedFragmentSeries.prototype.ll = function () {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.getEffectiveViewport();
        }
        return Rect.empty;
    };
    StackedFragmentSeries.prototype.fx = function () {
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.qp();
        }
    };
    StackedFragmentSeries.prototype.f2 = function (a) {
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.sa(a);
        }
    };
    StackedFragmentSeries.prototype.a1 = function (a, b) {
        if (this.visualSeriesLink != null) {
            return this.visualSeriesLink.gx(a, b);
        }
        return false;
    };
    StackedFragmentSeries.prototype.fw = function (a) {
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.qe(a);
        }
    };
    StackedFragmentSeries.prototype.provideRenderer = function (a) {
        this.b5 = a;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.provideRenderer(a);
        }
    };
    StackedFragmentSeries.prototype.hm = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.lt = this.parentSeries._visibility != 0 ? 1 : this.lv;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink._visibility = this.lt;
        }
    };
    StackedFragmentSeries.prototype.gu = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.hp = this.hs != null ? this.hs : this.parentSeries.x7;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.x7 = this.hp;
        }
    };
    StackedFragmentSeries.prototype.gw = function () {
        if (this.parentSeries == null) {
            return;
        }
        var a = this.x == 0 || this.x == 2;
        var b = a ? this.parentSeries.xd : this.x;
        if (b == 2 || b == 0) {
            b = 1;
        }
        this.w = b;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.xf = this.w;
        }
    };
    StackedFragmentSeries.prototype.f4 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.k4 = this.kz != null ? this.kz : this.parentSeries.vk;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.vk = this.k4;
        }
    };
    StackedFragmentSeries.prototype.f5 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.k7 = this.k8 != null ? this.k8 : this.parentSeries.v7;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.v7 = this.k7;
        }
    };
    StackedFragmentSeries.prototype.gb = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bc = !isNaN_(this.bv) ? this.bv : this.parentSeries.jg;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.jg = this.bc;
        }
    };
    StackedFragmentSeries.prototype.ga = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.z = this.parentSeries.bw;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.bw = this.z;
        }
    };
    StackedFragmentSeries.prototype.g0 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.aa = this.ab != 0 ? this.ab : this.parentSeries.cj;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.cj = this.aa;
        }
    };
    StackedFragmentSeries.prototype.gq = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bd = !isNaN_(this.bw) || this.ay("MarkerFillOpacity") ? this.bw : this.parentSeries.jh;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.jh = this.bd;
        }
    };
    StackedFragmentSeries.prototype.f6 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.k9 = this.at("DashCap") ? this.parentSeries.v8 : this.lb;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.v8 = this.k9;
        }
    };
    StackedFragmentSeries.prototype.gc = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.al = this.at("IsDropShadowEnabled") ? this.parentSeries.e6 : this.au;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.e6 = this.al;
        }
    };
    StackedFragmentSeries.prototype.g3 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bi = !isNaN_(this.b1) || this.ay("ShadowBlur") ? this.b1 : this.parentSeries.jn;
        if (this.visualSeriesLink != null && !isNaN_(this.bi)) {
            this.visualSeriesLink.jn = this.bi;
        }
    };
    StackedFragmentSeries.prototype.g4 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.k5 = Color.e(toNullable(Color.$, this.k6), toNullable(Color.$, null)) ? this.k6 : this.parentSeries.v6;
        if (this.visualSeriesLink != null && Color.e(toNullable(Color.$, this.k5), toNullable(Color.$, null))) {
            this.visualSeriesLink.v6 = this.k5;
        }
    };
    StackedFragmentSeries.prototype.hi = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.ar = this.at("UseSingleShadow") ? this.parentSeries.hd : this.a4;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.hd = this.ar;
        }
    };
    StackedFragmentSeries.prototype.g5 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bj = !isNaN_(this.b2) || this.ay("ShadowOffsetX") ? this.b2 : this.parentSeries.jo;
        if (this.visualSeriesLink != null && !isNaN_(this.bj)) {
            this.visualSeriesLink.jo = this.bj;
        }
    };
    StackedFragmentSeries.prototype.g6 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bk = !isNaN_(this.b3) || this.ay("ShadowOffsetY") ? this.b3 : this.parentSeries.jp;
        if (this.visualSeriesLink != null && !isNaN_(this.bk)) {
            this.visualSeriesLink.jp = this.bk;
        }
    };
    StackedFragmentSeries.prototype.gd = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.am = this.av;
    };
    StackedFragmentSeries.prototype.gj = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.hn = this.hq != null ? this.hq : this.parentSeries.legendItemBadgeTemplate;
        if (this.visualSeriesLink != null) {
            if (this.hn != null) {
                this.visualSeriesLink.legendItemBadgeTemplate = this.hn;
            }
            else {
                this.visualSeriesLink.legendItemBadgeTemplate = null;
            }
        }
    };
    StackedFragmentSeries.prototype.gk = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.ho = this.hr != null ? this.hr : this.parentSeries.legendItemTemplate;
        if (this.visualSeriesLink != null) {
            if (this.ho != null) {
                this.visualSeriesLink.legendItemTemplate = this.ho;
            }
            else {
                this.visualSeriesLink.legendItemTemplate = null;
            }
        }
    };
    StackedFragmentSeries.prototype.gl = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.ls = this.parentSeries.legendItemVisibility != 0 ? 1 : this.lu;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.legendItemVisibility = this.ls;
        }
    };
    StackedFragmentSeries.prototype.gi = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.q = this.r != 0 ? this.r : this.parentSeries.legendItemBadgeShape;
        if (this.visualSeriesLink != null) {
            if (this.q != 0) {
                this.visualSeriesLink.legendItemBadgeShape = this.q;
            }
            else {
                this.visualSeriesLink.legendItemBadgeShape = 0;
            }
        }
    };
    StackedFragmentSeries.prototype.gh = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.o = this.p != 0 ? this.p : this.parentSeries.be;
        if (this.visualSeriesLink != null) {
            if (this.o != 0) {
                this.visualSeriesLink.be = this.o;
            }
            else {
                this.visualSeriesLink.be = 0;
            }
        }
    };
    StackedFragmentSeries.prototype.go = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.kv = this.k0 != null ? this.k0 : this.parentSeries.yo;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.yo = this.kv;
        }
    };
    StackedFragmentSeries.prototype.gr = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.kw = this.k1 != null ? this.k1 : this.parentSeries.yp;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.yp = this.kw;
        }
    };
    StackedFragmentSeries.prototype.gt = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.lq = this.lr != null ? this.lr : this.parentSeries.yq;
        if (this.visualSeriesLink != null) {
            if (this.lq != null) {
                this.visualSeriesLink.yq = this.lq;
            }
            else {
                this.visualSeriesLink.yq = null;
            }
        }
    };
    StackedFragmentSeries.prototype.gx = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bf = !isNaN_(this.by) || this.ay("Opacity") ? this.by : this.parentSeries._opacity;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink._opacity = this.bf;
        }
    };
    StackedFragmentSeries.prototype.gy = function () {
    };
    StackedFragmentSeries.prototype.gz = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.ky = this.k3 != null ? this.k3 : this.parentSeries.v0;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.v0 = this.ky;
        }
    };
    StackedFragmentSeries.prototype.gg = function () {
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.itemsSource = this.itemsSource;
        }
    };
    StackedFragmentSeries.prototype.f9 = function () {
        var a = this.highlightedItemsSource;
        if (a == null && this.parentSeries != null) {
            a = this.parentSeries.highlightedItemsSource;
        }
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.highlightedItemsSource = a;
        }
    };
    StackedFragmentSeries.prototype.f3 = function () {
        if (this.parentSeries == null) {
            return;
        }
        var a = NaN;
        if (this.parentSeries.isStacked && this.parentSeries.ew && !this.parentSeries.f1) {
            a = this.parentSeries.ia;
        }
        if (this.parentSeries.isStacked && this.parentSeries.ew && this.parentSeries.f1) {
            a = this.parentSeries.ia;
        }
        this.bb = !isNaN_(this.bm) || this.ay("AreaFillOpacity") ? this.bm : a;
        if (this.visualSeriesLink != null) {
            if (typeCast(AreaFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.il = this.bb;
            }
            if (typeCast(SplineAreaFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.il = this.bb;
            }
        }
    };
    StackedFragmentSeries.prototype.ge = function () {
        if (this.parentSeries == null) {
            return;
        }
        var a = false;
        if (this.parentSeries.isStacked && this.parentSeries.f1 && this.parentSeries.ew) {
            a = this.parentSeries.ab7;
        }
        if (this.parentSeries.isStacked && this.parentSeries.ez) {
            a = this.parentSeries.ab7;
        }
        this.an = a;
        if (this.visualSeriesLink != null) {
            if (typeCast(SplineFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.ac5 = this.an;
            }
            if (typeCast(SplineAreaFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.ac5 = this.an;
            }
        }
    };
    StackedFragmentSeries.prototype.g1 = function () {
        if (this.parentSeries == null) {
            return;
        }
        var a = NaN;
        if (this.parentSeries.isStacked && this.parentSeries.e1) {
            a = this.parentSeries.ab7;
        }
        if (this.parentSeries.isStacked && this.parentSeries.ez) {
            a = this.parentSeries.ab7;
        }
        this.bg = !isNaN_(this.bz) && this.bz != a ? this.bz : a;
        if (this.visualSeriesLink != null) {
            if (typeCast(ColumnFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.adf = this.bg;
            }
            if (typeCast(BarFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.adf = this.bg;
            }
        }
    };
    StackedFragmentSeries.prototype.g2 = function () {
        if (this.parentSeries == null) {
            return;
        }
        var a = NaN;
        if (this.parentSeries.isStacked && this.parentSeries.e1) {
            a = this.parentSeries.ab8;
        }
        if (this.parentSeries.isStacked && this.parentSeries.ez) {
            a = this.parentSeries.ab8;
        }
        this.bh = !isNaN_(this.b0) && this.b0 != a ? this.b0 : a;
        if (this.visualSeriesLink != null) {
            if (typeCast(ColumnFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.adg = this.bh;
            }
            if (typeCast(BarFragment.$, this.visualSeriesLink) !== null) {
                this.visualSeriesLink.adg = this.bh;
            }
        }
    };
    StackedFragmentSeries.prototype.gm = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.la = this.at("StartCap") ? this.parentSeries.v9 : this.lc;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.v9 = this.la;
        }
    };
    StackedFragmentSeries.prototype.g7 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.bl = !isNaN_(this.b4) && this.b4 != this.parentSeries.jq ? this.b4 : this.parentSeries.jq;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.jq = this.bl;
        }
    };
    StackedFragmentSeries.prototype.gn = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.wa = this.parentSeries.wa;
        }
    };
    StackedFragmentSeries.prototype.gv = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.be = !isNaN_(this.bx) || this.ay("MarkerThickness") ? this.bx : this.parentSeries.xo;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.xo = this.be;
        }
    };
    StackedFragmentSeries.prototype.g9 = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.toolTip = this.ck;
        }
    };
    StackedFragmentSeries.prototype.hb = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.ag = this.ai || this.parentSeries.de;
    };
    StackedFragmentSeries.prototype.ha = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.parentSeries.ke != 0) {
            this.b6 = this.parentSeries.ke;
            return;
        }
        this.b6 = this.at("IsDropShadowEnabled") ? this.parentSeries.ke : this.cd;
    };
    StackedFragmentSeries.prototype.hd = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.ah = this.at("IsDropShadowEnabled") ? this.parentSeries.df : this.aj;
    };
    StackedFragmentSeries.prototype.he = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.parentSeries.za != 0) {
            this.m = this.parentSeries.za;
            return;
        }
        this.m = this.n;
    };
    StackedFragmentSeries.prototype.hf = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.parentSeries.c6 != 0) {
            this.ad = this.parentSeries.c6;
            return;
        }
        this.ad = this.ae;
    };
    StackedFragmentSeries.prototype.gf = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.parentSeries.zq != false) {
            this.ao = this.parentSeries.zq;
            return;
        }
        this.ao = this.ax;
    };
    StackedFragmentSeries.prototype.hc = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.parentSeries.kf != 1000) {
            this.b7 = this.parentSeries.kf;
            return;
        }
        this.b7 = this.ce;
    };
    StackedFragmentSeries.prototype.hh = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.aq = this.at("UseLightweightMarkers") ? this.parentSeries.xn : this.a3;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.xn = this.aq;
        }
    };
    StackedFragmentSeries.prototype.g8 = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.title = this.cj;
        }
    };
    StackedFragmentSeries.prototype.gp = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.s = this.t != 0 ? this.t : this.parentSeries.w5;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.w5 = this.s;
        }
    };
    StackedFragmentSeries.prototype.gs = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.u = this.v != 0 ? this.v : this.parentSeries.w9;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.w9 = this.u;
        }
    };
    StackedFragmentSeries.prototype.hg = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.zv = this.ay("UseHighMarkerFidelity") ? this.a2 : this.parentSeries.zv;
        }
    };
    StackedFragmentSeries.prototype.hk = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.d2 = this.ay("ValueMemberAsLegendUnit") ? this.fr : null;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.abp = this.fr;
        }
    };
    StackedFragmentSeries.prototype.hj = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.d0 = this.ay("ValueMemberAsLegendLabel") ? this.fp : this.cj != null ? this.cj.toString() : null;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.abn = this.d0;
        }
    };
    StackedFragmentSeries.prototype.f7 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.cp = this.ay("DataLegendGroup") ? this.d9 : this.eb();
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.l5 = this.cp;
        }
    };
    StackedFragmentSeries.prototype.f8 = function () {
        if (this.parentSeries == null) {
            return;
        }
        this.cr = this.ay("HighlightedDataLegendGroup") ? this.ed : this.d9;
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.ml = this.cr;
        }
    };
    StackedFragmentSeries.prototype.hl = function () {
        if (this.parentSeries == null) {
            return;
        }
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.abr = this.ft;
        }
    };
    StackedFragmentSeries.prototype.f0 = function (a, b, c) {
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
        if (this.propertyUpdated != null) {
            this.propertyUpdated(this, new PropertyUpdatedEventArgs(a, b, c));
        }
    };
    StackedFragmentSeries.prototype.at = function (a) {
        return !this.a5.contains(a);
    };
    StackedFragmentSeries.prototype.ay = function (a) {
        return this.a5.contains(a);
    };
    StackedFragmentSeries.prototype.fy = function (a, b, c, d) {
        if (this.parentSeries == null) {
            return;
        }
        if (!this.a5.contains(b)) {
            this.a5.add(b);
        }
        switch (b) {
            case StackedFragmentSeries.$$p[92]:
                this.g8();
                break;
            case StackedFragmentSeries.$$p[105]:
                this.hl();
                break;
            case StackedFragmentSeries.$$p[104]:
                this.hk();
                break;
            case StackedFragmentSeries.$$p[103]:
                this.hj();
                break;
            case StackedFragmentSeries.$$p[106]:
                this.hm();
                break;
            case StackedFragmentSeries.$$p[52]:
                this.f4();
                break;
            case StackedFragmentSeries.$$p[53]:
                this.f5();
                break;
            case StackedFragmentSeries.$$p[54]:
                this.f6();
                break;
            case StackedFragmentSeries.$$p[59]:
                this.gc();
                break;
            case StackedFragmentSeries.$$p[87]:
                this.g3();
                break;
            case StackedFragmentSeries.$$p[88]:
                this.g4();
                break;
            case StackedFragmentSeries.$$p[102]:
                this.hi();
                break;
            case StackedFragmentSeries.$$p[89]:
                this.g5();
                break;
            case StackedFragmentSeries.$$p[90]:
                this.g6();
                break;
            case StackedFragmentSeries.$$p[69]:
                this.gm();
                break;
            case StackedFragmentSeries.$$p[60]:
                this.gd();
                break;
            case StackedFragmentSeries.$$p[76]:
                this.gu();
                break;
            case StackedFragmentSeries.$$p[78]:
                this.gw();
                break;
            case StackedFragmentSeries.$$p[71]:
                this.gp();
                break;
            case StackedFragmentSeries.$$p[73]:
                this.gs();
                break;
            case StackedFragmentSeries.$$p[66]:
                this.gj();
                break;
            case StackedFragmentSeries.$$p[67]:
                this.gk();
                break;
            case StackedFragmentSeries.$$p[68]:
                this.gl();
                break;
            case StackedFragmentSeries.$$p[65]:
                this.gi();
                break;
            case StackedFragmentSeries.$$p[64]:
                this.gh();
                break;
            case StackedFragmentSeries.$$p[70]:
                this.go();
                break;
            case StackedFragmentSeries.$$p[74]:
                this.gr();
                break;
            case StackedFragmentSeries.$$p[75]:
                this.gt();
                break;
            case StackedFragmentSeries.$$p[77]:
                this.gv();
                break;
            case StackedFragmentSeries.$$p[81]:
                this.gx();
                break;
            case StackedFragmentSeries.$$p[80]:
                this.gy();
                break;
            case StackedFragmentSeries.$$p[63]:
                this.gg();
                break;
            case StackedFragmentSeries.$$p[56]:
                this.f9();
                break;
            case StackedFragmentSeries.$$p[83]:
                this.gz();
                break;
            case StackedFragmentSeries.$$p[82]:
                this.g0();
                break;
            case StackedFragmentSeries.$$p[72]:
                this.gq();
                break;
            case StackedFragmentSeries.$$p[51]:
                this.f3();
                break;
            case StackedFragmentSeries.$$p[85]:
                this.g1();
                break;
            case StackedFragmentSeries.$$p[86]:
                this.g2();
                break;
            case StackedFragmentSeries.$$p[61]:
                this.ge();
                break;
            case StackedFragmentSeries.$$p[91]:
                this.g7();
                break;
            case StackedFragmentSeries.$$p[93]:
                this.g9();
                break;
            case StackedFragmentSeries.$$p[95]:
                this.hb();
                break;
            case StackedFragmentSeries.$$p[97]:
                this.hd();
                break;
            case StackedFragmentSeries.$$p[94]:
                this.ha();
                break;
            case StackedFragmentSeries.$$p[62]:
                this.gf();
                break;
            case StackedFragmentSeries.$$p[98]:
                this.he();
                break;
            case StackedFragmentSeries.$$p[99]:
                this.hf();
                break;
            case StackedFragmentSeries.$$p[96]:
                this.hc();
                break;
            case StackedFragmentSeries.$$p[101]:
                this.hh();
                break;
            case StackedFragmentSeries.$$p[100]:
                this.hg();
                break;
        }
        this.parentSeries.ru(false);
    };
    StackedFragmentSeries.prototype.f1 = function () {
        if (this.visualSeriesLink != null) {
            this.visualSeriesLink.rz();
        }
    };
    StackedFragmentSeries.$t = markType(StackedFragmentSeries, 'StackedFragmentSeries', DependencyObject.$, [INotifyPropertyChanged_$type]);
    StackedFragmentSeries.$$p = markDep(DependencyProperty, PropertyMetadata, StackedFragmentSeries, 'f0', ['ActualAreaFillOpacity:bb:ht', [1, NaN], 'ActualBrush:ku:hu', [Brush.$], 'ActualDashArray:k7:hv', [DoubleCollection.$], 'ActualDashCap:k9:hw', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)], 'ActualDataLegendGroup:cp:hx', [2, null], 'ActualHighlightedValuesDataLegendGroup:cr:hy', [2, null], 'ActualHighlightedValuesDisplayMode:z:hz', [SeriesHighlightedValuesDisplayMode_$type, enumGetBox(SeriesHighlightedValuesDisplayMode_$type, 1)], 'ActualHighlightingFadeOpacity:bc:h0', [1, NaN], 'ActualIsDropShadowEnabled:al:h1', [0, false], 'ActualIsHitTestVisible:am:h2', [0, true], 'ActualIsSplineShapePartOfRange:an:h3', [0, false], 'ActualIsTransitionInEnabled:ao:h4', [0], 'ActualLegendItemBadgeMode:o:h5', [LegendItemBadgeMode_$type], 'ActualLegendItemBadgeShape:q:h6', [LegendItemBadgeShape_$type], 'ActualLegendItemBadgeTemplate:hn:h7', [DataTemplate.$], 'ActualLegendItemTemplate:ho:h8', [DataTemplate.$], 'ActualLegendItemVisibility:ls:h9', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'ActualLineCap:la:ia', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)], 'ActualMarkerBrush:kv:ib', [Brush.$], 'ActualMarkerFillMode:s:ic', [MarkerFillMode_$type, enumGetBox(MarkerFillMode_$type, 0)], 'ActualMarkerFillOpacity:bd:id', [1, NaN], 'ActualMarkerOutlineMode:u:ie', [MarkerOutlineMode_$type, enumGetBox(MarkerOutlineMode_$type, 0)], 'ActualMarkerOutline:kw:ig', [Brush.$], 'ActualMarkerStyle:lq:ih', [Style.$], 'ActualMarkerTemplate:hp:ii', [DataTemplate.$], 'ActualMarkerThickness:be:ij', [1, 1], 'ActualMarkerType:w:ik', [MarkerType_$type, enumGetBox(MarkerType_$type, 1)], 'ActualOpacityMask:kx:il', [Brush.$], 'ActualOpacity:bf:im', [1, NaN], 'ActualOutlineMode:aa:io', [SeriesOutlineMode_$type, enumGetBox(SeriesOutlineMode_$type, 0)], 'ActualOutline:ky:ip', [Brush.$], 'ActualRadiusX:bg:iq', [1, 0], 'ActualRadiusY:bh:ir', [1, 0], 'ActualShadowBlur:bi:is', [1, NaN], 'ActualShadowColor:k5:it', [Color.$], 'ActualShadowOffsetX:bj:iu', [1, NaN], 'ActualShadowOffsetY:bk:iv', [1, NaN], 'ActualThickness:bl:iw', [1, 1], 'ActualToolTip:cf:ix', [4], 'ActualTransitionDuration:b6:iy', [1], 'ActualTransitionEasingFunction:ag:iz', [Delegate_$type], 'ActualTransitionInDuration:b7:i0', [1], 'ActualTransitionInEasingFunction:ah:i1', [Delegate_$type], 'ActualTransitionInMode:m:i2', [CategoryTransitionInMode_$type], 'ActualTransitionInSpeedType:ad:i3', [TransitionInSpeedType_$type], 'ActualUseHighMarkerFidelity:ap:i4', [0, false], 'ActualUseLightweightMarkers:aq:i5', [0, false], 'ActualUseSingleShadow:ar:i6', [0, true], 'ActualValueMemberAsLegendLabel:d0:i7', [2, null], 'ActualValueMemberAsLegendUnit:d2:i8', [2, null], 'ActualVisibility:lt:i9', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'AreaFillOpacity:bm:ja', [1, NaN], 'Brush:kz:jb', [Brush.$], 'DashArray:k8:jc', [DoubleCollection.$], 'DashCap:lb:jd', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)], 'DataLegendGroup:d9:je', [2, null], 'HighlightedItemsSource::jf', [IEnumerable_$type, null], 'HighlightedValuesDataLegendGroup:ed:jg', [2, null], 'HighlightingFadeOpacity:bv:jh', [1, NaN], 'IsDropShadowEnabled:au:ji', [0], 'IsHitTestVisible:av:jj', [0, true], 'IsSplineShapePartOfRange:aw:jk', [0, false], 'IsTransitionInEnabled:ax:jl', [0, false], 'ItemsSource::jm', [IEnumerable_$type, null], 'LegendItemBadgeMode:p:jn', [LegendItemBadgeMode_$type, enumGetBox(LegendItemBadgeMode_$type, 0)], 'LegendItemBadgeShape:r:jo', [LegendItemBadgeShape_$type, enumGetBox(LegendItemBadgeShape_$type, 0)], 'LegendItemBadgeTemplate:hq:jp', [DataTemplate.$, null], 'LegendItemTemplate:hr:jq', [DataTemplate.$, null], 'LegendItemVisibility:lu:jr', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'LineCap:lc:js', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)], 'MarkerBrush:k0:jt', [Brush.$], 'MarkerFillMode:t:ju', [MarkerFillMode_$type, enumGetBox(MarkerFillMode_$type, 0)], 'MarkerFillOpacity:bw:jv', [1, NaN], 'MarkerOutlineMode:v:jw', [MarkerOutlineMode_$type, enumGetBox(MarkerOutlineMode_$type, 0)], 'MarkerOutline:k1:jx', [Brush.$], 'MarkerStyle:lr:jy', [Style.$], 'MarkerTemplate:hs:jz', [DataTemplate.$, null], 'MarkerThickness:bx:j0', [1, NaN], 'MarkerType:x:j1', [MarkerType_$type, enumGetBox(MarkerType_$type, 2)], 'Name:e0:j2', [2], 'OpacityMask:k2:j3', [Brush.$], 'Opacity:by:j4', [1, 1], 'OutlineMode:ab:j5', [SeriesOutlineMode_$type, enumGetBox(SeriesOutlineMode_$type, 0)], 'Outline:k3:j6', [Brush.$, null], 'ParentOrLocalBrush:k4:j7', [Brush.$], 'RadiusX:bz:j8', [1, NaN], 'RadiusY:b0:j9', [1, NaN], 'ShadowBlur:b1:ka', [1, NaN], 'ShadowColor:k6:kb', [Color.$], 'ShadowOffsetX:b2:kc', [1, NaN], 'ShadowOffsetY:b3:kd', [1, NaN], 'Thickness:b4:ke', [1, NaN], 'Title:cj:kf', [4, "Series Title"], 'ToolTip:ck:kg', [4, null], 'TransitionDuration:cd:kh', [1, 0], 'TransitionEasingFunction:ai:ki', [Delegate_$type, null], 'TransitionInDuration:ce:kj', [1, 1000], 'TransitionInEasingFunction:aj:kk', [Delegate_$type, null], 'TransitionInMode:n:kl', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'TransitionInSpeedType:ae:km', [TransitionInSpeedType_$type, enumGetBox(TransitionInSpeedType_$type, 0)], 'UseHighMarkerFidelity:a2:kn', [0, false], 'UseLightweightMarkers:a3:ko', [0, false], 'UseSingleShadow:a4:kp', [0], 'ValueMemberAsLegendLabel:fp:kq', [2, null], 'ValueMemberAsLegendUnit:fr:kr', [2, null], 'ValueMemberPath:ft:ks', [2, null], 'Visibility:lv:kt', [Visibility_$type, enumGetBox(Visibility_$type, 0)]]);
    return StackedFragmentSeries;
}(DependencyObject));
export { StackedFragmentSeries };
/**
 * @hidden
 */
var StackedSeriesCollection = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSeriesCollection, _super);
    function StackedSeriesCollection() {
        var _this = _super.call(this, StackedFragmentSeries.$, 0) || this;
        _this.collectionResetting = null;
        return _this;
    }
    StackedSeriesCollection.prototype.p = function () {
        if (this.collectionResetting != null) {
            this.collectionResetting(this, null);
        }
        _super.prototype.p.call(this);
    };
    StackedSeriesCollection.$t = markType(StackedSeriesCollection, 'StackedSeriesCollection', ObservableCollection$1.$.specialize(StackedFragmentSeries.$));
    return StackedSeriesCollection;
}(ObservableCollection$1));
export { StackedSeriesCollection };
/**
 * @hidden
 */
var StackedSeriesFramePreparer = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSeriesFramePreparer, _super);
    function StackedSeriesFramePreparer(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = this;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0:
                {
                    var c = _rest[0];
                    _this = _super.call(this, 0, c) || this;
                }
                break;
            case 1:
                {
                    var c = _rest[0];
                    var d = _rest[1];
                    var e = _rest[2];
                    var f = _rest[3];
                    var g = _rest[4];
                    _this = _super.call(this, 1, c, d, e, f, g) || this;
                }
                break;
        }
        return _this;
    }
    StackedSeriesFramePreparer.prototype.j = function (a) {
        var b = new SingleValuesHolder();
        if (typeCast(StackedColumnSeries.$, this.h) !== null || typeCast(StackedBarSeries.$, this.h) !== null) {
            var c = typeCast(StackedSeriesBase.$, this.h);
            if (c.aa0.count > 0) {
                b.f = c.aa0._inner[0].ak;
            }
            return b;
        }
        var d = this.ad.valueColumn;
        b.f = d;
        return b;
    };
    StackedSeriesFramePreparer.prototype.t = function (a, b, c, d, e) {
        var _this = this;
        var f = 0;
        var g = false;
        var h;
        var i = a.d != null;
        var j = this.h.provideCollisionDetector();
        var k = a.f;
        var l = a.n;
        var m = this.h.mayContainUnknowns;
        var n = new ScalerParams(0, a.p, a.o, a.b.j$b, l);
        var o = new ScalerParams(0, a.p, a.o, a.c.j$b, l);
        o.b = this.h.getHostReferenceValue();
        var p = (a.b.j$d(2, n) - a.b.j$d(1, n));
        var q = a.p;
        var r = a.o;
        var s = typeCast(NumericAxisBase.$, a.c) !== null && a.c.lp;
        var _loop_4 = function (t) {
            var u = void 0;
            if (a.d == null) {
                if (!m) {
                    u = this_2.g.getBucketWithoutUnknowns(t);
                }
                else {
                    u = this_2.g.getBucket(t);
                }
            }
            else {
                u = ((function () { var v = _this.f(a, t, b, p, g, h, c); t = v.p1; g = v.p4; h = v.p5; return v.ret; })());
            }
            var v = !s || (s && u[1] > 0);
            var w = u[0];
            if (!isNaN_(u[0])) {
                this_2.x(a, u, c, i, n, o);
                a.a.h.add(u);
                var x = t * a.j;
                var y = x;
                if (a.d != null && a.d.i$b != null && x >= 0 && x < a.d.i$b.count) {
                    x = a.d.i$b._inner[x];
                }
                var z = u;
                if (k && x < b.e) {
                    z = new Array(u.length);
                    z[0] = w;
                    this_2.z(b, x, true, a.e);
                    z[1] = b.c;
                    z[2] = b.d;
                    this_2.x(a, z, c, i, n, o);
                }
                if (d && v && this_2.l(a.a, z, j, Math.min(x, b.e - 1), f, a.a.h.count - 1)) {
                    ++f;
                }
            }
            out_t_1 = t;
        };
        var this_2 = this, out_t_1;
        for (var t = a.k; t <= a.l; ++t) {
            _loop_4(t);
            t = out_t_1;
        }
        return f;
    };
    StackedSeriesFramePreparer.prototype.l = function (a, b, c, d, e, f) {
        var g = b[0];
        var h = b[1];
        if (typeCast(IBarSeries_$type, this.c) !== null) {
            h = b[0];
            g = b[1];
        }
        var i = new Rect(0, g - 5, h - 5, 11, 11);
        if (!isNaN_(g) && !isNaN_(h) && !isInfinity(g) && !isInfinity(h) && c.tryAdd(i)) {
            a.p.add({ $type: Point_$type, x: g, y: h });
            this.c.updateMarkerTemplate(e, d, f);
            return true;
        }
        return false;
    };
    StackedSeriesFramePreparer.$t = markType(StackedSeriesFramePreparer, 'StackedSeriesFramePreparer', CategoryFramePreparer.$);
    return StackedSeriesFramePreparer;
}(CategoryFramePreparer));
export { StackedSeriesFramePreparer };
/**
 * @hidden
 */
var AreaFragmentView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(AreaFragmentView, _super);
    function AreaFragmentView(a) {
        var _this = _super.call(this, a) || this;
        _this.dt = null;
        _this.dz = new Path();
        _this.d1 = new Path();
        _this.d0 = new Path();
        _this.d2 = new Path();
        _this.dv = new Path();
        _this.dx = new Path();
        _this.dw = new Path();
        _this.dy = new Path();
        _this.dt = a;
        return _this;
    }
    AreaFragmentView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
        }
    };
    AreaFragmentView.prototype.du = function () {
        this.dz.an = null;
        this.d0.an = null;
        this.d1.an = null;
        this.d2.an = null;
        this.dv.an = null;
        this.dw.an = null;
        this.dx.an = null;
        this.dy.an = null;
    };
    AreaFragmentView.prototype.da = function () {
        return new AreaFragmentBucketCalculator(this);
    };
    AreaFragmentView.prototype.bp = function () {
        _super.prototype.bp.call(this);
    };
    AreaFragmentView.prototype.bq = function () {
        _super.prototype.bq.call(this);
        var a = this.b3();
        this.dv.an = this.dz.an;
        this.dw.an = this.d0.an;
        this.dx.an = this.d1.an;
        this.dy.an = this.d2.an;
        this.dv._fill = a;
        this.dw._fill = a;
        this.dv._opacity = 1;
        this.dw._opacity = 1;
        this.dx._stroke = a;
        this.dx.ad = this.f.ig + 3;
        this.dy._stroke = a;
        this.dy.ad = this.f.ig + 3;
    };
    AreaFragmentView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dv);
                a.t(this.dw);
                a.t(this.dx);
                a.t(this.dy);
            }
            else {
                a.t(this.dz);
                a.t(this.d0);
                a.t(this.d1);
                a.t(this.d2);
            }
        }
    };
    AreaFragmentView.prototype.get_index = function () {
        var a = this.dt.parentSeries;
        var b = a.series.count;
        var c = a.series.indexOf(this.dt.logicalSeriesLink);
        var d = (b - 1) - c;
        var e = a.cw.index;
        return e + d;
    };
    AreaFragmentView.prototype.ax = function (a) {
        _super.prototype.ax.call(this, a);
        this.f.bc.exportPathData(a, this.d1, "lowerShape", ["Lower"]);
        this.f.bc.exportPathData(a, this.d2, "upperShape", ["Upper", "Main"]);
        this.f.bc.exportPathData(a, this.d0, "translucentShape", ["Translucent"]);
        this.f.bc.exportPathData(a, this.dz, "fillShape", ["Fill"]);
    };
    AreaFragmentView.$t = markType(AreaFragmentView, 'AreaFragmentView', AnchoredCategorySeriesView.$);
    return AreaFragmentView;
}(AnchoredCategorySeriesView));
export { AreaFragmentView };
/**
 * @hidden
 */
var ColumnFragmentView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ColumnFragmentView, _super);
    function ColumnFragmentView(a) {
        var _this = _super.call(this, a) || this;
        _this.dt = null;
        _this.dx = null;
        _this.du = null;
        _this.dv = null;
        _this.dw = null;
        _this.d2 = new Rectangle();
        _this.dt = a;
        _this.dv = new List$1(Number_$type, 0);
        _this.dw = new List$1(Number_$type, 0);
        _this.du = ((function () {
            var $ret = new Pool$1(Rectangle.$);
            $ret.create = runOn(_this, _this.d3);
            $ret.activate = runOn(_this, _this.dy);
            $ret.disactivate = runOn(_this, _this.d0);
            $ret.destroy = runOn(_this, _this.dz);
            return $ret;
        })());
        _this.dx = new List$1(Rectangle.$, 0);
        return _this;
    }
    ColumnFragmentView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
        }
    };
    ColumnFragmentView.prototype.d3 = function () {
        var _this = this;
        var a = ((function () {
            var $ret = new Rectangle();
            $ret.dataContext = ((function () {
                var $ret = new DataContext();
                $ret.series = _this.f;
                return $ret;
            })());
            return $ret;
        })());
        this.dx.add(a);
        a._visibility = 1;
        return a;
    };
    ColumnFragmentView.prototype.dy = function (a) {
        a._visibility = 0;
    };
    ColumnFragmentView.prototype.d0 = function (a) {
        a._visibility = 1;
    };
    ColumnFragmentView.prototype.dz = function (a) {
        this.dx.remove(a);
    };
    ColumnFragmentView.prototype.bs = function (a, b) {
        _super.prototype.bs.call(this, a, b);
        var c = a;
    };
    ColumnFragmentView.prototype.d1 = function (a, b, c) {
        var d = false;
        if (a.o != c) {
            d = true;
            a.o = c;
        }
        if (a.n != b) {
            d = true;
            a.n = b;
        }
        if (d) {
            this.a2();
        }
    };
    ColumnFragmentView.prototype.bt = function (a, b) {
        _super.prototype.bt.call(this, a, b);
    };
    ColumnFragmentView.prototype.ak = function (a) {
        return this.dx._inner[a];
    };
    ColumnFragmentView.prototype.aj = function (a) {
        var b = this.dx._inner[a];
        this.d2._visibility = b._visibility;
        this.d2.n = b.n;
        this.d2.o = b.o;
        this.d2.width = b.width;
        this.d2.height = b.height;
        var c = this.b4(a);
        this.d2._fill = c;
        this.d2._stroke = c;
        this.d2.ad = this.f.ig + 3;
        return this.d2;
    };
    ColumnFragmentView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            for (var c = 0; c < this.dx.count; c++) {
                var d = this.ai(c, b);
                this.br(d, c, b);
                a.w(d);
            }
        }
    };
    ColumnFragmentView.prototype.get_index = function () {
        var a = this.dt.parentSeries;
        var b = a.series.count;
        var c = a.series.indexOf(this.dt.logicalSeriesLink);
        var d = (b - 1) - c;
        var e = a.cw.index;
        return e + d;
    };
    ColumnFragmentView.prototype.ax = function (a) {
        var e_70, _a, e_71, _b;
        _super.prototype.ax.call(this, a);
        var b = 0;
        var c = new List$1(Rectangle.$, 0);
        try {
            for (var _c = __values(fromEnum(this.du.a)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var d = _d.value;
                c.add(d);
            }
        }
        catch (e_70_1) {
            e_70 = { error: e_70_1 };
        }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return))
                    _a.call(_c);
            }
            finally {
                if (e_70)
                    throw e_70.error;
            }
        }
        c.aa(function (e, f) {
            if (e.n < f.n) {
                return -1;
            }
            else if (e.n > f.n) {
                return 1;
            }
            else {
                return 0;
            }
        });
        try {
            for (var _e = __values(fromEnum(c)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var e = _f.value;
                this.f.bc.exportRectangleData(a, e, "column" + b, ["Main", "Fill"]);
            }
        }
        catch (e_71_1) {
            e_71 = { error: e_71_1 };
        }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return))
                    _b.call(_e);
            }
            finally {
                if (e_71)
                    throw e_71.error;
            }
        }
        b++;
    };
    ColumnFragmentView.prototype.getDefaultTooltipTemplate = function () {
        var a = "<div class='ui-chart-default-tooltip-content'>";
        var b = null;
        if (this.dt.yx().cb) {
            b = this.dt.fragmentXAxis;
        }
        else if (this.dt.fragmentYAxis.cb) {
            b = this.dt.fragmentYAxis;
        }
        if (b.ce) {
            var c = b;
            a += "<span>${item." + c.dateTimeMemberPath + "}</span><br/>";
        }
        if (b != null && b.f2 != null) {
            a += "<span>${item." + b.f2 + "}</span><br/>";
        }
        a += "<span";
        var d = this.f.ba.a$u(this.f);
        if (!stringIsNullOrEmpty(d)) {
            a += " style='color:" + d + "'";
        }
        a += ">" + this.dt.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.dt.abr + "}</span></div>";
        return a;
    };
    ColumnFragmentView.$t = markType(ColumnFragmentView, 'ColumnFragmentView', AnchoredCategorySeriesView.$);
    return ColumnFragmentView;
}(AnchoredCategorySeriesView));
export { ColumnFragmentView };
/**
 * @hidden
 */
var LineFragmentView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineFragmentView, _super);
    function LineFragmentView(a) {
        var _this = _super.call(this, a) || this;
        _this.dt = null;
        _this.dz = new Path();
        _this.dy = new Path();
        _this.d0 = new Path();
        _this.dw = new Path();
        _this.dv = new Path();
        _this.dx = new Path();
        _this.dt = a;
        return _this;
    }
    LineFragmentView.prototype.du = function () {
        this.dy.an = null;
        this.dz.an = null;
        this.d0.an = null;
        this.dv.an = null;
        this.dw.an = null;
        this.dx.an = null;
    };
    LineFragmentView.prototype.da = function () {
        return new LineFragmentBucketCalculator(this);
    };
    LineFragmentView.prototype.bp = function () {
        _super.prototype.bp.call(this);
    };
    LineFragmentView.prototype.bq = function () {
        _super.prototype.bq.call(this);
        var a = this.b3();
        this.dv.an = this.dy.an;
        this.dw.an = this.dz.an;
        this.dx.an = this.d0.an;
        this.dw._stroke = a;
        this.dw.ad = this.f.ig + 3;
        this.dx._stroke = a;
        this.dx.ad = this.f.ig + 3;
        this.dv._fill = a;
        this.dv._opacity = 1;
    };
    LineFragmentView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dv);
                a.t(this.dw);
                a.t(this.dx);
            }
            else {
                a.t(this.dy);
                a.t(this.dz);
                a.t(this.d0);
            }
        }
    };
    LineFragmentView.prototype.get_index = function () {
        var a = this.dt.parentSeries;
        var b = a.series.count;
        var c = a.series.indexOf(this.dt.logicalSeriesLink);
        var d = (b - 1) - c;
        var e = a.cw.index;
        return e + d;
    };
    LineFragmentView.prototype.ax = function (a) {
        _super.prototype.ax.call(this, a);
        this.f.bc.exportPathData(a, this.dz, "lowerShape", ["Lower", "Main"]);
        this.f.bc.exportPathData(a, this.d0, "upperShape", ["Upper"]);
        this.f.bc.exportPathData(a, this.dy, "translucentShape", ["Translucent"]);
    };
    LineFragmentView.$t = markType(LineFragmentView, 'LineFragmentView', AnchoredCategorySeriesView.$);
    return LineFragmentView;
}(AnchoredCategorySeriesView));
export { LineFragmentView };
/**
 * @hidden
 */
var SplineAreaFragmentView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaFragmentView, _super);
    function SplineAreaFragmentView(a) {
        var _this = _super.call(this, a) || this;
        _this.dv = null;
        _this.d1 = new Path();
        _this.d3 = new Path();
        _this.d2 = new Path();
        _this.d4 = new Path();
        _this.dx = new Path();
        _this.dz = new Path();
        _this.dy = new Path();
        _this.d0 = new Path();
        _this.dv = a;
        return _this;
    }
    SplineAreaFragmentView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
        }
    };
    SplineAreaFragmentView.prototype.dw = function () {
        this.d1.an = null;
        this.d2.an = null;
        this.d3.an = null;
        this.d4.an = null;
        this.dx.an = null;
        this.dy.an = null;
        this.dz.an = null;
        this.d0.an = null;
    };
    SplineAreaFragmentView.prototype.bp = function () {
        _super.prototype.bp.call(this);
    };
    SplineAreaFragmentView.prototype.bq = function () {
        _super.prototype.bq.call(this);
        var a = this.b3();
        this.dx.an = this.d1.an;
        this.dy.an = this.d2.an;
        this.dz.an = this.d3.an;
        this.d0.an = this.d4.an;
        this.dx._fill = a;
        this.dy._fill = a;
        this.dy._opacity = 1;
        this.dx._opacity = 1;
        this.dz._stroke = a;
        this.dz.ad = this.f.ig + 3;
        this.d0._stroke = a;
        this.d0.ad = this.f.ig + 3;
    };
    SplineAreaFragmentView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dx);
                a.t(this.dy);
                a.t(this.dz);
                a.t(this.d0);
            }
            else {
                a.t(this.d1);
                a.t(this.d2);
                a.t(this.d3);
                a.t(this.d4);
            }
        }
    };
    SplineAreaFragmentView.prototype.get_index = function () {
        var a = this.dv.parentSeries;
        var b = a.series.count;
        var c = a.series.indexOf(this.dv.logicalSeriesLink);
        var d = (b - 1) - c;
        var e = a.cw.index;
        return e + d;
    };
    SplineAreaFragmentView.prototype.ax = function (a) {
        _super.prototype.ax.call(this, a);
        this.f.bc.exportPathData(a, this.d3, "lowerShape", ["Lower"]);
        this.f.bc.exportPathData(a, this.d4, "upperShape", ["Upper", "Main"]);
        this.f.bc.exportPathData(a, this.d2, "translucentShape", ["Translucent"]);
        this.f.bc.exportPathData(a, this.d1, "fillShape", ["Fill"]);
    };
    SplineAreaFragmentView.$t = markType(SplineAreaFragmentView, 'SplineAreaFragmentView', SplineSeriesBaseView.$);
    return SplineAreaFragmentView;
}(SplineSeriesBaseView));
export { SplineAreaFragmentView };
/**
 * @hidden
 */
var SplineFragmentView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineFragmentView, _super);
    function SplineFragmentView(a) {
        var _this = _super.call(this, a) || this;
        _this.dv = null;
        _this.d1 = new Path();
        _this.d0 = new Path();
        _this.d2 = new Path();
        _this.dy = new Path();
        _this.dx = new Path();
        _this.dz = new Path();
        _this.dv = a;
        return _this;
    }
    SplineFragmentView.prototype.da = function () {
        return new SplineFragmentBucketCalculator(this);
    };
    SplineFragmentView.prototype.dw = function () {
        this.d0.an = null;
        this.d1.an = null;
        this.d2.an = null;
        this.dx.an = null;
        this.dy.an = null;
        this.dz.an = null;
    };
    SplineFragmentView.prototype.bp = function () {
        _super.prototype.bp.call(this);
    };
    SplineFragmentView.prototype.bq = function () {
        _super.prototype.bq.call(this);
        var a = this.b3();
        this.dx.an = this.d0.an;
        this.dy.an = this.d1.an;
        this.dz.an = this.d2.an;
        this.dy._stroke = a;
        this.dy.ad = this.f.ig + 3;
        this.dz._stroke = a;
        this.dz.ad = this.f.ig + 3;
        this.dx._fill = a;
        this.dx._opacity = 0.75;
    };
    SplineFragmentView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dx);
                a.t(this.dy);
                a.t(this.dz);
            }
            else {
                a.t(this.d0);
                a.t(this.d1);
                a.t(this.d2);
            }
        }
    };
    SplineFragmentView.prototype.get_index = function () {
        var a = this.dv.parentSeries;
        var b = a.series.count;
        var c = a.series.indexOf(this.dv.logicalSeriesLink);
        var d = (b - 1) - c;
        var e = a.cw.index;
        return e + d;
    };
    SplineFragmentView.prototype.ax = function (a) {
        _super.prototype.ax.call(this, a);
        this.f.bc.exportPathData(a, this.d1, "lowerShape", ["Lower", "Main"]);
        this.f.bc.exportPathData(a, this.d2, "upperShape", ["Upper"]);
        this.f.bc.exportPathData(a, this.d0, "translucentShape", ["Translucent"]);
    };
    SplineFragmentView.$t = markType(SplineFragmentView, 'SplineFragmentView', SplineSeriesBaseView.$);
    return SplineFragmentView;
}(SplineSeriesBaseView));
export { SplineFragmentView };
/**
 * @hidden
 */
var StackedSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSeriesView, _super);
    function StackedSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.di = null;
        _this.dj = new Canvas();
        _this.dl = new Panel();
        _this.di = a;
        return _this;
    }
    Object.defineProperty(StackedSeriesView.prototype, "dk", {
        get: function () {
            return this.dj;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(StackedSeriesView.prototype, "dm", {
        get: function () {
            return this.dl;
        },
        enumerable: false,
        configurable: true
    });
    StackedSeriesView.prototype.da = function () {
        return new StackedBucketCalculator(this);
    };
    StackedSeriesView.prototype.a1 = function () {
        _super.prototype.a1.call(this);
        for (var a = 0; a < this.di.aa5.f.count; a++) {
            this.di.aa5.f._inner[a].cw.a1();
        }
    };
    StackedSeriesView.prototype.a3 = function (a, b) {
        var e_72, _a;
        _super.prototype.a3.call(this, a, b);
        try {
            for (var _b = __values(fromEnum(this.di.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                c.visualSeriesLink.cw.a3(a, b);
            }
        }
        catch (e_72_1) {
            e_72 = { error: e_72_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_72)
                    throw e_72.error;
            }
        }
    };
    StackedSeriesView.prototype.an = function () {
        var a = "rgba(95,95,95,0.5)";
        var b = true;
        var c = 5, d = 5, e = 5;
        var f = this.f;
        if ((f.isStacked && f.ew) || (f.isStacked && f.f1 && f.ew)) {
            d = 1;
            e = -3;
        }
        else if ((f.isStacked && f.fl) || (f.isStacked && f.f1)) {
            c = 3;
            d = 1;
            e = 4;
            b = false;
        }
        else if ((f.isStacked && f.e1)) {
            d = 5;
            e = 0;
        }
        var g = new Color();
        g.colorString = a;
        f.v6 = g;
        f.jn = c;
        f.jo = d;
        f.jp = e;
        f.hd = b;
    };
    StackedSeriesView.$t = markType(StackedSeriesView, 'StackedSeriesView', CategorySeriesView.$);
    return StackedSeriesView;
}(CategorySeriesView));
export { StackedSeriesView };
/**
 * @hidden
 */
var StackedBarSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedBarSeriesView, _super);
    function StackedBarSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.dn = null;
        _this.dn = a;
        return _this;
    }
    StackedBarSeriesView.prototype.da = function () {
        return new StackedBarBucketCalculator(this);
    };
    StackedBarSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.di.xf = Defaults.c;
            this.di.jq = Defaults.i;
        }
    };
    StackedBarSeriesView.$t = markType(StackedBarSeriesView, 'StackedBarSeriesView', StackedSeriesView.$);
    return StackedBarSeriesView;
}(StackedSeriesView));
export { StackedBarSeriesView };
/**
 * @hidden
 */
var StackedColumnSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedColumnSeriesView, _super);
    function StackedColumnSeriesView(a) {
        return _super.call(this, a) || this;
    }
    StackedColumnSeriesView.prototype.da = function () {
        return new StackedColumnBucketCalculator(this);
    };
    StackedColumnSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.di.xf = Defaults.c;
            this.di.jq = Defaults.i;
        }
    };
    StackedColumnSeriesView.$t = markType(StackedColumnSeriesView, 'StackedColumnSeriesView', StackedSeriesView.$);
    return StackedColumnSeriesView;
}(StackedSeriesView));
export { StackedColumnSeriesView };
/**
 * @hidden
 */
var StackedAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedAreaSeriesView, _super);
    function StackedAreaSeriesView(a) {
        return _super.call(this, a) || this;
    }
    StackedAreaSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.di.xf = Defaults.e;
        }
    };
    StackedAreaSeriesView.$t = markType(StackedAreaSeriesView, 'StackedAreaSeriesView', StackedSeriesView.$);
    return StackedAreaSeriesView;
}(StackedSeriesView));
export { StackedAreaSeriesView };
/**
 * @hidden
 */
var StackedSplineAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSplineAreaSeriesView, _super);
    function StackedSplineAreaSeriesView(a) {
        return _super.call(this, a) || this;
    }
    StackedSplineAreaSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.di.xf = Defaults.e;
        }
    };
    StackedSplineAreaSeriesView.prototype.dn = function () {
        var a = 1;
        if (this.di.dc != null) {
            a = this.di.dc.hk;
        }
        return Math.max(1 / (a * 3), 0.3);
    };
    StackedSplineAreaSeriesView.$t = markType(StackedSplineAreaSeriesView, 'StackedSplineAreaSeriesView', StackedSeriesView.$);
    return StackedSplineAreaSeriesView;
}(StackedSeriesView));
export { StackedSplineAreaSeriesView };
/**
 * @hidden
 */
var StackedSplineSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSplineSeriesView, _super);
    function StackedSplineSeriesView(a) {
        return _super.call(this, a) || this;
    }
    StackedSplineSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.di.xf = Defaults.e;
        }
    };
    StackedSplineSeriesView.prototype.dn = function () {
        var a = 1;
        if (this.di.dc != null) {
            a = this.di.dc.hk;
        }
        return Math.max(1 / (a * 3), 0.3);
    };
    StackedSplineSeriesView.$t = markType(StackedSplineSeriesView, 'StackedSplineSeriesView', StackedSeriesView.$);
    return StackedSplineSeriesView;
}(StackedSeriesView));
export { StackedSplineSeriesView };
/**
 * @hidden
 */
var StackedSeriesManager = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(StackedSeriesManager, _super);
    function StackedSeriesManager(a) {
        var _this = _super.call(this) || this;
        _this.b = null;
        _this.f = null;
        _this.c = null;
        _this.e = null;
        _this.d = null;
        _this.l = null;
        _this.m = null;
        if (a == null) {
            return _this;
        }
        _this.b = a;
        _this.f = new ObservableCollection$1(AnchoredCategorySeries.$, 0);
        _this.c = new StackedSeriesCollection();
        _this.e = new ObservableCollection$1(AnchoredCategorySeries.$, 0);
        _this.d = new ObservableCollection$1(AnchoredCategorySeries.$, 0);
        _this.l = _this.b.aa6.dk;
        _this.m = _this.b.aa6.dm;
        var b = _this.c;
        b.collectionChanged = delegateCombine(b.collectionChanged, function (b, c) {
            var e_73, _a, e_74, _b;
            if (c.oldItems != null) {
                try {
                    for (var _c = __values(fromEn(c.oldItems)), _d = _c.next(); !_d.done; _d = _c.next()) {
                        var d = _d.value;
                        if (_this.f.contains(d.visualSeriesLink)) {
                            _this.f.remove(d.visualSeriesLink);
                        }
                    }
                }
                catch (e_73_1) {
                    e_73 = { error: e_73_1 };
                }
                finally {
                    try {
                        if (_d && !_d.done && (_a = _c.return))
                            _a.call(_c);
                    }
                    finally {
                        if (e_73)
                            throw e_73.error;
                    }
                }
            }
            if (c.newItems != null) {
                var e = c.newStartingIndex;
                try {
                    for (var _e = __values(fromEn(c.newItems)), _f = _e.next(); !_f.done; _f = _e.next()) {
                        var f = _f.value;
                        var g = _this.a(f);
                        _this.f.insert(e, g);
                        e++;
                    }
                }
                catch (e_74_1) {
                    e_74 = { error: e_74_1 };
                }
                finally {
                    try {
                        if (_f && !_f.done && (_b = _e.return))
                            _b.call(_e);
                    }
                    finally {
                        if (e_74)
                            throw e_74.error;
                    }
                }
            }
        });
        var c = _this.f;
        c.collectionChanged = delegateCombine(c.collectionChanged, function (c, d) {
            var e_75, _a, e_76, _b;
            if (d.oldItems != null) {
                try {
                    for (var _c = __values(fromEn(d.oldItems)), _d = _c.next(); !_d.done; _d = _c.next()) {
                        var e = _d.value;
                        Series.po(e, _this.b.dc, true);
                        e.o7(true, e.cw);
                        e.dc = null;
                        e.c4 = null;
                        e.itemsSource = null;
                        e.legend = null;
                        if (_this.m != null && _this.m.ab.contains(e)) {
                            _this.m.ab.remove(e);
                        }
                        if (_this.b.dc != null) {
                            _this.b.dc.rd(e);
                        }
                    }
                }
                catch (e_75_1) {
                    e_75 = { error: e_75_1 };
                }
                finally {
                    try {
                        if (_d && !_d.done && (_a = _c.return))
                            _a.call(_c);
                    }
                    finally {
                        if (e_75)
                            throw e_75.error;
                    }
                }
            }
            if (d.newItems != null) {
                try {
                    for (var _e = __values(fromEn(d.newItems)), _f = _e.next(); !_f.done; _f = _e.next()) {
                        var f = _f.value;
                        Series.po(f, _this.b.dc, false);
                        f.dc = _this.b.dc;
                        f.c4 = _this.b.c4;
                        if (!_this.m.ab.contains(f)) {
                            _this.m.ab.add(f);
                        }
                        if (_this.b.dc != null) {
                            _this.b.dc.nh(f);
                        }
                    }
                }
                catch (e_76_1) {
                    e_76 = { error: e_76_1 };
                }
                finally {
                    try {
                        if (_f && !_f.done && (_b = _e.return))
                            _b.call(_e);
                    }
                    finally {
                        if (e_76)
                            throw e_76.error;
                    }
                }
            }
            _this.b.ru(false);
        });
        return _this;
    }
    StackedSeriesManager.prototype.a = function (a) {
        if (this.b.isStacked && this.b.fl) {
            var b = new LineFragment();
            b.provideRenderer(a.b5);
            b.parentSeries = this.b;
            a.visualSeriesLink = b;
            b.logicalSeriesLink = a;
            b.cw.b9 = this.b.cw.b9;
            this.j(b, a);
            this.h(b);
            return b;
        }
        if (this.b.isStacked && this.b.e1) {
            var c = new ColumnFragment();
            c.provideRenderer(a.b5);
            c.parentSeries = this.b;
            a.visualSeriesLink = c;
            c.logicalSeriesLink = a;
            c.cw.b9 = this.b.cw.b9;
            this.j(c, a);
            this.h(c);
            return c;
        }
        if (this.b.isStacked && this.b.ez) {
            var d = new BarFragment();
            d.provideRenderer(a.b5);
            d.parentSeries = typeCast(StackedBarSeries.$, this.b);
            a.visualSeriesLink = d;
            d.logicalSeriesLink = a;
            d.cw.b9 = this.b.cw.b9;
            this.j(d, a);
            this.h(d);
            return d;
        }
        if (this.b.isStacked && this.b.ew && !this.b.f1) {
            var e = new AreaFragment();
            e.provideRenderer(a.b5);
            e.parentSeries = this.b;
            a.visualSeriesLink = e;
            e.logicalSeriesLink = a;
            e.cw.b9 = this.b.cw.b9;
            this.j(e, a);
            this.h(e);
            return e;
        }
        if (this.b.isStacked && this.b.f1 && !this.b.ew) {
            var f = new SplineFragment();
            f.provideRenderer(a.b5);
            f.parentSeries = this.b;
            a.visualSeriesLink = f;
            f.logicalSeriesLink = a;
            f.cw.b9 = this.b.cw.b9;
            this.j(f, a);
            this.h(f);
            return f;
        }
        if (this.b.isStacked && this.b.f1 && this.b.ew) {
            var g = new SplineAreaFragment();
            g.provideRenderer(a.b5);
            g.parentSeries = this.b;
            a.visualSeriesLink = g;
            g.logicalSeriesLink = a;
            g.cw.b9 = this.b.cw.b9;
            this.j(g, a);
            this.h(g);
            return g;
        }
        return null;
    };
    StackedSeriesManager.prototype.k = function () {
        var e_77, _a;
        if (this.b == null) {
            return;
        }
        try {
            for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var a = _c.value;
                a.jk = this.b.ie;
            }
        }
        catch (e_77_1) {
            e_77 = { error: e_77_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_77)
                    throw e_77.error;
            }
        }
    };
    StackedSeriesManager.prototype.j = function (a, b) {
        if (b.itemsSource == null) {
            a.itemsSource = this.b.itemsSource;
        }
        else {
            a.itemsSource = b.itemsSource;
        }
        if (b.highlightedItemsSource == null) {
            a.highlightedItemsSource = this.b.highlightedItemsSource;
        }
        else {
            a.highlightedItemsSource = b.highlightedItemsSource;
        }
        a.legend = this.b.a5;
        a.legendItemTemplate = b.ho;
        a.legendItemVisibility = b.ls;
        a.ji = this.b.ji;
        a.v9 = b.la;
        a.v7 = b.k7;
        a.v8 = b.k9;
        a.vk = b.k4;
        a._opacity = b.by;
        a.v0 = b.ky;
        a.cj = b.aa;
        a.jk = this.b.jk;
        a.jq = b.bl;
        a.title = b.cj;
        a.abr = b.ft;
        a.abn = b.fp;
        a.abp = b.fr;
        a._visibility = b.lt;
        a.jg = b.bc;
        a.bw = b.z;
        a.l5 = b.d9;
        a.ml = b.ed;
        a.yo = b.kv;
        a.yp = b.kw;
        a.w9 = b.u;
        a.yq = b.lq;
        a.x7 = b.hp;
        a.xf = b.w;
        a.xo = b.be;
        a.jh = b.bd;
        a.w5 = b.s;
        a.xn = b.aq;
        a.zv = b.ap;
        a.ke = b.b6;
        a.de = b.ag;
        a.kf = b.b7;
        a.za = b.m;
        a.c6 = b.ad;
        a.kf = b.b7;
        a.df = b.ah;
        a.zq = b.ao;
        var c = typeCast(AreaFragment.$, a);
        if (c != null) {
            c.ia = b.bb;
        }
        var d = typeCast(SplineAreaFragment.$, a);
        if (d != null) {
            d.ia = b.bb;
        }
        var e = typeCast(ColumnFragment.$, a);
        if (e != null) {
            e.adf = b.bg;
            e.adg = b.bh;
        }
        var f = typeCast(BarFragment.$, a);
        if (f != null) {
            f.adf = b.bg;
            f.adg = b.bh;
        }
        a.toolTip = b.ck;
        a.e6 = b.al;
        a.hd = b.ar;
        b.g3();
        b.g4();
        b.g5();
        b.g6();
    };
    StackedSeriesManager.prototype.i = function (a) {
        var e_78, _a;
        this.e.clear();
        this.d.clear();
        var b = 0;
        try {
            for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                c.g1 = true;
                c.index = this.b.abi(this.c._inner[b]);
                c.c4 = this.b.c4;
                c.dc = this.b.dc;
                if (this.c._inner[b].az) {
                    this.e.add(c);
                }
                else {
                    this.d.add(c);
                }
                if ((this.b.isStacked && this.b.fl) || (this.b.isStacked && this.b.ew) || (this.b.isStacked && this.b.f1)) {
                    c.abv(this.b.fetchXAxis());
                    c.abw(this.b.fetchYAxis());
                }
                c.ru(a);
                b++;
            }
        }
        catch (e_78_1) {
            e_78 = { error: e_78_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_78)
                    throw e_78.error;
            }
        }
    };
    StackedSeriesManager.prototype.h = function (a) {
        var fragment_ = a;
        fragment_.externalObject = TypeRegistrar.createFromInternal(fragment_, PlatformConstants.Prefix, PlatformConstants.Postfix);
        fragment_.externalObject._implementation = fragment_;
    };
    StackedSeriesManager.prototype.g = function () {
        var e_79, _a;
        if (this.f != null) {
            try {
                for (var _b = __values(fromEnum(this.f)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var a = _c.value;
                    a.o4();
                }
            }
            catch (e_79_1) {
                e_79 = { error: e_79_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_79)
                        throw e_79.error;
                }
            }
        }
    };
    StackedSeriesManager.$t = markType(StackedSeriesManager, 'StackedSeriesManager');
    return StackedSeriesManager;
}(Base));
export { StackedSeriesManager };