1import{o as r}from"./index-BfFoir-D.js";import"./vendor-pdf-tfVvIPiR.js";import"./vendor-framer-4qzhpEbi.js";import"./vendor-react-DoD6Cqi4.js";import"./vendor-three-97KX4nAg.js";import"./vendor-store-DzZixoKE.js";import"./vendor-ui-DKVeHV7E.js";import"./vendor-markdown-DLx0uNNN.js";const o=t=>`aria_workspace_${t}`,c=t=>`workspace_${t}`;function p(t){if(!t)return null;try{return JSON.parse(t)}catch{return null}}const f={async saveWorkspace(t,a,e={}){if(!t)return!1;const n=new Date().toISOString(),i={personaSettings:e,layoutSchema:a,updatedAt:n};await r.user_workspace_configs.put({id:c(t),user_id:t,workspace_id:"canvas_studio",puck_data:i,updated_at:n});try{localStorage.removeItem(o(t))}catch{}return!0},async loadWorkspace(t){if(!t)return null;try{const e=await r.user_workspace_configs.get(c(t));if(e?.puck_data)return e.puck_data}catch(e){console.error("Workspace Dexie load:",e)}const a=p(typeof localStorage<"u"?localStorage.getItem(o(t)):null);if(a){try{await r.user_workspace_configs.put({id:c(t),user_id:t,workspace_id:"canvas_studio",puck_data:a,updated_at:a.updatedAt||new Date().toISOString()}),localStorage.removeItem(o(t))}catch{}return a}return null}};export{f as WorkspaceService};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.