const t="palserver.data-center.intent";function o(r){const a={...r,createdAt:Date.now()};localStorage.setItem(t,JSON.stringify(a))}function l(r,a=!1){try{const n=localStorage.getItem(t);if(!n)return null;const e=JSON.parse(n);return!e.target||!e.kind||!e.id||!e.createdAt||Date.now()-e.createdAt>9e5?(localStorage.removeItem(t),null):e.target!==r?null:(a&&localStorage.removeItem(t),e)}catch{return localStorage.removeItem(t),null}}export{l as r,o as s};
