{"version":3,"file":"localStorage-3gfpacGC.js","sources":["../../Assets/Scripts/utils/localStorage.ts"],"sourcesContent":["export const setWithExpiry = (key: string, value: string, expiryHours: number) => {\n const now = new Date();\n const item = {\n expiry: now.getTime() + expiryHours * 60 * 60 * 1000,\n value,\n };\n localStorage.setItem(key, JSON.stringify(item));\n};\n\nexport const getWithExpiry = (key: string): string | null => {\n const itemStr = localStorage.getItem(key);\n if (!itemStr) {\n return null;\n }\n const item = JSON.parse(itemStr);\n const now = new Date();\n\n if (now.getTime() > item.expiry) {\n localStorage.removeItem(key);\n return null;\n }\n return item.value;\n};\n"],"names":["setWithExpiry","key","value","expiryHours","item","getWithExpiry","itemStr"],"mappings":"AAAO,MAAMA,EAAgB,CAACC,EAAaC,EAAeC,IAAwB,CAEhF,MAAMC,EAAO,CACX,WAFc,OAEF,QAAA,EAAYD,EAAc,GAAK,GAAK,IAChD,MAAAD,CAAA,EAEF,aAAa,QAAQD,EAAK,KAAK,UAAUG,CAAI,CAAC,CAChD,EAEaC,EAAiBJ,GAA+B,CACrD,MAAAK,EAAU,aAAa,QAAQL,CAAG,EACxC,GAAI,CAACK,EACI,OAAA,KAEH,MAAAF,EAAO,KAAK,MAAME,CAAO,EAG/B,WAFgB,OAER,UAAYF,EAAK,QACvB,aAAa,WAAWH,CAAG,EACpB,MAEFG,EAAK,KACd"}