define(["exports"],function(_exports){function updateCache(instance,localData){instance.cache.put("data",new Response(JSON.stringify(localData)))}function MyStore(){}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,MyStore.prototype.init=function(){var instance=this;return caches.open("embydata").then(function(cache){return(instance.cache=cache).match("data").then(function(response){return response?response.text().then(function(text){instance.localData=JSON.parse(text)}):(instance.localData={},Promise.resolve())},function(){instance.localData={}})})},MyStore.prototype.setItem=function(name,value){var localData=this.localData;localData&&localData[name]!==value&&(localData[name]=value,updateCache(this,localData))},MyStore.prototype.getItem=function(name){var localData=this.localData;if(localData)return localData[name]},MyStore.prototype.removeItem=function(name){var localData=this.localData;localData&&(localData[name]=null,delete localData[name],updateCache(this,localData))};var _default=new MyStore;_exports.default=_default});