@absolutejs/absolute 0.19.0-beta.1031 → 0.19.0-beta.1032

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/angular/browser.js +18 -16
  2. package/dist/angular/browser.js.map +5 -5
  3. package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
  4. package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
  5. package/dist/angular/hmrPreserveCore.ts +83 -118
  6. package/dist/angular/index.js +49 -49
  7. package/dist/angular/index.js.map +12 -12
  8. package/dist/angular/server.js +34 -34
  9. package/dist/angular/server.js.map +10 -10
  10. package/dist/build.js +135 -135
  11. package/dist/build.js.map +26 -26
  12. package/dist/cli/config/client.js +1 -1
  13. package/dist/cli/config/server.js +43 -43
  14. package/dist/cli/index.js +23 -13
  15. package/dist/client/index.js +9 -9
  16. package/dist/client/index.js.map +8 -8
  17. package/dist/dev/client/errorOverlay.ts +4 -4
  18. package/dist/dev/client/handlers/angularHmrShim.ts +17 -17
  19. package/dist/dev/client/handlers/angularRemount.ts +6 -4
  20. package/dist/dev/client/handlers/angularRemountWiring.ts +1 -1
  21. package/dist/dev/client/hmrToast.ts +18 -18
  22. package/dist/index.js +149 -150
  23. package/dist/index.js.map +31 -31
  24. package/dist/islands/browser.js.map +1 -1
  25. package/dist/islands/index.js +5 -5
  26. package/dist/islands/index.js.map +6 -6
  27. package/dist/react/browser.js.map +1 -1
  28. package/dist/react/components/index.js +2 -2
  29. package/dist/react/components/index.js.map +3 -3
  30. package/dist/react/hooks/index.js.map +1 -1
  31. package/dist/react/index.js +21 -21
  32. package/dist/react/index.js.map +9 -9
  33. package/dist/react/server.js +17 -17
  34. package/dist/react/server.js.map +5 -5
  35. package/dist/src/angular/hmrPreserveCore.d.ts +5 -18
  36. package/dist/src/angular/islands.d.ts +1 -1
  37. package/dist/src/cli/config/packageJson/editPackageJson.d.ts +2 -2
  38. package/dist/src/cli/config/schema/fromJsonSchema.d.ts +1 -1
  39. package/dist/src/client/hydrators/react.d.ts +1 -1
  40. package/dist/src/client/hydrators/svelte.d.ts +1 -1
  41. package/dist/src/client/hydrators/vue.d.ts +1 -1
  42. package/dist/src/client/islandStore.d.ts +3 -3
  43. package/dist/src/core/devRouteRegistrationCallsite.d.ts +1 -5
  44. package/dist/src/dev/angular/fastHmrCompiler.d.ts +2 -2
  45. package/dist/src/dev/angular/hmrCompiler.d.ts +1 -1
  46. package/dist/src/dev/angular/resolveOwningComponents.d.ts +1 -1
  47. package/dist/src/svelte/router/hashMode.d.ts +1 -6
  48. package/dist/src/svelte/router/matchPath.d.ts +2 -22
  49. package/dist/src/svelte/router/page.svelte.d.ts +1 -10
  50. package/dist/src/svelte/router/prefetchCache.d.ts +2 -6
  51. package/dist/src/utils/generatedDir.d.ts +1 -1
  52. package/dist/src/utils/inlinePageCss.d.ts +1 -3
  53. package/dist/src/utils/jsonLd.d.ts +1 -1
  54. package/dist/src/utils/loadConfig.d.ts +2 -3
  55. package/dist/src/utils/resolveConvention.d.ts +1 -1
  56. package/dist/src/utils/runtimeMode.d.ts +1 -1
  57. package/dist/src/vue/defineVuePage.d.ts +1 -11
  58. package/dist/svelte/browser.js.map +1 -1
  59. package/dist/svelte/index.js +26 -26
  60. package/dist/svelte/index.js.map +9 -9
  61. package/dist/svelte/router/hashMode.ts +6 -12
  62. package/dist/svelte/router/matchPath.ts +23 -45
  63. package/dist/svelte/router/page.d.ts +1 -10
  64. package/dist/svelte/router/page.js +6 -6
  65. package/dist/svelte/router/prefetchCache.ts +12 -20
  66. package/dist/svelte/server.js +22 -22
  67. package/dist/svelte/server.js.map +5 -5
  68. package/dist/vue/browser.js +2 -2
  69. package/dist/vue/browser.js.map +4 -4
  70. package/dist/vue/index.js +29 -29
  71. package/dist/vue/index.js.map +11 -11
  72. package/dist/vue/server.js +24 -24
  73. package/dist/vue/server.js.map +6 -6
  74. package/package.json +38 -38
@@ -11,7 +11,7 @@
11
11
  "import { useSyncExternalStore } from 'react';\nimport type { StoreApi } from 'zustand/vanilla';\nimport {\n\tgetIslandStoreServerSnapshot,\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) =>\n\tuseSyncExternalStore(\n\t\t(listener) =>\n\t\t\tsubscribeIslandStore(store, selector, () => {\n\t\t\t\tlistener();\n\t\t\t}),\n\t\t() => readIslandStore(store, selector),\n\t\t() => getIslandStoreServerSnapshot(store, selector)\n\t);\n",
12
12
  "const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n",
13
13
  "const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst findCallerName = (stack) => {\n var _a, _b;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1];\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n",
14
- "import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nconst ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nconst ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n\nexport { ABSOLUTE_ISLAND_STATE, ABSOLUTE_ISLAND_STORES };\n"
14
+ "import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(next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  "debugId": "B0355A88842A2F2E64756E2164756E21",
@@ -145,6 +145,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
145
145
  };
146
146
 
147
147
  // src/utils/jsonLd.ts
148
+ var jsonLd = (schema) => `<script type="application/ld+json">${serializeJsonLd(schema)}</script>`;
148
149
  var serializeJsonLd = (schema) => {
149
150
  const schemaOrgContext = "https://schema.org";
150
151
  const data = Array.isArray(schema) ? schema.map((s) => ({
@@ -153,7 +154,6 @@ var serializeJsonLd = (schema) => {
153
154
  })) : { "@context": schemaOrgContext, ...schema };
154
155
  return JSON.stringify(data);
155
156
  };
156
- var jsonLd = (schema) => `<script type="application/ld+json">${serializeJsonLd(schema)}</script>`;
157
157
 
158
158
  // src/react/components/Head.tsx
159
159
  import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
@@ -680,5 +680,5 @@ export {
680
680
  Head
681
681
  };
682
682
 
683
- //# debugId=D81921F1B2D8FB0D64756E2164756E21
683
+ //# debugId=C2D2CA177A735C5C64756E2164756E21
684
684
  //# sourceMappingURL=index.js.map
@@ -4,7 +4,7 @@
4
4
  "sourcesContent": [
5
5
  "export const ANGULAR_INIT_TIMEOUT_MS = 500;\nexport const ANSI_ESCAPE_CODE = 27;\nexport const ANSI_ESCAPE_LENGTH = 3;\nexport const ASCII_SPACE = 32;\nexport const BASE_36_RADIX = 36;\nexport const BUN_BUILD_WARNING_SUPPRESSION =\n\t'wildcard sideEffects are not supported yet';\nexport const BODY_SLICE_LENGTH = 2000;\nexport const BYTES_PER_KILOBYTE = 1024;\nexport const CLI_ARGS_OFFSET = 3;\nexport const CSS_ERROR_RESOLVE_DELAY_MS = 50;\nexport const CSS_MAX_CHECK_ATTEMPTS = 10;\nexport const CSS_MAX_PARSE_TIMEOUT_MS = 500;\nexport const CSS_SHEET_READY_TIMEOUT_MS = 100;\nexport const DEFAULT_CHUNK_SIZE = 16_384;\nexport const DEFAULT_DEBOUNCE_MS = 15;\nexport const DEFAULT_PORT = 3000;\nexport const DEV_SERVER_RESTART_DEBOUNCE_MS = 100;\nexport const DOM_UPDATE_DELAY_MS = 50;\nexport const FILE_PROTOCOL_PREFIX_LENGTH = 7;\nexport const FOCUS_ID_PREFIX_LENGTH = 3;\nexport const FOCUS_IDX_PREFIX_LENGTH = 4;\nexport const FOCUS_NAME_PREFIX_LENGTH = 5;\nexport const ESLINT_STUDIO_DEFAULT_HOST = 'eslint.absolute.localhost';\nexport const ESLINT_STUDIO_DEFAULT_PORT = 4099;\nexport const CONFIG_DEFAULT_HOST = 'config.absolute.localhost';\nexport const CONFIG_DEFAULT_PORT = 4099;\nexport const HMR_UPDATE_TIMEOUT_MS = 2000;\nexport const HOOK_SIGNATURE_LENGTH = 12;\nexport const EXCLUDE_LAST_OFFSET = -1;\nexport const HTTP_STATUS_OK = 200;\nexport const HTTP_STATUS_BAD_REQUEST = 400;\nexport const HTTP_STATUS_NOT_FOUND = 404;\nexport const HOURS_IN_DAY = 24;\nexport const HOURS_IN_HALF_DAY = 12;\nexport const IMAGE_DEFAULT_DEVICE_SIZES = [\n\t640, 750, 828, 1080, 1200, 1920, 2048, 3840\n];\nexport const IMAGE_DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];\nexport const IMAGE_DEFAULT_QUALITY = 75;\nexport const IMAGE_GLOB_SUFFIX_LENGTH = 2;\nexport const INSTANCE_PROBE_TIMEOUT_MS = 250;\nexport const MAX_ERROR_LENGTH = 200;\nexport const MAX_RECONNECT_ATTEMPTS = 60;\nexport const MILLISECONDS_IN_A_SECOND = 1000;\nexport const MINUTES_IN_AN_HOUR = 60;\nexport const SECONDS_IN_A_MINUTE = 60;\nexport const MILLISECONDS_IN_A_MINUTE =\n\tMILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE;\nexport const MILLISECONDS_IN_A_DAY =\n\tMILLISECONDS_IN_A_SECOND *\n\tSECONDS_IN_A_MINUTE *\n\tMINUTES_IN_AN_HOUR *\n\tHOURS_IN_DAY;\nexport const OVERLAY_FADE_DURATION_MS = 150;\nexport const PING_INTERVAL_MS = 30_000;\nexport const LIST_LOG_TAIL_MAX_BYTES = 65_536;\nexport const LIST_TUI_COLUMN_GAP = 2;\nexport const LIST_TUI_DEFAULT_HEIGHT = 28;\nexport const LIST_TUI_DEFAULT_WIDTH = 100;\nexport const LIST_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30;\nexport const LIST_TUI_FOOTER_LINE_COUNT = 2;\nexport const LIST_TUI_MARKER_WIDTH = 2;\nexport const LIST_TUI_MIN_LOG_HEIGHT = 3;\nexport const LIST_TUI_MIN_URL_WIDTH = 16;\nexport const LIST_TUI_RENDER_DEBOUNCE_MS = 16;\nexport const LIST_TUI_STATUS_MESSAGE_TIMEOUT_MS = 4000;\nexport const LIST_WATCH_REFRESH_MS = 1000;\nexport const RAF_BATCH_COUNT = 3;\nexport const RANDOM_ID_END_INDEX = 11;\nexport const REBUILD_BATCH_DELAY_MS = 10;\nexport const REBUILD_RELOAD_DELAY_MS = 200;\nexport const RECONNECT_INITIAL_DELAY_MS = 500;\nexport const RECONNECT_POLL_INTERVAL_MS = 300;\nexport const REACT_STREAM_SLOT_FAST_DELAY_MS = 5;\nexport const REACT_STREAM_SLOT_SLOW_DELAY_MS = 20;\nexport const SIGINT_EXIT_CODE = 130;\nexport const SIGTERM_EXIT_CODE = 143;\nexport const SVELTE_CSS_LOAD_TIMEOUT_MS = 500;\nexport const TIME_PRECISION = 2;\nexport const TWO_THIRDS = 2 / 3;\nexport const UNFOUND_INDEX = -1;\nexport const WEBSOCKET_NORMAL_CLOSURE = 1000;\nexport const WORKSPACE_COMMAND_ARGS_OFFSET = 3;\nexport const WORKSPACE_FAILURE_LOG_PRINT_LIMIT = 30;\nexport const WORKSPACE_FAILURE_RECENT_LOG_LIMIT = 60;\nexport const WORKSPACE_READY_ATTEMPT_TIMEOUT_MS = 5_000;\nexport const WORKSPACE_READY_PROBE_INTERVAL_MS = 250;\nexport const WORKSPACE_READY_TIMEOUT_MS = 30_000;\nexport const WORKSPACE_SHUTDOWN_TIMEOUT_MS = 10_000;\nexport const WORKSPACE_TUI_DEFAULT_HEIGHT = 28;\nexport const WORKSPACE_TUI_DEFAULT_WIDTH = 100;\nexport const WORKSPACE_TUI_ESCAPE_SEQUENCE_TIMEOUT_MS = 30;\nexport const WORKSPACE_TUI_FOOTER_LINE_COUNT = 3;\nexport const WORKSPACE_TUI_MIN_LOG_HEIGHT = 3;\nexport const WORKSPACE_TUI_MIN_SERVICE_NAME_WIDTH = 7;\nexport const WORKSPACE_TUI_MIN_TARGET_WIDTH = 8;\nexport const WORKSPACE_TUI_MIN_WRAP_WIDTH = 12;\nexport const WORKSPACE_TUI_PROMPT_CURSOR_OFFSET = 3;\nexport const WORKSPACE_TUI_RECENT_LOG_LIMIT = 40;\nexport const WORKSPACE_TUI_RENDER_DEBOUNCE_MS = 16;\nexport const WORKSPACE_TUI_STATUS_WIDTH = 10;\nexport const WORKSPACE_TUI_TARGET_PADDING_WIDTH = 6;\nexport const WORKSPACE_TUI_VISIBILITY_WIDTH = 8;\n",
6
6
  "import type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\ntype StreamingSlotWarningController = {\n\tmaybeWarn(primitiveName: string): void;\n};\ntype StreamingSlotCollectionController = {\n\tisCollecting(): boolean;\n};\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\nconst STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotWarningController'\n);\nconst STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for(\n\t'absolutejs.streamingSlotCollectionController'\n);\n\nconst getRegisteredStreamingSlotRegistrar = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_REGISTRAR_KEY);\n\tif (typeof value === 'function' || value === null) {\n\t\treturn value;\n\t}\n\n\treturn undefined;\n};\n\nconst isObjectRecord = (value: unknown): value is Record<string, unknown> =>\n\tBoolean(value) && typeof value === 'object';\n\nconst isStreamingSlotWarningController = (\n\tvalue: unknown\n): value is StreamingSlotWarningController =>\n\tisObjectRecord(value) &&\n\t'maybeWarn' in value &&\n\ttypeof value.maybeWarn === 'function';\n\nconst isStreamingSlotCollectionController = (\n\tvalue: unknown\n): value is StreamingSlotCollectionController =>\n\tisObjectRecord(value) &&\n\t'isCollecting' in value &&\n\ttypeof value.isCollecting === 'function';\n\nconst getWarningController = () => {\n\tconst value = Reflect.get(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotWarningController(value) ? value : undefined;\n};\n\nconst getCollectionController = () => {\n\tconst value = Reflect.get(\n\t\tglobalThis,\n\t\tSTREAMING_SLOT_COLLECTION_STORAGE_KEY\n\t);\n\tif (value === null || typeof value === 'undefined') return undefined;\n\n\treturn isStreamingSlotCollectionController(value) ? value : undefined;\n};\n\nexport const hasRegisteredStreamingSlotRegistrar = () =>\n\ttypeof getRegisteredStreamingSlotRegistrar() === 'function';\nexport const isStreamingSlotCollectionActive = () =>\n\tgetCollectionController()?.isCollecting() === true;\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegisteredStreamingSlotRegistrar()?.(slot);\n};\nexport const setStreamingSlotCollectionController = (\n\tcontroller: StreamingSlotCollectionController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_COLLECTION_STORAGE_KEY, controller);\n};\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_REGISTRAR_KEY, nextRegistrar);\n};\nexport const setStreamingSlotWarningController = (\n\tcontroller: StreamingSlotWarningController | null\n) => {\n\tReflect.set(globalThis, STREAMING_SLOT_WARNING_STORAGE_KEY, controller);\n};\nexport const warnMissingStreamingSlotCollector = (primitiveName: string) => {\n\tif (\n\t\tprocess.env.NODE_ENV === 'production' ||\n\t\tisStreamingSlotCollectionActive()\n\t) {\n\t\treturn;\n\t}\n\n\tgetWarningController()?.maybeWarn(primitiveName);\n};\n",
7
- "import type { JsonLdSchema, WithContext } from '../../types/jsonLd';\n\nexport const serializeJsonLd = (schema: JsonLdSchema | JsonLdSchema[]) => {\n\tconst schemaOrgContext = 'https://schema.org';\n\tconst data: WithContext<JsonLdSchema> | WithContext<JsonLdSchema>[] =\n\t\tArray.isArray(schema)\n\t\t\t? schema.map((s) => ({\n\t\t\t\t\t'@context': schemaOrgContext,\n\t\t\t\t\t...s\n\t\t\t\t}))\n\t\t\t: { '@context': schemaOrgContext, ...schema };\n\n\treturn JSON.stringify(data);\n};\n\nexport const jsonLd = (schema: JsonLdSchema | JsonLdSchema[]) =>\n\t`<script type=\"application/ld+json\">${serializeJsonLd(schema)}</script>`;\n",
7
+ "import type { JsonLdSchema, WithContext } from '../../types/jsonLd';\n\nexport const jsonLd = (schema: JsonLdSchema | JsonLdSchema[]) =>\n\t`<script type=\"application/ld+json\">${serializeJsonLd(schema)}</script>`;\nexport const serializeJsonLd = (schema: JsonLdSchema | JsonLdSchema[]) => {\n\tconst schemaOrgContext = 'https://schema.org';\n\tconst data: WithContext<JsonLdSchema> | WithContext<JsonLdSchema>[] =\n\t\tArray.isArray(schema)\n\t\t\t? schema.map((s) => ({\n\t\t\t\t\t'@context': schemaOrgContext,\n\t\t\t\t\t...s\n\t\t\t\t}))\n\t\t\t: { '@context': schemaOrgContext, ...schema };\n\n\treturn JSON.stringify(data);\n};\n",
8
8
  "import type {\n\tMetadata,\n\tMetaTag,\n\tOpenGraph,\n\tTwitterCard,\n\tRobotsDirective\n} from '../../../types/metadata';\nimport { serializeJsonLd } from '../../utils/jsonLd';\n\nconst RobotsContent = ({ robots }: { robots: RobotsDirective }) => {\n\tconst directives: string[] = [];\n\tif (robots.index === false) directives.push('noindex');\n\tif (robots.index === true) directives.push('index');\n\tif (robots.follow === false) directives.push('nofollow');\n\tif (robots.follow === true) directives.push('follow');\n\tif (robots.noarchive) directives.push('noarchive');\n\tif (robots.nosnippet) directives.push('nosnippet');\n\tif (robots.noimageindex) directives.push('noimageindex');\n\tif (robots.maxSnippet !== undefined)\n\t\tdirectives.push(`max-snippet:${robots.maxSnippet}`);\n\tif (robots.maxImagePreview)\n\t\tdirectives.push(`max-image-preview:${robots.maxImagePreview}`);\n\tif (robots.maxVideoPreview !== undefined)\n\t\tdirectives.push(`max-video-preview:${robots.maxVideoPreview}`);\n\n\tconst content = directives.join(', ');\n\n\treturn content ? <meta content={content} name=\"robots\" /> : null;\n};\n\nconst OpenGraphTags = ({\n\topenGraph,\n\ttitle,\n\tdescription\n}: {\n\topenGraph: OpenGraph;\n\ttitle: string;\n\tdescription: string;\n}) => (\n\t<>\n\t\t<meta content={openGraph.title ?? title} property=\"og:title\" />\n\t\t<meta\n\t\t\tcontent={openGraph.description ?? description}\n\t\t\tproperty=\"og:description\"\n\t\t/>\n\t\t{openGraph.url && <meta content={openGraph.url} property=\"og:url\" />}\n\t\t{openGraph.image && (\n\t\t\t<meta content={openGraph.image} property=\"og:image\" />\n\t\t)}\n\t\t{openGraph.imageAlt && (\n\t\t\t<meta content={openGraph.imageAlt} property=\"og:image:alt\" />\n\t\t)}\n\t\t{openGraph.imageWidth && (\n\t\t\t<meta\n\t\t\t\tcontent={String(openGraph.imageWidth)}\n\t\t\t\tproperty=\"og:image:width\"\n\t\t\t/>\n\t\t)}\n\t\t{openGraph.imageHeight && (\n\t\t\t<meta\n\t\t\t\tcontent={String(openGraph.imageHeight)}\n\t\t\t\tproperty=\"og:image:height\"\n\t\t\t/>\n\t\t)}\n\t\t{openGraph.type && <meta content={openGraph.type} property=\"og:type\" />}\n\t\t{openGraph.siteName && (\n\t\t\t<meta content={openGraph.siteName} property=\"og:site_name\" />\n\t\t)}\n\t\t{openGraph.locale && (\n\t\t\t<meta content={openGraph.locale} property=\"og:locale\" />\n\t\t)}\n\t</>\n);\n\nconst TwitterTags = ({\n\ttwitter,\n\ttitle,\n\tdescription\n}: {\n\ttwitter: TwitterCard;\n\ttitle: string;\n\tdescription: string;\n}) => (\n\t<>\n\t\t{twitter.card && <meta content={twitter.card} name=\"twitter:card\" />}\n\t\t<meta content={twitter.title ?? title} name=\"twitter:title\" />\n\t\t<meta\n\t\t\tcontent={twitter.description ?? description}\n\t\t\tname=\"twitter:description\"\n\t\t/>\n\t\t{twitter.image && <meta content={twitter.image} name=\"twitter:image\" />}\n\t\t{twitter.imageAlt && (\n\t\t\t<meta content={twitter.imageAlt} name=\"twitter:image:alt\" />\n\t\t)}\n\t\t{twitter.site && <meta content={twitter.site} name=\"twitter:site\" />}\n\t\t{twitter.creator && (\n\t\t\t<meta content={twitter.creator} name=\"twitter:creator\" />\n\t\t)}\n\t</>\n);\n\nconst CustomMetaTag = ({ tag }: { tag: MetaTag }) => {\n\tif (tag.property)\n\t\treturn <meta content={tag.content} property={tag.property} />;\n\n\tif (tag.httpEquiv)\n\t\treturn <meta content={tag.content} httpEquiv={tag.httpEquiv} />;\n\n\treturn <meta content={tag.content} name={tag.name} />;\n};\n\nexport const Head = ({\n\ttitle = 'AbsoluteJS',\n\tdescription = 'A page created using AbsoluteJS',\n\ticon = '/assets/ico/favicon.ico',\n\tfont,\n\tcssPath,\n\tcanonical,\n\topenGraph,\n\ttwitter,\n\trobots,\n\tmeta,\n\tjsonLd\n}: Metadata = {}) => (\n\t<head suppressHydrationWarning>\n\t\t<meta charSet=\"utf-8\" />\n\t\t<title>{title}</title>\n\t\t<meta content={description} name=\"description\" />\n\t\t<meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n\t\t<link href={icon} rel=\"icon\" />\n\t\t{canonical && <link href={canonical} rel=\"canonical\" />}\n\t\t{openGraph && (\n\t\t\t<OpenGraphTags\n\t\t\t\tdescription={description}\n\t\t\t\topenGraph={openGraph}\n\t\t\t\ttitle={title}\n\t\t\t/>\n\t\t)}\n\t\t{twitter && (\n\t\t\t<TwitterTags\n\t\t\t\tdescription={description}\n\t\t\t\ttitle={title}\n\t\t\t\ttwitter={twitter}\n\t\t\t/>\n\t\t)}\n\t\t{robots && <RobotsContent robots={robots} />}\n\t\t{meta?.map((tag, i) => <CustomMetaTag key={i} tag={tag} />)}\n\t\t{font && (\n\t\t\t<>\n\t\t\t\t<link href=\"https://fonts.googleapis.com\" rel=\"preconnect\" />\n\t\t\t\t<link\n\t\t\t\t\tcrossOrigin=\"anonymous\"\n\t\t\t\t\thref=\"https://fonts.gstatic.com\"\n\t\t\t\t\trel=\"preconnect\"\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t/>\n\t\t\t\t<link\n\t\t\t\t\thref={`https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`}\n\t\t\t\t\trel=\"stylesheet\"\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t/>\n\t\t\t</>\n\t\t)}\n\t\t{cssPath &&\n\t\t\t[cssPath]\n\t\t\t\t.flat()\n\t\t\t\t.map((path) => (\n\t\t\t\t\t<link\n\t\t\t\t\t\thref={path}\n\t\t\t\t\t\tkey={path}\n\t\t\t\t\t\trel=\"stylesheet\"\n\t\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\t\ttype=\"text/css\"\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t{jsonLd && (\n\t\t\t<script\n\t\t\t\tdangerouslySetInnerHTML={{ __html: serializeJsonLd(jsonLd) }}\n\t\t\t\ttype=\"application/ld+json\"\n\t\t\t/>\n\t\t)}\n\t</head>\n);\n",
9
9
  "/**\n * Client-safe image utilities — no node:fs, no Sharp, no Bun APIs.\n * These can be imported in both server and client (browser) contexts.\n */\n\nimport {\n\tIMAGE_DEFAULT_DEVICE_SIZES,\n\tIMAGE_DEFAULT_IMAGE_SIZES,\n\tIMAGE_DEFAULT_QUALITY\n} from '../constants';\n\nexport type { ImageProps } from '../../types/image';\n\nexport const DEFAULT_DEVICE_SIZES = IMAGE_DEFAULT_DEVICE_SIZES;\nexport const DEFAULT_IMAGE_SIZES = IMAGE_DEFAULT_IMAGE_SIZES;\nexport const DEFAULT_QUALITY = IMAGE_DEFAULT_QUALITY;\n\nexport const OPTIMIZATION_ENDPOINT = '/_absolute/image';\n\nexport const buildOptimizedUrl = (\n\tsrc: string,\n\twidth: number,\n\tquality: number,\n\tbasePath = OPTIMIZATION_ENDPOINT\n) => `${basePath}?url=${encodeURIComponent(src)}&w=${width}&q=${quality}`;\n\nexport const getAllSizes = (deviceSizes?: number[], imageSizes?: number[]) => {\n\tconst device = deviceSizes ?? DEFAULT_DEVICE_SIZES;\n\n\tconst image = imageSizes ?? DEFAULT_IMAGE_SIZES;\n\n\treturn [...device, ...image].sort((left, right) => left - right);\n};\n\n/** Snap a target width UP to the nearest configured size */\nconst snapToSize = (target: number, sizes: number[]) => {\n\tfor (const size of sizes) {\n\t\tif (size >= target) return size;\n\t}\n\n\treturn sizes[sizes.length - 1] ?? target;\n};\n\nexport const generateBlurSvg = (base64Thumbnail: string) => {\n\tconst svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 320\"><filter id=\"b\" color-interpolation-filters=\"sRGB\"><feGaussianBlur stdDeviation=\"20\"/><feColorMatrix values=\"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1\"/></filter><image filter=\"url(#b)\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" href=\"${base64Thumbnail}\"/></svg>`;\n\n\tconst encoded = encodeURIComponent(svg);\n\n\treturn `url(\"data:image/svg+xml,${encoded}\")`;\n};\nexport const generateSrcSet = (\n\tsrc: string,\n\twidth: number | undefined,\n\tsizes: string | undefined,\n\tdeviceSizes?: number[],\n\timageSizes?: number[]\n) => {\n\tconst quality = DEFAULT_QUALITY;\n\n\tif (sizes) {\n\t\tconst allSizes = getAllSizes(deviceSizes, imageSizes);\n\n\t\treturn allSizes\n\t\t\t.map(\n\t\t\t\t(sizeWidth) =>\n\t\t\t\t\t`${buildOptimizedUrl(src, sizeWidth, quality)} ${sizeWidth}w`\n\t\t\t)\n\t\t\t.join(', ');\n\t}\n\n\tif (width) {\n\t\tconst allSizes = getAllSizes(deviceSizes, imageSizes);\n\n\t\tconst w1x = snapToSize(width, allSizes);\n\n\t\tconst w2x = snapToSize(width * 2, allSizes);\n\n\t\treturn `${buildOptimizedUrl(src, w1x, quality)} 1x, ${buildOptimizedUrl(src, w2x, quality)} 2x`;\n\t}\n\n\tconst devSizes = deviceSizes ?? DEFAULT_DEVICE_SIZES;\n\n\treturn devSizes\n\t\t.map(\n\t\t\t(sizeWidth) =>\n\t\t\t\t`${buildOptimizedUrl(src, sizeWidth, quality)} ${sizeWidth}w`\n\t\t)\n\t\t.join(', ');\n};\n",
10
10
  "import type { ImageProps } from '../../../types/image';\nimport {\n\tDEFAULT_QUALITY,\n\tbuildOptimizedUrl,\n\tgenerateBlurSvg,\n\tgenerateSrcSet\n} from '../../utils/imageClient';\n\nconst resolveSource = (\n\tsrc: string,\n\toverrideSrc: ImageProps['overrideSrc'],\n\tunoptimized: ImageProps['unoptimized'],\n\tloader: ImageProps['loader'],\n\twidth: ImageProps['width'],\n\tquality: number\n) => {\n\tif (overrideSrc) return overrideSrc;\n\tif (unoptimized) return src;\n\tif (loader) return loader({ quality, src, width: width ?? 0 });\n\tif (!width) return buildOptimizedUrl(src, 0, quality);\n\n\treturn buildOptimizedUrl(src, width, quality);\n};\n\nconst resolveBlurBackground = (\n\thasBlur: boolean,\n\tplaceholder: ImageProps['placeholder'],\n\tblurDataURL: ImageProps['blurDataURL']\n) => {\n\tif (!hasBlur) return undefined;\n\n\tif (\n\t\ttypeof placeholder === 'string' &&\n\t\tplaceholder !== 'blur' &&\n\t\tplaceholder.startsWith('data:')\n\t) {\n\t\treturn generateBlurSvg(placeholder);\n\t}\n\n\tif (blurDataURL) return generateBlurSvg(blurDataURL);\n\n\treturn undefined;\n};\n\nexport const Image = ({\n\talt,\n\tblurDataURL,\n\tclassName,\n\tcrossOrigin,\n\tfetchPriority,\n\tfill,\n\theight,\n\tloader,\n\tloading,\n\tonError,\n\tonLoad,\n\toverrideSrc,\n\tplaceholder,\n\tpriority,\n\tquality = DEFAULT_QUALITY,\n\treferrerPolicy,\n\tsizes,\n\tsrc,\n\tstyle,\n\tunoptimized,\n\twidth\n}: ImageProps) => {\n\t// ── Resolve src ─────────────────────────────────────────────\n\tconst resolvedSrc = resolveSource(\n\t\tsrc,\n\t\toverrideSrc,\n\t\tunoptimized,\n\t\tloader,\n\t\twidth,\n\t\tquality\n\t);\n\n\t// ── srcSet ──────────────────────────────────────────────────\n\tconst srcSet = unoptimized ? undefined : generateSrcSet(src, width, sizes);\n\n\t// ── Sizes ───────────────────────────────────────────────────\n\tconst resolvedSizes = sizes ?? (fill ? '100vw' : undefined);\n\n\t// ── Loading behavior ────────────────────────────────────────\n\tconst resolvedLoading = priority ? 'eager' : (loading ?? 'lazy');\n\tconst resolvedFetchPriority = priority ? 'high' : fetchPriority;\n\n\t// ── Blur placeholder ────────────────────────────────────────\n\tconst hasBlur =\n\t\tplaceholder === 'blur' ||\n\t\t(typeof placeholder === 'string' &&\n\t\t\tplaceholder !== 'empty' &&\n\t\t\tplaceholder.startsWith('data:'));\n\n\tconst blurBackground = resolveBlurBackground(\n\t\thasBlur,\n\t\tplaceholder,\n\t\tblurDataURL\n\t);\n\n\t// ── Styles ──────────────────────────────────────────────────\n\tconst imgStyle: Record<string, string | number> = {\n\t\t...(style ?? {}),\n\t\t...(blurBackground\n\t\t\t? {\n\t\t\t\t\tbackgroundImage: blurBackground,\n\t\t\t\t\tbackgroundPosition: 'center',\n\t\t\t\t\tbackgroundRepeat: 'no-repeat',\n\t\t\t\t\tbackgroundSize: 'cover'\n\t\t\t\t}\n\t\t\t: {}),\n\t\t...(fill\n\t\t\t? {\n\t\t\t\t\tcolor: 'transparent',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tinset: 0,\n\t\t\t\t\tobjectFit: 'cover',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\twidth: '100%'\n\t\t\t\t}\n\t\t\t: { color: 'transparent' })\n\t};\n\n\tconst fillWrapperStyle: Record<string, string | number> = {\n\t\tdisplay: 'block',\n\t\theight: '100%',\n\t\toverflow: 'hidden',\n\t\tposition: 'relative',\n\t\twidth: '100%'\n\t};\n\n\t// ── Preload link for priority images ────────────────────────\n\tconst preloadLink = priority ? (\n\t\t<link\n\t\t\tas=\"image\"\n\t\t\tcrossOrigin={crossOrigin}\n\t\t\thref={resolvedSrc}\n\t\t\timageSizes={resolvedSizes}\n\t\t\timageSrcSet={srcSet}\n\t\t\trel=\"preload\"\n\t\t/>\n\t) : null;\n\n\t// ── Fill mode wrapper ───────────────────────────────────────\n\tconst imgElement = (\n\t\t<img\n\t\t\talt={alt}\n\t\t\tclassName={className}\n\t\t\tcrossOrigin={crossOrigin}\n\t\t\tdecoding=\"async\"\n\t\t\tfetchPriority={resolvedFetchPriority}\n\t\t\theight={fill ? undefined : height}\n\t\t\tloading={resolvedLoading}\n\t\t\tonError={\n\t\t\t\tonError ? (event) => onError(event.nativeEvent) : undefined\n\t\t\t}\n\t\t\tonLoad={(event) => {\n\t\t\t\tconst { target } = event;\n\n\t\t\t\tif (blurBackground && target instanceof HTMLImageElement) {\n\t\t\t\t\ttarget.style.backgroundImage = 'none';\n\t\t\t\t}\n\n\t\t\t\tif (onLoad) onLoad(event.nativeEvent);\n\t\t\t}}\n\t\t\treferrerPolicy={referrerPolicy}\n\t\t\tsizes={resolvedSizes}\n\t\t\tsrc={resolvedSrc}\n\t\t\tsrcSet={srcSet}\n\t\t\tstyle={imgStyle}\n\t\t\twidth={fill ? undefined : width}\n\t\t/>\n\t);\n\n\tif (fill) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{preloadLink}\n\t\t\t\t<span style={fillWrapperStyle}>{imgElement}</span>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{preloadLink}\n\t\t\t{imgElement}\n\t\t</>\n\t);\n};\n",
@@ -12,7 +12,7 @@
12
12
  "import type { ReactNode } from 'react';\nimport {\n\tisStreamingSlotCollectionActive,\n\tregisterStreamingSlot,\n\twarnMissingStreamingSlotCollector\n} from '../../core/streamingSlotRegistrar';\n\ntype LegacySuspenseSlotProps = {\n\tclassName?: string;\n\terrorHtml?: string;\n\tfallbackHtml?: string;\n\tid: string;\n\tresolve: () => Promise<string> | string;\n\ttimeoutMs?: number;\n};\n\ntype FrameworkSuspenseRenderProps<T = unknown> = {\n\tchildren: (value: Awaited<T>) => ReactNode;\n\tclassName?: string;\n\terrorFallback?: ReactNode | ((error: unknown) => ReactNode);\n\tid: string;\n\tfallback?: ReactNode;\n\ttimeoutMs?: number;\n} & (\n\t| {\n\t\t\tpromise: Promise<T>;\n\t\t\tresolve?: undefined;\n\t }\n\t| {\n\t\t\tpromise?: undefined;\n\t\t\tresolve: () => Promise<T> | T;\n\t }\n);\n\ntype FrameworkSuspenseNodeProps = {\n\tchildren?: ReactNode;\n\tclassName?: string;\n\terrorFallback?: ReactNode | ((error: unknown) => ReactNode);\n\tid: string;\n\tpromise?: Promise<ReactNode>;\n\tresolve?: () => Promise<ReactNode> | ReactNode;\n\tfallback?: ReactNode;\n\ttimeoutMs?: number;\n};\n\ntype FrameworkSuspenseSlotProps<T = unknown> =\n\t| FrameworkSuspenseRenderProps<T>\n\t| FrameworkSuspenseNodeProps;\n\ntype SuspenseSlotProps<T = unknown> =\n\t| LegacySuspenseSlotProps\n\t| FrameworkSuspenseSlotProps<T>;\n\nconst isLegacyProps = <T,>(\n\tprops: SuspenseSlotProps<T>\n): props is LegacySuspenseSlotProps =>\n\t'fallbackHtml' in props || 'errorHtml' in props;\n\nconst renderReactNodeToHtml = async (node: ReactNode) => {\n\tconst { Fragment } = await import('react');\n\tconst { renderToStaticMarkup } = await import('react-dom/server');\n\n\treturn renderToStaticMarkup(<Fragment>{node}</Fragment>);\n};\n\nconst hasRenderChildren = <T,>(\n\tprops: FrameworkSuspenseSlotProps<T>\n): props is FrameworkSuspenseRenderProps<T> =>\n\ttypeof props.children === 'function';\n\nasync function resolveRenderSuspenseValue<T>(\n\tprops: FrameworkSuspenseRenderProps<T>\n): Promise<Awaited<T>>;\nasync function resolveRenderSuspenseValue<T>(\n\tprops: FrameworkSuspenseRenderProps<T>\n) {\n\tif ('resolve' in props && props.resolve !== undefined) {\n\t\treturn props.resolve();\n\t}\n\n\tif ('promise' in props && props.promise !== undefined) {\n\t\treturn props.promise;\n\t}\n\n\treturn undefined;\n}\n\nasync function resolveNodeSuspenseValue(\n\tprops: FrameworkSuspenseNodeProps\n): Promise<ReactNode | undefined>;\nasync function resolveNodeSuspenseValue(props: FrameworkSuspenseNodeProps) {\n\tif (props.resolve !== undefined) {\n\t\treturn props.resolve();\n\t}\n\n\tif (props.promise !== undefined) {\n\t\treturn props.promise;\n\t}\n\n\treturn undefined;\n}\n\nconst renderErrorFallback = async <T,>(\n\tprops: FrameworkSuspenseSlotProps<T>,\n\terror: unknown\n) => {\n\tif (typeof props.errorFallback === 'function') {\n\t\treturn renderReactNodeToHtml(props.errorFallback(error));\n\t}\n\n\tif (props.errorFallback !== undefined) {\n\t\treturn renderReactNodeToHtml(props.errorFallback);\n\t}\n\n\tthrow error;\n};\n\nconst registerLegacySuspenseSlot = (props: LegacySuspenseSlotProps) => {\n\tregisterStreamingSlot({\n\t\terrorHtml: props.errorHtml,\n\t\tfallbackHtml: props.fallbackHtml,\n\t\tid: props.id,\n\t\tresolve: props.resolve,\n\t\ttimeoutMs: props.timeoutMs\n\t});\n};\n\nconst registerFrameworkSuspenseSlot = <T,>(\n\tprops: FrameworkSuspenseSlotProps<T>\n) => {\n\tregisterStreamingSlot({\n\t\tid: props.id,\n\t\ttimeoutMs: props.timeoutMs,\n\t\tresolve: async () => {\n\t\t\ttry {\n\t\t\t\tconst content = hasRenderChildren(props)\n\t\t\t\t\t? props.children(await resolveRenderSuspenseValue(props))\n\t\t\t\t\t: (props.children ??\n\t\t\t\t\t\t(await resolveNodeSuspenseValue(props)) ??\n\t\t\t\t\t\tnull);\n\n\t\t\t\treturn renderReactNodeToHtml(content);\n\t\t\t} catch (error) {\n\t\t\t\treturn renderErrorFallback(props, error);\n\t\t\t}\n\t\t}\n\t});\n};\n\nconst renderLegacySuspenseSlot = (props: LegacySuspenseSlotProps) => (\n\t<div\n\t\tclassName={props.className}\n\t\tdangerouslySetInnerHTML={{ __html: props.fallbackHtml ?? '' }}\n\t\tdata-absolute-slot=\"true\"\n\t\tid={props.id}\n\t\tsuppressHydrationWarning\n\t/>\n);\n\nconst renderFrameworkSuspenseSlot = (\n\tprops: Pick<FrameworkSuspenseNodeProps, 'className' | 'fallback' | 'id'>\n) => (\n\t<div\n\t\tclassName={props.className}\n\t\tdata-absolute-slot=\"true\"\n\t\tid={props.id}\n\t\tsuppressHydrationWarning\n\t>\n\t\t{props.fallback ?? null}\n\t</div>\n);\n\nconst renderServerSuspenseSlot = <T,>(props: SuspenseSlotProps<T>) => {\n\tif (isLegacyProps(props)) {\n\t\tregisterLegacySuspenseSlot(props);\n\n\t\treturn renderLegacySuspenseSlot(props);\n\t}\n\n\tregisterFrameworkSuspenseSlot(props);\n\n\treturn renderFrameworkSuspenseSlot(props);\n};\n\nexport const SuspenseSlot = <T,>(props: SuspenseSlotProps<T>) => {\n\tif (isStreamingSlotCollectionActive()) {\n\t\treturn renderServerSuspenseSlot(props);\n\t}\n\twarnMissingStreamingSlotCollector('SuspenseSlot');\n\n\tif (isLegacyProps(props)) return renderLegacySuspenseSlot(props);\n\n\treturn renderFrameworkSuspenseSlot(props);\n};\n",
13
13
  "import {\n\tisStreamingSlotCollectionActive,\n\tregisterStreamingSlot,\n\twarnMissingStreamingSlotCollector\n} from '../../core/streamingSlotRegistrar';\n\ntype StreamSlotProps = {\n\tclassName?: string;\n\terrorHtml?: string;\n\tfallbackHtml?: string;\n\tid: string;\n\tresolve: () => Promise<string> | string;\n\ttimeoutMs?: number;\n};\n\nexport const StreamSlot = ({\n\tclassName,\n\terrorHtml,\n\tfallbackHtml = '',\n\tid,\n\tresolve,\n\ttimeoutMs\n}: StreamSlotProps) => {\n\tif (isStreamingSlotCollectionActive()) {\n\t\tregisterStreamingSlot({\n\t\t\terrorHtml,\n\t\t\tfallbackHtml,\n\t\t\tid,\n\t\t\tresolve,\n\t\t\ttimeoutMs\n\t\t});\n\t} else {\n\t\twarnMissingStreamingSlotCollector('StreamSlot');\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={className}\n\t\t\tdangerouslySetInnerHTML={{ __html: fallbackHtml }}\n\t\t\tdata-absolute-slot=\"true\"\n\t\t\tid={id}\n\t\t\tsuppressHydrationWarning\n\t\t/>\n\t);\n};\n"
14
14
  ],
15
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAa,0BAA0B,KAC1B,mBAAmB,IACnB,qBAAqB,GACrB,cAAc,IACd,gBAAgB,IAChB,gCACZ,8CACY,oBAAoB,MACpB,qBAAqB,MACrB,kBAAkB,GAClB,6BAA6B,IAC7B,yBAAyB,IACzB,2BAA2B,KAC3B,6BAA6B,KAC7B,qBAAqB,OACrB,sBAAsB,IACtB,eAAe,MACf,iCAAiC,KACjC,sBAAsB,IACtB,8BAA8B,GAC9B,yBAAyB,GACzB,0BAA0B,GAC1B,2BAA2B,GAC3B,6BAA6B,6BAC7B,6BAA6B,MAC7B,sBAAsB,6BACtB,sBAAsB,MACtB,wBAAwB,MACxB,wBAAwB,IACxB,sBAAsB,IACtB,iBAAiB,KACjB,0BAA0B,KAC1B,wBAAwB,KACxB,eAAe,IACf,oBAAoB,IACpB,4BAGA,2BACA,wBAAwB,IACxB,2BAA2B,GAC3B,4BAA4B,KAC5B,mBAAmB,KACnB,yBAAyB,IACzB,2BAA2B,MAC3B,qBAAqB,IACrB,sBAAsB,IACtB,0BAEA,uBAKA,2BAA2B,KAC3B,mBAAmB,OACnB,0BAA0B,OAC1B,sBAAsB,GACtB,0BAA0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B,IAAI,MAAM;AAAA,EACV,0BAAwB;AAAA,GALzB,iCAMA;AAGD,IAAM,8BAA8B,CACnC,0BAEA,QAOE,OAPF;AAAA,EACC,WAAW,MAAM;AAAA,EACjB,sBAAmB;AAAA,EACnB,IAAI,MAAM;AAAA,EACV,0BAAwB;AAAA,EAJzB,UAME,MAAM,YAAY;AAAA,GANpB,iCAOE;AAGH,IAAM,2BAA2B,CAAK,UAAgC;AAAA,EACrE,IAAI,cAAc,KAAK,GAAG;AAAA,IACzB,2BAA2B,KAAK;AAAA,IAEhC,OAAO,yBAAyB,KAAK;AAAA,EACtC;AAAA,EAEA,8BAA8B,KAAK;AAAA,EAEnC,OAAO,4BAA4B,KAAK;AAAA;AAGlC,IAAM,eAAe,CAAK,UAAgC;AAAA,EAChE,IAAI,gCAAgC,GAAG;AAAA,IACtC,OAAO,yBAAyB,KAAK;AAAA,EACtC;AAAA,EACA,kCAAkC,cAAc;AAAA,EAEhD,IAAI,cAAc,KAAK;AAAA,IAAG,OAAO,yBAAyB,KAAK;AAAA,EAE/D,OAAO,4BAA4B,KAAK;AAAA;;;ACjLlC,IAAM,aAAa;AAAA,EACzB;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,MACsB;AAAA,EACtB,IAAI,gCAAgC,GAAG;AAAA,IACtC,sBAAsB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD,CAAC;AAAA,EACF,EAAO;AAAA,IACN,kCAAkC,YAAY;AAAA;AAAA,EAG/C,uBACC,QAAC,OAAD;AAAA,IACC;AAAA,IACA,yBAAyB,EAAE,QAAQ,aAAa;AAAA,IAChD,sBAAmB;AAAA,IACnB;AAAA,IACA,0BAAwB;AAAA,KALzB,iCAMA;AAAA;",
16
+ "debugId": "C2D2CA177A735C5C64756E2164756E21",
17
17
  "names": []
18
18
  }
@@ -5,7 +5,7 @@
5
5
  "import { useSyncExternalStore } from 'react';\nimport type { StoreApi } from 'zustand/vanilla';\nimport {\n\tgetIslandStoreServerSnapshot,\n\treadIslandStore,\n\tsubscribeIslandStore,\n\ttype IslandStoreState\n} from '../../client/islandStore';\n\nexport const useIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) =>\n\tuseSyncExternalStore(\n\t\t(listener) =>\n\t\t\tsubscribeIslandStore(store, selector, () => {\n\t\t\t\tlistener();\n\t\t\t}),\n\t\t() => readIslandStore(store, selector),\n\t\t() => getIslandStoreServerSnapshot(store, selector)\n\t);\n",
6
6
  "const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n",
7
7
  "const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst findCallerName = (stack) => {\n var _a, _b;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1];\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n",
8
- "import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nconst ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nconst ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n\nexport { ABSOLUTE_ISLAND_STATE, ABSOLUTE_ISLAND_STORES };\n",
8
+ "import { createStore, type StateCreator, type StoreApi } from 'zustand/vanilla';\nimport { combine } from 'zustand/middleware';\n\nexport type IslandStoreState = object;\ntype IslandStoreSnapshot = Record<string, unknown>;\ntype IslandStoreShape<\n\tTState extends IslandStoreState,\n\tTActions extends object\n> = Omit<TState, keyof TActions> & TActions;\nexport type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;\ntype AnyIslandStore = StoreApi<object>;\ntype IslandStoreInstance = {\n\tapplyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;\n\tstore: AnyIslandStore;\n};\n\nexport const ABSOLUTE_ISLAND_STATE = '__ABS_ISLAND_STATE__';\nexport const ABSOLUTE_ISLAND_STORES = '__ABS_ISLAND_STORES__';\n\ndeclare global {\n\tvar __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;\n\tvar __ABS_ISLAND_STORES__:\n\t\t| Map<string, Set<IslandStoreInstance>>\n\t\t| undefined;\n}\n\nconst getIslandStoreSnapshot = () => {\n\tglobalThis.__ABS_ISLAND_STATE__ ??= {};\n\n\treturn globalThis.__ABS_ISLAND_STATE__;\n};\n\nconst getIslandStores = () => {\n\tglobalThis.__ABS_ISLAND_STORES__ ??= new Map();\n\n\treturn globalThis.__ABS_ISLAND_STORES__;\n};\n\nconst isSerializableValue = (value: unknown) =>\n\ttypeof value !== 'function' && value !== undefined;\n\nconst toSerializableState = <T extends object>(state: T) =>\n\tObject.fromEntries(\n\t\tObject.entries(state).filter(([, value]) => isSerializableValue(value))\n\t);\n\nconst applySnapshot = <T extends object>(\n\tstore: StoreApi<T>,\n\tsnapshot: IslandStoreSnapshot | undefined\n) => {\n\tif (!snapshot) {\n\t\treturn;\n\t}\n\n\tstore.setState({\n\t\t...store.getState(),\n\t\t...snapshot\n\t});\n};\n\nconst getPeerStores = (\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => [...storeInstances].filter((peer) => peer.store !== ownerStore);\n\nconst syncIslandSnapshot = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tstate: IslandStoreShape<TState, TActions>,\n\tstoreInstances: Set<IslandStoreInstance>,\n\townerStore: AnyIslandStore\n) => {\n\tconst nextSnapshot = toSerializableState(state);\n\tgetIslandStoreSnapshot()[storeId] = nextSnapshot;\n\n\tfor (const peerStore of getPeerStores(storeInstances, ownerStore)) {\n\t\tpeerStore.applyExternalSnapshot(nextSnapshot);\n\t}\n};\n\nexport const createIslandStore = <\n\tTState extends IslandStoreState,\n\tTActions extends object\n>(\n\tstoreId: string,\n\tinitialState: TState,\n\tcreateState: StateCreator<TState, [], [], TActions>\n) => {\n\tconst store = createStore(combine(initialState, createState));\n\tconst stores = getIslandStores();\n\tconst storeInstances =\n\t\tstores.get(storeId) ?? new Set<IslandStoreInstance>();\n\tconst initialSnapshot = getIslandStoreSnapshot()[storeId];\n\tapplySnapshot(store, initialSnapshot);\n\tlet isApplyingExternalSnapshot = false;\n\n\tconst applyExternalSnapshot = (snapshot: IslandStoreSnapshot) => {\n\t\tisApplyingExternalSnapshot = true;\n\t\tapplySnapshot(store, snapshot);\n\t};\n\n\tstoreInstances.add({\n\t\tapplyExternalSnapshot,\n\t\tstore\n\t});\n\tstores.set(storeId, storeInstances);\n\n\tsyncIslandSnapshot(storeId, store.getState(), storeInstances, store);\n\tstore.subscribe((state) => {\n\t\tif (isApplyingExternalSnapshot) {\n\t\t\tisApplyingExternalSnapshot = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tsyncIslandSnapshot(storeId, state, storeInstances, store);\n\t});\n\n\treturn store;\n};\nexport const getIslandStoreServerSnapshot = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getInitialState());\nconst applySnapshotToStoreInstances = (\n\tstoreId: string,\n\tinstances: Set<IslandStoreInstance>,\n\tsnapshot: IslandStateSnapshot\n) => {\n\tfor (const instance of instances) {\n\t\tinstance.applyExternalSnapshot(snapshot[storeId] ?? {});\n\t}\n};\n\nexport const initializeIslandStores = (state: IslandStateSnapshot) => {\n\tconst currentSnapshot = getIslandStoreSnapshot();\n\tconst nextSnapshot: IslandStateSnapshot = {\n\t\t...state,\n\t\t...currentSnapshot\n\t};\n\n\tglobalThis.__ABS_ISLAND_STATE__ = nextSnapshot;\n\n\tfor (const [storeId, store] of getIslandStores()) {\n\t\tapplySnapshotToStoreInstances(storeId, store, nextSnapshot);\n\t}\n};\nexport const readIslandStore = <TState extends IslandStoreState, TSelected>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected\n) => selector(store.getState());\nexport const resetIslandStoreForTesting = () => {\n\tdelete globalThis.__ABS_ISLAND_STATE__;\n\tdelete globalThis.__ABS_ISLAND_STORES__;\n};\nexport const subscribeIslandStore = <\n\tTState extends IslandStoreState,\n\tTSelected\n>(\n\tstore: StoreApi<TState>,\n\tselector: (state: TState) => TSelected,\n\tlistener: (value: TSelected) => void\n) => {\n\tlet currentSelection = selector(store.getState());\n\n\treturn store.subscribe((state) => {\n\t\tconst nextSelection = selector(state);\n\t\tif (Object.is(nextSelection, currentSelection)) {\n\t\t\treturn;\n\t\t}\n\n\t\tcurrentSelection = nextSelection;\n\t\tlistener(nextSelection);\n\t});\n};\n\n\n",
9
9
  "import { createContext, useContext, useSyncExternalStore } from 'react';\nimport { Breakpoint, Breakpoints } from '../../../types/mediaQuery';\nimport { UserAgentType } from '../../../types/userAgentTypes';\n\nconst UserAgentContext = createContext<UserAgentType | null>(null);\n\nexport const UserAgentProvider = UserAgentContext.Provider;\n\nconst useUserAgentType = () => {\n\tconst context = useContext(UserAgentContext);\n\tif (context === null) {\n\t\tthrow new Error(\n\t\t\t'useMediaQuery must be used within a UserAgentProvider'\n\t\t);\n\t}\n\n\treturn context;\n};\n\nconst defaultBreakpoints: Breakpoints = {\n\t'2xl': 1536,\n\tlg: 1024,\n\tmd: 768,\n\tsm: 640,\n\txl: 1280,\n\txs: 0\n};\n\nconst userAgentInitialWidth: Record<UserAgentType, number> = {\n\tbot: 1024,\n\tcar: 768,\n\tconsole: 1024,\n\tdesktop: 1024,\n\tiot: 640,\n\tother: 768,\n\tphone: 375,\n\ttablet: 768,\n\ttv: 1280\n};\n\nconst subscribers = new Set<() => void>();\nlet width = typeof window !== 'undefined' ? window.innerWidth : 0;\nlet isListening = false;\n\nconst ensureListener = () => {\n\tif (isListening || typeof window === 'undefined') return;\n\tisListening = true;\n\n\tlet isTicking = false;\n\tconst onResize = () => {\n\t\tif (isTicking) return;\n\t\tisTicking = true;\n\t\trequestAnimationFrame(() => {\n\t\t\tisTicking = false;\n\t\t\twidth = window.innerWidth;\n\t\t\tsubscribers.forEach((notify) => notify());\n\t\t});\n\t};\n\n\twindow.addEventListener('resize', onResize, { passive: true });\n};\n\nconst subscribe = (callback: () => void) => {\n\tensureListener();\n\tsubscribers.add(callback);\n\n\treturn () => subscribers.delete(callback);\n};\n\nconst getViewportWidth = () => width;\n\nconst computeBreakpoint = (widthValue: number, breakpoints: Breakpoints) => {\n\tif (widthValue < breakpoints.sm) return 'xs';\n\tif (widthValue < breakpoints.md) return 'sm';\n\tif (widthValue < breakpoints.lg) return 'md';\n\tif (widthValue < breakpoints.xl) return 'lg';\n\tif (widthValue < breakpoints['2xl']) return 'xl';\n\n\treturn '2xl';\n};\n\nexport const useMediaQuery = (\n\tcustomBreakpoints: Breakpoints = defaultBreakpoints\n) => {\n\tconst userAgentType = useUserAgentType();\n\tconst getServerWidth = () => userAgentInitialWidth[userAgentType];\n\n\tconst currentWidth = useSyncExternalStore(\n\t\tsubscribe,\n\t\tgetViewportWidth,\n\t\tgetServerWidth\n\t);\n\n\tconst breakpoint = computeBreakpoint(currentWidth, customBreakpoints);\n\n\tconst isSizeOrGreater = (target: Breakpoint) =>\n\t\tcustomBreakpoints[breakpoint] >= customBreakpoints[target];\n\n\tconst isSizeOrLess = (target: Breakpoint) =>\n\t\tcustomBreakpoints[breakpoint] <= customBreakpoints[target];\n\n\treturn { breakpoint, isSizeOrGreater, isSizeOrLess };\n};\n"
10
10
  ],
11
11
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;ACAA,IAAM,kBAAkB,CAAC,gBAAgB;AAAA,EACvC,IAAI;AAAA,EACJ,MAAM,4BAA4B,IAAI;AAAA,EACtC,MAAM,WAAW,CAAC,SAAS,YAAY;AAAA,IACrC,MAAM,YAAY,OAAO,YAAY,aAAa,QAAQ,KAAK,IAAI;AAAA,IACnE,IAAI,CAAC,OAAO,GAAG,WAAW,KAAK,GAAG;AAAA,MAChC,MAAM,gBAAgB;AAAA,MACtB,SAAS,WAAW,OAAO,UAAU,OAAO,cAAc,YAAY,cAAc,QAAQ,YAAY,OAAO,OAAO,CAAC,GAAG,OAAO,SAAS;AAAA,MAC1I,UAAU,QAAQ,CAAC,aAAa,SAAS,OAAO,aAAa,CAAC;AAAA,IAChE;AAAA;AAAA,EAEF,MAAM,WAAW,MAAM;AAAA,EACvB,MAAM,kBAAkB,MAAM;AAAA,EAC9B,MAAM,YAAY,CAAC,aAAa;AAAA,IAC9B,UAAU,IAAI,QAAQ;AAAA,IACtB,OAAO,MAAM,UAAU,O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SITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES, PAGE_HANDLER_NAMES, pageHandlerWrappers, handlerSourceMentionsPageHelper = (handler) => {
92
92
  const source = handler.toString();
93
93
  return PAGE_HANDLER_NAMES.some((name) => source.includes(name));
94
+ }, getOriginalPageHandlerSource = (handler) => {
95
+ if (typeof handler !== "function")
96
+ return;
97
+ const fn = handler;
98
+ const info = pageHandlerWrappers.get(fn);
99
+ return (info?.originalHandler ?? fn).toString();
94
100
  }, isPageHandler = (handler) => {
95
101
  if (typeof handler !== "function")
96
102
  return false;
@@ -98,12 +104,6 @@ var ROUTE_CALLSITE_STORAGE_KEY, ROUTE_CALLSITE_PATCHED_KEY, ROUTE_METHOD_NAMES,
98
104
  if (pageHandlerWrappers.has(fn))
99
105
  return true;
100
106
  return handlerSourceMentionsPageHelper(fn);
101
- }, getOriginalPageHandlerSource = (handler) => {
102
- if (typeof handler !== "function")
103
- return;
104
- const fn = handler;
105
- const info = pageHandlerWrappers.get(fn);
106
- return (info?.originalHandler ?? fn).toString();
107
107
  }, isObjectRecord3 = (value) => Boolean(value) && typeof value === "object", isAsyncLocalStorage2 = (value) => isObjectRecord3(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", isRouteMethod = (value) => typeof value === "function", getRouteCallsiteStorage = () => {
108
108
  const value = Reflect.get(globalThis, ROUTE_CALLSITE_STORAGE_KEY);
109
109
  if (value === null || typeof value === "undefined") {
@@ -1208,7 +1208,7 @@ var resolveAngularPackageDir = (specifier) => {
1208
1208
  var init_resolveAngularPackage = () => {};
1209
1209
 
1210
1210
  // src/utils/runtimeMode.ts
1211
- var ENV_VAR = "NODE_ENV", isProductionRuntime = () => process.env[ENV_VAR] === "production", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development";
1211
+ var ENV_VAR = "NODE_ENV", isDevelopmentRuntime = () => process.env[ENV_VAR] === "development", isProductionRuntime = () => process.env[ENV_VAR] === "production";
1212
1212
 
1213
1213
  // src/angular/angularPatch.ts
1214
1214
  var exports_angularPatch = {};
@@ -1586,7 +1586,7 @@ __export(exports_islands, {
1586
1586
  isAngularComponent: () => isAngularComponent,
1587
1587
  getAngularIslandSelector: () => getAngularIslandSelector
1588
1588
  });
1589
- var angularIslandSelector = "abs-angular-island", isAngularComponent = (value) => typeof value === "function", getAngularIslandSelector = (_islandId) => angularIslandSelector, getSelectorFromRenderedIsland = (rootElement) => {
1589
+ var angularIslandSelector = "abs-angular-island", getAngularIslandSelector = (_islandId) => angularIslandSelector, isAngularComponent = (value) => typeof value === "function", getSelectorFromRenderedIsland = (rootElement) => {
1590
1590
  const firstChild = rootElement.firstElementChild;
1591
1591
  if (!(firstChild instanceof HTMLElement)) {
1592
1592
  return null;
@@ -3083,8 +3083,8 @@ var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot3, compiledModuleCache3, tran
3083
3083
  const compiledScript = hasScript ? compiler.compileScript(descriptor, {
3084
3084
  fs: {
3085
3085
  fileExists: existsSync4,
3086
- readFile: (file) => existsSync4(file) ? readFileSync4(file, "utf-8") : undefined,
3087
- realpath: realpathSync
3086
+ realpath: realpathSync,
3087
+ readFile: (file) => existsSync4(file) ? readFileSync4(file, "utf-8") : undefined
3088
3088
  },
3089
3089
  id: componentId,
3090
3090
  inlineTemplate: false
@@ -3741,6 +3741,14 @@ var derivePageName = (pagePath) => {
3741
3741
  return toPascal(name);
3742
3742
  };
3743
3743
  var normalizeConventionPageName = (name) => toPascal(name).replace(/\d+$/, "");
3744
+ var hasErrorConvention = (framework) => {
3745
+ const conventions = getMap()[framework];
3746
+ if (!conventions)
3747
+ return false;
3748
+ if (conventions.defaults?.error)
3749
+ return true;
3750
+ return Object.values(conventions.pages ?? {}).some((page) => Boolean(page.error));
3751
+ };
3744
3752
  var resolveErrorConventionPath = (framework, pageName) => {
3745
3753
  const conventions = getMap()[framework];
3746
3754
  if (!conventions)
@@ -3757,14 +3765,6 @@ var resolveErrorConventionPath = (framework, pageName) => {
3757
3765
  return conventions.defaults?.error;
3758
3766
  };
3759
3767
  var resolveNotFoundConventionPath = (framework) => getMap()[framework]?.defaults?.notFound;
3760
- var hasErrorConvention = (framework) => {
3761
- const conventions = getMap()[framework];
3762
- if (!conventions)
3763
- return false;
3764
- if (conventions.defaults?.error)
3765
- return true;
3766
- return Object.values(conventions.pages ?? {}).some((page) => Boolean(page.error));
3767
- };
3768
3768
  var setConventions = (map) => {
3769
3769
  Reflect.set(globalThis, CONVENTIONS_KEY, map);
3770
3770
  };
@@ -3777,7 +3777,7 @@ var buildErrorProps = (error) => {
3777
3777
  ...isDev() && error.stack ? { stack: error.stack } : {}
3778
3778
  };
3779
3779
  }
3780
- return { name: "Error", message: String(error) };
3780
+ return { message: String(error), name: "Error" };
3781
3781
  };
3782
3782
  var renderReactError = async (conventionPath, errorProps) => {
3783
3783
  const { createElement } = await import("react");
@@ -4035,7 +4035,7 @@ var buildRefreshSetup = () => {
4035
4035
  return "window.__REFRESH_BUFFER__=[];" + "window.$RefreshReg$=function(t,i){window.__REFRESH_BUFFER__.push([t,i])};" + "window.$RefreshSig$=function(){return function(t){return t}};";
4036
4036
  };
4037
4037
  var handleReactPageRequest = async (input) => {
4038
- const Page = input.Page;
4038
+ const { Page } = input;
4039
4039
  const resolvedIndex = input.index;
4040
4040
  const options = input;
4041
4041
  const userProps = input.props;
@@ -4247,5 +4247,5 @@ export {
4247
4247
  Island
4248
4248
  };
4249
4249
 
4250
- //# debugId=79EFDFAA63C3019F64756E2164756E21
4250
+ //# debugId=D839CE5A269BECA964756E2164756E21
4251
4251
  //# sourceMappingURL=index.js.map