/*
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 { Base, String_$type, markType } from "igniteui-angular-core";
import { Dictionary$2 } from "igniteui-angular-core";
import { CultureInfo } from "igniteui-angular-core";
import { parseNumber } from "igniteui-angular-core";
/**
 * @hidden
 */
export let ObjectModelCommonPartHelpers_DoubleValueCache = /*@__PURE__*/ (() => {
    class ObjectModelCommonPartHelpers_DoubleValueCache extends Base {
        constructor() {
            super(...arguments);
            this.c = new Dictionary$2(String_$type, Base.$, 0);
            this.a = new Array(512);
            this.d = 0;
        }
        static f(a) {
            let b = ObjectModelCommonPartHelpers_DoubleValueCache.b || (ObjectModelCommonPartHelpers_DoubleValueCache.b = new ObjectModelCommonPartHelpers_DoubleValueCache());
            let c;
            if (((() => { let d = b.c.tryGetValue(a, c); c = d.p1; return d.ret; })()) == false) {
                if (b.a[b.d] != null) {
                    b.c.removeItem(b.a[b.d]);
                }
                b.a[b.d] = a;
                b.d = (b.d + 1) % 512;
                b.c.item(a, c = parseNumber(a, CultureInfo.invariantCulture));
            }
            return c;
        }
    }
    ObjectModelCommonPartHelpers_DoubleValueCache.$t = markType(ObjectModelCommonPartHelpers_DoubleValueCache, 'ObjectModelCommonPartHelpers_DoubleValueCache');
    ObjectModelCommonPartHelpers_DoubleValueCache.b = null;
    return ObjectModelCommonPartHelpers_DoubleValueCache;
})();
