Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.170/page_editor/app/utils/cache",["module","exports","require"],(function(e,t,r){window;{function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeCache=function initializeCache(){e=new Map},t.disposeCache=function disposeCache(){e=null},t.getCacheKey=function getCacheKey(e){if(Array.isArray(e))return e.every((e=>e))?e.join("-"):null;return e},t.getCacheItem=function getCacheItem(t){if(!e)throw new Error("cache is not initialized");return e.get(t)||{}},t.deleteCacheItem=function deleteCacheItem(t){if(!e)throw new Error("cache is not initialized");e.delete(t)},t.setCacheItem=function setCacheItem({data:t,key:r,loadPromise:n,status:o}){e.set(r,_objectSpread(_objectSpread(_objectSpread({},t&&{data:t}),n&&{loadPromise:n}),{},{status:o}))},t.CACHE_STATUS=t.CACHE_KEYS=void 0;let e=null;const r={allowedInputTypes:"allowedInputTypes",collectionConfigurationUrl:"collectionConfigurationUrl",collectionVariations:"collectionVariations",formFields:"formFields"};t.CACHE_KEYS=r;const n={loading:"loading",saved:"saved"};t.CACHE_STATUS=n}}));
//# sourceMappingURL=cache.js.map