'use strict';
import { isProdOrDemo } from '../../../../fd-toolbox/lib/environments.js';
import { tryGetFromRemoteCache, setRemoteCache } from '../../../../fd-toolbox/server/cachings/fd-remote-cache.js';

var __defProp=Object['defineProperty'],__name=(_0x4c4da5,_0xeb849f)=>__defProp(_0x4c4da5,'name',{'value':_0xeb849f,'configurable':!![]});async function getTestData(_0x35ee47,_0x5d0211){const _0xadc7dc=getMemoryKey(_0x35ee47,_0x5d0211);if(isProdOrDemo())try{const _0x9e8312=await tryGetFromRemoteCache(_0xadc7dc);return _0x9e8312?.['value'];}catch{return void(-0x1af*-0x5+-0x857*0x1+-0x5*0x4);}return getTestDataStore()?.['get'](_0xadc7dc);}__name(getTestData,'getTestData');async function setTestData(_0xae0609,_0x1d3941,_0x5022bd){const _0x46d695=getMemoryKey(_0xae0609,_0x5022bd);if(isProdOrDemo()){await setRemoteCache(_0x46d695,{'value':_0x1d3941},{'absoluteExpirationRelativeToNowSeconds':testDataTtlSeconds});return;}getTestDataStore()?.['set'](_0x46d695,_0x1d3941);}__name(setTestData,'setTestData');function getTestDataStore(){if(isProdOrDemo())return void(-0x1cb8*-0x1+-0xa73+0x3*-0x617);return globalThis['_testData']??=new Map(),globalThis['_testData'];}__name(getTestDataStore,'getTestDataStore');const testDataTtlSeconds=0x1*-0x2555+0x9f6+0x2267*0x1;function getMemoryKey(_0x404f69,_0xc6aae4){return _0xc6aae4?_0x404f69+'_'+_0xc6aae4:_0x404f69;}__name(getMemoryKey,'getMemoryKey');

export { getTestData, setTestData };
