[{"data":1,"prerenderedAt":1230},["ShallowReactive",2],{"quirekit-doc:\u002Fen\u002Fguide\u002Fpersistence":3,"quirekit-source:recipes\u002Fsave.ts":167,"mdc-uipfhd-key":168},{"id":4,"title":5,"body":6,"description":155,"extension":156,"keywords":157,"locale":158,"meta":159,"navigation":160,"order":161,"path":162,"section":163,"seo":164,"stem":165,"__hash__":166},"docs\u002Fguide\u002Fpersistence.en.md","Persistence",{"type":7,"value":8,"toc":150},"minimark",[9,13,18,25,99,109,113,116,132,136,140,143,146],[10,11,12],"p",{},"Core supplies content access; your application chooses storage. Start by saving the current document in the browser, then add restoration and version checks.",[14,15,17],"h2",{"id":16},"save-current-content","Save current content",[10,19,20,24],{},[21,22,23],"code",{},"editor.getJSON()"," returns nodes, attributes and formatting. Browser storage accepts strings:",[26,27,33],"pre",{"className":28,"code":29,"filename":30,"language":31,"meta":32,"style":32},"language-ts shiki shiki-themes github-light github-light github-dark","const snapshot = { version: 1, content: editor.getJSON() }\nlocalStorage.setItem('my-document', JSON.stringify(snapshot))\n","Save a local draft","ts","",[21,34,35,68],{"__ignoreMap":32},[36,37,40,44,48,51,55,58,61,65],"span",{"class":38,"line":39},"line",1,[36,41,43],{"class":42},"sDD9d","const",[36,45,47],{"class":46},"sUNQB"," snapshot",[36,49,50],{"class":42}," =",[36,52,54],{"class":53},"sVPnS"," { version: ",[36,56,57],{"class":46},"1",[36,59,60],{"class":53},", content: editor.",[36,62,64],{"class":63},"sgQzM","getJSON",[36,66,67],{"class":53},"() }\n",[36,69,71,74,77,80,84,87,90,93,96],{"class":38,"line":70},2,[36,72,73],{"class":53},"localStorage.",[36,75,76],{"class":63},"setItem",[36,78,79],{"class":53},"(",[36,81,83],{"class":82},"s-HEn","'my-document'",[36,85,86],{"class":53},", ",[36,88,89],{"class":46},"JSON",[36,91,92],{"class":53},".",[36,94,95],{"class":63},"stringify",[36,97,98],{"class":53},"(snapshot))\n",[10,100,101,104,105,108],{},[21,102,103],{},"version"," identifies your backup format for future migrations. ",[21,106,107],{},"localStorage"," belongs to this browser, without cross-device synchronization or image bytes.",[14,110,112],{"id":111},"validate-before-restoring","Validate before restoring",[10,114,115],{},"Read and parse the backup, check its version, then validate content with the matching Schema. Create defaults only when no save exists. Preserve damaged or unsupported files for recovery.",[10,117,118,119,122,123,126,127,92],{},"These helpers show explicit save and read operations. ",[21,120,121],{},"recipes\u002Fsave.ts"," handles storage and basic version checks; ",[21,124,125],{},"recipes\u002Ftypes.ts"," defines the envelope. Complete products also validate nodes and attributes against Schema; see ",[128,129,131],"a",{"href":130},"\u002Fen\u002Fbuild\u002Ffiles","files",[133,134],"docs-recipe",{"name":135},"recipes\u002Fsave",[14,137,139],{"id":138},"report-success-after-writing","Report success after writing",[10,141,142],{},"Storage can fail: show an error and retry. Clear unsaved state only after a successful write. During network saves users may continue editing, so an older completion must not clear a newer draft's unsaved state.",[10,144,145],{},"Autosave can observe content changes and coalesce requests, while still handling versions, failures and conflicts. Downloading JSON alone does not implement restoration or server synchronization.",[147,148,149],"style",{},"html pre.shiki code .sDD9d, html code.shiki .sDD9d{--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sUNQB, html code.shiki .sUNQB{--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVPnS, html code.shiki .sVPnS{--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sgQzM, html code.shiki .sgQzM{--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s-HEn, html code.shiki .s-HEn{--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":32,"searchDepth":70,"depth":70,"links":151},[152,153,154],{"id":16,"depth":70,"text":17},{"id":111,"depth":70,"text":112},{"id":138,"depth":70,"text":139},"Save JSON, choose storage and understand versioning and restoration.","md",null,"en",{},true,5,"\u002Fen\u002Fguide\u002Fpersistence","Core concepts",{"title":5,"description":155},"guide\u002Fpersistence.en","6a_dEhpXdudhDK4u5oyb43m2V9NOaRPdt70f2FjF2Sw","import type { Editor, JSONContent } from \"@quirekit\u002Fcore\";\nimport type { DocumentSnapshot } from \".\u002Ftypes\";\n\n\u002F**\n * Saves explicitly; storage failure propagates so callers cannot report false success.\n * @param editor - The current document authority.\n * @param storage - Host-selected browser or test storage.\n * @param key - Document-specific storage key.\n *\u002F\nexport function saveDocument(editor: Pick\u003CEditor, \"getJSON\">, storage: Pick\u003CStorage, \"setItem\">, key: string): void {\n  const snapshot: DocumentSnapshot = { version: 1, content: editor.getJSON() };\n  storage.setItem(key, JSON.stringify(snapshot));\n}\n\n\u002F**\n * Reads the versioned envelope; the editor schema remains responsible for content admission.\n * @param storage - The same host storage used for saving.\n * @param key - Document-specific storage key.\n * @returns Saved canonical JSON, or null when this document has not been saved.\n *\u002F\nexport function readDocument(storage: Pick\u003CStorage, \"getItem\">, key: string): JSONContent | null {\n  const source = storage.getItem(key);\n  if (source === null) return null;\n  const value: unknown = JSON.parse(source);\n  if (!value || typeof value !== \"object\" || !(\"version\" in value) || value.version !== 1 || !(\"content\" in value)) {\n    throw new Error(\"Unsupported document snapshot version\");\n  }\n  const content = value.content;\n  if (!content || typeof content !== \"object\" || !(\"type\" in content) || content.type !== \"doc\") {\n    throw new Error(\"Invalid document snapshot\");\n  }\n  return content as JSONContent;\n}\n",{"data":169,"body":170},{},{"type":171,"children":172},"root",[173,1225],{"type":174,"tag":26,"props":175,"children":177},"element",{"className":28,"code":176,"language":31,"meta":32,"style":32},"import type { Editor, JSONContent } from \"@quirekit\u002Fcore\";\nimport type { DocumentSnapshot } from \".\u002Ftypes\";\n\n\u002F**\n * Saves explicitly; storage failure propagates so callers cannot report false success.\n * @param editor - The current document authority.\n * @param storage - Host-selected browser or test storage.\n * @param key - Document-specific storage key.\n *\u002F\nexport function saveDocument(editor: Pick\u003CEditor, \"getJSON\">, storage: Pick\u003CStorage, \"setItem\">, key: string): void {\n  const snapshot: DocumentSnapshot = { version: 1, content: editor.getJSON() };\n  storage.setItem(key, JSON.stringify(snapshot));\n}\n\n\u002F**\n * Reads the versioned envelope; the editor schema remains responsible for content admission.\n * @param storage - The same host storage used for saving.\n * @param key - Document-specific storage key.\n * @returns Saved canonical JSON, or null when this document has not been saved.\n *\u002F\nexport function readDocument(storage: Pick\u003CStorage, \"getItem\">, key: string): JSONContent | null {\n  const source = storage.getItem(key);\n  if (source === null) return null;\n  const value: unknown = JSON.parse(source);\n  if (!value || typeof value !== \"object\" || !(\"version\" in value) || value.version !== 1 || !(\"content\" in value)) {\n    throw new Error(\"Unsupported document snapshot version\");\n  }\n  const content = value.content;\n  if (!content || typeof content !== \"object\" || !(\"type\" in content) || content.type !== \"doc\") {\n    throw new Error(\"Invalid document snapshot\");\n  }\n  return content as JSONContent;\n}\n\n",[178],{"type":174,"tag":21,"props":179,"children":180},{"__ignoreMap":32},[181,218,247,256,266,274,298,320,342,351,484,531,566,575,583,591,600,621,641,659,667,760,792,833,878,999,1032,1041,1063,1154,1183,1191,1217],{"type":174,"tag":36,"props":182,"children":183},{"class":38,"line":39},[184,191,196,202,207,213],{"type":174,"tag":36,"props":185,"children":187},{"style":186},"--shiki-default:#D73A49;--shiki-light:#D73A49;--shiki-dark:#F97583",[188],{"type":189,"value":190},"text","import",{"type":174,"tag":36,"props":192,"children":193},{"style":186},[194],{"type":189,"value":195}," type",{"type":174,"tag":36,"props":197,"children":199},{"style":198},"--shiki-default:#24292E;--shiki-light:#24292E;--shiki-dark:#E1E4E8",[200],{"type":189,"value":201}," { Editor, JSONContent } ",{"type":174,"tag":36,"props":203,"children":204},{"style":186},[205],{"type":189,"value":206},"from",{"type":174,"tag":36,"props":208,"children":210},{"style":209},"--shiki-default:#032F62;--shiki-light:#032F62;--shiki-dark:#9ECBFF",[211],{"type":189,"value":212}," \"@quirekit\u002Fcore\"",{"type":174,"tag":36,"props":214,"children":215},{"style":198},[216],{"type":189,"value":217},";\n",{"type":174,"tag":36,"props":219,"children":220},{"class":38,"line":70},[221,225,229,234,238,243],{"type":174,"tag":36,"props":222,"children":223},{"style":186},[224],{"type":189,"value":190},{"type":174,"tag":36,"props":226,"children":227},{"style":186},[228],{"type":189,"value":195},{"type":174,"tag":36,"props":230,"children":231},{"style":198},[232],{"type":189,"value":233}," { DocumentSnapshot } ",{"type":174,"tag":36,"props":235,"children":236},{"style":186},[237],{"type":189,"value":206},{"type":174,"tag":36,"props":239,"children":240},{"style":209},[241],{"type":189,"value":242}," \".\u002Ftypes\"",{"type":174,"tag":36,"props":244,"children":245},{"style":198},[246],{"type":189,"value":217},{"type":174,"tag":36,"props":248,"children":250},{"class":38,"line":249},3,[251],{"type":174,"tag":36,"props":252,"children":253},{"emptyLinePlaceholder":160},[254],{"type":189,"value":255},"\n",{"type":174,"tag":36,"props":257,"children":259},{"class":38,"line":258},4,[260],{"type":174,"tag":36,"props":261,"children":263},{"style":262},"--shiki-default:#6A737D;--shiki-light:#6A737D;--shiki-dark:#6A737D",[264],{"type":189,"value":265},"\u002F**\n",{"type":174,"tag":36,"props":267,"children":268},{"class":38,"line":161},[269],{"type":174,"tag":36,"props":270,"children":271},{"style":262},[272],{"type":189,"value":273}," * Saves explicitly; storage failure propagates so callers cannot report false success.\n",{"type":174,"tag":36,"props":275,"children":277},{"class":38,"line":276},6,[278,283,288,293],{"type":174,"tag":36,"props":279,"children":280},{"style":262},[281],{"type":189,"value":282}," * ",{"type":174,"tag":36,"props":284,"children":285},{"style":186},[286],{"type":189,"value":287},"@param",{"type":174,"tag":36,"props":289,"children":290},{"style":198},[291],{"type":189,"value":292}," editor",{"type":174,"tag":36,"props":294,"children":295},{"style":262},[296],{"type":189,"value":297}," - The current document authority.\n",{"type":174,"tag":36,"props":299,"children":301},{"class":38,"line":300},7,[302,306,310,315],{"type":174,"tag":36,"props":303,"children":304},{"style":262},[305],{"type":189,"value":282},{"type":174,"tag":36,"props":307,"children":308},{"style":186},[309],{"type":189,"value":287},{"type":174,"tag":36,"props":311,"children":312},{"style":198},[313],{"type":189,"value":314}," storage",{"type":174,"tag":36,"props":316,"children":317},{"style":262},[318],{"type":189,"value":319}," - Host-selected browser or test storage.\n",{"type":174,"tag":36,"props":321,"children":323},{"class":38,"line":322},8,[324,328,332,337],{"type":174,"tag":36,"props":325,"children":326},{"style":262},[327],{"type":189,"value":282},{"type":174,"tag":36,"props":329,"children":330},{"style":186},[331],{"type":189,"value":287},{"type":174,"tag":36,"props":333,"children":334},{"style":198},[335],{"type":189,"value":336}," key",{"type":174,"tag":36,"props":338,"children":339},{"style":262},[340],{"type":189,"value":341}," - Document-specific storage key.\n",{"type":174,"tag":36,"props":343,"children":345},{"class":38,"line":344},9,[346],{"type":174,"tag":36,"props":347,"children":348},{"style":262},[349],{"type":189,"value":350}," *\u002F\n",{"type":174,"tag":36,"props":352,"children":354},{"class":38,"line":353},10,[355,360,365,371,375,381,386,391,396,401,405,410,415,420,424,428,432,437,441,446,450,455,459,465,470,474,479],{"type":174,"tag":36,"props":356,"children":357},{"style":186},[358],{"type":189,"value":359},"export",{"type":174,"tag":36,"props":361,"children":362},{"style":186},[363],{"type":189,"value":364}," function",{"type":174,"tag":36,"props":366,"children":368},{"style":367},"--shiki-default:#6F42C1;--shiki-light:#6F42C1;--shiki-dark:#B392F0",[369],{"type":189,"value":370}," saveDocument",{"type":174,"tag":36,"props":372,"children":373},{"style":198},[374],{"type":189,"value":79},{"type":174,"tag":36,"props":376,"children":378},{"style":377},"--shiki-default:#E36209;--shiki-light:#E36209;--shiki-dark:#FFAB70",[379],{"type":189,"value":380},"editor",{"type":174,"tag":36,"props":382,"children":383},{"style":186},[384],{"type":189,"value":385},":",{"type":174,"tag":36,"props":387,"children":388},{"style":367},[389],{"type":189,"value":390}," Pick",{"type":174,"tag":36,"props":392,"children":393},{"style":198},[394],{"type":189,"value":395},"\u003C",{"type":174,"tag":36,"props":397,"children":398},{"style":367},[399],{"type":189,"value":400},"Editor",{"type":174,"tag":36,"props":402,"children":403},{"style":198},[404],{"type":189,"value":86},{"type":174,"tag":36,"props":406,"children":407},{"style":209},[408],{"type":189,"value":409},"\"getJSON\"",{"type":174,"tag":36,"props":411,"children":412},{"style":198},[413],{"type":189,"value":414},">, ",{"type":174,"tag":36,"props":416,"children":417},{"style":377},[418],{"type":189,"value":419},"storage",{"type":174,"tag":36,"props":421,"children":422},{"style":186},[423],{"type":189,"value":385},{"type":174,"tag":36,"props":425,"children":426},{"style":367},[427],{"type":189,"value":390},{"type":174,"tag":36,"props":429,"children":430},{"style":198},[431],{"type":189,"value":395},{"type":174,"tag":36,"props":433,"children":434},{"style":367},[435],{"type":189,"value":436},"Storage",{"type":174,"tag":36,"props":438,"children":439},{"style":198},[440],{"type":189,"value":86},{"type":174,"tag":36,"props":442,"children":443},{"style":209},[444],{"type":189,"value":445},"\"setItem\"",{"type":174,"tag":36,"props":447,"children":448},{"style":198},[449],{"type":189,"value":414},{"type":174,"tag":36,"props":451,"children":452},{"style":377},[453],{"type":189,"value":454},"key",{"type":174,"tag":36,"props":456,"children":457},{"style":186},[458],{"type":189,"value":385},{"type":174,"tag":36,"props":460,"children":462},{"style":461},"--shiki-default:#005CC5;--shiki-light:#005CC5;--shiki-dark:#79B8FF",[463],{"type":189,"value":464}," string",{"type":174,"tag":36,"props":466,"children":467},{"style":198},[468],{"type":189,"value":469},")",{"type":174,"tag":36,"props":471,"children":472},{"style":186},[473],{"type":189,"value":385},{"type":174,"tag":36,"props":475,"children":476},{"style":461},[477],{"type":189,"value":478}," void",{"type":174,"tag":36,"props":480,"children":481},{"style":198},[482],{"type":189,"value":483}," {\n",{"type":174,"tag":36,"props":485,"children":487},{"class":38,"line":486},11,[488,493,497,501,506,510,514,518,522,526],{"type":174,"tag":36,"props":489,"children":490},{"style":186},[491],{"type":189,"value":492},"  const",{"type":174,"tag":36,"props":494,"children":495},{"style":461},[496],{"type":189,"value":47},{"type":174,"tag":36,"props":498,"children":499},{"style":186},[500],{"type":189,"value":385},{"type":174,"tag":36,"props":502,"children":503},{"style":367},[504],{"type":189,"value":505}," DocumentSnapshot",{"type":174,"tag":36,"props":507,"children":508},{"style":186},[509],{"type":189,"value":50},{"type":174,"tag":36,"props":511,"children":512},{"style":198},[513],{"type":189,"value":54},{"type":174,"tag":36,"props":515,"children":516},{"style":461},[517],{"type":189,"value":57},{"type":174,"tag":36,"props":519,"children":520},{"style":198},[521],{"type":189,"value":60},{"type":174,"tag":36,"props":523,"children":524},{"style":367},[525],{"type":189,"value":64},{"type":174,"tag":36,"props":527,"children":528},{"style":198},[529],{"type":189,"value":530},"() };\n",{"type":174,"tag":36,"props":532,"children":534},{"class":38,"line":533},12,[535,540,544,549,553,557,561],{"type":174,"tag":36,"props":536,"children":537},{"style":198},[538],{"type":189,"value":539},"  storage.",{"type":174,"tag":36,"props":541,"children":542},{"style":367},[543],{"type":189,"value":76},{"type":174,"tag":36,"props":545,"children":546},{"style":198},[547],{"type":189,"value":548},"(key, ",{"type":174,"tag":36,"props":550,"children":551},{"style":461},[552],{"type":189,"value":89},{"type":174,"tag":36,"props":554,"children":555},{"style":198},[556],{"type":189,"value":92},{"type":174,"tag":36,"props":558,"children":559},{"style":367},[560],{"type":189,"value":95},{"type":174,"tag":36,"props":562,"children":563},{"style":198},[564],{"type":189,"value":565},"(snapshot));\n",{"type":174,"tag":36,"props":567,"children":569},{"class":38,"line":568},13,[570],{"type":174,"tag":36,"props":571,"children":572},{"style":198},[573],{"type":189,"value":574},"}\n",{"type":174,"tag":36,"props":576,"children":578},{"class":38,"line":577},14,[579],{"type":174,"tag":36,"props":580,"children":581},{"emptyLinePlaceholder":160},[582],{"type":189,"value":255},{"type":174,"tag":36,"props":584,"children":586},{"class":38,"line":585},15,[587],{"type":174,"tag":36,"props":588,"children":589},{"style":262},[590],{"type":189,"value":265},{"type":174,"tag":36,"props":592,"children":594},{"class":38,"line":593},16,[595],{"type":174,"tag":36,"props":596,"children":597},{"style":262},[598],{"type":189,"value":599}," * Reads the versioned envelope; the editor schema remains responsible for content admission.\n",{"type":174,"tag":36,"props":601,"children":603},{"class":38,"line":602},17,[604,608,612,616],{"type":174,"tag":36,"props":605,"children":606},{"style":262},[607],{"type":189,"value":282},{"type":174,"tag":36,"props":609,"children":610},{"style":186},[611],{"type":189,"value":287},{"type":174,"tag":36,"props":613,"children":614},{"style":198},[615],{"type":189,"value":314},{"type":174,"tag":36,"props":617,"children":618},{"style":262},[619],{"type":189,"value":620}," - The same host storage used for saving.\n",{"type":174,"tag":36,"props":622,"children":624},{"class":38,"line":623},18,[625,629,633,637],{"type":174,"tag":36,"props":626,"children":627},{"style":262},[628],{"type":189,"value":282},{"type":174,"tag":36,"props":630,"children":631},{"style":186},[632],{"type":189,"value":287},{"type":174,"tag":36,"props":634,"children":635},{"style":198},[636],{"type":189,"value":336},{"type":174,"tag":36,"props":638,"children":639},{"style":262},[640],{"type":189,"value":341},{"type":174,"tag":36,"props":642,"children":644},{"class":38,"line":643},19,[645,649,654],{"type":174,"tag":36,"props":646,"children":647},{"style":262},[648],{"type":189,"value":282},{"type":174,"tag":36,"props":650,"children":651},{"style":186},[652],{"type":189,"value":653},"@returns",{"type":174,"tag":36,"props":655,"children":656},{"style":262},[657],{"type":189,"value":658}," Saved canonical JSON, or null when this document has not been saved.\n",{"type":174,"tag":36,"props":660,"children":662},{"class":38,"line":661},20,[663],{"type":174,"tag":36,"props":664,"children":665},{"style":262},[666],{"type":189,"value":350},{"type":174,"tag":36,"props":668,"children":670},{"class":38,"line":669},21,[671,675,679,684,688,692,696,700,704,708,712,717,721,725,729,733,737,741,746,751,756],{"type":174,"tag":36,"props":672,"children":673},{"style":186},[674],{"type":189,"value":359},{"type":174,"tag":36,"props":676,"children":677},{"style":186},[678],{"type":189,"value":364},{"type":174,"tag":36,"props":680,"children":681},{"style":367},[682],{"type":189,"value":683}," readDocument",{"type":174,"tag":36,"props":685,"children":686},{"style":198},[687],{"type":189,"value":79},{"type":174,"tag":36,"props":689,"children":690},{"style":377},[691],{"type":189,"value":419},{"type":174,"tag":36,"props":693,"children":694},{"style":186},[695],{"type":189,"value":385},{"type":174,"tag":36,"props":697,"children":698},{"style":367},[699],{"type":189,"value":390},{"type":174,"tag":36,"props":701,"children":702},{"style":198},[703],{"type":189,"value":395},{"type":174,"tag":36,"props":705,"children":706},{"style":367},[707],{"type":189,"value":436},{"type":174,"tag":36,"props":709,"children":710},{"style":198},[711],{"type":189,"value":86},{"type":174,"tag":36,"props":713,"children":714},{"style":209},[715],{"type":189,"value":716},"\"getItem\"",{"type":174,"tag":36,"props":718,"children":719},{"style":198},[720],{"type":189,"value":414},{"type":174,"tag":36,"props":722,"children":723},{"style":377},[724],{"type":189,"value":454},{"type":174,"tag":36,"props":726,"children":727},{"style":186},[728],{"type":189,"value":385},{"type":174,"tag":36,"props":730,"children":731},{"style":461},[732],{"type":189,"value":464},{"type":174,"tag":36,"props":734,"children":735},{"style":198},[736],{"type":189,"value":469},{"type":174,"tag":36,"props":738,"children":739},{"style":186},[740],{"type":189,"value":385},{"type":174,"tag":36,"props":742,"children":743},{"style":367},[744],{"type":189,"value":745}," JSONContent",{"type":174,"tag":36,"props":747,"children":748},{"style":186},[749],{"type":189,"value":750}," |",{"type":174,"tag":36,"props":752,"children":753},{"style":461},[754],{"type":189,"value":755}," null",{"type":174,"tag":36,"props":757,"children":758},{"style":198},[759],{"type":189,"value":483},{"type":174,"tag":36,"props":761,"children":763},{"class":38,"line":762},22,[764,768,773,777,782,787],{"type":174,"tag":36,"props":765,"children":766},{"style":186},[767],{"type":189,"value":492},{"type":174,"tag":36,"props":769,"children":770},{"style":461},[771],{"type":189,"value":772}," source",{"type":174,"tag":36,"props":774,"children":775},{"style":186},[776],{"type":189,"value":50},{"type":174,"tag":36,"props":778,"children":779},{"style":198},[780],{"type":189,"value":781}," storage.",{"type":174,"tag":36,"props":783,"children":784},{"style":367},[785],{"type":189,"value":786},"getItem",{"type":174,"tag":36,"props":788,"children":789},{"style":198},[790],{"type":189,"value":791},"(key);\n",{"type":174,"tag":36,"props":793,"children":795},{"class":38,"line":794},23,[796,801,806,811,815,820,825,829],{"type":174,"tag":36,"props":797,"children":798},{"style":186},[799],{"type":189,"value":800},"  if",{"type":174,"tag":36,"props":802,"children":803},{"style":198},[804],{"type":189,"value":805}," (source ",{"type":174,"tag":36,"props":807,"children":808},{"style":186},[809],{"type":189,"value":810},"===",{"type":174,"tag":36,"props":812,"children":813},{"style":461},[814],{"type":189,"value":755},{"type":174,"tag":36,"props":816,"children":817},{"style":198},[818],{"type":189,"value":819},") ",{"type":174,"tag":36,"props":821,"children":822},{"style":186},[823],{"type":189,"value":824},"return",{"type":174,"tag":36,"props":826,"children":827},{"style":461},[828],{"type":189,"value":755},{"type":174,"tag":36,"props":830,"children":831},{"style":198},[832],{"type":189,"value":217},{"type":174,"tag":36,"props":834,"children":836},{"class":38,"line":835},24,[837,841,846,850,855,859,864,868,873],{"type":174,"tag":36,"props":838,"children":839},{"style":186},[840],{"type":189,"value":492},{"type":174,"tag":36,"props":842,"children":843},{"style":461},[844],{"type":189,"value":845}," value",{"type":174,"tag":36,"props":847,"children":848},{"style":186},[849],{"type":189,"value":385},{"type":174,"tag":36,"props":851,"children":852},{"style":461},[853],{"type":189,"value":854}," unknown",{"type":174,"tag":36,"props":856,"children":857},{"style":186},[858],{"type":189,"value":50},{"type":174,"tag":36,"props":860,"children":861},{"style":461},[862],{"type":189,"value":863}," JSON",{"type":174,"tag":36,"props":865,"children":866},{"style":198},[867],{"type":189,"value":92},{"type":174,"tag":36,"props":869,"children":870},{"style":367},[871],{"type":189,"value":872},"parse",{"type":174,"tag":36,"props":874,"children":875},{"style":198},[876],{"type":189,"value":877},"(source);\n",{"type":174,"tag":36,"props":879,"children":881},{"class":38,"line":880},25,[882,886,891,896,901,906,911,916,921,926,931,936,940,945,950,955,959,964,968,973,977,981,985,990,994],{"type":174,"tag":36,"props":883,"children":884},{"style":186},[885],{"type":189,"value":800},{"type":174,"tag":36,"props":887,"children":888},{"style":198},[889],{"type":189,"value":890}," (",{"type":174,"tag":36,"props":892,"children":893},{"style":186},[894],{"type":189,"value":895},"!",{"type":174,"tag":36,"props":897,"children":898},{"style":198},[899],{"type":189,"value":900},"value ",{"type":174,"tag":36,"props":902,"children":903},{"style":186},[904],{"type":189,"value":905},"||",{"type":174,"tag":36,"props":907,"children":908},{"style":186},[909],{"type":189,"value":910}," typeof",{"type":174,"tag":36,"props":912,"children":913},{"style":198},[914],{"type":189,"value":915}," value ",{"type":174,"tag":36,"props":917,"children":918},{"style":186},[919],{"type":189,"value":920},"!==",{"type":174,"tag":36,"props":922,"children":923},{"style":209},[924],{"type":189,"value":925}," \"object\"",{"type":174,"tag":36,"props":927,"children":928},{"style":186},[929],{"type":189,"value":930}," ||",{"type":174,"tag":36,"props":932,"children":933},{"style":186},[934],{"type":189,"value":935}," !",{"type":174,"tag":36,"props":937,"children":938},{"style":198},[939],{"type":189,"value":79},{"type":174,"tag":36,"props":941,"children":942},{"style":209},[943],{"type":189,"value":944},"\"version\"",{"type":174,"tag":36,"props":946,"children":947},{"style":186},[948],{"type":189,"value":949}," in",{"type":174,"tag":36,"props":951,"children":952},{"style":198},[953],{"type":189,"value":954}," value) ",{"type":174,"tag":36,"props":956,"children":957},{"style":186},[958],{"type":189,"value":905},{"type":174,"tag":36,"props":960,"children":961},{"style":198},[962],{"type":189,"value":963}," value.version ",{"type":174,"tag":36,"props":965,"children":966},{"style":186},[967],{"type":189,"value":920},{"type":174,"tag":36,"props":969,"children":970},{"style":461},[971],{"type":189,"value":972}," 1",{"type":174,"tag":36,"props":974,"children":975},{"style":186},[976],{"type":189,"value":930},{"type":174,"tag":36,"props":978,"children":979},{"style":186},[980],{"type":189,"value":935},{"type":174,"tag":36,"props":982,"children":983},{"style":198},[984],{"type":189,"value":79},{"type":174,"tag":36,"props":986,"children":987},{"style":209},[988],{"type":189,"value":989},"\"content\"",{"type":174,"tag":36,"props":991,"children":992},{"style":186},[993],{"type":189,"value":949},{"type":174,"tag":36,"props":995,"children":996},{"style":198},[997],{"type":189,"value":998}," value)) {\n",{"type":174,"tag":36,"props":1000,"children":1002},{"class":38,"line":1001},26,[1003,1008,1013,1018,1022,1027],{"type":174,"tag":36,"props":1004,"children":1005},{"style":186},[1006],{"type":189,"value":1007},"    throw",{"type":174,"tag":36,"props":1009,"children":1010},{"style":186},[1011],{"type":189,"value":1012}," new",{"type":174,"tag":36,"props":1014,"children":1015},{"style":367},[1016],{"type":189,"value":1017}," Error",{"type":174,"tag":36,"props":1019,"children":1020},{"style":198},[1021],{"type":189,"value":79},{"type":174,"tag":36,"props":1023,"children":1024},{"style":209},[1025],{"type":189,"value":1026},"\"Unsupported document snapshot version\"",{"type":174,"tag":36,"props":1028,"children":1029},{"style":198},[1030],{"type":189,"value":1031},");\n",{"type":174,"tag":36,"props":1033,"children":1035},{"class":38,"line":1034},27,[1036],{"type":174,"tag":36,"props":1037,"children":1038},{"style":198},[1039],{"type":189,"value":1040},"  }\n",{"type":174,"tag":36,"props":1042,"children":1044},{"class":38,"line":1043},28,[1045,1049,1054,1058],{"type":174,"tag":36,"props":1046,"children":1047},{"style":186},[1048],{"type":189,"value":492},{"type":174,"tag":36,"props":1050,"children":1051},{"style":461},[1052],{"type":189,"value":1053}," content",{"type":174,"tag":36,"props":1055,"children":1056},{"style":186},[1057],{"type":189,"value":50},{"type":174,"tag":36,"props":1059,"children":1060},{"style":198},[1061],{"type":189,"value":1062}," value.content;\n",{"type":174,"tag":36,"props":1064,"children":1066},{"class":38,"line":1065},29,[1067,1071,1075,1079,1084,1088,1092,1097,1101,1105,1109,1113,1117,1122,1126,1131,1135,1140,1144,1149],{"type":174,"tag":36,"props":1068,"children":1069},{"style":186},[1070],{"type":189,"value":800},{"type":174,"tag":36,"props":1072,"children":1073},{"style":198},[1074],{"type":189,"value":890},{"type":174,"tag":36,"props":1076,"children":1077},{"style":186},[1078],{"type":189,"value":895},{"type":174,"tag":36,"props":1080,"children":1081},{"style":198},[1082],{"type":189,"value":1083},"content ",{"type":174,"tag":36,"props":1085,"children":1086},{"style":186},[1087],{"type":189,"value":905},{"type":174,"tag":36,"props":1089,"children":1090},{"style":186},[1091],{"type":189,"value":910},{"type":174,"tag":36,"props":1093,"children":1094},{"style":198},[1095],{"type":189,"value":1096}," content ",{"type":174,"tag":36,"props":1098,"children":1099},{"style":186},[1100],{"type":189,"value":920},{"type":174,"tag":36,"props":1102,"children":1103},{"style":209},[1104],{"type":189,"value":925},{"type":174,"tag":36,"props":1106,"children":1107},{"style":186},[1108],{"type":189,"value":930},{"type":174,"tag":36,"props":1110,"children":1111},{"style":186},[1112],{"type":189,"value":935},{"type":174,"tag":36,"props":1114,"children":1115},{"style":198},[1116],{"type":189,"value":79},{"type":174,"tag":36,"props":1118,"children":1119},{"style":209},[1120],{"type":189,"value":1121},"\"type\"",{"type":174,"tag":36,"props":1123,"children":1124},{"style":186},[1125],{"type":189,"value":949},{"type":174,"tag":36,"props":1127,"children":1128},{"style":198},[1129],{"type":189,"value":1130}," content) ",{"type":174,"tag":36,"props":1132,"children":1133},{"style":186},[1134],{"type":189,"value":905},{"type":174,"tag":36,"props":1136,"children":1137},{"style":198},[1138],{"type":189,"value":1139}," content.type ",{"type":174,"tag":36,"props":1141,"children":1142},{"style":186},[1143],{"type":189,"value":920},{"type":174,"tag":36,"props":1145,"children":1146},{"style":209},[1147],{"type":189,"value":1148}," \"doc\"",{"type":174,"tag":36,"props":1150,"children":1151},{"style":198},[1152],{"type":189,"value":1153},") {\n",{"type":174,"tag":36,"props":1155,"children":1157},{"class":38,"line":1156},30,[1158,1162,1166,1170,1174,1179],{"type":174,"tag":36,"props":1159,"children":1160},{"style":186},[1161],{"type":189,"value":1007},{"type":174,"tag":36,"props":1163,"children":1164},{"style":186},[1165],{"type":189,"value":1012},{"type":174,"tag":36,"props":1167,"children":1168},{"style":367},[1169],{"type":189,"value":1017},{"type":174,"tag":36,"props":1171,"children":1172},{"style":198},[1173],{"type":189,"value":79},{"type":174,"tag":36,"props":1175,"children":1176},{"style":209},[1177],{"type":189,"value":1178},"\"Invalid document snapshot\"",{"type":174,"tag":36,"props":1180,"children":1181},{"style":198},[1182],{"type":189,"value":1031},{"type":174,"tag":36,"props":1184,"children":1186},{"class":38,"line":1185},31,[1187],{"type":174,"tag":36,"props":1188,"children":1189},{"style":198},[1190],{"type":189,"value":1040},{"type":174,"tag":36,"props":1192,"children":1194},{"class":38,"line":1193},32,[1195,1200,1204,1209,1213],{"type":174,"tag":36,"props":1196,"children":1197},{"style":186},[1198],{"type":189,"value":1199},"  return",{"type":174,"tag":36,"props":1201,"children":1202},{"style":198},[1203],{"type":189,"value":1096},{"type":174,"tag":36,"props":1205,"children":1206},{"style":186},[1207],{"type":189,"value":1208},"as",{"type":174,"tag":36,"props":1210,"children":1211},{"style":367},[1212],{"type":189,"value":745},{"type":174,"tag":36,"props":1214,"children":1215},{"style":198},[1216],{"type":189,"value":217},{"type":174,"tag":36,"props":1218,"children":1220},{"class":38,"line":1219},33,[1221],{"type":174,"tag":36,"props":1222,"children":1223},{"style":198},[1224],{"type":189,"value":574},{"type":174,"tag":147,"props":1226,"children":1227},{},[1228],{"type":189,"value":1229},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",1793045210503]