vxrn 2.6.21 → 2.7.0
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.
- package/dist/plugins/reactNativeDevServer.mjs +2 -2
- package/dist/plugins/reactNativeDevServer.mjs.map +1 -1
- package/dist/plugins/reactNativeDevServer.native.js +2 -2
- package/dist/plugins/reactNativeDevServer.native.js.map +1 -1
- package/dist/utils/createNativeDevEngine.mjs +45 -36
- package/dist/utils/createNativeDevEngine.mjs.map +1 -1
- package/dist/utils/createNativeDevEngine.native.js +45 -36
- package/dist/utils/createNativeDevEngine.native.js.map +1 -1
- package/package.json +12 -12
- package/src/config/glbAssets.test.ts +25 -4
- package/src/plugins/reactNativeDevServer.ts +2 -2
- package/src/utils/createNativeDevEngine.test.ts +113 -0
- package/src/utils/createNativeDevEngine.ts +53 -30
- package/types/utils/createNativeDevEngine.d.ts +1 -0
- package/types/utils/createNativeDevEngine.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNativeDevEngine.js","names":[],"sources":["utils/createNativeDevEngine.js"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { basename, dirname, extname, join, relative, resolve } from \"node:path\";\nimport { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, watch, writeFileSync } from \"node:fs\";\nimport { pathToFileURL } from \"node:url\";\nimport micromatch from \"micromatch\";\nimport { loadEnv, normalizePath } from \"vite\";\nimport { shouldStripFlow, transformHermesAsync } from \"@vxrn/compiler\";\nimport { resolvePath } from \"@vxrn/resolve\";\nimport { withExpoPublicEnvAliases } from \"@vxrn/utils/publicEnv\";\nimport { DEFAULT_ASSET_EXTS } from \"../constants/defaults\";\nimport { getNativePrelude } from \"../runtime/native-prelude\";\nimport { rnCodegenPlugin } from \"../plugins/rnCodegenPlugin\";\nimport { dedupe } from \"../config/getBaseViteConfigOnly\";\n\nconst HERMES_CLASS_TRANSFORMS = [\n\t\"transform-classes\",\n\t\"transform-parameters\",\n\t\"transform-block-scoping\",\n\t\"transform-class-properties\",\n\t\"transform-class-static-block\",\n\t\"transform-private-methods\",\n\t\"transform-private-property-in-object\"\n];\nconst HERMES_ASYNC_TRANSFORMS = [\"transform-async-to-generator\"];\nfunction getHermesSWCIncludes(dev) {\n\treturn [...HERMES_CLASS_TRANSFORMS, ...HERMES_ASYNC_TRANSFORMS];\n}\nfunction getResolveExtensions(platform) {\n\tconst platformExts = platform === \"ios\" ? [\n\t\t\".ios.tsx\",\n\t\t\".ios.ts\",\n\t\t\".ios.jsx\",\n\t\t\".ios.js\"\n\t] : [\n\t\t\".android.tsx\",\n\t\t\".android.ts\",\n\t\t\".android.jsx\",\n\t\t\".android.js\"\n\t];\n\tconst nativeExts = [\n\t\t\".native.tsx\",\n\t\t\".native.ts\",\n\t\t\".native.jsx\",\n\t\t\".native.js\"\n\t];\n\tconst defaultExts = [\n\t\t\".tsx\",\n\t\t\".ts\",\n\t\t\".jsx\",\n\t\t\".js\",\n\t\t\".mjs\",\n\t\t\".cjs\",\n\t\t\".json\"\n\t];\n\treturn [\n\t\t...platformExts,\n\t\t...nativeExts,\n\t\t...defaultExts\n\t];\n}\nfunction getNativeResolveConfig(platform) {\n\treturn {\n\t\textensions: getResolveExtensions(platform),\n\t\tconditionNames: [\"react-native\", \"browser\"],\n\t\tmainFields: [\n\t\t\t\"react-native\",\n\t\t\t\"browser\",\n\t\t\t\"main\",\n\t\t\t\"module\"\n\t\t],\n\t\taliasFields: [[\"react-native\"], [\"browser\"]]\n\t};\n}\nfunction getNativeTransformConfig(platform, dev, root) {\n\tconst entryConfig = globalThis.__vxrnNativeEntryConfig || {};\n\tconst setupFileDefines = (() => {\n\t\tconst sf = entryConfig.setupFile;\n\t\tif (!sf) return {};\n\t\tconst files = typeof sf === \"string\" ? {\n\t\t\tclient: sf,\n\t\t\tserver: sf,\n\t\t\tios: sf,\n\t\t\tandroid: sf\n\t\t} : \"native\" in sf ? {\n\t\t\tclient: sf.client,\n\t\t\tserver: sf.server,\n\t\t\tios: sf.native,\n\t\t\tandroid: sf.native\n\t\t} : sf;\n\t\treturn {\n\t\t\t...files.client && { \"process.env.ONE_SETUP_FILE_CLIENT\": JSON.stringify(files.client) },\n\t\t\t...files.server && { \"process.env.ONE_SETUP_FILE_SERVER\": JSON.stringify(files.server) },\n\t\t\t...files.ios && { \"process.env.ONE_SETUP_FILE_IOS\": JSON.stringify(files.ios) },\n\t\t\t...files.android && { \"process.env.ONE_SETUP_FILE_ANDROID\": JSON.stringify(files.android) }\n\t\t};\n\t})();\n\tconst userDefines = {};\n\tfor (const [key, value] of Object.entries(globalThis.__vxrnNativeUserDefine || {})) userDefines[key] = typeof value === \"string\" ? value : JSON.stringify(value);\n\tconst mode = dev ? \"development\" : \"production\";\n\tconst publicEnv = withExpoPublicEnvAliases(loadEnv(mode, root, [\n\t\t\"VITE_\",\n\t\t\"ONE_PUBLIC_\",\n\t\t\"EXPO_PUBLIC_\"\n\t]));\n\tconst envDefines = {};\n\tfor (const [key, value] of Object.entries(publicEnv)) {\n\t\tenvDefines[`import.meta.env.${key}`] = JSON.stringify(value);\n\t\tenvDefines[`process.env.${key}`] = JSON.stringify(value);\n\t}\n\tconst envObject = {\n\t\t...publicEnv,\n\t\tMODE: mode,\n\t\tDEV: dev,\n\t\tPROD: !dev,\n\t\tSSR: false,\n\t\tVITE_ENVIRONMENT: platform,\n\t\tVITE_NATIVE: \"1\",\n\t\tONE_PLATFORM: platform,\n\t\tEXPO_OS: platform,\n\t\tTAMAGUI_TARGET: \"native\",\n\t\tTAMAGUI_ENVIRONMENT: platform\n\t};\n\treturn {\n\t\tjsx: { runtime: \"classic\" },\n\t\tdefine: {\n\t\t\t...userDefines,\n\t\t\t...envDefines,\n\t\t\t\"process.env.NODE_ENV\": JSON.stringify(mode),\n\t\t\t\"process.env.VXRN_REACT_19\": \"false\",\n\t\t\t\"process.env.VITE_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t\"process.env.VITE_NATIVE\": \"\\\"1\\\"\",\n\t\t\t\"process.env.ONE_PLATFORM\": JSON.stringify(platform),\n\t\t\t\"process.env.EXPO_OS\": JSON.stringify(platform),\n\t\t\t\"process.env.TAMAGUI_TARGET\": \"\\\"native\\\"\",\n\t\t\t\"process.env.TAMAGUI_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t__DEV__: dev ? \"true\" : \"false\",\n\t\t\t\"import.meta.env\": JSON.stringify(envObject),\n\t\t\t\"import.meta.env.MODE\": JSON.stringify(mode),\n\t\t\t\"import.meta.env.DEV\": dev ? \"true\" : \"false\",\n\t\t\t\"import.meta.env.PROD\": dev ? \"false\" : \"true\",\n\t\t\t\"import.meta.env.SSR\": \"false\",\n\t\t\t\"import.meta.env.VITE_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t\"import.meta.env.VITE_NATIVE\": \"\\\"1\\\"\",\n\t\t\t\"import.meta.env.ONE_PLATFORM\": JSON.stringify(platform),\n\t\t\t\"import.meta.env.EXPO_OS\": JSON.stringify(platform),\n\t\t\t\"import.meta.env.TAMAGUI_TARGET\": \"\\\"native\\\"\",\n\t\t\t\"import.meta.env.TAMAGUI_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t...setupFileDefines\n\t\t},\n\t\tinject: { React: \"react\" }\n\t};\n}\nfunction getNativePlugins(root, platform, viteImportGlobPlugin, dev, assetsDest, onAsset, sourceMaps = false, userPlugins = []) {\n\tconst context = {\n\t\troot,\n\t\tplatform,\n\t\tdev\n\t};\n\treturn [\n\t\t...globalThis.__vxrnAddNativePlugins?.(platform) || [],\n\t\tserverFileExclusionPlugin(),\n\t\tenvironmentGuardPlugin(),\n\t\tmissingDynamicImportPlugin(),\n\t\thmrClientNoopPlugin(),\n\t\tnativeIdentityAliasPlugin(platform),\n\t\tnativeAssetRegistryPlugin(root),\n\t\treactNativeDedupePlugin(root),\n\t\tnativePackageDedupePlugin(root),\n\t\tcssStubPlugin(),\n\t\tviteImportGlobPlugin({ root }),\n\t\tvxrnCompilerPlugin(platform, dev, root, sourceMaps),\n\t\trnCodegenPlugin({ projectRoot: root }),\n\t\tflowStripPlugin(),\n\t\tnativeAnimatedGuardPlugin(),\n\t\tassetPlugin({\n\t\t\troot,\n\t\t\tplatform,\n\t\t\tassetsDest,\n\t\t\tonAsset\n\t\t}),\n\t\thermesCompatSWCPlugin(dev, sourceMaps),\n\t\thermesLoopsPlugin(sourceMaps),\n\t\t...userPlugins,\n\t\tnativeExportsPrecedencePlugin(root, platform),\n\t\tnativeDeclarationAliasPlugin(root, platform)\n\t].map((plugin) => plugin.api?.vxrnNative ? plugin.api.vxrnNative(context) : plugin);\n}\nfunction getNativeOutputOptions(prelude, sourcemap, minify) {\n\treturn {\n\t\tformat: \"esm\",\n\t\tsourcemap,\n\t\tsourcemapPathTransform: (relativeSourcePath, sourcemapPath) => normalizePath(resolve(dirname(sourcemapPath), relativeSourcePath)),\n\t\tintro: prelude,\n\t\tcodeSplitting: false,\n\t\tstrictExecutionOrder: true,\n\t\tminify: minify || \"dce-only\"\n\t};\n}\nfunction normalizeNativeCommonJSInterop(code) {\n\treturn code.replace(/(\\b__toESM(?:\\$\\d+)?\\(\\s*(?:require[\\w$]*\\(\\)|__rolldown_runtime__\\.loadExports\\(\"(?:\\\\.|[^\"\\\\])*\"\\))\\s*),\\s*1(\\s*\\))/g, \"$1$2\");\n}\nfunction blankPreservingLines(match) {\n\treturn \"\\n\".repeat(match.match(/\\n/g)?.length ?? 0);\n}\nfunction countLines(code) {\n\treturn (code.match(/\\n/g)?.length ?? 0) + 1;\n}\nfunction assertBundleLinesPreserved(before, after, stage) {\n\tconst beforeLines = countLines(before);\n\tconst afterLines = countLines(after);\n\tif (beforeLines !== afterLines) throw new Error(`[vxrn] native bundle post-processing (${stage}) changed the line count (${beforeLines} -> ${afterLines}), which invalidates the source map. Every pass after Rolldown emits the map must preserve lines.`);\n}\nfunction postProcessNativeBundle(code) {\n\tcode = normalizeNativeCommonJSInterop(code);\n\tcode = code.replace(/\\btypeof\\s+import\\.meta\\b/g, \"\\\"object\\\"\");\n\tcode = code.replace(/^[^\\S\\n]*export[^\\S\\n]*\\{[^}]*\\}[^\\S\\n]*;?[^\\S\\n]*$/gm, blankPreservingLines);\n\tcode = code.replace(/^([^\\S\\n]*)export[^\\S\\n]+default[^\\S\\n]+([^;\\n]+);?[^\\S\\n]*$/gm, \"$1$2;\");\n\tcode = code.replace(/^if \\(import\\.meta\\.hot\\).*$/gm, \"\");\n\t{\n\t\tconst idx = code.indexOf(\"NativeAnimatedModule_default ?? NativeAnimatedTurboModule_default;\");\n\t\tif (idx !== -1) {\n\t\t\tconst beforeMarker = code.lastIndexOf(\"NativeAnimatedModule = \", idx);\n\t\t\tif (beforeMarker !== -1) {\n\t\t\t\tconst lineStart = code.lastIndexOf(\"\\n\", beforeMarker);\n\t\t\t\tconst snippet = code.slice(lineStart + 1, beforeMarker + 50);\n\t\t\t\tif (snippet.includes(\"(function()\") || snippet.includes(\"new Proxy\")) {\n\t\t\t\t\tconst afterMarker = code.indexOf(\"})();\", idx);\n\t\t\t\t\tif (afterMarker !== -1) {\n\t\t\t\t\t\tconst end = afterMarker + 5;\n\t\t\t\t\t\tconst removed = code.slice(beforeMarker, end);\n\t\t\t\t\t\tcode = code.slice(0, beforeMarker) + \"NativeAnimatedModule = NativeAnimatedModule_default ?? NativeAnimatedTurboModule_default;\" + blankPreservingLines(removed) + code.slice(end);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn code;\n}\nfunction wrapNativeBundleModuleScope(code) {\n\tconst idx = code.indexOf(\"//#region \\\\0rolldown/runtime.js\");\n\tif (idx === -1) return code;\n\treturn code.slice(0, idx) + \";(function() {\" + code.slice(idx) + \"\\n})();\\n\";\n}\nasync function downlevelClassFieldsInBundle(code) {\n\tconst startMarker = \"//#region \\\\0rolldown/runtime.js\";\n\tconst endMarker = \"//#endregion\";\n\tconst startIdx = code.indexOf(startMarker);\n\tif (startIdx === -1) return code;\n\tconst endIdx = code.indexOf(endMarker, startIdx);\n\tif (endIdx === -1) return code;\n\tconst runtimeEnd = endIdx + 12;\n\tconst runtimeSection = code.slice(startIdx, runtimeEnd);\n\tconst originalNewlines = runtimeSection.match(/\\n/g)?.length ?? 0;\n\tconst { transformSync } = await import(\"oxc-transform\");\n\tconst result = transformSync(\"rolldown-runtime.js\", runtimeSection, {\n\t\ttarget: \"es2020\",\n\t\tassumptions: { setPublicClassFields: true }\n\t});\n\tif (result.errors?.length) throw new Error(result.errors.map((e) => e.message).join(\"\\n\"));\n\tconst transformedCode = result.code.trimEnd();\n\tconst transformed = transformedCode.includes(startMarker) ? transformedCode : `${startMarker}\n${transformedCode}`;\n\tconst transformedNewlines = transformed.match(/\\n/g)?.length ?? 0;\n\tif (transformedNewlines > originalNewlines) throw new Error(\"[vxrn] Hermes runtime transform added lines and would invalidate the production source map\");\n\tconst linePreservingRuntime = transformed + \"\\n\".repeat(originalNewlines - transformedNewlines);\n\treturn code.slice(0, startIdx) + linePreservingRuntime + code.slice(runtimeEnd);\n}\nfunction nativeBundlePostProcessPlugin() {\n\treturn {\n\t\tname: \"vxrn:native-post-process\",\n\t\tasync renderChunk(code) {\n\t\t\tconst processed = await downlevelClassFieldsInBundle(postProcessNativeBundle(code));\n\t\t\tassertBundleLinesPreserved(code, processed, \"production\");\n\t\t\treturn {\n\t\t\t\tcode: processed,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t}\n\t};\n}\nasync function createNativeDevEngine(options) {\n\tconst { root, port, host = \"localhost\", platform, serverUrl, plugins: userPlugins = [], onHmrUpdate } = options;\n\tconst { dev, viteImportGlobPlugin } = await import(\"rolldown/experimental\");\n\tconst hmrRuntimeSource = getHmrRuntimeSource();\n\tconst prelude = getNativePrelude({\n\t\tdev: true,\n\t\tplatform,\n\t\tserverUrl: serverUrl || `http://${host}:${port}`\n\t});\n\tconst assetRegistry = createNativeDevAssetRegistry();\n\tlet currentBundle = null;\n\tlet firstBuildError = null;\n\tlet bundleResolve = null;\n\tlet bundleReject = null;\n\tlet bundlePromise = null;\n\tconst virtualEntry = nativeVirtualEntryPlugin(root, {\n\t\tdev: true,\n\t\tplatform,\n\t\tdynamicRoutes: true\n\t});\n\tlet engineWork = Promise.resolve();\n\tconst queueEngineWork = (work) => {\n\t\tconst result = engineWork.then(work, work);\n\t\tengineWork = result.catch(() => {});\n\t\treturn result;\n\t};\n\tconst inputOptions = {\n\t\tinput: VIRTUAL_NATIVE_ENTRY,\n\t\tcwd: root,\n\t\tplatform: \"neutral\",\n\t\tresolve: getNativeResolveConfig(platform),\n\t\ttransform: getNativeTransformConfig(platform, true, root),\n\t\texperimental: {\n\t\t\tdevMode: {\n\t\t\t\timplement: hmrRuntimeSource,\n\t\t\t\thost,\n\t\t\t\tport\n\t\t\t},\n\t\t\tincrementalBuild: true,\n\t\t\tlazyBarrel: true\n\t\t},\n\t\ttreeshake: false,\n\t\tshimMissingExports: true,\n\t\tmoduleTypes: { \".js\": \"jsx\" },\n\t\tplugins: [virtualEntry.plugin, ...getNativePlugins(root, platform, viteImportGlobPlugin, true, void 0, assetRegistry.register, true, userPlugins)]\n\t};\n\tconst outputOptions = {\n\t\t...getNativeOutputOptions(prelude, true, false),\n\t\toutro: `\ntry {\n var __WS = (init_WebSocket(), __toCommonJS(WebSocket_exports)).default;\n var __devServer = (init_getDevServer(), __toCommonJS(getDevServer_exports)).default();\n var __hmrUrl = __devServer.url.replace(/^http/, 'ws') + 'hot?platform=${platform}&clientId=' + encodeURIComponent(__rolldown_runtime__.clientId);\n __rolldown_runtime__.setup(new __WS(__hmrUrl));\n} catch(e) {\n // a swallowed failure here leaves the app permanently without Fast Refresh and\n // nothing on screen or in the terminal says so.\n console.error('[vxrn] HMR client failed to start:', (e && e.message) || e);\n}\n`\n\t};\n\tlet outputProcessed = Promise.resolve();\n\tlet engine;\n\tlet routeWatcher;\n\tconst rebuildIfRouteGraphChanged = () => queueEngineWork(async () => {\n\t\tconst { files: knownRoutes, scanFiles, updateFiles } = virtualEntry.routes;\n\t\tconst currentRoutes = scanFiles();\n\t\tif (!(currentRoutes.size !== knownRoutes.size || [...currentRoutes].some((route) => !knownRoutes.has(route)))) return false;\n\t\tupdateFiles(currentRoutes);\n\t\treturn true;\n\t});\n\tengine = await dev(inputOptions, outputOptions, {\n\t\tonOutput: async (result) => {\n\t\t\tlet finishOutput = () => {};\n\t\t\toutputProcessed = new Promise((resolve2) => {\n\t\t\t\tfinishOutput = resolve2;\n\t\t\t});\n\t\t\ttry {\n\t\t\t\tawait handleOutput(result);\n\t\t\t} finally {\n\t\t\t\tfinishOutput();\n\t\t\t}\n\t\t},\n\t\tonHmrUpdates: async (result) => {\n\t\t\tif (result instanceof Error) {\n\t\t\t\tconsole.error(\"[vxrn] HMR error:\", result.message);\n\t\t\t\tonHmrUpdate?.({ type: \"hmr:error\" });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (await rebuildIfRouteGraphChanged()) return;\n\t\t\tfor (const { clientId, update } of result.updates) if (update.type === \"Patch\" && update.code) onHmrUpdate?.({\n\t\t\t\ttype: \"hmr:update\",\n\t\t\t\tclientId,\n\t\t\t\tcode: normalizeNativeCommonJSInterop(update.code),\n\t\t\t\tchangedIds: update.changedIds,\n\t\t\t\tseq: update.seq\n\t\t\t});\n\t\t\telse if (update.type === \"FullReload\") onHmrUpdate?.({\n\t\t\t\ttype: \"hmr:reload\",\n\t\t\t\tclientId\n\t\t\t});\n\t\t},\n\t\trebuildStrategy: \"never\",\n\t\twatch: {}\n\t});\n\tasync function handleOutput(result) {\n\t\tif (result instanceof Error) {\n\t\t\tconsole.error(\"[vxrn] native bundle error:\", result.message);\n\t\t\tif (/panic/i.test(result.message)) console.error(\"[vxrn] rolldown itself panicked. Fast Refresh will full-reload until you restart the dev server.\");\n\t\t\tif (!currentBundle) {\n\t\t\t\tfirstBuildError ||= result;\n\t\t\t\tif (bundleReject) {\n\t\t\t\t\tconst reject = bundleReject;\n\t\t\t\t\tbundleResolve = null;\n\t\t\t\t\tbundleReject = null;\n\t\t\t\t\tbundlePromise = null;\n\t\t\t\t\treject(firstBuildError);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst chunk = result.output.find((o) => o.type === \"chunk\" && o.isEntry);\n\t\tif (chunk && \"code\" in chunk) {\n\t\t\tfirstBuildError = null;\n\t\t\tlet code = postProcessNativeBundle(chunk.code);\n\t\t\tcode = await downlevelClassFieldsInBundle(code);\n\t\t\tassertBundleLinesPreserved(chunk.code, code, \"dev\");\n\t\t\tcode = wrapNativeBundleModuleScope(code);\n\t\t\tif (!chunk.map) throw new Error(\"[vxrn] rolldown produced no source map for the dev bundle, so /symbolicate cannot resolve a frame\");\n\t\t\tcurrentBundle = {\n\t\t\t\tcode,\n\t\t\t\tmap: chunk.map.toString()\n\t\t\t};\n\t\t\tconsole.info(`[vxrn] native bundle ready (${Math.round(code.length / 1024)}KB)`);\n\t\t\tif (bundleResolve) {\n\t\t\t\tbundleResolve(currentBundle);\n\t\t\t\tbundleResolve = null;\n\t\t\t\tbundleReject = null;\n\t\t\t\tbundlePromise = null;\n\t\t\t}\n\t\t}\n\t}\n\tawait engine.run();\n\tlet routeWatchTarget = virtualEntry.routes.routeRoot;\n\twhile (!statSync(routeWatchTarget, { throwIfNoEntry: false })?.isDirectory()) {\n\t\tconst parent = dirname(routeWatchTarget);\n\t\tif (parent === routeWatchTarget) break;\n\t\trouteWatchTarget = parent;\n\t}\n\tconst normalizedRouteRoot = normalizePath(virtualEntry.routes.routeRoot);\n\trouteWatcher = watch(routeWatchTarget, { recursive: true }, (_eventType, file) => {\n\t\tif (file === null) return;\n\t\tconst changed = normalizePath(resolve(routeWatchTarget, file.toString()));\n\t\tif (changed !== normalizedRouteRoot && !changed.startsWith(`${normalizedRouteRoot}/`)) return;\n\t\trebuildIfRouteGraphChanged().catch((error) => {\n\t\t\tconsole.error(`[vxrn] rebuilding the native route map failed`, error);\n\t\t});\n\t});\n\trouteWatcher.on(\"error\", (error) => {\n\t\tconsole.error(`[vxrn] watching the native route map failed`, error);\n\t});\n\tawait rebuildIfRouteGraphChanged();\n\treturn {\n\t\tengine,\n\t\tasync getBundle() {\n\t\t\tawait queueEngineWork(async () => {\n\t\t\t\tawait engine.ensureLatestBuildOutput();\n\t\t\t\tawait outputProcessed;\n\t\t\t});\n\t\t\tif (currentBundle) return currentBundle;\n\t\t\tif (firstBuildError) throw firstBuildError;\n\t\t\tif (!bundlePromise) {\n\t\t\t\tlet timeoutId;\n\t\t\t\tbundlePromise = new Promise((resolve2, reject) => {\n\t\t\t\t\tbundleResolve = (value) => {\n\t\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\t\tresolve2(value);\n\t\t\t\t\t};\n\t\t\t\t\tbundleReject = (error) => {\n\t\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t};\n\t\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\t\tbundleResolve = null;\n\t\t\t\t\t\tbundleReject = null;\n\t\t\t\t\t\tbundlePromise = null;\n\t\t\t\t\t\treject(/* @__PURE__ */ new Error(\"[vxrn] bundle build timed out after 120s\"));\n\t\t\t\t\t}, 12e4);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn bundlePromise;\n\t\t},\n\t\tgetAsset(pathname, hash) {\n\t\t\treturn assetRegistry.resolve(pathname, hash);\n\t\t},\n\t\tasync close() {\n\t\t\trouteWatcher?.close();\n\t\t\tawait engine.close();\n\t\t}\n\t};\n}\nasync function buildNativeBundle(options) {\n\tconst { root, platform, dev = false, serverUrl, entryFile, assetsDest, plugins: userPlugins = [], sourcemap = false, minify = !dev } = options;\n\tconst { build } = await import(\"rolldown\");\n\tconst { viteImportGlobPlugin } = await import(\"rolldown/experimental\");\n\tconst prelude = getNativePrelude({\n\t\tdev,\n\t\tplatform,\n\t\tserverUrl\n\t});\n\tconst chunk = (await build({\n\t\tinput: entryFile ? normalizePath(resolve(root, entryFile)) : VIRTUAL_NATIVE_ENTRY,\n\t\tcwd: root,\n\t\tplatform: \"neutral\",\n\t\tresolve: getNativeResolveConfig(platform),\n\t\ttransform: getNativeTransformConfig(platform, dev, root),\n\t\ttreeshake: !dev,\n\t\texperimental: { lazyBarrel: false },\n\t\tshimMissingExports: true,\n\t\tmoduleTypes: { \".js\": \"jsx\" },\n\t\tplugins: [\n\t\t\t...entryFile ? [] : [nativeVirtualEntryPlugin(root, {\n\t\t\t\tdev,\n\t\t\t\tplatform\n\t\t\t}).plugin],\n\t\t\t...getNativePlugins(root, platform, viteImportGlobPlugin, dev, assetsDest, void 0, sourcemap, userPlugins),\n\t\t\tnativeBundlePostProcessPlugin()\n\t\t],\n\t\toutput: {\n\t\t\t...getNativeOutputOptions(prelude, sourcemap, minify),\n\t\t\tformat: \"iife\"\n\t\t}\n\t})).output.find((o) => o.type === \"chunk\" && o.isEntry);\n\tif (!chunk || !(\"code\" in chunk)) throw new Error(\"[vxrn] production build produced no output\");\n\tif (sourcemap && !chunk.map) throw new Error(\"[vxrn] a source map was requested but rolldown produced none for the production bundle\");\n\treturn {\n\t\tcode: chunk.code,\n\t\tmap: sourcemap ? chunk.map?.toString() : void 0\n\t};\n}\nconst VIRTUAL_NATIVE_ENTRY = \"virtual:native-entry\";\nfunction nativeVirtualEntryPlugin(root, opts) {\n\tconst isDev = opts?.dev !== false;\n\tconst useDynamicRouteRegistry = opts.dynamicRoutes === true;\n\tconst resolvedId = normalizePath(resolve(root, \"__virtual-native-entry.tsx\"));\n\tconst entryConfig = globalThis.__vxrnNativeEntryConfig || {};\n\tconst routerRoot = entryConfig.routerRoot || \"app\";\n\tconst flags = entryConfig.flags || {};\n\tconst linking = entryConfig.linking;\n\tconst setupFileImport = (() => {\n\t\tconst sf = entryConfig.setupFile;\n\t\tif (!sf) return \"\";\n\t\tconst file = typeof sf === \"string\" ? sf : \"native\" in sf ? sf.native : sf.ios;\n\t\tif (!file) return \"\";\n\t\tconst resolved = pathToFileURL(resolve(root, file)).href;\n\t\treturn `import ${JSON.stringify(resolved)};`;\n\t})();\n\tconst routeGlobs = [\n\t\t`./${routerRoot}/**/*.tsx`,\n\t\t`./${routerRoot}/**/*.ts`,\n\t\t`!./${routerRoot}/**/*+api.*`,\n\t\t`!./${routerRoot}/**/*.test.*`,\n\t\t`!./${routerRoot}/**/*.d.ts`,\n\t\t`!./${routerRoot}/**/*.server.*`,\n\t\t`!./${routerRoot}/**/_middleware.*`,\n\t\t`!./${routerRoot}/**/*.web.*`,\n\t\t...(entryConfig.ignoredRouteFiles || []).map((pattern) => `!./${routerRoot}/${pattern}`)\n\t];\n\tconst refreshSetup = isDev ? `\n// react-refresh/runtime MUST initialize before React loads\nimport RefreshRuntime from 'react-refresh/runtime';\nRefreshRuntime.injectIntoGlobalHook(globalThis);\nglobalThis.__ReactRefresh = RefreshRuntime;\nglobalThis.$RefreshReg$ = function(type, id) {\n RefreshRuntime.register(type, id);\n};\nglobalThis.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;\n` : \"\";\n\tconst entryCode = () => `\n${refreshSetup}\nimport * as ReactNativeInitializeCore from 'react-native/Libraries/Core/InitializeCore';\nimport NativeWebSocket from 'react-native/Libraries/WebSocket/WebSocket';\nimport DevSettings from 'react-native/Libraries/Utilities/DevSettings';\n${setupFileImport}\n${routeImports}\nimport { createApp } from 'one';\n\nvoid ReactNativeInitializeCore;\nglobalThis.WebSocket = NativeWebSocket;\nglobalThis.__VXRN_RELOAD_NATIVE_DEV_BUNDLE__ = function(reason) {\n DevSettings.reload(reason);\n};\n\n// React Native reloads a dev bundle in the existing JS runtime. Advance One's\n// route-cache version so a full reload cannot reuse the previous context.\nglobalThis.__vxrnVersion = (globalThis.__vxrnVersion || 0) + 1;\n\ncreateApp({\n routes: routes,\n routerRoot: ${JSON.stringify(routerRoot)},\n flags: ${JSON.stringify(flags)},\n linking: ${JSON.stringify(linking)},\n});\n\n${routeHmr}\n`;\n\tconst routeRoot = resolve(root, routerRoot);\n\tconst stripDot = (pattern) => pattern.replace(/^\\.\\//, \"\");\n\tconst includeGlobs = routeGlobs.filter((p) => !p.startsWith(\"!\")).map(stripDot);\n\tconst excludeGlobs = routeGlobs.filter((p) => p.startsWith(\"!\")).map((p) => stripDot(p.slice(1)));\n\tconst isRouteFile = (file) => {\n\t\tconst relativeToRoot = normalizePath(relative(root, file));\n\t\treturn micromatch.isMatch(relativeToRoot, includeGlobs) && !micromatch.isMatch(relativeToRoot, excludeGlobs);\n\t};\n\tconst scanFiles = () => {\n\t\tconst files = /* @__PURE__ */ new Set();\n\t\tconst walkRouteRoot = (dir) => {\n\t\t\tfor (const entry of readdirSync(dir, { withFileTypes: true })) {\n\t\t\t\tconst child = resolve(dir, entry.name);\n\t\t\t\tif (entry.isDirectory()) walkRouteRoot(child);\n\t\t\t\telse if (isRouteFile(child)) files.add(normalizePath(child));\n\t\t\t}\n\t\t};\n\t\tif (statSync(routeRoot, { throwIfNoEntry: false })?.isDirectory()) walkRouteRoot(routeRoot);\n\t\treturn files;\n\t};\n\tconst registrySpecifier = `./node_modules/.vxrn/native-routes-${opts.platform}.mjs`;\n\tconst registryPath = resolve(root, registrySpecifier);\n\tconst routes = {\n\t\trouteRoot,\n\t\tfiles: /* @__PURE__ */ new Set(),\n\t\tisRouteFile,\n\t\tscanFiles,\n\t\tupdateFiles(files) {\n\t\t\troutes.files = files;\n\t\t\tif (!useDynamicRouteRegistry) return;\n\t\t\tmkdirSync(dirname(registryPath), { recursive: true });\n\t\t\tconst registryDir = realpathSync(dirname(registryPath));\n\t\t\tconst source = `export const routes = {\n${[...files].sort().map((file) => {\n\t\t\t\tconst routeKey = `/${normalizePath(relative(root, file))}`;\n\t\t\t\tlet importPath = normalizePath(relative(registryDir, file));\n\t\t\t\tif (!importPath.startsWith(\".\")) importPath = `./${importPath}`;\n\t\t\t\treturn ` ${JSON.stringify(routeKey)}: () => import(${JSON.stringify(importPath)})`;\n\t\t\t}).join(\",\\n\")}\n}\n`;\n\t\t\tif (!existsSync(registryPath) || readFileSync(registryPath, \"utf8\") !== source) writeFileSync(registryPath, source);\n\t\t}\n\t};\n\troutes.updateFiles(routes.scanFiles());\n\tconst routeImports = useDynamicRouteRegistry ? `import { routes } from ${JSON.stringify(registrySpecifier)};` : `var _routes = import.meta.glob(${JSON.stringify(routeGlobs)}, { exhaustive: true });\n// fix route keys: One expects '/${routerRoot}/...' prefix but import.meta.glob returns './${routerRoot}/...'\nvar routes = {};\nObject.keys(_routes).forEach(function(key) {\n var normalizedKey = key.replace(/^\\\\.\\\\//, '');\n routes['/' + normalizedKey] = _routes[key];\n});`;\n\tconst routeHmr = useDynamicRouteRegistry ? `if (import.meta.hot) {\n import.meta.hot.accept(${JSON.stringify(registrySpecifier)}, function(next) {\n if (globalThis.__VXRN_UPDATE_NATIVE_ROUTES__) {\n globalThis.__VXRN_UPDATE_NATIVE_ROUTES__(next.routes);\n }\n });\n}` : \"\";\n\treturn {\n\t\troutes,\n\t\tplugin: {\n\t\t\tname: \"vxrn:native-virtual-entry\",\n\t\t\tresolveId(id) {\n\t\t\t\tif (id === VIRTUAL_NATIVE_ENTRY) return resolvedId;\n\t\t\t},\n\t\t\tload(id) {\n\t\t\t\tif (id !== resolvedId) return;\n\t\t\t\treturn entryCode();\n\t\t\t}\n\t\t}\n\t};\n}\nfunction nativeAnimatedGuardPlugin() {\n\treturn {\n\t\tname: \"vxrn:native-animated-guard\",\n\t\ttransform(code, id) {\n\t\t\tif (!id.includes(\"animated/NativeAnimatedHelper\")) return;\n\t\t\tconst target = \"const method = nullthrows(NativeAnimatedModule)[methodName];\";\n\t\t\tif (!code.includes(target)) return;\n\t\t\treturn {\n\t\t\t\tcode: code.replace(target, `${target} if (typeof method !== 'function') return;`),\n\t\t\t\tmap: {\n\t\t\t\t\tversion: 3,\n\t\t\t\t\tsources: [id],\n\t\t\t\t\tsourcesContent: [code],\n\t\t\t\t\tnames: [],\n\t\t\t\t\tmappings: code.split(\"\\n\").map((_, index) => index === 0 ? \"AAAA\" : \"AACA\").join(\";\")\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n}\nfunction serverFileExclusionPlugin() {\n\treturn {\n\t\tname: \"vxrn:server-file-exclusion\",\n\t\tload(id) {\n\t\t\tif (/\\.server\\.\\w+$/.test(id)) return {\n\t\t\t\tcode: \"export default undefined;\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t\tif (/[\\\\/]_middleware\\.\\w+$/.test(id)) return {\n\t\t\t\tcode: \"export default undefined;\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction missingDynamicImportPlugin() {\n\tconst PREFIX = \"\\0vxrn-missing-module:\";\n\treturn {\n\t\tname: \"vxrn:missing-dynamic-import\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tif (options.kind !== \"dynamic-import\") return;\n\t\t\tif (source.startsWith(\".\") || source.startsWith(\"/\") || source.includes(\":\")) return;\n\t\t\tif (source.startsWith(\"\\0\")) return;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t\tif (resolved) return resolved;\n\t\t\treturn {\n\t\t\t\tid: `${PREFIX}${source}`,\n\t\t\t\texternal: false\n\t\t\t};\n\t\t},\n\t\tload(id) {\n\t\t\tif (!id.startsWith(PREFIX)) return;\n\t\t\treturn {\n\t\t\t\tcode: `throw new Error(${JSON.stringify(`Cannot find module '${id.slice(21)}'`)});`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction environmentGuardPlugin() {\n\tconst THROWING = [\n\t\t\"server-only\",\n\t\t\"client-only\",\n\t\t\"web-only\"\n\t];\n\tconst NOOP = [\"native-only\"];\n\treturn {\n\t\tname: \"vxrn:environment-guard\",\n\t\tresolveId(source) {\n\t\t\tif (THROWING.includes(source)) return {\n\t\t\t\tid: `\\0env-guard-throw:${source}`,\n\t\t\t\texternal: false\n\t\t\t};\n\t\t\tif (NOOP.includes(source)) return {\n\t\t\t\tid: `\\0env-guard-noop:${source}`,\n\t\t\t\texternal: false\n\t\t\t};\n\t\t},\n\t\tload(id) {\n\t\t\tif (id.startsWith(\"\\0env-guard-throw:\")) return {\n\t\t\t\tcode: `throw new Error(\"Cannot import '${id.slice(17)}' in a native bundle.\");`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t\tif (id.startsWith(\"\\0env-guard-noop:\")) return {\n\t\t\t\tcode: \"\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction hmrClientNoopPlugin() {\n\tconst RN_HMR_CLIENT_RE = /(^|[\\\\/])Utilities[\\\\/]HMRClient(\\.[cm]?[jt]sx?)?$/;\n\treturn {\n\t\tname: \"vxrn:hmr-client-noop\",\n\t\tresolveId(source, importer) {\n\t\t\tif ((source.startsWith(\"react-native/\") || importer != null && /(^|[\\\\/])react-native[\\\\/]/.test(importer)) && RN_HMR_CLIENT_RE.test(source)) return {\n\t\t\t\tid: \"\\0vxrn-hmr-client-noop\",\n\t\t\t\texternal: false\n\t\t\t};\n\t\t},\n\t\tload(id) {\n\t\t\tif (id === \"\\0vxrn-hmr-client-noop\") return {\n\t\t\t\tcode: `const HMRClient = { setup() {}, enable() {}, disable() {}, registerBundle() {}, log() {}, isEnabled() { return false } }\nexport default HMRClient`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction nativeIdentityAliasPlugin(platform) {\n\tconst packages = /* @__PURE__ */ new Map();\n\tlet resolver;\n\tconst findPackage = (directory) => {\n\t\tif (packages.has(directory)) return packages.get(directory);\n\t\tlet result = null;\n\t\tconst manifest = join(directory, \"package.json\");\n\t\tif (existsSync(manifest)) try {\n\t\t\tconst field = JSON.parse(readFileSync(manifest, \"utf8\"))[\"react-native\"];\n\t\t\tresult = {\n\t\t\t\troot: directory,\n\t\t\t\taliases: field && typeof field === \"object\" ? field : {}\n\t\t\t};\n\t\t} catch {}\n\t\telse {\n\t\t\tconst parent = dirname(directory);\n\t\t\tif (parent !== directory) result = findPackage(parent);\n\t\t}\n\t\tpackages.set(directory, result);\n\t\treturn result;\n\t};\n\treturn {\n\t\tname: \"vxrn:native-identity-alias\",\n\t\tasync resolveId(source, importer) {\n\t\t\tif (!importer || !source.startsWith(\".\")) return;\n\t\t\tconst pkg = findPackage(dirname(importer));\n\t\t\tif (!pkg) return;\n\t\t\tconst key = `./${normalizePath(relative(pkg.root, resolve(dirname(importer), source)))}`;\n\t\t\tif (pkg.aliases[key] !== key) return;\n\t\t\tif (!resolver) {\n\t\t\t\tconst { ResolverFactory } = await import(\"rolldown/experimental\");\n\t\t\t\tresolver = new ResolverFactory({\n\t\t\t\t\t...getNativeResolveConfig(platform),\n\t\t\t\t\taliasFields: []\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst result = resolver.sync(dirname(importer), source);\n\t\t\tif (result.path) return result.path;\n\t\t}\n\t};\n}\nfunction nativeExportsPrecedencePlugin(root, platform) {\n\tconst manifests = /* @__PURE__ */ new Map();\n\tconst readManifest = (directory) => {\n\t\tif (!manifests.has(directory)) {\n\t\t\tlet manifest = null;\n\t\t\ttry {\n\t\t\t\tmanifest = JSON.parse(readFileSync(join(directory, \"package.json\"), \"utf8\"));\n\t\t\t} catch {}\n\t\t\tmanifests.set(directory, manifest);\n\t\t}\n\t\treturn manifests.get(directory);\n\t};\n\tconst resolvers = /* @__PURE__ */ new Map();\n\treturn {\n\t\tname: \"vxrn:native-exports-precedence\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tif (source.startsWith(\".\") || source.startsWith(\"/\") || source.includes(\":\")) return;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t\tif (!resolved || resolved.external || resolved.id.startsWith(\"\\0\")) return resolved;\n\t\t\tconst name = source.split(\"/\").slice(0, source.startsWith(\"@\") ? 2 : 1).join(\"/\");\n\t\t\tlet directory = dirname(resolved.id);\n\t\t\twhile (readManifest(directory)?.name !== name) {\n\t\t\t\tif (dirname(directory) === directory) return resolved;\n\t\t\t\tdirectory = dirname(directory);\n\t\t\t}\n\t\t\tconst exportsMap = JSON.stringify(readManifest(directory)?.exports ?? null);\n\t\t\tif (!exportsMap.includes(\"\\\"react-native\\\"\") || !exportsMap.includes(\"\\\"browser\\\"\")) return resolved;\n\t\t\tconst kind = options.kind === \"require-call\" ? \"require\" : \"import\";\n\t\t\tlet resolver = resolvers.get(kind);\n\t\t\tif (!resolver) {\n\t\t\t\tconst { ResolverFactory } = await import(\"rolldown/experimental\");\n\t\t\t\tresolver = new ResolverFactory({\n\t\t\t\t\t...getNativeResolveConfig(platform),\n\t\t\t\t\tconditionNames: [\n\t\t\t\t\t\t\"react-native\",\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\"default\"\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t\tresolvers.set(kind, resolver);\n\t\t\t}\n\t\t\tconst native = resolver.sync(importer ? dirname(importer) : root, source);\n\t\t\tif (!native.path || native.path === resolved.id) return resolved;\n\t\t\treturn this.resolve(native.path, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t}\n\t};\n}\nfunction nativeDeclarationAliasPlugin(root, platform) {\n\tconst resolvers = /* @__PURE__ */ new Map();\n\treturn {\n\t\tname: \"vxrn:declaration-alias\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tif (source.startsWith(\".\") || source.startsWith(\"/\") || source.includes(\":\")) return;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t\tif (!resolved || resolved.external || !/\\.d\\.[cm]?ts$/.test(resolved.id)) return resolved;\n\t\t\tconst kind = options.kind === \"require-call\" ? \"require\" : \"import\";\n\t\t\tlet resolver = resolvers.get(kind);\n\t\t\tif (!resolver) {\n\t\t\t\tconst { ResolverFactory } = await import(\"rolldown/experimental\");\n\t\t\t\tresolver = new ResolverFactory({\n\t\t\t\t\t...getNativeResolveConfig(platform),\n\t\t\t\t\tconditionNames: [\n\t\t\t\t\t\t\"react-native\",\n\t\t\t\t\t\t\"browser\",\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\"default\"\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t\tresolvers.set(kind, resolver);\n\t\t\t}\n\t\t\tconst runtime = resolver.sync(importer ? dirname(importer) : root, source);\n\t\t\tif (!runtime.path || /\\.d\\.[cm]?ts$/.test(runtime.path)) this.error(`Native import ${source} resolves to a declaration without a runtime export`);\n\t\t\treturn this.resolve(runtime.path, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t}\n\t};\n}\nfunction nativeAssetRegistryPlugin(root) {\n\tlet registryPath;\n\treturn {\n\t\tname: \"vxrn:asset-registry\",\n\t\tasync resolveId(source, importer) {\n\t\t\tif (source !== \"react-native/asset-registry\" && source !== \"@react-native/assets-registry/registry\") return;\n\t\t\tif (registryPath === void 0) try {\n\t\t\t\tconst reactNativeRoot = dirname(resolvePath(\"react-native/package.json\", root));\n\t\t\t\tconst exportedRegistry = join(reactNativeRoot, \"src/asset-registry.js\");\n\t\t\t\tregistryPath = existsSync(exportedRegistry) ? exportedRegistry : resolvePath(\"@react-native/assets-registry/registry\", reactNativeRoot);\n\t\t\t} catch {\n\t\t\t\tregistryPath = null;\n\t\t\t}\n\t\t\tif (registryPath) return this.resolve(normalizePath(registryPath), importer, { skipSelf: true });\n\t\t}\n\t};\n}\nfunction nativePackageDedupePlugin(root) {\n\tconst packages = /* @__PURE__ */ new Set([\n\t\t...dedupe,\n\t\t\"react-native-worklets\",\n\t\t\"react-native-nitro-modules\"\n\t]);\n\treturn {\n\t\tname: \"vxrn:native-package-dedupe\",\n\t\tasync resolveId(source) {\n\t\t\tconst parts = source.split(\"/\");\n\t\t\tconst packageName = source.startsWith(\"@\") ? parts.slice(0, 2).join(\"/\") : parts[0];\n\t\t\tif (!packages.has(packageName)) return;\n\t\t\treturn this.resolve(source, join(root, \"package.json\"), { skipSelf: true });\n\t\t}\n\t};\n}\nfunction reactNativeDedupePlugin(root) {\n\tlet reactNativeRoot;\n\treturn {\n\t\tname: \"vxrn:react-native-dedupe\",\n\t\tasync resolveId(source, importer) {\n\t\t\tif (source !== \"react-native\" && !source.startsWith(\"react-native/\")) return;\n\t\t\tif (reactNativeRoot === void 0) try {\n\t\t\t\treactNativeRoot = realpathSync(dirname(resolvePath(\"react-native/package.json\", root)));\n\t\t\t} catch {\n\t\t\t\treactNativeRoot = null;\n\t\t\t}\n\t\t\tif (!reactNativeRoot) return;\n\t\t\tconst subpath = source === \"react-native\" ? \"index.js\" : source.slice(13);\n\t\t\treturn this.resolve(normalizePath(resolve(reactNativeRoot, subpath)), importer, { skipSelf: true });\n\t\t}\n\t};\n}\nfunction cssStubPlugin() {\n\treturn {\n\t\tname: \"vxrn:css-stub\",\n\t\tload: { handler(id) {\n\t\t\tif (id.endsWith(\".css\")) return {\n\t\t\t\tcode: \"\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t} }\n\t};\n}\nfunction vxrnCompilerPlugin(platform, dev, projectRoot = process.cwd(), sourceMaps = false) {\n\tlet compiler = null;\n\tconst isRefreshCandidate = (id) => dev && !id.includes(\"node_modules\") && !id.includes(\"__virtual-native-entry\") && /\\.[tj]sx?$/.test(id);\n\treturn {\n\t\tname: \"vxrn:compiler\",\n\t\tasync transform(code, id) {\n\t\t\tif (!/\\.[cm]?[jt]sx?$/.test(id)) return;\n\t\t\tif (id.includes(\"\\0\") || id.includes(\"virtual:\")) return;\n\t\t\tconst needsRefresh = isRefreshCandidate(id);\n\t\t\tif (!compiler) compiler = await import(\"@vxrn/compiler\");\n\t\t\tconst props = {\n\t\t\t\tid,\n\t\t\t\tcode,\n\t\t\t\tprojectRoot,\n\t\t\t\tdevelopment: dev,\n\t\t\t\tenvironment: platform,\n\t\t\t\treactForRNVersion: \"19\"\n\t\t\t};\n\t\t\tlet babelOptions = compiler.getBabelOptions(props);\n\t\t\tlet curCode = code;\n\t\t\tconst intermediateMaps = [];\n\t\t\tconst isWorkletPlugin = (entry) => {\n\t\t\t\tif (!entry) return false;\n\t\t\t\tconst name = typeof entry === \"string\" ? entry : Array.isArray(entry) ? entry[0] : null;\n\t\t\t\treturn typeof name === \"string\" && (name.includes(\"react-native-worklets\") || name.includes(\"react-native-reanimated\"));\n\t\t\t};\n\t\t\tconst workletEntry = babelOptions?.plugins?.find(isWorkletPlugin);\n\t\t\tconst workletPluginOptions = Array.isArray(workletEntry) ? workletEntry[1] : void 0;\n\t\t\tconst useWorklets = compiler.isNativeWorkletsEnabled() && (Boolean(workletEntry) || compiler.shouldTransformWorklets({\n\t\t\t\tid,\n\t\t\t\tcode\n\t\t\t}));\n\t\t\tconst compilerPluginIndex = babelOptions?.plugins?.findIndex((x) => Array.isArray(x) && x[0] === \"babel-plugin-react-compiler\") ?? -1;\n\t\t\tif (compilerPluginIndex !== -1) {\n\t\t\t\tif (useWorklets) {\n\t\t\t\t\tconst prepared = compiler.prepareWorkletsForReactCompiler(id, curCode, sourceMaps);\n\t\t\t\t\tif (prepared) {\n\t\t\t\t\t\tcurCode = prepared.code;\n\t\t\t\t\t\tif (prepared.map) intermediateMaps.push(prepared.map);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst compilerPluginOptions = babelOptions.plugins[compilerPluginIndex][1] || {};\n\t\t\t\tif (!(compilerPluginOptions.compiler === \"babel\" || process.env.ONE_REACT_COMPILER === \"babel\" || process.env.VXRN_REACT_COMPILER === \"babel\")) {\n\t\t\t\t\tconst compilerOut = await compiler.transformOxcReactCompiler(id, curCode, compilerPluginOptions, sourceMaps);\n\t\t\t\t\tif (compilerOut?.code) {\n\t\t\t\t\t\tcurCode = compilerOut.code;\n\t\t\t\t\t\tif (sourceMaps && compilerOut.map) intermediateMaps.push(compilerOut.map);\n\t\t\t\t\t}\n\t\t\t\t\tbabelOptions.plugins.splice(compilerPluginIndex, 1);\n\t\t\t\t\tif (babelOptions.plugins.length === 0 && !babelOptions.configFile && !babelOptions.babelrc) babelOptions = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (useWorklets) {\n\t\t\t\tconst workletOut = await compiler.transformWorklets(id, curCode, sourceMaps, {\n\t\t\t\t\tprojectRoot,\n\t\t\t\t\t...workletPluginOptions\n\t\t\t\t});\n\t\t\t\tif (workletOut?.code) {\n\t\t\t\t\tcurCode = workletOut.code;\n\t\t\t\t\tif (sourceMaps && workletOut.map) intermediateMaps.push(workletOut.map);\n\t\t\t\t}\n\t\t\t\tif (babelOptions?.plugins) {\n\t\t\t\t\tbabelOptions.plugins = babelOptions.plugins.filter((entry) => !isWorkletPlugin(entry));\n\t\t\t\t\tif (babelOptions.plugins.length === 0 && !babelOptions.configFile && !babelOptions.babelrc) babelOptions = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!babelOptions && !needsRefresh) {\n\t\t\t\tif (curCode !== code) {\n\t\t\t\t\tlet finalMap = void 0;\n\t\t\t\t\tif (sourceMaps && intermediateMaps.length > 0) if (intermediateMaps.length === 1) finalMap = intermediateMaps[0];\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\t\tfinalMap = remapping(intermediateMaps.slice().reverse(), () => null);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcode: curCode,\n\t\t\t\t\t\tmap: finalMap\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (sourceMaps && babelOptions) {\n\t\t\t\tbabelOptions = {\n\t\t\t\t\t...babelOptions,\n\t\t\t\t\tsourceMaps: true,\n\t\t\t\t\tsourceFileName: id\n\t\t\t\t};\n\t\t\t\tdelete babelOptions.inputSourceMap;\n\t\t\t}\n\t\t\tif (babelOptions) {\n\t\t\t\tconst result = await compiler.transformBabel(id, curCode, babelOptions);\n\t\t\t\tif (result?.code) {\n\t\t\t\t\tcurCode = result.code;\n\t\t\t\t\tif (sourceMaps && result.map) intermediateMaps.push(result.map);\n\t\t\t\t\tif (!needsRefresh) {\n\t\t\t\t\t\tlet finalMap = void 0;\n\t\t\t\t\t\tif (sourceMaps && intermediateMaps.length > 0) if (intermediateMaps.length === 1) finalMap = intermediateMaps[0];\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\t\t\tfinalMap = remapping(intermediateMaps.slice().reverse(), () => null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tcode: curCode,\n\t\t\t\t\t\t\tmap: finalMap\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needsRefresh) {\n\t\t\t\tconst { transformSync } = await import(\"oxc-transform-react\");\n\t\t\t\tconst jsxImportSource = compiler.configuration?.enableNativewind && !id.includes(\"node_modules\") ? \"nativewind\" : \"react\";\n\t\t\t\tconst res = transformSync(id, curCode, {\n\t\t\t\t\tjsx: {\n\t\t\t\t\t\tdevelopment: dev,\n\t\t\t\t\t\truntime: \"automatic\",\n\t\t\t\t\t\timportSource: jsxImportSource,\n\t\t\t\t\t\trefresh: {\n\t\t\t\t\t\t\trefreshReg: \"__vxrnRefreshReg\",\n\t\t\t\t\t\t\trefreshSig: \"__vxrnRefreshSig\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\treactCompiler: false,\n\t\t\t\t\tsourcemap: sourceMaps\n\t\t\t\t});\n\t\t\t\tif (res.fatal) throw new Error(`[vxrn:compiler] oxc react transform failed on ${id}: ${(res.errors ?? []).map((e) => e.message ?? String(e)).join(\", \")}`);\n\t\t\t\tconst header = `var __prevRefreshReg = globalThis.$RefreshReg$;\nvar __prevRefreshSig = globalThis.$RefreshSig$;\nif (globalThis.__ReactRefresh) {\n globalThis.$RefreshReg$ = function(type, id) {\n globalThis.__ReactRefresh.register(type, \"${id.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\")}\" + \" \" + id);\n };\n globalThis.$RefreshSig$ = globalThis.__ReactRefresh.createSignatureFunctionForTransform;\n}\n// keep registration calls local so rolldown retains them in the initial bundle.\nvar __vxrnRefreshReg = globalThis.$RefreshReg$;\nvar __vxrnRefreshSig = globalThis.$RefreshSig$;\n\n`;\n\t\t\t\tconst footer = `\n\nglobalThis.$RefreshReg$ = __prevRefreshReg;\nglobalThis.$RefreshSig$ = __prevRefreshSig;\nif (import.meta.hot) {\n import.meta.hot.acceptReactRefresh(function() {\n if (globalThis.__ReactRefresh) {\n setTimeout(function() { globalThis.__ReactRefresh.performReactRefresh(); }, 30);\n }\n });\n}\n`;\n\t\t\t\tlet out;\n\t\t\t\tlet finalMap = void 0;\n\t\t\t\tif (sourceMaps) {\n\t\t\t\t\tconst MagicString = (await import(\"magic-string\")).default;\n\t\t\t\t\tconst ms = new MagicString(res.code);\n\t\t\t\t\tms.prepend(header);\n\t\t\t\t\tms.append(footer);\n\t\t\t\t\tout = ms.toString();\n\t\t\t\t\tconst allMaps = [\n\t\t\t\t\t\tms.generateMap({\n\t\t\t\t\t\t\tsource: id,\n\t\t\t\t\t\t\thires: true\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tres.map,\n\t\t\t\t\t\t...intermediateMaps.slice().reverse()\n\t\t\t\t\t].filter(Boolean);\n\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\tfinalMap = remapping(allMaps, () => null);\n\t\t\t\t} else out = header + res.code + footer;\n\t\t\t\treturn {\n\t\t\t\t\tcode: out,\n\t\t\t\t\tmap: finalMap\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n}\nfunction flowStripPlugin() {\n\treturn {\n\t\tname: \"vxrn:flow-strip\",\n\t\ttransform: { async handler(code, id) {\n\t\t\tif (!shouldStripFlow(id, code)) return;\n\t\t\tconst { stripFlowTypes } = await import(\"@vxrn/compiler\");\n\t\t\tconst result = await stripFlowTypes(id, code);\n\t\t\treturn {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: result.map\n\t\t\t};\n\t\t} }\n\t};\n}\nfunction assetPlugin(opts) {\n\tconst assetRegex = new RegExp(`\\\\.(?:${DEFAULT_ASSET_EXTS.join(\"|\")})$`);\n\treturn {\n\t\tname: \"vxrn:asset\",\n\t\tload: { async handler(id) {\n\t\t\tif (!assetRegex.test(id)) return;\n\t\t\tconst assetData = await getNativeAssetData(id, opts.root, opts.platform);\n\t\t\topts.onAsset?.(assetData);\n\t\t\tif (opts.assetsDest) copyNativeAssetFiles(assetData, opts.assetsDest, opts.platform);\n\t\t\treturn {\n\t\t\t\tcode: `module.exports = require('react-native/asset-registry').registerAsset(${JSON.stringify(assetData)});`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t} }\n\t};\n}\nfunction createNativeDevAssetRegistry() {\n\tconst assets = /* @__PURE__ */ new Map();\n\treturn {\n\t\tregister(asset) {\n\t\t\tfor (const [index, scale] of asset.scales.entries()) {\n\t\t\t\tconst filePath = asset.files[index];\n\t\t\t\tif (!filePath) continue;\n\t\t\t\tconst fileName = `${asset.name}${scale === 1 ? \"\" : `@${scale}x`}.${asset.type}`;\n\t\t\t\tassets.set(`${asset.httpServerLocation}/${fileName}`, {\n\t\t\t\t\tfilePath,\n\t\t\t\t\thash: asset.hash,\n\t\t\t\t\ttype: asset.type\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tresolve(pathname, hash) {\n\t\t\tconst asset = assets.get(pathname);\n\t\t\tif (!asset || hash !== void 0 && hash !== asset.hash) return;\n\t\t\treturn asset;\n\t\t}\n\t};\n}\nconst NATIVE_IMAGE_EXTS = /* @__PURE__ */ new Set([\n\t\"png\",\n\t\"jpg\",\n\t\"jpeg\",\n\t\"gif\",\n\t\"webp\",\n\t\"bmp\",\n\t\"psd\",\n\t\"svg\",\n\t\"tiff\",\n\t\"ktx\"\n]);\nfunction parseNativeAssetName(filePath) {\n\tconst type = extname(filePath).slice(1);\n\tif (!type) return;\n\tconst stem = basename(filePath, `.${type}`);\n\tconst platformMatch = stem.match(/^(.*)\\.(ios|android)$/);\n\tconst platform = platformMatch?.[2];\n\tconst scaleMatch = (platformMatch?.[1] ?? stem).match(/^(.+?)(?:@([\\d.]+)x)?$/);\n\tif (!scaleMatch) return;\n\tconst scale = scaleMatch[2] === void 0 ? 1 : Number.parseFloat(scaleMatch[2]);\n\tif (!Number.isFinite(scale) || scale <= 0) return;\n\treturn {\n\t\tname: scaleMatch[1],\n\t\tscale,\n\t\tplatform,\n\t\ttype\n\t};\n}\nfunction getNativeAssetUrlDirectory(root, assetDirectory) {\n\tconst safeDirectory = relative(realpathSync(root), realpathSync(assetDirectory)).replace(/\\\\/g, \"/\").split(\"/\").filter((segment) => segment && segment !== \".\").map((segment) => segment === \"..\" ? \"_\" : segment).join(\"/\");\n\treturn safeDirectory ? `/assets/${safeDirectory}` : \"/assets\";\n}\nasync function getNativeAssetData(id, root, platform) {\n\tconst requested = parseNativeAssetName(id);\n\tif (!requested) throw new Error(`[vxrn] invalid native asset path: ${id}`);\n\tconst assetDirectory = dirname(id);\n\tconst filesByScale = /* @__PURE__ */ new Map();\n\tfor (const fileName of readdirSync(assetDirectory)) {\n\t\tconst candidate = parseNativeAssetName(fileName);\n\t\tif (!candidate || candidate.name !== requested.name || candidate.type !== requested.type || candidate.platform !== void 0 && candidate.platform !== platform) continue;\n\t\tconst platformSpecific = candidate.platform === platform;\n\t\tconst existing = filesByScale.get(candidate.scale);\n\t\tif (!existing || platformSpecific && !existing.platformSpecific) filesByScale.set(candidate.scale, {\n\t\t\tfile: join(assetDirectory, fileName),\n\t\t\tplatformSpecific\n\t\t});\n\t}\n\tconst scales = [...filesByScale.keys()].sort((a, b) => a - b);\n\tconst files = scales.map((scale) => filesByScale.get(scale).file);\n\tif (files.length === 0) throw new Error(`[vxrn] native asset has no files for ${platform}: ${id}`);\n\tconst hash = createHash(\"md5\");\n\tfor (const file of files) hash.update(readFileSync(file));\n\tconst assetData = {\n\t\t__packager_asset: true,\n\t\tname: requested.name,\n\t\ttype: requested.type,\n\t\tscales,\n\t\tfiles,\n\t\thttpServerLocation: getNativeAssetUrlDirectory(root, assetDirectory),\n\t\tfileSystemLocation: assetDirectory,\n\t\thash: hash.digest(\"hex\")\n\t};\n\tif (NATIVE_IMAGE_EXTS.has(requested.type)) try {\n\t\tconst { imageSize } = await import(\"image-size\");\n\t\tconst dims = imageSize(files[0]);\n\t\tassetData.width = dims.width === void 0 ? void 0 : dims.width / scales[0];\n\t\tassetData.height = dims.height === void 0 ? void 0 : dims.height / scales[0];\n\t} catch {}\n\treturn assetData;\n}\nfunction getIOSAssetScales(scales) {\n\tconst supported = scales.filter((scale) => scale === 1 || scale === 2 || scale === 3);\n\tif (supported.length > 0 || scales.length === 0) return supported;\n\treturn [scales.find((scale) => scale > 3) ?? scales[scales.length - 1]];\n}\nfunction getAndroidAssetDirectory(type, scale) {\n\tif (!(/* @__PURE__ */ new Set([\n\t\t\"gif\",\n\t\t\"heic\",\n\t\t\"heif\",\n\t\t\"jpeg\",\n\t\t\"jpg\",\n\t\t\"ktx\",\n\t\t\"png\",\n\t\t\"webp\",\n\t\t\"xml\"\n\t])).has(type)) return \"raw\";\n\tconst density = (/* @__PURE__ */ new Map([\n\t\t[.75, \"ldpi\"],\n\t\t[1, \"mdpi\"],\n\t\t[1.5, \"hdpi\"],\n\t\t[2, \"xhdpi\"],\n\t\t[3, \"xxhdpi\"],\n\t\t[4, \"xxxhdpi\"]\n\t])).get(scale);\n\tif (density) return `drawable-${density}`;\n\treturn `drawable-${Math.round(scale * 160)}dpi`;\n}\nfunction getAndroidAssetName(asset) {\n\treturn `${asset.httpServerLocation}/${asset.name}`.toLowerCase().replace(/^\\//, \"\").replace(/\\//g, \"_\").replace(/([^a-z0-9_])/g, \"\").replace(/^assets_/, \"\");\n}\nfunction copyNativeAssetFiles(asset, assetsDest, platform) {\n\tconst validIOSScales = new Set(getIOSAssetScales(asset.scales));\n\tfor (const [index, scale] of asset.scales.entries()) {\n\t\tif (platform === \"ios\" && !validIOSScales.has(scale)) continue;\n\t\tconst destination = platform === \"android\" ? join(assetsDest, getAndroidAssetDirectory(asset.type, scale), `${getAndroidAssetName(asset)}.${asset.type}`) : join(assetsDest, asset.httpServerLocation.slice(1), `${asset.name}${scale === 1 ? \"\" : `@${scale}x`}.${asset.type}`);\n\t\tmkdirSync(dirname(destination), { recursive: true });\n\t\tcopyFileSync(asset.files[index], destination);\n\t}\n}\nfunction hermesCompatSWCPlugin(dev, sourceMaps = false) {\n\tlet oxc = null;\n\treturn {\n\t\tname: \"vxrn:hermes-compat\",\n\t\tasync transform(code, id) {\n\t\t\tif (!/\\.[cm]?[jt]sx?$/.test(id)) return;\n\t\t\tif (id.includes(\"\\0\") || id.includes(\"virtual:\")) return;\n\t\t\tconst hasClass = /\\bclass(?:\\s|\\{)/.test(code);\n\t\t\tconst hasAsync = code.includes(\"async\");\n\t\t\tconst hasBlockScopedBinding = /\\b(?:const|let)\\s/.test(code);\n\t\t\tif (!hasClass && !hasAsync && !hasBlockScopedBinding) return;\n\t\t\tlet output;\n\t\t\tif (code.length <= 5e5 || hasClass) {\n\t\t\t\tif (!oxc) oxc = await import(\"oxc-transform\");\n\t\t\t\tconst lang = /\\.[cm]?ts$/.test(id) ? \"ts\" : id.endsWith(\".tsx\") ? \"tsx\" : \"jsx\";\n\t\t\t\tconst result = oxc.transformSync(id, code, {\n\t\t\t\t\tlang,\n\t\t\t\t\ttarget: \"es2020\",\n\t\t\t\t\tassumptions: { setPublicClassFields: true },\n\t\t\t\t\tjsx: \"preserve\",\n\t\t\t\t\tsourcemap: sourceMaps,\n\t\t\t\t\tsourceType: id.endsWith(\".cjs\") ? \"script\" : \"module\"\n\t\t\t\t});\n\t\t\t\tif (result.errors?.length) {\n\t\t\t\t\tconst err = result.errors[0];\n\t\t\t\t\tthrow new Error(err.message + (err.codeframe ? `\n${err.codeframe}` : \"\"));\n\t\t\t\t}\n\t\t\t\toutput = {\n\t\t\t\t\tcode: result.code,\n\t\t\t\t\tmap: sourceMaps ? result.map : void 0\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (hasClass || hasBlockScopedBinding) {\n\t\t\t\tconst { transformHermesClasses } = await import(\"@vxrn/compiler\");\n\t\t\t\tconst classes = await transformHermesClasses(output?.code ?? code, id, sourceMaps);\n\t\t\t\tif (classes) {\n\t\t\t\t\tif (classes.map && output?.map) {\n\t\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\t\tclasses.map = remapping([classes.map, output.map], () => null);\n\t\t\t\t\t}\n\t\t\t\t\toutput = classes;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst lowered = await transformHermesAsync(output?.code ?? code, id, sourceMaps);\n\t\t\tif (!lowered) return output;\n\t\t\tif (lowered.map && output?.map) {\n\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\tlowered.map = remapping([lowered.map, output.map], () => null);\n\t\t\t}\n\t\t\treturn lowered;\n\t\t}\n\t};\n}\nconst hermesCompatPlugin = hermesCompatSWCPlugin;\nfunction hermesLoopsPlugin(sourceMaps = false) {\n\tlet compiler = null;\n\treturn {\n\t\tname: \"vxrn:hermes-loops\",\n\t\tasync transform(code, id) {\n\t\t\tif (!/\\.[cm]?[jt]sx?$/.test(id)) return;\n\t\t\tif (id.includes(\"\\0\") || id.includes(\"virtual:\")) return;\n\t\t\tif (!compiler) compiler = await import(\"@vxrn/compiler\");\n\t\t\tconst result = compiler.transformHermesLoops(code, id);\n\t\t\tif (!result) return;\n\t\t\tif (!sourceMaps) return {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t\tif (result.maps.length === 1) return {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: result.maps[0]\n\t\t\t};\n\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\treturn {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: remapping(result.maps.slice().reverse(), () => null)\n\t\t\t};\n\t\t}\n\t};\n}\nfunction getHmrRuntimeSource() {\n\treturn `\n// vxrn HMR runtime for rolldown devMode\nvar BaseDevRuntime = DevRuntime;\n\nclass ReactNativeDevRuntime extends BaseDevRuntime {\n constructor() {\n var clientId = 'rn-' + Date.now() + '-' + Math.random().toString(36).slice(2);\n super(clientId);\n this._socket = null;\n this.moduleHotContexts = {};\n this.lastSeq = 0;\n }\n\n createModuleHotContext(moduleId) {\n var runtime = this;\n var ctx = {\n acceptCallbacks: [],\n reactRefreshAcceptCallback: null,\n accept: function(deps, callback) {\n if (typeof deps === 'function' || !deps) {\n ctx.acceptCallbacks.push({\n deps: [moduleId],\n fn: function(modules) { if (typeof deps === 'function') deps(modules[0]); }\n });\n } else if (typeof deps === 'string') {\n ctx.acceptCallbacks.push({\n deps: [deps],\n fn: function(modules) { if (callback) callback(modules[0]); }\n });\n } else if (Array.isArray(deps)) {\n ctx.acceptCallbacks.push({ deps: deps, fn: callback || function() {} });\n }\n },\n acceptReactRefresh: function(callback) {\n ctx.reactRefreshAcceptCallback = callback;\n },\n invalidate: function() { runtime.requestReload('module invalidated: ' + moduleId); },\n on: function() {},\n off: function() {},\n send: function() {},\n get refresh() { return globalThis.__ReactRefresh; },\n get refreshUtils() {\n return {\n isReactRefreshBoundary: function(exports) {\n if (!globalThis.__ReactRefresh) return false;\n if (globalThis.__ReactRefresh.isLikelyComponentType(exports)) return true;\n if (!exports || typeof exports !== 'object') return false;\n var hasExports = false, allComponents = true;\n for (var key in exports) {\n hasExports = true;\n if (key === '__esModule') continue;\n if (!globalThis.__ReactRefresh.isLikelyComponentType(exports[key])) allComponents = false;\n }\n return hasExports && allComponents;\n },\n enqueueUpdate: function() {\n if (globalThis.__ReactRefresh) {\n setTimeout(function() { globalThis.__ReactRefresh.performReactRefresh(); }, 50);\n }\n }\n };\n }\n };\n this.moduleHotContexts[moduleId] = ctx;\n return ctx;\n }\n\n isSelfAccepted(moduleId) {\n var ctx = this.moduleHotContexts[moduleId];\n var explicitlyAccepted = !!(ctx && ctx.acceptCallbacks.some(function(callback) {\n return callback.deps.indexOf(moduleId) !== -1;\n }));\n if (explicitlyAccepted) return { accepted: true, reactRefresh: false };\n if (!ctx || !ctx.reactRefreshAcceptCallback || !globalThis.__ReactRefresh) {\n return { accepted: false, reactRefresh: false };\n }\n var exports = this.loadExports(moduleId);\n return {\n accepted: ctx.refreshUtils.isReactRefreshBoundary(exports),\n reactRefresh: true\n };\n }\n\n acceptsDependency(parentId, moduleId) {\n var ctx = this.moduleHotContexts[parentId];\n return !!(ctx && ctx.acceptCallbacks.some(function(callback) {\n return callback.deps.indexOf(moduleId) !== -1;\n }));\n }\n\n findBoundaries(moduleId, traversed, updateSet, boundaries) {\n if (traversed.has(moduleId)) return true;\n traversed.add(moduleId);\n updateSet.add(moduleId);\n\n var selfAcceptance = this.isSelfAccepted(moduleId);\n if (selfAcceptance.accepted) {\n boundaries.push({\n boundary: moduleId,\n acceptedVia: moduleId,\n reactRefresh: selfAcceptance.reactRefresh\n });\n return true;\n }\n\n var importers = this.getImporters(moduleId).filter(function(importer) {\n return this.isExecuted(importer);\n }, this);\n if (importers.length === 0) return false;\n\n for (var i = 0; i < importers.length; i++) {\n var importer = importers[i];\n if (this.acceptsDependency(importer, moduleId)) {\n boundaries.push({ boundary: importer, acceptedVia: moduleId });\n } else if (!this.findBoundaries(importer, traversed, updateSet, boundaries)) {\n return false;\n }\n }\n return true;\n }\n\n applyHmrUpdate(code, changedIds, seq) {\n if (seq !== this.lastSeq + 1) return false;\n this.lastSeq = seq;\n\n var traversed = new Set();\n var updateSet = new Set();\n var boundaries = [];\n for (var i = 0; i < changedIds.length; i++) {\n var changedId = changedIds[i];\n if (!this.isExecuted(changedId)) continue;\n if (!this.findBoundaries(changedId, traversed, updateSet, boundaries)) return false;\n }\n if (boundaries.length === 0) return true;\n\n var callbacks = boundaries.map(function(item) {\n var ctx = this.moduleHotContexts[item.boundary];\n var selectedCallbacks = ctx ? ctx.acceptCallbacks.filter(function(callback) {\n return callback.deps.indexOf(item.acceptedVia) !== -1;\n }) : [];\n if (item.reactRefresh && ctx && ctx.reactRefreshAcceptCallback) {\n selectedCallbacks.push({\n deps: [item.acceptedVia],\n fn: function() { ctx.reactRefreshAcceptCallback(); }\n });\n }\n return {\n boundary: item.boundary,\n acceptedVia: item.acceptedVia,\n callbacks: selectedCallbacks\n };\n }, this);\n\n if (globalThis.globalEvalWithSourceUrl) globalThis.globalEvalWithSourceUrl(code);\n else (0, eval)(code);\n\n var modulesToReplace = Array.from(updateSet);\n for (var j = 0; j < modulesToReplace.length; j++) {\n if (!this.hasFactory(modulesToReplace[j])) return false;\n }\n for (var k = 0; k < modulesToReplace.length; k++) {\n this.removeModuleCache(modulesToReplace[k]);\n }\n\n for (var m = 0; m < callbacks.length; m++) {\n var apply = callbacks[m];\n this.initModule(apply.acceptedVia);\n var freshExports = this.loadExports(apply.acceptedVia);\n for (var n = 0; n < apply.callbacks.length; n++) {\n apply.callbacks[n].fn([freshExports]);\n }\n }\n\n for (var p = 0; p < changedIds.length; p++) {\n try {\n if (globalThis.__VXRN_ON_MODULE_UPDATED__) {\n globalThis.__VXRN_ON_MODULE_UPDATED__(changedIds[p]);\n }\n } catch (error) {\n console.error('[vxrn HMR]: module update hook failed', error);\n }\n }\n return true;\n }\n\n requestReload(reason) {\n if (this._socket && this._socket.readyState === 1) {\n this._socket.send(JSON.stringify({ type: 'hmr:invalidate', reason: reason }));\n }\n }\n\n reload(reason) {\n var reloadNativeBundle = globalThis.__VXRN_RELOAD_NATIVE_DEV_BUNDLE__;\n if (typeof reloadNativeBundle === 'function') {\n reloadNativeBundle(reason);\n return;\n }\n console.error('[vxrn HMR]: DevSettings.reload is unavailable');\n }\n\n setup(socket) {\n if (this._socket) return;\n this._socket = socket;\n var runtime = this;\n // addEventListener rather than socket.onmessage: the bundle's WebSocket is\n // whatever the host platform provides, and a host that does not honor on*\n // property assignment would otherwise leave the app permanently without\n // Fast Refresh and say nothing.\n socket.addEventListener('message', function(event) {\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (error) {\n return;\n }\n try {\n if (message.type === 'hmr:update') {\n // a patch that cannot be applied in place is the reload signal\n if (!runtime.applyHmrUpdate(message.code, message.changedIds, message.seq)) {\n runtime.reload('native HMR update could not be applied');\n }\n } else if (message.type === 'hmr:reload') {\n runtime.reload('native route map changed');\n }\n } catch (error) {\n console.error('[vxrn HMR]: failed to apply update', error);\n }\n });\n socket.addEventListener('error', function(event) {\n console.warn('[vxrn HMR]: connection error', (event && event.message) || event);\n });\n }\n}\n\nglobalThis.__rolldown_runtime__ = new ReactNativeDevRuntime();\n`;\n}\n\nexport { buildNativeBundle, createNativeDevAssetRegistry, createNativeDevEngine, getHermesSWCIncludes, getHmrRuntimeSource, getNativeAssetData, getNativeTransformConfig, hermesCompatPlugin, hermesCompatSWCPlugin, hermesLoopsPlugin, hmrClientNoopPlugin, nativeAnimatedGuardPlugin, normalizeNativeCommonJSInterop, postProcessNativeBundle, vxrnCompilerPlugin, wrapNativeBundleModuleScope };"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,0BAA0B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA,MAAM,0BAA0B,CAAC,8BAA8B;AAC/D,SAAS,qBAAqB,KAAK;CAClC,OAAO,CAAC,GAAG,yBAAyB,GAAG,uBAAuB;AAC/D;AACA,SAAS,qBAAqB,UAAU;CACvC,MAAM,eAAe,aAAa,QAAQ;EACzC;EACA;EACA;EACA;CACD,IAAI;EACH;EACA;EACA;EACA;CACD;CACA,MAAM,aAAa;EAClB;EACA;EACA;EACA;CACD;CACA,MAAM,cAAc;EACnB;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACA,OAAO;EACN,GAAG;EACH,GAAG;EACH,GAAG;CACJ;AACD;AACA,SAAS,uB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/createNativeDevEngine.js"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { basename, dirname, extname, join, relative, resolve } from \"node:path\";\nimport { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, watch, writeFileSync } from \"node:fs\";\nimport { pathToFileURL } from \"node:url\";\nimport micromatch from \"micromatch\";\nimport { loadEnv, normalizePath } from \"vite\";\nimport { shouldStripFlow, transformHermesAsync } from \"@vxrn/compiler\";\nimport { resolvePath } from \"@vxrn/resolve\";\nimport { withExpoPublicEnvAliases } from \"@vxrn/utils/publicEnv\";\nimport { DEFAULT_ASSET_EXTS } from \"../constants/defaults\";\nimport { getNativePrelude } from \"../runtime/native-prelude\";\nimport { rnCodegenPlugin } from \"../plugins/rnCodegenPlugin\";\nimport { dedupe } from \"../config/getBaseViteConfigOnly\";\n\nconst HERMES_CLASS_TRANSFORMS = [\n\t\"transform-classes\",\n\t\"transform-parameters\",\n\t\"transform-block-scoping\",\n\t\"transform-class-properties\",\n\t\"transform-class-static-block\",\n\t\"transform-private-methods\",\n\t\"transform-private-property-in-object\"\n];\nconst HERMES_ASYNC_TRANSFORMS = [\"transform-async-to-generator\"];\nfunction getHermesSWCIncludes(dev) {\n\treturn [...HERMES_CLASS_TRANSFORMS, ...HERMES_ASYNC_TRANSFORMS];\n}\nfunction getResolveExtensions(platform) {\n\tconst platformExts = platform === \"ios\" ? [\n\t\t\".ios.tsx\",\n\t\t\".ios.ts\",\n\t\t\".ios.jsx\",\n\t\t\".ios.js\"\n\t] : [\n\t\t\".android.tsx\",\n\t\t\".android.ts\",\n\t\t\".android.jsx\",\n\t\t\".android.js\"\n\t];\n\tconst nativeExts = [\n\t\t\".native.tsx\",\n\t\t\".native.ts\",\n\t\t\".native.jsx\",\n\t\t\".native.js\"\n\t];\n\tconst defaultExts = [\n\t\t\".tsx\",\n\t\t\".ts\",\n\t\t\".jsx\",\n\t\t\".js\",\n\t\t\".mjs\",\n\t\t\".cjs\",\n\t\t\".json\"\n\t];\n\treturn [\n\t\t...platformExts,\n\t\t...nativeExts,\n\t\t...defaultExts\n\t];\n}\nfunction getNativeResolveConfig(platform) {\n\treturn {\n\t\textensions: getResolveExtensions(platform),\n\t\tconditionNames: [\"react-native\", \"browser\"],\n\t\tmainFields: [\n\t\t\t\"react-native\",\n\t\t\t\"browser\",\n\t\t\t\"main\",\n\t\t\t\"module\"\n\t\t],\n\t\taliasFields: [[\"react-native\"], [\"browser\"]]\n\t};\n}\nfunction getNativeTransformConfig(platform, dev, root) {\n\tconst entryConfig = globalThis.__vxrnNativeEntryConfig || {};\n\tconst setupFileDefines = (() => {\n\t\tconst sf = entryConfig.setupFile;\n\t\tif (!sf) return {};\n\t\tconst files = typeof sf === \"string\" ? {\n\t\t\tclient: sf,\n\t\t\tserver: sf,\n\t\t\tios: sf,\n\t\t\tandroid: sf\n\t\t} : \"native\" in sf ? {\n\t\t\tclient: sf.client,\n\t\t\tserver: sf.server,\n\t\t\tios: sf.native,\n\t\t\tandroid: sf.native\n\t\t} : sf;\n\t\treturn {\n\t\t\t...files.client && { \"process.env.ONE_SETUP_FILE_CLIENT\": JSON.stringify(files.client) },\n\t\t\t...files.server && { \"process.env.ONE_SETUP_FILE_SERVER\": JSON.stringify(files.server) },\n\t\t\t...files.ios && { \"process.env.ONE_SETUP_FILE_IOS\": JSON.stringify(files.ios) },\n\t\t\t...files.android && { \"process.env.ONE_SETUP_FILE_ANDROID\": JSON.stringify(files.android) }\n\t\t};\n\t})();\n\tconst userDefines = {};\n\tfor (const [key, value] of Object.entries(globalThis.__vxrnNativeUserDefine || {})) userDefines[key] = typeof value === \"string\" ? value : JSON.stringify(value);\n\tconst mode = dev ? \"development\" : \"production\";\n\tconst publicEnv = withExpoPublicEnvAliases(loadEnv(mode, root, [\n\t\t\"VITE_\",\n\t\t\"ONE_PUBLIC_\",\n\t\t\"EXPO_PUBLIC_\"\n\t]));\n\tconst envDefines = {};\n\tfor (const [key, value] of Object.entries(publicEnv)) {\n\t\tenvDefines[`import.meta.env.${key}`] = JSON.stringify(value);\n\t\tenvDefines[`process.env.${key}`] = JSON.stringify(value);\n\t}\n\tconst envObject = {\n\t\t...publicEnv,\n\t\tMODE: mode,\n\t\tDEV: dev,\n\t\tPROD: !dev,\n\t\tSSR: false,\n\t\tVITE_ENVIRONMENT: platform,\n\t\tVITE_NATIVE: \"1\",\n\t\tONE_PLATFORM: platform,\n\t\tEXPO_OS: platform,\n\t\tTAMAGUI_TARGET: \"native\",\n\t\tTAMAGUI_ENVIRONMENT: platform\n\t};\n\treturn {\n\t\tjsx: { runtime: \"classic\" },\n\t\tdefine: {\n\t\t\t...userDefines,\n\t\t\t...envDefines,\n\t\t\t\"process.env.NODE_ENV\": JSON.stringify(mode),\n\t\t\t\"process.env.VXRN_REACT_19\": \"false\",\n\t\t\t\"process.env.VITE_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t\"process.env.VITE_NATIVE\": \"\\\"1\\\"\",\n\t\t\t\"process.env.ONE_PLATFORM\": JSON.stringify(platform),\n\t\t\t\"process.env.EXPO_OS\": JSON.stringify(platform),\n\t\t\t\"process.env.TAMAGUI_TARGET\": \"\\\"native\\\"\",\n\t\t\t\"process.env.TAMAGUI_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t__DEV__: dev ? \"true\" : \"false\",\n\t\t\t\"import.meta.env\": JSON.stringify(envObject),\n\t\t\t\"import.meta.env.MODE\": JSON.stringify(mode),\n\t\t\t\"import.meta.env.DEV\": dev ? \"true\" : \"false\",\n\t\t\t\"import.meta.env.PROD\": dev ? \"false\" : \"true\",\n\t\t\t\"import.meta.env.SSR\": \"false\",\n\t\t\t\"import.meta.env.VITE_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t\"import.meta.env.VITE_NATIVE\": \"\\\"1\\\"\",\n\t\t\t\"import.meta.env.ONE_PLATFORM\": JSON.stringify(platform),\n\t\t\t\"import.meta.env.EXPO_OS\": JSON.stringify(platform),\n\t\t\t\"import.meta.env.TAMAGUI_TARGET\": \"\\\"native\\\"\",\n\t\t\t\"import.meta.env.TAMAGUI_ENVIRONMENT\": JSON.stringify(platform),\n\t\t\t...setupFileDefines\n\t\t},\n\t\tinject: { React: \"react\" }\n\t};\n}\nfunction getNativePlugins(root, platform, viteImportGlobPlugin, dev, assetsDest, onAsset, sourceMaps = false, userPlugins = []) {\n\tconst context = {\n\t\troot,\n\t\tplatform,\n\t\tdev\n\t};\n\treturn [\n\t\t...globalThis.__vxrnAddNativePlugins?.(platform) || [],\n\t\tserverFileExclusionPlugin(),\n\t\tenvironmentGuardPlugin(),\n\t\tmissingDynamicImportPlugin(),\n\t\thmrClientNoopPlugin(),\n\t\tnativeIdentityAliasPlugin(platform),\n\t\tnativeAssetRegistryPlugin(root),\n\t\treactNativeDedupePlugin(root),\n\t\tnativePackageDedupePlugin(root),\n\t\tcssStubPlugin(),\n\t\tviteImportGlobPlugin({ root }),\n\t\tvxrnCompilerPlugin(platform, dev, root, sourceMaps),\n\t\trnCodegenPlugin({ projectRoot: root }),\n\t\tflowStripPlugin(),\n\t\tnativeAnimatedGuardPlugin(),\n\t\tassetPlugin({\n\t\t\troot,\n\t\t\tplatform,\n\t\t\tassetsDest,\n\t\t\tonAsset\n\t\t}),\n\t\thermesCompatSWCPlugin(dev, sourceMaps),\n\t\thermesLoopsPlugin(sourceMaps),\n\t\t...userPlugins,\n\t\tnativeExportsPrecedencePlugin(root, platform),\n\t\tnativeDeclarationAliasPlugin(root, platform)\n\t].map((plugin) => plugin.api?.vxrnNative ? plugin.api.vxrnNative(context) : plugin);\n}\nfunction getNativeOutputOptions(prelude, sourcemap, minify) {\n\treturn {\n\t\tformat: \"esm\",\n\t\tsourcemap,\n\t\tsourcemapPathTransform: (relativeSourcePath, sourcemapPath) => normalizePath(resolve(dirname(sourcemapPath), relativeSourcePath)),\n\t\tintro: prelude,\n\t\tcodeSplitting: false,\n\t\tstrictExecutionOrder: true,\n\t\tminify: minify || \"dce-only\"\n\t};\n}\nfunction normalizeNativeCommonJSInterop(code) {\n\treturn code.replace(/(\\b__toESM(?:\\$\\d+)?\\(\\s*(?:require[\\w$]*\\(\\)|__rolldown_runtime__\\.loadExports\\(\"(?:\\\\.|[^\"\\\\])*\"\\))\\s*),\\s*1(\\s*\\))/g, \"$1$2\");\n}\nfunction blankPreservingLines(match) {\n\treturn \"\\n\".repeat(match.match(/\\n/g)?.length ?? 0);\n}\nfunction countLines(code) {\n\treturn (code.match(/\\n/g)?.length ?? 0) + 1;\n}\nfunction assertBundleLinesPreserved(before, after, stage) {\n\tconst beforeLines = countLines(before);\n\tconst afterLines = countLines(after);\n\tif (beforeLines !== afterLines) throw new Error(`[vxrn] native bundle post-processing (${stage}) changed the line count (${beforeLines} -> ${afterLines}), which invalidates the source map. Every pass after Rolldown emits the map must preserve lines.`);\n}\nfunction postProcessNativeBundle(code) {\n\tcode = normalizeNativeCommonJSInterop(code);\n\tcode = code.replace(/\\btypeof\\s+import\\.meta\\b/g, \"\\\"object\\\"\");\n\tcode = code.replace(/^[^\\S\\n]*export[^\\S\\n]*\\{[^}]*\\}[^\\S\\n]*;?[^\\S\\n]*$/gm, blankPreservingLines);\n\tcode = code.replace(/^([^\\S\\n]*)export[^\\S\\n]+default[^\\S\\n]+([^;\\n]+);?[^\\S\\n]*$/gm, \"$1$2;\");\n\tcode = code.replace(/^if \\(import\\.meta\\.hot\\).*$/gm, \"\");\n\t{\n\t\tconst idx = code.indexOf(\"NativeAnimatedModule_default ?? NativeAnimatedTurboModule_default;\");\n\t\tif (idx !== -1) {\n\t\t\tconst beforeMarker = code.lastIndexOf(\"NativeAnimatedModule = \", idx);\n\t\t\tif (beforeMarker !== -1) {\n\t\t\t\tconst lineStart = code.lastIndexOf(\"\\n\", beforeMarker);\n\t\t\t\tconst snippet = code.slice(lineStart + 1, beforeMarker + 50);\n\t\t\t\tif (snippet.includes(\"(function()\") || snippet.includes(\"new Proxy\")) {\n\t\t\t\t\tconst afterMarker = code.indexOf(\"})();\", idx);\n\t\t\t\t\tif (afterMarker !== -1) {\n\t\t\t\t\t\tconst end = afterMarker + 5;\n\t\t\t\t\t\tconst removed = code.slice(beforeMarker, end);\n\t\t\t\t\t\tcode = code.slice(0, beforeMarker) + \"NativeAnimatedModule = NativeAnimatedModule_default ?? NativeAnimatedTurboModule_default;\" + blankPreservingLines(removed) + code.slice(end);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn code;\n}\nfunction wrapNativeBundleModuleScope(code) {\n\tconst idx = code.indexOf(\"//#region \\\\0rolldown/runtime.js\");\n\tif (idx === -1) return code;\n\treturn code.slice(0, idx) + \";(function() {\" + code.slice(idx) + \"\\n})();\\n\";\n}\nasync function downlevelClassFieldsInBundle(code) {\n\tconst startMarker = \"//#region \\\\0rolldown/runtime.js\";\n\tconst endMarker = \"//#endregion\";\n\tconst startIdx = code.indexOf(startMarker);\n\tif (startIdx === -1) return code;\n\tconst endIdx = code.indexOf(endMarker, startIdx);\n\tif (endIdx === -1) return code;\n\tconst runtimeEnd = endIdx + 12;\n\tconst runtimeSection = code.slice(startIdx, runtimeEnd);\n\tconst originalNewlines = runtimeSection.match(/\\n/g)?.length ?? 0;\n\tconst { transformSync } = await import(\"oxc-transform\");\n\tconst result = transformSync(\"rolldown-runtime.js\", runtimeSection, {\n\t\ttarget: \"es2020\",\n\t\tassumptions: { setPublicClassFields: true }\n\t});\n\tif (result.errors?.length) throw new Error(result.errors.map((e) => e.message).join(\"\\n\"));\n\tconst transformedCode = result.code.trimEnd();\n\tconst transformed = transformedCode.includes(startMarker) ? transformedCode : `${startMarker}\n${transformedCode}`;\n\tconst transformedNewlines = transformed.match(/\\n/g)?.length ?? 0;\n\tif (transformedNewlines > originalNewlines) throw new Error(\"[vxrn] Hermes runtime transform added lines and would invalidate the production source map\");\n\tconst linePreservingRuntime = transformed + \"\\n\".repeat(originalNewlines - transformedNewlines);\n\treturn code.slice(0, startIdx) + linePreservingRuntime + code.slice(runtimeEnd);\n}\nfunction nativeBundlePostProcessPlugin() {\n\treturn {\n\t\tname: \"vxrn:native-post-process\",\n\t\tasync renderChunk(code) {\n\t\t\tconst processed = await downlevelClassFieldsInBundle(postProcessNativeBundle(code));\n\t\t\tassertBundleLinesPreserved(code, processed, \"production\");\n\t\t\treturn {\n\t\t\t\tcode: processed,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t}\n\t};\n}\nasync function createNativeDevEngine(options) {\n\tconst { root, port, host = \"localhost\", platform, serverUrl, plugins: userPlugins = [], onHmrUpdate } = options;\n\tconst { dev, viteImportGlobPlugin } = await import(\"rolldown/experimental\");\n\tconst hmrRuntimeSource = getHmrRuntimeSource();\n\tconst prelude = getNativePrelude({\n\t\tdev: true,\n\t\tplatform,\n\t\tserverUrl: serverUrl || `http://${host}:${port}`\n\t});\n\tconst assetRegistry = createNativeDevAssetRegistry();\n\tlet currentBundle = null;\n\tlet firstBuildError = null;\n\tlet bundleResolve = null;\n\tlet bundleReject = null;\n\tlet bundlePromise = null;\n\tconst virtualEntry = nativeVirtualEntryPlugin(root, {\n\t\tdev: true,\n\t\tplatform,\n\t\tdynamicRoutes: true\n\t});\n\tlet engineWork = Promise.resolve();\n\tconst queueEngineWork = (work) => {\n\t\tconst result = engineWork.then(work, work);\n\t\tengineWork = result.catch(() => {});\n\t\treturn result;\n\t};\n\tconst inputOptions = {\n\t\tinput: VIRTUAL_NATIVE_ENTRY,\n\t\tcwd: root,\n\t\tplatform: \"neutral\",\n\t\tresolve: getNativeResolveConfig(platform),\n\t\ttransform: getNativeTransformConfig(platform, true, root),\n\t\texperimental: {\n\t\t\tdevMode: {\n\t\t\t\timplement: hmrRuntimeSource,\n\t\t\t\thost,\n\t\t\t\tport\n\t\t\t},\n\t\t\tincrementalBuild: true,\n\t\t\tlazyBarrel: true\n\t\t},\n\t\ttreeshake: false,\n\t\tshimMissingExports: true,\n\t\tmoduleTypes: { \".js\": \"jsx\" },\n\t\tplugins: [virtualEntry.plugin, ...getNativePlugins(root, platform, viteImportGlobPlugin, true, void 0, assetRegistry.register, true, userPlugins)]\n\t};\n\tconst outputOptions = {\n\t\t...getNativeOutputOptions(prelude, true, false),\n\t\toutro: `\ntry {\n var __WS = (init_WebSocket(), __toCommonJS(WebSocket_exports)).default;\n var __devServer = (init_getDevServer(), __toCommonJS(getDevServer_exports)).default();\n var __hmrUrl = __devServer.url.replace(/^http/, 'ws') + 'hot?platform=${platform}&clientId=' + encodeURIComponent(__rolldown_runtime__.clientId);\n __rolldown_runtime__.setup(new __WS(__hmrUrl));\n} catch(e) {\n // a swallowed failure here leaves the app permanently without Fast Refresh and\n // nothing on screen or in the terminal says so.\n console.error('[vxrn] HMR client failed to start:', (e && e.message) || e);\n}\n`\n\t};\n\tlet outputProcessed = Promise.resolve();\n\tlet engine;\n\tlet routeWatcher;\n\tconst rebuildIfRouteGraphChanged = () => queueEngineWork(async () => {\n\t\tconst { files: knownRoutes, scanFiles, updateFiles } = virtualEntry.routes;\n\t\tconst currentRoutes = scanFiles();\n\t\tif (!(currentRoutes.size !== knownRoutes.size || [...currentRoutes].some((route) => !knownRoutes.has(route)))) return false;\n\t\tupdateFiles(currentRoutes);\n\t\treturn true;\n\t});\n\tengine = await dev(inputOptions, outputOptions, {\n\t\tonOutput: async (result) => {\n\t\t\tlet finishOutput = () => {};\n\t\t\toutputProcessed = new Promise((resolve2) => {\n\t\t\t\tfinishOutput = resolve2;\n\t\t\t});\n\t\t\ttry {\n\t\t\t\tawait handleOutput(result);\n\t\t\t} finally {\n\t\t\t\tfinishOutput();\n\t\t\t}\n\t\t},\n\t\tonHmrUpdates: async (result) => {\n\t\t\tawait engine?.ensureCurrentBuildFinish();\n\t\t\tif (result instanceof Error) {\n\t\t\t\tconsole.error(\"[vxrn] HMR error:\", result.message);\n\t\t\t\tonHmrUpdate?.({ type: \"hmr:error\" });\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (await rebuildIfRouteGraphChanged()) return;\n\t\t\tfor (const { clientId, update } of result.updates) if (update.type === \"Patch\" && update.code) {\n\t\t\t\tawait engine.notifyPayloadDelivered(update.filename);\n\t\t\t\tonHmrUpdate?.({\n\t\t\t\t\ttype: \"hmr:update\",\n\t\t\t\t\tclientId,\n\t\t\t\t\tcode: normalizeNativeCommonJSInterop(update.code),\n\t\t\t\t\tchangedIds: update.changedIds,\n\t\t\t\t\tseq: update.seq\n\t\t\t\t});\n\t\t\t} else if (update.type === \"FullReload\") onHmrUpdate?.({\n\t\t\t\ttype: \"hmr:reload\",\n\t\t\t\tclientId\n\t\t\t});\n\t\t},\n\t\trebuildStrategy: \"never\",\n\t\twatch: { exclude: [\"**/node_modules/.test/**\", \"**/.git/**\"] }\n\t});\n\tasync function handleOutput(result) {\n\t\tif (result instanceof Error) {\n\t\t\tconsole.error(\"[vxrn] native bundle error:\", result.message);\n\t\t\tif (/panic/i.test(result.message)) console.error(\"[vxrn] rolldown itself panicked. Fast Refresh will full-reload until you restart the dev server.\");\n\t\t\tif (!currentBundle) {\n\t\t\t\tfirstBuildError ||= result;\n\t\t\t\tif (bundleReject) {\n\t\t\t\t\tconst reject = bundleReject;\n\t\t\t\t\tbundleResolve = null;\n\t\t\t\t\tbundleReject = null;\n\t\t\t\t\tbundlePromise = null;\n\t\t\t\t\treject(firstBuildError);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst chunk = result.output.find((o) => o.type === \"chunk\" && o.isEntry);\n\t\tif (chunk && \"code\" in chunk) {\n\t\t\tfirstBuildError = null;\n\t\t\tlet code = postProcessNativeBundle(chunk.code);\n\t\t\tcode = await downlevelClassFieldsInBundle(code);\n\t\t\tassertBundleLinesPreserved(chunk.code, code, \"dev\");\n\t\t\tcode = wrapNativeBundleModuleScope(code);\n\t\t\tif (!chunk.map) throw new Error(\"[vxrn] rolldown produced no source map for the dev bundle, so /symbolicate cannot resolve a frame\");\n\t\t\tcurrentBundle = {\n\t\t\t\tcode,\n\t\t\t\tmap: chunk.map.toString()\n\t\t\t};\n\t\t\tconsole.info(`[vxrn] native bundle ready (${Math.round(code.length / 1024)}KB)`);\n\t\t\tif (bundleResolve) {\n\t\t\t\tbundleResolve(currentBundle);\n\t\t\t\tbundleResolve = null;\n\t\t\t\tbundleReject = null;\n\t\t\t\tbundlePromise = null;\n\t\t\t}\n\t\t}\n\t}\n\tawait engine.run();\n\tlet routeWatchTarget = virtualEntry.routes.routeRoot;\n\twhile (!statSync(routeWatchTarget, { throwIfNoEntry: false })?.isDirectory()) {\n\t\tconst parent = dirname(routeWatchTarget);\n\t\tif (parent === routeWatchTarget) break;\n\t\trouteWatchTarget = parent;\n\t}\n\tconst normalizedRouteRoot = normalizePath(virtualEntry.routes.routeRoot);\n\trouteWatcher = watch(routeWatchTarget, { recursive: true }, (_eventType, file) => {\n\t\tif (file === null) return;\n\t\tconst changed = normalizePath(resolve(routeWatchTarget, file.toString()));\n\t\tif (changed !== normalizedRouteRoot && !changed.startsWith(`${normalizedRouteRoot}/`)) return;\n\t\trebuildIfRouteGraphChanged().catch((error) => {\n\t\t\tconsole.error(`[vxrn] rebuilding the native route map failed`, error);\n\t\t});\n\t});\n\trouteWatcher.on(\"error\", (error) => {\n\t\tconsole.error(`[vxrn] watching the native route map failed`, error);\n\t});\n\tawait rebuildIfRouteGraphChanged();\n\tconst getBundle = async () => {\n\t\tawait queueEngineWork(async () => {\n\t\t\tawait engine.ensureLatestBuildOutput();\n\t\t\tawait outputProcessed;\n\t\t});\n\t\tif (currentBundle) return currentBundle;\n\t\tif (firstBuildError) throw firstBuildError;\n\t\tif (!bundlePromise) {\n\t\t\tlet timeoutId;\n\t\t\tbundlePromise = new Promise((resolve2, reject) => {\n\t\t\t\tbundleResolve = (value) => {\n\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\tresolve2(value);\n\t\t\t\t};\n\t\t\t\tbundleReject = (error) => {\n\t\t\t\t\tclearTimeout(timeoutId);\n\t\t\t\t\treject(error);\n\t\t\t\t};\n\t\t\t\ttimeoutId = setTimeout(() => {\n\t\t\t\t\tbundleResolve = null;\n\t\t\t\t\tbundleReject = null;\n\t\t\t\t\tbundlePromise = null;\n\t\t\t\t\treject(/* @__PURE__ */ new Error(\"[vxrn] bundle build timed out after 120s\"));\n\t\t\t\t}, 12e4);\n\t\t\t});\n\t\t}\n\t\treturn bundlePromise;\n\t};\n\treturn {\n\t\tengine,\n\t\tgetBundle,\n\t\tasync getSourceMap() {\n\t\t\tawait outputProcessed;\n\t\t\tif (currentBundle) return currentBundle.map;\n\t\t\treturn (await getBundle()).map;\n\t\t},\n\t\tgetAsset(pathname, hash) {\n\t\t\treturn assetRegistry.resolve(pathname, hash);\n\t\t},\n\t\tasync close() {\n\t\t\trouteWatcher?.close();\n\t\t\tawait engine.close();\n\t\t}\n\t};\n}\nasync function buildNativeBundle(options) {\n\tconst { root, platform, dev = false, serverUrl, entryFile, assetsDest, plugins: userPlugins = [], sourcemap = false, minify = !dev } = options;\n\tconst { build } = await import(\"rolldown\");\n\tconst { viteImportGlobPlugin } = await import(\"rolldown/experimental\");\n\tconst prelude = getNativePrelude({\n\t\tdev,\n\t\tplatform,\n\t\tserverUrl\n\t});\n\tconst chunk = (await build({\n\t\tinput: entryFile ? normalizePath(resolve(root, entryFile)) : VIRTUAL_NATIVE_ENTRY,\n\t\tcwd: root,\n\t\tplatform: \"neutral\",\n\t\tresolve: getNativeResolveConfig(platform),\n\t\ttransform: getNativeTransformConfig(platform, dev, root),\n\t\ttreeshake: !dev,\n\t\texperimental: { lazyBarrel: false },\n\t\tshimMissingExports: true,\n\t\tmoduleTypes: { \".js\": \"jsx\" },\n\t\tplugins: [\n\t\t\t...entryFile ? [] : [nativeVirtualEntryPlugin(root, {\n\t\t\t\tdev,\n\t\t\t\tplatform\n\t\t\t}).plugin],\n\t\t\t...getNativePlugins(root, platform, viteImportGlobPlugin, dev, assetsDest, void 0, sourcemap, userPlugins),\n\t\t\tnativeBundlePostProcessPlugin()\n\t\t],\n\t\toutput: {\n\t\t\t...getNativeOutputOptions(prelude, sourcemap, minify),\n\t\t\tformat: \"iife\"\n\t\t}\n\t})).output.find((o) => o.type === \"chunk\" && o.isEntry);\n\tif (!chunk || !(\"code\" in chunk)) throw new Error(\"[vxrn] production build produced no output\");\n\tif (sourcemap && !chunk.map) throw new Error(\"[vxrn] a source map was requested but rolldown produced none for the production bundle\");\n\treturn {\n\t\tcode: chunk.code,\n\t\tmap: sourcemap ? chunk.map?.toString() : void 0\n\t};\n}\nconst VIRTUAL_NATIVE_ENTRY = \"virtual:native-entry\";\nfunction nativeVirtualEntryPlugin(root, opts) {\n\tconst isDev = opts?.dev !== false;\n\tconst useDynamicRouteRegistry = opts.dynamicRoutes === true;\n\tconst resolvedId = normalizePath(resolve(root, \"__virtual-native-entry.tsx\"));\n\tconst entryConfig = globalThis.__vxrnNativeEntryConfig || {};\n\tconst routerRoot = entryConfig.routerRoot || \"app\";\n\tconst flags = entryConfig.flags || {};\n\tconst linking = entryConfig.linking;\n\tconst setupFileImport = (() => {\n\t\tconst sf = entryConfig.setupFile;\n\t\tif (!sf) return \"\";\n\t\tconst file = typeof sf === \"string\" ? sf : \"native\" in sf ? sf.native : sf.ios;\n\t\tif (!file) return \"\";\n\t\tconst resolved = pathToFileURL(resolve(root, file)).href;\n\t\treturn `import ${JSON.stringify(resolved)};`;\n\t})();\n\tconst routeGlobs = [\n\t\t`./${routerRoot}/**/*.tsx`,\n\t\t`./${routerRoot}/**/*.ts`,\n\t\t`!./${routerRoot}/**/*+api.*`,\n\t\t`!./${routerRoot}/**/*.test.*`,\n\t\t`!./${routerRoot}/**/*.d.ts`,\n\t\t`!./${routerRoot}/**/*.server.*`,\n\t\t`!./${routerRoot}/**/_middleware.*`,\n\t\t`!./${routerRoot}/**/*.web.*`,\n\t\t...(entryConfig.ignoredRouteFiles || []).map((pattern) => `!./${routerRoot}/${pattern}`)\n\t];\n\tconst refreshSetup = isDev ? `\n// react-refresh/runtime MUST initialize before React loads\nimport RefreshRuntime from 'react-refresh/runtime';\nRefreshRuntime.injectIntoGlobalHook(globalThis);\nglobalThis.__ReactRefresh = RefreshRuntime;\nglobalThis.$RefreshReg$ = function(type, id) {\n RefreshRuntime.register(type, id);\n};\nglobalThis.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;\n` : \"\";\n\tconst entryCode = () => `\n${refreshSetup}\nimport * as ReactNativeInitializeCore from 'react-native/Libraries/Core/InitializeCore';\nimport NativeWebSocket from 'react-native/Libraries/WebSocket/WebSocket';\nimport DevSettings from 'react-native/Libraries/Utilities/DevSettings';\n${setupFileImport}\n${routeImports}\nimport { createApp } from 'one';\n\nvoid ReactNativeInitializeCore;\nglobalThis.WebSocket = NativeWebSocket;\nglobalThis.__VXRN_RELOAD_NATIVE_DEV_BUNDLE__ = function(reason) {\n DevSettings.reload(reason);\n};\n\n// React Native reloads a dev bundle in the existing JS runtime. Advance One's\n// route-cache version so a full reload cannot reuse the previous context.\nglobalThis.__vxrnVersion = (globalThis.__vxrnVersion || 0) + 1;\n\ncreateApp({\n routes: routes,\n routerRoot: ${JSON.stringify(routerRoot)},\n flags: ${JSON.stringify(flags)},\n linking: ${JSON.stringify(linking)},\n});\n\n${routeHmr}\n`;\n\tconst routeRoot = resolve(root, routerRoot);\n\tconst stripDot = (pattern) => pattern.replace(/^\\.\\//, \"\");\n\tconst includeGlobs = routeGlobs.filter((p) => !p.startsWith(\"!\")).map(stripDot);\n\tconst excludeGlobs = routeGlobs.filter((p) => p.startsWith(\"!\")).map((p) => stripDot(p.slice(1)));\n\tconst isRouteFile = (file) => {\n\t\tconst relativeToRoot = normalizePath(relative(root, file));\n\t\treturn micromatch.isMatch(relativeToRoot, includeGlobs) && !micromatch.isMatch(relativeToRoot, excludeGlobs);\n\t};\n\tconst scanFiles = () => {\n\t\tconst files = /* @__PURE__ */ new Set();\n\t\tconst walkRouteRoot = (dir) => {\n\t\t\tfor (const entry of readdirSync(dir, { withFileTypes: true })) {\n\t\t\t\tconst child = resolve(dir, entry.name);\n\t\t\t\tif (entry.isDirectory()) walkRouteRoot(child);\n\t\t\t\telse if (isRouteFile(child)) files.add(normalizePath(child));\n\t\t\t}\n\t\t};\n\t\tif (statSync(routeRoot, { throwIfNoEntry: false })?.isDirectory()) walkRouteRoot(routeRoot);\n\t\treturn files;\n\t};\n\tconst registrySpecifier = `./node_modules/.vxrn/native-routes-${opts.platform}.mjs`;\n\tconst registryPath = resolve(root, registrySpecifier);\n\tconst routes = {\n\t\trouteRoot,\n\t\tfiles: /* @__PURE__ */ new Set(),\n\t\tisRouteFile,\n\t\tscanFiles,\n\t\tupdateFiles(files) {\n\t\t\troutes.files = files;\n\t\t\tif (!useDynamicRouteRegistry) return;\n\t\t\tmkdirSync(dirname(registryPath), { recursive: true });\n\t\t\tconst registryDir = realpathSync(dirname(registryPath));\n\t\t\tconst source = `export const routes = {\n${[...files].sort().map((file) => {\n\t\t\t\tconst routeKey = `/${normalizePath(relative(root, file))}`;\n\t\t\t\tlet importPath = normalizePath(relative(registryDir, file));\n\t\t\t\tif (!importPath.startsWith(\".\")) importPath = `./${importPath}`;\n\t\t\t\treturn ` ${JSON.stringify(routeKey)}: () => import(${JSON.stringify(importPath)})`;\n\t\t\t}).join(\",\\n\")}\n}\n`;\n\t\t\tif (!existsSync(registryPath) || readFileSync(registryPath, \"utf8\") !== source) writeFileSync(registryPath, source);\n\t\t}\n\t};\n\troutes.updateFiles(routes.scanFiles());\n\tconst routeImports = useDynamicRouteRegistry ? `import { routes } from ${JSON.stringify(registrySpecifier)};` : `var _routes = import.meta.glob(${JSON.stringify(routeGlobs)}, { exhaustive: true });\n// fix route keys: One expects '/${routerRoot}/...' prefix but import.meta.glob returns './${routerRoot}/...'\nvar routes = {};\nObject.keys(_routes).forEach(function(key) {\n var normalizedKey = key.replace(/^\\\\.\\\\//, '');\n routes['/' + normalizedKey] = _routes[key];\n});`;\n\tconst routeHmr = useDynamicRouteRegistry ? `if (import.meta.hot) {\n import.meta.hot.accept(${JSON.stringify(registrySpecifier)}, function(next) {\n if (globalThis.__VXRN_UPDATE_NATIVE_ROUTES__) {\n globalThis.__VXRN_UPDATE_NATIVE_ROUTES__(next.routes);\n }\n });\n}` : \"\";\n\treturn {\n\t\troutes,\n\t\tplugin: {\n\t\t\tname: \"vxrn:native-virtual-entry\",\n\t\t\tresolveId(id) {\n\t\t\t\tif (id === VIRTUAL_NATIVE_ENTRY) return resolvedId;\n\t\t\t},\n\t\t\tload(id) {\n\t\t\t\tif (id !== resolvedId) return;\n\t\t\t\treturn entryCode();\n\t\t\t}\n\t\t}\n\t};\n}\nfunction nativeAnimatedGuardPlugin() {\n\treturn {\n\t\tname: \"vxrn:native-animated-guard\",\n\t\ttransform(code, id) {\n\t\t\tif (!id.includes(\"animated/NativeAnimatedHelper\")) return;\n\t\t\tconst target = \"const method = nullthrows(NativeAnimatedModule)[methodName];\";\n\t\t\tif (!code.includes(target)) return;\n\t\t\treturn {\n\t\t\t\tcode: code.replace(target, `${target} if (typeof method !== 'function') return;`),\n\t\t\t\tmap: {\n\t\t\t\t\tversion: 3,\n\t\t\t\t\tsources: [id],\n\t\t\t\t\tsourcesContent: [code],\n\t\t\t\t\tnames: [],\n\t\t\t\t\tmappings: code.split(\"\\n\").map((_, index) => index === 0 ? \"AAAA\" : \"AACA\").join(\";\")\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n}\nfunction serverFileExclusionPlugin() {\n\treturn {\n\t\tname: \"vxrn:server-file-exclusion\",\n\t\tload(id) {\n\t\t\tif (/\\.server\\.\\w+$/.test(id)) return {\n\t\t\t\tcode: \"export default undefined;\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t\tif (/[\\\\/]_middleware\\.\\w+$/.test(id)) return {\n\t\t\t\tcode: \"export default undefined;\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction missingDynamicImportPlugin() {\n\tconst PREFIX = \"\\0vxrn-missing-module:\";\n\treturn {\n\t\tname: \"vxrn:missing-dynamic-import\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tif (options.kind !== \"dynamic-import\") return;\n\t\t\tif (source.startsWith(\".\") || source.startsWith(\"/\") || source.includes(\":\")) return;\n\t\t\tif (source.startsWith(\"\\0\")) return;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t\tif (resolved) return resolved;\n\t\t\treturn {\n\t\t\t\tid: `${PREFIX}${source}`,\n\t\t\t\texternal: false\n\t\t\t};\n\t\t},\n\t\tload(id) {\n\t\t\tif (!id.startsWith(PREFIX)) return;\n\t\t\treturn {\n\t\t\t\tcode: `throw new Error(${JSON.stringify(`Cannot find module '${id.slice(21)}'`)});`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction environmentGuardPlugin() {\n\tconst THROWING = [\n\t\t\"server-only\",\n\t\t\"client-only\",\n\t\t\"web-only\"\n\t];\n\tconst NOOP = [\"native-only\"];\n\treturn {\n\t\tname: \"vxrn:environment-guard\",\n\t\tresolveId(source) {\n\t\t\tif (THROWING.includes(source)) return {\n\t\t\t\tid: `\\0env-guard-throw:${source}`,\n\t\t\t\texternal: false\n\t\t\t};\n\t\t\tif (NOOP.includes(source)) return {\n\t\t\t\tid: `\\0env-guard-noop:${source}`,\n\t\t\t\texternal: false\n\t\t\t};\n\t\t},\n\t\tload(id) {\n\t\t\tif (id.startsWith(\"\\0env-guard-throw:\")) return {\n\t\t\t\tcode: `throw new Error(\"Cannot import '${id.slice(17)}' in a native bundle.\");`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t\tif (id.startsWith(\"\\0env-guard-noop:\")) return {\n\t\t\t\tcode: \"\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction hmrClientNoopPlugin() {\n\tconst RN_HMR_CLIENT_RE = /(^|[\\\\/])Utilities[\\\\/]HMRClient(\\.[cm]?[jt]sx?)?$/;\n\treturn {\n\t\tname: \"vxrn:hmr-client-noop\",\n\t\tresolveId(source, importer) {\n\t\t\tif ((source.startsWith(\"react-native/\") || importer != null && /(^|[\\\\/])react-native[\\\\/]/.test(importer)) && RN_HMR_CLIENT_RE.test(source)) return {\n\t\t\t\tid: \"\\0vxrn-hmr-client-noop\",\n\t\t\t\texternal: false\n\t\t\t};\n\t\t},\n\t\tload(id) {\n\t\t\tif (id === \"\\0vxrn-hmr-client-noop\") return {\n\t\t\t\tcode: `const HMRClient = { setup() {}, enable() {}, disable() {}, registerBundle() {}, log() {}, isEnabled() { return false } }\nexport default HMRClient`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t}\n\t};\n}\nfunction nativeIdentityAliasPlugin(platform) {\n\tconst packages = /* @__PURE__ */ new Map();\n\tlet resolver;\n\tconst findPackage = (directory) => {\n\t\tif (packages.has(directory)) return packages.get(directory);\n\t\tlet result = null;\n\t\tconst manifest = join(directory, \"package.json\");\n\t\tif (existsSync(manifest)) try {\n\t\t\tconst field = JSON.parse(readFileSync(manifest, \"utf8\"))[\"react-native\"];\n\t\t\tresult = {\n\t\t\t\troot: directory,\n\t\t\t\taliases: field && typeof field === \"object\" ? field : {}\n\t\t\t};\n\t\t} catch {}\n\t\telse {\n\t\t\tconst parent = dirname(directory);\n\t\t\tif (parent !== directory) result = findPackage(parent);\n\t\t}\n\t\tpackages.set(directory, result);\n\t\treturn result;\n\t};\n\treturn {\n\t\tname: \"vxrn:native-identity-alias\",\n\t\tasync resolveId(source, importer) {\n\t\t\tif (!importer || !source.startsWith(\".\")) return;\n\t\t\tconst pkg = findPackage(dirname(importer));\n\t\t\tif (!pkg) return;\n\t\t\tconst key = `./${normalizePath(relative(pkg.root, resolve(dirname(importer), source)))}`;\n\t\t\tif (pkg.aliases[key] !== key) return;\n\t\t\tif (!resolver) {\n\t\t\t\tconst { ResolverFactory } = await import(\"rolldown/experimental\");\n\t\t\t\tresolver = new ResolverFactory({\n\t\t\t\t\t...getNativeResolveConfig(platform),\n\t\t\t\t\taliasFields: []\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst result = resolver.sync(dirname(importer), source);\n\t\t\tif (result.path) return result.path;\n\t\t}\n\t};\n}\nfunction nativeExportsPrecedencePlugin(root, platform) {\n\tconst manifests = /* @__PURE__ */ new Map();\n\tconst readManifest = (directory) => {\n\t\tif (!manifests.has(directory)) {\n\t\t\tlet manifest = null;\n\t\t\ttry {\n\t\t\t\tmanifest = JSON.parse(readFileSync(join(directory, \"package.json\"), \"utf8\"));\n\t\t\t} catch {}\n\t\t\tmanifests.set(directory, manifest);\n\t\t}\n\t\treturn manifests.get(directory);\n\t};\n\tconst resolvers = /* @__PURE__ */ new Map();\n\treturn {\n\t\tname: \"vxrn:native-exports-precedence\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tif (source.startsWith(\".\") || source.startsWith(\"/\") || source.includes(\":\")) return;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t\tif (!resolved || resolved.external || resolved.id.startsWith(\"\\0\")) return resolved;\n\t\t\tconst name = source.split(\"/\").slice(0, source.startsWith(\"@\") ? 2 : 1).join(\"/\");\n\t\t\tlet directory = dirname(resolved.id);\n\t\t\twhile (readManifest(directory)?.name !== name) {\n\t\t\t\tif (dirname(directory) === directory) return resolved;\n\t\t\t\tdirectory = dirname(directory);\n\t\t\t}\n\t\t\tconst exportsMap = JSON.stringify(readManifest(directory)?.exports ?? null);\n\t\t\tif (!exportsMap.includes(\"\\\"react-native\\\"\") || !exportsMap.includes(\"\\\"browser\\\"\")) return resolved;\n\t\t\tconst kind = options.kind === \"require-call\" ? \"require\" : \"import\";\n\t\t\tlet resolver = resolvers.get(kind);\n\t\t\tif (!resolver) {\n\t\t\t\tconst { ResolverFactory } = await import(\"rolldown/experimental\");\n\t\t\t\tresolver = new ResolverFactory({\n\t\t\t\t\t...getNativeResolveConfig(platform),\n\t\t\t\t\tconditionNames: [\n\t\t\t\t\t\t\"react-native\",\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\"default\"\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t\tresolvers.set(kind, resolver);\n\t\t\t}\n\t\t\tconst native = resolver.sync(importer ? dirname(importer) : root, source);\n\t\t\tif (!native.path || native.path === resolved.id) return resolved;\n\t\t\treturn this.resolve(native.path, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t}\n\t};\n}\nfunction nativeDeclarationAliasPlugin(root, platform) {\n\tconst resolvers = /* @__PURE__ */ new Map();\n\treturn {\n\t\tname: \"vxrn:declaration-alias\",\n\t\tasync resolveId(source, importer, options) {\n\t\t\tif (source.startsWith(\".\") || source.startsWith(\"/\") || source.includes(\":\")) return;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t\tif (!resolved || resolved.external || !/\\.d\\.[cm]?ts$/.test(resolved.id)) return resolved;\n\t\t\tconst kind = options.kind === \"require-call\" ? \"require\" : \"import\";\n\t\t\tlet resolver = resolvers.get(kind);\n\t\t\tif (!resolver) {\n\t\t\t\tconst { ResolverFactory } = await import(\"rolldown/experimental\");\n\t\t\t\tresolver = new ResolverFactory({\n\t\t\t\t\t...getNativeResolveConfig(platform),\n\t\t\t\t\tconditionNames: [\n\t\t\t\t\t\t\"react-native\",\n\t\t\t\t\t\t\"browser\",\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\"default\"\n\t\t\t\t\t]\n\t\t\t\t});\n\t\t\t\tresolvers.set(kind, resolver);\n\t\t\t}\n\t\t\tconst runtime = resolver.sync(importer ? dirname(importer) : root, source);\n\t\t\tif (!runtime.path || /\\.d\\.[cm]?ts$/.test(runtime.path)) this.error(`Native import ${source} resolves to a declaration without a runtime export`);\n\t\t\treturn this.resolve(runtime.path, importer, {\n\t\t\t\tskipSelf: true,\n\t\t\t\tkind: options.kind\n\t\t\t});\n\t\t}\n\t};\n}\nfunction nativeAssetRegistryPlugin(root) {\n\tlet registryPath;\n\treturn {\n\t\tname: \"vxrn:asset-registry\",\n\t\tasync resolveId(source, importer) {\n\t\t\tif (source !== \"react-native/asset-registry\" && source !== \"@react-native/assets-registry/registry\") return;\n\t\t\tif (registryPath === void 0) try {\n\t\t\t\tconst reactNativeRoot = dirname(resolvePath(\"react-native/package.json\", root));\n\t\t\t\tconst exportedRegistry = join(reactNativeRoot, \"src/asset-registry.js\");\n\t\t\t\tregistryPath = existsSync(exportedRegistry) ? exportedRegistry : resolvePath(\"@react-native/assets-registry/registry\", reactNativeRoot);\n\t\t\t} catch {\n\t\t\t\tregistryPath = null;\n\t\t\t}\n\t\t\tif (registryPath) return this.resolve(normalizePath(registryPath), importer, { skipSelf: true });\n\t\t}\n\t};\n}\nfunction nativePackageDedupePlugin(root) {\n\tconst packages = /* @__PURE__ */ new Set([\n\t\t...dedupe,\n\t\t\"react-native-worklets\",\n\t\t\"react-native-nitro-modules\"\n\t]);\n\treturn {\n\t\tname: \"vxrn:native-package-dedupe\",\n\t\tasync resolveId(source) {\n\t\t\tconst parts = source.split(\"/\");\n\t\t\tconst packageName = source.startsWith(\"@\") ? parts.slice(0, 2).join(\"/\") : parts[0];\n\t\t\tif (!packages.has(packageName)) return;\n\t\t\treturn this.resolve(source, join(root, \"package.json\"), { skipSelf: true });\n\t\t}\n\t};\n}\nfunction reactNativeDedupePlugin(root) {\n\tlet reactNativeRoot;\n\treturn {\n\t\tname: \"vxrn:react-native-dedupe\",\n\t\tasync resolveId(source, importer) {\n\t\t\tif (source !== \"react-native\" && !source.startsWith(\"react-native/\")) return;\n\t\t\tif (reactNativeRoot === void 0) try {\n\t\t\t\treactNativeRoot = realpathSync(dirname(resolvePath(\"react-native/package.json\", root)));\n\t\t\t} catch {\n\t\t\t\treactNativeRoot = null;\n\t\t\t}\n\t\t\tif (!reactNativeRoot) return;\n\t\t\tconst subpath = source === \"react-native\" ? \"index.js\" : source.slice(13);\n\t\t\treturn this.resolve(normalizePath(resolve(reactNativeRoot, subpath)), importer, { skipSelf: true });\n\t\t}\n\t};\n}\nfunction cssStubPlugin() {\n\treturn {\n\t\tname: \"vxrn:css-stub\",\n\t\tload: { handler(id) {\n\t\t\tif (id.endsWith(\".css\")) return {\n\t\t\t\tcode: \"\",\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t} }\n\t};\n}\nfunction vxrnCompilerPlugin(platform, dev, projectRoot = process.cwd(), sourceMaps = false) {\n\tlet compiler = null;\n\tconst isRefreshCandidate = (id) => dev && !id.includes(\"node_modules\") && !id.includes(\"__virtual-native-entry\") && /\\.[tj]sx?$/.test(id);\n\treturn {\n\t\tname: \"vxrn:compiler\",\n\t\tasync transform(code, id) {\n\t\t\tif (!/\\.[cm]?[jt]sx?$/.test(id)) return;\n\t\t\tif (id.includes(\"\\0\") || id.includes(\"virtual:\")) return;\n\t\t\tconst needsRefresh = isRefreshCandidate(id);\n\t\t\tif (!compiler) compiler = await import(\"@vxrn/compiler\");\n\t\t\tconst props = {\n\t\t\t\tid,\n\t\t\t\tcode,\n\t\t\t\tprojectRoot,\n\t\t\t\tdevelopment: dev,\n\t\t\t\tenvironment: platform,\n\t\t\t\treactForRNVersion: \"19\"\n\t\t\t};\n\t\t\tlet babelOptions = compiler.getBabelOptions(props);\n\t\t\tlet curCode = code;\n\t\t\tconst intermediateMaps = [];\n\t\t\tconst isWorkletPlugin = (entry) => {\n\t\t\t\tif (!entry) return false;\n\t\t\t\tconst name = typeof entry === \"string\" ? entry : Array.isArray(entry) ? entry[0] : null;\n\t\t\t\treturn typeof name === \"string\" && (name.includes(\"react-native-worklets\") || name.includes(\"react-native-reanimated\"));\n\t\t\t};\n\t\t\tconst workletEntry = babelOptions?.plugins?.find(isWorkletPlugin);\n\t\t\tconst workletPluginOptions = Array.isArray(workletEntry) ? workletEntry[1] : void 0;\n\t\t\tconst useWorklets = compiler.isNativeWorkletsEnabled() && (Boolean(workletEntry) || compiler.shouldTransformWorklets({\n\t\t\t\tid,\n\t\t\t\tcode\n\t\t\t}));\n\t\t\tconst compilerPluginIndex = babelOptions?.plugins?.findIndex((x) => Array.isArray(x) && x[0] === \"babel-plugin-react-compiler\") ?? -1;\n\t\t\tif (compilerPluginIndex !== -1) {\n\t\t\t\tif (useWorklets) {\n\t\t\t\t\tconst prepared = compiler.prepareWorkletsForReactCompiler(id, curCode, sourceMaps);\n\t\t\t\t\tif (prepared) {\n\t\t\t\t\t\tcurCode = prepared.code;\n\t\t\t\t\t\tif (prepared.map) intermediateMaps.push(prepared.map);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst compilerPluginOptions = babelOptions.plugins[compilerPluginIndex][1] || {};\n\t\t\t\tif (!(compilerPluginOptions.compiler === \"babel\" || process.env.ONE_REACT_COMPILER === \"babel\" || process.env.VXRN_REACT_COMPILER === \"babel\")) {\n\t\t\t\t\tconst compilerOut = await compiler.transformOxcReactCompiler(id, curCode, compilerPluginOptions, sourceMaps);\n\t\t\t\t\tif (compilerOut?.code) {\n\t\t\t\t\t\tcurCode = compilerOut.code;\n\t\t\t\t\t\tif (sourceMaps && compilerOut.map) intermediateMaps.push(compilerOut.map);\n\t\t\t\t\t}\n\t\t\t\t\tbabelOptions.plugins.splice(compilerPluginIndex, 1);\n\t\t\t\t\tif (babelOptions.plugins.length === 0 && !babelOptions.configFile && !babelOptions.babelrc) babelOptions = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (useWorklets) {\n\t\t\t\tconst workletOut = await compiler.transformWorklets(id, curCode, sourceMaps, {\n\t\t\t\t\tprojectRoot,\n\t\t\t\t\t...workletPluginOptions\n\t\t\t\t});\n\t\t\t\tif (workletOut?.code) {\n\t\t\t\t\tcurCode = workletOut.code;\n\t\t\t\t\tif (sourceMaps && workletOut.map) intermediateMaps.push(workletOut.map);\n\t\t\t\t}\n\t\t\t\tif (babelOptions?.plugins) {\n\t\t\t\t\tbabelOptions.plugins = babelOptions.plugins.filter((entry) => !isWorkletPlugin(entry));\n\t\t\t\t\tif (babelOptions.plugins.length === 0 && !babelOptions.configFile && !babelOptions.babelrc) babelOptions = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!babelOptions && !needsRefresh) {\n\t\t\t\tif (curCode !== code) {\n\t\t\t\t\tlet finalMap = void 0;\n\t\t\t\t\tif (sourceMaps && intermediateMaps.length > 0) if (intermediateMaps.length === 1) finalMap = intermediateMaps[0];\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\t\tfinalMap = remapping(intermediateMaps.slice().reverse(), () => null);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcode: curCode,\n\t\t\t\t\t\tmap: finalMap\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (sourceMaps && babelOptions) {\n\t\t\t\tbabelOptions = {\n\t\t\t\t\t...babelOptions,\n\t\t\t\t\tsourceMaps: true,\n\t\t\t\t\tsourceFileName: id\n\t\t\t\t};\n\t\t\t\tdelete babelOptions.inputSourceMap;\n\t\t\t}\n\t\t\tif (babelOptions) {\n\t\t\t\tconst result = await compiler.transformBabel(id, curCode, babelOptions);\n\t\t\t\tif (result?.code) {\n\t\t\t\t\tcurCode = result.code;\n\t\t\t\t\tif (sourceMaps && result.map) intermediateMaps.push(result.map);\n\t\t\t\t\tif (!needsRefresh) {\n\t\t\t\t\t\tlet finalMap = void 0;\n\t\t\t\t\t\tif (sourceMaps && intermediateMaps.length > 0) if (intermediateMaps.length === 1) finalMap = intermediateMaps[0];\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\t\t\tfinalMap = remapping(intermediateMaps.slice().reverse(), () => null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tcode: curCode,\n\t\t\t\t\t\t\tmap: finalMap\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (needsRefresh) {\n\t\t\t\tconst { transformSync } = await import(\"oxc-transform-react\");\n\t\t\t\tconst jsxImportSource = compiler.configuration?.enableNativewind && !id.includes(\"node_modules\") ? \"nativewind\" : \"react\";\n\t\t\t\tconst res = transformSync(id, curCode, {\n\t\t\t\t\tjsx: {\n\t\t\t\t\t\tdevelopment: dev,\n\t\t\t\t\t\truntime: \"automatic\",\n\t\t\t\t\t\timportSource: jsxImportSource,\n\t\t\t\t\t\trefresh: {\n\t\t\t\t\t\t\trefreshReg: \"__vxrnRefreshReg\",\n\t\t\t\t\t\t\trefreshSig: \"__vxrnRefreshSig\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\treactCompiler: false,\n\t\t\t\t\tsourcemap: sourceMaps\n\t\t\t\t});\n\t\t\t\tif (res.fatal) throw new Error(`[vxrn:compiler] oxc react transform failed on ${id}: ${(res.errors ?? []).map((e) => e.message ?? String(e)).join(\", \")}`);\n\t\t\t\tconst header = `var __prevRefreshReg = globalThis.$RefreshReg$;\nvar __prevRefreshSig = globalThis.$RefreshSig$;\nif (globalThis.__ReactRefresh) {\n globalThis.$RefreshReg$ = function(type, id) {\n globalThis.__ReactRefresh.register(type, \"${id.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\")}\" + \" \" + id);\n };\n globalThis.$RefreshSig$ = globalThis.__ReactRefresh.createSignatureFunctionForTransform;\n}\n// keep registration calls local so rolldown retains them in the initial bundle.\nvar __vxrnRefreshReg = globalThis.$RefreshReg$;\nvar __vxrnRefreshSig = globalThis.$RefreshSig$;\n\n`;\n\t\t\t\tconst footer = `\n\nglobalThis.$RefreshReg$ = __prevRefreshReg;\nglobalThis.$RefreshSig$ = __prevRefreshSig;\nif (import.meta.hot) {\n import.meta.hot.acceptReactRefresh(function() {\n if (globalThis.__ReactRefresh) {\n setTimeout(function() { globalThis.__ReactRefresh.performReactRefresh(); }, 30);\n }\n });\n}\n`;\n\t\t\t\tlet out;\n\t\t\t\tlet finalMap = void 0;\n\t\t\t\tif (sourceMaps) {\n\t\t\t\t\tconst MagicString = (await import(\"magic-string\")).default;\n\t\t\t\t\tconst ms = new MagicString(res.code);\n\t\t\t\t\tms.prepend(header);\n\t\t\t\t\tms.append(footer);\n\t\t\t\t\tout = ms.toString();\n\t\t\t\t\tconst allMaps = [\n\t\t\t\t\t\tms.generateMap({\n\t\t\t\t\t\t\tsource: id,\n\t\t\t\t\t\t\thires: true\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tres.map,\n\t\t\t\t\t\t...intermediateMaps.slice().reverse()\n\t\t\t\t\t].filter(Boolean);\n\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\tfinalMap = remapping(allMaps, () => null);\n\t\t\t\t} else out = header + res.code + footer;\n\t\t\t\treturn {\n\t\t\t\t\tcode: out,\n\t\t\t\t\tmap: finalMap\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n}\nfunction flowStripPlugin() {\n\treturn {\n\t\tname: \"vxrn:flow-strip\",\n\t\ttransform: { async handler(code, id) {\n\t\t\tif (!shouldStripFlow(id, code)) return;\n\t\t\tconst { stripFlowTypes } = await import(\"@vxrn/compiler\");\n\t\t\tconst result = await stripFlowTypes(id, code);\n\t\t\treturn {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: result.map\n\t\t\t};\n\t\t} }\n\t};\n}\nfunction assetPlugin(opts) {\n\tconst assetRegex = new RegExp(`\\\\.(?:${DEFAULT_ASSET_EXTS.join(\"|\")})$`);\n\treturn {\n\t\tname: \"vxrn:asset\",\n\t\tload: { async handler(id) {\n\t\t\tif (!assetRegex.test(id)) return;\n\t\t\tconst assetData = await getNativeAssetData(id, opts.root, opts.platform);\n\t\t\topts.onAsset?.(assetData);\n\t\t\tif (opts.assetsDest) copyNativeAssetFiles(assetData, opts.assetsDest, opts.platform);\n\t\t\treturn {\n\t\t\t\tcode: `module.exports = require('react-native/asset-registry').registerAsset(${JSON.stringify(assetData)});`,\n\t\t\t\tmoduleType: \"js\"\n\t\t\t};\n\t\t} }\n\t};\n}\nfunction createNativeDevAssetRegistry() {\n\tconst assets = /* @__PURE__ */ new Map();\n\treturn {\n\t\tregister(asset) {\n\t\t\tfor (const [index, scale] of asset.scales.entries()) {\n\t\t\t\tconst filePath = asset.files[index];\n\t\t\t\tif (!filePath) continue;\n\t\t\t\tconst fileName = `${asset.name}${scale === 1 ? \"\" : `@${scale}x`}.${asset.type}`;\n\t\t\t\tassets.set(`${asset.httpServerLocation}/${fileName}`, {\n\t\t\t\t\tfilePath,\n\t\t\t\t\thash: asset.hash,\n\t\t\t\t\ttype: asset.type\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tresolve(pathname, hash) {\n\t\t\tconst asset = assets.get(pathname);\n\t\t\tif (!asset || hash !== void 0 && hash !== asset.hash) return;\n\t\t\treturn asset;\n\t\t}\n\t};\n}\nconst NATIVE_IMAGE_EXTS = /* @__PURE__ */ new Set([\n\t\"png\",\n\t\"jpg\",\n\t\"jpeg\",\n\t\"gif\",\n\t\"webp\",\n\t\"bmp\",\n\t\"psd\",\n\t\"svg\",\n\t\"tiff\",\n\t\"ktx\"\n]);\nfunction parseNativeAssetName(filePath) {\n\tconst type = extname(filePath).slice(1);\n\tif (!type) return;\n\tconst stem = basename(filePath, `.${type}`);\n\tconst platformMatch = stem.match(/^(.*)\\.(ios|android)$/);\n\tconst platform = platformMatch?.[2];\n\tconst scaleMatch = (platformMatch?.[1] ?? stem).match(/^(.+?)(?:@([\\d.]+)x)?$/);\n\tif (!scaleMatch) return;\n\tconst scale = scaleMatch[2] === void 0 ? 1 : Number.parseFloat(scaleMatch[2]);\n\tif (!Number.isFinite(scale) || scale <= 0) return;\n\treturn {\n\t\tname: scaleMatch[1],\n\t\tscale,\n\t\tplatform,\n\t\ttype\n\t};\n}\nfunction getNativeAssetUrlDirectory(root, assetDirectory) {\n\tconst safeDirectory = relative(realpathSync(root), realpathSync(assetDirectory)).replace(/\\\\/g, \"/\").split(\"/\").filter((segment) => segment && segment !== \".\").map((segment) => segment === \"..\" ? \"_\" : segment).join(\"/\");\n\treturn safeDirectory ? `/assets/${safeDirectory}` : \"/assets\";\n}\nasync function getNativeAssetData(id, root, platform) {\n\tconst requested = parseNativeAssetName(id);\n\tif (!requested) throw new Error(`[vxrn] invalid native asset path: ${id}`);\n\tconst assetDirectory = dirname(id);\n\tconst filesByScale = /* @__PURE__ */ new Map();\n\tfor (const fileName of readdirSync(assetDirectory)) {\n\t\tconst candidate = parseNativeAssetName(fileName);\n\t\tif (!candidate || candidate.name !== requested.name || candidate.type !== requested.type || candidate.platform !== void 0 && candidate.platform !== platform) continue;\n\t\tconst platformSpecific = candidate.platform === platform;\n\t\tconst existing = filesByScale.get(candidate.scale);\n\t\tif (!existing || platformSpecific && !existing.platformSpecific) filesByScale.set(candidate.scale, {\n\t\t\tfile: join(assetDirectory, fileName),\n\t\t\tplatformSpecific\n\t\t});\n\t}\n\tconst scales = [...filesByScale.keys()].sort((a, b) => a - b);\n\tconst files = scales.map((scale) => filesByScale.get(scale).file);\n\tif (files.length === 0) throw new Error(`[vxrn] native asset has no files for ${platform}: ${id}`);\n\tconst hash = createHash(\"md5\");\n\tfor (const file of files) hash.update(readFileSync(file));\n\tconst assetData = {\n\t\t__packager_asset: true,\n\t\tname: requested.name,\n\t\ttype: requested.type,\n\t\tscales,\n\t\tfiles,\n\t\thttpServerLocation: getNativeAssetUrlDirectory(root, assetDirectory),\n\t\tfileSystemLocation: assetDirectory,\n\t\thash: hash.digest(\"hex\")\n\t};\n\tif (NATIVE_IMAGE_EXTS.has(requested.type)) try {\n\t\tconst { imageSize } = await import(\"image-size\");\n\t\tconst dims = imageSize(files[0]);\n\t\tassetData.width = dims.width === void 0 ? void 0 : dims.width / scales[0];\n\t\tassetData.height = dims.height === void 0 ? void 0 : dims.height / scales[0];\n\t} catch {}\n\treturn assetData;\n}\nfunction getIOSAssetScales(scales) {\n\tconst supported = scales.filter((scale) => scale === 1 || scale === 2 || scale === 3);\n\tif (supported.length > 0 || scales.length === 0) return supported;\n\treturn [scales.find((scale) => scale > 3) ?? scales[scales.length - 1]];\n}\nfunction getAndroidAssetDirectory(type, scale) {\n\tif (!(/* @__PURE__ */ new Set([\n\t\t\"gif\",\n\t\t\"heic\",\n\t\t\"heif\",\n\t\t\"jpeg\",\n\t\t\"jpg\",\n\t\t\"ktx\",\n\t\t\"png\",\n\t\t\"webp\",\n\t\t\"xml\"\n\t])).has(type)) return \"raw\";\n\tconst density = (/* @__PURE__ */ new Map([\n\t\t[.75, \"ldpi\"],\n\t\t[1, \"mdpi\"],\n\t\t[1.5, \"hdpi\"],\n\t\t[2, \"xhdpi\"],\n\t\t[3, \"xxhdpi\"],\n\t\t[4, \"xxxhdpi\"]\n\t])).get(scale);\n\tif (density) return `drawable-${density}`;\n\treturn `drawable-${Math.round(scale * 160)}dpi`;\n}\nfunction getAndroidAssetName(asset) {\n\treturn `${asset.httpServerLocation}/${asset.name}`.toLowerCase().replace(/^\\//, \"\").replace(/\\//g, \"_\").replace(/([^a-z0-9_])/g, \"\").replace(/^assets_/, \"\");\n}\nfunction copyNativeAssetFiles(asset, assetsDest, platform) {\n\tconst validIOSScales = new Set(getIOSAssetScales(asset.scales));\n\tfor (const [index, scale] of asset.scales.entries()) {\n\t\tif (platform === \"ios\" && !validIOSScales.has(scale)) continue;\n\t\tconst destination = platform === \"android\" ? join(assetsDest, getAndroidAssetDirectory(asset.type, scale), `${getAndroidAssetName(asset)}.${asset.type}`) : join(assetsDest, asset.httpServerLocation.slice(1), `${asset.name}${scale === 1 ? \"\" : `@${scale}x`}.${asset.type}`);\n\t\tmkdirSync(dirname(destination), { recursive: true });\n\t\tcopyFileSync(asset.files[index], destination);\n\t}\n}\nfunction hermesCompatSWCPlugin(dev, sourceMaps = false) {\n\tlet oxc = null;\n\treturn {\n\t\tname: \"vxrn:hermes-compat\",\n\t\tasync transform(code, id) {\n\t\t\tif (!/\\.[cm]?[jt]sx?$/.test(id)) return;\n\t\t\tif (id.includes(\"\\0\") || id.includes(\"virtual:\")) return;\n\t\t\tconst hasClass = /\\bclass(?:\\s|\\{)/.test(code);\n\t\t\tconst hasAsync = code.includes(\"async\");\n\t\t\tconst hasBlockScopedBinding = /\\b(?:const|let)\\s/.test(code);\n\t\t\tif (!hasClass && !hasAsync && !hasBlockScopedBinding) return;\n\t\t\tlet output;\n\t\t\tif (code.length <= 5e5 || hasClass) {\n\t\t\t\tif (!oxc) oxc = await import(\"oxc-transform\");\n\t\t\t\tconst lang = /\\.[cm]?ts$/.test(id) ? \"ts\" : id.endsWith(\".tsx\") ? \"tsx\" : \"jsx\";\n\t\t\t\tconst result = oxc.transformSync(id, code, {\n\t\t\t\t\tlang,\n\t\t\t\t\ttarget: \"es2020\",\n\t\t\t\t\tassumptions: { setPublicClassFields: true },\n\t\t\t\t\tjsx: \"preserve\",\n\t\t\t\t\tsourcemap: sourceMaps,\n\t\t\t\t\tsourceType: id.endsWith(\".cjs\") ? \"script\" : \"module\"\n\t\t\t\t});\n\t\t\t\tif (result.errors?.length) {\n\t\t\t\t\tconst err = result.errors[0];\n\t\t\t\t\tthrow new Error(err.message + (err.codeframe ? `\n${err.codeframe}` : \"\"));\n\t\t\t\t}\n\t\t\t\toutput = {\n\t\t\t\t\tcode: result.code,\n\t\t\t\t\tmap: sourceMaps ? result.map : void 0\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (hasClass || hasBlockScopedBinding) {\n\t\t\t\tconst { transformHermesClasses } = await import(\"@vxrn/compiler\");\n\t\t\t\tconst classes = await transformHermesClasses(output?.code ?? code, id, sourceMaps);\n\t\t\t\tif (classes) {\n\t\t\t\t\tif (classes.map && output?.map) {\n\t\t\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\t\t\tclasses.map = remapping([classes.map, output.map], () => null);\n\t\t\t\t\t}\n\t\t\t\t\toutput = classes;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst lowered = await transformHermesAsync(output?.code ?? code, id, sourceMaps);\n\t\t\tif (!lowered) return output;\n\t\t\tif (lowered.map && output?.map) {\n\t\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\t\tlowered.map = remapping([lowered.map, output.map], () => null);\n\t\t\t}\n\t\t\treturn lowered;\n\t\t}\n\t};\n}\nconst hermesCompatPlugin = hermesCompatSWCPlugin;\nfunction hermesLoopsPlugin(sourceMaps = false) {\n\tlet compiler = null;\n\treturn {\n\t\tname: \"vxrn:hermes-loops\",\n\t\tasync transform(code, id) {\n\t\t\tif (!/\\.[cm]?[jt]sx?$/.test(id)) return;\n\t\t\tif (id.includes(\"\\0\") || id.includes(\"virtual:\")) return;\n\t\t\tif (!compiler) compiler = await import(\"@vxrn/compiler\");\n\t\t\tconst result = compiler.transformHermesLoops(code, id);\n\t\t\tif (!result) return;\n\t\t\tif (!sourceMaps) return {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t\tif (result.maps.length === 1) return {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: result.maps[0]\n\t\t\t};\n\t\t\tconst remapping = (await import(\"@jridgewell/remapping\")).default;\n\t\t\treturn {\n\t\t\t\tcode: result.code,\n\t\t\t\tmap: remapping(result.maps.slice().reverse(), () => null)\n\t\t\t};\n\t\t}\n\t};\n}\nfunction getHmrRuntimeSource() {\n\treturn `\n// vxrn HMR runtime for rolldown devMode\nvar BaseDevRuntime = DevRuntime;\n\nclass ReactNativeDevRuntime extends BaseDevRuntime {\n constructor() {\n var clientId = 'rn-' + Date.now() + '-' + Math.random().toString(36).slice(2);\n super(clientId);\n this._socket = null;\n this.moduleHotContexts = {};\n this.lastSeq = 0;\n }\n\n createModuleHotContext(moduleId) {\n var runtime = this;\n var ctx = {\n acceptCallbacks: [],\n reactRefreshAcceptCallback: null,\n accept: function(deps, callback) {\n if (typeof deps === 'function' || !deps) {\n ctx.acceptCallbacks.push({\n deps: [moduleId],\n fn: function(modules) { if (typeof deps === 'function') deps(modules[0]); }\n });\n } else if (typeof deps === 'string') {\n ctx.acceptCallbacks.push({\n deps: [deps],\n fn: function(modules) { if (callback) callback(modules[0]); }\n });\n } else if (Array.isArray(deps)) {\n ctx.acceptCallbacks.push({ deps: deps, fn: callback || function() {} });\n }\n },\n acceptReactRefresh: function(callback) {\n ctx.reactRefreshAcceptCallback = callback;\n },\n invalidate: function() { runtime.requestReload('module invalidated: ' + moduleId); },\n on: function() {},\n off: function() {},\n send: function() {},\n get refresh() { return globalThis.__ReactRefresh; },\n get refreshUtils() {\n return {\n isReactRefreshBoundary: function(exports) {\n if (!globalThis.__ReactRefresh) return false;\n if (globalThis.__ReactRefresh.isLikelyComponentType(exports)) return true;\n if (!exports || typeof exports !== 'object') return false;\n var hasExports = false, allComponents = true;\n for (var key in exports) {\n hasExports = true;\n if (key === '__esModule') continue;\n if (!globalThis.__ReactRefresh.isLikelyComponentType(exports[key])) allComponents = false;\n }\n return hasExports && allComponents;\n },\n enqueueUpdate: function() {\n if (globalThis.__ReactRefresh) {\n setTimeout(function() { globalThis.__ReactRefresh.performReactRefresh(); }, 50);\n }\n }\n };\n }\n };\n this.moduleHotContexts[moduleId] = ctx;\n return ctx;\n }\n\n isSelfAccepted(moduleId) {\n var ctx = this.moduleHotContexts[moduleId];\n var explicitlyAccepted = !!(ctx && ctx.acceptCallbacks.some(function(callback) {\n return callback.deps.indexOf(moduleId) !== -1;\n }));\n if (explicitlyAccepted) return { accepted: true, reactRefresh: false };\n if (!ctx || !ctx.reactRefreshAcceptCallback || !globalThis.__ReactRefresh) {\n return { accepted: false, reactRefresh: false };\n }\n var exports = this.loadExports(moduleId);\n return {\n accepted: ctx.refreshUtils.isReactRefreshBoundary(exports),\n reactRefresh: true\n };\n }\n\n acceptsDependency(parentId, moduleId) {\n var ctx = this.moduleHotContexts[parentId];\n return !!(ctx && ctx.acceptCallbacks.some(function(callback) {\n return callback.deps.indexOf(moduleId) !== -1;\n }));\n }\n\n findBoundaries(moduleId, traversed, updateSet, boundaries) {\n if (traversed.has(moduleId)) return true;\n traversed.add(moduleId);\n updateSet.add(moduleId);\n\n var selfAcceptance = this.isSelfAccepted(moduleId);\n if (selfAcceptance.accepted) {\n boundaries.push({\n boundary: moduleId,\n acceptedVia: moduleId,\n reactRefresh: selfAcceptance.reactRefresh\n });\n return true;\n }\n\n var importers = this.getImporters(moduleId).filter(function(importer) {\n return this.isExecuted(importer);\n }, this);\n if (importers.length === 0) return false;\n\n for (var i = 0; i < importers.length; i++) {\n var importer = importers[i];\n if (this.acceptsDependency(importer, moduleId)) {\n boundaries.push({ boundary: importer, acceptedVia: moduleId });\n } else if (!this.findBoundaries(importer, traversed, updateSet, boundaries)) {\n return false;\n }\n }\n return true;\n }\n\n applyHmrUpdate(code, changedIds, seq) {\n if (seq !== this.lastSeq + 1) return false;\n this.lastSeq = seq;\n\n var traversed = new Set();\n var updateSet = new Set();\n var boundaries = [];\n for (var i = 0; i < changedIds.length; i++) {\n var changedId = changedIds[i];\n if (!this.isExecuted(changedId)) continue;\n if (!this.findBoundaries(changedId, traversed, updateSet, boundaries)) return false;\n }\n if (boundaries.length === 0) return true;\n\n var callbacks = boundaries.map(function(item) {\n var ctx = this.moduleHotContexts[item.boundary];\n var selectedCallbacks = ctx ? ctx.acceptCallbacks.filter(function(callback) {\n return callback.deps.indexOf(item.acceptedVia) !== -1;\n }) : [];\n if (item.reactRefresh && ctx && ctx.reactRefreshAcceptCallback) {\n selectedCallbacks.push({\n deps: [item.acceptedVia],\n fn: function() { ctx.reactRefreshAcceptCallback(); }\n });\n }\n return {\n boundary: item.boundary,\n acceptedVia: item.acceptedVia,\n callbacks: selectedCallbacks\n };\n }, this);\n\n if (globalThis.globalEvalWithSourceUrl) globalThis.globalEvalWithSourceUrl(code);\n else (0, eval)(code);\n\n var modulesToReplace = Array.from(updateSet);\n for (var j = 0; j < modulesToReplace.length; j++) {\n if (!this.hasFactory(modulesToReplace[j])) return false;\n }\n for (var k = 0; k < modulesToReplace.length; k++) {\n this.removeModuleCache(modulesToReplace[k]);\n }\n\n for (var m = 0; m < callbacks.length; m++) {\n var apply = callbacks[m];\n this.initModule(apply.acceptedVia);\n var freshExports = this.loadExports(apply.acceptedVia);\n for (var n = 0; n < apply.callbacks.length; n++) {\n apply.callbacks[n].fn([freshExports]);\n }\n }\n\n for (var p = 0; p < changedIds.length; p++) {\n try {\n if (globalThis.__VXRN_ON_MODULE_UPDATED__) {\n globalThis.__VXRN_ON_MODULE_UPDATED__(changedIds[p]);\n }\n } catch (error) {\n console.error('[vxrn HMR]: module update hook failed', error);\n }\n }\n return true;\n }\n\n requestReload(reason) {\n if (this._socket && this._socket.readyState === 1) {\n this._socket.send(JSON.stringify({ type: 'hmr:invalidate', reason: reason }));\n }\n }\n\n reload(reason) {\n var reloadNativeBundle = globalThis.__VXRN_RELOAD_NATIVE_DEV_BUNDLE__;\n if (typeof reloadNativeBundle === 'function') {\n reloadNativeBundle(reason);\n return;\n }\n console.error('[vxrn HMR]: DevSettings.reload is unavailable');\n }\n\n setup(socket) {\n if (this._socket) return;\n this._socket = socket;\n var runtime = this;\n // addEventListener rather than socket.onmessage: the bundle's WebSocket is\n // whatever the host platform provides, and a host that does not honor on*\n // property assignment would otherwise leave the app permanently without\n // Fast Refresh and say nothing.\n socket.addEventListener('message', function(event) {\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (error) {\n return;\n }\n try {\n if (message.type === 'hmr:update') {\n // a patch that cannot be applied in place is the reload signal\n if (!runtime.applyHmrUpdate(message.code, message.changedIds, message.seq)) {\n runtime.reload('native HMR update could not be applied');\n }\n } else if (message.type === 'hmr:reload') {\n runtime.reload('native route map changed');\n }\n } catch (error) {\n console.error('[vxrn HMR]: failed to apply update', error);\n }\n });\n socket.addEventListener('error', function(event) {\n console.warn('[vxrn HMR]: connection error', (event && event.message) || event);\n });\n }\n}\n\nglobalThis.__rolldown_runtime__ = new ReactNativeDevRuntime();\n`;\n}\n\nexport { buildNativeBundle, createNativeDevAssetRegistry, createNativeDevEngine, getHermesSWCIncludes, getHmrRuntimeSource, getNativeAssetData, getNativeTransformConfig, hermesCompatPlugin, hermesCompatSWCPlugin, hermesLoopsPlugin, hmrClientNoopPlugin, nativeAnimatedGuardPlugin, normalizeNativeCommonJSInterop, postProcessNativeBundle, vxrnCompilerPlugin, wrapNativeBundleModuleScope };"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,0BAA0B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA,MAAM,0BAA0B,CAAC,8BAA8B;AAC/D,SAAS,qBAAqB,KAAK;CAClC,OAAO,CAAC,GAAG,yBAAyB,GAAG,uBAAuB;AAC/D;AACA,SAAS,qBAAqB,UAAU;CACvC,MAAM,eAAe,aAAa,QAAQ;EACzC;EACA;EACA;EACA;CACD,IAAI;EACH;EACA;EACA;EACA;CACD;CACA,MAAM,aAAa;EAClB;EACA;EACA;EACA;CACD;CACA,MAAM,cAAc;EACnB;EACA;EACA;EACA;EACA;EACA;EACA;CACD;CACA,OAAO;EACN,GAAG;EACH,GAAG;EACH,GAAG;CACJ;AACD;AACA,SAAS,uBAAuB,UAAU;CACzC,OAAO;EACN,YAAY,qBAAqB,QAAQ;EACzC,gBAAgB,CAAC,gBAAgB,SAAS;EAC1C,YAAY;GACX;GACA;GACA;GACA;EACD;EACA,aAAa,CAAC,CAAC,cAAc,GAAG,CAAC,SAAS,CAAC;CAC5C;AACD;AACA,SAAS,yBAAyB,UAAU,KAAK,MAAM;CACtD,MAAM,cAAc,WAAW,2BAA2B,CAAC;CAC3D,MAAM,0BAA0B;EAC/B,MAAM,KAAK,YAAY;EACvB,IAAI,CAAC,IAAI,OAAO,CAAC;EACjB,MAAM,QAAQ,OAAO,OAAO,WAAW;GACtC,QAAQ;GACR,QAAQ;GACR,KAAK;GACL,SAAS;EACV,IAAI,YAAY,KAAK;GACpB,QAAQ,GAAG;GACX,Q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,OAAO;CAC9C,IAAI,WAAW;CACf,OAAO;EACN,MAAM;EACN,MAAM,UAAU,MAAM,IAAI;GACzB,IAAI,CAAC,kBAAkB,KAAK,EAAE,GAAG;GACjC,IAAI,GAAG,SAAS,IAAI,KAAK,GAAG,SAAS,UAAU,GAAG;GAClD,IAAI,CAAC,UAAU,WAAW,MAAM,OAAO;GACvC,MAAM,SAAS,SAAS,qBAAqB,MAAM,EAAE;GACrD,IAAI,CAAC,QAAQ;GACb,IAAI,CAAC,YAAY,OAAO;IACvB,MAAM,OAAO;IACb,KAAK;GACN;GACA,IAAI,OAAO,KAAK,WAAW,GAAG,OAAO;IACpC,MAAM,OAAO;IACb,KAAK,OAAO,KAAK;GAClB;GACA,MAAM,aAAa,MAAM,OAAO,yBAAwB,CAAE;GAC1D,OAAO;IACN,MAAM,OAAO;IACb,KAAK,UAAU,OAAO,KAAK,MAAM,CAAC,CAAC,QAAQ,SAAS,IAAI;GACzD;EACD;CACD;AACD;AACA,SAAS,sBAAsB;CAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4OR"}
|
|
@@ -408,6 +408,7 @@ try {
|
|
|
408
408
|
}
|
|
409
409
|
},
|
|
410
410
|
onHmrUpdates: async function onHmrUpdates(result) {
|
|
411
|
+
await (engine === null || engine === void 0 ? void 0 : engine.ensureCurrentBuildFinish());
|
|
411
412
|
if (result instanceof Error) {
|
|
412
413
|
console.error("[vxrn] HMR error:", result.message);
|
|
413
414
|
onHmrUpdate === null || onHmrUpdate === void 0 || onHmrUpdate({ type: "hmr:error" });
|
|
@@ -418,14 +419,16 @@ try {
|
|
|
418
419
|
try {
|
|
419
420
|
for (var _iterator = result.updates[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
420
421
|
var { clientId, update } = _step.value;
|
|
421
|
-
if (update.type === "Patch" && update.code)
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
422
|
+
if (update.type === "Patch" && update.code) {
|
|
423
|
+
await engine.notifyPayloadDelivered(update.filename);
|
|
424
|
+
onHmrUpdate === null || onHmrUpdate === void 0 || onHmrUpdate({
|
|
425
|
+
type: "hmr:update",
|
|
426
|
+
clientId,
|
|
427
|
+
code: normalizeNativeCommonJSInterop(update.code),
|
|
428
|
+
changedIds: update.changedIds,
|
|
429
|
+
seq: update.seq
|
|
430
|
+
});
|
|
431
|
+
} else if (update.type === "FullReload") onHmrUpdate === null || onHmrUpdate === void 0 || onHmrUpdate({
|
|
429
432
|
type: "hmr:reload",
|
|
430
433
|
clientId
|
|
431
434
|
});
|
|
@@ -442,7 +445,7 @@ try {
|
|
|
442
445
|
}
|
|
443
446
|
},
|
|
444
447
|
rebuildStrategy: "never",
|
|
445
|
-
watch: {}
|
|
448
|
+
watch: { exclude: ["**/node_modules/.test/**", "**/.git/**"] }
|
|
446
449
|
});
|
|
447
450
|
async function handleOutput(result) {
|
|
448
451
|
if (result instanceof Error) {
|
|
@@ -503,35 +506,41 @@ try {
|
|
|
503
506
|
console.error(`[vxrn] watching the native route map failed`, error);
|
|
504
507
|
});
|
|
505
508
|
await rebuildIfRouteGraphChanged();
|
|
509
|
+
var getBundle = async function getBundle2() {
|
|
510
|
+
await queueEngineWork(async function() {
|
|
511
|
+
await engine.ensureLatestBuildOutput();
|
|
512
|
+
await outputProcessed;
|
|
513
|
+
});
|
|
514
|
+
if (currentBundle) return currentBundle;
|
|
515
|
+
if (firstBuildError) throw firstBuildError;
|
|
516
|
+
if (!bundlePromise) {
|
|
517
|
+
var timeoutId;
|
|
518
|
+
bundlePromise = new Promise(function(resolve2, reject) {
|
|
519
|
+
bundleResolve = function bundleResolve2(value) {
|
|
520
|
+
clearTimeout(timeoutId);
|
|
521
|
+
resolve2(value);
|
|
522
|
+
};
|
|
523
|
+
bundleReject = function bundleReject2(error) {
|
|
524
|
+
clearTimeout(timeoutId);
|
|
525
|
+
reject(error);
|
|
526
|
+
};
|
|
527
|
+
timeoutId = setTimeout(function() {
|
|
528
|
+
bundleResolve = null;
|
|
529
|
+
bundleReject = null;
|
|
530
|
+
bundlePromise = null;
|
|
531
|
+
reject(/* @__PURE__ */ new Error("[vxrn] bundle build timed out after 120s"));
|
|
532
|
+
}, 12e4);
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
return bundlePromise;
|
|
536
|
+
};
|
|
506
537
|
return {
|
|
507
538
|
engine,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
if (currentBundle) return currentBundle;
|
|
514
|
-
if (firstBuildError) throw firstBuildError;
|
|
515
|
-
if (!bundlePromise) {
|
|
516
|
-
var timeoutId;
|
|
517
|
-
bundlePromise = new Promise(function(resolve2, reject) {
|
|
518
|
-
bundleResolve = function bundleResolve2(value) {
|
|
519
|
-
clearTimeout(timeoutId);
|
|
520
|
-
resolve2(value);
|
|
521
|
-
};
|
|
522
|
-
bundleReject = function bundleReject2(error) {
|
|
523
|
-
clearTimeout(timeoutId);
|
|
524
|
-
reject(error);
|
|
525
|
-
};
|
|
526
|
-
timeoutId = setTimeout(function() {
|
|
527
|
-
bundleResolve = null;
|
|
528
|
-
bundleReject = null;
|
|
529
|
-
bundlePromise = null;
|
|
530
|
-
reject(/* @__PURE__ */ new Error("[vxrn] bundle build timed out after 120s"));
|
|
531
|
-
}, 12e4);
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
return bundlePromise;
|
|
539
|
+
getBundle,
|
|
540
|
+
async getSourceMap() {
|
|
541
|
+
await outputProcessed;
|
|
542
|
+
if (currentBundle) return currentBundle.map;
|
|
543
|
+
return (await getBundle()).map;
|
|
535
544
|
},
|
|
536
545
|
getAsset(pathname, hash) {
|
|
537
546
|
return assetRegistry.resolve(pathname, hash);
|