youtuber-blog-frontend/build/server/chunks/stores-Cv0rQqhp.js

55 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-06-23 09:25:48 +00:00
import { b as getContext } from './lifecycle-px-3doLe.js';
2024-06-21 23:07:37 +00:00
import './exports-DuWZopOC.js';
function get(key, parse = JSON.parse) {
try {
return parse(sessionStorage[key]);
} catch {
}
}
const SNAPSHOT_KEY = "sveltekit:snapshot";
const SCROLL_KEY = "sveltekit:scroll";
get(SCROLL_KEY) ?? {};
get(SNAPSHOT_KEY) ?? {};
function invalidateAll() {
{
throw new Error("Cannot call invalidateAll() on the server");
}
}
async function applyAction(result) {
{
throw new Error("Cannot call applyAction(...) on the server");
}
}
const getStores = () => {
const stores = getContext("__svelte__");
return {
/** @type {typeof page} */
page: {
subscribe: stores.page.subscribe
},
/** @type {typeof navigating} */
navigating: {
subscribe: stores.navigating.subscribe
},
/** @type {typeof updated} */
updated: stores.updated
};
};
const page = {
subscribe(fn) {
const store = getStores().page;
return store.subscribe(fn);
}
};
const navigating = {
subscribe(fn) {
const store = getStores().navigating;
return store.subscribe(fn);
}
};
export { applyAction as a, invalidateAll as i, navigating as n, page as p };
2024-06-23 09:25:48 +00:00
//# sourceMappingURL=stores-Cv0rQqhp.js.map