{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-leo/src/client/utils/local-storage.js"],"names":["hasItem","saveJSON","loadJSON","key","stringValue","getItem","undefined","JSON","parse","json","stringify","setItem"],"mappings":";;;;;;;;;;;;;;6BAagBA,wC;;;;;;;;;;;;;;8BALAC,yC;;;;;;;;;;;;;;8BARAC,yC;;;;;;;;AAAT,eAASA,QAAT,CAAkBC,GAAlB,EAAuB;AAC5B,cAAMC,cAAc,KAAKC,OAAL,CAAaF,GAAb,CAApB;AACA,YAAIC,gBAAgB,IAApB,EAA0B;AACxB,iBAAOE,SAAP;AACD;AACD,eAAOC,KAAKC,KAAL,CAAWJ,WAAX,CAAP;AACD;;;;AAEM,eAASH,QAAT,CAAkBE,GAAlB,EAAuBM,IAAvB,EAA6B;AAClC,cAAML,cAAcG,KAAKG,SAAL,CAAeD,IAAf,EAAqBH,SAArB,EAAgC,CAAhC,CAApB;AACA,eAAO,KAAKK,OAAL,CAAaR,GAAb,EAAkBC,WAAlB,CAAP;AACD;;;;AAEM,eAASJ,OAAT,CAAiBG,GAAjB,EAAsB;AAC3B,eAAO,KAAKE,OAAL,CAAaF,GAAb,MAAsB,IAA7B;AACD","file":"local-storage.js","sourcesContent":["export function loadJSON(key) {\n  const stringValue = this.getItem(key);\n  if (stringValue === null) {\n    return undefined;\n  }\n  return JSON.parse(stringValue);\n}\n\nexport function saveJSON(key, json) {\n  const stringValue = JSON.stringify(json, undefined, 2);\n  return this.setItem(key, stringValue);\n}\n\nexport function hasItem(key) {\n  return this.getItem(key) !== null;\n}\n\n"]}