UNPKG

igniteui-webcomponents-charts

Version:

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

1,440 lines 51.4 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 { MarkerSeries } from "./MarkerSeries";
import { Base, runOn, delegateCombine, Number_$type, enumGetBox, fromEnum, Point_$type, typeCast, markType, markDep } from "igniteui-webcomponents-core";
import { PolarAxisInfoCache } from "./PolarAxisInfoCache";
import { SeriesRenderer$2 } from "./SeriesRenderer$2";
import { PolarFrame } from "./PolarFrame";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { NumericAngleAxis } from "./NumericAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { TrendLineType_$type } from "igniteui-webcomponents-core";
import { Brush } from "igniteui-webcomponents-core";
import { PenLineCap_$type } from "igniteui-webcomponents-core";
import { DoubleCollection } from "igniteui-webcomponents-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { HighlightingInfo } from "igniteui-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-webcomponents-core";
import { Marker } from "./Marker";
import { MarkerSeriesView } from "./MarkerSeriesView";
import { PolarAxes } from "./PolarAxes";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { IFastItemsSource_$type } from "igniteui-webcomponents-core";
import { SeriesRenderingArguments } from "./SeriesRenderingArguments";
import { AxisRange } from "./AxisRange";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { OwnedPoint } from "./OwnedPoint";
import { GeometryUtil } from "igniteui-webcomponents-core";
import { DataContext } from "igniteui-webcomponents-core";
import { HashPool$2 } from "igniteui-webcomponents-core";
import { Clipper } from "igniteui-webcomponents-core";
import { PolarTrendLineManager } from "./PolarTrendLineManager";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { AssigningPolarStyleEventArgs } from "./AssigningPolarStyleEventArgs";
import { AssigningPolarMarkerStyleEventArgs } from "./AssigningPolarMarkerStyleEventArgs";
import { SeriesRenderManager } from "./SeriesRenderManager";
import { DataLegendSeriesValueInfo } from "igniteui-webcomponents-core";
import { DataLegendSeriesContext } from "igniteui-webcomponents-core";
import { ChartSelection } from "./ChartSelection";
import { CollisionRect } from "igniteui-webcomponents-core";
import { PropertyMetadata } from "igniteui-webcomponents-core";
import { truncate, isNaN_, isInfinity } from "igniteui-webcomponents-core";
import { Defaults } from "./Defaults";
import { NumericMarkerManager } from "./NumericMarkerManager";
import { GeometryGroup } from "igniteui-webcomponents-core";
import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let PolarBase = /*@__PURE__*/ (() => {
    class PolarBase extends MarkerSeries {
        ct() {
            return new PolarBaseView(this);
        }
        q3(a) {
            super.q3(a);
            this.y2 = a;
        }
        o4() {
            super.o4();
            this.yy = null;
            this.yz = null;
        }
        get_fq() {
            return true;
        }
        ed(a, b, c, d, e) {
            if (!this.hasMarkers) {
                return false;
            }
            let f = this.yy;
            let g = new ScalerParams(1, this.dc.wh, this.wx, f.ch);
            g.c = this.getEffectiveViewport1(this.cw);
            let h = this.yz;
            let i = new ScalerParams(1, this.dc.wh, this.wx, h.ch);
            i.c = this.getEffectiveViewport1(this.cw);
            a.clear();
            this.xb.cw((j) => {
                if (j._visibility == 0) {
                    let k = new SeriesPointOfInterest();
                    let l = j.n;
                    let m = j.o;
                    if (l < this.wx.left || l > this.wx.right || m < this.wx.top || m > this.wx.bottom) {
                        return;
                    }
                    let n;
                    let o;
                    let p = this.y0.f(l, m, this.cw.ca, this.cw.b9, this.cw.getEffectiveViewport(), n, o);
                    n = p.p5;
                    o = p.p6;
                    k.d = n;
                    k.e = o;
                    k.b = j.content;
                    k.g = this.vl;
                    k.c = j.ak;
                    if (this.ha) {
                        k.g = this.vs(j.ak);
                    }
                    a.add(k);
                }
            });
            return true;
        }
        constructor() {
            super();
            this.y3 = null;
            this.yu = null;
            this.y1 = null;
            this.ack = null;
            this.acj = null;
            this.aci = null;
            this.zf = null;
            this.zm = null;
            this.zn = null;
            this.y7 = new PolarFrame();
            this.y9 = new PolarFrame();
            this.y5 = new PolarFrame();
            this.y0 = null;
            this.z5 = null;
            this.zb = 1;
            this.zr = false;
            this.zq = false;
            this.zk = null;
            this.zl = null;
            this.assigningPolarStyle = null;
            this.assigningPolarMarkerStyle = null;
            this.za = null;
            this.y8 = null;
            this.y4 = null;
            this.za = new PolarSeriesRenderManager();
            this.zc = this.zd();
            this.y8 = new PolarFrame();
            this.y9.y = runOn(this, this.ach);
            this.y7.y = runOn(this, this.ach);
            this.y5.y = runOn(this, this.ach);
            this.zf = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(this, this.abi), runOn(this, this.abm), runOn(this, this.d4), runOn(this, this.sb), runOn(this, this.abb));
        }
        abb() {
            if (this.dd.g) {
                this.dd.t();
            }
        }
        abd() {
            this.y0.e(this.y3.x, this.zo, this.zp, this.ack, this.acj, this.aci, (a, b) => Math.cos(b), (a, b) => Math.sin(b), true);
        }
        gc() {
            return this.highlightedItemsSource != null || (this.aat != null && this.aar != null);
        }
        z3() {
            return false;
        }
        hu() {
            let a = super.hu();
            {
                let b = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "AngleMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedAngleMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.abe));
                a.add(b);
            }
            {
                let c = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.ad = "RadiusMemberPath";
                    $ret.p = true;
                    $ret.y = "HighlightedRadiusMemberPath";
                    $ret.q = true;
                    return $ret;
                })());
                c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.abf));
                a.add(c);
            }
            if (this.z3()) {
                let d = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "DashArray";
                    $ret.p = true;
                    $ret.x = ((() => {
                        let $ret = new DoubleCollection();
                        $ret.add(5);
                        $ret.add(5);
                        return $ret;
                    })());
                    $ret.q = true;
                    return $ret;
                })());
                a.add(d);
            }
            if (!this.z3()) {
                let e = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "Brush";
                    $ret.p = true;
                    $ret.y = "ActualBrush";
                    $ret.q = true;
                    return $ret;
                })());
                e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.r4));
                a.add(e);
            }
            if (!this.z3()) {
                let f = ((() => {
                    let $ret = new SeriesLayerPropertyOverlay();
                    $ret.r = true;
                    $ret.ad = "Outline";
                    $ret.p = true;
                    $ret.y = "ActualOutline";
                    $ret.q = true;
                    return $ret;
                })());
                f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.r4));
                a.add(f);
            }
            return a;
        }
        abf(a, b) {
            if (this.aat != null) {
                b.value = this.aat;
                return;
            }
            b.value = this.aa6;
        }
        abe(a, b) {
            if (this.aar != null) {
                b.value = this.aar;
                return;
            }
            b.value = this.aao;
        }
        get zo() {
            return this.zm;
        }
        set zo(a) {
            if (this.zm != a) {
                let b = this.zo;
                this.zm = a;
                this.raisePropertyChanged("AngleColumn", b, this.zo);
            }
        }
        get zp() {
            return this.zn;
        }
        set zp(a) {
            if (this.zn != a) {
                let b = this.zp;
                this.zn = a;
                this.raisePropertyChanged("RadiusColumn", b, this.zp);
            }
        }
        get acc() {
            return this.c(PolarBase.abn);
        }
        set acc(a) {
            this.h(PolarBase.abn, a);
        }
        y6() {
            let a = this.y5;
            if (this.d4()) {
                if (this.dd.g) {
                    this.dd.t();
                }
                a = this.y9;
            }
            return a;
        }
        qd() {
            super.qd();
            if (this.yz != null) {
                this.yz.ib(false);
            }
            if (this.yy != null) {
                this.yy.ib(false);
            }
        }
        pd(a, b, c, d) {
            let e = false;
            this.y2.dd.g$i(a, b, c, d);
            if (this.y2.aa.count > 0) {
                for (let f of fromEnum(this.y2.aa)) {
                    f.g$i(a, b, c, d);
                }
            }
            if (this.yy != null && !this.yy.c1()) {
                e = true;
            }
            if (this.yz != null && !this.yz.c1()) {
                e = true;
            }
            if (e) {
                this.ru(true);
            }
        }
        su(a, b) {
            this.ru(false);
        }
        sv(a, b) {
            this.ru(false);
        }
        hf(a, b, c) {
            let d = true;
            if (!super.hf(a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.yy == null || this.yz == null || this.zo == null || this.zp == null || this.zo.count == 0 || this.zp.count == 0 || this.dp == null || this.dp.count != this.zo.count || this.dp.count != this.zp.count || this.y0 == null || this.yy.bi == null || this.yz.bi == null || this.yy.l4 == this.yy.l3 || this.yz.l4 == this.yz.l3) {
                d = false;
            }
            return d;
        }
        rv(a) {
            super.rv(a);
            let b;
            let c;
            let d = this.getViewInfo(c, b);
            c = d.p0;
            b = d.p1;
            if (!this.hf(c, b, this.cw)) {
                this.o7(true, this.cw);
                return;
            }
            this.ack = b;
            this.acj = c;
            this.aci = this.cw.getEffectiveViewport();
            this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
            let e = new SeriesRenderingArguments(this, c, b, a, this.gs);
            let f = this.zf.g(e, this.y7, this.y5, this.y9, this.y2);
            this.y7 = f.p1;
            this.y5 = f.p2;
            this.y9 = f.p3;
        }
        ach(a) {
            let b = this.y0.h(a.x, a.y, this.ack, this.acj, this.aci, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
            return b;
        }
        ay(a) {
            if (a != null && a == this.yy && this.zo != null) {
                return new AxisRange(this.zo.minimum, this.zo.maximum);
            }
            if (a != null && a == this.yz && this.zp != null) {
                return new AxisRange(this.zp.minimum, this.zp.maximum);
            }
            return null;
        }
        ge(a) {
            let b = this.cw.ca;
            b = b.copy();
            let c = this.cw.b9;
            let d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1;
            if (this.yy == null || this.zo == null || this.yz == null || this.zp == null) {
                return false;
            }
            if (d < 0 || d > this.zo.count - 1 || d > this.zp.count - 1) {
                return false;
            }
            let e = this.yy.getScaledAngle(this.zo.item(d));
            let f = this.yz.od(this.zp.item(d));
            let g = 0.5 + (Math.cos(e) * f);
            let h = 0.5 + (Math.sin(e) * f);
            if (!isNaN_(g)) {
                if (g < b.left + 0.1 * b.width) {
                    g = g + 0.4 * b.width;
                    b.x = g - 0.5 * b.width;
                }
                if (g > b.right - 0.1 * b.width) {
                    g = g - 0.4 * b.width;
                    b.x = g - 0.5 * b.width;
                }
            }
            if (!isNaN_(h)) {
                if (h < b.top + 0.1 * b.height) {
                    h = h + 0.4 * b.height;
                    b.y = h - 0.5 * b.height;
                }
                if (h > b.bottom - 0.1 * b.height) {
                    h = h - 0.4 * b.height;
                    b.y = h - 0.5 * b.height;
                }
            }
            if (this.c4 != null) {
                this.c4.au(this.dc, b, true);
            }
            return d >= 0;
        }
        ko(a) {
            let b = this.j4(a);
            if (this.dp != null && b >= 0 && b < this.dp.count) {
                return this.dp.item(b);
            }
            return null;
        }
        j4(a) {
            let b = truncate(Math.round(this.is(a)));
            return b;
        }
        is(a) {
            switch (this.zc) {
                case 1: return this.z9(a);
                case 3: return this.aaa(a);
                case 2: return this.z7(a);
                case 4: return this.z8(a);
            }
            return -1;
        }
        z8(a) {
            return this.aab(a, false);
        }
        z7(a) {
            let b = this.wc(a);
            let c = b.x;
            let d = b.y;
            if (this.dp == null || this.yy == null || this.yz == null || this.zo == null || this.zp == null) {
                return -1;
            }
            if (this.dp.count > this.aad) {
                return -1;
            }
            if (!this.zv()) {
                return -1;
            }
            let e = this.z5;
            let f = 1.7976931348623157E+308;
            let g = -1;
            for (let h = 0; h < this.zo.count; h++) {
                let i = e._inner[h].x;
                let j = e._inner[h].y;
                let k = (c - i) * (c - i) + (d - j) * (d - j);
                if (k < f) {
                    f = k;
                    g = h;
                }
            }
            return g;
        }
        zv() {
            let a = this.y5;
            if (this.d4()) {
                a = this.y9;
            }
            if (a == null || a.x.count == 0) {
                return false;
            }
            this.z5 = a.x;
            return true;
        }
        aab(a, b) {
            if (!this.zy) {
                return -1;
            }
            let c = { $type: Point_$type, x: 0, y: 0 };
            let d = true;
            let e = this.y5;
            if (this.d4()) {
                e = this.y9;
            }
            if (e == null) {
                return -1;
            }
            if (e.n == null) {
                return -1;
            }
            if (this.dp == null || this.dp.count > this.aad) {
                return -1;
            }
            if (!this.zv()) {
                return -1;
            }
            let f = this.z5;
            let g = this.wc(a);
            let h = 1.7976931348623157E+308;
            let i = -1;
            for (let j = 0; j < f.count; j++) {
                let k = f._inner[j];
                if (j > 0) {
                    if (isNaN_(k.x) || isNaN_(k.y) || isNaN_(c.x) || isNaN_(c.y)) {
                        c = k;
                        continue;
                    }
                    if (!b || e.j.containsKey(this.dp.item(j)) || e.j.containsKey(this.dp.item(j - 1))) {
                        let l = GeometryUtil.h(g, c, k);
                        if (l < h) {
                            h = l;
                            i = j;
                        }
                    }
                }
                c = k;
            }
            if (i >= 0) {
                let m = f._inner[i];
                let n = f._inner[i - 1];
                if (!b || (e.j.containsKey(this.dp.item(i)) && e.j.containsKey(this.dp.item(i - 1)))) {
                    let o = GeometryUtil.m(g, n, m);
                    return (i - 1) + o;
                }
                else if (e.j.containsKey(this.dp.item(i))) {
                    return i;
                }
                else {
                    return i - 1;
                }
            }
            return -1;
        }
        aaa(a) {
            return this.aab(a, true);
        }
        z9(a) {
            let b = null;
            let c = 1.7976931348623157E+308;
            let d = this.wc(a);
            let e = d.x;
            let f = d.y;
            if (this.y2.de.e > this.aad) {
                return -1;
            }
            this.y2.dh((g) => {
                if (g._visibility == 0) {
                    let h = this.y2.c7(g);
                    let i = h.left + h.width / 2;
                    let j = h.top + h.height / 2;
                    let k = (e - i) * (e - i) + (f - j) * (f - j);
                    if (k < c) {
                        c = k;
                        b = g;
                    }
                }
            });
            if (b != null) {
                return b.ak;
            }
            return -1;
        }
        wh(a, b, c) {
            if (this.yy == null || this.yz == null || this.zo == null || this.zp == null) {
                return { $type: Point_$type, x: NaN, y: NaN };
            }
            let d = this.cw.ca;
            let e = this.cw.b9;
            let f = this.getEffectiveViewport();
            let g = new ScalerParams(0, d, e, this.yy.ch, f);
            let h = ((() => {
                let $ret = new ScalerParams(0, d, e, this.yz.ch, f);
                $ret.b = this.iz();
                return $ret;
            })());
            if (b) {
                let i = this.is(a);
                if (i == -1) {
                    return { $type: Point_$type, x: NaN, y: NaN };
                }
                let j = truncate(Math.floor(i));
                let k = truncate(Math.ceil(i));
                if (j < 0) {
                    j = 0;
                }
                if (k < 0) {
                    k = 0;
                }
                if (k > this.dp.count - 1) {
                    k = this.dp.count - 1;
                }
                if (j > this.dp.count - 1) {
                    j = this.dp.count - 1;
                }
                if (k == j) {
                    return this.y0.h(this.zo.item(j), this.zp.item(j), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
                }
                let l = i - Math.floor(i);
                let m = this.y0.h(this.zo.item(j), this.zp.item(j), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
                let n = this.y0.h(this.zo.item(k), this.zp.item(k), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
                let o = m.x;
                let p = m.y;
                let q = n.x;
                let r = n.y;
                let s = q - o;
                let t = r - p;
                return { $type: Point_$type, x: o + s * l, y: p + t * l };
            }
            else {
                let u = this.j4(a);
                if (u == -1) {
                    return { $type: Point_$type, x: NaN, y: NaN };
                }
                return this.y0.h(this.zo.item(u), this.zp.item(u), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
            }
        }
        ai() {
            return [this.yy, this.yz];
        }
        kr(a, b) {
            let c = this.nf(b);
            if (c == PolarBase.$$p[3]) {
                return this.ks(a, b, this.aao);
            }
            if (c == PolarBase.$$p[15]) {
                return this.ks(a, b, this.aa6);
            }
            if (c == PolarBase.$$p[5]) {
                return this.ks(a, b, this.aar);
            }
            if (c == PolarBase.$$p[6]) {
                return this.ks(a, b, this.aat);
            }
            return super.kr(a, b);
        }
        mf(a) {
            let b = this.nf(a);
            if (b == PolarBase.$$p[3]) {
                return this.aao;
            }
            if (b == PolarBase.$$p[15]) {
                return this.aa6;
            }
            if (b == PolarBase.$$p[5]) {
                return this.aar;
            }
            if (b == PolarBase.$$p[6]) {
                return this.aat;
            }
            return super.mf(a);
        }
        rc(a, b, c, d) {
            super.rc(a, b, c, d);
            if (this.y2.dd.g$e(a, b, c, d)) {
                this.ru(false);
                this.qn();
            }
            switch (b) {
                case PolarBase.$$p[1]:
                case PolarBase.$$p[2]:
                case PolarBase.$$p[13]:
                case PolarBase.$$p[14]:
                    this.qh();
                    break;
                case "FastItemsSource":
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        c.deregisterColumn(this.zo);
                        c.deregisterColumn(this.zp);
                        this.zo = null;
                        this.zp = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        this.zo = this.dl(this.aao);
                        this.zp = this.dl(this.aa6);
                    }
                    if ((this.yz != null && !this.yz.c1()) || (this.yy != null && !this.yy.c1())) {
                        this.ru(this.gh && c != null);
                    }
                    break;
                case PolarBase.$$p[0]:
                    if (this.yy != null && this.yz != null) {
                        this.y0 = new PolarAxes(this.yz, this.yy);
                    }
                    if (c != null) {
                        c.b0(this);
                    }
                    if (d != null) {
                        d.ct(this);
                    }
                    if (this.yy != null && !this.yy.c1()) {
                        this.ru(false);
                    }
                    else if (c != null && d == null) {
                        this.o7(true, this.cw);
                    }
                    break;
                case PolarBase.$$p[12]:
                    if (this.yy != null && this.yz != null) {
                        this.y0 = new PolarAxes(this.yz, this.yy);
                    }
                    if (c != null) {
                        c.b0(this);
                    }
                    if (d != null) {
                        d.ct(this);
                    }
                    if (this.yz != null && !this.yz.c1()) {
                        this.ru(false);
                    }
                    else if (c != null && d == null) {
                        this.o7(true, this.cw);
                    }
                    if (this.yy != null && !this.yy.c1()) {
                        this.yy.h7();
                    }
                    break;
                case PolarBase.$$p[3]:
                    if (this.dp != null) {
                        this.dp.deregisterColumn(this.zo);
                        this.zo = this.dl(this.aao);
                    }
                    break;
                case "AngleColumn":
                    this.y2.dd.g$m();
                    if (this.yy != null && !this.yy.c1()) {
                        this.ru(this.gh && this.d9);
                    }
                    break;
                case PolarBase.$$p[15]:
                    if (this.dp != null) {
                        this.dp.deregisterColumn(this.zp);
                        this.zp = this.dl(this.aa6);
                    }
                    break;
                case "RadiusColumn":
                    this.y2.dd.g$m();
                    if (this.yz != null && !this.yz.c1()) {
                        this.ru(this.gh && this.d9);
                    }
                    break;
                case PolarBase.$$p[16]:
                    this.ru(false);
                    this.qn();
                    break;
                case PolarBase.$$p[11]:
                    this.ru(false);
                    this.qn();
                    break;
                case "TransitionProgress":
                    this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
                    this.ack = this.cw.ca;
                    this.acj = this.cw.b9;
                    this.aci = this.cw.getEffectiveViewport();
                    this.y9.w = this.z4;
                    this.y9.c(this.jr, this.y7, this.y5);
                    if (this.d7(this.cw)) {
                        return;
                    }
                    if (this.jr == 1) {
                        this.abm(this.y5, this.y2);
                        this.qq();
                    }
                    else {
                        this.abm(this.y9, this.y2);
                    }
                    if (this.dc != null) {
                        this.dc.qx(this);
                    }
                    break;
                case "TrendLineBrush":
                    this.ri(b);
                    break;
                case PolarBase.$$p[4]:
                    this.ru(false);
                    this.qn();
                    break;
                case "TrendLineType":
                    this.qn();
                    break;
                case PolarBase.$$p[8]:
                    this.zr = this.z0();
                    this.ru(false);
                    break;
                case PolarBase.$$p[7]:
                    this.zq = this.zz();
                    this.ru(false);
                    break;
                case PolarBase.$$p[9]:
                    this.zc = this.zd();
                    break;
            }
        }
        get zc() {
            return this.zb;
        }
        set zc(a) {
            let b = this.zb;
            this.zb = a;
            if (b != this.zb) {
                this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zb));
            }
        }
        zd() {
            if (this.ze != 0) {
                return this.ze;
            }
            return this.zy ? 4 : 1;
        }
        get_zy() {
            return false;
        }
        get zy() {
            return this.get_zy();
        }
        z0() {
            return this.zx;
        }
        zz() {
            return this.zw;
        }
        zt(a) {
            if (typeCast(NumericRadiusAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        zs(a) {
            if (typeCast(NumericAngleAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        o7(a, b) {
            super.o7(a, b);
            let c = b;
            if (a) {
                c.de.clear();
            }
            c.dd.g$h();
        }
        yv(a, b) {
            let c = a.top - 10;
            let d = a.bottom + 10;
            let e = a.left - 10;
            let f = a.right + 10;
            let g = ((() => {
                let $ret = new Clipper(1, e, d, f, c, false);
                $ret.i = b;
                return $ret;
            })());
            return g;
        }
        aba(a, b, c, d) {
            a.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, b);
            let e = this.dp;
            for (let f = 0; f < b; f++) {
                let g = a.x._inner[f];
                if (!isInfinity(g.x) && !isInfinity(g.y)) {
                    let h = { $type: Point_$type, x: this.zo.item(f), y: this.zp.item(f) };
                    let i = { $type: Point_$type, x: g.x, y: g.y };
                    a.g.addItem(e.item(f), ((() => {
                        let $ret = new OwnedPoint();
                        $ret.a = e.item(f);
                        $ret.b = h;
                        $ret.c = i;
                        return $ret;
                    })()));
                }
            }
        }
        abi(a, b) {
            let c = b.ca;
            let d = b.b9;
            let e = b.getEffectiveViewport();
            a.j.clear();
            a.o.clear();
            let f = Math.min(this.zo != null ? this.zo.count : 0, this.zp != null ? this.zp.count : 0);
            if (f < 1) {
                return;
            }
            this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
            this.y3 = a;
            this.acj = d;
            this.ack = c;
            this.aci = b.getEffectiveViewport();
            b.db.l(a.j, this.aae, c, d, this.ie);
            if (f <= this.aae) {
                this.aba(a, f, c, d);
            }
            let g = this.yv(d, a.o);
            let h = Math.min(this.yy.l4, this.yy.l3);
            let i = Math.max(this.yy.l3, this.yy.l4);
            b.dd.k = this.z4;
            b.dd.j = 0;
            b.dd.m = this.yz.n7;
            b.dd.l = this.yz.n6;
            b.dd.n = (j, k) => this.y0.c(j, k, c, d, e, Math.cos);
            b.dd.o = (j, k) => this.y0.d(j, k, c, d, e, Math.sin);
            let j = new List$1(Number_$type, 0);
            for (let k = 0; k < this.zo.count; k++) {
                if (this.zo.item(k) >= h && this.zo.item(k) <= i) {
                    j.add(this.zo.item(k));
                }
            }
            let l = this.zp;
            if (j.count != this.zo.count) {
                l = new List$1(Number_$type, 0);
                for (let m = 0; m < this.zo.count; m++) {
                    if (this.zo.item(m) >= h && this.zo.item(m) <= i) {
                        l.add(this.zp.item(m));
                    }
                }
            }
            b.dd.p(a.o, this.zg, j, l, this.aaf, runOn(this.yy, this.yy.getScaledAngle), runOn(this.yz, this.yz.od), ((() => {
                let $ret = new TrendResolutionParams();
                $ret.d = this.ie;
                $ret.i = d;
                $ret.h = e;
                $ret.j = c;
                return $ret;
            })()), g, h, i);
            if (b.aa.count > 0) {
                a.m.clear();
                for (let n = 0; n < b.aa.count; n++) {
                    a.m.add(new List$1(Point_$type, 0));
                    let o = b.aa._inner[n];
                    o.k = this.z4;
                    o.j = 0;
                    o.m = this.yz.n7;
                    o.l = this.yz.n6;
                    o.n = (p, q) => this.y0.c(p, q, c, d, e, Math.cos);
                    o.o = (p, q) => this.y0.d(p, q, c, d, e, Math.sin);
                    o.p(a.m._inner[n], o.g$b, j, l, o.g$f, runOn(this.yy, this.yy.getScaledAngle), runOn(this.yz, this.yz.od), ((() => {
                        let $ret = new TrendResolutionParams();
                        $ret.d = this.ie;
                        $ret.i = d;
                        $ret.h = e;
                        $ret.j = c;
                        return $ret;
                    })()), g, h, i);
                }
            }
        }
        get_ff() {
            return true;
        }
        zi(a, b, c) {
            return null;
        }
        zj(a, b, c) {
            if (this.dp == null) {
                return null;
            }
            let d = this.y6();
            let e = this.y2.ce(this.wc(b));
            let f = -1;
            if (e == null) {
                if (a != null) {
                    f = this.dp.indexOf(a);
                }
                else {
                    return null;
                }
            }
            else {
                f = e.ak;
            }
            if (f == -1) {
                return null;
            }
            let g = new HighlightingInfo();
            g.i = this;
            g.g = f;
            g.f = f;
            g.c = false;
            g.d = true;
            if (c != null && c.g == g.g && c.f == g.f) {
                return c;
            }
            return g;
        }
        zh(a, b, c) {
            let d = new HighlightingInfo();
            d.i = this;
            d.g = 0;
            d.f = this.dp.count - 1;
            d.c = true;
            if (c != null && c.g == d.g && c.f == d.f) {
                return c;
            }
            return d;
        }
        dh(a, b, c) {
            if (this.ef && this.f0(this.by) && !c) {
                let d = this.zi(a, b, this.zk);
                this.zk = d;
                return d;
            }
            else {
                let e = this.zh(a, b, this.zk);
                this.zk = e;
                return e;
            }
        }
        di(a, b, c) {
            if (this.f0(this.by) && !c) {
                let d = this.zj(a, b, this.zl);
                this.zl = d;
                return d;
            }
            else {
                let e = this.zh(a, b, this.zl);
                e.d = true;
                this.zl = e;
                return e;
            }
        }
        z2() {
            return (this.assigningPolarStyle != null && this.zr) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1);
        }
        z1() {
            return (this.assigningPolarMarkerStyle != null && this.zq) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
        }
        abm(a, b) {
            this.qz();
            let c = b.ca;
            let d = b.b9;
            let e = this.getEffectiveViewport1(b);
            let f = this.wo(b);
            this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
            if (this.xl()) {
                b.db.j(a.j, this.xn);
                if (this.z1()) {
                    this.abc(b, a);
                }
            }
            b.c4();
            let g = this.yv(d, b.dd.g$n.an);
            b.dd.g$l(a.o, g);
            if (b.aa.count > 0) {
                for (let h = 0; h < b.aa.count; h++) {
                    let i = b.aa._inner[h];
                    i.g$l(a.m._inner[h], g);
                }
            }
            this.aa9(d, c, e, f, b);
        }
        ys(a, b) {
            return this.yt(a, b);
        }
        yt(a, b) {
            if (b < a || a < 0 || a > this.zo.count || b < 0 || b > this.zo.count) {
                return null;
            }
            let c = new Array((b - a) + 1);
            for (let d = a; d <= b; d++) {
                let e = d;
                c[d - a] = this.dp.item(d);
            }
            return c;
        }
        abc(a, b) {
            a.ck = true;
            this.za.ay(this, this.z1(), runOn(this, this.ys));
            let c = this.za.d;
            let d = c != null;
            let e = this.getEffectiveViewport1(a);
            let f = this.dp == null ? 0 : this.dp.count;
            this.y2.cw((g) => {
                if (g._visibility == 0) {
                    let h = g.ak;
                    let i = g.content;
                    if (i == null) {
                        i = new DataContext();
                        g.content = i;
                    }
                    if (d) {
                        this.abg(h, f, a.t);
                    }
                    this.za.ac(g, i);
                }
            });
        }
        abh(a, b, c) {
            let d = this.by != 1;
            let e = this.cq != 1;
            let f = this.cp != 1;
            this.za.a0(this.za.b, a, b, false);
            this.za.ab(this.ic);
            let g = this.za.ax;
            let h = null;
            let i = null;
            let j = null;
            let k = this.dp;
            if (d && this.dc != null) {
                h = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, false);
                g.c = h;
            }
            if (e && this.dc != null) {
                i = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, false);
                if (i == null && this.bo != null) {
                    i = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false);
                }
                g.d = i;
            }
            if (f && this.dc != null) {
                j = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, false);
                g.b = j;
            }
            g.h = c;
            this.abk(g);
            this.za.z(this, h, i, j, c, d, e, f, a < 0);
        }
        abg(a, b, c) {
            let d = this.by != 1;
            let e = this.cq != 1;
            let f = this.cp != 1;
            this.za.a0(this.za.d, a, b, true);
            this.za.aa(this.ic);
            let g = this.za.aw;
            let h = null;
            let i = null;
            let j = null;
            let k = this.dp;
            let l = null;
            let m = null;
            let n = null;
            if (d && this.dc != null) {
                h = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, true);
                if (this.dc.dk.isCrossContextHighlight(this)) {
                    l = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.c = h;
            }
            if (e && this.dc != null) {
                i = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, true);
                if (i == null && this.bo != null) {
                    i = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true);
                }
                if (this.dc.dl.isCrossContextHighlight(this)) {
                    m = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.d = i;
            }
            if (f && this.dc != null) {
                j = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, true);
                if (this.dc.dj.isCrossContextHighlight(this)) {
                    n = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.d = i;
            }
            g.h = c;
            this.abj(g);
            this.za.y(this, h, i, j, c, d, e, f, g.v, this.dc.dk.totalHighWaterMark, g.x, this.dc.dl.totalHighWaterMark, g.t, this.dc.dj.totalHighWaterMark);
        }
        abk(a) {
            if (this.assigningPolarStyle != null && this.zr) {
                this.assigningPolarStyle(this, a);
            }
        }
        abj(a) {
            if (this.assigningPolarMarkerStyle != null && this.zq) {
                this.assigningPolarMarkerStyle(this, a);
            }
        }
        aa9(a, b, c, d, e) {
            e.dg(a, b, c, d);
        }
        sl() {
            super.sl();
            if (this.index < 0) {
                return;
            }
            this.y2.dj();
        }
        rw(a, b) {
            super.rw(a, b);
            if (!this.g1) {
                this.cw.be(b);
                return;
            }
            this.cw.be(b);
            if (this.d7(this.cv)) {
                return;
            }
            this.rx();
            this.g1 = false;
        }
        rx() {
            super.rx();
            let a = this.cv;
            if (!this.gt) {
                this.y8 = new PolarFrame();
                this.abi(this.y8, a);
            }
            this.gt = false;
            this.abm(this.y8, a);
        }
        rt(a, b, c, d, e) {
            super.rt(a, b, c, d, e);
            let f = this.ba.a$j.item(d);
            let g = f;
            f.bd(c);
            if (this.d7(g)) {
                return;
            }
            if (this.y4 == null) {
                this.y4 = new PolarFrame();
            }
            this.abi(this.y4, g);
            this.abm(this.y4, g);
        }
        abl(a, b) {
            let c = new List$1(Base.$, 0);
            for (let d of fromEnum(b.c)) {
                if (!a.containsKey(d)) {
                    c.add1(d);
                }
            }
            for (let e of fromEnum(c)) {
                b.h(e);
            }
        }
        yr(a, b, c) {
            this.abd();
            return this.y3.x.toArray();
        }
        z6(a) {
            let b = new List$1(Number_$type, 0);
            let c = this.dp;
            for (let d of fromEnum(this.y2.de.c)) {
                b.add(c.indexOf(d));
            }
            return b;
        }
        acg(a) {
            return { $type: Point_$type, x: this.zo.item(a), y: this.zp.item(a) };
        }
        p1(a) {
            super.p1(a);
            this.bc.exportTrendlineData(this, a, this.y2.dd.g$n);
        }
        getDataLegendSeriesContextAt(a, b) {
            let c = { $type: Point_$type, x: a, y: b };
            let d = this.ko(c);
            let e = d == null ? NaN : this.iy(d, "RadiusMemberPath");
            let f = d == null ? NaN : this.iy(d, "AngleMemberPath");
            let g = new DataLegendSeriesValueInfo();
            g.l = e;
            g.a = 11;
            g.r = this.aa6 != null ? this.aa6 : "Radius";
            g.q = "Radius";
            g.s = this.aa2 != null ? this.aa2 : "R:";
            g.t = this.aa4 != null ? this.aa4 : "";
            let h = new DataLegendSeriesValueInfo();
            h.l = f;
            h.a = 10;
            h.r = this.aao != null ? this.aao : "Angle";
            h.q = "Angle";
            h.s = this.aak != null ? this.aak : "A:";
            h.t = this.aam != null ? this.aam : "";
            let i = new DataLegendSeriesContext();
            i.e = ((() => {
                let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(g);
                $ret.add(h);
                return $ret;
            })());
            i.h = this.me();
            return i;
        }
        ak(a, b) {
            let c = new List$1(ChartSelection.$, 0);
            this.p6(a, c, b);
            return c.toArray();
        }
        p6(a, b, c) {
            let d = this.cw.ca;
            let e = this.cw.b9;
            let f = this.getEffectiveViewport1(this.cw);
            let g = this.dc.wp(this.wx, this.getEffectiveViewport(), d);
            let h = new CollisionRect(0, this.dc.wm(a));
            let i = this.yz.k5(e, d, f, g);
            for (let j = 0; j < this.dp.count; j++) {
                let k = this.yy.getScaledAngle(this.zo.item(j));
                let l = this.yz.od(this.zp.item(j));
                let m = this.y0.c(k, l, d, e, f, Math.cos);
                let n = this.y0.d(k, l, d, e, f, Math.sin);
                if (h.containsLocation(m, n)) {
                    if (c == 7 || c == 6) {
                        b.add(((() => {
                            let $ret = new ChartSelection();
                            $ret.series = this;
                            return $ret;
                        })()));
                        return;
                    }
                    else if (c == 2 || c == 1) {
                        b.add(((() => {
                            let $ret = new ChartSelection();
                            $ret.item = this.dp.item(j);
                            return $ret;
                        })()));
                    }
                    else {
                        b.add(((() => {
                            let $ret = new ChartSelection();
                            $ret.item = this.dp.item(j);
                            $ret.series = this;
                            return $ret;
                        })()));
                    }
                }
            }
        }
        bd() {
            return new PolarTrendLineManager();
        }
    }
    PolarBase.$t = /*@__PURE__*/ markType(PolarBase, 'PolarBase', MarkerSeries.$);
    PolarBase.abn = /*@__PURE__*/ DependencyProperty.i("ActualTrendLineBrush", Brush.$, PolarBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
    PolarBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, PolarBase, 'raisePropertyChanged', ['AngleAxis:yy:abo', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aak:abp', [2, null], 'AngleMemberAsLegendUnit:aam:abq', [2, null], 'AngleMemberPath:aao:abr', [2], 'ClipSeriesToBounds:zu:abs', [0, false], 'HighlightedAngleMemberPath:aar:abt', [2, null], 'HighlightedRadiusMemberPath:aat:abu', [2, null], 'IsCustomPolarMarkerStyleAllowed:zw:abv', [0, false], 'IsCustomPolarStyleAllowed:zx:abw', [0, false], 'ItemSearchMode:ze:abx', [ScatterItemSearchMode_$type, /*@__PURE__*/ enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:aad:aby', [1, 10000], 'MaximumMarkers:aae:abz', [1, 400], 'RadiusAxis:yz:ab0', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:aa2:ab1', [2, null], 'RadiusMemberAsLegendUnit:aa4:ab2', [2, null], 'RadiusMemberPath:aa6:ab3', [2], 'UseCartesianInterpolation:z4:acb', [0, true], 'TrendLineType:zg:ab9', [TrendLineType_$type, /*@__PURE__*/ enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:aac:ab8', [1, 1.5], 'TrendLinePeriod:aaf:ab7', [1, 7], 'TrendLineZIndex:aag:aca', [1, 1], 'TrendLineBrush:acd:ab4', [Brush.$, null], 'TrendLineDashArray:ace:ab5', [DoubleCollection.$], 'TrendLineDashCap:acf:ab6', [PenLineCap_$type, /*@__PURE__*/ enumGetBox(PenLineCap_$type, 0)]]);
    return PolarBase;
})();
/**
 * @hidden
 */
export let PolarSeriesRenderManager = /*@__PURE__*/ (() => {
    class PolarSeriesRenderManager extends SeriesRenderManager {
        constructor() {
            super(...arguments);
            this.aw = null;
            this.ax = null;
        }
        c() {
            this.aw = new AssigningPolarMarkerStyleEventArgs();
            return this.aw;
        }
        a() {
            this.ax = new AssigningPolarStyleEventArgs();
            return this.ax;
        }
        ay(a, b, c) {
            this.w(a, b, c);
        }
        az(a, b, c) {
            this.x(a, b, c);
        }
        a0(a, b, c, d) {
            if (b == -1) {
                a.e = false;
                a.z = 0;
                a.y = c - 1;
            }
            else {
                if (d) {
                    a.z = b;
                    a.y = b;
                }
                else {
                    a.e = false;
                    a.z = b;
                    a.y = b;
                }
            }
        }
    }
    PolarSeriesRenderManager.$t = /*@__PURE__*/ markType(PolarSeriesRenderManager, 'PolarSeriesRenderManager', SeriesRenderManager.$);
    return PolarSeriesRenderManager;
})();
/**
 * @hidden
 */
export let PolarBaseView = /*@__PURE__*/ (() => {
    class PolarBaseView extends MarkerSeriesView {
        constructor(a) {
            super(a);
            this.dc = null;
            this.db = null;
            this.dd = null;
            this.de = null;
            this.dc = a;
            this.de = new HashPool$2(Base.$, Marker.$);
            this.cz(this.de);
            this.dd = new PolarTrendLineManager();
        }
        a4() {
            super.a4();
            this.db = this.da();
            if (!this.t) {
                this.dc.aae = 1000;
                this.ch.xf = Defaults.e;
            }
        }
        dh(a) {
            this.de.g(a);
        }
        da() {
            let a = new NumericMarkerManager(0, (b) => this.de.item(b), (b) => this.dc.y1.c.item(b), runOn(this, this.di), runOn(this, this.c9), runOn(this, this.df));
            a.n = true;
            a.p = runOn(this.dc, this.dc.acg);
            return a;
        }
        di(a) {
            this.dc.abl(a, this.de);
        }
        c9() {
            return this.dc.yr(this.de, this.ca, this.b9);
        }
        df() {
            return this.dc.z6(this.de);
        }
        dg(a, b, c, d) {
            if (this.dc.zu) {
                let e = new GeometryGroup();
                this.dc.yz.ol(e, a, b, c, d);
            }
            else {
            }
        }
        dj() {
            if (this.dc.acd != null) {
                this.dc.acc = this.dc.acd;
            }
            else {
                this.dc.acc = this.dc.ve;
            }
        }
        cw(a) {
            this.de.f(a);
        }
        bi(a, b) {
            if (a.d) {
                if (this.dc.zg != 0 && !b) {
                    let c = this.dd.g$n;
                    c.ad = this.dc.aac;
                    c._stroke = this.dc.acc;
                    c.aj = this.dc.acf;
                    c.ai = this.dc.ace;
                    a.v(c);
                }
            }
            super.bi(a, b);
        }
        dk() {
            return Rect.empty;
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'><span>" + "${item." + this.dc.aao + "}" + "</span><br/><span";
            let b = this.f.ba.a$u(this.f);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            a += ">" + this.dc.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.dc.aa6 + "}</span></div>";
            return a;
        }
    }
    PolarBaseView.$t = /*@__PURE__*/ markType(PolarBaseView, 'PolarBaseView', MarkerSeriesView.$);
    return PolarBaseView;
})();