/*
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 * as tslib_1 from "tslib";
import { Base, IList$1_$type, Point_$type, markType, getEnumerator } from "igniteui-react-core/ES5/type";
import { List$1 } from "igniteui-react-core/ES5/List$1";
import { ReadOnlyCollection$1 } from "igniteui-react-core/ES5/ReadOnlyCollection$1";
import { isNaN_, isInfinity } from "igniteui-react-core/ES5/number";
/**
 * @hidden
 */
var NaNSegmenter = /** @class */ (function (_super) {
    tslib_1.__extends(NaNSegmenter, _super);
    function NaNSegmenter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    NaNSegmenter.c = function (a, b) {
        var c = new List$1(IList$1_$type.specialize(Point_$type), 0);
        var d = getEnumerator(a);
        var e = new List$1(Point_$type, 0);
        var f = true;
        while (d.moveNext()) {
            if (NaNSegmenter.a(d.current)) {
                if (!f && b == 1) {
                    f = true;
                    var g = e;
                    e = new List$1(Point_$type, 0);
                    c.add(new ReadOnlyCollection$1(Point_$type, 1, g));
                }
            }
            else {
                f = false;
                e.add(d.current);
            }
        }
        c.add(new ReadOnlyCollection$1(Point_$type, 1, e));
        return c;
    };
    NaNSegmenter.a = function (a) {
        return (isNaN_(a.x) || isNaN_(a.y) || isInfinity(a.x) || isInfinity(a.y));
    };
    NaNSegmenter.b = function (a) {
        return !NaNSegmenter.a(a);
    };
    NaNSegmenter.$t = markType(NaNSegmenter, 'NaNSegmenter');
    return NaNSegmenter;
}(Base));
export { NaNSegmenter };
