/*! Built with http://stenciljs.com */
webcomponents.loadBundle("chunk-4bc80c3c.js", ["exports"], function (e) { window.webcomponents.h, e.Storage = /** @class */ (function () {
    function Storage() {
    }
    Storage.saveLocalModel = function (e, o) {
        if (o === void 0) { o = "model"; }
        "undefined" != typeof window && window.localStorage ? (window.localStorage.setItem(o, JSON.stringify(e)), window.localStorage.setItem(o + "-changed", String(Math.round(+new Date / 1e3)))) : console.error("localStorage not available: not running in a browser");
    };
    Storage.restoreLocalModel = function (e) {
        if (e === void 0) { e = "model"; }
        if ("undefined" != typeof window && window.localStorage) {
            if (localStorage.getItem(e))
                return JSON.parse(localStorage.getItem(e));
        }
        else
            console.error("localStorage not available: not running in a browser");
    };
    Storage.flushLocalModel = function (e) {
        if (e === void 0) { e = "model"; }
        "undefined" != typeof window && window.localStorage ? (localStorage.getItem(e) && localStorage.removeItem(e), localStorage.getItem(e + "-changed") && localStorage.removeItem(e + "-changed")) : console.error("localStorage not available: not running in a browser");
    };
    return Storage;
}()); });
