"use strict";let valuesMap=new Map;class LocalStorage{getItem(key){const stringKey=String(key);return valuesMap.has(key)?String(valuesMap.get(stringKey)):null}setItem(key,val){valuesMap.set(String(key),String(val))}removeItem(key){valuesMap.delete(key)}clear(){valuesMap.clear()}key(i){if(0===arguments.length)throw new TypeError("Failed to execute 'key' on 'Storage': 1 argument required, but only 0 present.");return Array.from(valuesMap.keys())[i]}get length(){return valuesMap.size}initValuesMap(_valuesMap){valuesMap=new Map(Object.entries(_valuesMap||{}))}getValuesMap(){return Object.fromEntries(valuesMap)}}const instance=new LocalStorage,zeroLocalStorage=new Proxy(instance,{set:function(obj,prop,value){return LocalStorage.prototype.hasOwnProperty(prop)?instance[prop]=value:instance.setItem(prop,value),!0},get:function(target,name){return LocalStorage.prototype.hasOwnProperty(name)?instance[name]:valuesMap.has(name)?instance.getItem(name):void 0}});export default zeroLocalStorage;