peachsim 0.1.2623 → 0.1.2625

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +1023 -621
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-E6V72TM2.mjs → acorn-SHZZDBSI.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-EIOVKQ2C.mjs → chunk-2LDG7OD4.mjs} +5 -5
  28. package/dist-lib/esm-chunks/{chunk-ISH6XB23.mjs → chunk-3XZGWT62.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-Q7KCK4YO.mjs → chunk-6PZI7TYE.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-RLWITQ5C.mjs → chunk-7Z7YJ4FU.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-4GNQG2GT.mjs → chunk-A4R4YGFJ.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-GP3KL2GC.mjs → chunk-A66VNSO6.mjs} +565 -290
  33. package/dist-lib/esm-chunks/{chunk-XOAOND7F.mjs → chunk-DVMKYLDN.mjs} +9 -8
  34. package/dist-lib/esm-chunks/{chunk-IGB7TRLS.mjs → chunk-F4YHL4UM.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-4BJIJ3GP.mjs → chunk-JRU2VXUU.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-EI7CZDMR.mjs → chunk-JVEJLPJC.mjs} +2 -2
  37. package/dist-lib/esm-chunks/{chunk-UCW7ITXE.mjs → chunk-KA4AQDVF.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-RLWTJ6II.mjs → chunk-LJYNZ5HM.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-RBXTTEI6.mjs → chunk-M2FEKSK3.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-KPG4FUTY.mjs → chunk-OCCZJOSA.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-CXNXKUNJ.mjs → chunk-P542MMIN.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-NOM66H2G.mjs → chunk-Q5NI4L3Z.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-V2CHR3OI.mjs → chunk-R4FFTWPL.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-W3X7RP3H.mjs → chunk-RJWEWNAJ.mjs} +3 -3
  45. package/dist-lib/esm-chunks/{chunk-B5OQSD4B.mjs → chunk-RXXCTHJG.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-B4APPUTT.mjs → chunk-SRIRVPNX.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-6MNE57DC.mjs → chunk-ULHG6CND.mjs} +22 -13
  48. package/dist-lib/esm-chunks/{chunk-PAEJF2JP.mjs → chunk-W4HQINQ6.mjs} +4 -4
  49. package/dist-lib/esm-chunks/{chunk-RVM3WWST.mjs → chunk-XQBHCWS4.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-Q4ZATFEN.mjs → chunk-Z6AH6AQC.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{metro-layout-parser-OHVROLNJ.mjs → metro-layout-parser-GJHR7FCR.mjs} +3 -3
  52. package/dist-lib/esm-chunks/{swift-package-prebuilt-DRAUK6KR.mjs → swift-package-prebuilt-UVRGKTD4.mjs} +12 -12
  53. package/dist-lib/esm-chunks/{swift-sdk-app-module-U2M7CMKA.mjs → swift-sdk-app-module-U3MUJ7QD.mjs} +107 -20
  54. package/dist-lib/esm-chunks/{swift-sdk-image-ZHWSHCNI.mjs → swift-sdk-image-U4W7QMAT.mjs} +16 -18
  55. package/dist-lib/esm-chunks/{swift-sdk-image-producer-EOJUCK7N.mjs → swift-sdk-image-producer-TFFZDNRK.mjs} +5 -5
  56. package/dist-lib/expo-swift-bundle.cjs +918 -516
  57. package/dist-lib/expo-swift-metadata.cjs +1 -1
  58. package/dist-lib/expo-swift-metadata.mjs +7 -7
  59. package/dist-lib/home-paths.cjs +1 -1
  60. package/dist-lib/host/bridge-host.cjs +1025 -623
  61. package/dist-lib/host/fetch-proxy-handler.cjs +10 -9
  62. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  63. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  64. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  65. package/dist-lib/host/websocket-proxy.cjs +1 -1
  66. package/dist-lib/index.cjs +1 -1
  67. package/dist-lib/kotlin-host.cjs +1 -1
  68. package/dist-lib/menu.cjs +1 -1
  69. package/dist-lib/menu.mjs +3 -3
  70. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  71. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  72. package/dist-lib/metro-production-bundle.cjs +1 -1
  73. package/dist-lib/metro-production-bundle.mjs +4 -4
  74. package/dist-lib/native-app-identity-project.cjs +33 -17
  75. package/dist-lib/native-app-identity-project.mjs +44 -29
  76. package/dist-lib/native-app-identity.cjs +1 -1
  77. package/dist-lib/native-app-identity.mjs +6 -6
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +3 -3
  80. package/dist-lib/pdfium-raster.cjs +1 -1
  81. package/dist-lib/pdfium-raster.mjs +2 -2
  82. package/dist-lib/plist.cjs +1 -1
  83. package/dist-lib/plist.mjs +3 -3
  84. package/dist-lib/profiles.cjs +1 -1
  85. package/dist-lib/public-brand.cjs +1 -1
  86. package/dist-lib/public-origins-lib-esm.json +87 -86
  87. package/dist-lib/public-origins-lib.json +69 -64
  88. package/dist-lib/react-native-host-modules.cjs +1 -1
  89. package/dist-lib/react-native-host-modules.mjs +2 -2
  90. package/dist-lib/reap-browser.cjs +1 -1
  91. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  92. package/dist-lib/sdk.cjs +1 -1
  93. package/dist-lib/sdk.mjs +8 -8
  94. package/dist-lib/skills.cjs +1062 -660
  95. package/dist-lib/swift-compile.cjs +708 -336
  96. package/dist-lib/swift-compile.mjs +12 -12
  97. package/dist-lib/swift-package.cjs +1 -1
  98. package/dist-lib/swift-package.mjs +3 -3
  99. package/dist-lib/swift-submit.cjs +1 -1
  100. package/dist-lib/swift-submit.mjs +6 -6
  101. package/dist-lib/swift-svg-raster.cjs +1 -1
  102. package/dist-lib/swift-svg-raster.mjs +2 -2
  103. package/dist-lib/swift-toolchain.cjs +1 -1
  104. package/dist-lib/swift.cjs +1 -1
  105. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  106. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  108. package/dist-lib/vendor/acorn.cjs +1 -1
  109. package/dist-lib/vendor/magic-string.cjs +1 -1
  110. package/dist-lib/vendor/stream-json.cjs +1 -1
  111. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase.cjs +1 -1
  116. package/dist-lib/vendor/terser.cjs +1 -1
  117. package/dist-lib/vendor/valibot.cjs +1 -1
  118. package/dist-lib/vendor/ws.cjs +1 -1
  119. package/dist-lib/vendor/zod.cjs +1 -1
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +3 -3
  122. package/package.json +1 -1
  123. package/src/bazel-project.ts +34 -18
  124. package/src/binaryen.lock.json +3 -3
  125. package/src/swift-compile.ts +8 -0
  126. package/src/swift-distribution-contract.ts +6 -1
  127. package/src/swift-distribution.lock.json +4 -2
  128. package/src/swift-guest-compile.ts +170 -160
  129. package/src/swift-guest-dyld-table.ts +22 -9
  130. package/src/swift-guest-link.ts +116 -42
  131. package/src/swift-guest-linked-spans.ts +63 -14
  132. package/src/swift-guest-projection-storage.ts +7 -6
  133. package/src/swift-guest-source-inputs.ts +35 -21
  134. package/src/swift-objc-compile.ts +1 -0
  135. package/src/swift-sdk-app-module.ts +118 -15
  136. package/src/swift-sdk-image-recipe.ts +20 -0
  137. package/src/swift-sdk-image-wasm.ts +119 -17
  138. package/src/swift-sdk-image.ts +6 -5
  139. package/src/swift-wasm-prune.ts +71 -41
  140. package/src/wasm-narrow-boundary.ts +31 -6
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2623 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2625 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -14892,12 +14892,13 @@ function parseSwiftDistributionLock(value) {
14892
14892
  if (runtime === void 0) return void 0;
14893
14893
  if (!isRecord(runtime) || typeof runtime.source !== "string" || !/^[a-f0-9]{64}$/.test(runtime.source) || typeof runtime.url !== "string" || !/^https:\/\/[a-z0-9.-]+(?::\d+)?\/compile\/asset\/[a-f0-9]{64}$/.test(
14894
14894
  runtime.url
14895
- ) || runtime.dataPlan !== void 0 && (typeof runtime.dataPlan !== "string" || !/^[a-f0-9]{64}$/.test(runtime.dataPlan)))
14895
+ ) || runtime.dataPlan !== void 0 && (typeof runtime.dataPlan !== "string" || !/^[a-f0-9]{64}$/.test(runtime.dataPlan)) || runtime.recipe !== void 0 && (typeof runtime.recipe !== "string" || !/^[a-f0-9]{16}$/.test(runtime.recipe)))
14896
14896
  throw new Error("invalid shared SDK runtime publication in Swift distribution lock");
14897
14897
  return {
14898
14898
  source: runtime.source,
14899
14899
  url: runtime.url,
14900
- ...runtime.dataPlan && { dataPlan: runtime.dataPlan }
14900
+ ...runtime.dataPlan && { dataPlan: runtime.dataPlan },
14901
+ ...runtime.recipe && { recipe: runtime.recipe }
14901
14902
  };
14902
14903
  };
14903
14904
  const sdkRuntime = publication(value.sdkRuntime);
@@ -15928,6 +15929,15 @@ function guestLinkedSpans(map2, before, after, owners, sectionOwners = /* @__PUR
15928
15929
  const unchanged = before === after;
15929
15930
  const original = layout(before, !unchanged, !importsLayout);
15930
15931
  const optimized = unchanged ? original : layout(after, true, !importsLayout);
15932
+ if (extra?.optimizedDataSegments) {
15933
+ for (const segment3 of optimized.data) {
15934
+ extra.optimizedDataSegments.push({
15935
+ address: segment3.address,
15936
+ offset: segment3.bytes.byteOffset - after.byteOffset,
15937
+ length: segment3.bytes.length
15938
+ });
15939
+ }
15940
+ }
15931
15941
  const collectSymbols = extra?.collectSymbols;
15932
15942
  const trackedObject = extra?.trackedObject;
15933
15943
  const trackedObjectOwner = extra?.trackedObjectOwner;
@@ -16096,12 +16106,39 @@ function guestLinkedSpans(map2, before, after, owners, sectionOwners = /* @__PUR
16096
16106
  }
16097
16107
  return result;
16098
16108
  };
16109
+ const singleSegmentSlice = (module2, start, length) => {
16110
+ const segs = module2.dataByAddress;
16111
+ let low = 0;
16112
+ let high = segs.length;
16113
+ while (low < high) {
16114
+ const middle = low + high >> 1;
16115
+ if (segs[middle].maximumEnd <= start) low = middle + 1;
16116
+ else high = middle;
16117
+ }
16118
+ let found;
16119
+ const end = start + length;
16120
+ for (let index = low; index < segs.length; index++) {
16121
+ const segment3 = segs[index];
16122
+ if (segment3.address >= end) break;
16123
+ if (segment3.address + segment3.bytes.length > start) {
16124
+ if (found) return void 0;
16125
+ found = segment3;
16126
+ }
16127
+ }
16128
+ if (!found || found.address > start || found.address + found.bytes.length < end)
16129
+ return void 0;
16130
+ return found.bytes.subarray(start - found.address, end - found.address);
16131
+ };
16132
+ const sameDataAt = (start, length) => {
16133
+ const origSlice = singleSegmentSlice(original, start, length);
16134
+ const optSlice = origSlice ? singleSegmentSlice(optimized, start, length) : void 0;
16135
+ if (origSlice && optSlice) return Buffer.compare(origSlice, optSlice) === 0;
16136
+ return dataAt(original, start, length).equals(dataAt(optimized, start, length));
16137
+ };
16099
16138
  for (const span of spans) {
16100
16139
  if (span.address + span.length > original.memoryBytes || span.address + span.length > optimized.memoryBytes)
16101
16140
  throw new Error(`linked data lies outside guest memory at ${span.address}`);
16102
- if (!unchanged && !dataAt(original, span.address, span.length).equals(
16103
- dataAt(optimized, span.address, span.length)
16104
- ))
16141
+ if (!unchanged && !sameDataAt(span.address, span.length))
16105
16142
  throw new Error(`optimization changed linked data at ${span.address}`);
16106
16143
  }
16107
16144
  let previous;
@@ -16235,7 +16272,7 @@ function takeGuestStartupData(wasm, address, length) {
16235
16272
  const bytes = new Uint8Array(length);
16236
16273
  const emptied = /* @__PURE__ */ new Set();
16237
16274
  let covered = 0;
16238
- const result = Buffer.from(wasm);
16275
+ const patchedBody = Buffer.from(wasm.subarray(body[0], body[1]));
16239
16276
  for (const initializer of startupDataInitializers(wasm.subarray(...body))) {
16240
16277
  const end = initializer.address + initializer.length;
16241
16278
  if (end <= address || initializer.address >= address + length || !initializer.length)
@@ -16250,19 +16287,18 @@ function takeGuestStartupData(wasm, address, length) {
16250
16287
  covered += segment3.length;
16251
16288
  emptied.add(initializer.segment);
16252
16289
  const [at, immediateEnd] = initializer.lengthImmediate;
16253
- result.fill(128, body[0] + at, body[0] + immediateEnd - 1);
16254
- result[body[0] + immediateEnd - 1] = 0;
16290
+ patchedBody.fill(128, at, immediateEnd - 1);
16291
+ patchedBody[immediateEnd - 1] = 0;
16255
16292
  }
16256
16293
  if (covered !== length)
16257
16294
  throw new Error("guest startup data does not initialize the whole range");
16258
- const parts = [result.subarray(0, data[0])];
16259
- const payload = [result.subarray(data[1], segments[0].header)];
16295
+ const payload = [wasm.subarray(data[1], segments[0].header)];
16260
16296
  for (const [index, segment3] of segments.entries()) {
16261
16297
  if (!emptied.has(index)) {
16262
- payload.push(result.subarray(segment3.header, segment3.payload + segment3.length));
16298
+ payload.push(wasm.subarray(segment3.header, segment3.payload + segment3.length));
16263
16299
  continue;
16264
16300
  }
16265
- payload.push(result.subarray(segment3.header, segment3.sizeAt), Uint8Array.of(0));
16301
+ payload.push(wasm.subarray(segment3.header, segment3.sizeAt), Uint8Array.of(0));
16266
16302
  }
16267
16303
  const section2 = Buffer.concat(payload);
16268
16304
  const size2 = [];
@@ -16273,7 +16309,14 @@ function takeGuestStartupData(wasm, address, length) {
16273
16309
  }
16274
16310
  size2.push(rest % 128 | 128);
16275
16311
  }
16276
- parts.push(Uint8Array.of(11, ...size2), section2, result.subarray(data[2]));
16312
+ const parts = [
16313
+ wasm.subarray(0, body[0]),
16314
+ patchedBody,
16315
+ wasm.subarray(body[1], data[0]),
16316
+ Uint8Array.of(11, ...size2),
16317
+ section2,
16318
+ wasm.subarray(data[2])
16319
+ ];
16277
16320
  return { wasm: Buffer.concat(parts), bytes };
16278
16321
  }
16279
16322
  var import_node_fs28, import_node_string_decoder, constant;
@@ -16582,6 +16625,32 @@ function readImports(bytes, imports2) {
16582
16625
  }
16583
16626
  return { functionTypes, importedGlobals, memoryPages };
16584
16627
  }
16628
+ function countImportedFunctions(bytes, imports2) {
16629
+ let count = 0;
16630
+ if (!imports2) return count;
16631
+ const r = wasmReader(bytes, imports2.start);
16632
+ for (let n = r.u(); n > 0; n--) {
16633
+ r.skip(r.u());
16634
+ r.skip(r.u());
16635
+ const kind = r.byte();
16636
+ if (kind === 0) {
16637
+ r.u();
16638
+ count++;
16639
+ } else if (kind === 1) {
16640
+ r.byte();
16641
+ skipLimits(r);
16642
+ } else if (kind === 2) {
16643
+ skipLimits(r);
16644
+ } else if (kind === 3) {
16645
+ r.byte();
16646
+ r.byte();
16647
+ } else if (kind === 4) {
16648
+ r.byte();
16649
+ r.u();
16650
+ } else throw new Error(`unknown wasm import kind ${kind}`);
16651
+ }
16652
+ return count;
16653
+ }
16585
16654
  function* readFunctionNames(bytes, names) {
16586
16655
  for (const r = wasmReader(bytes, names.start); r.at < names.end; ) {
16587
16656
  const id = r.byte();
@@ -16949,28 +17018,73 @@ function codeOnlySdkImage(bytes, constructorMask) {
16949
17018
  return Buffer.concat(out);
16950
17019
  }
16951
17020
  function constructorKeys(map2, bytes) {
16952
- const m = readModule(bytes);
16953
17021
  const first = map2.code[0];
16954
- if (!first || !m.bodies.length) throw new Error("link has no code");
16955
- const prefixes = m.bodies.map(({ prefix }) => prefix);
16956
- const delta = prefixes[0] - first.offset;
16957
- const byOffset = new Map(map2.code.map((chunk) => [chunk.offset + delta, chunk]));
17022
+ if (!first) throw new Error("link has no code");
17023
+ const sections = wasmSections(bytes);
17024
+ const code = sections.find((s) => s.id === 10);
17025
+ if (!code) throw new Error("link has no code");
16958
17026
  const ctors = map2.code.find((chunk) => chunk.section === "__wasm_call_ctors");
16959
17027
  if (!ctors) throw new Error("link has no constructors");
16960
- const index = prefixes.indexOf(ctors.offset + delta);
16961
- if (index < 0) throw new Error("constructor function not found by map offset");
16962
- const body = m.bodies[index];
16963
- const r = wasmReader(bytes, body.start);
17028
+ const importedFuncs = countImportedFunctions(
17029
+ bytes,
17030
+ sections.find((s) => s.id === 2)
17031
+ );
17032
+ const codeReader = wasmReader(bytes, code.start);
17033
+ const bodyCount = codeReader.u();
17034
+ if (!bodyCount) throw new Error("link has no code");
17035
+ const prefixes = new Uint32Array(bodyCount);
17036
+ let delta = 0;
17037
+ let ctorPrefix = -1;
17038
+ let ctorStart = -1;
17039
+ let ctorEnd = -1;
17040
+ for (let i = 0; i < bodyCount; i++) {
17041
+ const prefix = codeReader.at;
17042
+ const size2 = codeReader.u();
17043
+ prefixes[i] = prefix;
17044
+ if (i === 0) {
17045
+ delta = prefix - first.offset;
17046
+ ctorPrefix = ctors.offset + delta;
17047
+ }
17048
+ if (prefix === ctorPrefix) {
17049
+ ctorStart = codeReader.at;
17050
+ ctorEnd = ctorStart + size2;
17051
+ }
17052
+ codeReader.skip(size2);
17053
+ }
17054
+ if (ctorStart < 0) throw new Error("constructor function not found by map offset");
17055
+ let sorted2 = true;
17056
+ for (let i = 1; i < map2.code.length; i++) {
17057
+ if (map2.code[i].offset < map2.code[i - 1].offset) {
17058
+ sorted2 = false;
17059
+ break;
17060
+ }
17061
+ }
17062
+ const byOffset = sorted2 ? void 0 : new Map(map2.code.map((chunk) => [chunk.offset + delta, chunk]));
17063
+ const findChunk = (targetPrefix) => {
17064
+ if (byOffset) return byOffset.get(targetPrefix);
17065
+ const targetOffset = targetPrefix - delta;
17066
+ let lo = 0;
17067
+ let hi = map2.code.length - 1;
17068
+ while (lo <= hi) {
17069
+ const mid = lo + hi >> 1;
17070
+ const offset = map2.code[mid].offset;
17071
+ if (offset < targetOffset) lo = mid + 1;
17072
+ else if (offset > targetOffset) hi = mid - 1;
17073
+ else return map2.code[mid];
17074
+ }
17075
+ return void 0;
17076
+ };
17077
+ const r = wasmReader(bytes, ctorStart);
16964
17078
  for (let n = r.u(); n > 0; n--) {
16965
17079
  r.u();
16966
17080
  r.byte();
16967
17081
  }
16968
17082
  const keys = [];
16969
- while (r.at < body.end) {
17083
+ while (r.at < ctorEnd) {
16970
17084
  const op = r.byte();
16971
17085
  if (op === 16) {
16972
- const callee = r.u() - m.importedFuncs;
16973
- const chunk = byOffset.get(prefixes[callee]);
17086
+ const callee = r.u() - importedFuncs;
17087
+ const chunk = callee >= 0 && callee < bodyCount ? findChunk(prefixes[callee]) : void 0;
16974
17088
  if (!chunk) throw new Error("constructor without a map chunk");
16975
17089
  keys.push(chunkKey(chunk, ""));
16976
17090
  } else if (op !== 26 && op !== 11) throw new Error(`constructor op ${op}`);
@@ -17053,7 +17167,10 @@ function relocationEdges(bytes, segmentAddress) {
17053
17167
  r.skip(r.u());
17054
17168
  }
17055
17169
  }
17056
- const importedFunctions = readModule(bytes).importedFuncs;
17170
+ const importedFunctions = countImportedFunctions(
17171
+ bytes,
17172
+ sections.find((s) => s.id === 2)
17173
+ );
17057
17174
  const data = [];
17058
17175
  const dataFunctions = [];
17059
17176
  const bodyCount = bodyStarts.length;
@@ -17167,9 +17284,30 @@ function strongDefinitions(bytes) {
17167
17284
  ).map((s) => s.name);
17168
17285
  }
17169
17286
  function unslottedFunctions(bytes) {
17170
- const m = readModule(bytes);
17171
- const slotted = new Set([...m.slots.keys()].filter((index) => index >= m.importedFuncs));
17172
- return m.bodies.length - slotted.size;
17287
+ const sections = wasmSections(bytes);
17288
+ const importedFuncs = countImportedFunctions(
17289
+ bytes,
17290
+ sections.find((s) => s.id === 2)
17291
+ );
17292
+ const code = sections.find((s) => s.id === 10);
17293
+ const definedFuncs = code ? wasmReader(bytes, code.start).u() : 0;
17294
+ const slotted = /* @__PURE__ */ new Set();
17295
+ const elements = sections.find((s) => s.id === 9);
17296
+ if (elements) {
17297
+ const r = wasmReader(bytes, elements.start);
17298
+ for (let n = r.u(); n > 0; n--) {
17299
+ const flags = r.u();
17300
+ if (flags !== 0 && flags !== 2) throw new Error(`sdk image element flags ${flags}`);
17301
+ if (flags === 2) r.u();
17302
+ constant2(r);
17303
+ if (flags === 2) r.byte();
17304
+ for (let i = 0, count = r.u(); i < count; i++) {
17305
+ const index = r.u();
17306
+ if (index >= importedFuncs) slotted.add(index);
17307
+ }
17308
+ }
17309
+ }
17310
+ return definedFuncs - slotted.size;
17173
17311
  }
17174
17312
  var uleb, sleb, encodedName, section, PROCESS_EXPORTS, SWIFT_SDK_CONSTRUCTOR_LIMIT, FUNCTION_RELOCATIONS, MEMORY_RELOCATIONS, ADDEND_RELOCATIONS, FUNCTION_RELOC_MASK, MEMORY_RELOC_MASK, ADDEND_RELOC_MASK;
17175
17313
  var init_swift_sdk_image_wasm = __esm({
@@ -17553,6 +17691,11 @@ var init_swiftRuntimeProductContract = __esm({
17553
17691
  });
17554
17692
 
17555
17693
  // src/swift-wasm-prune.ts
17694
+ function sha256Hex(bytes) {
17695
+ if (typeof Bun !== "undefined")
17696
+ return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
17697
+ return (0, import_node_crypto14.createHash)("sha256").update(bytes).digest("hex");
17698
+ }
17556
17699
  function readULEB2(b, o) {
17557
17700
  let res = 0;
17558
17701
  let shift = 0;
@@ -18305,6 +18448,42 @@ function parseWasmObjectBytes(file, buf, isDist, symbolFlagOffsets) {
18305
18448
  }
18306
18449
  }
18307
18450
  }
18451
+ const segObjCClasses = /* @__PURE__ */ new Map();
18452
+ for (let segIdx = 0; segIdx < sEnds.length; segIdx++) {
18453
+ const rangeStart = dataStart + sPayloadStarts[segIdx];
18454
+ const rangeEnd = dataStart + sEnds[segIdx];
18455
+ const sliceLen = rangeEnd - rangeStart;
18456
+ if (sliceLen < 4) continue;
18457
+ const slice = Buffer.from(rawBuf.buffer, rawBuf.byteOffset + rangeStart, sliceLen);
18458
+ let segPos = 0;
18459
+ let classes;
18460
+ while (segPos < sliceLen - 3) {
18461
+ const at = slice.indexOf("So", segPos);
18462
+ if (at < 0 || at >= sliceLen - 2) break;
18463
+ let digitEnd = at + 2;
18464
+ let length = 0;
18465
+ while (digitEnd < sliceLen) {
18466
+ const ch = slice[digitEnd];
18467
+ if (ch < 48 || ch > 57) break;
18468
+ length = length * 10 + (ch - 48);
18469
+ digitEnd++;
18470
+ }
18471
+ if (digitEnd === at + 2) {
18472
+ segPos = at + 2;
18473
+ continue;
18474
+ }
18475
+ segPos = digitEnd;
18476
+ const nameEnd = digitEnd + length;
18477
+ if (nameEnd >= sliceLen || slice[nameEnd] !== 67) continue;
18478
+ const symbol2 = `._OBJC_CLASS_${slice.toString("latin1", digitEnd, nameEnd)}`;
18479
+ if (!classes) {
18480
+ classes = [symbol2];
18481
+ segObjCClasses.set(segIdx, classes);
18482
+ } else if (!classes.includes(symbol2)) {
18483
+ classes.push(symbol2);
18484
+ }
18485
+ }
18486
+ }
18308
18487
  return {
18309
18488
  file,
18310
18489
  isDist,
@@ -18334,10 +18513,7 @@ function parseWasmObjectBytes(file, buf, isDist, symbolFlagOffsets) {
18334
18513
  objcCategoryTargets,
18335
18514
  rootFuncs,
18336
18515
  rootSegs,
18337
- segPayloadRanges: sEnds.map((end, i) => [
18338
- dataStart + sPayloadStarts[i],
18339
- dataStart + end
18340
- ])
18516
+ segObjCClasses
18341
18517
  };
18342
18518
  }
18343
18519
  function parseWasmObjectFile(file, isDist) {
@@ -18705,16 +18881,26 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
18705
18881
  transformations.set(file, {
18706
18882
  output,
18707
18883
  inputSha256,
18708
- outputSha256: (0, import_node_crypto14.createHash)("sha256").update(result).digest("hex"),
18884
+ outputSha256: sha256Hex(result),
18709
18885
  kind
18710
18886
  });
18711
18887
  };
18712
18888
  const distFiles = [];
18713
18889
  const distBaseNames = /* @__PURE__ */ new Set();
18714
18890
  const eagerFiles = [];
18891
+ const parsedBuildObjects = /* @__PURE__ */ new Map();
18715
18892
  const lazyBuildObjects = /* @__PURE__ */ new Map();
18716
18893
  const extraArchiveObjs = [];
18717
18894
  const objectBytes = /* @__PURE__ */ new Map();
18895
+ const archiveMembers = /* @__PURE__ */ new Map();
18896
+ const readArchiveMembers = (archive) => {
18897
+ let members2 = archiveMembers.get(archive);
18898
+ if (!members2) {
18899
+ members2 = readArMembers(new Uint8Array(import_node_fs29.default.readFileSync(archive)));
18900
+ archiveMembers.set(archive, members2);
18901
+ }
18902
+ return members2;
18903
+ };
18718
18904
  let inStartLib = false;
18719
18905
  let swiftrtOrigPath = "";
18720
18906
  for (const t of tokens2) {
@@ -18751,8 +18937,10 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
18751
18937
  break;
18752
18938
  }
18753
18939
  }
18754
- if (definesObjCClassOrCategory) eagerFiles.push(t);
18755
- else lazyBuildObjects.set(t, obj);
18940
+ if (definesObjCClassOrCategory) {
18941
+ parsedBuildObjects.set(t, obj);
18942
+ eagerFiles.push(t);
18943
+ } else lazyBuildObjects.set(t, obj);
18756
18944
  } else {
18757
18945
  eagerFiles.push(t);
18758
18946
  }
@@ -18760,7 +18948,7 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
18760
18948
  lazyBuildObjects.set(t, parseWasmObjectFile(t, false));
18761
18949
  }
18762
18950
  } else if (!inStartLib && t.endsWith(".a") && !t.endsWith("libclang_rt.builtins-wasm64.a") && import_node_fs29.default.existsSync(t)) {
18763
- const members2 = readArMembers(new Uint8Array(import_node_fs29.default.readFileSync(t)));
18951
+ const members2 = readArchiveMembers(t);
18764
18952
  for (const m of members2) {
18765
18953
  const object8 = parseWasmObjectBytes(`${t}(${m.name})`, m.bytes, false);
18766
18954
  extraArchiveObjs.push(object8);
@@ -18783,7 +18971,7 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
18783
18971
  );
18784
18972
  const archiveOverlapsDist = (archive) => {
18785
18973
  if (!import_node_fs29.default.existsSync(archive)) return false;
18786
- const members2 = readArMembers(new Uint8Array(import_node_fs29.default.readFileSync(archive)));
18974
+ const members2 = readArchiveMembers(archive);
18787
18975
  return members2.some((m) => distBaseNames.has(m.name));
18788
18976
  };
18789
18977
  for (const t of tokens2) {
@@ -18805,7 +18993,7 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
18805
18993
  import_node_path28.default.basename(archive)
18806
18994
  );
18807
18995
  const ordinals = /* @__PURE__ */ new Map();
18808
- for (const m of readArMembers(new Uint8Array(import_node_fs29.default.readFileSync(archive)))) {
18996
+ for (const m of readArchiveMembers(archive)) {
18809
18997
  const ordinal = (ordinals.get(m.name) ?? 0) + 1;
18810
18998
  ordinals.set(m.name, ordinal);
18811
18999
  if (distBaseNames.has(m.name) || writtenLeftovers.has(m.name)) continue;
@@ -18839,7 +19027,7 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
18839
19027
  recordTransformation(
18840
19028
  swiftrtOrigPath,
18841
19029
  patchedSwiftrtPath,
18842
- link ? (0, import_node_crypto14.createHash)("sha256").update(input).digest("hex") : "",
19030
+ link ? sha256Hex(input) : "",
18843
19031
  result,
18844
19032
  "swiftrt"
18845
19033
  );
@@ -19326,7 +19514,7 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
19326
19514
  }
19327
19515
  for (const f of eagerFiles) {
19328
19516
  const isDist = f.startsWith(distDir);
19329
- const obj = distObjs.get(f) ?? parseWasmObjectFile(f, isDist);
19517
+ const obj = distObjs.get(f) ?? parsedBuildObjects.get(f) ?? parseWasmObjectFile(f, isDist);
19330
19518
  extractObject(obj);
19331
19519
  if (isDist) {
19332
19520
  const base2 = import_node_path28.default.basename(f);
@@ -19376,32 +19564,9 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
19376
19564
  "$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZTf4nd_n"
19377
19565
  ]);
19378
19566
  const keepObjCClassesNamedInSegment = (obj, segIdx) => {
19379
- const range3 = obj.segPayloadRanges[segIdx];
19380
- if (!range3) return;
19381
- const [rangeStart, rangeEnd] = range3;
19382
- if (rangeEnd - rangeStart < 4) return;
19383
- let bytes = objectBytes.get(obj);
19384
- if (!bytes) objectBytes.set(obj, bytes = import_node_fs29.default.readFileSync(obj.file));
19385
- let pos = rangeStart;
19386
- while (pos < rangeEnd - 3) {
19387
- const at = bytes.indexOf("So", pos);
19388
- if (at < 0 || at >= rangeEnd - 2) break;
19389
- let digitEnd = at + 2;
19390
- let length = 0;
19391
- while (digitEnd < rangeEnd) {
19392
- const ch = bytes[digitEnd];
19393
- if (ch < 48 || ch > 57) break;
19394
- length = length * 10 + (ch - 48);
19395
- digitEnd++;
19396
- }
19397
- if (digitEnd === at + 2) {
19398
- pos = at + 2;
19399
- continue;
19400
- }
19401
- pos = digitEnd;
19402
- const nameEnd = digitEnd + length;
19403
- if (nameEnd >= rangeEnd || bytes[nameEnd] !== 67) continue;
19404
- const symbol2 = `._OBJC_CLASS_${bytes.toString("latin1", digitEnd, nameEnd)}`;
19567
+ const symbols = obj.segObjCClasses.get(segIdx);
19568
+ if (!symbols) return;
19569
+ for (const symbol2 of symbols) {
19405
19570
  for (const provider of lazyProviders.get(symbol2) ?? []) {
19406
19571
  eagerDynamicObjects.add(provider);
19407
19572
  extractObject(provider);
@@ -19497,7 +19662,7 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
19497
19662
  const cached2 = objectBytes.get(obj);
19498
19663
  const buf = cached2 ? new Uint8Array(cached2) : new Uint8Array(import_node_fs29.default.readFileSync(obj.file));
19499
19664
  const rawBuf = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
19500
- const inputSha256 = link ? (0, import_node_crypto14.createHash)("sha256").update(buf).digest("hex") : "";
19665
+ const inputSha256 = link ? sha256Hex(buf) : "";
19501
19666
  const fLive = liveFuncs.get(obj);
19502
19667
  const sLive = liveSegs.get(obj);
19503
19668
  const dLive = liveDataSyms.get(obj);
@@ -21751,13 +21916,34 @@ function dropWasmCustomSection(bytes, name3) {
21751
21916
  }
21752
21917
  return Buffer.concat(parts);
21753
21918
  }
21919
+ function writeWasmCustomSections(bytes, entries2) {
21920
+ if (entries2.length === 0) return Buffer.concat([bytes]);
21921
+ const replaced = new Set(entries2.map(([name3]) => name3));
21922
+ const parts = [];
21923
+ let sliceStart = 0;
21924
+ let sliceEnd = 8;
21925
+ for (const { id, start, end } of wasmSections2(bytes)) {
21926
+ if (id === 0 && replaced.has(readWasmSection(bytes, start, end).name())) {
21927
+ if (sliceEnd > sliceStart) parts.push(bytes.subarray(sliceStart, sliceEnd));
21928
+ sliceStart = end;
21929
+ sliceEnd = end;
21930
+ } else {
21931
+ sliceEnd = end;
21932
+ }
21933
+ }
21934
+ if (sliceEnd > sliceStart) parts.push(bytes.subarray(sliceStart, sliceEnd));
21935
+ for (const [name3, data] of entries2) {
21936
+ const nameBytes = Buffer.from(encodeWasmName(name3));
21937
+ parts.push(
21938
+ Buffer.from([0, ...encodeWasmNumber(nameBytes.length + data.length)]),
21939
+ nameBytes,
21940
+ data
21941
+ );
21942
+ }
21943
+ return Buffer.concat(parts);
21944
+ }
21754
21945
  function writeWasmCustomSection(bytes, name3, data) {
21755
- const section2 = Buffer.concat([Buffer.from(encodeWasmName(name3)), data]);
21756
- return Buffer.concat([
21757
- dropWasmCustomSection(bytes, name3),
21758
- Buffer.from([0, ...encodeWasmNumber(section2.length)]),
21759
- section2
21760
- ]);
21946
+ return writeWasmCustomSections(bytes, [[name3, data]]);
21761
21947
  }
21762
21948
  function readWasmMemory(bytes) {
21763
21949
  return readWasmMemoryAndTableImports(bytes, wasmSections2(bytes)).memory;
@@ -22029,6 +22215,16 @@ var init_wasm_narrow_boundary = __esm({
22029
22215
  });
22030
22216
 
22031
22217
  // src/swift-guest-dyld-table.ts
22218
+ function sha256Buffer(bytes) {
22219
+ if (typeof Bun !== "undefined")
22220
+ return Buffer.from(new Bun.CryptoHasher("sha256").update(bytes).digest());
22221
+ return (0, import_node_crypto17.createHash)("sha256").update(bytes).digest();
22222
+ }
22223
+ function sha256Hex2(bytes) {
22224
+ if (typeof Bun !== "undefined")
22225
+ return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
22226
+ return (0, import_node_crypto17.createHash)("sha256").update(bytes).digest("hex");
22227
+ }
22032
22228
  function uleb3(value) {
22033
22229
  const bytes = [];
22034
22230
  for (let rest = value; ; rest = Math.floor(rest / 128)) {
@@ -22063,7 +22259,7 @@ function encodeGuestDyldTable(rows) {
22063
22259
  }
22064
22260
  const file = Buffer.concat(packs);
22065
22261
  const header = Buffer.alloc(40 + packs.length * 8);
22066
- (0, import_node_crypto17.createHash)("sha256").update(file).digest().copy(header, 0);
22262
+ sha256Buffer(file).copy(header, 0);
22067
22263
  header.writeUInt32LE(file.length, 32);
22068
22264
  header.writeUInt32LE(packs.length, 36);
22069
22265
  let offset = 0;
@@ -22075,11 +22271,11 @@ function encodeGuestDyldTable(rows) {
22075
22271
  const names = firsts.flatMap((name3) => [name3, Buffer.of(0)]);
22076
22272
  return { index: Buffer.concat([header, ...names]), packs: file };
22077
22273
  }
22078
- function moveGuestDyldTable(map2, wasm, symbols, bindingValues = /* @__PURE__ */ new Map()) {
22274
+ function moveGuestDyldTable(map2, wasm, symbols, bindingValues = /* @__PURE__ */ new Map(), extraSections = []) {
22079
22275
  const range3 = guestDyldValueRange(map2);
22080
22276
  if (!range3) {
22081
22277
  if (symbols.length) throw new Error("link map has no dyld values");
22082
- return wasm;
22278
+ return extraSections.length ? writeWasmCustomSections(wasm, extraSections) : wasm;
22083
22279
  }
22084
22280
  if (range3.length !== symbols.length * 8)
22085
22281
  throw new Error("linked dyld values do not match the ledger rows");
@@ -22094,11 +22290,11 @@ function moveGuestDyldTable(map2, wasm, symbols, bindingValues = /* @__PURE__ */
22094
22290
  return binding === void 0 ? { name: name3, image, kind: 0, value: view.getBigUint64(index2 * 8, true) } : { name: name3, image, kind: 1, value: BigInt(binding) };
22095
22291
  });
22096
22292
  const { index, packs } = encodeGuestDyldTable(rows);
22097
- return writeWasmCustomSection(
22098
- writeWasmCustomSection(taken.wasm, NATIVE_DYLD_TABLE_SECTION, index),
22099
- NATIVE_DYLD_PACKS_SECTION,
22100
- packs
22101
- );
22293
+ return writeWasmCustomSections(taken.wasm, [
22294
+ [NATIVE_DYLD_TABLE_SECTION, index],
22295
+ [NATIVE_DYLD_PACKS_SECTION, packs],
22296
+ ...extraSections
22297
+ ]);
22102
22298
  }
22103
22299
  function guestDyldValueRange(map2) {
22104
22300
  const suffix = `:(${GUEST_DYLD_VALUES_SECTION})`;
@@ -22127,7 +22323,7 @@ function splitSwiftDyldTable(wasm) {
22127
22323
  const bytes = Buffer.from(packs);
22128
22324
  return {
22129
22325
  module: dropWasmCustomSection(wasm, NATIVE_DYLD_PACKS_SECTION),
22130
- table: { sha256: (0, import_node_crypto17.createHash)("sha256").update(bytes).digest("hex"), bytes }
22326
+ table: { sha256: sha256Hex2(bytes), bytes }
22131
22327
  };
22132
22328
  }
22133
22329
  var import_node_crypto17, import_node_zlib4, PACK_BYTES;
@@ -22663,6 +22859,7 @@ function finalizeGuestProjectionStorage(options2) {
22663
22859
  const owner = options2.owners.get(options2.projectionObject);
22664
22860
  if (owner === void 0) throw new Error("guest projection object has no image owner");
22665
22861
  const ranges = [];
22862
+ const data = [];
22666
22863
  const spans = guestLinkedSpans(
22667
22864
  options2.map,
22668
22865
  options2.linked,
@@ -22673,7 +22870,8 @@ function finalizeGuestProjectionStorage(options2) {
22673
22870
  {
22674
22871
  trackedObject: options2.projectionObject,
22675
22872
  trackedObjectOwner: owner,
22676
- trackedLinearSpans: ranges
22873
+ trackedLinearSpans: ranges,
22874
+ optimizedDataSegments: data
22677
22875
  }
22678
22876
  );
22679
22877
  const images = planGuestProjectionRegions(
@@ -22682,7 +22880,6 @@ function finalizeGuestProjectionStorage(options2) {
22682
22880
  options2.sdkSpans ? [...spans, ...options2.sdkSpans] : spans
22683
22881
  );
22684
22882
  const result = Buffer.from(options2.optimized);
22685
- const data = guestWasmDataSegments(options2.optimized, options2.sdkSpans === void 0);
22686
22883
  const locations = /* @__PURE__ */ new Map();
22687
22884
  const counts = /* @__PURE__ */ new Map();
22688
22885
  const uuids = /* @__PURE__ */ new Map();
@@ -23356,17 +23553,17 @@ var init_binaryen_lock = __esm({
23356
23553
  "linux-x64": {
23357
23554
  asset: "x86_64-linux",
23358
23555
  upstreamSha256: "195ddc94f9bc89f45abdabb0b9eea86023d727ba90eac8b35b80f2544fc30572",
23359
- sha256: "1024974f254c1c2edd738246ec6af5add16d3d36b5f58a94545febda3b33c869"
23556
+ sha256: "40062fb1ebbad7f04f361c1e3bb309dffb1d2318dd2e12235a0e7e820e18d6c9"
23360
23557
  },
23361
23558
  "linux-arm64": {
23362
23559
  asset: "aarch64-linux",
23363
23560
  upstreamSha256: "c58562417836c5d0493d89bdefc434933bdc097db641b483df86bcfa557a107f",
23364
- sha256: "7dedfc9f5cb32e75a28831f3b5aa053fd3e0bdd74f73dc4d1b1588947236daef"
23561
+ sha256: "d79b09d5b66f62f9e4bb691517b174b42bcdc0b7f40769d1993b7c565b0a54c7"
23365
23562
  },
23366
23563
  "darwin-arm64": {
23367
23564
  asset: "arm64-macos",
23368
23565
  upstreamSha256: "98aad827847af7ef990ed7098d885725c8e5b5aae75073403635617ae4e259aa",
23369
- sha256: "0b56e0a06b6a873877871537a120fd94e2121e67f4bce5f8b5252c47b615854a"
23566
+ sha256: "29342632a4fa52466c4feea846698fe5aa56ff46226a914d60b65b8735373d63"
23370
23567
  }
23371
23568
  }
23372
23569
  };
@@ -23860,6 +24057,7 @@ function outputPath(args) {
23860
24057
  }
23861
24058
  function withOutput(args, output, discovery) {
23862
24059
  const result = [];
24060
+ let stripsDebug = false;
23863
24061
  for (let i = 0; i < args.length; i++) {
23864
24062
  const arg = args[i];
23865
24063
  if (arg === "-o" || arg === "--output") {
@@ -23869,9 +24067,12 @@ function withOutput(args, output, discovery) {
23869
24067
  if (arg.startsWith("--output=")) continue;
23870
24068
  if (discovery && (arg.startsWith("--why-extract=") || arg.startsWith("--Map=")))
23871
24069
  continue;
24070
+ if (arg === "--strip-debug" || arg === "-S" || arg === "--strip-all" || arg === "-s")
24071
+ stripsDebug = true;
23872
24072
  result.push(arg);
23873
24073
  }
23874
24074
  if (discovery) result.push("--allow-multiple-definition");
24075
+ if (!stripsDebug) result.push("--strip-debug");
23875
24076
  result.push("-o", output);
23876
24077
  return result;
23877
24078
  }
@@ -23902,6 +24103,37 @@ async function linkGuestImages(options2) {
23902
24103
  }
23903
24104
  return import_node_fs34.default.readFileSync(trace, "utf8");
23904
24105
  };
24106
+ const runLinkAsync = async (name3, arguments_) => {
24107
+ const response = import_node_path32.default.join(directory2, `${name3}.rsp`);
24108
+ const trace = import_node_path32.default.join(directory2, `${name3}-inputs.txt`);
24109
+ import_node_fs34.default.writeFileSync(
24110
+ response,
24111
+ [...arguments_, "--trace"].map((argument2) => JSON.stringify(argument2)).join(" ")
24112
+ );
24113
+ const output = import_node_fs34.default.openSync(trace, "w");
24114
+ try {
24115
+ await new Promise((resolve4, reject) => {
24116
+ const child = (0, import_node_child_process19.spawn)(wasmLd, [`@${response}`], {
24117
+ stdio: ["ignore", output, "pipe"]
24118
+ });
24119
+ const stderr = [];
24120
+ child.stderr?.on("data", (chunk) => stderr.push(chunk));
24121
+ child.once("error", reject);
24122
+ child.once("close", (code, signal) => {
24123
+ if (code === 0) resolve4();
24124
+ else
24125
+ reject(
24126
+ new Error(
24127
+ `wasm-ld (${name3}) failed (${signal ?? code}): ${Buffer.concat(stderr).toString("utf8")}`
24128
+ )
24129
+ );
24130
+ });
24131
+ });
24132
+ } finally {
24133
+ import_node_fs34.default.closeSync(output);
24134
+ }
24135
+ return import_node_fs34.default.readFileSync(trace, "utf8");
24136
+ };
23905
24137
  const preselection = options2.projection && options2.preselectionDiscovery ? options2.preselectionDiscovery : void 0;
23906
24138
  let discoveryProjection;
23907
24139
  if (options2.projection) {
@@ -24131,6 +24363,7 @@ async function linkGuestImages(options2) {
24131
24363
  };
24132
24364
  const ledgerObjectPromise = compileLedgerAsync("ledger", ledger.llvmIR);
24133
24365
  const appLedgerObjectPromise = options2.onSplitInputs && ledger.appLLVMIR ? compileLedgerAsync("app-ledger", ledger.appLLVMIR) : void 0;
24366
+ let deferredFinalLink;
24134
24367
  try {
24135
24368
  const replacements = /* @__PURE__ */ new Map();
24136
24369
  const linkedOwners = /* @__PURE__ */ new Map();
@@ -24232,7 +24465,7 @@ async function linkGuestImages(options2) {
24232
24465
  });
24233
24466
  const finalOutput = import_node_path32.default.join(directory2, "final.wasm");
24234
24467
  const finalWhy = import_node_path32.default.join(directory2, "final-why-extract.txt");
24235
- const linkFinal = (projectionObject2, layoutMap) => runLink("final", [
24468
+ const finalLinkArgs = (projectionObject2, layoutMap) => [
24236
24469
  ...withOutput(finalArgs, finalOutput, false),
24237
24470
  ledgerObject,
24238
24471
  `@${lazyExports}`,
@@ -24240,10 +24473,38 @@ async function linkGuestImages(options2) {
24240
24473
  ...provider ? [`--undefined=${providerSymbol}`] : [],
24241
24474
  ...layoutMap ? [`--Map=${layoutMap}`] : [],
24242
24475
  `--why-extract=${finalWhy}`
24243
- ]);
24476
+ ];
24477
+ const linkFinal = (projectionObject2, layoutMap) => runLink("final", finalLinkArgs(projectionObject2, layoutMap));
24478
+ const finalizeFinalLink = (trace) => {
24479
+ const finalSelection = selectedGuestLinkInputs(
24480
+ remapGuestLinkPlan(plan, replacements),
24481
+ finalArgs,
24482
+ import_node_fs34.default.readFileSync(finalWhy, "utf8"),
24483
+ trace,
24484
+ finalArchives
24485
+ );
24486
+ const original = new Map(
24487
+ [...replacements].map(([before2, after2]) => [after2, before2])
24488
+ );
24489
+ const key2 = (item) => JSON.stringify([original.get(item.artifact) ?? item.artifact, item.member]);
24490
+ const before = new Set(selected.map(key2));
24491
+ const after = new Set(finalSelection.map(key2));
24492
+ const changed = [...before].filter((item) => !after.has(item));
24493
+ changed.push(...[...after].filter((item) => !before.has(item)));
24494
+ if (changed.length)
24495
+ throw new Error(
24496
+ `guest link selected different inputs after rewriting:
24497
+ ${changed.join("\n")}`
24498
+ );
24499
+ import_node_fs34.default.renameSync(finalOutput, outputPath(args));
24500
+ if (KEEP_WASM_NAMES)
24501
+ import_node_fs34.default.writeFileSync(
24502
+ outputPath(args),
24503
+ nameGuestImageAliases(import_node_fs34.default.readFileSync(outputPath(args)), plan.symbols)
24504
+ );
24505
+ };
24244
24506
  let projectionObject;
24245
24507
  let projectionStorage;
24246
- let finalTrace;
24247
24508
  if (options2.projection) {
24248
24509
  const projection = options2.projection;
24249
24510
  if (!plan.images.some((image) => image.id === projection.image))
@@ -24296,8 +24557,18 @@ async function linkGuestImages(options2) {
24296
24557
  [...projection.clangOptions, "-c", projectionSource, "-o", projectionObject],
24297
24558
  { stdio: "pipe" }
24298
24559
  );
24299
- finalTrace = linkFinal(projectionObject, callerMap ? void 0 : layoutMap);
24300
- if (sharedSdk) break;
24560
+ if (sharedSdk && options2.onFinalLink && options2.onSplitInputs && appLedgerObjectPromise) {
24561
+ deferredFinalLink = runLinkAsync(
24562
+ "final",
24563
+ finalLinkArgs(projectionObject, callerMap ? void 0 : layoutMap)
24564
+ ).then((trace) => finalizeFinalLink(trace));
24565
+ break;
24566
+ }
24567
+ const finalTrace = linkFinal(projectionObject, callerMap ? void 0 : layoutMap);
24568
+ if (sharedSdk) {
24569
+ finalizeFinalLink(finalTrace);
24570
+ break;
24571
+ }
24301
24572
  const wasm = import_node_fs34.default.readFileSync(finalOutput);
24302
24573
  const actual = guestProjectionRegionCounts(
24303
24574
  images.length,
@@ -24309,38 +24580,17 @@ async function linkGuestImages(options2) {
24309
24580
  sectionOwners
24310
24581
  )
24311
24582
  );
24312
- if (actual.every((count, index) => count <= capacities[index].regions)) break;
24583
+ if (actual.every((count, index) => count <= capacities[index].regions)) {
24584
+ finalizeFinalLink(finalTrace);
24585
+ break;
24586
+ }
24313
24587
  capacities = capacities.map((capacity, index) => ({
24314
24588
  ...capacity,
24315
24589
  regions: Math.max(actual[index], capacity.regions)
24316
24590
  }));
24317
24591
  }
24318
24592
  linkedOwners.set(projectionObject, projection.image);
24319
- } else finalTrace = linkFinal();
24320
- const finalSelection = selectedGuestLinkInputs(
24321
- remapGuestLinkPlan(plan, replacements),
24322
- finalArgs,
24323
- import_node_fs34.default.readFileSync(finalWhy, "utf8"),
24324
- finalTrace,
24325
- finalArchives
24326
- );
24327
- const original = new Map([...replacements].map(([before2, after2]) => [after2, before2]));
24328
- const key2 = (item) => JSON.stringify([original.get(item.artifact) ?? item.artifact, item.member]);
24329
- const before = new Set(selected.map(key2));
24330
- const after = new Set(finalSelection.map(key2));
24331
- const changed = [...before].filter((item) => !after.has(item));
24332
- changed.push(...[...after].filter((item) => !before.has(item)));
24333
- if (changed.length)
24334
- throw new Error(
24335
- `guest link selected different inputs after rewriting:
24336
- ${changed.join("\n")}`
24337
- );
24338
- import_node_fs34.default.renameSync(finalOutput, outputPath(args));
24339
- if (KEEP_WASM_NAMES)
24340
- import_node_fs34.default.writeFileSync(
24341
- outputPath(args),
24342
- nameGuestImageAliases(import_node_fs34.default.readFileSync(outputPath(args)), plan.symbols)
24343
- );
24593
+ } else finalizeFinalLink(linkFinal());
24344
24594
  if (projectionStorage && projectionObject)
24345
24595
  options2.projection.onReserved(projectionStorage, projectionObject);
24346
24596
  options2.onLinkedOwners?.(linkedOwners);
@@ -24376,11 +24626,13 @@ ${changed.join("\n")}`
24376
24626
  appDefinedSymbols
24377
24627
  });
24378
24628
  }
24629
+ if (deferredFinalLink) options2.onFinalLink?.(deferredFinalLink);
24379
24630
  return selected;
24380
24631
  } catch (error) {
24381
24632
  await Promise.allSettled([
24382
24633
  ledgerObjectPromise,
24383
- ...appLedgerObjectPromise ? [appLedgerObjectPromise] : []
24634
+ ...appLedgerObjectPromise ? [appLedgerObjectPromise] : [],
24635
+ ...deferredFinalLink ? [deferredFinalLink] : []
24384
24636
  ]);
24385
24637
  throw error;
24386
24638
  }
@@ -25012,6 +25264,7 @@ async function linkPrunedGuestImages(options2) {
25012
25264
  identities: aliasGuestLinkIdentities(identities, prepared.archives)
25013
25265
  };
25014
25266
  }
25267
+ let finalLinkDone;
25015
25268
  const selected = await linkCompleteGuestImages({
25016
25269
  plan,
25017
25270
  args: [...linkedArgs, `--Map=${options2.mapPath}`],
@@ -25025,6 +25278,9 @@ async function linkPrunedGuestImages(options2) {
25025
25278
  resolvePlan: options2.resolvePlan,
25026
25279
  sharedSdk: options2.sharedSdk,
25027
25280
  onSplitInputs: options2.onSplitInputs,
25281
+ onFinalLink: options2.deferFinalLink ? (done) => {
25282
+ finalLinkDone = done;
25283
+ } : void 0,
25028
25284
  onDyldRows: options2.onDyldRows,
25029
25285
  onLinkedOwners: (value) => {
25030
25286
  owners = value;
@@ -25038,7 +25294,8 @@ async function linkPrunedGuestImages(options2) {
25038
25294
  owners,
25039
25295
  generatedSectionOwners,
25040
25296
  sdk: sdk2,
25041
- mapPath: options2.mapPath
25297
+ mapPath: options2.mapPath,
25298
+ finalLinkDone
25042
25299
  };
25043
25300
  }
25044
25301
  var import_node_child_process19, import_node_fs34, import_node_path32, import_node_util4, execFileAsync, WASM_MAGIC, BITCODE_MAGIC;
@@ -25116,8 +25373,13 @@ function clangBinaryStamp(file) {
25116
25373
  const stat = (0, import_node_fs35.statSync)(file, { bigint: true });
25117
25374
  return [file, stat.size, stat.mtimeNs].join(":");
25118
25375
  }
25376
+ function sha256Hex3(bytes) {
25377
+ if (typeof Bun !== "undefined")
25378
+ return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
25379
+ return (0, import_node_crypto21.createHash)("sha256").update(bytes).digest("hex");
25380
+ }
25119
25381
  function clangWrapperStamp(file) {
25120
- return (0, import_node_crypto21.createHash)("sha256").update((0, import_node_fs35.readFileSync)(file)).digest("hex");
25382
+ return sha256Hex3((0, import_node_fs35.readFileSync)(file));
25121
25383
  }
25122
25384
  function clangArgsNeedCwd(args) {
25123
25385
  const pathFlags = /* @__PURE__ */ new Set([
@@ -25267,22 +25529,35 @@ function sourceGuestClangLinkOptions(options2) {
25267
25529
  "SOURCE_DATE_EPOCH"
25268
25530
  ].map((name3) => process.env[name3] ?? "");
25269
25531
  const replays = [];
25532
+ const realPathCache = /* @__PURE__ */ new Map();
25533
+ const cachedRealpath = (file) => {
25534
+ let resolved = realPathCache.get(file);
25535
+ if (resolved === void 0) {
25536
+ resolved = (0, import_node_fs35.realpathSync)(file);
25537
+ realPathCache.set(file, resolved);
25538
+ }
25539
+ return resolved;
25540
+ };
25541
+ const resolvedSwiftCompiler = cachedRealpath(options2.swiftCompiler);
25270
25542
  let clang;
25543
+ let clangWrapper;
25271
25544
  let clangStamp;
25272
25545
  let wrapperStamp;
25273
25546
  for (const file of wanted) {
25274
25547
  const command = commands.get(file);
25275
25548
  if (!command) throw new Error(`missing source object producer ${file}`);
25276
25549
  if (command.tool === "shell") {
25277
- if (!command.args.length || (0, import_node_fs35.realpathSync)(command.args[0]) !== (0, import_node_fs35.realpathSync)(options2.swiftCompiler))
25550
+ if (!command.args.length || cachedRealpath(command.args[0]) !== resolvedSwiftCompiler)
25278
25551
  throw new Error(`unsupported source object producer ${file}`);
25279
25552
  continue;
25280
25553
  }
25281
- const compiler = command.args[0] ? (0, import_node_fs35.realpathSync)(command.args[0]) : "";
25282
- clang ??= (0, import_node_fs35.realpathSync)(import_node_path33.default.join(options2.toolchainBin, "clang"));
25283
- if (command.tool !== "clang" || compiler !== clang && compiler !== (0, import_node_fs35.realpathSync)(import_node_path33.default.join(options2.buildDirectory, CLANG_TARGET_MODULE_WRAPPER)))
25554
+ const compiler = command.args[0] ? cachedRealpath(command.args[0]) : "";
25555
+ clang ??= cachedRealpath(import_node_path33.default.join(options2.toolchainBin, "clang"));
25556
+ if (command.tool !== "clang" || compiler !== clang && compiler !== (clangWrapper ??= cachedRealpath(
25557
+ import_node_path33.default.join(options2.buildDirectory, CLANG_TARGET_MODULE_WRAPPER)
25558
+ )))
25284
25559
  throw new Error(`unsupported source object producer ${file}`);
25285
- const key2 = (0, import_node_crypto21.createHash)("sha256").update(
25560
+ const key2 = sha256Hex3(
25286
25561
  JSON.stringify([
25287
25562
  "clang-link-options/v2",
25288
25563
  clangArgsNeedCwd(command.args) ? process.cwd() : null,
@@ -25292,11 +25567,8 @@ function sourceGuestClangLinkOptions(options2) {
25292
25567
  compiler === clang ? null : wrapperStamp ??= clangWrapperStamp(compiler),
25293
25568
  clangProducerStamp(file)
25294
25569
  ])
25295
- ).digest("hex");
25296
- const cacheFile = import_node_path33.default.join(
25297
- cacheDirectory,
25298
- (0, import_node_crypto21.createHash)("sha256").update(file).digest("hex") + ".json"
25299
25570
  );
25571
+ const cacheFile = import_node_path33.default.join(cacheDirectory, sha256Hex3(file) + ".json");
25300
25572
  const cached2 = readClangLinkOptions(cacheFile, key2);
25301
25573
  if (cached2) {
25302
25574
  validateClangLinkOptions(cached2);
@@ -27519,7 +27791,7 @@ function headerClosure(roots) {
27519
27791
  ).filter((file) => !file.endsWith(`/${j.exclude}`));
27520
27792
  const nitroFiles = roots.nitroModules ? headerFiles2(roots.nitroModules, n.from, n.skip, new RegExp(n.keep)) : [];
27521
27793
  const hashes = (base2, files2) => Object.fromEntries(
27522
- files2.map((file) => [file, sha256Hex((0, import_node_fs39.readFileSync)(import_node_path37.default.join(base2, file)))])
27794
+ files2.map((file) => [file, sha256Hex4((0, import_node_fs39.readFileSync)(import_node_path37.default.join(base2, file)))])
27523
27795
  );
27524
27796
  return {
27525
27797
  jsi: hashes(roots.reactNative, jsiFiles),
@@ -27683,11 +27955,11 @@ function verifyInstalledAdapter(family, directory2, pin2) {
27683
27955
  if (JSON.stringify(recorded) !== JSON.stringify(pinned))
27684
27956
  throw new Error(`${label} manifest does not match the lock this build carries`);
27685
27957
  const bytes = (0, import_node_fs39.readFileSync)(import_node_path37.default.join(directory2, archive.path));
27686
- if (bytes.length !== archive.size || sha256Hex(bytes) !== archive.sha256)
27958
+ if (bytes.length !== archive.size || sha256Hex4(bytes) !== archive.sha256)
27687
27959
  throw new Error(`${label} library does not match its manifest`);
27688
27960
  return manifest;
27689
27961
  }
27690
- var import_node_crypto23, import_node_fs39, import_node_path37, ADAPTER_MANIFEST, ADAPTER_FAMILIES, TURBO_RUNTIME_HEADER, HEADER_STAGE, sha256Hex, hex64, sameHeaders;
27962
+ var import_node_crypto23, import_node_fs39, import_node_path37, ADAPTER_MANIFEST, ADAPTER_FAMILIES, TURBO_RUNTIME_HEADER, HEADER_STAGE, sha256Hex4, hex64, sameHeaders;
27691
27963
  var init_nitroAdapterContract = __esm({
27692
27964
  "src/nitroAdapterContract.ts"() {
27693
27965
  "use strict";
@@ -27737,7 +28009,7 @@ void scheduleDrain();
27737
28009
  to: ["core", "core/NitroModules"]
27738
28010
  }
27739
28011
  };
27740
- sha256Hex = (data) => (0, import_node_crypto23.createHash)("sha256").update(data).digest("hex");
28012
+ sha256Hex4 = (data) => (0, import_node_crypto23.createHash)("sha256").update(data).digest("hex");
27741
28013
  hex64 = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
27742
28014
  sameHeaders = (a, b) => JSON.stringify(a) === JSON.stringify(b);
27743
28015
  }
@@ -30569,6 +30841,21 @@ var init_swift_root_lock = __esm({
30569
30841
  }
30570
30842
  });
30571
30843
 
30844
+ // src/swift-sdk-image-recipe.ts
30845
+ var import_node_crypto27, SWIFT_SDK_IMAGE_VERSION, swiftSdkImageScope, SWIFT_SDK_IMAGE_RECIPE;
30846
+ var init_swift_sdk_image_recipe = __esm({
30847
+ "src/swift-sdk-image-recipe.ts"() {
30848
+ "use strict";
30849
+ import_node_crypto27 = require("node:crypto");
30850
+ init_wasm_optimize();
30851
+ SWIFT_SDK_IMAGE_VERSION = 13;
30852
+ swiftSdkImageScope = (scopedLookups) => scopedLookups ? "guest image scopes 9\n" : "unscoped constructor order 1\n";
30853
+ SWIFT_SDK_IMAGE_RECIPE = (0, import_node_crypto27.createHash)("sha256").update(`swift-sdk-image
30854
+ ${SWIFT_SDK_IMAGE_VERSION}
30855
+ `).update(WASM_LOWER_IDENTITY).update(swiftSdkImageScope(false)).update(swiftSdkImageScope(true)).digest("hex").slice(0, 16);
30856
+ }
30857
+ });
30858
+
30572
30859
  // src/swift-sdk-image-producer.ts
30573
30860
  var swift_sdk_image_producer_exports = {};
30574
30861
  __export(swift_sdk_image_producer_exports, {
@@ -30609,7 +30896,7 @@ function applySwiftSdkProducerEnvironment(environment) {
30609
30896
  }
30610
30897
  }
30611
30898
  function writeSwiftSdkProducerResult(file, launchId, error) {
30612
- const temporary = `${file}.${(0, import_node_crypto27.randomUUID)()}`;
30899
+ const temporary = `${file}.${(0, import_node_crypto28.randomUUID)()}`;
30613
30900
  (0, import_node_fs44.writeFileSync)(temporary, JSON.stringify({ launchId, error: error ?? null }));
30614
30901
  (0, import_node_fs44.renameSync)(temporary, file);
30615
30902
  }
@@ -30721,7 +31008,7 @@ async function produceSwiftSdkImage(input) {
30721
31008
  }
30722
31009
  }
30723
31010
  const repo = import_node_path42.default.resolve(input.moduleRoot, "../..");
30724
- const launchId = (0, import_node_crypto27.randomUUID)();
31011
+ const launchId = (0, import_node_crypto28.randomUUID)();
30725
31012
  const directory3 = import_node_path42.default.join(root, launchId);
30726
31013
  const requestFile = import_node_path42.default.join(directory3, "request.json");
30727
31014
  const sessionFile2 = import_node_path42.default.join(directory3, "session");
@@ -30819,12 +31106,12 @@ async function produceSwiftSdkImage(input) {
30819
31106
  await (0, import_promises5.setTimeout)(2e3, void 0, { signal: input.signal });
30820
31107
  }
30821
31108
  }
30822
- var import_node_child_process27, import_node_crypto27, import_node_fs44, import_node_path42, import_promises5, import_node_util7, run, environmentNames, launcher;
31109
+ var import_node_child_process27, import_node_crypto28, import_node_fs44, import_node_path42, import_promises5, import_node_util7, run, environmentNames, launcher;
30823
31110
  var init_swift_sdk_image_producer = __esm({
30824
31111
  "src/swift-sdk-image-producer.ts"() {
30825
31112
  "use strict";
30826
31113
  import_node_child_process27 = require("node:child_process");
30827
- import_node_crypto27 = require("node:crypto");
31114
+ import_node_crypto28 = require("node:crypto");
30828
31115
  import_node_fs44 = require("node:fs");
30829
31116
  import_node_path42 = __toESM(require("node:path"), 1);
30830
31117
  import_promises5 = require("node:timers/promises");
@@ -30864,7 +31151,6 @@ __export(swift_sdk_image_exports, {
30864
31151
  SWIFT_SDK_APP_TABLE_BASE: () => SWIFT_SDK_APP_TABLE_BASE,
30865
31152
  SWIFT_SDK_IMAGE_BUNDLE: () => SWIFT_SDK_IMAGE_BUNDLE,
30866
31153
  SWIFT_SDK_IMAGE_FILES: () => SWIFT_SDK_IMAGE_FILES,
30867
- SWIFT_SDK_IMAGE_VERSION: () => SWIFT_SDK_IMAGE_VERSION,
30868
31154
  SWIFT_SDK_MEMORY_BASE: () => SWIFT_SDK_MEMORY_BASE,
30869
31155
  SWIFT_SDK_PIECE_FIELDS: () => SWIFT_SDK_PIECE_FIELDS,
30870
31156
  buildSwiftSdkImage: () => buildSwiftSdkImage,
@@ -30899,9 +31185,9 @@ function swiftSdkImageProducts(moduleRoot, frameworkImports2) {
30899
31185
  function swiftSdkImageKey(moduleRoot, scopedLookups = false, products = []) {
30900
31186
  const distribution = swiftDistributionAt(moduleRoot);
30901
31187
  const inputs2 = distribution ? swiftSdkDistributionInputs(distribution) : swiftModuleDigest(moduleRoot);
30902
- return (0, import_node_crypto28.createHash)("sha256").update(`swift-sdk-image
31188
+ return (0, import_node_crypto29.createHash)("sha256").update(`swift-sdk-image
30903
31189
  ${SWIFT_SDK_IMAGE_VERSION}
30904
- `).update(WASM_LOWER_IDENTITY).update(KEEP_WASM_NAMES ? "\nnames\n" : "\n").update(scopedLookups ? "guest image scopes 9\n" : "unscoped constructor order 1\n").update(inputs2).update(products.length === 0 ? "" : `
31190
+ `).update(WASM_LOWER_IDENTITY).update(KEEP_WASM_NAMES ? "\nnames\n" : "\n").update(swiftSdkImageScope(scopedLookups)).update(inputs2).update(products.length === 0 ? "" : `
30905
31191
  products ${products.join(" ")}`).digest("hex").slice(0, 32);
30906
31192
  }
30907
31193
  function swiftSdkImageEntry(key2, scopedLookups) {
@@ -30990,7 +31276,7 @@ async function buildSwiftSdkImage(moduleRoot, scopedLookups = false, frameworkIm
30990
31276
  stage
30991
31277
  ]);
30992
31278
  const image = cached(stage, key2);
30993
- if (!image || (0, import_node_crypto28.createHash)("sha256").update((0, import_node_fs45.readFileSync)(image.image)).digest("hex") !== image.sha256)
31279
+ if (!image || (0, import_node_crypto29.createHash)("sha256").update((0, import_node_fs45.readFileSync)(image.image)).digest("hex") !== image.sha256)
30994
31280
  throw new Error(`invalid published Swift SDK image ${key2}`);
30995
31281
  (0, import_node_fs45.rmSync)(directory2, { recursive: true, force: true });
30996
31282
  (0, import_node_fs45.renameSync)(stage, directory2);
@@ -31199,6 +31485,7 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
31199
31485
  ].map((name3) => `--export=${name3}`),
31200
31486
  `@${import_node_path43.default.join(work, "exports.rsp")}`,
31201
31487
  "--gc-sections",
31488
+ "--strip-debug",
31202
31489
  // strings stay with their objects, so an app loads only the ones its pieces reference
31203
31490
  "-O0"
31204
31491
  ];
@@ -31259,7 +31546,7 @@ async function linkSwiftSdkImage(moduleRoot, key2, directory2, work, scopedLooku
31259
31546
  (0, import_node_fs45.writeFileSync)(import_node_path43.default.join(work, INTERFACE_FILE), JSON.stringify(sdkInterface));
31260
31547
  (0, import_node_fs45.writeFileSync)(
31261
31548
  import_node_path43.default.join(work, IMAGE_DIGEST),
31262
- (0, import_node_crypto28.createHash)("sha256").update(image).digest("hex")
31549
+ typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(image).digest("hex") : (0, import_node_crypto29.createHash)("sha256").update(image).digest("hex")
31263
31550
  );
31264
31551
  if (swiftSdkImageKey(
31265
31552
  moduleRoot,
@@ -31528,12 +31815,12 @@ function readSwiftSdkManifest(image) {
31528
31815
  }));
31529
31816
  return setBoundedCache(cachedSdkManifests, cacheKey, { manifest, block: block2, segments });
31530
31817
  }
31531
- var import_node_child_process28, import_node_crypto28, import_node_fs45, import_node_path43, import_node_util8, run2, SWIFT_SDK_IMAGE_VERSION, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE, SWIFT_SDK_APP_TABLE_BASE, EMPTY_APP, IMAGE_TABLES, IMAGE_ENTRY, imageApp, IMAGE_FILE, IMAGE_DIGEST, swiftSdkImageFile, INTERFACE_FILE, MANIFEST_FILE, MANIFEST_DATA_FILE, SWIFT_SDK_IMAGE_FILES, SWIFT_SDK_IMAGE_BUNDLE, MAX_CACHED_SDK_IMAGES, cachedSdkInterfaces, cachedSdkManifestIndices, cachedSdkManifests, SWIFT_SDK_PIECE_FIELDS, MANIFEST_BLOCKS, isManifestBlock;
31818
+ var import_node_child_process28, import_node_crypto29, import_node_fs45, import_node_path43, import_node_util8, run2, SWIFT_SDK_APP_MEMORY_BASE, SWIFT_SDK_MEMORY_BASE, SWIFT_SDK_APP_TABLE_BASE, EMPTY_APP, IMAGE_TABLES, IMAGE_ENTRY, imageApp, IMAGE_FILE, IMAGE_DIGEST, swiftSdkImageFile, INTERFACE_FILE, MANIFEST_FILE, MANIFEST_DATA_FILE, SWIFT_SDK_IMAGE_FILES, SWIFT_SDK_IMAGE_BUNDLE, MAX_CACHED_SDK_IMAGES, cachedSdkInterfaces, cachedSdkManifestIndices, cachedSdkManifests, SWIFT_SDK_PIECE_FIELDS, MANIFEST_BLOCKS, isManifestBlock;
31532
31819
  var init_swift_sdk_image = __esm({
31533
31820
  "src/swift-sdk-image.ts"() {
31534
31821
  "use strict";
31535
31822
  import_node_child_process28 = require("node:child_process");
31536
- import_node_crypto28 = require("node:crypto");
31823
+ import_node_crypto29 = require("node:crypto");
31537
31824
  import_node_fs45 = require("node:fs");
31538
31825
  import_node_path43 = __toESM(require("node:path"), 1);
31539
31826
  import_node_util8 = require("node:util");
@@ -31545,13 +31832,13 @@ var init_swift_sdk_image = __esm({
31545
31832
  init_swift_root_lock();
31546
31833
  init_swift_sdk_guest_lookups();
31547
31834
  init_swift_sdk_image_map();
31835
+ init_swift_sdk_image_recipe();
31548
31836
  init_swift_sdk_image_wasm();
31549
31837
  init_swift_toolchain();
31550
31838
  init_swift_wasm_prune();
31551
31839
  init_swiftTargetContract();
31552
31840
  init_wasm_optimize();
31553
31841
  run2 = (0, import_node_util8.promisify)(import_node_child_process28.execFile);
31554
- SWIFT_SDK_IMAGE_VERSION = 13;
31555
31842
  SWIFT_SDK_APP_MEMORY_BASE = 8372224;
31556
31843
  SWIFT_SDK_MEMORY_BASE = 128 * 1024 * 1024;
31557
31844
  SWIFT_SDK_APP_TABLE_BASE = 524288;
@@ -31699,6 +31986,7 @@ __export(swift_sdk_app_module_exports, {
31699
31986
  readSwiftSdkUsage: () => readSwiftSdkUsage,
31700
31987
  selectSwiftSdkData: () => selectSwiftSdkData,
31701
31988
  swiftAppModuleInputs: () => swiftAppModuleInputs,
31989
+ swiftAppModuleThunkSection: () => swiftAppModuleThunkSection,
31702
31990
  swiftSdkProjectionSpans: () => swiftSdkProjectionSpans,
31703
31991
  writeSwiftSdkAppLink: () => writeSwiftSdkAppLink
31704
31992
  });
@@ -31750,9 +32038,12 @@ async function buildSwiftAppModule(options2) {
31750
32038
  linkage: link.linkage,
31751
32039
  usage
31752
32040
  });
31753
- (0, import_node_fs46.writeFileSync)(options2.output, finishSwiftAppModule((0, import_node_fs46.readFileSync)(options2.output)));
32041
+ finishSwiftAppModuleFile(options2.output);
31754
32042
  return binding;
31755
32043
  }
32044
+ function swiftAppModuleThunkSection(lowered) {
32045
+ return [NATIVE_SDK_THUNK_SECTION, sdkImportThunks(lowered)];
32046
+ }
31756
32047
  function finishSwiftAppModule(lowered) {
31757
32048
  return writeWasmCustomSection(
31758
32049
  lowered,
@@ -31760,6 +32051,73 @@ function finishSwiftAppModule(lowered) {
31760
32051
  sdkImportThunks(lowered)
31761
32052
  );
31762
32053
  }
32054
+ function finishSwiftAppModuleFile(file) {
32055
+ const fd = (0, import_node_fs46.openSync)(file, "r");
32056
+ let prefixEnd = 8;
32057
+ let hasExistingThunk = false;
32058
+ let prefix;
32059
+ try {
32060
+ const total = (0, import_node_fs46.fstatSync)(fd).size;
32061
+ const probe = Buffer.allocUnsafe(16);
32062
+ let offset = 8;
32063
+ while (offset < total) {
32064
+ const read = (0, import_node_fs46.readSync)(fd, probe, 0, Math.min(16, total - offset), offset);
32065
+ if (read < 2) break;
32066
+ const id = probe[0];
32067
+ let size2 = 0;
32068
+ let shift = 0;
32069
+ let at = 1;
32070
+ for (; ; ) {
32071
+ const byte = probe[at++];
32072
+ size2 += (byte & 127) * 2 ** shift;
32073
+ if (!(byte & 128)) break;
32074
+ shift += 7;
32075
+ }
32076
+ const start = offset + at;
32077
+ const next = start + size2;
32078
+ if (id === 1 || id === 2) prefixEnd = next;
32079
+ else if (id === 0) {
32080
+ const nameBuf = Buffer.allocUnsafe(Math.min(128, size2));
32081
+ const nRead = (0, import_node_fs46.readSync)(fd, nameBuf, 0, nameBuf.length, start);
32082
+ let nLen = 0;
32083
+ let nShift = 0;
32084
+ let nAt = 0;
32085
+ for (; ; ) {
32086
+ if (nAt >= nRead) break;
32087
+ const byte = nameBuf[nAt++];
32088
+ nLen += (byte & 127) * 2 ** nShift;
32089
+ if (!(byte & 128)) break;
32090
+ nShift += 7;
32091
+ }
32092
+ if (nAt + nLen <= nRead && nameBuf.toString("utf8", nAt, nAt + nLen) === NATIVE_SDK_THUNK_SECTION) {
32093
+ hasExistingThunk = true;
32094
+ break;
32095
+ }
32096
+ }
32097
+ offset = next;
32098
+ }
32099
+ if (!hasExistingThunk) {
32100
+ prefix = Buffer.allocUnsafe(prefixEnd);
32101
+ let filled = 0;
32102
+ while (filled < prefixEnd) {
32103
+ const n = (0, import_node_fs46.readSync)(fd, prefix, filled, prefixEnd - filled, filled);
32104
+ if (n <= 0) break;
32105
+ filled += n;
32106
+ }
32107
+ prefix = prefix.subarray(0, filled);
32108
+ }
32109
+ } finally {
32110
+ (0, import_node_fs46.closeSync)(fd);
32111
+ }
32112
+ if (hasExistingThunk || !prefix) {
32113
+ (0, import_node_fs46.writeFileSync)(file, finishSwiftAppModule((0, import_node_fs46.readFileSync)(file)));
32114
+ return;
32115
+ }
32116
+ const thunks = sdkImportThunks(prefix);
32117
+ const nameBytes = Buffer.from(encodedName2(NATIVE_SDK_THUNK_SECTION));
32118
+ const header = Buffer.from([0, ...uleb4(nameBytes.length + thunks.length)]);
32119
+ (0, import_node_fs46.appendFileSync)(file, Buffer.concat([header, nameBytes, thunks]));
32120
+ }
31763
32121
  function swiftAppModuleInputs(tokens2, buildRoot, sdkLibraries) {
31764
32122
  const owned = (token) => import_node_path44.default.resolve(token).startsWith(`${buildRoot}/`) && (!token.includes("/.peach-pruned-objs/") || token.endsWith("/swiftrt-patched.o"));
31765
32123
  const inputs2 = [];
@@ -31974,6 +32332,7 @@ async function linkSwiftAppModule(options2) {
31974
32332
  "--unresolved-symbols=ignore-all",
31975
32333
  "--import-undefined",
31976
32334
  "--emit-relocs",
32335
+ "--strip-debug",
31977
32336
  "--gc-sections",
31978
32337
  "--keep-section=target_features",
31979
32338
  "--error-limit=0",
@@ -31996,7 +32355,16 @@ async function linkSwiftAppModule(options2) {
31996
32355
  const skipPasses = options2.layoutMap ? ["duplicate-function-elimination"] : void 0;
31997
32356
  const sdkTableEnd = sdk2.sdkInterface.layout.tableEnd;
31998
32357
  const { loweringCache } = options2;
31999
- const loweringKey = loweringCache && (0, import_node_crypto29.createHash)("sha256").update(
32358
+ const loweringKey = loweringCache && (typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(
32359
+ JSON.stringify([
32360
+ loweringCache.compilerDigest,
32361
+ optimize,
32362
+ skipPasses,
32363
+ sdkTableEnd,
32364
+ lazy,
32365
+ KEEP_WASM_NAMES
32366
+ ])
32367
+ ).update(bytes).digest("hex") : (0, import_node_crypto30.createHash)("sha256").update(
32000
32368
  JSON.stringify([
32001
32369
  loweringCache.compilerDigest,
32002
32370
  optimize,
@@ -32005,7 +32373,7 @@ async function linkSwiftAppModule(options2) {
32005
32373
  lazy,
32006
32374
  KEEP_WASM_NAMES
32007
32375
  ])
32008
- ).update(bytes).digest("hex");
32376
+ ).update(bytes).digest("hex"));
32009
32377
  return {
32010
32378
  linkage,
32011
32379
  async lower() {
@@ -32615,7 +32983,8 @@ function createSwiftSdkBinding(linkage, sdk2, usage, projection) {
32615
32983
  bindSwiftAppModule(linkage, sdk2),
32616
32984
  selectSwiftSdkData(sdk2, usage, linkage, projection)
32617
32985
  ]);
32618
- return { bytes, sha256: (0, import_node_crypto29.createHash)("sha256").update(bytes).digest("hex") };
32986
+ const sha2565 = typeof Bun !== "undefined" ? new Bun.CryptoHasher("sha256").update(bytes).digest("hex") : (0, import_node_crypto30.createHash)("sha256").update(bytes).digest("hex");
32987
+ return { bytes, sha256: sha2565 };
32619
32988
  }
32620
32989
  function readSwiftSdkUsage(mapFile, linkedFile, sdkObjects) {
32621
32990
  const map2 = readWasmLinkMap(mapFile, false);
@@ -33161,12 +33530,12 @@ function partitionParent(section2) {
33161
33530
  "__objc_class_refs"
33162
33531
  ].find((name3) => section2 === name3 || section2.startsWith(`${name3}.`));
33163
33532
  }
33164
- var import_node_child_process29, import_node_crypto29, import_node_fs46, import_node_path44, import_node_util9, import_node_zlib5, run3, RELOCATION_WIDTHS, GLOBAL_INDEX, TLS_SLEB64, SDK_TLS_HELPER, SDK_TLS_DELTA, OBJC_SECTION_BOUNDARY, uleb4, sleb2, encodedName2, SCANNED, RUN_GAP;
33533
+ var import_node_child_process29, import_node_crypto30, import_node_fs46, import_node_path44, import_node_util9, import_node_zlib5, run3, RELOCATION_WIDTHS, GLOBAL_INDEX, TLS_SLEB64, SDK_TLS_HELPER, SDK_TLS_DELTA, OBJC_SECTION_BOUNDARY, uleb4, sleb2, encodedName2, SCANNED, RUN_GAP;
33165
33534
  var init_swift_sdk_app_module = __esm({
33166
33535
  "src/swift-sdk-app-module.ts"() {
33167
33536
  "use strict";
33168
33537
  import_node_child_process29 = require("node:child_process");
33169
- import_node_crypto29 = require("node:crypto");
33538
+ import_node_crypto30 = require("node:crypto");
33170
33539
  import_node_fs46 = require("node:fs");
33171
33540
  import_node_path44 = __toESM(require("node:path"), 1);
33172
33541
  import_node_util9 = require("node:util");
@@ -33371,6 +33740,7 @@ async function compileGuestLink(options2) {
33371
33740
  onSplitInputs: sdk2 ? (value) => {
33372
33741
  splitInputs = value;
33373
33742
  } : void 0,
33743
+ deferFinalLink: Boolean(sdk2),
33374
33744
  onDyldRows: (rows) => {
33375
33745
  lazyFunctions = rows.lazyFunctions;
33376
33746
  dyldSymbols = rows.dyldSymbols;
@@ -33639,156 +34009,164 @@ async function compileGuestLink(options2) {
33639
34009
  });
33640
34010
  if (!reserved2 || !projectionObject) throw new Error("guest projection was not reserved");
33641
34011
  if (sdk2) {
33642
- if (!splitInputs) throw new Error("guest link did not select shared SDK inputs");
33643
- const {
33644
- createSwiftSdkBinding: createSwiftSdkBinding2,
33645
- finishSwiftAppModule: finishSwiftAppModule2,
33646
- linkSwiftAppModule: linkSwiftAppModule2,
33647
- readSwiftSdkUsage: readSwiftSdkUsage2,
33648
- swiftSdkProjectionSpans: swiftSdkProjectionSpans2
33649
- } = await Promise.resolve().then(() => (init_swift_sdk_app_module(), swift_sdk_app_module_exports));
33650
- const project2 = options2.project;
33651
- const work = project2 ? (0, import_node_fs47.mkdtempSync)(import_node_path45.default.join(directory2, "app-module-")) : import_node_path45.default.join(directory2, "app-module");
33652
- if (project2) (0, import_node_fs47.chownSync)(work, project2.uid, project2.gid);
33653
- else (0, import_node_fs47.mkdirSync)(work, { recursive: true });
33654
- const layoutMap = import_node_path45.default.join(work, "app.map");
33655
- const owners = new Map(splitInputs.appObjects).set(projectionObject, 0);
33656
- const sdkObjectKeys = /* @__PURE__ */ new Map();
33657
- const sdkObjectImages = /* @__PURE__ */ new Map();
33658
- const sdkProductImages = new Map(prepared?.sdkProducts.images);
33659
- for (const [file, { image, product, identity: identity2 }] of splitInputs.sdkObjects) {
33660
- const key2 = sdkGuestObjectKey(identity2);
33661
- sdkObjectKeys.set(file, key2);
33662
- sdkObjectImages.set(key2, image);
33663
- const priorImage = sdkProductImages.get(product);
33664
- if (priorImage !== void 0 && priorImage !== image)
33665
- throw new Error(`SDK product ${product} has several guest images`);
33666
- sdkProductImages.set(product, image);
33667
- }
33668
- const usage = readSwiftSdkUsage2(result.mapPath, options2.output, sdkObjectKeys);
33669
- const linkedModule = import_node_path45.default.join(work, "app.wasm");
33670
- const sdkSpans = swiftSdkProjectionSpans2(
33671
- sdk2,
33672
- (object8, product) => sdkObjectImages.get(object8) ?? sdkProductImages.get(product)
33673
- );
33674
- let storage = reserved2;
33675
- if (sdkSpans.length > 0) {
33676
- const sdkCounts = guestProjectionRegionCounts(storage.images.length, sdkSpans);
33677
- storage = reserveGuestProjectionStorage(
33678
- storage.images,
33679
- storage.capacities.map((capacity, index) => ({
33680
- ...capacity,
33681
- regions: capacity.regions + sdkCounts[index] + 16
33682
- }))
33683
- );
33684
- const projectionSource = import_node_path45.default.join(work, "projection.c");
33685
- (0, import_node_fs47.writeFileSync)(projectionSource, storage.source);
33686
- (0, import_node_child_process30.execFileSync)(
33687
- import_node_path45.default.join(options2.toolchainBin, "clang"),
33688
- [...clangOptions, "-c", projectionSource, "-o", projectionObject],
33689
- { stdio: "pipe" }
33690
- );
33691
- }
33692
- let precomputedSymbols;
33693
- if (splitInputs.appReferencedSymbols && splitInputs.appDefinedSymbols) {
33694
- const referenced = new Set(splitInputs.appReferencedSymbols);
33695
- const defined = new Set(splitInputs.appDefinedSymbols);
33696
- const projSyms = guestWasmSymbols((0, import_node_fs47.readFileSync)(projectionObject));
33697
- for (const name3 of projSyms.undefined) referenced.add(name3);
33698
- for (const name3 of projSyms.defined) defined.add(name3);
33699
- precomputedSymbols = { referenced, defined };
33700
- }
33701
- for (; ; ) {
33702
- const link = await linkSwiftAppModule2({
33703
- objects: [...owners.keys()],
33704
- lazyFunctions: splitInputs.lazyFunctions,
33705
- toolchainBin: options2.toolchainBin,
33706
- sdk: sdk2,
33707
- work,
33708
- output: options2.optimized,
33709
- optimize: options2.optimize,
33710
- layoutMap,
33711
- project: project2,
33712
- precomputedSymbols,
33713
- loweringCache: project2 ? void 0 : {
33714
- file: import_node_path45.default.join(
33715
- options2.buildDirectory,
33716
- ".build",
33717
- "peach-app-module-lowered.wasm"
33718
- ),
33719
- compilerDigest: options2.compilerDigest
33720
- }
33721
- });
33722
- const map3 = (0, import_node_fs47.readFileSync)(
33723
- project2 ? projectOutputFile(work, layoutMap, project2) : layoutMap,
33724
- "utf8"
33725
- );
33726
- const values = guestDyldValueRange(map3);
33727
- const bindingRows = /* @__PURE__ */ new Map();
33728
- const data = [];
33729
- for (let at = 0; at < link.linkage.data.length; at += 3) {
33730
- const address = link.linkage.data[at];
33731
- const size2 = link.linkage.data[at + 1];
33732
- const value = link.linkage.data[at + 2];
33733
- if (values && address >= values.address && address < values.address + values.length) {
33734
- if (size2 !== 8 || (address - values.address) % 8)
33735
- throw new Error("sdk binding splits a dyld value");
33736
- bindingRows.set((address - values.address) / 8, value);
33737
- } else data.push(address, size2, value);
33738
- }
33739
- const linked = (0, import_node_fs47.readFileSync)(
33740
- project2 ? projectOutputFile(work, linkedModule, project2) : linkedModule
34012
+ try {
34013
+ if (!splitInputs) throw new Error("guest link did not select shared SDK inputs");
34014
+ const {
34015
+ createSwiftSdkBinding: createSwiftSdkBinding2,
34016
+ linkSwiftAppModule: linkSwiftAppModule2,
34017
+ readSwiftSdkUsage: readSwiftSdkUsage2,
34018
+ swiftAppModuleThunkSection: swiftAppModuleThunkSection2,
34019
+ swiftSdkProjectionSpans: swiftSdkProjectionSpans2
34020
+ } = await Promise.resolve().then(() => (init_swift_sdk_app_module(), swift_sdk_app_module_exports));
34021
+ const project2 = options2.project;
34022
+ const work = project2 ? (0, import_node_fs47.mkdtempSync)(import_node_path45.default.join(directory2, "app-module-")) : import_node_path45.default.join(directory2, "app-module");
34023
+ if (project2) (0, import_node_fs47.chownSync)(work, project2.uid, project2.gid);
34024
+ else (0, import_node_fs47.mkdirSync)(work, { recursive: true });
34025
+ const layoutMap = import_node_path45.default.join(work, "app.map");
34026
+ let appProjectionObject = projectionObject;
34027
+ const owners = new Map(splitInputs.appObjects).set(appProjectionObject, 0);
34028
+ const sdkObjectKeys = /* @__PURE__ */ new Map();
34029
+ const sdkObjectImages = /* @__PURE__ */ new Map();
34030
+ const sdkProductImages = new Map(prepared?.sdkProducts.images);
34031
+ for (const [file, { image, product, identity: identity2 }] of splitInputs.sdkObjects) {
34032
+ const key2 = sdkGuestObjectKey(identity2);
34033
+ sdkObjectKeys.set(file, key2);
34034
+ sdkObjectImages.set(key2, image);
34035
+ const priorImage = sdkProductImages.get(product);
34036
+ if (priorImage !== void 0 && priorImage !== image)
34037
+ throw new Error(`SDK product ${product} has several guest images`);
34038
+ sdkProductImages.set(product, image);
34039
+ }
34040
+ const linkedModule = import_node_path45.default.join(work, "app.wasm");
34041
+ const sdkSpans = swiftSdkProjectionSpans2(
34042
+ sdk2,
34043
+ (object8, product) => sdkObjectImages.get(object8) ?? sdkProductImages.get(product)
33741
34044
  );
33742
- const required = guestProjectionRegionCounts(storage.images.length, [
33743
- ...guestLinkedSpans(map3, linked, linked, owners, splitInputs.appSections, true),
33744
- ...sdkSpans
33745
- ]);
33746
- if (storage.capacities.some(({ regions }, index) => required[index] > regions)) {
33747
- storage = reserveGuestProjectionStorage(
33748
- storage.images,
33749
- storage.capacities.map((capacity, index) => {
33750
- const count = required[index];
33751
- return count > capacity.regions ? { ...capacity, regions: Math.max(count, capacity.regions * 2) } : capacity;
33752
- })
33753
- );
34045
+ const compileAppProjection = (source) => {
33754
34046
  const projectionSource = import_node_path45.default.join(work, "projection.c");
33755
- (0, import_node_fs47.writeFileSync)(projectionSource, storage.source);
34047
+ const nextObject = import_node_path45.default.join(work, "projection.o");
34048
+ (0, import_node_fs47.writeFileSync)(projectionSource, source);
33756
34049
  (0, import_node_child_process30.execFileSync)(
33757
34050
  import_node_path45.default.join(options2.toolchainBin, "clang"),
33758
- [...clangOptions, "-c", projectionSource, "-o", projectionObject],
34051
+ [...clangOptions, "-c", projectionSource, "-o", nextObject],
33759
34052
  { stdio: "pipe" }
33760
34053
  );
33761
- continue;
34054
+ if (nextObject !== appProjectionObject) {
34055
+ owners.delete(appProjectionObject);
34056
+ appProjectionObject = nextObject;
34057
+ owners.set(appProjectionObject, 0);
34058
+ }
34059
+ };
34060
+ let storage = reserved2;
34061
+ if (sdkSpans.length > 0) {
34062
+ const sdkCounts = guestProjectionRegionCounts(storage.images.length, sdkSpans);
34063
+ storage = reserveGuestProjectionStorage(
34064
+ storage.images,
34065
+ storage.capacities.map((capacity, index) => ({
34066
+ ...capacity,
34067
+ regions: capacity.regions + sdkCounts[index] + 16
34068
+ }))
34069
+ );
34070
+ compileAppProjection(storage.source);
33762
34071
  }
33763
- options2.onStage("lowering the app image");
33764
- const lowerPromise = link.lower();
33765
- await new Promise((resolve4) => setImmediate(resolve4));
33766
- let binding;
33767
- try {
33768
- binding = createSwiftSdkBinding2({ ...link.linkage, data }, sdk2, usage);
33769
- } catch (error) {
33770
- await lowerPromise.catch(() => {
34072
+ let precomputedSymbols;
34073
+ if (splitInputs.appReferencedSymbols && splitInputs.appDefinedSymbols) {
34074
+ const referenced = new Set(splitInputs.appReferencedSymbols);
34075
+ const defined = new Set(splitInputs.appDefinedSymbols);
34076
+ const projSyms = guestWasmSymbols((0, import_node_fs47.readFileSync)(appProjectionObject));
34077
+ for (const name3 of projSyms.undefined) referenced.add(name3);
34078
+ for (const name3 of projSyms.defined) defined.add(name3);
34079
+ precomputedSymbols = { referenced, defined };
34080
+ }
34081
+ for (; ; ) {
34082
+ const link = await linkSwiftAppModule2({
34083
+ objects: [...owners.keys()],
34084
+ lazyFunctions: splitInputs.lazyFunctions,
34085
+ toolchainBin: options2.toolchainBin,
34086
+ sdk: sdk2,
34087
+ work,
34088
+ output: options2.optimized,
34089
+ optimize: options2.optimize,
34090
+ layoutMap,
34091
+ project: project2,
34092
+ precomputedSymbols,
34093
+ loweringCache: project2 ? void 0 : {
34094
+ file: import_node_path45.default.join(
34095
+ options2.buildDirectory,
34096
+ ".build",
34097
+ "peach-app-module-lowered.wasm"
34098
+ ),
34099
+ compilerDigest: options2.compilerDigest
34100
+ }
33771
34101
  });
33772
- throw error;
34102
+ const map3 = (0, import_node_fs47.readFileSync)(
34103
+ project2 ? projectOutputFile(work, layoutMap, project2) : layoutMap,
34104
+ "utf8"
34105
+ );
34106
+ const values = guestDyldValueRange(map3);
34107
+ const bindingRows = /* @__PURE__ */ new Map();
34108
+ const data = [];
34109
+ for (let at = 0; at < link.linkage.data.length; at += 3) {
34110
+ const address = link.linkage.data[at];
34111
+ const size2 = link.linkage.data[at + 1];
34112
+ const value = link.linkage.data[at + 2];
34113
+ if (values && address >= values.address && address < values.address + values.length) {
34114
+ if (size2 !== 8 || (address - values.address) % 8)
34115
+ throw new Error("sdk binding splits a dyld value");
34116
+ bindingRows.set((address - values.address) / 8, value);
34117
+ } else data.push(address, size2, value);
34118
+ }
34119
+ const linked = (0, import_node_fs47.readFileSync)(
34120
+ project2 ? projectOutputFile(work, linkedModule, project2) : linkedModule
34121
+ );
34122
+ const required = guestProjectionRegionCounts(storage.images.length, [
34123
+ ...guestLinkedSpans(map3, linked, linked, owners, splitInputs.appSections, true),
34124
+ ...sdkSpans
34125
+ ]);
34126
+ if (storage.capacities.some(({ regions }, index) => required[index] > regions)) {
34127
+ storage = reserveGuestProjectionStorage(
34128
+ storage.images,
34129
+ storage.capacities.map((capacity, index) => {
34130
+ const count = required[index];
34131
+ return count > capacity.regions ? { ...capacity, regions: Math.max(count, capacity.regions * 2) } : capacity;
34132
+ })
34133
+ );
34134
+ compileAppProjection(storage.source);
34135
+ continue;
34136
+ }
34137
+ options2.onStage("lowering the app image");
34138
+ const lowerPromise = link.lower();
34139
+ await new Promise((resolve4) => setImmediate(resolve4));
34140
+ let binding;
34141
+ try {
34142
+ if (result.finalLinkDone) await result.finalLinkDone;
34143
+ const usage = readSwiftSdkUsage2(result.mapPath, options2.output, sdkObjectKeys);
34144
+ binding = createSwiftSdkBinding2({ ...link.linkage, data }, sdk2, usage);
34145
+ } catch (error) {
34146
+ await Promise.allSettled([lowerPromise]);
34147
+ throw error;
34148
+ }
34149
+ await lowerPromise;
34150
+ const finalized = finalizeGuestProjectionStorage({
34151
+ map: map3,
34152
+ linked,
34153
+ optimized: (0, import_node_fs47.readFileSync)(options2.optimized),
34154
+ owners,
34155
+ sectionOwners: splitInputs.appSections,
34156
+ projectionObject: appProjectionObject,
34157
+ reserved: storage,
34158
+ sdkSpans
34159
+ });
34160
+ (0, import_node_fs47.writeFileSync)(
34161
+ options2.optimized,
34162
+ moveGuestDyldTable(map3, finalized.wasm, splitInputs.dyldSymbols, bindingRows, [
34163
+ swiftAppModuleThunkSection2(finalized.wasm)
34164
+ ])
34165
+ );
34166
+ return binding;
33773
34167
  }
33774
- await lowerPromise;
33775
- const finalized = finalizeGuestProjectionStorage({
33776
- map: map3,
33777
- linked,
33778
- optimized: (0, import_node_fs47.readFileSync)(options2.optimized),
33779
- owners,
33780
- sectionOwners: splitInputs.appSections,
33781
- projectionObject,
33782
- reserved: storage,
33783
- sdkSpans
33784
- });
33785
- (0, import_node_fs47.writeFileSync)(
33786
- options2.optimized,
33787
- finishSwiftAppModule2(
33788
- moveGuestDyldTable(map3, finalized.wasm, splitInputs.dyldSymbols, bindingRows)
33789
- )
33790
- );
33791
- return binding;
34168
+ } finally {
34169
+ if (result.finalLinkDone) await Promise.allSettled([result.finalLinkDone]);
33792
34170
  }
33793
34171
  }
33794
34172
  options2.onStage("lowering the app image");
@@ -33863,7 +34241,7 @@ function compilerCheckpoint(root, recipe2, args, header) {
33863
34241
  }
33864
34242
  if (!objects.length) return;
33865
34243
  const outputs = [module2, header, map2[""].dependencies, ...objects];
33866
- const digest3 = (0, import_node_crypto30.createHash)("sha256").update(recipe2).update(JSON.stringify(args)).update(mapText);
34244
+ const digest3 = (0, import_node_crypto31.createHash)("sha256").update(recipe2).update(JSON.stringify(args)).update(mapText);
33867
34245
  for (const flag of args) {
33868
34246
  if (!flag.startsWith("@")) continue;
33869
34247
  const response = flag.slice(1);
@@ -33957,11 +34335,11 @@ async function withSwiftHeaderCompiler(root, toolchainBin, recipe2, producers, b
33957
34335
  (0, import_node_fs48.rmSync)(directory2, { recursive: true, force: true });
33958
34336
  }
33959
34337
  }
33960
- var import_node_crypto30, import_node_fs48, import_node_http2, import_node_path46, SWIFT_HEADER_COMPILER_WRAPPER, argument, client;
34338
+ var import_node_crypto31, import_node_fs48, import_node_http2, import_node_path46, SWIFT_HEADER_COMPILER_WRAPPER, argument, client;
33961
34339
  var init_swift_header_compiler = __esm({
33962
34340
  "src/swift-header-compiler.ts"() {
33963
34341
  "use strict";
33964
- import_node_crypto30 = require("node:crypto");
34342
+ import_node_crypto31 = require("node:crypto");
33965
34343
  import_node_fs48 = require("node:fs");
33966
34344
  import_node_http2 = require("node:http");
33967
34345
  import_node_path46 = __toESM(require("node:path"), 1);
@@ -34244,7 +34622,7 @@ function swiftIcuAsset(toolchainBin, sdk2) {
34244
34622
  JSON.stringify([toolchainBin, sdk2, swiftSdkOptions()]),
34245
34623
  async () => {
34246
34624
  const zipped = await deflate(await swiftIcuData(toolchainBin, sdk2));
34247
- return { sha256: (0, import_node_crypto31.createHash)("sha256").update(zipped).digest("hex"), gzip: zipped };
34625
+ return { sha256: (0, import_node_crypto32.createHash)("sha256").update(zipped).digest("hex"), gzip: zipped };
34248
34626
  }
34249
34627
  );
34250
34628
  }
@@ -34346,7 +34724,7 @@ function swiftIcuPacked(icu) {
34346
34724
  )
34347
34725
  );
34348
34726
  await (0, import_promises6.mkdir)(import_node_path48.default.dirname(file), { recursive: true });
34349
- const tmp = `${file}.${(0, import_node_crypto31.randomUUID)()}.tmp`;
34727
+ const tmp = `${file}.${(0, import_node_crypto32.randomUUID)()}.tmp`;
34350
34728
  await (0, import_promises6.writeFile)(tmp, packed);
34351
34729
  await (0, import_promises6.rename)(tmp, file);
34352
34730
  return packed;
@@ -34359,12 +34737,12 @@ async function swiftIcuBundleAsset(icu) {
34359
34737
  contentType: "application/octet-stream"
34360
34738
  };
34361
34739
  }
34362
- var import_node_child_process31, import_node_crypto31, import_node_fs49, import_promises6, import_node_os12, import_node_path48, import_node_util10, import_node_zlib6, run4, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, packedFiles;
34740
+ var import_node_child_process31, import_node_crypto32, import_node_fs49, import_promises6, import_node_os12, import_node_path48, import_node_util10, import_node_zlib6, run4, deflate, compressBrotli, inflateGzip, ARCHIVE, MEMBER, raw, assets, packedFiles;
34363
34741
  var init_swift_icu = __esm({
34364
34742
  "src/swift-icu.ts"() {
34365
34743
  "use strict";
34366
34744
  import_node_child_process31 = require("node:child_process");
34367
- import_node_crypto31 = require("node:crypto");
34745
+ import_node_crypto32 = require("node:crypto");
34368
34746
  import_node_fs49 = require("node:fs");
34369
34747
  import_promises6 = require("node:fs/promises");
34370
34748
  import_node_os12 = __toESM(require("node:os"), 1);
@@ -34634,7 +35012,7 @@ function swiftObjCPrebuiltCompiler(clang, root, sysroot, distribution, targets,
34634
35012
  );
34635
35013
  if (!modules.length) return [];
34636
35014
  const { executable, prefixArgs } = rnxSelfInvocation();
34637
- const compiler = (0, import_node_crypto32.createHash)("sha256").update(import_node_fs51.default.readFileSync(clang)).digest("hex");
35015
+ const compiler = (0, import_node_crypto33.createHash)("sha256").update(import_node_fs51.default.readFileSync(clang)).digest("hex");
34638
35016
  return [
34639
35017
  'case "$module" in',
34640
35018
  ` ${modules.join("|")}) exec ${[
@@ -34652,12 +35030,12 @@ function swiftObjCPrebuiltCompiler(clang, root, sysroot, distribution, targets,
34652
35030
  "esac"
34653
35031
  ];
34654
35032
  }
34655
- var import_node_child_process33, import_node_crypto32, import_node_fs51, import_node_path50, quote2;
35033
+ var import_node_child_process33, import_node_crypto33, import_node_fs51, import_node_path50, quote2;
34656
35034
  var init_swift_objc_prebuilt = __esm({
34657
35035
  "src/swift-objc-prebuilt.ts"() {
34658
35036
  "use strict";
34659
35037
  import_node_child_process33 = require("node:child_process");
34660
- import_node_crypto32 = require("node:crypto");
35038
+ import_node_crypto33 = require("node:crypto");
34661
35039
  import_node_fs51 = __toESM(require("node:fs"), 1);
34662
35040
  import_node_path50 = __toESM(require("node:path"), 1);
34663
35041
  init_internal_child_contract();
@@ -35010,7 +35388,7 @@ function swiftPackagePrebuiltEntries(input, moduleRoot, toolchainBin) {
35010
35388
  ([file, source]) => !/\.(?:swift|c|h|inc|modulemap)$/.test(file) || file.endsWith(".swift") && swiftImportNames(source, available2).some((name4) => !available2.has(name4))
35011
35389
  ))
35012
35390
  return [];
35013
- const hash = (0, import_node_crypto33.createHash)("sha256");
35391
+ const hash = (0, import_node_crypto34.createHash)("sha256");
35014
35392
  for (const entry of files2.sort(
35015
35393
  ([left], [right]) => left < right ? -1 : left > right ? 1 : 0
35016
35394
  ))
@@ -35077,11 +35455,11 @@ function useSwiftPackagePrebuilts(input, moduleRoot, toolchainBin) {
35077
35455
  }
35078
35456
  return resolved;
35079
35457
  }
35080
- var import_node_crypto33, import_node_fs54, import_node_path54, PACKAGE_RECIPE;
35458
+ var import_node_crypto34, import_node_fs54, import_node_path54, PACKAGE_RECIPE;
35081
35459
  var init_swift_package_prebuilt = __esm({
35082
35460
  "src/swift-package-prebuilt.ts"() {
35083
35461
  "use strict";
35084
- import_node_crypto33 = require("node:crypto");
35462
+ import_node_crypto34 = require("node:crypto");
35085
35463
  import_node_fs54 = __toESM(require("node:fs"), 1);
35086
35464
  import_node_path54 = __toESM(require("node:path"), 1);
35087
35465
  init_native_prebuilt();
@@ -35241,7 +35619,7 @@ function swiftObjCSelectorOptions(moduleRoot) {
35241
35619
  `;
35242
35620
  if (!(0, import_node_fs55.existsSync)(map2) || (0, import_node_fs55.readFileSync)(map2, "utf8") !== content) {
35243
35621
  (0, import_node_fs55.mkdirSync)(import_node_path55.default.dirname(map2), { recursive: true });
35244
- const partial = `${map2}.${(0, import_node_crypto34.randomUUID)()}`;
35622
+ const partial = `${map2}.${(0, import_node_crypto35.randomUUID)()}`;
35245
35623
  (0, import_node_fs55.writeFileSync)(partial, content);
35246
35624
  (0, import_node_fs55.renameSync)(partial, map2);
35247
35625
  }
@@ -35269,7 +35647,7 @@ async function ensureMacroPlugins(moduleRoot, toolchainBin, release, signal, lea
35269
35647
  return { libraries, executables };
35270
35648
  }
35271
35649
  function swiftProjectBuildKey(moduleRoot, release) {
35272
- return (0, import_node_crypto34.createHash)("sha256").update(`swift-framework/v2\0${release}\0${swiftModuleSdk(moduleRoot).wasmSdkId}`).update(swiftModuleDigest(moduleRoot)).digest("hex").slice(0, 32);
35650
+ return (0, import_node_crypto35.createHash)("sha256").update(`swift-framework/v2\0${release}\0${swiftModuleSdk(moduleRoot).wasmSdkId}`).update(swiftModuleDigest(moduleRoot)).digest("hex").slice(0, 32);
35273
35651
  }
35274
35652
  function sameStringList(left, right) {
35275
35653
  if (left === right) return true;
@@ -35517,7 +35895,7 @@ function distributionClangModuleOptions(root, modules) {
35517
35895
  function providedModulesPath(root, modules, excluded) {
35518
35896
  if (!excluded || excluded.size === 0) return modules;
35519
35897
  const entries2 = (0, import_node_fs55.readdirSync)(modules).filter((entry) => !excluded.has(entry.replace(/\..*$/, ""))).sort();
35520
- const key2 = (0, import_node_crypto34.createHash)("sha256").update(JSON.stringify([modules, entries2])).update([...excluded].sort().join("\0")).digest("hex").slice(0, 16);
35898
+ const key2 = (0, import_node_crypto35.createHash)("sha256").update(JSON.stringify([modules, entries2])).update([...excluded].sort().join("\0")).digest("hex").slice(0, 16);
35521
35899
  const directory2 = import_node_path55.default.join(root, `.peach-modules-${key2}`);
35522
35900
  const complete = import_node_path55.default.join(directory2, ".complete");
35523
35901
  if (!(0, import_node_fs55.existsSync)(complete)) {
@@ -35599,10 +35977,10 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
35599
35977
  function sha256Digest(value) {
35600
35978
  if (typeof Bun !== "undefined")
35601
35979
  return new Bun.CryptoHasher("sha256").update(value).digest();
35602
- return (0, import_node_crypto34.createHash)("sha256").update(value).digest();
35980
+ return (0, import_node_crypto35.createHash)("sha256").update(value).digest();
35603
35981
  }
35604
35982
  function swiftCompileInputHash(input, release) {
35605
- const hash = (0, import_node_crypto34.createHash)("sha256");
35983
+ const hash = (0, import_node_crypto35.createHash)("sha256");
35606
35984
  hash.update(`swift-compile
35607
35985
  ${release}
35608
35986
  `);
@@ -35809,7 +36187,7 @@ function emitSwiftPackageManifest(args) {
35809
36187
  ].join("\n") + "\n";
35810
36188
  distributionLinkPath = distributionLink.path.replace(
35811
36189
  /\.rsp$/,
35812
- `-${(0, import_node_crypto34.createHash)("sha256").update(list2).digest("hex").slice(0, 12)}.rsp`
36190
+ `-${(0, import_node_crypto35.createHash)("sha256").update(list2).digest("hex").slice(0, 12)}.rsp`
35813
36191
  );
35814
36192
  distributionLink.files.set(distributionLinkPath, list2);
35815
36193
  }
@@ -35830,7 +36208,7 @@ function emitSwiftPackageManifest(args) {
35830
36208
  const endRun = () => {
35831
36209
  if (run16.length >= MODULE_MAP_RESPONSE_FILE_RUN) {
35832
36210
  const lines = run16.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
35833
- const digest4 = (0, import_node_crypto34.createHash)("sha256").update(lines).digest("hex");
36211
+ const digest4 = (0, import_node_crypto35.createHash)("sha256").update(lines).digest("hex");
35834
36212
  const file2 = import_node_path55.default.join(args.root, ".peach-clang-arguments", `${digest4}.rsp`);
35835
36213
  args.files.set(file2, lines);
35836
36214
  flags.push(`@${file2}`);
@@ -35854,7 +36232,7 @@ function emitSwiftPackageManifest(args) {
35854
36232
  }
35855
36233
  endRun();
35856
36234
  const content = JSON.stringify(flags);
35857
- const digest3 = (0, import_node_crypto34.createHash)("sha256").update(content).digest("hex");
36235
+ const digest3 = (0, import_node_crypto35.createHash)("sha256").update(content).digest("hex");
35858
36236
  const file = import_node_path55.default.join(args.root, ".peach-manifest-arguments", `${digest3}.json`);
35859
36237
  args.files.set(file, content);
35860
36238
  return `peachCompilerArguments(${JSON.stringify(file)})`;
@@ -35866,7 +36244,7 @@ function emitSwiftPackageManifest(args) {
35866
36244
  const macros = compactSwiftClangDefines(swiftClangSearchArguments(flags));
35867
36245
  const compact = args.coalescibleOverlays ? compactSwiftClangOverlays(macros, args.coalescibleOverlays) : macros;
35868
36246
  const content = compact.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
35869
- const digest3 = (0, import_node_crypto34.createHash)("sha256").update(content).digest("hex");
36247
+ const digest3 = (0, import_node_crypto35.createHash)("sha256").update(content).digest("hex");
35870
36248
  const file = import_node_path55.default.join(args.root, ".peach-swift-arguments", `${digest3}.rsp`);
35871
36249
  args.files.set(file, content);
35872
36250
  return JSON.stringify([`@${file}`]);
@@ -37455,7 +37833,7 @@ ${swiftProjectFilesProblems(input.projectFiles).join("\n")}`
37455
37833
  )
37456
37834
  ];
37457
37835
  const moduleFlag = perFile.some((flag) => flag.startsWith("-fmodule-name=")) ? [] : [`-fmodule-name=${swiftTargetModuleName(target.name)}`];
37458
- const identity2 = (0, import_node_crypto34.createHash)("sha256").update(
37836
+ const identity2 = (0, import_node_crypto35.createHash)("sha256").update(
37459
37837
  JSON.stringify([
37460
37838
  cxx,
37461
37839
  quoteDirs,
@@ -37818,7 +38196,7 @@ module ${moduleName2}.Swift {
37818
38196
  ])
37819
38197
  (0, import_node_fs55.rmSync)(cache, { recursive: true, force: true });
37820
38198
  files2.set(frameworkSearchRecord, frameworkSearch);
37821
- const modulePlan = (0, import_node_crypto34.createHash)("sha256").update(
38199
+ const modulePlan = (0, import_node_crypto35.createHash)("sha256").update(
37822
38200
  swiftModuleInputFiles(moduleRoot).join("\n")
37823
38201
  );
37824
38202
  if (!distribution) {
@@ -37827,7 +38205,7 @@ module ${moduleName2}.Swift {
37827
38205
  modulePlan.update(
37828
38206
  Object.keys(input.files).filter((file) => file.endsWith(".swift")).sort().join("\n")
37829
38207
  );
37830
- const resourcePlan = (0, import_node_crypto34.createHash)("sha256").update(
38208
+ const resourcePlan = (0, import_node_crypto35.createHash)("sha256").update(
37831
38209
  JSON.stringify(
37832
38210
  resourceTargets.filter((target) => target.resources).map((target) => [
37833
38211
  target.name,
@@ -38135,7 +38513,7 @@ ${entry}`);
38135
38513
  );
38136
38514
  for (const [target, data] of Object.entries(input.libraries ?? {})) {
38137
38515
  const bytes = Buffer.from(data, "base64");
38138
- const digest3 = (0, import_node_crypto34.createHash)("sha256").update(bytes).digest("hex");
38516
+ const digest3 = (0, import_node_crypto35.createHash)("sha256").update(bytes).digest("hex");
38139
38517
  if (input.binaryModules?.[target] && packageTargets.has(target)) {
38140
38518
  const objects = import_node_path55.default.join(
38141
38519
  layout2.root,
@@ -38787,7 +39165,7 @@ function readCompiledArtifact(directory2, hash) {
38787
39165
  return null;
38788
39166
  const bytes = (0, import_node_fs55.readFileSync)(import_node_path55.default.join(directory2, "app.wasm"));
38789
39167
  const gzip2 = (0, import_node_fs55.readFileSync)(import_node_path55.default.join(directory2, "icu.gz"));
38790
- if ((0, import_node_crypto34.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto34.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
39168
+ if ((0, import_node_crypto35.createHash)("sha256").update(bytes).digest("hex") !== receipt.wasm || (0, import_node_crypto35.createHash)("sha256").update(gzip2).digest("hex") !== receipt.icu || bytes.length <= 8 || bytes.readUInt32LE(0) !== 1836278016 || bytes.readUInt32LE(4) !== 1)
38791
39169
  return null;
38792
39170
  let sdk2;
38793
39171
  if ("sdk" in receipt) {
@@ -38795,7 +39173,7 @@ function readCompiledArtifact(directory2, hash) {
38795
39173
  if (!isRecord(image) || typeof image.key !== "string" || typeof image.sha256 !== "string" || typeof image.binding !== "string")
38796
39174
  return null;
38797
39175
  const binding = (0, import_node_fs55.readFileSync)(import_node_path55.default.join(directory2, "sdk-binding.bin"));
38798
- if ((0, import_node_crypto34.createHash)("sha256").update(binding).digest("hex") !== image.binding)
39176
+ if ((0, import_node_crypto35.createHash)("sha256").update(binding).digest("hex") !== image.binding)
38799
39177
  return null;
38800
39178
  sdk2 = {
38801
39179
  key: image.key,
@@ -38823,7 +39201,7 @@ function saveCompiledArtifact(root, artifact) {
38823
39201
  import_node_path55.default.join(pending2, "artifact.json"),
38824
39202
  JSON.stringify({
38825
39203
  hash: artifact.hash,
38826
- wasm: (0, import_node_crypto34.createHash)("sha256").update(artifact.bytes).digest("hex"),
39204
+ wasm: (0, import_node_crypto35.createHash)("sha256").update(artifact.bytes).digest("hex"),
38827
39205
  icu: artifact.icu.sha256,
38828
39206
  sdk: artifact.sdk && {
38829
39207
  key: artifact.sdk.key,
@@ -39172,7 +39550,7 @@ async function buildFrameworkProducts(scratch2, args) {
39172
39550
  const unoptimized = args.input.unoptimized === true;
39173
39551
  const sdkOptions = swiftCompileSdkOptions(args.moduleRoot, args.toolchainBin);
39174
39552
  const selectorOptions = swiftObjCSelectorOptions(args.moduleRoot);
39175
- const receiptKey = (0, import_node_crypto34.createHash)("sha256").update(
39553
+ const receiptKey = (0, import_node_crypto35.createHash)("sha256").update(
39176
39554
  JSON.stringify([
39177
39555
  "framework-products/v2",
39178
39556
  args.frameworkKey,
@@ -39236,6 +39614,10 @@ async function buildFrameworkProducts(scratch2, args) {
39236
39614
  // every framework target when callers alternate --cores.
39237
39615
  "-Xswiftc",
39238
39616
  "-gnone",
39617
+ "-Xcc",
39618
+ "-g0",
39619
+ "-Xcxx",
39620
+ "-g0",
39239
39621
  "-Xswiftc",
39240
39622
  "-num-threads",
39241
39623
  "-Xswiftc",
@@ -39335,7 +39717,7 @@ async function buildFrameworkProducts(scratch2, args) {
39335
39717
  const archiveBase = import_node_path55.default.join(scratch2, "products-lib");
39336
39718
  (0, import_node_fs55.mkdirSync)(archiveBase, { recursive: true });
39337
39719
  const archiveRoot = import_node_path55.default.join(archiveBase, receiptKey);
39338
- const stagedArchiveRoot = `${archiveRoot}.tmp-${process.pid}-${(0, import_node_crypto34.randomUUID)()}`;
39720
+ const stagedArchiveRoot = `${archiveRoot}.tmp-${process.pid}-${(0, import_node_crypto35.randomUUID)()}`;
39339
39721
  const stagedArchive = import_node_path55.default.join(stagedArchiveRoot, "lib");
39340
39722
  (0, import_node_fs55.mkdirSync)(stagedArchive, { recursive: true });
39341
39723
  const archived = /* @__PURE__ */ new Map();
@@ -39378,7 +39760,7 @@ ${args.frameworkKey}`,
39378
39760
  const receiptsDir = import_node_path55.default.join(scratch2, "products-ready");
39379
39761
  (0, import_node_fs55.mkdirSync)(receiptsDir, { recursive: true });
39380
39762
  const receiptFile2 = import_node_path55.default.join(receiptsDir, `${receiptKey}.json`);
39381
- const partialReceipt = `${receiptFile2}.${process.pid}.${(0, import_node_crypto34.randomUUID)()}`;
39763
+ const partialReceipt = `${receiptFile2}.${process.pid}.${(0, import_node_crypto35.randomUUID)()}`;
39382
39764
  (0, import_node_fs55.writeFileSync)(
39383
39765
  partialReceipt,
39384
39766
  JSON.stringify({
@@ -39550,7 +39932,7 @@ function mirrorTree2(source, target, skip) {
39550
39932
  if (existing?.isFile() && existing.size === stat.size && (existing.mtimeMs === stat.mtimeMs || (0, import_node_fs55.readFileSync)(from).equals((0, import_node_fs55.readFileSync)(to))))
39551
39933
  continue;
39552
39934
  if (existing) (0, import_node_fs55.rmSync)(to, { recursive: true, force: true });
39553
- const partial = `${to}.${(0, import_node_crypto34.randomUUID)()}`;
39935
+ const partial = `${to}.${(0, import_node_crypto35.randomUUID)()}`;
39554
39936
  (0, import_node_fs55.copyFileSync)(from, partial);
39555
39937
  if (stat.mtimeMs > Date.now()) (0, import_node_fs55.utimesSync)(partial, stat.atime, stat.mtime);
39556
39938
  (0, import_node_fs55.renameSync)(partial, to);
@@ -39610,7 +39992,7 @@ function stageFrameworkSource(moduleRoot, slot, frameworkKey, release) {
39610
39992
  return stagedModule;
39611
39993
  }
39612
39994
  function swiftLinkStamp(args) {
39613
- const hash = (0, import_node_crypto34.createHash)("sha256");
39995
+ const hash = (0, import_node_crypto35.createHash)("sha256");
39614
39996
  hash.update(`swift-link/v1
39615
39997
  ${args.frameworkKey}
39616
39998
  `);
@@ -39738,7 +40120,7 @@ async function compileSwiftProjectOnce(sources, options2) {
39738
40120
  const inputHash = swiftCompileInputHash(input, options2.release);
39739
40121
  const moduleDigest = swiftModuleDigest(moduleRoot);
39740
40122
  const sourceHash = inputHash.copy().update(moduleDigest).digest("hex");
39741
- const hash = sdkImage ? (0, import_node_crypto34.createHash)("sha256").update(`${sourceHash}
40123
+ const hash = sdkImage ? (0, import_node_crypto35.createHash)("sha256").update(`${sourceHash}
39742
40124
  sdk module ${sdkImage.key}`).digest("hex") : sourceHash;
39743
40125
  const frameworkKey = swiftProjectBuildKey(moduleRoot, options2.release);
39744
40126
  const sharedRoot = import_node_path55.default.join(swiftCacheDir(), "swift-projects", hash);
@@ -39835,7 +40217,7 @@ ${cap}` : "";
39835
40217
  }
39836
40218
  const baseRoot = root;
39837
40219
  const canPoolBuildRoot = !options2.intermediates && !options2.project && !options2.linkOnly && import_node_path55.default.basename(import_node_path55.default.dirname(baseRoot)) === "swift-builds";
39838
- const buildShape = canPoolBuildRoot ? (0, import_node_crypto34.createHash)("sha256").update(
40220
+ const buildShape = canPoolBuildRoot ? (0, import_node_crypto35.createHash)("sha256").update(
39839
40221
  JSON.stringify([
39840
40222
  frameworkKey,
39841
40223
  Boolean(sdkImage),
@@ -40126,6 +40508,10 @@ ${cap}` : "";
40126
40508
  // fan-out under high -j.
40127
40509
  "-Xswiftc",
40128
40510
  "-gnone",
40511
+ "-Xcc",
40512
+ "-g0",
40513
+ "-Xcxx",
40514
+ "-g0",
40129
40515
  ...incrementalPreview ? [] : [
40130
40516
  "-Xswiftc",
40131
40517
  "-num-threads",
@@ -40320,17 +40706,17 @@ ${cap}` : "";
40320
40706
  }
40321
40707
  const receipt = import_node_path55.default.join(
40322
40708
  checkpoints,
40323
- (0, import_node_crypto34.createHash)("sha256").update(target).digest("hex")
40709
+ (0, import_node_crypto35.createHash)("sha256").update(target).digest("hex")
40324
40710
  );
40325
40711
  const headers = producers.map(headerPaths);
40326
40712
  for (const header of headers)
40327
40713
  if ((0, import_node_fs55.existsSync)(header.original)) publishHeader(header);
40328
40714
  const fingerprint = () => {
40329
- const digest3 = (0, import_node_crypto34.createHash)("sha256").update(recipe2);
40715
+ const digest3 = (0, import_node_crypto35.createHash)("sha256").update(recipe2);
40330
40716
  for (const { original, emitted } of headers) {
40331
40717
  if (!(0, import_node_fs55.existsSync)(original) || !(0, import_node_fs55.existsSync)(emitted)) return;
40332
40718
  digest3.update(
40333
- (0, import_node_crypto34.createHash)("sha256").update((0, import_node_fs55.readFileSync)(emitted)).digest()
40719
+ (0, import_node_crypto35.createHash)("sha256").update((0, import_node_fs55.readFileSync)(emitted)).digest()
40334
40720
  );
40335
40721
  }
40336
40722
  return digest3.digest("hex");
@@ -40543,12 +40929,12 @@ ${cap}` : "";
40543
40929
  options2.signal
40544
40930
  );
40545
40931
  }
40546
- var import_node_child_process35, import_node_crypto34, import_node_fs55, import_node_os14, import_node_path55, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
40932
+ var import_node_child_process35, import_node_crypto35, import_node_fs55, import_node_os14, import_node_path55, v6, WASM_TRIPLE, SWIFTPM_PROGRESS, SWIFTPM_NOISE, SWIFT_COMPILER_ENV_KEYS, SYSTEM_MODULE_LIBRARIES, SYSTEM_MODULE_IMPORT, lastPartition, OPTIONAL_FRAMEWORK_DEPENDENCIES, OPTIONAL_FRAMEWORKS, availableModules, sdkOverlayFrameworks, DISTRIBUTION_CLANG_MODULES, CLANG_DISTRIBUTION_MODULES, ONE_PRODUCT, GAME_FAMILY, gameProducts, gameProduct, GAME_REACH, ONE_IMPLICIT_FLAGS, executableLinkFlags, darwinRecordsRegion, REACTOR_FLAG, MULTI_MANIFEST_VERSION, SWIFT_HEADER_PRODUCTS_TARGET, compilerSourceDigest, nativeCxxCompilerFlags, MODULE_MAP_RESPONSE_FILE_RUN, cFlagArray, cxxFlagArray, SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET, OS_IOS, ARCH_ARM64, NOT_ON_IOS, DELEGATE_CLASS, ARM64_MACRO, WASM_MACRO, ARCH_WASM32, C_WORDS, archEnvironments, CORE_FOUNDATION_GEOMETRY_TYPES, CORE_FOUNDATION_GRAPHICS_TYPES, CORE_FOUNDATION_HANDLE_IMPORTS, cPredefineTable, cPredefineCache, HIDDEN_UNITS, FIRST_WINS_PAIRS, LAST_WINS_PAIRS, VALUE_FLAGS, LIBXML_REFERENCE, LIBXML_SOURCE, ROOT_LOCKS, host, rootLocks, SHARED_ARTIFACT_BUDGET_BYTES, SHARED_ARTIFACT_GRACE_MS, RETIRED_PREFIX, retainedArtifacts, FRAMEWORK_LINK_TARGET, frameworkProductsReceiptSchema, SWIFT_LINK_STAMP, SWIFT_HOST_COMPILER_WRAPPER, SWIFT_FRAMEWORK_SLOTS, SWIFT_FRAMEWORK_UNOPTIMIZED_SLOTS, SWIFT_FRAMEWORK_SLOT_KEY, SWIFT_FRAMEWORK_SLOT_ORIGIN, SWIFT_FRAMEWORK_SLOT_RELEASE, SWIFT_BUILD_ROOT_SLOTS, SWIFT_BUILD_ROOT_SHAPE;
40547
40933
  var init_swift_compile = __esm({
40548
40934
  "src/swift-compile.ts"() {
40549
40935
  "use strict";
40550
40936
  import_node_child_process35 = require("node:child_process");
40551
- import_node_crypto34 = require("node:crypto");
40937
+ import_node_crypto35 = require("node:crypto");
40552
40938
  import_node_fs55 = require("node:fs");
40553
40939
  import_node_os14 = __toESM(require("node:os"), 1);
40554
40940
  import_node_path55 = __toESM(require("node:path"), 1);
@@ -40776,7 +41162,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
40776
41162
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
40777
41163
  MULTI_MANIFEST_VERSION = 76;
40778
41164
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
40779
- compilerSourceDigest = true ? "67e8f8e0e47047534254dae36e13cda1c7694fb49b1d92c2d01a9e386dc59e59" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
41165
+ compilerSourceDigest = true ? "169122685e250113f128b79efc78f9868f581da36ab083c174056ab99b87b629" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
40780
41166
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
40781
41167
  MODULE_MAP_RESPONSE_FILE_RUN = 16;
40782
41168
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
@@ -40892,7 +41278,7 @@ async function podPrepareEnvironment(base2) {
40892
41278
  if (process.platform !== "linux") return base2;
40893
41279
  const { root, toolchainBin } = await resolveSwiftModule();
40894
41280
  const { sysroot, resources } = swiftSdkPaths(root, toolchainBin);
40895
- const key2 = (0, import_node_crypto35.createHash)("sha256").update(XCRUN).update(CLANG).digest("hex").slice(0, 16);
41281
+ const key2 = (0, import_node_crypto36.createHash)("sha256").update(XCRUN).update(CLANG).digest("hex").slice(0, 16);
40896
41282
  const directory2 = import_node_path56.default.join(cacheDir(), "pod-tools", key2);
40897
41283
  if (!import_node_fs56.default.existsSync(directory2)) {
40898
41284
  import_node_fs56.default.mkdirSync(import_node_path56.default.dirname(directory2), { recursive: true });
@@ -40933,11 +41319,11 @@ async function podPrepareEnvironment(base2) {
40933
41319
  PEACH_POD_RESOURCES: resources
40934
41320
  };
40935
41321
  }
40936
- var import_node_crypto35, import_node_fs56, import_node_path56, XCRUN, CLANG;
41322
+ var import_node_crypto36, import_node_fs56, import_node_path56, XCRUN, CLANG;
40937
41323
  var init_pod_prepare_toolchain = __esm({
40938
41324
  "src/pod-prepare-toolchain.ts"() {
40939
41325
  "use strict";
40940
- import_node_crypto35 = require("node:crypto");
41326
+ import_node_crypto36 = require("node:crypto");
40941
41327
  import_node_fs56 = __toESM(require("node:fs"), 1);
40942
41328
  import_node_path56 = __toESM(require("node:path"), 1);
40943
41329
  init_home_paths();
@@ -41023,10 +41409,10 @@ async function podSourceRoot(spec, prepareEnv) {
41023
41409
  `${name3}: unrecognized ${strategy} source options ${unrecognized.join(", ")}`
41024
41410
  );
41025
41411
  const base2 = import_node_path57.default.join(rnxHomeDir(), "pod-sources");
41026
- const digest3 = (0, import_node_crypto36.createHash)("sha256").update(canonicalJson(source)).digest("hex").slice(0, 16);
41412
+ const digest3 = (0, import_node_crypto37.createHash)("sha256").update(canonicalJson(source)).digest("hex").slice(0, 16);
41027
41413
  const root = import_node_path57.default.join(base2, name3, `${String(spec.version)}-${digest3}`);
41028
41414
  if (import_node_fs57.default.existsSync(root)) return root;
41029
- const stage = import_node_path57.default.join(base2, ".staging", (0, import_node_crypto36.randomUUID)());
41415
+ const stage = import_node_path57.default.join(base2, ".staging", (0, import_node_crypto37.randomUUID)());
41030
41416
  import_node_fs57.default.mkdirSync(stage, { recursive: true });
41031
41417
  try {
41032
41418
  if (strategy === "git") await downloadGit(name3, url, options2, stage);
@@ -41201,7 +41587,7 @@ async function downloadFile(pod, url, headers, file, algorithm) {
41201
41587
  }
41202
41588
  if (!response?.ok || !response.body)
41203
41589
  throw new Error(`${pod}: GET ${url} failed with HTTP ${response?.status ?? "error"}`);
41204
- const hash = algorithm ? (0, import_node_crypto36.createHash)(algorithm) : null;
41590
+ const hash = algorithm ? (0, import_node_crypto37.createHash)(algorithm) : null;
41205
41591
  const handle = await import_node_fs57.default.promises.open(file, "w");
41206
41592
  try {
41207
41593
  const reader = response.body.getReader();
@@ -41458,12 +41844,12 @@ function cleanInstalledPod(spec, root, used) {
41458
41844
  (node) => used.filter((entry) => entry.specs.includes(node.name)).map((entry) => entry.platform)
41459
41845
  );
41460
41846
  }
41461
- var import_node_child_process36, import_node_crypto36, import_node_fs57, import_node_os15, import_node_path57, COCOAPODS_VERSION, USER_AGENT, PLATFORMS, HEADER_EXTENSIONS, SOURCE_EXTENSIONS, SOURCE_FILES_PATTERN, STRATEGIES, OPTIONS, ARCHIVE_TYPES, object4, RETRY_STATUSES, chomp, stringList, bracketEnd, escapeRegex;
41847
+ var import_node_child_process36, import_node_crypto37, import_node_fs57, import_node_os15, import_node_path57, COCOAPODS_VERSION, USER_AGENT, PLATFORMS, HEADER_EXTENSIONS, SOURCE_EXTENSIONS, SOURCE_FILES_PATTERN, STRATEGIES, OPTIONS, ARCHIVE_TYPES, object4, RETRY_STATUSES, chomp, stringList, bracketEnd, escapeRegex;
41462
41848
  var init_pod_sources = __esm({
41463
41849
  "src/pod-sources.ts"() {
41464
41850
  "use strict";
41465
41851
  import_node_child_process36 = require("node:child_process");
41466
- import_node_crypto36 = require("node:crypto");
41852
+ import_node_crypto37 = require("node:crypto");
41467
41853
  import_node_fs57 = __toESM(require("node:fs"), 1);
41468
41854
  import_node_os15 = __toESM(require("node:os"), 1);
41469
41855
  import_node_path57 = __toESM(require("node:path"), 1);
@@ -48717,7 +49103,7 @@ function specRepo(url, refresh) {
48717
49103
  const dir = import_node_path58.default.join(
48718
49104
  cacheDir(),
48719
49105
  "cocoapods-repos",
48720
- (0, import_node_crypto37.createHash)("sha256").update(url).digest("hex").slice(0, 16)
49106
+ (0, import_node_crypto38.createHash)("sha256").update(url).digest("hex").slice(0, 16)
48721
49107
  );
48722
49108
  if (!import_node_fs58.default.existsSync(import_node_path58.default.join(dir, ".git"))) {
48723
49109
  const staged = `${dir}.${process.pid}`;
@@ -48747,7 +49133,7 @@ function podDir(repo, name3) {
48747
49133
  const specs = import_node_fs58.default.existsSync(import_node_path58.default.join(repo, "Specs")) ? import_node_path58.default.join(repo, "Specs") : repo;
48748
49134
  const metadata = import_node_path58.default.join(repo, "CocoaPods-version.yml");
48749
49135
  const lengths = import_node_fs58.default.existsSync(metadata) ? browser_default.parse(import_node_fs58.default.readFileSync(metadata, "utf8"))?.prefix_lengths : void 0;
48750
- const hash = (0, import_node_crypto37.createHash)("md5").update(name3).digest("hex");
49136
+ const hash = (0, import_node_crypto38.createHash)("md5").update(name3).digest("hex");
48751
49137
  let at = 0;
48752
49138
  const shards2 = (Array.isArray(lengths) ? lengths : []).map((length) => {
48753
49139
  if (typeof length !== "number")
@@ -48780,17 +49166,17 @@ async function sourceSpecificationFile(source, name3, version2) {
48780
49166
  if (!file) throw new Error(`${source} lists ${name3} ${version2} without a podspec`);
48781
49167
  return file;
48782
49168
  }
48783
- var import_node_child_process37, import_node_crypto37, import_node_fs58, import_node_path58, shard, shards, TRUNK_SOURCES, refreshed, specRepoKey;
49169
+ var import_node_child_process37, import_node_crypto38, import_node_fs58, import_node_path58, shard, shards, TRUNK_SOURCES, refreshed, specRepoKey;
48784
49170
  var init_cocoapods_trunk = __esm({
48785
49171
  "src/cocoapods-trunk.ts"() {
48786
49172
  "use strict";
48787
49173
  import_node_child_process37 = require("node:child_process");
48788
- import_node_crypto37 = require("node:crypto");
49174
+ import_node_crypto38 = require("node:crypto");
48789
49175
  import_node_fs58 = __toESM(require("node:fs"), 1);
48790
49176
  import_node_path58 = __toESM(require("node:path"), 1);
48791
49177
  init_browser();
48792
49178
  init_home_paths();
48793
- shard = (name3) => (0, import_node_crypto37.createHash)("md5").update(name3).digest("hex").slice(0, 3).split("");
49179
+ shard = (name3) => (0, import_node_crypto38.createHash)("md5").update(name3).digest("hex").slice(0, 3).split("");
48794
49180
  shards = /* @__PURE__ */ new Map();
48795
49181
  TRUNK_SOURCES = /* @__PURE__ */ new Set([
48796
49182
  "trunk",
@@ -48909,7 +49295,7 @@ function prism() {
48909
49295
  throw new Error(`prism exited ${code}`);
48910
49296
  },
48911
49297
  random_get: (pointer2, length) => {
48912
- if (memory) (0, import_node_crypto38.randomFillSync)(new Uint8Array(memory.buffer, pointer2, length));
49298
+ if (memory) (0, import_node_crypto39.randomFillSync)(new Uint8Array(memory.buffer, pointer2, length));
48913
49299
  return 0;
48914
49300
  }
48915
49301
  }
@@ -48933,11 +49319,11 @@ function parseRuby(source, file) {
48933
49319
  parsed.set(file, { source, program: result.value });
48934
49320
  return result.value;
48935
49321
  }
48936
- var import_node_crypto38, import_node_fs60, import_node_module3, import_parsePrism, RubySyntaxError, prismExports, parsed;
49322
+ var import_node_crypto39, import_node_fs60, import_node_module3, import_parsePrism, RubySyntaxError, prismExports, parsed;
48937
49323
  var init_podspec_prism = __esm({
48938
49324
  "src/podspec-prism.ts"() {
48939
49325
  "use strict";
48940
- import_node_crypto38 = require("node:crypto");
49326
+ import_node_crypto39 = require("node:crypto");
48941
49327
  import_node_fs60 = __toESM(require("node:fs"), 1);
48942
49328
  import_node_module3 = require("node:module");
48943
49329
  import_parsePrism = require("peachsim/vendor/@ruby/prism/src/parsePrism.js");
@@ -49556,7 +49942,7 @@ function stringMethod(interp, self, call, env) {
49556
49942
  case "ascii_only?":
49557
49943
  return call.name === "valid_encoding?" ? true : [...s].every((c) => c.charCodeAt(0) < 128);
49558
49944
  case "hash":
49559
- return Number.parseInt((0, import_node_crypto39.createHash)("sha1").update(s).digest("hex").slice(0, 12), 16);
49945
+ return Number.parseInt((0, import_node_crypto40.createHash)("sha1").update(s).digest("hex").slice(0, 12), 16);
49560
49946
  case "strip_heredoc":
49561
49947
  return str2(stripHeredoc2(s));
49562
49948
  case "squish":
@@ -50075,7 +50461,7 @@ function arrayMethod(interp, self, call, env) {
50075
50461
  return NOT_FOUND;
50076
50462
  case "hash":
50077
50463
  return Number.parseInt(
50078
- (0, import_node_crypto39.createHash)("sha1").update(hashKey(self)).digest("hex").slice(0, 12),
50464
+ (0, import_node_crypto40.createHash)("sha1").update(hashKey(self)).digest("hex").slice(0, 12),
50079
50465
  16
50080
50466
  );
50081
50467
  case "pack":
@@ -50349,7 +50735,7 @@ function hashMethod(interp, self, call, env) {
50349
50735
  }
50350
50736
  case "hash":
50351
50737
  return Number.parseInt(
50352
- (0, import_node_crypto39.createHash)("sha1").update(hashKey(self)).digest("hex").slice(0, 12),
50738
+ (0, import_node_crypto40.createHash)("sha1").update(hashKey(self)).digest("hex").slice(0, 12),
50353
50739
  16
50354
50740
  );
50355
50741
  case "compare_by_identity":
@@ -51688,12 +52074,12 @@ function archiveStepInside(words2, cwd, writable) {
51688
52074
  return /^-x[a-z]*f$/.test(args[0] ?? "") && args.includes("-C") && operands.length === 2 && operands.every(inside);
51689
52075
  return false;
51690
52076
  }
51691
- var import_node_child_process38, import_node_crypto39, import_node_fs61, import_node_path59, N, UnsupportedRuby, RString, RSymbol, RFloat, RRange, RRegexp, RMatch, RHash, RProc, RObject, RModule, Scope, RubyError, BreakSignal, NextSignal, ReturnSignal, ThrowSignal, objectIds, nextObjectId, str2, sym, truthy, POD_VERSION_METADATA, RubyVersion, Interpreter, RetrySignal, breakTags, BoundMethod, UnboundMethod, NOT_FOUND, EnumeratorData, RubyKeys, OBJECT_METHODS, KERNEL_METHODS, STDLIB, SCRIPT_RUNNERS;
52077
+ var import_node_child_process38, import_node_crypto40, import_node_fs61, import_node_path59, N, UnsupportedRuby, RString, RSymbol, RFloat, RRange, RRegexp, RMatch, RHash, RProc, RObject, RModule, Scope, RubyError, BreakSignal, NextSignal, ReturnSignal, ThrowSignal, objectIds, nextObjectId, str2, sym, truthy, POD_VERSION_METADATA, RubyVersion, Interpreter, RetrySignal, breakTags, BoundMethod, UnboundMethod, NOT_FOUND, EnumeratorData, RubyKeys, OBJECT_METHODS, KERNEL_METHODS, STDLIB, SCRIPT_RUNNERS;
51692
52078
  var init_podspec_ruby = __esm({
51693
52079
  "src/podspec-ruby.ts"() {
51694
52080
  "use strict";
51695
52081
  import_node_child_process38 = require("node:child_process");
51696
- import_node_crypto39 = require("node:crypto");
52082
+ import_node_crypto40 = require("node:crypto");
51697
52083
  import_node_fs61 = __toESM(require("node:fs"), 1);
51698
52084
  import_node_path59 = __toESM(require("node:path"), 1);
51699
52085
  N = __toESM(require("peachsim/vendor/@ruby/prism/src/nodes.js"), 1);
@@ -53938,7 +54324,7 @@ function defineVersionClass(interp, cls) {
53938
54324
  cls,
53939
54325
  "hash",
53940
54326
  (c) => Number.parseInt(
53941
- (0, import_node_crypto40.createHash)("sha1").update(data(c).text).digest("hex").slice(0, 12),
54327
+ (0, import_node_crypto41.createHash)("sha1").update(data(c).text).digest("hex").slice(0, 12),
53942
54328
  16
53943
54329
  )
53944
54330
  );
@@ -54752,11 +55138,11 @@ function installStdlib(interp) {
54752
55138
  def(
54753
55139
  cls,
54754
55140
  "hexdigest",
54755
- (c) => str2((0, import_node_crypto40.createHash)(algorithm).update(text4(interp, c.args[0])).digest("hex"))
55141
+ (c) => str2((0, import_node_crypto41.createHash)(algorithm).update(text4(interp, c.args[0])).digest("hex"))
54756
55142
  );
54757
55143
  def(cls, "file", (c) => {
54758
55144
  const value = new RObject(cls);
54759
- value.data = (0, import_node_crypto40.createHash)(algorithm).update(import_node_fs62.default.readFileSync(resolve4(text4(interp, c.args[0])))).digest("hex");
55145
+ value.data = (0, import_node_crypto41.createHash)(algorithm).update(import_node_fs62.default.readFileSync(resolve4(text4(interp, c.args[0])))).digest("hex");
54760
55146
  return value;
54761
55147
  });
54762
55148
  interp.defineNative(
@@ -54910,12 +55296,12 @@ function fnmatch(pattern, subject, flags) {
54910
55296
  return !leadingDot && new RegExp(`^${source}$`, casefold ? "is" : "s").test(subject);
54911
55297
  });
54912
55298
  }
54913
- var import_node_child_process39, import_node_crypto40, import_node_fs62, import_node_os16, import_node_path60, segment, FileHandle, WriteHandle, DownloadHandle, GemRequirement, TimeValue, SetData;
55299
+ var import_node_child_process39, import_node_crypto41, import_node_fs62, import_node_os16, import_node_path60, segment, FileHandle, WriteHandle, DownloadHandle, GemRequirement, TimeValue, SetData;
54914
55300
  var init_podspec_ruby_stdlib = __esm({
54915
55301
  "src/podspec-ruby-stdlib.ts"() {
54916
55302
  "use strict";
54917
55303
  import_node_child_process39 = require("node:child_process");
54918
- import_node_crypto40 = require("node:crypto");
55304
+ import_node_crypto41 = require("node:crypto");
54919
55305
  import_node_fs62 = __toESM(require("node:fs"), 1);
54920
55306
  import_node_os16 = __toESM(require("node:os"), 1);
54921
55307
  import_node_path60 = __toESM(require("node:path"), 1);
@@ -66092,7 +66478,7 @@ function packageRoot(file) {
66092
66478
  return directory2;
66093
66479
  }
66094
66480
  function appIdentity(app) {
66095
- return (0, import_node_crypto41.createHash)("sha256").update(import_node_fs72.default.readFileSync(import_node_path72.default.join(app, "package.json"))).digest("hex");
66481
+ return (0, import_node_crypto42.createHash)("sha256").update(import_node_fs72.default.readFileSync(import_node_path72.default.join(app, "package.json"))).digest("hex");
66096
66482
  }
66097
66483
  function receiptFile(key2, environment) {
66098
66484
  return import_node_path72.default.join(cacheDir(), "podspecs", "receipts-v1", key2, `${environment}.json`);
@@ -66116,7 +66502,7 @@ function podspecReceiptIdentity(file, appRoot = null) {
66116
66502
  if (import_node_fs72.default.existsSync(manifest2)) manifests.add(manifest2);
66117
66503
  if (directory2 === workspace || import_node_path72.default.dirname(directory2) === directory2) break;
66118
66504
  }
66119
- const hash = (0, import_node_crypto41.createHash)("sha256").update(import_node_path72.default.relative(dependencyRoot, file)).update("\0").update(import_node_fs72.default.readFileSync(file));
66505
+ const hash = (0, import_node_crypto42.createHash)("sha256").update(import_node_path72.default.relative(dependencyRoot, file)).update("\0").update(import_node_fs72.default.readFileSync(file));
66120
66506
  hash.update("\0").update(manifest);
66121
66507
  if (reactNative) hash.update("\0react-native-source");
66122
66508
  for (const manifest2 of manifests) hash.update("\0").update(import_node_fs72.default.readFileSync(manifest2));
@@ -66130,7 +66516,7 @@ function podspecReceiptIdentity(file, appRoot = null) {
66130
66516
  packageContexts.set(app, contexts);
66131
66517
  let context = contexts.get(dependencyRoot);
66132
66518
  if (!context) {
66133
- const hash = (0, import_node_crypto41.createHash)("sha256");
66519
+ const hash = (0, import_node_crypto42.createHash)("sha256");
66134
66520
  const walk4 = (relative4) => {
66135
66521
  for (const entry of import_node_fs72.default.readdirSync(import_node_path72.default.join(dependencyRoot, relative4), {
66136
66522
  withFileTypes: true
@@ -66149,7 +66535,7 @@ function podspecReceiptIdentity(file, appRoot = null) {
66149
66535
  context = hash.digest("hex");
66150
66536
  contexts.set(dependencyRoot, context);
66151
66537
  }
66152
- const environmentHash = (0, import_node_crypto41.createHash)("sha256").update(context);
66538
+ const environmentHash = (0, import_node_crypto42.createHash)("sha256").update(context);
66153
66539
  for (const name3 of Object.keys(env).filter((name4) => /^(RCT_|USE_|ONE_|HERMES_|EXPO_)/.test(name4)).sort())
66154
66540
  environmentHash.update("\0").update(name3).update(env[name3] ?? "");
66155
66541
  const installed = reactNative ? void 0 : installedPodspec(app, file, dependencyRoot);
@@ -66214,7 +66600,7 @@ function loadPodspecs(files2, appRoot = null) {
66214
66600
  receipts.set(plan.key, plan.receipt);
66215
66601
  const file = receiptFile(plan.key, plan.environment);
66216
66602
  import_node_fs72.default.mkdirSync(import_node_path72.default.dirname(file), { recursive: true });
66217
- const temporary = `${file}.${(0, import_node_crypto41.randomUUID)()}.tmp`;
66603
+ const temporary = `${file}.${(0, import_node_crypto42.randomUUID)()}.tmp`;
66218
66604
  import_node_fs72.default.writeFileSync(temporary, JSON.stringify(plan.receipt));
66219
66605
  import_node_fs72.default.renameSync(temporary, file);
66220
66606
  }
@@ -66364,11 +66750,11 @@ function podspecSourceFiles(directory2, spec) {
66364
66750
  );
66365
66751
  return matched;
66366
66752
  }
66367
- var import_node_crypto41, import_node_fs72, import_node_path72, import_zod, UnsupportedPodspec, pathsSchema, attributesSchema, evaluatedSpecSchema, podspecReceiptSchema, receipts, restoredReceipts, appReceipts, inputKeys, packageContexts, installedSpecs, Spec, podspecName, podspecSwiftVersion, c99, podspecLinksBinaries, podspecSourcePatterns, trees, SOURCE_EXTENSIONS2;
66753
+ var import_node_crypto42, import_node_fs72, import_node_path72, import_zod, UnsupportedPodspec, pathsSchema, attributesSchema, evaluatedSpecSchema, podspecReceiptSchema, receipts, restoredReceipts, appReceipts, inputKeys, packageContexts, installedSpecs, Spec, podspecName, podspecSwiftVersion, c99, podspecLinksBinaries, podspecSourcePatterns, trees, SOURCE_EXTENSIONS2;
66368
66754
  var init_podspec_sources = __esm({
66369
66755
  "src/podspec-sources.ts"() {
66370
66756
  "use strict";
66371
- import_node_crypto41 = require("node:crypto");
66757
+ import_node_crypto42 = require("node:crypto");
66372
66758
  import_node_fs72 = __toESM(require("node:fs"), 1);
66373
66759
  import_node_path72 = __toESM(require("node:path"), 1);
66374
66760
  import_zod = require("peachsim/vendor/zod");
@@ -66431,6 +66817,11 @@ var init_podspec_sources = __esm({
66431
66817
  });
66432
66818
 
66433
66819
  // src/bazel-project.ts
66820
+ function sha256Hex5(bytes) {
66821
+ if (typeof Bun !== "undefined")
66822
+ return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
66823
+ return (0, import_node_crypto43.createHash)("sha256").update(bytes).digest("hex");
66824
+ }
66434
66825
  function isBazelPackage(input) {
66435
66826
  return /^BUILD(?:\.bazel)?$/.test(import_node_path73.default.basename(input)) && import_node_fs73.default.statSync(input).isFile();
66436
66827
  }
@@ -66460,7 +66851,7 @@ function bazelBinary(root) {
66460
66851
  const expected = (0, import_node_child_process41.execFileSync)("curl", ["-fsSL", `${url}.sha256`], {
66461
66852
  encoding: "utf8"
66462
66853
  }).split(/\s/)[0];
66463
- const actual = (0, import_node_crypto42.createHash)("sha256").update(import_node_fs73.default.readFileSync(partial)).digest("hex");
66854
+ const actual = (0, import_node_crypto43.createHash)("sha256").update(import_node_fs73.default.readFileSync(partial)).digest("hex");
66464
66855
  if (actual !== expected) {
66465
66856
  import_node_fs73.default.rmSync(partial, { force: true });
66466
66857
  throw new Error(`${url} digest ${actual} differs from its release ${expected}`);
@@ -66490,7 +66881,7 @@ function parseRule(raw2) {
66490
66881
  };
66491
66882
  }
66492
66883
  function graphInputsDigest(root) {
66493
- const hash = (0, import_node_crypto42.createHash)("sha256");
66884
+ const hash = (0, import_node_crypto43.createHash)("sha256");
66494
66885
  const visit3 = (dir) => {
66495
66886
  for (const entry of import_node_fs73.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
66496
66887
  if (entry.name.startsWith(".") || entry.name.startsWith("bazel-")) continue;
@@ -66523,7 +66914,7 @@ function bazelGraph(root, label, configuration) {
66523
66914
  const cached2 = graphs.get(key2);
66524
66915
  if (cached2) return cached2;
66525
66916
  const flags = configurationFlags(configuration);
66526
- const digest3 = (0, import_node_crypto42.createHash)("sha256").update(JSON.stringify([GRAPH_FORMAT, label, flags, QUERIED_RULES])).update(graphInputsDigest(root)).digest("hex").slice(0, 24);
66917
+ const digest3 = (0, import_node_crypto43.createHash)("sha256").update(JSON.stringify([GRAPH_FORMAT, label, flags, QUERIED_RULES])).update(graphInputsDigest(root)).digest("hex").slice(0, 24);
66527
66918
  const file = import_node_path73.default.join(root, ".build", "peach-bazel", `graph-${digest3}.json`);
66528
66919
  const bazel = bazelBinary(root);
66529
66920
  const run16 = (args) => (0, import_node_child_process41.execFileSync)(bazel, args, {
@@ -66997,6 +67388,18 @@ ${published3.map(
66997
67388
  `bazel application has ${missing2.length} unbuilt inputs: ${missing2.slice(0, 5).map((file) => import_node_path73.default.relative(root, file)).join(", ")}`
66998
67389
  );
66999
67390
  const archives = /* @__PURE__ */ new Map();
67391
+ let outputOwner;
67392
+ const ownerOfOutput = (file) => {
67393
+ if (!outputOwner) {
67394
+ outputOwner = /* @__PURE__ */ new Map();
67395
+ for (const item of graph.rules.values())
67396
+ for (const output of item.outputs) {
67397
+ const outputPath2 = files2.path(output);
67398
+ if (!outputOwner.has(outputPath2)) outputOwner.set(outputPath2, item);
67399
+ }
67400
+ }
67401
+ return outputOwner.get(file);
67402
+ };
67000
67403
  for (const rule of order) {
67001
67404
  for (const dep of rule.attrs.get("deps")?.list ?? []) {
67002
67405
  const owner = ruleOf(dep, rule.label);
@@ -67014,9 +67417,7 @@ ${published3.map(
67014
67417
  for (const raw2 of rule.attrs.get("srcs")?.list ?? []) {
67015
67418
  const label2 = canonicalLabel(raw2, rule.label);
67016
67419
  for (const archive of files2.expand([raw2], rule.label).filter((file) => file.endsWith(".a"))) {
67017
- const owner = [...graph.rules.values()].find(
67018
- (item) => item.outputs.some((output) => files2.path(output) === archive)
67019
- );
67420
+ const owner = ownerOfOutput(archive);
67020
67421
  const key2 = owner?.label ?? label2;
67021
67422
  const entry = archives.get(key2) ?? {
67022
67423
  library: import_node_path73.default.basename(archive),
@@ -67042,6 +67443,13 @@ ${published3.map(
67042
67443
  )
67043
67444
  )
67044
67445
  );
67446
+ const matchesAppInclude = (name3) => {
67447
+ if (appIncludes.has(name3)) return true;
67448
+ for (let slash = name3.indexOf("/"); slash >= 0; slash = name3.indexOf("/", slash + 1)) {
67449
+ if (appIncludes.has(name3.slice(slash + 1))) return true;
67450
+ }
67451
+ return false;
67452
+ };
67045
67453
  let generatedBy;
67046
67454
  const generators = () => {
67047
67455
  if (!generatedBy) {
@@ -67122,9 +67530,7 @@ ${published3.map(
67122
67530
  [...linkers].filter((rule) => rule.attrs.get("module_name")?.value).flatMap((rule) => files2.expand(rule.attrs.get("hdrs")?.list ?? [], rule.label))
67123
67531
  );
67124
67532
  const entries2 = headers.filter(
67125
- (header) => imported.has(header.file) || [...appIncludes].some(
67126
- (include) => header.name === include || header.name.endsWith(`/${include}`)
67127
- )
67533
+ (header) => imported.has(header.file) || matchesAppInclude(header.name)
67128
67534
  );
67129
67535
  const bundle = import_node_path73.default.join(products, "archives", `${name3}.xcframework`);
67130
67536
  const slice = import_node_path73.default.join(bundle, "ios-arm64-simulator");
@@ -67170,14 +67576,9 @@ ${published3.map(
67170
67576
  ]
67171
67577
  )
67172
67578
  ]);
67173
- const digest3 = (0, import_node_crypto42.createHash)("sha256").update(
67174
- JSON.stringify(
67175
- [...contents2].map(([file, bytes]) => [
67176
- file,
67177
- (0, import_node_crypto42.createHash)("sha256").update(bytes).digest("hex")
67178
- ])
67179
- )
67180
- ).digest("hex");
67579
+ const digest3 = sha256Hex5(
67580
+ JSON.stringify([...contents2].map(([file, bytes]) => [file, sha256Hex5(bytes)]))
67581
+ );
67181
67582
  const stamp = import_node_path73.default.join(bundle, ".peach-digest");
67182
67583
  if (!import_node_fs73.default.existsSync(stamp) || import_node_fs73.default.readFileSync(stamp, "utf8") !== digest3) {
67183
67584
  import_node_fs73.default.rmSync(bundle, { recursive: true, force: true });
@@ -67337,12 +67738,12 @@ function shellTokens(options2) {
67337
67738
  return words2;
67338
67739
  });
67339
67740
  }
67340
- var import_node_child_process41, import_node_crypto42, import_node_fs73, import_node_os18, import_node_path73, LIBRARY_RULES, QUERIED_RULES, NATIVE_SOURCE, HEADER3, PRODUCTS, graphs, CLANG_CONFIGURATION_FLAGS, GRAPH_FORMAT, BazelFiles, CXX_STANDARD;
67741
+ var import_node_child_process41, import_node_crypto43, import_node_fs73, import_node_os18, import_node_path73, LIBRARY_RULES, QUERIED_RULES, NATIVE_SOURCE, HEADER3, PRODUCTS, graphs, CLANG_CONFIGURATION_FLAGS, GRAPH_FORMAT, BazelFiles, CXX_STANDARD;
67341
67742
  var init_bazel_project = __esm({
67342
67743
  "src/bazel-project.ts"() {
67343
67744
  "use strict";
67344
67745
  import_node_child_process41 = require("node:child_process");
67345
- import_node_crypto42 = require("node:crypto");
67746
+ import_node_crypto43 = require("node:crypto");
67346
67747
  import_node_fs73 = __toESM(require("node:fs"), 1);
67347
67748
  import_node_os18 = __toESM(require("node:os"), 1);
67348
67749
  import_node_path73 = __toESM(require("node:path"), 1);
@@ -67803,7 +68204,7 @@ async function swiftBinaryModules(binary2) {
67803
68204
  if (!binary2.url) return localSwiftBinaryModules(binary2.dir);
67804
68205
  const cached2 = import_node_path74.default.join(
67805
68206
  cacheDir3,
67806
- `${(0, import_node_crypto43.createHash)("sha256").update(`${binary2.url}\0${binary2.checksum ?? ""}`).digest("hex").slice(0, 32)}.json`
68207
+ `${(0, import_node_crypto44.createHash)("sha256").update(`${binary2.url}\0${binary2.checksum ?? ""}`).digest("hex").slice(0, 32)}.json`
67807
68208
  );
67808
68209
  if (import_node_fs74.default.existsSync(cached2)) {
67809
68210
  const value = JSON.parse(import_node_fs74.default.readFileSync(cached2, "utf8"));
@@ -67815,11 +68216,11 @@ async function swiftBinaryModules(binary2) {
67815
68216
  import_node_fs74.default.writeFileSync(cached2, JSON.stringify(modules));
67816
68217
  return modules;
67817
68218
  }
67818
- var import_node_crypto43, import_node_fs74, import_node_path74, cacheDir3;
68219
+ var import_node_crypto44, import_node_fs74, import_node_path74, cacheDir3;
67819
68220
  var init_swift_binary_modules = __esm({
67820
68221
  "src/swift-binary-modules.ts"() {
67821
68222
  "use strict";
67822
- import_node_crypto43 = require("node:crypto");
68223
+ import_node_crypto44 = require("node:crypto");
67823
68224
  import_node_fs74 = __toESM(require("node:fs"), 1);
67824
68225
  import_node_path74 = __toESM(require("node:path"), 1);
67825
68226
  init_home_paths();
@@ -67829,11 +68230,11 @@ var init_swift_binary_modules = __esm({
67829
68230
  });
67830
68231
 
67831
68232
  // src/swift-coverage/provenance.ts
67832
- var import_node_crypto44, import_node_fs75, import_node_path75, swiftCoverageProvenance;
68233
+ var import_node_crypto45, import_node_fs75, import_node_path75, swiftCoverageProvenance;
67833
68234
  var init_provenance = __esm({
67834
68235
  "src/swift-coverage/provenance.ts"() {
67835
68236
  "use strict";
67836
- import_node_crypto44 = require("node:crypto");
68237
+ import_node_crypto45 = require("node:crypto");
67837
68238
  import_node_fs75 = require("node:fs");
67838
68239
  import_node_path75 = require("node:path");
67839
68240
  swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"32bf10d6f3396dd1a20ff6d415499a5990ec2550c63306fd9ef071bdf4a58f1e","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"e30510099ee19d34de62d8ae859df53f77594a4ab105fdb5bcd7e005ec9689ca","xcode-target-members.ts":"96f6a9f5567a4fbd9806252229b35b9a451a112b20f70f8c20189ffd428815fd","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path75.join)(__sootsim_import_meta_dirname, ".."));
@@ -68930,16 +69331,16 @@ function assetSymbolText(plan, root) {
68930
69331
  if (source.status === "unknown") throw new Error(source.reason);
68931
69332
  return source.text;
68932
69333
  }
68933
- var import_node_crypto45, import_node_fs77, import_node_path77, sha2562, unprovenAssetSettings, assetSymbolSettingKeys, provenOtherAssetFlags, symbolTexts;
69334
+ var import_node_crypto46, import_node_fs77, import_node_path77, sha2562, unprovenAssetSettings, assetSymbolSettingKeys, provenOtherAssetFlags, symbolTexts;
68934
69335
  var init_xcode_assets = __esm({
68935
69336
  "src/swift-coverage/xcode-assets.ts"() {
68936
69337
  "use strict";
68937
- import_node_crypto45 = require("node:crypto");
69338
+ import_node_crypto46 = require("node:crypto");
68938
69339
  import_node_fs77 = require("node:fs");
68939
69340
  import_node_path77 = require("node:path");
68940
69341
  init_provenance();
68941
69342
  init_xcode_asset_symbols();
68942
- sha2562 = (bytes) => (0, import_node_crypto45.createHash)("sha256").update(bytes).digest("hex");
69343
+ sha2562 = (bytes) => (0, import_node_crypto46.createHash)("sha256").update(bytes).digest("hex");
68943
69344
  unprovenAssetSettings = [
68944
69345
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
68945
69346
  "ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
@@ -69535,7 +69936,7 @@ function normalizedEnums(input) {
69535
69936
  }
69536
69937
  function localizationIdentifier(field, key2) {
69537
69938
  const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
69538
- const digest3 = (0, import_node_crypto46.createHash)("sha256").update(JSON.stringify([...field, key2])).digest();
69939
+ const digest3 = (0, import_node_crypto47.createHash)("sha256").update(JSON.stringify([...field, key2])).digest();
69539
69940
  return Array.from(
69540
69941
  digest3.subarray(0, 6),
69541
69942
  (byte) => alphabet[byte % alphabet.length]
@@ -69860,12 +70261,12 @@ function writeIntentDefinition(input, prefix) {
69860
70261
  lines.push("</plist>", "");
69861
70262
  return lines.join("\n");
69862
70263
  }
69863
- var import_strict4, import_node_crypto46, typeMetadata, initializeMetadata, widgetArraySizes, defaultReasonMessages;
70264
+ var import_strict4, import_node_crypto47, typeMetadata, initializeMetadata, widgetArraySizes, defaultReasonMessages;
69864
70265
  var init_metadata = __esm({
69865
70266
  "src/intent-definition/metadata.ts"() {
69866
70267
  "use strict";
69867
70268
  import_strict4 = __toESM(require("node:assert/strict"), 1);
69868
- import_node_crypto46 = require("node:crypto");
70269
+ import_node_crypto47 = require("node:crypto");
69869
70270
  init_fields();
69870
70271
  init_hash_input();
69871
70272
  init_siphash();
@@ -70574,7 +70975,7 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
70574
70975
  if (prefix) identifier(prefix);
70575
70976
  if (module2) identifier(module2);
70576
70977
  const source = import_node_fs78.default.readFileSync(definition2);
70577
- const key2 = (0, import_node_crypto47.createHash)("sha256").update(
70978
+ const key2 = (0, import_node_crypto48.createHash)("sha256").update(
70578
70979
  JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
70579
70980
  ).update("\0").update(source).digest("hex");
70580
70981
  const cache = import_node_path78.default.join(derivedDirectory, "IntentDefinitions");
@@ -70614,11 +71015,11 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
70614
71015
  import_node_fs78.default.rmSync(stage, { recursive: true, force: true });
70615
71016
  }
70616
71017
  }
70617
- var import_node_crypto47, import_node_fs78, import_node_path78, intentCompilerRevision;
71018
+ var import_node_crypto48, import_node_fs78, import_node_path78, intentCompilerRevision;
70618
71019
  var init_xcode_intents = __esm({
70619
71020
  "src/xcode-intents.ts"() {
70620
71021
  "use strict";
70621
- import_node_crypto47 = require("node:crypto");
71022
+ import_node_crypto48 = require("node:crypto");
70622
71023
  import_node_fs78 = __toESM(require("node:fs"), 1);
70623
71024
  import_node_path78 = __toESM(require("node:path"), 1);
70624
71025
  init_fields();
@@ -71320,7 +71721,7 @@ function loadProject(xcodeproj) {
71320
71721
  if (!projectFile)
71321
71722
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
71322
71723
  const source = import_node_fs79.default.readFileSync(projectFile, "utf8");
71323
- const digest3 = (0, import_node_crypto48.createHash)("sha256").update(source).digest("hex");
71724
+ const digest3 = (0, import_node_crypto49.createHash)("sha256").update(source).digest("hex");
71324
71725
  const cached2 = loaded3.get(projectFile);
71325
71726
  if (cached2?.digest === digest3) return cached2.project;
71326
71727
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -71372,7 +71773,7 @@ function xcodeInstallationIdentity() {
71372
71773
  if (!selected) return null;
71373
71774
  const directory2 = import_node_path80.default.extname(selected) === ".app" ? import_node_path80.default.join(selected, "Contents", "Developer") : selected;
71374
71775
  const versionFile = `${directory2}/../version.plist`;
71375
- const version2 = import_node_fs79.default.existsSync(versionFile) ? (0, import_node_crypto48.createHash)("sha256").update(import_node_fs79.default.readFileSync(versionFile)).digest("hex") : null;
71776
+ const version2 = import_node_fs79.default.existsSync(versionFile) ? (0, import_node_crypto49.createHash)("sha256").update(import_node_fs79.default.readFileSync(versionFile)).digest("hex") : null;
71376
71777
  return { directory: directory2, version: version2 };
71377
71778
  }
71378
71779
  function defaultConfiguration(project2) {
@@ -71840,7 +72241,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
71840
72241
  );
71841
72242
  });
71842
72243
  }
71843
- const signature2 = (0, import_node_crypto48.createHash)("sha256").update(
72244
+ const signature2 = (0, import_node_crypto49.createHash)("sha256").update(
71844
72245
  JSON.stringify([phase, [...settingKeys].map((key3) => [key3, settings(key3)])])
71845
72246
  );
71846
72247
  for (const file of inputFiles) {
@@ -71995,7 +72396,7 @@ ${output}`
71995
72396
  const inputs2 = JSON.stringify([
71996
72397
  1,
71997
72398
  args,
71998
- (0, import_node_crypto48.createHash)("sha256").update(import_node_fs79.default.readFileSync(file)).digest("hex")
72399
+ (0, import_node_crypto49.createHash)("sha256").update(import_node_fs79.default.readFileSync(file)).digest("hex")
71999
72400
  ]);
72000
72401
  const developer = settings("DEVELOPER_DIR");
72001
72402
  const cached2 = import_node_fs79.default.existsSync(output) && import_node_fs79.default.existsSync(stamp) ? import_node_fs79.default.readFileSync(stamp, "utf8").split("\n") : [];
@@ -73458,12 +73859,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
73458
73859
  cocoapods
73459
73860
  };
73460
73861
  }
73461
- var import_node_child_process42, import_node_crypto48, import_node_fs79, import_node_module5, import_node_path80, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
73862
+ var import_node_child_process42, import_node_crypto49, import_node_fs79, import_node_module5, import_node_path80, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
73462
73863
  var init_xcode_project = __esm({
73463
73864
  "src/xcode-project.ts"() {
73464
73865
  "use strict";
73465
73866
  import_node_child_process42 = require("node:child_process");
73466
- import_node_crypto48 = require("node:crypto");
73867
+ import_node_crypto49 = require("node:crypto");
73467
73868
  import_node_fs79 = __toESM(require("node:fs"), 1);
73468
73869
  import_node_module5 = require("node:module");
73469
73870
  import_node_path80 = __toESM(require("node:path"), 1);
@@ -73655,8 +74056,8 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
73655
74056
  );
73656
74057
  const appRelative = import_node_path81.default.relative(root, app);
73657
74058
  const manifest = JSON.parse(import_node_fs80.default.readFileSync(import_node_path81.default.join(root, "package.json"), "utf8"));
73658
- const hash = (0, import_node_crypto49.createHash)("sha256");
73659
- const native = (0, import_node_crypto49.createHash)("sha256");
74059
+ const hash = (0, import_node_crypto50.createHash)("sha256");
74060
+ const native = (0, import_node_crypto50.createHash)("sha256");
73660
74061
  const nativeDirectories = localPackageDirectories(root, app);
73661
74062
  const versionFree = new Set(
73662
74063
  nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
@@ -73740,7 +74141,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
73740
74141
  unread.slice(start, start + 32).map(async ({ file, content }) => {
73741
74142
  const bytes = await import_node_fs80.default.promises.readFile(file);
73742
74143
  content.size = bytes.length;
73743
- content.digest = (0, import_node_crypto49.createHash)("sha256").update(bytes).digest("hex");
74144
+ content.digest = (0, import_node_crypto50.createHash)("sha256").update(bytes).digest("hex");
73744
74145
  fileDigests.set(file, content);
73745
74146
  })
73746
74147
  );
@@ -74290,7 +74691,7 @@ function stageCachedQuickCryptoOpenSsl(app) {
74290
74691
  const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
74291
74692
  if (!sha2565) return;
74292
74693
  const archive = import_node_path81.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
74293
- if (!import_node_fs80.default.existsSync(archive) || (0, import_node_crypto49.createHash)("sha256").update(import_node_fs80.default.readFileSync(archive)).digest("hex") !== sha2565)
74694
+ if (!import_node_fs80.default.existsSync(archive) || (0, import_node_crypto50.createHash)("sha256").update(import_node_fs80.default.readFileSync(archive)).digest("hex") !== sha2565)
74294
74695
  return;
74295
74696
  import_node_fs80.default.rmSync(opensslDir, { recursive: true, force: true });
74296
74697
  import_node_fs80.default.mkdirSync(opensslDir, { recursive: true });
@@ -74328,12 +74729,12 @@ ${failedOutputLine(command, cwd, bytes)}`
74328
74729
  });
74329
74730
  });
74330
74731
  }
74331
- var import_node_child_process43, import_node_crypto49, import_node_fs80, import_node_module6, import_node_os19, import_node_path81, import_node_util11, isolatedGitEnv, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
74732
+ var import_node_child_process43, import_node_crypto50, import_node_fs80, import_node_module6, import_node_os19, import_node_path81, import_node_util11, isolatedGitEnv, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
74332
74733
  var init_expo_native_workspace = __esm({
74333
74734
  "src/expo-native-workspace.ts"() {
74334
74735
  "use strict";
74335
74736
  import_node_child_process43 = require("node:child_process");
74336
- import_node_crypto49 = require("node:crypto");
74737
+ import_node_crypto50 = require("node:crypto");
74337
74738
  import_node_fs80 = __toESM(require("node:fs"), 1);
74338
74739
  import_node_module6 = require("node:module");
74339
74740
  import_node_os19 = __toESM(require("node:os"), 1);
@@ -74748,7 +75149,7 @@ function kotlinHome() {
74748
75149
  }
74749
75150
  async function fetchVerified(download2, target) {
74750
75151
  if (import_node_fs82.default.existsSync(target)) {
74751
- if ((0, import_node_crypto50.createHash)("sha256").update(import_node_fs82.default.readFileSync(target)).digest("hex") !== download2.sha256)
75152
+ if ((0, import_node_crypto51.createHash)("sha256").update(import_node_fs82.default.readFileSync(target)).digest("hex") !== download2.sha256)
74752
75153
  throw new Error(
74753
75154
  `cached Kotlin download differs from its pin: ${import_node_path83.default.basename(target)}`
74754
75155
  );
@@ -74757,7 +75158,7 @@ async function fetchVerified(download2, target) {
74757
75158
  const response = await fetch(download2.url);
74758
75159
  if (!response.ok) throw new Error(`${download2.url} answered ${response.status}`);
74759
75160
  const bytes = Buffer.from(await response.arrayBuffer());
74760
- const digest3 = (0, import_node_crypto50.createHash)("sha256").update(bytes).digest("hex");
75161
+ const digest3 = (0, import_node_crypto51.createHash)("sha256").update(bytes).digest("hex");
74761
75162
  if (digest3 !== download2.sha256)
74762
75163
  throw new Error(`${download2.url} has sha256 ${digest3}, expected ${download2.sha256}`);
74763
75164
  import_node_fs82.default.mkdirSync(import_node_path83.default.dirname(target), { recursive: true });
@@ -74770,7 +75171,7 @@ async function ensureCompose(toolchain) {
74770
75171
  const root = import_node_path83.default.join(kotlinHome(), "compose", toolchain.composeArchive.sha256);
74771
75172
  const verify = (dir) => {
74772
75173
  for (const { name: name3, sha256: sha2565 } of downloads) {
74773
- const actual = (0, import_node_crypto50.createHash)("sha256").update(import_node_fs82.default.readFileSync(import_node_path83.default.join(dir, name3))).digest("hex");
75174
+ const actual = (0, import_node_crypto51.createHash)("sha256").update(import_node_fs82.default.readFileSync(import_node_path83.default.join(dir, name3))).digest("hex");
74774
75175
  if (actual !== sha2565)
74775
75176
  throw new Error(`Compose input differs from its pin: ${name3}`);
74776
75177
  }
@@ -74841,12 +75242,12 @@ function ensureToolchain(toolchain) {
74841
75242
  toolchains.set(key2, ready);
74842
75243
  return ready;
74843
75244
  }
74844
- var import_node_child_process44, import_node_crypto50, import_node_fs82, import_node_path83, import_node_util12, run6, toolchains;
75245
+ var import_node_child_process44, import_node_crypto51, import_node_fs82, import_node_path83, import_node_util12, run6, toolchains;
74845
75246
  var init_kotlin_toolchain = __esm({
74846
75247
  "src/kotlin-toolchain.ts"() {
74847
75248
  "use strict";
74848
75249
  import_node_child_process44 = require("node:child_process");
74849
- import_node_crypto50 = require("node:crypto");
75250
+ import_node_crypto51 = require("node:crypto");
74850
75251
  import_node_fs82 = __toESM(require("node:fs"), 1);
74851
75252
  import_node_path83 = __toESM(require("node:path"), 1);
74852
75253
  import_node_util12 = require("node:util");
@@ -75180,7 +75581,7 @@ async function prepareNitroDependencies(reactNativeVersion, reactNativeRoot) {
75180
75581
  throw new Error(`${dependency.name} archive holds a symlink: ${name3}`);
75181
75582
  if (entry.isDirectory()) walk4(name3);
75182
75583
  else if (entry.isFile() && (dependency.files ?? HEADER4).test(entry.name))
75183
- files2[name3] = (0, import_node_crypto51.createHash)("sha256").update(import_node_fs84.default.readFileSync(import_node_path85.default.join(tree2, name3))).digest("hex");
75584
+ files2[name3] = (0, import_node_crypto52.createHash)("sha256").update(import_node_fs84.default.readFileSync(import_node_path85.default.join(tree2, name3))).digest("hex");
75184
75585
  }
75185
75586
  };
75186
75587
  for (const sourceRoot of dependency.sourceDirectories ?? [dependency.headers.from])
@@ -75230,7 +75631,7 @@ function nitroDependencyReader(reactNativeVersion, reactNativeRoot) {
75230
75631
  const tree2 = import_node_path85.default.join(directory(dependency), "tree");
75231
75632
  const source = import_node_path85.default.join(tree2, relative4);
75232
75633
  const bytes = readPackageFile(tree2, source, MAX_SWIFT_COMPILE_SOURCE_BYTES);
75233
- const original = (0, import_node_crypto51.createHash)("sha256").update(bytes).digest("hex");
75634
+ const original = (0, import_node_crypto52.createHash)("sha256").update(bytes).digest("hex");
75234
75635
  if (original !== digest3)
75235
75636
  throw new Error(
75236
75637
  `${dependency.name} header differs from its verified archive: ${relative4}`
@@ -75246,7 +75647,7 @@ function nitroDependencyReader(reactNativeVersion, reactNativeRoot) {
75246
75647
  if (!text7.includes(backport.before))
75247
75648
  throw new Error(`${dependency.name} backport anchor missing: ${relative4}`);
75248
75649
  text7 = text7.replace(backport.before, backport.after);
75249
- sha2565 = (0, import_node_crypto51.createHash)("sha256").update(text7).digest("hex");
75650
+ sha2565 = (0, import_node_crypto52.createHash)("sha256").update(text7).digest("hex");
75250
75651
  if (sha2565 !== backport.derivedSha256)
75251
75652
  throw new Error(`${dependency.name} backport derived source differs: ${relative4}`);
75252
75653
  }
@@ -75287,7 +75688,7 @@ function nitroDependencySources(reactNativeVersion, reactNativeRoot, select) {
75287
75688
  if (!select(dependency.name, prepared)) continue;
75288
75689
  const source = import_node_path85.default.join(tree2, relative4);
75289
75690
  const bytes = readPackageFile(tree2, source, MAX_SWIFT_COMPILE_SOURCE_BYTES);
75290
- if ((0, import_node_crypto51.createHash)("sha256").update(bytes).digest("hex") !== digest3)
75691
+ if ((0, import_node_crypto52.createHash)("sha256").update(bytes).digest("hex") !== digest3)
75291
75692
  throw new Error(
75292
75693
  `${dependency.name} source differs from its verified archive: ${relative4}`
75293
75694
  );
@@ -75316,7 +75717,7 @@ function glogSources() {
75316
75717
  if (!digest3) throw new Error(`glog ${GLOG.prefix} has no ${relative4}`);
75317
75718
  const source = import_node_path85.default.join(tree2, relative4);
75318
75719
  const bytes = readPackageFile(tree2, source, MAX_SWIFT_COMPILE_SOURCE_BYTES);
75319
- if ((0, import_node_crypto51.createHash)("sha256").update(bytes).digest("hex") !== digest3)
75720
+ if ((0, import_node_crypto52.createHash)("sha256").update(bytes).digest("hex") !== digest3)
75320
75721
  throw new Error(`glog source differs from its verified archive: ${relative4}`);
75321
75722
  return { relative: relative4, source, text: bytes.toString("utf8"), sha256: digest3 };
75322
75723
  };
@@ -75326,7 +75727,7 @@ function glogSources() {
75326
75727
  relative: output,
75327
75728
  source: original.source,
75328
75729
  text: text7,
75329
- sha256: (0, import_node_crypto51.createHash)("sha256").update(text7).digest("hex"),
75730
+ sha256: (0, import_node_crypto52.createHash)("sha256").update(text7).digest("hex"),
75330
75731
  configured: { template, originalSha256: original.sha256 }
75331
75732
  };
75332
75733
  };
@@ -75354,12 +75755,12 @@ function glogSources() {
75354
75755
  for (const unit2 of GLOG_UNITS) sources.push(read(unit2));
75355
75756
  return sources;
75356
75757
  }
75357
- var import_node_child_process45, import_node_crypto51, import_node_fs84, import_node_path85, import_node_util13, run7, DOUBLE_CONVERSION_WASM64_BACKPORT2, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FAST_FLOAT_6_DEPENDENCIES, RN_FMT_12_DEPENDENCIES, HEADER4, GLOG, GLOG_SUBSTITUTIONS, GLOG_CONFIGURE, GLOG_CONFIG_APPENDIX, GLOG_UNITS;
75758
+ var import_node_child_process45, import_node_crypto52, import_node_fs84, import_node_path85, import_node_util13, run7, DOUBLE_CONVERSION_WASM64_BACKPORT2, RN_SHARED_DEPENDENCIES, RN_FMT_11_DEPENDENCIES, RN_FAST_FLOAT_6_DEPENDENCIES, RN_FMT_12_DEPENDENCIES, HEADER4, GLOG, GLOG_SUBSTITUTIONS, GLOG_CONFIGURE, GLOG_CONFIG_APPENDIX, GLOG_UNITS;
75358
75759
  var init_nitro_dependencies = __esm({
75359
75760
  "src/nitro-dependencies.ts"() {
75360
75761
  "use strict";
75361
75762
  import_node_child_process45 = require("node:child_process");
75362
- import_node_crypto51 = require("node:crypto");
75763
+ import_node_crypto52 = require("node:crypto");
75363
75764
  import_node_fs84 = __toESM(require("node:fs"), 1);
75364
75765
  import_node_path85 = __toESM(require("node:path"), 1);
75365
75766
  import_node_util13 = require("node:util");
@@ -76312,7 +76713,7 @@ function collectNitroSources(options2, nativeSourceKeys, sourceRoot) {
76312
76713
  result.sources.push({
76313
76714
  file: original,
76314
76715
  source,
76315
- sha256: (0, import_node_crypto52.createHash)("sha256").update(bytes).digest("hex")
76716
+ sha256: (0, import_node_crypto53.createHash)("sha256").update(bytes).digest("hex")
76316
76717
  });
76317
76718
  }
76318
76719
  const requested = `${targetPath(name3)}/upstream/${sourceRelative}`;
@@ -76502,7 +76903,7 @@ function collectNitroSources(options2, nativeSourceKeys, sourceRoot) {
76502
76903
  result.sources.push({
76503
76904
  file: mapKey,
76504
76905
  source: import_node_fs86.default.realpathSync(modulemapPath),
76505
- sha256: (0, import_node_crypto52.createHash)("sha256").update(modulemapBytes).digest("hex")
76906
+ sha256: (0, import_node_crypto53.createHash)("sha256").update(modulemapBytes).digest("hex")
76506
76907
  });
76507
76908
  registered.push(clangModule);
76508
76909
  }
@@ -76564,7 +76965,7 @@ function collectNitroSources(options2, nativeSourceKeys, sourceRoot) {
76564
76965
  result.sources.push({
76565
76966
  file: key2,
76566
76967
  source: real,
76567
- sha256: (0, import_node_crypto52.createHash)("sha256").update(bytes).digest("hex")
76968
+ sha256: (0, import_node_crypto53.createHash)("sha256").update(bytes).digest("hex")
76568
76969
  });
76569
76970
  if (/\.(?:c|cc|cpp|cxx|m|mm|swift)$/.test(canonicalRel)) {
76570
76971
  excludes.add(`upstream/${canonicalRel}`);
@@ -76917,11 +77318,11 @@ extern "C" void ${registration.symbol}();
76917
77318
  }
76918
77319
  return result;
76919
77320
  }
76920
- var import_node_crypto52, import_node_fs86, import_node_module8, import_node_path87, import_zod2, nitroProviderTarget, NITRO_VIEWS_TARGET, PEER_PODSPEC_SKIP;
77321
+ var import_node_crypto53, import_node_fs86, import_node_module8, import_node_path87, import_zod2, nitroProviderTarget, NITRO_VIEWS_TARGET, PEER_PODSPEC_SKIP;
76921
77322
  var init_nitro_source = __esm({
76922
77323
  "src/nitro-source.ts"() {
76923
77324
  "use strict";
76924
- import_node_crypto52 = require("node:crypto");
77325
+ import_node_crypto53 = require("node:crypto");
76925
77326
  import_node_fs86 = __toESM(require("node:fs"), 1);
76926
77327
  import_node_module8 = require("node:module");
76927
77328
  import_node_path87 = __toESM(require("node:path"), 1);
@@ -76931,7 +77332,7 @@ var init_nitro_source = __esm({
76931
77332
  init_react_native_autolinking();
76932
77333
  init_swift_source_file();
76933
77334
  init_swift_submit();
76934
- nitroProviderTarget = (provider) => `NitroPackage_${(0, import_node_crypto52.createHash)("sha256").update(provider.name).digest("hex").slice(0, 16)}`;
77335
+ nitroProviderTarget = (provider) => `NitroPackage_${(0, import_node_crypto53.createHash)("sha256").update(provider.name).digest("hex").slice(0, 16)}`;
76935
77336
  NITRO_VIEWS_TARGET = "PeachNitroViews";
76936
77337
  PEER_PODSPEC_SKIP = /* @__PURE__ */ new Set([
76937
77338
  "React-jsi",
@@ -79112,7 +79513,7 @@ async function loadStoreKitTestStore(configuration, appDir) {
79112
79513
  const identityPath = import_node_path89.default.join(
79113
79514
  cacheDir(),
79114
79515
  "storekit-identities",
79115
- `${(0, import_node_crypto53.createHash)("sha256").update(import_node_path89.default.resolve(appDir)).digest("hex")}.json`
79516
+ `${(0, import_node_crypto54.createHash)("sha256").update(import_node_path89.default.resolve(appDir)).digest("hex")}.json`
79116
79517
  );
79117
79518
  let signing;
79118
79519
  try {
@@ -79128,7 +79529,7 @@ async function loadStoreKitTestStore(configuration, appDir) {
79128
79529
  const certificate = await import_x509.X509CertificateGenerator.createSelfSigned(
79129
79530
  {
79130
79531
  name: "CN=StoreKit Testing in Xcode, O=StoreKit Testing in Xcode",
79131
- serialNumber: (0, import_node_crypto53.randomBytes)(16).toString("hex"),
79532
+ serialNumber: (0, import_node_crypto54.randomBytes)(16).toString("hex"),
79132
79533
  notBefore: new Date(Date.now() - 6e4),
79133
79534
  notAfter: new Date(Date.now() + 365 * 864e5),
79134
79535
  signingAlgorithm: algorithm,
@@ -79145,11 +79546,11 @@ async function loadStoreKitTestStore(configuration, appDir) {
79145
79546
  }
79146
79547
  return { ...catalog, signing };
79147
79548
  }
79148
- var import_node_crypto53, import_promises7, import_node_path89, import_x509;
79549
+ var import_node_crypto54, import_promises7, import_node_path89, import_x509;
79149
79550
  var init_storekit_test_store = __esm({
79150
79551
  "src/storekit-test-store.ts"() {
79151
79552
  "use strict";
79152
- import_node_crypto53 = require("node:crypto");
79553
+ import_node_crypto54 = require("node:crypto");
79153
79554
  import_promises7 = require("node:fs/promises");
79154
79555
  import_node_path89 = __toESM(require("node:path"), 1);
79155
79556
  init_storeKitContract();
@@ -79494,7 +79895,7 @@ function watchNativeInputs(root) {
79494
79895
  (0, import_node_timers.clearTimeout)(expiry);
79495
79896
  for (const watcher of watchers) watcher.close();
79496
79897
  }
79497
- const inputs2 = { expiry, revision: (0, import_node_crypto54.randomUUID)() };
79898
+ const inputs2 = { expiry, revision: (0, import_node_crypto55.randomUUID)() };
79498
79899
  const watch = (directory2, recursive, name3) => {
79499
79900
  const watcher = import_node_fs90.default.watch(
79500
79901
  directory2,
@@ -79535,11 +79936,11 @@ function watchNativeInputs(root) {
79535
79936
  watchedInputs.set(workspace, inputs2);
79536
79937
  return inputs2;
79537
79938
  }
79538
- var import_node_crypto54, import_node_fs90, import_node_path92, import_node_timers, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
79939
+ var import_node_crypto55, import_node_fs90, import_node_path92, import_node_timers, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
79539
79940
  var init_native_preparation = __esm({
79540
79941
  "src/native-preparation.ts"() {
79541
79942
  "use strict";
79542
- import_node_crypto54 = require("node:crypto");
79943
+ import_node_crypto55 = require("node:crypto");
79543
79944
  import_node_fs90 = __toESM(require("node:fs"), 1);
79544
79945
  import_node_path92 = __toESM(require("node:path"), 1);
79545
79946
  import_node_timers = require("node:timers");
@@ -79750,7 +80151,7 @@ function nativeStaticLibraryEntry(recipe2, compiler, sdk2, distribution) {
79750
80151
  return { name: recipe2.name, inputs: inputs2, key: nativeEntryKey(inputs2) };
79751
80152
  }
79752
80153
  function nativeStaticLibraryRecipe(bytes) {
79753
- const digest3 = (0, import_node_crypto55.createHash)("sha256").update(bytes).digest("hex");
80154
+ const digest3 = (0, import_node_crypto56.createHash)("sha256").update(bytes).digest("hex");
79754
80155
  return NATIVE_STATIC_LIBRARY_RECIPES.find((item) => item.nativeSha256 === digest3);
79755
80156
  }
79756
80157
  function nativeStaticLibrary(file, recipe2, moduleRoot) {
@@ -79793,7 +80194,7 @@ function isRustSymbol(name3, demangled) {
79793
80194
  function rustStaticLibrary(file, moduleRoot) {
79794
80195
  const toolchain = swiftModuleToolchain(moduleRoot);
79795
80196
  const bytes = import_node_fs92.default.readFileSync(file);
79796
- const key2 = (0, import_node_crypto55.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
80197
+ const key2 = (0, import_node_crypto56.createHash)("sha256").update("rust-c-abi-v4\0").update(toolchain.release).update("\0").update(bytes).digest("hex");
79797
80198
  const directory2 = import_node_path94.default.join(cacheDir(), "native-archives", key2);
79798
80199
  const archive = import_node_path94.default.join(directory2, "library.a");
79799
80200
  if (import_node_fs92.default.existsSync(archive)) return archive;
@@ -79822,7 +80223,7 @@ function rustStaticLibrary(file, moduleRoot) {
79822
80223
  const members2 = readArMembers(bytes, true);
79823
80224
  const seen = /* @__PURE__ */ new Set();
79824
80225
  const unique2 = members2.filter(({ name: name3, bytes: bytes2 }) => {
79825
- const identity2 = name3 + "\0" + (0, import_node_crypto55.createHash)("sha256").update(bytes2).digest("hex");
80226
+ const identity2 = name3 + "\0" + (0, import_node_crypto56.createHash)("sha256").update(bytes2).digest("hex");
79826
80227
  if (seen.has(identity2)) return false;
79827
80228
  seen.add(identity2);
79828
80229
  return true;
@@ -79869,14 +80270,14 @@ function rustStaticLibrary(file, moduleRoot) {
79869
80270
  function combineNativeStaticLibraries(files2, moduleRoot) {
79870
80271
  if (files2.length === 1) return files2[0];
79871
80272
  const toolchain = swiftModuleToolchain(moduleRoot);
79872
- const hash = (0, import_node_crypto55.createHash)("sha256").update(toolchain.release);
80273
+ const hash = (0, import_node_crypto56.createHash)("sha256").update(toolchain.release);
79873
80274
  for (const file of files2)
79874
80275
  hash.update("\0").update(import_node_path94.default.basename(file)).update("\0").update(import_node_fs92.default.readFileSync(file));
79875
80276
  const directory2 = import_node_path94.default.join(cacheDir(), "native-archives", hash.digest("hex"));
79876
80277
  const archive = import_node_path94.default.join(directory2, "combined.a");
79877
80278
  if (import_node_fs92.default.existsSync(archive)) return archive;
79878
80279
  import_node_fs92.default.mkdirSync(directory2, { recursive: true });
79879
- const temporary = import_node_path94.default.join(directory2, `combined-${(0, import_node_crypto55.randomUUID)()}.a`);
80280
+ const temporary = import_node_path94.default.join(directory2, `combined-${(0, import_node_crypto56.randomUUID)()}.a`);
79880
80281
  try {
79881
80282
  (0, import_node_child_process47.execFileSync)(import_node_path94.default.join(toolchain.toolchainBin, "llvm-ar"), [
79882
80283
  "qcsDL",
@@ -79889,12 +80290,12 @@ function combineNativeStaticLibraries(files2, moduleRoot) {
79889
80290
  }
79890
80291
  return archive;
79891
80292
  }
79892
- var import_node_child_process47, import_node_crypto55, import_node_fs92, import_node_path94, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
80293
+ var import_node_child_process47, import_node_crypto56, import_node_fs92, import_node_path94, WEBRTC_NATIVE_FRAMEWORK, SIGNAL_WEBRTC_NATIVE_FRAMEWORK, WEBRTC_NATIVE_FRAMEWORK_RECIPES, NATIVE_STATIC_LIBRARY_RECIPES;
79893
80294
  var init_native_static_libraries = __esm({
79894
80295
  "src/native-static-libraries.ts"() {
79895
80296
  "use strict";
79896
80297
  import_node_child_process47 = require("node:child_process");
79897
- import_node_crypto55 = require("node:crypto");
80298
+ import_node_crypto56 = require("node:crypto");
79898
80299
  import_node_fs92 = __toESM(require("node:fs"), 1);
79899
80300
  import_node_path94 = __toESM(require("node:path"), 1);
79900
80301
  init_home_paths();
@@ -80608,11 +81009,11 @@ var init_nitro_adapter = __esm({
80608
81009
  });
80609
81010
 
80610
81011
  // src/react-native-core-digest.ts
80611
- var import_node_crypto56, import_node_fs95, import_node_path97;
81012
+ var import_node_crypto57, import_node_fs95, import_node_path97;
80612
81013
  var init_react_native_core_digest = __esm({
80613
81014
  "src/react-native-core-digest.ts"() {
80614
81015
  "use strict";
80615
- import_node_crypto56 = require("node:crypto");
81016
+ import_node_crypto57 = require("node:crypto");
80616
81017
  import_node_fs95 = __toESM(require("node:fs"), 1);
80617
81018
  import_node_path97 = __toESM(require("node:path"), 1);
80618
81019
  }
@@ -84024,11 +84425,11 @@ function coreDataModelDirectories(files2) {
84024
84425
  }
84025
84426
  return [...models].sort();
84026
84427
  }
84027
- var import_node_crypto57, import_node_fs97, import_node_path99, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
84428
+ var import_node_crypto58, import_node_fs97, import_node_path99, attributeTypes, deleteRules, EXTERNAL_BINARY, PRESERVE_AFTER_DELETION, yes, common, uid, NULL, classChains, KeyedArchive, sha2563;
84028
84429
  var init_core_data_model = __esm({
84029
84430
  "src/core-data-model.ts"() {
84030
84431
  "use strict";
84031
- import_node_crypto57 = require("node:crypto");
84432
+ import_node_crypto58 = require("node:crypto");
84032
84433
  import_node_fs97 = require("node:fs");
84033
84434
  import_node_path99 = __toESM(require("node:path"), 1);
84034
84435
  init_core_data_entity_classes();
@@ -84147,7 +84548,7 @@ var init_core_data_model = __esm({
84147
84548
  });
84148
84549
  }
84149
84550
  };
84150
- sha2563 = (...parts) => (0, import_node_crypto57.createHash)("sha256").update(
84551
+ sha2563 = (...parts) => (0, import_node_crypto58.createHash)("sha256").update(
84151
84552
  Buffer.concat(
84152
84553
  parts.map(
84153
84554
  (part) => Array.isArray(part) ? Buffer.from(part) : Buffer.from(part)
@@ -86410,7 +86811,7 @@ function sourceClosureFiles(srcDir, entrypoints, excludedFiles = []) {
86410
86811
  return files2.sort();
86411
86812
  }
86412
86813
  function sourceClosureDigest(srcDir, entrypoints, excludedFiles) {
86413
- const hash = (0, import_node_crypto58.createHash)("sha256");
86814
+ const hash = (0, import_node_crypto59.createHash)("sha256");
86414
86815
  for (const file of sourceClosureFiles(srcDir, entrypoints, excludedFiles)) {
86415
86816
  const key2 = import_node_path100.default.relative(srcDir, file);
86416
86817
  const bytes = (0, import_node_fs98.readFileSync)(file);
@@ -86418,11 +86819,11 @@ function sourceClosureDigest(srcDir, entrypoints, excludedFiles) {
86418
86819
  }
86419
86820
  return hash.digest("hex");
86420
86821
  }
86421
- var import_node_crypto58, import_node_fs98, import_node_path100, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES, RUNTIME_IMPORT, standinSourceDigest, STANDIN_SOURCE_DIGEST;
86822
+ var import_node_crypto59, import_node_fs98, import_node_path100, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES, RUNTIME_IMPORT, standinSourceDigest, STANDIN_SOURCE_DIGEST;
86422
86823
  var init_swift_standin_digest = __esm({
86423
86824
  "src/swift-standin-digest.ts"() {
86424
86825
  "use strict";
86425
- import_node_crypto58 = require("node:crypto");
86826
+ import_node_crypto59 = require("node:crypto");
86426
86827
  import_node_fs98 = require("node:fs");
86427
86828
  import_node_path100 = __toESM(require("node:path"), 1);
86428
86829
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
@@ -86433,7 +86834,7 @@ var init_swift_standin_digest = __esm({
86433
86834
  ];
86434
86835
  RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
86435
86836
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
86436
- STANDIN_SOURCE_DIGEST = true ? "434280be603d7288671556bd3927e00632cd94beab9d58010000add5587f959b" : standinSourceDigest();
86837
+ STANDIN_SOURCE_DIGEST = true ? "c87e0b7f1ae69b2a4e76611266612d6218f81a3244e592800c02f78c4f8e48f6" : standinSourceDigest();
86437
86838
  }
86438
86839
  });
86439
86840
 
@@ -86745,13 +87146,13 @@ var init_swift_wasm64_wamr = __esm({
86745
87146
 
86746
87147
  // src/swift-wasm64-native-source.ts
86747
87148
  function deriveSource(file, bytes, backport) {
86748
- if (!backport || (0, import_node_crypto59.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256)
87149
+ if (!backport || (0, import_node_crypto60.createHash)("sha256").update(bytes).digest("hex") !== backport.originalSha256)
86749
87150
  return null;
86750
87151
  const source = bytes.toString("utf8");
86751
87152
  const derived = Buffer.from(
86752
87153
  "rewrite" in backport ? backport.rewrite(source) : source.replace(backport.before, backport.after)
86753
87154
  );
86754
- if ((0, import_node_crypto59.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
87155
+ if ((0, import_node_crypto60.createHash)("sha256").update(derived).digest("hex") !== backport.derivedSha256)
86755
87156
  throw new Error(`Native source derivation differs: ${file}`);
86756
87157
  return {
86757
87158
  bytes: derived,
@@ -86770,11 +87171,11 @@ function deriveWasm64NativeSource(file, bytes) {
86770
87171
  sourceDerivations.get(name3) ?? headerDerivations.get(name3)
86771
87172
  );
86772
87173
  }
86773
- var import_node_crypto59, import_node_path102, webrtcUnknownArchitecture, boringsslWordSize2, wamrCommit, headerDerivations, sourceDerivations;
87174
+ var import_node_crypto60, import_node_path102, webrtcUnknownArchitecture, boringsslWordSize2, wamrCommit, headerDerivations, sourceDerivations;
86774
87175
  var init_swift_wasm64_native_source = __esm({
86775
87176
  "src/swift-wasm64-native-source.ts"() {
86776
87177
  "use strict";
86777
- import_node_crypto59 = require("node:crypto");
87178
+ import_node_crypto60 = require("node:crypto");
86778
87179
  import_node_path102 = __toESM(require("node:path"), 1);
86779
87180
  init_swift_wasm64_wamr();
86780
87181
  init_swiftWasm64ConfigContract();
@@ -87234,7 +87635,7 @@ var init_genrule_library_builds = __esm({
87234
87635
  function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
87235
87636
  const distribution = swiftDistributionAt(moduleRoot);
87236
87637
  const sdk2 = swiftSdkPaths(moduleRoot, toolchainBin);
87237
- const identity2 = (0, import_node_crypto60.createHash)("sha256").update(
87638
+ const identity2 = (0, import_node_crypto61.createHash)("sha256").update(
87238
87639
  JSON.stringify([
87239
87640
  distribution?.id,
87240
87641
  distribution?.link,
@@ -87260,7 +87661,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
87260
87661
  for (const alias of product.frameworkAliases) {
87261
87662
  if (alias.wasmSdkId !== distribution.wasmSdkId || alias.wasmSdkChecksum !== distribution.wasmSdkChecksum)
87262
87663
  throw new Error(`framework SDK identity differs for ${alias.name}`);
87263
- if ((0, import_node_crypto60.createHash)("sha256").update(import_node_fs101.default.readFileSync(import_node_path104.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
87664
+ if ((0, import_node_crypto61.createHash)("sha256").update(import_node_fs101.default.readFileSync(import_node_path104.default.join(moduleRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
87264
87665
  throw new Error(`framework module map changed ${alias.moduleMap}`);
87265
87666
  const selected = /* @__PURE__ */ new Set();
87266
87667
  const reach = (name3) => {
@@ -87301,7 +87702,7 @@ function nativeFrameworkCompiler(moduleRoot, toolchainBin, directory2) {
87301
87702
  for (const alias of owner.frameworkAliases) {
87302
87703
  if (frameworkResponses[alias.name])
87303
87704
  throw new Error(`ambiguous declared framework ${alias.name}`);
87304
- if ((0, import_node_crypto60.createHash)("sha256").update(import_node_fs101.default.readFileSync(import_node_path104.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
87705
+ if ((0, import_node_crypto61.createHash)("sha256").update(import_node_fs101.default.readFileSync(import_node_path104.default.join(sdkRoot, alias.moduleMap))).digest("hex") !== alias.moduleMapSha256)
87305
87706
  throw new Error(`framework module map changed ${alias.moduleMap}`);
87306
87707
  const file = import_node_path104.default.join(root, `${alias.name}.rsp`);
87307
87708
  import_node_fs101.default.writeFileSync(file, aliasArtifacts.map(quote3).join("\n") + "\n");
@@ -87395,11 +87796,11 @@ exec ${shellQuote(configuration.compiler)} "$@"
87395
87796
  };
87396
87797
  return { cc: compiler("clang"), cxx: compiler("clang++"), identity: identity2 };
87397
87798
  }
87398
- var import_node_crypto60, import_node_fs101, import_node_path104, v7;
87799
+ var import_node_crypto61, import_node_fs101, import_node_path104, v7;
87399
87800
  var init_native_framework_compiler = __esm({
87400
87801
  "src/native-framework-compiler.ts"() {
87401
87802
  "use strict";
87402
- import_node_crypto60 = require("node:crypto");
87803
+ import_node_crypto61 = require("node:crypto");
87403
87804
  import_node_fs101 = __toESM(require("node:fs"), 1);
87404
87805
  import_node_path104 = __toESM(require("node:path"), 1);
87405
87806
  v7 = __toESM(require("peachsim/vendor/valibot"), 1);
@@ -87420,7 +87821,7 @@ function processAlive(pid) {
87420
87821
  }
87421
87822
  function tryAcquireNumberedLock(directory2, detail = "") {
87422
87823
  (0, import_node_fs102.mkdirSync)(directory2, { recursive: true });
87423
- const claim = (0, import_node_path105.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto61.randomUUID)()}`);
87824
+ const claim = (0, import_node_path105.join)(directory2, `claim-${process.pid}-${(0, import_node_crypto62.randomUUID)()}`);
87424
87825
  for (; ; ) {
87425
87826
  const numbers = (0, import_node_fs102.readdirSync)(directory2).filter((name3) => /^\d+$/.test(name3)).map(Number);
87426
87827
  const top = Math.max(-1, ...numbers);
@@ -87459,11 +87860,11 @@ ${detail}` : ""}`);
87459
87860
  };
87460
87861
  }
87461
87862
  }
87462
- var import_node_crypto61, import_node_fs102, import_node_path105, errorCode2;
87863
+ var import_node_crypto62, import_node_fs102, import_node_path105, errorCode2;
87463
87864
  var init_numbered_lock = __esm({
87464
87865
  "src/numbered-lock.ts"() {
87465
87866
  "use strict";
87466
- import_node_crypto61 = require("node:crypto");
87867
+ import_node_crypto62 = require("node:crypto");
87467
87868
  import_node_fs102 = require("node:fs");
87468
87869
  import_node_path105 = require("node:path");
87469
87870
  errorCode2 = (error) => error instanceof Error && "code" in error ? error.code : void 0;
@@ -87490,7 +87891,7 @@ function llvmIdentity(toolchainBin, release) {
87490
87891
  ] : ["clang", "wasm-ld", "llvm-ar", "llvm-nm", "llvm-strip"].map(
87491
87892
  (name3) => swiftFileChecksum(import_node_path106.default.join(toolchainBin, name3))
87492
87893
  );
87493
- const identity2 = (0, import_node_crypto62.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
87894
+ const identity2 = (0, import_node_crypto63.createHash)("sha256").update(JSON.stringify(components)).digest("hex");
87494
87895
  toolIdentities.set(toolchainBin, identity2);
87495
87896
  return identity2;
87496
87897
  }
@@ -87498,7 +87899,7 @@ function cSdkIdentity(sysroot, resourceDir, frameworks) {
87498
87899
  const key2 = JSON.stringify([sysroot, resourceDir, frameworks]);
87499
87900
  const cached2 = sysrootIdentities.get(key2);
87500
87901
  if (cached2) return cached2;
87501
- const hash = (0, import_node_crypto62.createHash)("sha256");
87902
+ const hash = (0, import_node_crypto63.createHash)("sha256");
87502
87903
  const add = (root, relative4) => {
87503
87904
  const file = import_node_path106.default.join(root, relative4);
87504
87905
  const stat = import_node_fs103.default.statSync(file, { throwIfNoEntry: false });
@@ -87533,7 +87934,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
87533
87934
  import_node_fs103.default.readFileSync(import_node_path106.default.join(moduleRoot, SWIFT_FRAMEWORK_PRODUCT_FILE), "utf8")
87534
87935
  )
87535
87936
  );
87536
- const hash = (0, import_node_crypto62.createHash)("sha256").update(
87937
+ const hash = (0, import_node_crypto63.createHash)("sha256").update(
87537
87938
  JSON.stringify([
87538
87939
  headers,
87539
87940
  distribution.link,
@@ -87543,7 +87944,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
87543
87944
  ])
87544
87945
  );
87545
87946
  const objects = distribution.objects.map((file) => [file, distribution.files[file]]);
87546
- const objectKey = (0, import_node_crypto62.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
87947
+ const objectKey = (0, import_node_crypto63.createHash)("sha256").update(JSON.stringify(objects)).digest("hex");
87547
87948
  const cache = import_node_path106.default.join(cacheDir4, "framework-symbols-by-object", objectKey);
87548
87949
  if (!import_node_fs103.default.existsSync(cache)) {
87549
87950
  import_node_fs103.default.mkdirSync(import_node_path106.default.dirname(cache), { recursive: true });
@@ -87578,7 +87979,7 @@ function frameworkProbeIdentity(moduleRoot, toolchainBin) {
87578
87979
  const digest3 = import_node_path106.default.join(temporary, "digest");
87579
87980
  import_node_fs103.default.writeFileSync(
87580
87981
  digest3,
87581
- (0, import_node_crypto62.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
87982
+ (0, import_node_crypto63.createHash)("sha256").update(symbols.sort().join("\n")).digest("hex")
87582
87983
  );
87583
87984
  import_node_fs103.default.renameSync(digest3, cache);
87584
87985
  } finally {
@@ -87633,7 +88034,7 @@ function buildable(declaration) {
87633
88034
  return builderOf(declaration) !== null && declaration.dependencies.every(buildable);
87634
88035
  }
87635
88036
  function declarationInputs(declaration, builder, toolchain, dependencyKeys) {
87636
- const hash = (0, import_node_crypto62.createHash)("sha256");
88037
+ const hash = (0, import_node_crypto63.createHash)("sha256");
87637
88038
  const files2 = declaration.sources.filter(
87638
88039
  (source) => !source.generator && !source.file.split(import_node_path106.default.sep).includes(".git")
87639
88040
  ).map((source) => import_node_path106.default.relative(declaration.packageDir, source.file));
@@ -87767,12 +88168,12 @@ function genruleArchive(declaration, library, moduleRoot) {
87767
88168
  }
87768
88169
  return combined;
87769
88170
  }
87770
- var import_node_child_process51, import_node_crypto62, import_node_fs103, import_node_os20, import_node_path106, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
88171
+ var import_node_child_process51, import_node_crypto63, import_node_fs103, import_node_os20, import_node_path106, v8, BUILDERS, cacheDir4, toolIdentities, sysrootIdentities, GENRULE_RECIPE, GENRULE_BUNDLE;
87771
88172
  var init_genrule_archives = __esm({
87772
88173
  "src/genrule-archives.ts"() {
87773
88174
  "use strict";
87774
88175
  import_node_child_process51 = require("node:child_process");
87775
- import_node_crypto62 = require("node:crypto");
88176
+ import_node_crypto63 = require("node:crypto");
87776
88177
  import_node_fs103 = __toESM(require("node:fs"), 1);
87777
88178
  import_node_os20 = __toESM(require("node:os"), 1);
87778
88179
  import_node_path106 = __toESM(require("node:path"), 1);
@@ -87880,7 +88281,7 @@ function privateSentrySlice(entry, moduleRoot) {
87880
88281
  function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact) {
87881
88282
  if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin;
87882
88283
  const native = simulatorNativeLibrary(artifact());
87883
- if (!native || (0, import_node_crypto63.createHash)("sha256").update(import_node_fs104.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
88284
+ if (!native || (0, import_node_crypto64.createHash)("sha256").update(import_node_fs104.default.readFileSync(native.file)).digest("hex") !== SENTRY_SWIFT_SLICE.nativeSha256)
87884
88285
  return standin;
87885
88286
  if (configured)
87886
88287
  throw new Error(
@@ -87938,12 +88339,12 @@ function nativeSwiftSlice(standin, moduleRoot, generator, configured, artifact)
87938
88339
  }
87939
88340
  };
87940
88341
  }
87941
- var import_node_child_process52, import_node_crypto63, import_node_fs104, import_node_os21, import_node_path107, SENTRY_SWIFT_SLICE;
88342
+ var import_node_child_process52, import_node_crypto64, import_node_fs104, import_node_os21, import_node_path107, SENTRY_SWIFT_SLICE;
87942
88343
  var init_native_swift_slices = __esm({
87943
88344
  "src/native-swift-slices.ts"() {
87944
88345
  "use strict";
87945
88346
  import_node_child_process52 = require("node:child_process");
87946
- import_node_crypto63 = require("node:crypto");
88347
+ import_node_crypto64 = require("node:crypto");
87947
88348
  import_node_fs104 = __toESM(require("node:fs"), 1);
87948
88349
  import_node_os21 = __toESM(require("node:os"), 1);
87949
88350
  import_node_path107 = __toESM(require("node:path"), 1);
@@ -88703,7 +89104,7 @@ function treeDigest(root) {
88703
89104
  }).join("\n");
88704
89105
  const memo2 = digests.get(`tree\0${root}`);
88705
89106
  if (memo2?.stamp === stamp) return memo2.digest;
88706
- const hash = (0, import_node_crypto64.createHash)("sha256");
89107
+ const hash = (0, import_node_crypto65.createHash)("sha256");
88707
89108
  for (const name3 of names) {
88708
89109
  hash.update(`${name3}\0`);
88709
89110
  hash.update(import_node_fs108.default.readFileSync(import_node_path110.default.join(root, name3)));
@@ -88750,7 +89151,7 @@ function swiftBinaryFramework(binary2) {
88750
89151
  const found3 = locateXcframework(import_node_path110.default.join(dir, "tree"));
88751
89152
  if (found3) return { dir: found3, digest: stored.sha };
88752
89153
  }
88753
- const sha2 = (0, import_node_crypto64.createHash)("sha256").update(import_node_fs108.default.readFileSync(binary2.dir)).digest("hex");
89154
+ const sha2 = (0, import_node_crypto65.createHash)("sha256").update(import_node_fs108.default.readFileSync(binary2.dir)).digest("hex");
88754
89155
  if (sha2 !== stored?.sha || !locateXcframework(import_node_path110.default.join(dir, "tree"))) {
88755
89156
  import_node_fs108.default.rmSync(dir, { recursive: true, force: true });
88756
89157
  import_node_fs108.default.mkdirSync(import_node_path110.default.join(dir, "tree"), { recursive: true });
@@ -88762,7 +89163,7 @@ function swiftBinaryFramework(binary2) {
88762
89163
  return { dir: found2, digest: sha2 };
88763
89164
  }
88764
89165
  if (stored && import_node_fs108.default.existsSync(archive)) {
88765
- const sha2 = (0, import_node_crypto64.createHash)("sha256").update(import_node_fs108.default.readFileSync(archive)).digest("hex");
89166
+ const sha2 = (0, import_node_crypto65.createHash)("sha256").update(import_node_fs108.default.readFileSync(archive)).digest("hex");
88766
89167
  if (sha2 !== expected)
88767
89168
  throw new Error(`archive checksum ${sha2} is not the declared checksum ${expected}`);
88768
89169
  const found2 = locateXcframework(import_node_path110.default.join(dir, "tree"));
@@ -88771,7 +89172,7 @@ function swiftBinaryFramework(binary2) {
88771
89172
  import_node_fs108.default.rmSync(dir, { recursive: true, force: true });
88772
89173
  import_node_fs108.default.mkdirSync(import_node_path110.default.join(dir, "tree"), { recursive: true });
88773
89174
  exec("curl", ["-fsSL", "--retry", "2", "-o", archive, binary2.url]);
88774
- const sha = (0, import_node_crypto64.createHash)("sha256").update(import_node_fs108.default.readFileSync(archive)).digest("hex");
89175
+ const sha = (0, import_node_crypto65.createHash)("sha256").update(import_node_fs108.default.readFileSync(archive)).digest("hex");
88775
89176
  if (sha !== expected) {
88776
89177
  import_node_fs108.default.rmSync(dir, { recursive: true, force: true });
88777
89178
  throw new Error(`archive checksum ${sha} is not the declared checksum ${expected}`);
@@ -88896,7 +89297,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88896
89297
  });
88897
89298
  }
88898
89299
  }
88899
- const declaredDigest = (0, import_node_crypto64.createHash)("sha256");
89300
+ const declaredDigest = (0, import_node_crypto65.createHash)("sha256");
88900
89301
  for (const framework of providedFrameworks)
88901
89302
  declaredDigest.update(`provided/${import_node_path110.default.relative(artifact.dir, framework)}\0`);
88902
89303
  for (const [framework, { declared: names, imports: imports2, sdkHeader }] of declared)
@@ -88966,7 +89367,7 @@ function binaryHeaderSearchPaths(binary2, root, workspaceRoot2, declaredFramewor
88966
89367
  import_node_fs108.default.copyFileSync(surface.modulemap, modulemap);
88967
89368
  }
88968
89369
  }
88969
- const contents2 = (0, import_node_crypto64.createHash)("sha256");
89370
+ const contents2 = (0, import_node_crypto65.createHash)("sha256");
88970
89371
  for (const framework of providedFrameworks.filter((item) => !declared.has(item))) {
88971
89372
  const modulemap = import_node_path110.default.join(
88972
89373
  pending2,
@@ -90381,7 +90782,7 @@ function crateSourceRoots(manifest, searchRoot) {
90381
90782
  return roots;
90382
90783
  }
90383
90784
  function crateSourceDigest(manifest, searchRoot) {
90384
- const hash = (0, import_node_crypto64.createHash)("sha256");
90785
+ const hash = (0, import_node_crypto65.createHash)("sha256");
90385
90786
  const walk4 = (dir, root) => {
90386
90787
  for (const entry of import_node_fs108.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : 1)) {
90387
90788
  const full = import_node_path110.default.join(dir, entry.name);
@@ -90828,7 +91229,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
90828
91229
  ...swiftSources.flags,
90829
91230
  ...swiftSources.sources.flatMap((source) => [
90830
91231
  source,
90831
- (0, import_node_crypto64.createHash)("sha256").update(import_node_fs108.default.readFileSync(import_node_path110.default.join(binary2.dir, source))).digest("hex")
91232
+ (0, import_node_crypto65.createHash)("sha256").update(import_node_fs108.default.readFileSync(import_node_path110.default.join(binary2.dir, source))).digest("hex")
90832
91233
  ])
90833
91234
  );
90834
91235
  continue;
@@ -90864,7 +91265,7 @@ function standinGenerationInputs(binaries, toolchain, configuredBehavior = {}, s
90864
91265
  );
90865
91266
  }
90866
91267
  }
90867
- return (0, import_node_crypto64.createHash)("sha256").update(parts.join("\0")).digest("hex");
91268
+ return (0, import_node_crypto65.createHash)("sha256").update(parts.join("\0")).digest("hex");
90868
91269
  }
90869
91270
  function missingArtifactGap(binary2) {
90870
91271
  if (swiftBinaryOnDisk(binary2)) return null;
@@ -90946,7 +91347,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
90946
91347
  return NO_IMPORTABLE_SURFACE;
90947
91348
  }
90948
91349
  const configured = new Map(Object.entries(behavior));
90949
- const hash = (0, import_node_crypto64.createHash)("sha256").update(
91350
+ const hash = (0, import_node_crypto65.createHash)("sha256").update(
90950
91351
  standinGenerationInputs([binary2], toolchain, behavior)
90951
91352
  );
90952
91353
  hash.update(digest3);
@@ -91186,7 +91587,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
91186
91587
  );
91187
91588
  if (binary2.moduleSources !== void 0)
91188
91589
  frameworkInputs.push(
91189
- `${binary2.target}\0${(0, import_node_crypto64.createHash)("sha256").update(
91590
+ `${binary2.target}\0${(0, import_node_crypto65.createHash)("sha256").update(
91190
91591
  [iosSdkId(), ...swiftSources.flags, ...swiftSources.sources, ...texts].join(
91191
91592
  "\0"
91192
91593
  )
@@ -91227,7 +91628,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
91227
91628
  import_node_fs108.default.mkdirSync(sourceFrameworks);
91228
91629
  const frameworks = {
91229
91630
  dirs: [...frameworkDirs, sourceFrameworks].sort(),
91230
- digest: (0, import_node_crypto64.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
91631
+ digest: (0, import_node_crypto65.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
91231
91632
  surfaces: frameworkSurfaces
91232
91633
  };
91233
91634
  const siblings = new Map(
@@ -91346,12 +91747,12 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
91346
91747
  import_node_fs108.default.rmSync(modules, { recursive: true, force: true });
91347
91748
  }
91348
91749
  }
91349
- var import_node_child_process54, import_node_crypto64, import_node_fs108, import_node_path110, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
91750
+ var import_node_child_process54, import_node_crypto65, import_node_fs108, import_node_path110, TRIPLE, cacheDir5, key, digests, isBinaryLibraryFile, OBJC_IMPORT, files, OBJC, NO_IMPORTABLE_SURFACE, OBJC_ATTRIBUTE, TYPE_DECLARATION, OPTIONAL_REQUIREMENT, WASM_EH_FLAGS, OBJC_UNREPRESENTABLE, INERT_VALUE, identChar, RUST_TARGET, UNSEARCHED, RUST_TOOLCHAIN, built;
91350
91751
  var init_swift_standins = __esm({
91351
91752
  "src/swift-standins.ts"() {
91352
91753
  "use strict";
91353
91754
  import_node_child_process54 = require("node:child_process");
91354
- import_node_crypto64 = require("node:crypto");
91755
+ import_node_crypto65 = require("node:crypto");
91355
91756
  import_node_fs108 = __toESM(require("node:fs"), 1);
91356
91757
  import_node_path110 = __toESM(require("node:path"), 1);
91357
91758
  init_forked_script_contract();
@@ -91381,7 +91782,7 @@ var init_swift_standins = __esm({
91381
91782
  init_swiftTargetContract();
91382
91783
  TRIPLE = SWIFT_WASM_TRIPLE;
91383
91784
  cacheDir5 = import_node_path110.default.join(cacheDir(), "swift-standins");
91384
- key = (...parts) => (0, import_node_crypto64.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
91785
+ key = (...parts) => (0, import_node_crypto65.createHash)("sha256").update(parts.join("\0")).digest("hex").slice(0, 32);
91385
91786
  digests = /* @__PURE__ */ new Map();
91386
91787
  isBinaryLibraryFile = (file) => /\.(?:a|dylib|o|tbd)$/i.test(file);
91387
91788
  OBJC_IMPORT = /#\s*(?:import|include)\s*[<"](?:[\w+-]+\/)?([\w+.-]+\.h)[>"]/g;
@@ -91541,10 +91942,10 @@ function compiledFrameworkImports(app, products) {
91541
91942
  }
91542
91943
  return imports2;
91543
91944
  }
91544
- function sha256Hex2(bytes) {
91945
+ function sha256Hex6(bytes) {
91545
91946
  if (typeof Bun !== "undefined")
91546
91947
  return new Bun.CryptoHasher("sha256").update(bytes).digest("hex");
91547
- return (0, import_node_crypto65.createHash)("sha256").update(bytes).digest("hex");
91948
+ return (0, import_node_crypto66.createHash)("sha256").update(bytes).digest("hex");
91548
91949
  }
91549
91950
  function regularFileStamp(file) {
91550
91951
  const stat = import_node_fs109.default.lstatSync(file, { bigint: true, throwIfNoEntry: false });
@@ -91559,7 +91960,7 @@ function verifyRetainedFile(work, file, hash, stamps) {
91559
91960
  if (typeof expectedStamp === "string" && regularFileStamp(resolved) === expectedStamp)
91560
91961
  return true;
91561
91962
  if (!import_node_fs109.default.existsSync(resolved)) return false;
91562
- return sha256Hex2(readPackageFile(work, resolved, Infinity)) === hash;
91963
+ return sha256Hex6(readPackageFile(work, resolved, Infinity)) === hash;
91563
91964
  }
91564
91965
  function recordRetainedStamps(work, files2) {
91565
91966
  const stamps = {};
@@ -91576,7 +91977,7 @@ function cachedBinaryFileDigest(file) {
91576
91977
  const memory = binaryFileDigests.get(real);
91577
91978
  if (memory?.stamp === stamp) return memory.digest;
91578
91979
  const dir = import_node_path111.default.join(cacheDir(), "swift-binary-digests");
91579
- const record5 = import_node_path111.default.join(dir, `${sha256Hex2(real)}.json`);
91980
+ const record5 = import_node_path111.default.join(dir, `${sha256Hex6(real)}.json`);
91580
91981
  if (import_node_fs109.default.existsSync(record5)) {
91581
91982
  const saved = JSON.parse(import_node_fs109.default.readFileSync(record5, "utf8"));
91582
91983
  if (isRecord(saved) && saved.stamp === stamp && typeof saved.digest === "string") {
@@ -91584,10 +91985,10 @@ function cachedBinaryFileDigest(file) {
91584
91985
  return saved.digest;
91585
91986
  }
91586
91987
  }
91587
- const digest3 = sha256Hex2(import_node_fs109.default.readFileSync(real));
91988
+ const digest3 = sha256Hex6(import_node_fs109.default.readFileSync(real));
91588
91989
  binaryFileDigests.set(real, { stamp, digest: digest3 });
91589
91990
  import_node_fs109.default.mkdirSync(dir, { recursive: true });
91590
- const partial = `${record5}.${process.pid}.${(0, import_node_crypto65.randomUUID)()}`;
91991
+ const partial = `${record5}.${process.pid}.${(0, import_node_crypto66.randomUUID)()}`;
91591
91992
  import_node_fs109.default.writeFileSync(partial, JSON.stringify({ stamp, digest: digest3 }));
91592
91993
  import_node_fs109.default.renameSync(partial, record5);
91593
91994
  return digest3;
@@ -92119,7 +92520,7 @@ function prepareXcodeSwiftProducts(app, binaries, moduleRoot) {
92119
92520
  const staged = withFrameworkCompanionImports(original);
92120
92521
  if (staged !== original) sources.set(file, Buffer.from(staged));
92121
92522
  }
92122
- const digest3 = sha256Hex2;
92523
+ const digest3 = sha256Hex6;
92123
92524
  const providers = /* @__PURE__ */ new Map();
92124
92525
  for (const target of targets) {
92125
92526
  if (!supplied.has(target.moduleName)) continue;
@@ -92475,7 +92876,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
92475
92876
  products
92476
92877
  );
92477
92878
  const checkouts = remoteSwiftCheckouts(app.rootDir);
92478
- const digest3 = sha256Hex2;
92879
+ const digest3 = sha256Hex6;
92479
92880
  const inputs2 = Object.fromEntries(
92480
92881
  [...sources].map(([file, bytes]) => [file, digest3(bytes)])
92481
92882
  );
@@ -92757,6 +93158,7 @@ async function prepareXcodeNativeInputs(app, binaries, moduleRoot, purpose) {
92757
93158
  ...flags,
92758
93159
  ...target.prefix ? ["-include", staged(target.prefix)] : [],
92759
93160
  "-Os",
93161
+ ...purpose === "objects" ? ["-g0"] : [],
92760
93162
  "-c",
92761
93163
  staged(file),
92762
93164
  "-o",
@@ -92856,12 +93258,12 @@ ${reported.trimEnd() || `Clang exited with status ${result.status}`}`;
92856
93258
  import_node_fs109.default.closeSync(descriptor);
92857
93259
  }
92858
93260
  }
92859
- var import_node_child_process55, import_node_crypto65, import_node_fs109, import_node_path111, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT, binaryFileDigests, objcInputSnapshots;
93261
+ var import_node_child_process55, import_node_crypto66, import_node_fs109, import_node_path111, SwiftObjCCompilationError, isDirectory4, isSdkInclude, FRAMEWORK_IMPORT, OWN_IMPORT, binaryFileDigests, objcInputSnapshots;
92860
93262
  var init_swift_objc_compile = __esm({
92861
93263
  "src/swift-objc-compile.ts"() {
92862
93264
  "use strict";
92863
93265
  import_node_child_process55 = require("node:child_process");
92864
- import_node_crypto65 = require("node:crypto");
93266
+ import_node_crypto66 = require("node:crypto");
92865
93267
  import_node_fs109 = __toESM(require("node:fs"), 1);
92866
93268
  import_node_path111 = __toESM(require("node:path"), 1);
92867
93269
  init_mapLimit();
@@ -92915,7 +93317,7 @@ async function buildRiveRuntimeDependencies(checkout, moduleRoot) {
92915
93317
  ];
92916
93318
  const objc = [...swiftObjCRuntimeFlags, "-fobjc-exceptions"];
92917
93319
  const xcode = (0, import_node_child_process56.execFileSync)("xcodebuild", ["-version"], { encoding: "utf8" });
92918
- const key2 = (0, import_node_crypto66.createHash)("sha256").update(
93320
+ const key2 = (0, import_node_crypto67.createHash)("sha256").update(
92919
93321
  JSON.stringify([
92920
93322
  RECIPE,
92921
93323
  (0, import_node_child_process56.execFileSync)("git", ["-C", runtime, "rev-parse", "HEAD"], {
@@ -93126,12 +93528,12 @@ exec ${quote3(import_node_path112.default.join(toolchainBin, "llvm-ar"))} rcs "$
93126
93528
  );
93127
93529
  return directory2;
93128
93530
  }
93129
- var import_node_child_process56, import_node_crypto66, import_node_fs110, import_node_os22, import_node_path112, import_promises9, RECIPE, CONFIG, RUNTIME_LIBRARIES;
93531
+ var import_node_child_process56, import_node_crypto67, import_node_fs110, import_node_os22, import_node_path112, import_promises9, RECIPE, CONFIG, RUNTIME_LIBRARIES;
93130
93532
  var init_rive_runtime_dependencies = __esm({
93131
93533
  "src/rive-runtime-dependencies.ts"() {
93132
93534
  "use strict";
93133
93535
  import_node_child_process56 = require("node:child_process");
93134
- import_node_crypto66 = require("node:crypto");
93536
+ import_node_crypto67 = require("node:crypto");
93135
93537
  import_node_fs110 = __toESM(require("node:fs"), 1);
93136
93538
  import_node_os22 = __toESM(require("node:os"), 1);
93137
93539
  import_node_path112 = __toESM(require("node:path"), 1);
@@ -93988,7 +94390,7 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
93988
94390
  (binary2) => binary2.publicHeaders === void 0 && binary2.placeholder === void 0 && swiftBinaryOnDisk(binary2) && binaryHeaderSearchPaths(binary2, staged, app.rootDir).headers.length === 1
93989
94391
  ))
93990
94392
  return [...binaries];
93991
- const hash = (0, import_node_crypto67.createHash)("sha256");
94393
+ const hash = (0, import_node_crypto68.createHash)("sha256");
93992
94394
  hash.update(
93993
94395
  JSON.stringify([
93994
94396
  inputs2.targets,
@@ -94197,12 +94599,12 @@ async function xcodeCxxReachable(app, binaries, moduleRoot, clang) {
94197
94599
  );
94198
94600
  return result;
94199
94601
  }
94200
- var import_node_child_process58, import_node_crypto67, import_node_fs112, import_node_path114, cachedInputs;
94602
+ var import_node_child_process58, import_node_crypto68, import_node_fs112, import_node_path114, cachedInputs;
94201
94603
  var init_swift_cxx_reachable = __esm({
94202
94604
  "src/swift-cxx-reachable.ts"() {
94203
94605
  "use strict";
94204
94606
  import_node_child_process58 = require("node:child_process");
94205
- import_node_crypto67 = require("node:crypto");
94607
+ import_node_crypto68 = require("node:crypto");
94206
94608
  import_node_fs112 = __toESM(require("node:fs"), 1);
94207
94609
  import_node_path114 = __toESM(require("node:path"), 1);
94208
94610
  init_is_record();
@@ -94400,7 +94802,7 @@ function nativeSourceDescriptor(packagePath) {
94400
94802
  function swiftArtifactContentDigest(bytes) {
94401
94803
  let digest3 = swiftArtifactDigests.get(bytes);
94402
94804
  if (!digest3) {
94403
- digest3 = (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex");
94805
+ digest3 = (0, import_node_crypto69.createHash)("sha256").update(bytes).digest("hex");
94404
94806
  swiftArtifactDigests.set(bytes, digest3);
94405
94807
  }
94406
94808
  return digest3;
@@ -94528,7 +94930,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
94528
94930
  const clang = import_node_path116.default.join(toolchainBin, "clang");
94529
94931
  const empty = (binary2, file) => {
94530
94932
  const source = import_node_path116.default.join(binary2.dir, file);
94531
- const key2 = (0, import_node_crypto68.createHash)("sha256").update(
94933
+ const key2 = (0, import_node_crypto69.createHash)("sha256").update(
94532
94934
  JSON.stringify([
94533
94935
  clang,
94534
94936
  sdk2.sysroot,
@@ -94573,7 +94975,7 @@ async function wasmPortableAssembly(binaries, toolchainBin, moduleRoot) {
94573
94975
  return new Set(portable.flat());
94574
94976
  }
94575
94977
  async function swiftPackages(entry, app) {
94576
- const stamp = (file) => import_node_fs114.default.existsSync(file) ? (0, import_node_crypto68.createHash)("sha256").update(import_node_fs114.default.readFileSync(file)).digest("hex") : null;
94978
+ const stamp = (file) => import_node_fs114.default.existsSync(file) ? (0, import_node_crypto69.createHash)("sha256").update(import_node_fs114.default.readFileSync(file)).digest("hex") : null;
94577
94979
  const owners = [...app.frameworks, app].map((target) => ({
94578
94980
  module: target.moduleName,
94579
94981
  products: target.packageProducts ?? []
@@ -95737,7 +96139,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
95737
96139
  const source = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(
95738
96140
  bytes
95739
96141
  );
95740
- const sha2565 = (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex");
96142
+ const sha2565 = (0, import_node_crypto69.createHash)("sha256").update(bytes).digest("hex");
95741
96143
  const bundle = swiftResourceBundleForFile(bundles, key2);
95742
96144
  if (!bundle && inputs2["Package.swift"])
95743
96145
  throw new Error(`metal source ${key2} has no resource target bundle`);
@@ -95760,7 +96162,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
95760
96162
  const bytes = readPackageFile2(project2.packagePath, disk, limits.imageBytes);
95761
96163
  pdfs.set(file, {
95762
96164
  file: disk,
95763
- sha256: (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex")
96165
+ sha256: (0, import_node_crypto69.createHash)("sha256").update(bytes).digest("hex")
95764
96166
  });
95765
96167
  }
95766
96168
  const pdfRasters = rasterizePdfFiles([...pdfs.values()], limits);
@@ -95806,7 +96208,7 @@ async function buildSwiftResourceTable(project2, baseUrl, inputs2) {
95806
96208
  throw new Error("swift image pack exceeds the compile service caps");
95807
96209
  }
95808
96210
  imageBytes += bytes.length;
95809
- const hash = (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
96211
+ const hash = (0, import_node_crypto69.createHash)("sha256").update(bytes).digest("hex").slice(0, 16);
95810
96212
  const bundle = table[bundlePath] ?? /* @__PURE__ */ Object.create(null);
95811
96213
  const pixelSize = ext === ".png" ? readPngDimensions(bytes) : null;
95812
96214
  const variant2 = {
@@ -96113,7 +96515,7 @@ function updateSwiftConfigStamp(hash, packagePath) {
96113
96515
  hash.update(JSON.stringify(gates.map((name3) => swiftWasm64PlatformGates[name3])));
96114
96516
  }
96115
96517
  function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
96116
- const hash = (0, import_node_crypto68.createHash)("sha256");
96518
+ const hash = (0, import_node_crypto69.createHash)("sha256");
96117
96519
  hash.update(packagePath);
96118
96520
  updateSwiftConfigStamp(hash, packagePath);
96119
96521
  const libraries = projects().get(packagePath)?.libraries;
@@ -96142,7 +96544,7 @@ function sourceStamp(packagePath, moduleRootOverride, hosted = false) {
96142
96544
  return hash.digest("hex").slice(0, 16);
96143
96545
  }
96144
96546
  function sourceContentStamp(packagePath, moduleRootOverride) {
96145
- const hash = (0, import_node_crypto68.createHash)("sha256");
96547
+ const hash = (0, import_node_crypto69.createHash)("sha256");
96146
96548
  hash.update(compilerSourceDigest);
96147
96549
  updateSwiftConfigStamp(hash, packagePath);
96148
96550
  const libraries = projects().get(packagePath)?.libraries;
@@ -96174,7 +96576,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
96174
96576
  (root) => import_node_fs114.default.existsSync(import_node_path116.default.join(root, "toolchain.json"))
96175
96577
  );
96176
96578
  if (!moduleRoot) return "";
96177
- const hash = (0, import_node_crypto68.createHash)("sha256");
96579
+ const hash = (0, import_node_crypto69.createHash)("sha256");
96178
96580
  hash.update(moduleRoot);
96179
96581
  for (const relative4 of swiftModuleInputFiles(moduleRoot)) {
96180
96582
  hash.update(relative4);
@@ -96184,7 +96586,7 @@ function moduleStamp(packagePath, moduleRootOverride, hosted) {
96184
96586
  }
96185
96587
  function otherInputs(input, standalone) {
96186
96588
  const { files: _files, ...rest } = input;
96187
- return (0, import_node_crypto68.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
96589
+ return (0, import_node_crypto69.createHash)("sha256").update(JSON.stringify({ ...rest, standalone })).digest("hex");
96188
96590
  }
96189
96591
  function icuUrl(origin, artifact) {
96190
96592
  return "url" in artifact.icu ? artifact.icu.url : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`;
@@ -96199,7 +96601,7 @@ function standinLibraries(binaries, standins, rootDir, toolchain, rustWasm64) {
96199
96601
  for (const standin of standins) {
96200
96602
  if (!standin.prebuilt) continue;
96201
96603
  const bytes = Buffer.from(standin.prebuilt.library, "base64");
96202
- const digest3 = (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex");
96604
+ const digest3 = (0, import_node_crypto69.createHash)("sha256").update(bytes).digest("hex");
96203
96605
  const dir = import_node_path116.default.join(swiftCacheDir(), "native-archives", digest3);
96204
96606
  import_node_fs114.default.mkdirSync(dir, { recursive: true });
96205
96607
  const library = import_node_path116.default.join(dir, `lib${standin.module}.a`);
@@ -96548,7 +96950,7 @@ function swiftBuildRoot(packagePath, moduleRoot) {
96548
96950
  return import_node_path116.default.join(
96549
96951
  swiftCacheDir(),
96550
96952
  "swift-builds",
96551
- (0, import_node_crypto68.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
96953
+ (0, import_node_crypto69.createHash)("sha256").update(`${compilerKey}\0${buildKeyPath}`).digest("hex").slice(0, 16)
96552
96954
  );
96553
96955
  }
96554
96956
  function installedWorkspaceInput(packagePath, entry, moduleRoot) {
@@ -96849,7 +97251,7 @@ async function fetchSwiftDyldTable(moduleUrl, module2, signal) {
96849
97251
  const response = await fetch(url, { signal });
96850
97252
  if (!response.ok) throw new Error(`swift compile: ${url} answered ${response.status}`);
96851
97253
  const bytes = Buffer.from(await response.arrayBuffer());
96852
- if (bytes.length !== byteLength || (0, import_node_crypto68.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
97254
+ if (bytes.length !== byteLength || (0, import_node_crypto69.createHash)("sha256").update(bytes).digest("hex") !== sha2565)
96853
97255
  throw new Error(`swift compile: ${url} does not match its module's index`);
96854
97256
  return { dyldTable: { sha256: sha2565, bytes } };
96855
97257
  }
@@ -96928,13 +97330,13 @@ function swiftArtifactIsAvailable(origin, url, hash) {
96928
97330
  (project2) => project2.artifacts.some((artifact) => artifact.hash === hash)
96929
97331
  );
96930
97332
  }
96931
- var import_node_async_hooks2, import_node_child_process60, import_node_crypto68, import_node_fs114, import_node_os24, import_node_path116, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, swiftArtifactDigests, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
97333
+ var import_node_async_hooks2, import_node_child_process60, import_node_crypto69, import_node_fs114, import_node_os24, import_node_path116, ARTIFACT_PATH, RESOURCE_PATH, ICU_PATH, SKIP_ROOT_DIRS, NATIVE_DESCRIPTOR, NATIVE_GLUE, SwiftMissingModulesError, swiftArtifactDigests, sharedProjects, projectScope, projects, sharedSourceEntries, sourceEntries, sharedXcodeProjects, xcodeProjects, preparedScriptInputs, emptyWasmAssembly, XCODE_APP_DIR, XCODE_FRAMEWORKS_DIR, XCODE_PACKAGES_DIR, layoutScope, HOSTED_LIMITS, LOCAL_LIMITS, inputLimits, RESOURCE_CONTENT_TYPES, API_GAP_PATTERNS, IOS_SDK_FRAMEWORKS;
96932
97334
  var init_swift_host = __esm({
96933
97335
  "src/swift-host.ts"() {
96934
97336
  "use strict";
96935
97337
  import_node_async_hooks2 = require("node:async_hooks");
96936
97338
  import_node_child_process60 = require("node:child_process");
96937
- import_node_crypto68 = require("node:crypto");
97339
+ import_node_crypto69 = require("node:crypto");
96938
97340
  import_node_fs114 = __toESM(require("node:fs"), 1);
96939
97341
  import_node_os24 = __toESM(require("node:os"), 1);
96940
97342
  import_node_path116 = __toESM(require("node:path"), 1);
@@ -97488,7 +97890,7 @@ function hashTree(root) {
97488
97890
  for (const entry of import_node_fs117.default.readdirSync(root, { recursive: true, withFileTypes: true })) {
97489
97891
  if (!entry.isFile()) continue;
97490
97892
  const file = import_node_path119.default.join(entry.parentPath, entry.name);
97491
- hashes[import_node_path119.default.relative(root, file).split(import_node_path119.default.sep).join("/")] = (0, import_node_crypto69.createHash)("sha256").update(import_node_fs117.default.readFileSync(file)).digest("hex");
97893
+ hashes[import_node_path119.default.relative(root, file).split(import_node_path119.default.sep).join("/")] = (0, import_node_crypto70.createHash)("sha256").update(import_node_fs117.default.readFileSync(file)).digest("hex");
97492
97894
  }
97493
97895
  return Object.fromEntries(Object.entries(hashes).sort(([a], [b]) => a < b ? -1 : 1));
97494
97896
  }
@@ -97538,12 +97940,12 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
97538
97940
  files: hashTree(generatedRoot)
97539
97941
  };
97540
97942
  }
97541
- var import_node_child_process61, import_node_crypto69, import_node_fs117, import_node_module13, import_node_path119, import_node_util15, run10, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
97943
+ var import_node_child_process61, import_node_crypto70, import_node_fs117, import_node_module13, import_node_path119, import_node_util15, run10, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
97542
97944
  var init_turbo_codegen_intake = __esm({
97543
97945
  "src/turbo-codegen-intake.ts"() {
97544
97946
  "use strict";
97545
97947
  import_node_child_process61 = require("node:child_process");
97546
- import_node_crypto69 = require("node:crypto");
97948
+ import_node_crypto70 = require("node:crypto");
97547
97949
  import_node_fs117 = __toESM(require("node:fs"), 1);
97548
97950
  import_node_module13 = require("node:module");
97549
97951
  import_node_path119 = __toESM(require("node:path"), 1);
@@ -101494,11 +101896,11 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
101494
101896
  }
101495
101897
  `;
101496
101898
  }
101497
- var import_node_crypto70, import_node_fs118, import_node_path120, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
101899
+ var import_node_crypto71, import_node_fs118, import_node_path120, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
101498
101900
  var init_turbo_source = __esm({
101499
101901
  "src/turbo-source.ts"() {
101500
101902
  "use strict";
101501
- import_node_crypto70 = require("node:crypto");
101903
+ import_node_crypto71 = require("node:crypto");
101502
101904
  import_node_fs118 = __toESM(require("node:fs"), 1);
101503
101905
  import_node_path120 = __toESM(require("node:path"), 1);
101504
101906
  init_cocoapods_trunk();
@@ -101626,7 +102028,7 @@ var init_turbo_source = __esm({
101626
102028
  ];
101627
102029
  DECLARED_MODULE_NAME = /\bName\(\s*"(\w+)"\s*\)/g;
101628
102030
  EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
101629
- sha2564 = (data) => (0, import_node_crypto70.createHash)("sha256").update(data).digest("hex");
102031
+ sha2564 = (data) => (0, import_node_crypto71.createHash)("sha256").update(data).digest("hex");
101630
102032
  podspecList = podspecAttribute;
101631
102033
  versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
101632
102034
  iosOf = (member) => object7(member.ios) ? member.ios : null;
@@ -102426,7 +102828,7 @@ function retainInstalledReactNativeDeclarations(snapshot, options2, skipped) {
102426
102828
  }
102427
102829
  async function prepareTurboCompileInput(options2) {
102428
102830
  await prepareTurboSourceDependencies(options2.reactNativeRoot);
102429
- const key2 = (0, import_node_crypto71.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs119.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs119.default.realpathSync(options2.moduleRoot)).digest("hex");
102831
+ const key2 = (0, import_node_crypto72.createHash)("sha256").update(options2.providers.map(({ root }) => import_node_fs119.default.realpathSync(root)).join("\0")).update("\0").update(import_node_fs119.default.realpathSync(options2.moduleRoot)).digest("hex");
102430
102832
  const scratch2 = import_node_path121.default.join(import_node_os25.default.tmpdir(), "peach-turbo-swift", key2);
102431
102833
  import_node_fs119.default.mkdirSync(scratch2, { recursive: true });
102432
102834
  const codegenDir = import_node_fs119.default.mkdtempSync(import_node_path121.default.join(scratch2, "codegen-"));
@@ -102627,11 +103029,11 @@ async function compileTurboModule(options2) {
102627
103029
  collection
102628
103030
  };
102629
103031
  }
102630
- var import_node_crypto71, import_node_fs119, import_node_module14, import_node_os25, import_node_path121;
103032
+ var import_node_crypto72, import_node_fs119, import_node_module14, import_node_os25, import_node_path121;
102631
103033
  var init_turbo_compile = __esm({
102632
103034
  "src/turbo-compile.ts"() {
102633
103035
  "use strict";
102634
- import_node_crypto71 = require("node:crypto");
103036
+ import_node_crypto72 = require("node:crypto");
102635
103037
  import_node_fs119 = __toESM(require("node:fs"), 1);
102636
103038
  import_node_module14 = require("node:module");
102637
103039
  import_node_os25 = __toESM(require("node:os"), 1);
@@ -102848,8 +103250,8 @@ function reactNativeCoreEntry(reactNativeRoot, moduleRoot, mode) {
102848
103250
  );
102849
103251
  if (!isRecord(manifest) || typeof manifest.version !== "string")
102850
103252
  throw new Error(`${reactNativeRoot}: react-native has no version`);
102851
- const headers = (0, import_node_crypto72.createHash)("sha256");
102852
- const sources = (0, import_node_crypto72.createHash)("sha256");
103253
+ const headers = (0, import_node_crypto73.createHash)("sha256");
103254
+ const sources = (0, import_node_crypto73.createHash)("sha256");
102853
103255
  const walk4 = (relative4) => {
102854
103256
  for (const file of import_node_fs121.default.readdirSync(import_node_path123.default.join(reactNativeRoot, relative4), { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
102855
103257
  if (file.name === "node_modules" || file.name.startsWith(".")) continue;
@@ -102956,7 +103358,7 @@ function linkReactNativeCore(collection, core, moduleRoot) {
102956
103358
  const file = import_node_path123.default.join(
102957
103359
  cacheDir(),
102958
103360
  "native-archives",
102959
- `${(0, import_node_crypto72.createHash)("sha256").update(data).digest("hex")}.a`
103361
+ `${(0, import_node_crypto73.createHash)("sha256").update(data).digest("hex")}.a`
102960
103362
  );
102961
103363
  import_node_fs121.default.mkdirSync(import_node_path123.default.dirname(file), { recursive: true });
102962
103364
  if (!import_node_fs121.default.existsSync(file)) import_node_fs121.default.writeFileSync(file, Buffer.from(data, "base64"));
@@ -102966,11 +103368,11 @@ function linkReactNativeCore(collection, core, moduleRoot) {
102966
103368
  }
102967
103369
  }
102968
103370
  }
102969
- var import_node_crypto72, import_node_fs121, import_node_module15, import_node_path123, import_node_util16, recipe, strings3, building;
103371
+ var import_node_crypto73, import_node_fs121, import_node_module15, import_node_path123, import_node_util16, recipe, strings3, building;
102970
103372
  var init_react_native_core = __esm({
102971
103373
  "src/react-native-core.ts"() {
102972
103374
  "use strict";
102973
- import_node_crypto72 = require("node:crypto");
103375
+ import_node_crypto73 = require("node:crypto");
102974
103376
  import_node_fs121 = __toESM(require("node:fs"), 1);
102975
103377
  import_node_module15 = require("node:module");
102976
103378
  import_node_path123 = __toESM(require("node:path"), 1);
@@ -103000,11 +103402,11 @@ async function trunkSpecification(lockFile, root, version2, checksum) {
103000
103402
  "specifications",
103001
103403
  `${checksum}.json`
103002
103404
  );
103003
- const sha1 = (value) => (0, import_node_crypto73.createHash)("sha1").update(value).digest("hex");
103405
+ const sha1 = (value) => (0, import_node_crypto74.createHash)("sha1").update(value).digest("hex");
103004
103406
  let text7;
103005
103407
  if (import_node_fs122.default.existsSync(file)) text7 = import_node_fs122.default.readFileSync(file, "utf8");
103006
103408
  else {
103007
- const shard2 = (0, import_node_crypto73.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
103409
+ const shard2 = (0, import_node_crypto74.createHash)("md5").update(root).digest("hex").slice(0, 3).split("").join("/");
103008
103410
  const specPath = `Specs/${shard2}/${root}/${version2}/${root}.podspec.json`;
103009
103411
  const response = await fetch(`https://cdn.cocoapods.org/${specPath}`);
103010
103412
  if (!response.ok)
@@ -103133,7 +103535,7 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
103133
103535
  "end",
103134
103536
  ""
103135
103537
  ].join("\n");
103136
- const key2 = (0, import_node_crypto73.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
103538
+ const key2 = (0, import_node_crypto74.createHash)("sha256").update(project).update(podfile).update(JSON.stringify([...selected].sort(([a], [b]) => a.localeCompare(b)))).update(
103137
103539
  JSON.stringify(
103138
103540
  Object.entries(specificationChecksums).sort(([a], [b]) => a.localeCompare(b))
103139
103541
  )
@@ -103202,11 +103604,11 @@ async function collectSwiftSourcePods(lockFile, modules, moduleRoot, headerModul
103202
103604
  );
103203
103605
  });
103204
103606
  }
103205
- var import_node_crypto73, import_node_fs122, import_node_path124, APP, record4, project, podModuleName;
103607
+ var import_node_crypto74, import_node_fs122, import_node_path124, APP, record4, project, podModuleName;
103206
103608
  var init_swift_source_pods = __esm({
103207
103609
  "src/swift-source-pods.ts"() {
103208
103610
  "use strict";
103209
- import_node_crypto73 = require("node:crypto");
103611
+ import_node_crypto74 = require("node:crypto");
103210
103612
  import_node_fs122 = __toESM(require("node:fs"), 1);
103211
103613
  import_node_path124 = __toESM(require("node:path"), 1);
103212
103614
  init_browser();
@@ -103883,7 +104285,7 @@ async function prepareNitroCompileInput(options2) {
103883
104285
  input.libraries ??= {};
103884
104286
  input.libraries[nitroProviderTarget({ name: name3 })] = library;
103885
104287
  }
103886
- const key2 = (0, import_node_crypto74.createHash)("sha256").update(
104288
+ const key2 = (0, import_node_crypto75.createHash)("sha256").update(
103887
104289
  collection.providers.map(({ root, hybridObjects }) => `${root}\0${hybridObjects.join(",")}`).join("\0")
103888
104290
  ).update("\0").update(import_node_fs123.default.realpathSync(options2.moduleRoot)).update("\0").update(options2.configuration).digest("hex");
103889
104291
  const packagePath = import_node_path125.default.join(import_node_os26.default.tmpdir(), "peach-nitro-swift", key2, `p${process.pid}`);
@@ -103940,11 +104342,11 @@ function nitrogenGeneratedSources(podDirectory) {
103940
104342
  ...sources(import_node_path125.default.join(generated, "ios"), /\.(h|hpp|c|cpp|mm|swift)$/)
103941
104343
  ];
103942
104344
  }
103943
- var import_node_crypto74, import_node_fs123, import_node_os26, import_node_path125, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
104345
+ var import_node_crypto75, import_node_fs123, import_node_os26, import_node_path125, BUNDLED_CXX_NAMESPACES, REACT_INCLUDE_PATTERN, REACT_LINKING_PATTERN, REACT_VERSION_PATTERN, RN_HEADER_DIR_MAP, RN_COMMON_ROOTS;
103944
104346
  var init_nitro_compile = __esm({
103945
104347
  "src/nitro-compile.ts"() {
103946
104348
  "use strict";
103947
- import_node_crypto74 = require("node:crypto");
104349
+ import_node_crypto75 = require("node:crypto");
103948
104350
  import_node_fs123 = __toESM(require("node:fs"), 1);
103949
104351
  import_node_os26 = __toESM(require("node:os"), 1);
103950
104352
  import_node_path125 = __toESM(require("node:path"), 1);
@@ -104021,11 +104423,11 @@ var init_nitro_compile = __esm({
104021
104423
  });
104022
104424
 
104023
104425
  // src/nitro-compiler-digest.ts
104024
- var import_node_crypto75, import_node_fs124, import_node_path126;
104426
+ var import_node_crypto76, import_node_fs124, import_node_path126;
104025
104427
  var init_nitro_compiler_digest = __esm({
104026
104428
  "src/nitro-compiler-digest.ts"() {
104027
104429
  "use strict";
104028
- import_node_crypto75 = require("node:crypto");
104430
+ import_node_crypto76 = require("node:crypto");
104029
104431
  import_node_fs124 = require("node:fs");
104030
104432
  import_node_path126 = __toESM(require("node:path"), 1);
104031
104433
  init_swift_compiler_digest();
@@ -104046,7 +104448,7 @@ function hashPackageTree(root, options2) {
104046
104448
  }
104047
104449
  };
104048
104450
  walk4(root, "");
104049
- const hash = (0, import_node_crypto76.createHash)("sha256");
104451
+ const hash = (0, import_node_crypto77.createHash)("sha256");
104050
104452
  return (async () => {
104051
104453
  for (let start = 0; start < files2.length; start += READ_AHEAD) {
104052
104454
  const batch = files2.slice(start, start + READ_AHEAD);
@@ -104061,11 +104463,11 @@ function packageTreeDigest(root) {
104061
104463
  compareNames: (left, right) => left.localeCompare(right)
104062
104464
  });
104063
104465
  }
104064
- var import_node_crypto76, import_node_fs125, import_promises11, import_node_path127, READ_AHEAD;
104466
+ var import_node_crypto77, import_node_fs125, import_promises11, import_node_path127, READ_AHEAD;
104065
104467
  var init_package_tree_digest = __esm({
104066
104468
  "src/package-tree-digest.ts"() {
104067
104469
  "use strict";
104068
- import_node_crypto76 = require("node:crypto");
104470
+ import_node_crypto77 = require("node:crypto");
104069
104471
  import_node_fs125 = require("node:fs");
104070
104472
  import_promises11 = require("node:fs/promises");
104071
104473
  import_node_path127 = require("node:path");
@@ -104204,7 +104606,7 @@ var init_nitro_superset = __esm({
104204
104606
  init_nitroContract();
104205
104607
  init_swift_standin_digest();
104206
104608
  NITRO_SUPERSET_ENTRY_NAME = "superset";
104207
- NITRO_COMPILER_DIGEST = true ? "d233e4dbe512fd98c3952dbb73147bb1a4402279259009f8b91cf67debb0d9f0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
104609
+ NITRO_COMPILER_DIGEST = true ? "bdc0f5dd61f31a5b6f5bba3db67fc29584077dfb64bd237228a11b91b9ab2730" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
104208
104610
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
104209
104611
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
104210
104612
  published = /* @__PURE__ */ new Map();
@@ -104977,7 +105379,7 @@ async function compilePreparedOneSDKApp(appRoot, preparedRoot, origin, moduleRoo
104977
105379
  const packagePath = import_node_path130.default.join(
104978
105380
  swiftCacheDir(),
104979
105381
  "peach-one-sdk-swift",
104980
- (0, import_node_crypto77.createHash)("sha256").update(import_node_fs128.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
105382
+ (0, import_node_crypto78.createHash)("sha256").update(import_node_fs128.default.realpathSync(appRoot)).digest("hex").slice(0, 16),
104981
105383
  "sdk"
104982
105384
  );
104983
105385
  const bindingFlags = optimize ? '["-suppress-warnings"]' : '["-suppress-warnings", "-Onone", "-no-whole-module-optimization"]';
@@ -105024,11 +105426,11 @@ async function buildOneSDKBundle(appRoot) {
105024
105426
  assets: await compiledModuleAssets(compiled.artifact)
105025
105427
  };
105026
105428
  }
105027
- var import_node_crypto77, import_node_fs128, import_node_path130, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
105429
+ var import_node_crypto78, import_node_fs128, import_node_path130, ONE_SDK_ROUTE, ONE_SDK_BINDING_SHARDS, ONE_SDK_BINDING_SHARD_MIN_BYTES, handleOneSDKRequest;
105028
105430
  var init_one_sdk_bundle = __esm({
105029
105431
  "src/one-sdk-bundle.ts"() {
105030
105432
  "use strict";
105031
- import_node_crypto77 = require("node:crypto");
105433
+ import_node_crypto78 = require("node:crypto");
105032
105434
  import_node_fs128 = __toESM(require("node:fs"), 1);
105033
105435
  import_node_path130 = __toESM(require("node:path"), 1);
105034
105436
  init_expo_native_workspace();
@@ -105072,13 +105474,13 @@ var init_expo_eager_seam_contract = __esm({
105072
105474
 
105073
105475
  // src/expo-native-compiler-digest.ts
105074
105476
  function expoNativeCompilerDigestValue() {
105075
- return true ? "9a5ff08be82d73a20a55678e521c09380974dc2204df641f1bd49dc8c06f1f83" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
105477
+ return true ? "a46618eade53d31c53a3c6377fc86635c03dbcfedd5e131d38b77d9fcc366623" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
105076
105478
  }
105077
- var import_node_crypto78;
105479
+ var import_node_crypto79;
105078
105480
  var init_expo_native_compiler_digest = __esm({
105079
105481
  "src/expo-native-compiler-digest.ts"() {
105080
105482
  "use strict";
105081
- import_node_crypto78 = require("node:crypto");
105483
+ import_node_crypto79 = require("node:crypto");
105082
105484
  init_react_native_core_digest();
105083
105485
  init_swift_compiler_digest();
105084
105486
  init_swift_standin_digest();
@@ -105087,7 +105489,7 @@ var init_expo_native_compiler_digest = __esm({
105087
105489
 
105088
105490
  // src/expo-discovery-cache.ts
105089
105491
  function peachPin() {
105090
- return (0, import_node_crypto79.createHash)("sha256").update(
105492
+ return (0, import_node_crypto80.createHash)("sha256").update(
105091
105493
  `${FORMAT}\0${expoNativeCompilerDigestValue()}\0${swiftNativePin().distribution.id}\0`
105092
105494
  ).update(JSON.stringify([...EXPO_EAGER_NATIVE_VIEWS])).update(JSON.stringify([...peachAnsweredNativePackages()].sort())).digest("hex");
105093
105495
  }
@@ -105101,7 +105503,7 @@ function stable(value) {
105101
105503
  }
105102
105504
  async function expoDiscoveryKey(options2) {
105103
105505
  const { root, hash } = await hashExpoWorkspace(options2.appRoot, options2.signal);
105104
- const key2 = (0, import_node_crypto79.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable(JSON.parse(options2.searchText))}\0`).update(`${stable(options2.configuration)}\0`).update(stable(JSON.parse(options2.resolveText))).digest("hex");
105506
+ const key2 = (0, import_node_crypto80.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable(JSON.parse(options2.searchText))}\0`).update(`${stable(options2.configuration)}\0`).update(stable(JSON.parse(options2.resolveText))).digest("hex");
105105
105507
  return { key: key2, root };
105106
105508
  }
105107
105509
  function expoDiscoveryCacheDir() {
@@ -105172,7 +105574,7 @@ function readExpoDiscovery(key2) {
105172
105574
  if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
105173
105575
  const archive = import_node_path131.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
105174
105576
  const bytes = import_node_fs129.default.readFileSync(archive);
105175
- if ((0, import_node_crypto79.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
105577
+ if ((0, import_node_crypto80.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
105176
105578
  return void 0;
105177
105579
  const bodies = (0, import_node_zlib8.zstdDecompressSync)(bytes);
105178
105580
  const decoded = /* @__PURE__ */ new Map();
@@ -105246,7 +105648,7 @@ function stampedFileHash(file) {
105246
105648
  const stamp = [stat.dev, stat.ino, stat.size, stat.mtimeNs, stat.ctimeNs].join(":");
105247
105649
  const cached2 = fileHashes.get(file);
105248
105650
  if (cached2?.stamp === stamp) return cached2.checksum;
105249
- const checksum = (0, import_node_crypto79.createHash)("sha256").update(import_node_fs129.default.readFileSync(file)).digest("hex");
105651
+ const checksum = (0, import_node_crypto80.createHash)("sha256").update(import_node_fs129.default.readFileSync(file)).digest("hex");
105250
105652
  fileHashes.set(file, { stamp, checksum });
105251
105653
  fileHashesChanged = true;
105252
105654
  return checksum;
@@ -105255,7 +105657,7 @@ function saveFileHashes() {
105255
105657
  if (!fileHashesChanged) return;
105256
105658
  fileHashesChanged = false;
105257
105659
  const target = fileHashesPath();
105258
- const temporary = `${target}.${process.pid}.${(0, import_node_crypto79.randomUUID)()}.tmp`;
105660
+ const temporary = `${target}.${process.pid}.${(0, import_node_crypto80.randomUUID)()}.tmp`;
105259
105661
  try {
105260
105662
  import_node_fs129.default.mkdirSync(import_node_path131.default.dirname(target), { recursive: true });
105261
105663
  import_node_fs129.default.writeFileSync(
@@ -105310,7 +105712,7 @@ function frameworkDigest(directory2, signal) {
105310
105712
  if (target !== root && !target.startsWith(`${root}${import_node_path131.default.sep}`))
105311
105713
  throw new Error(`framework link escapes its tree: ${relative4}`);
105312
105714
  }
105313
- return (0, import_node_crypto79.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
105715
+ return (0, import_node_crypto80.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
105314
105716
  }
105315
105717
  function rewritePreparedPaths(options2) {
105316
105718
  const { units, sourceRoot, preparedRoot, signal } = options2;
@@ -105331,7 +105733,7 @@ function rewritePreparedPaths(options2) {
105331
105733
  return null;
105332
105734
  }
105333
105735
  if (!preparedBytes.equals(sourceBytes)) return null;
105334
- dependencies[sourceFile] = (0, import_node_crypto79.createHash)("sha256").update(sourceBytes).digest("hex");
105736
+ dependencies[sourceFile] = (0, import_node_crypto80.createHash)("sha256").update(sourceBytes).digest("hex");
105335
105737
  verifiedFiles.set(preparedFile, sourceFile);
105336
105738
  return sourceFile;
105337
105739
  };
@@ -105408,7 +105810,7 @@ function rewritePreparedPaths(options2) {
105408
105810
  portableDir = import_node_path131.default.join(parent, import_node_path131.default.basename(dir));
105409
105811
  if (!import_node_fs129.default.existsSync(portableDir)) {
105410
105812
  import_node_fs129.default.mkdirSync(parent, { recursive: true });
105411
- const tmp = import_node_path131.default.join(parent, `.${process.pid}.${(0, import_node_crypto79.randomUUID)()}.tmp`);
105813
+ const tmp = import_node_path131.default.join(parent, `.${process.pid}.${(0, import_node_crypto80.randomUUID)()}.tmp`);
105412
105814
  try {
105413
105815
  import_node_fs129.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
105414
105816
  if (frameworkDigest(tmp, signal) !== preparedDigest)
@@ -105437,7 +105839,7 @@ function writeExpoDiscovery(options2) {
105437
105839
  try {
105438
105840
  const dir = expoDiscoveryCacheDir();
105439
105841
  import_node_fs129.default.mkdirSync(dir, { recursive: true });
105440
- const tmp = import_node_path131.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto79.randomUUID)()}.tmp`);
105842
+ const tmp = import_node_path131.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto80.randomUUID)()}.tmp`);
105441
105843
  if (options2.units === null) {
105442
105844
  import_node_fs129.default.writeFileSync(
105443
105845
  tmp,
@@ -105500,8 +105902,8 @@ function writeExpoDiscovery(options2) {
105500
105902
  }
105501
105903
  );
105502
105904
  const contents2 = (0, import_node_zlib8.zstdCompressSync)(Buffer.concat(chunks, size2));
105503
- const archive = (0, import_node_crypto79.createHash)("sha256").update(contents2).digest("hex");
105504
- const temporary = import_node_path131.default.join(blobDir, "." + (0, import_node_crypto79.randomUUID)() + ".tmp");
105905
+ const archive = (0, import_node_crypto80.createHash)("sha256").update(contents2).digest("hex");
105906
+ const temporary = import_node_path131.default.join(blobDir, "." + (0, import_node_crypto80.randomUUID)() + ".tmp");
105505
105907
  try {
105506
105908
  import_node_fs129.default.writeFileSync(temporary, contents2);
105507
105909
  import_node_fs129.default.renameSync(temporary, import_node_path131.default.join(blobDir, `${archive}.zst`));
@@ -105528,11 +105930,11 @@ function writeExpoDiscovery(options2) {
105528
105930
  return error instanceof Error ? error.message : String(error);
105529
105931
  }
105530
105932
  }
105531
- var import_node_crypto79, import_node_fs129, import_node_path131, import_node_zlib8, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings4, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
105933
+ var import_node_crypto80, import_node_fs129, import_node_path131, import_node_zlib8, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings4, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
105532
105934
  var init_expo_discovery_cache = __esm({
105533
105935
  "src/expo-discovery-cache.ts"() {
105534
105936
  "use strict";
105535
- import_node_crypto79 = require("node:crypto");
105937
+ import_node_crypto80 = require("node:crypto");
105536
105938
  import_node_fs129 = __toESM(require("node:fs"), 1);
105537
105939
  import_node_path131 = __toESM(require("node:path"), 1);
105538
105940
  import_node_zlib8 = require("node:zlib");
@@ -105736,7 +106138,7 @@ async function expoNativeInputs(appRoot) {
105736
106138
  "swift-pin": JSON.stringify(swiftNativePin()),
105737
106139
  answered: JSON.stringify([...peachAnsweredNativePackages()].sort()),
105738
106140
  "pods-environment": JSON.stringify(reactNativePodsEnvironment()),
105739
- fingerprint: (0, import_node_crypto80.createHash)("sha256").update(lines.sort().join("\n")).digest("hex")
106141
+ fingerprint: (0, import_node_crypto81.createHash)("sha256").update(lines.sort().join("\n")).digest("hex")
105740
106142
  },
105741
106143
  packages
105742
106144
  };
@@ -105842,7 +106244,7 @@ async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
105842
106244
  }
105843
106245
  function servedExpoSwift(appRoot, entry, app) {
105844
106246
  if (!entry.expoSwift) return null;
105845
- const rootId = `${(0, import_node_crypto80.createHash)("sha256").update(import_node_fs131.default.realpathSync(appRoot)).digest("hex")}/Expo`;
106247
+ const rootId = `${(0, import_node_crypto81.createHash)("sha256").update(import_node_fs131.default.realpathSync(appRoot)).digest("hex")}/Expo`;
105846
106248
  if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
105847
106249
  const installed = installedInfoPlist(app.infoPlist, entry.infoPlist);
105848
106250
  const infoPlist2 = Buffer.from(installed).toString("base64");
@@ -105870,11 +106272,11 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
105870
106272
  await prebuiltAppTarget(appRoot, signal, "installed")
105871
106273
  );
105872
106274
  }
105873
- var import_node_crypto80, import_node_fs131, import_node_module18, import_node_path133, import_node_util17, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published2, lookups, answers;
106275
+ var import_node_crypto81, import_node_fs131, import_node_module18, import_node_path133, import_node_util17, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published2, lookups, answers;
105874
106276
  var init_expo_native_prebuilt = __esm({
105875
106277
  "src/expo-native-prebuilt.ts"() {
105876
106278
  "use strict";
105877
- import_node_crypto80 = require("node:crypto");
106279
+ import_node_crypto81 = require("node:crypto");
105878
106280
  import_node_fs131 = __toESM(require("node:fs"), 1);
105879
106281
  import_node_module18 = require("node:module");
105880
106282
  import_node_path133 = __toESM(require("node:path"), 1);
@@ -106488,7 +106890,7 @@ function exportedNames(moduleRoot, name3) {
106488
106890
  const modules = import_node_path135.default.join(moduleRoot, "modules");
106489
106891
  const module2 = import_node_path135.default.join(modules, `${name3}.swiftmodule`);
106490
106892
  if (!import_node_fs133.default.existsSync(module2)) return /* @__PURE__ */ new Set();
106491
- const key2 = (0, import_node_crypto81.createHash)("sha256").update(import_node_fs133.default.readFileSync(module2)).digest("hex");
106893
+ const key2 = (0, import_node_crypto82.createHash)("sha256").update(import_node_fs133.default.readFileSync(module2)).digest("hex");
106492
106894
  const directory2 = import_node_path135.default.join(swiftCacheDir(), "swift-public-names");
106493
106895
  const receipt = import_node_path135.default.join(directory2, `${key2}.json`);
106494
106896
  if (import_node_fs133.default.existsSync(receipt)) {
@@ -106571,12 +106973,12 @@ function clangTypeOwnership(moduleRoot, module2) {
106571
106973
  }
106572
106974
  );
106573
106975
  }
106574
- var import_node_child_process64, import_node_crypto81, import_node_fs133, import_node_path135, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
106976
+ var import_node_child_process64, import_node_crypto82, import_node_fs133, import_node_path135, blockTypedef, enumTypedef, enumConstant, swiftPrivate;
106575
106977
  var init_swift_clang_type_ownership = __esm({
106576
106978
  "src/swift-clang-type-ownership.ts"() {
106577
106979
  "use strict";
106578
106980
  import_node_child_process64 = require("node:child_process");
106579
- import_node_crypto81 = require("node:crypto");
106981
+ import_node_crypto82 = require("node:crypto");
106580
106982
  import_node_fs133 = __toESM(require("node:fs"), 1);
106581
106983
  import_node_path135 = __toESM(require("node:path"), 1);
106582
106984
  init_is_record();
@@ -108219,7 +108621,7 @@ function targetSettings2(units) {
108219
108621
  }
108220
108622
  function oneSDKStamp(oneSDK) {
108221
108623
  if (!oneSDK) return "";
108222
- const hash = (0, import_node_crypto82.createHash)("sha256");
108624
+ const hash = (0, import_node_crypto83.createHash)("sha256");
108223
108625
  for (const files2 of [oneSDK.targets, oneSDK.entry])
108224
108626
  for (const [name3, source] of [...files2].sort(([a], [b]) => a.localeCompare(b)))
108225
108627
  hash.update(`${name3}\0${source}\0`);
@@ -108270,7 +108672,7 @@ ${bridgeModules.length ? "import React\n" : ""}${oneSDK ? "import One\nimport On
108270
108672
  `;
108271
108673
  }
108272
108674
  function expoSwiftPreparedKey(base2, units, reactProviderStamp) {
108273
- const hash = (0, import_node_crypto82.createHash)("sha256");
108675
+ const hash = (0, import_node_crypto83.createHash)("sha256");
108274
108676
  hash.update(base2);
108275
108677
  hash.update(reactProviderStamp);
108276
108678
  for (const unit2 of units) {
@@ -108644,8 +109046,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
108644
109046
  }
108645
109047
  return provider;
108646
109048
  })() : void 0;
108647
- const reactProviderStamp = reactProvider ? (0, import_node_crypto82.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
108648
- const key2 = (0, import_node_crypto82.createHash)("sha256").update(import_node_fs134.default.realpathSync(root)).digest("hex");
109049
+ const reactProviderStamp = reactProvider ? (0, import_node_crypto83.createHash)("sha256").update(JSON.stringify(reactProvider)).digest("hex") : "";
109050
+ const key2 = (0, import_node_crypto83.createHash)("sha256").update(import_node_fs134.default.realpathSync(root)).digest("hex");
108649
109051
  const unitContentStamp = (unit2) => sourceContentStamp(expoSwiftPackage(key2, unit2.moduleId), module2.root) + (unit2.reactNativeProvider ? `:${reactProviderStamp}` : "");
108650
109052
  const failures = /* @__PURE__ */ new Map();
108651
109053
  const failureRecords = /* @__PURE__ */ new Map();
@@ -108987,13 +109389,13 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
108987
109389
  throw failure2;
108988
109390
  }
108989
109391
  }
108990
- var import_node_async_hooks3, import_node_child_process65, import_node_crypto82, import_node_fs134, import_node_module20, import_node_os28, import_node_path136, import_node_url4, import_node_util18, run11, scriptEnv, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
109392
+ var import_node_async_hooks3, import_node_child_process65, import_node_crypto83, import_node_fs134, import_node_module20, import_node_os28, import_node_path136, import_node_url4, import_node_util18, run11, scriptEnv, EXPO_SWIFT_ENTRY, WITNESS_BATCH, traceStore, discoveryCache, preparedCache, savedFs, ignoredRoots, ownTemporaryRoots, EXPO_MODULE_SCAN_TIMEOUT_MS, preparedExpoSwift, openPreparations, ExpoSwiftLinkRefusal;
108991
109393
  var init_expo_swift_host = __esm({
108992
109394
  "src/expo-swift-host.ts"() {
108993
109395
  "use strict";
108994
109396
  import_node_async_hooks3 = require("node:async_hooks");
108995
109397
  import_node_child_process65 = require("node:child_process");
108996
- import_node_crypto82 = require("node:crypto");
109398
+ import_node_crypto83 = require("node:crypto");
108997
109399
  import_node_fs134 = __toESM(require("node:fs"), 1);
108998
109400
  import_node_module20 = require("node:module");
108999
109401
  import_node_os28 = __toESM(require("node:os"), 1);
@@ -109321,7 +109723,7 @@ async function resolveAndroidGradleSources(request) {
109321
109723
  const parent = import_node_path139.default.join(kotlinHome(), "gradle-sources");
109322
109724
  import_node_fs136.default.mkdirSync(parent, { recursive: true });
109323
109725
  const work = import_node_fs136.default.mkdtempSync(import_node_path139.default.join(parent, ".query-"));
109324
- const task = `peachAndroidSources${(0, import_node_crypto83.randomBytes)(8).toString("hex")}`;
109726
+ const task = `peachAndroidSources${(0, import_node_crypto84.randomBytes)(8).toString("hex")}`;
109325
109727
  const script = import_node_path139.default.join(work, "sources.gradle");
109326
109728
  const encoded = Buffer.from(
109327
109729
  JSON.stringify({
@@ -109473,12 +109875,12 @@ function readDependencySources(value) {
109473
109875
  };
109474
109876
  });
109475
109877
  }
109476
- var import_node_child_process66, import_node_crypto83, import_node_fs136, import_node_path139, import_node_util19, run12, modelQuery;
109878
+ var import_node_child_process66, import_node_crypto84, import_node_fs136, import_node_path139, import_node_util19, run12, modelQuery;
109477
109879
  var init_android_gradle_sources = __esm({
109478
109880
  "src/android-gradle-sources.ts"() {
109479
109881
  "use strict";
109480
109882
  import_node_child_process66 = require("node:child_process");
109481
- import_node_crypto83 = require("node:crypto");
109883
+ import_node_crypto84 = require("node:crypto");
109482
109884
  import_node_fs136 = __toESM(require("node:fs"), 1);
109483
109885
  import_node_path139 = __toESM(require("node:path"), 1);
109484
109886
  import_node_util19 = require("node:util");
@@ -109866,7 +110268,7 @@ var init_android_bridge_packages = __esm({
109866
110268
 
109867
110269
  // src/java-module-abi.ts
109868
110270
  async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
109869
- const digest3 = (0, import_node_crypto84.createHash)("sha256");
110271
+ const digest3 = (0, import_node_crypto85.createHash)("sha256");
109870
110272
  const parent = import_node_path141.default.join(kotlinHome(), "java-specs");
109871
110273
  import_node_fs138.default.mkdirSync(parent, { recursive: true });
109872
110274
  const work = import_node_fs138.default.mkdtempSync(import_node_path141.default.join(parent, ".read-"));
@@ -109963,12 +110365,12 @@ async function compileJavaModuleAbi(input) {
109963
110365
  );
109964
110366
  return library;
109965
110367
  }
109966
- var import_node_child_process67, import_node_crypto84, import_node_fs138, import_node_path141, import_node_util20, run13, JAVA_BINDINGS_INITIALIZER;
110368
+ var import_node_child_process67, import_node_crypto85, import_node_fs138, import_node_path141, import_node_util20, run13, JAVA_BINDINGS_INITIALIZER;
109967
110369
  var init_java_module_abi = __esm({
109968
110370
  "src/java-module-abi.ts"() {
109969
110371
  "use strict";
109970
110372
  import_node_child_process67 = require("node:child_process");
109971
- import_node_crypto84 = require("node:crypto");
110373
+ import_node_crypto85 = require("node:crypto");
109972
110374
  import_node_fs138 = __toESM(require("node:fs"), 1);
109973
110375
  import_node_path141 = __toESM(require("node:path"), 1);
109974
110376
  import_node_util20 = require("node:util");
@@ -110076,13 +110478,13 @@ function verifyKotlinSdkDirectory(root, compiler) {
110076
110478
  if (!stat.isFile() || stat.nlink !== 1)
110077
110479
  throw new Error(`Kotlin SDK binary is not a regular file: ${name3}`);
110078
110480
  const bytes = import_node_fs139.default.readFileSync(target);
110079
- if (bytes.length !== expected.bytes || (0, import_node_crypto85.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
110481
+ if (bytes.length !== expected.bytes || (0, import_node_crypto86.createHash)("sha256").update(bytes).digest("hex") !== expected.sha256)
110080
110482
  throw new Error(`Kotlin SDK binary differs from its manifest: ${name3}`);
110081
110483
  }
110082
110484
  return manifest;
110083
110485
  }
110084
110486
  async function installKotlinSdkArchive(archive, compiler) {
110085
- const sha2565 = (0, import_node_crypto85.createHash)("sha256").update(archive).digest("hex");
110487
+ const sha2565 = (0, import_node_crypto86.createHash)("sha256").update(archive).digest("hex");
110086
110488
  const parent = import_node_path142.default.join(kotlinHome(), "sdk");
110087
110489
  const root = import_node_path142.default.join(parent, sha2565);
110088
110490
  if (import_node_fs139.default.existsSync(root))
@@ -110111,12 +110513,12 @@ async function installKotlinSdkArchive(archive, compiler) {
110111
110513
  import_node_fs139.default.rmSync(work, { recursive: true, force: true });
110112
110514
  }
110113
110515
  }
110114
- var import_node_child_process68, import_node_crypto85, import_node_fs139, import_node_path142, import_node_util21, run14;
110516
+ var import_node_child_process68, import_node_crypto86, import_node_fs139, import_node_path142, import_node_util21, run14;
110115
110517
  var init_kotlin_sdk = __esm({
110116
110518
  "src/kotlin-sdk.ts"() {
110117
110519
  "use strict";
110118
110520
  import_node_child_process68 = require("node:child_process");
110119
- import_node_crypto85 = require("node:crypto");
110521
+ import_node_crypto86 = require("node:crypto");
110120
110522
  import_node_fs139 = __toESM(require("node:fs"), 1);
110121
110523
  import_node_path142 = __toESM(require("node:path"), 1);
110122
110524
  import_node_util21 = require("node:util");
@@ -110219,7 +110621,7 @@ function peachKotlinModuleRoot() {
110219
110621
  if (!IS_STANDALONE) return import_node_path144.default.join(peachsimPackageRoot(), "kotlin");
110220
110622
  if (installedRoot) return installedRoot;
110221
110623
  const files2 = JSON.parse(__PEACH_BUNDLED_KOTLIN__);
110222
- const digest3 = (0, import_node_crypto86.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
110624
+ const digest3 = (0, import_node_crypto87.createHash)("sha256").update(__PEACH_BUNDLED_KOTLIN__).digest("hex");
110223
110625
  const parent = import_node_path144.default.join(rnxHomeDir(), "kotlin", "modules");
110224
110626
  const root = import_node_path144.default.join(parent, digest3);
110225
110627
  import_node_fs141.default.mkdirSync(parent, { recursive: true });
@@ -110248,11 +110650,11 @@ function peachKotlinModuleRoot() {
110248
110650
  installedRoot = root;
110249
110651
  return root;
110250
110652
  }
110251
- var import_node_crypto86, import_node_fs141, import_node_path144, installedRoot;
110653
+ var import_node_crypto87, import_node_fs141, import_node_path144, installedRoot;
110252
110654
  var init_kotlin_module = __esm({
110253
110655
  "src/kotlin-module.ts"() {
110254
110656
  "use strict";
110255
- import_node_crypto86 = require("node:crypto");
110657
+ import_node_crypto87 = require("node:crypto");
110256
110658
  import_node_fs141 = __toESM(require("node:fs"), 1);
110257
110659
  import_node_path144 = __toESM(require("node:path"), 1);
110258
110660
  init_standalone();
@@ -110615,7 +111017,7 @@ function zipSources(bytes, where) {
110615
111017
  return entries2;
110616
111018
  }
110617
111019
  function extract(bytes, where) {
110618
- const key2 = (0, import_node_crypto87.createHash)("sha256").update(bytes).digest("hex");
111020
+ const key2 = (0, import_node_crypto88.createHash)("sha256").update(bytes).digest("hex");
110619
111021
  const cached2 = pending.get(key2);
110620
111022
  if (cached2) return cached2;
110621
111023
  const request = (async () => {
@@ -110664,11 +111066,11 @@ function readSourcesJar(archive, where) {
110664
111066
  function readMavenSourcesArchive(archive) {
110665
111067
  return extract(readSourcesJar(archive, archive), archive);
110666
111068
  }
110667
- var import_node_crypto87, import_node_fs143, import_node_os29, import_node_path146, import_node_zlib9, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
111069
+ var import_node_crypto88, import_node_fs143, import_node_os29, import_node_path146, import_node_zlib9, pending, MAX_SOURCES_JAR_BYTES, MAX_SOURCE_ENTRY_BYTES, MAX_TOTAL_EXTRACTED_BYTES;
110668
111070
  var init_kotlin_maven_sources = __esm({
110669
111071
  "src/kotlin-maven-sources.ts"() {
110670
111072
  "use strict";
110671
- import_node_crypto87 = require("node:crypto");
111073
+ import_node_crypto88 = require("node:crypto");
110672
111074
  import_node_fs143 = __toESM(require("node:fs"), 1);
110673
111075
  import_node_os29 = __toESM(require("node:os"), 1);
110674
111076
  import_node_path146 = __toESM(require("node:path"), 1);
@@ -110709,7 +111111,7 @@ async function compileKotlinGradleLibraries(input) {
110709
111111
  ])
110710
111112
  ];
110711
111113
  const name3 = library.coordinate.replace(/[^a-zA-Z0-9._-]/g, "-");
110712
- const suffix = (0, import_node_crypto88.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
111114
+ const suffix = (0, import_node_crypto89.createHash)("sha256").update(library.coordinate).digest("hex").slice(0, 12);
110713
111115
  const klib = import_node_path147.default.join(input.output, `${name3}-${suffix}.klib`);
110714
111116
  const kotlinJvmAbi = java.length && kotlin.length && library.jars.length === 1 ? library.jars[0] : void 0;
110715
111117
  const abiPairs = java.length ? dependencies.flatMap(
@@ -110751,11 +111153,11 @@ async function compileKotlinGradleLibraries(input) {
110751
111153
  }
110752
111154
  return [...compiled.values()].map(({ klib }) => klib);
110753
111155
  }
110754
- var import_node_crypto88, import_node_fs144, import_node_path147;
111156
+ var import_node_crypto89, import_node_fs144, import_node_path147;
110755
111157
  var init_kotlin_gradle_library_plan = __esm({
110756
111158
  "src/kotlin-gradle-library-plan.ts"() {
110757
111159
  "use strict";
110758
- import_node_crypto88 = require("node:crypto");
111160
+ import_node_crypto89 = require("node:crypto");
110759
111161
  import_node_fs144 = __toESM(require("node:fs"), 1);
110760
111162
  import_node_path147 = __toESM(require("node:path"), 1);
110761
111163
  init_kotlin_library_sources();
@@ -111212,7 +111614,7 @@ function readExpoTypes(output) {
111212
111614
  });
111213
111615
  }
111214
111616
  async function scanSources(tool, parse16, toolchain, moduleRoot, files2) {
111215
- const digest3 = (0, import_node_crypto89.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
111617
+ const digest3 = (0, import_node_crypto90.createHash)("sha256").update(JSON.stringify(toolchain.compiler));
111216
111618
  const sdk2 = await loadKotlinSdk(moduleRoot, toolchain);
111217
111619
  digest3.update(import_node_fs145.default.readFileSync(import_node_path148.default.join(moduleRoot, "sdk.tar.gz")));
111218
111620
  digest3.update(tool);
@@ -111874,7 +112276,7 @@ async function compileKotlin(input, origin) {
111874
112276
  bytes: import_node_fs145.default.readFileSync(file)
111875
112277
  }));
111876
112278
  const { composeArchive, ...compilerInputs } = toolchain;
111877
- const digest3 = (0, import_node_crypto89.createHash)("sha256");
112279
+ const digest3 = (0, import_node_crypto90.createHash)("sha256");
111878
112280
  digest3.update(
111879
112281
  JSON.stringify({
111880
112282
  format: BUILD_FORMAT,
@@ -111896,7 +112298,7 @@ async function compileKotlin(input, origin) {
111896
112298
  ...gradleLibraries.libraries.flatMap(({ archive, jars }) => [archive, ...jars])
111897
112299
  ]);
111898
112300
  for (const file of files2) {
111899
- digest3.update((0, import_node_crypto89.createHash)("sha256").update(import_node_fs145.default.readFileSync(file)).digest());
112301
+ digest3.update((0, import_node_crypto90.createHash)("sha256").update(import_node_fs145.default.readFileSync(file)).digest());
111900
112302
  }
111901
112303
  }
111902
112304
  if (viewModels) digest3.update(viewModels.toolClass);
@@ -112188,12 +112590,12 @@ async function serveKotlinRequest(pathname, res, app) {
112188
112590
  }
112189
112591
  return true;
112190
112592
  }
112191
- var import_node_child_process70, import_node_crypto89, import_node_fs145, import_node_module23, import_node_path148, import_node_util22, run15, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
112593
+ var import_node_child_process70, import_node_crypto90, import_node_fs145, import_node_module23, import_node_path148, import_node_util22, run15, KOTLIN_ARTIFACT_PREFIX, SKIP_DIRS, configureDeviceSource, BUILD_FORMAT, builds, toolScans, BRIDGE_PARAMETERS, BRIDGE_CASTS, BRIDGE_RETURNS, bridgeType, JAVA_CLASSES, argb, escapes2, literal2, CONTENT_TYPES;
112192
112594
  var init_kotlin_host = __esm({
112193
112595
  "src/kotlin-host.ts"() {
112194
112596
  "use strict";
112195
112597
  import_node_child_process70 = require("node:child_process");
112196
- import_node_crypto89 = require("node:crypto");
112598
+ import_node_crypto90 = require("node:crypto");
112197
112599
  import_node_fs145 = __toESM(require("node:fs"), 1);
112198
112600
  import_node_module23 = require("node:module");
112199
112601
  import_node_path148 = __toESM(require("node:path"), 1);
@@ -113023,7 +113425,7 @@ __export(bundle_channel_exports, {
113023
113425
  snapshotOneProductionBundle: () => snapshotOneProductionBundle
113024
113426
  });
113025
113427
  module.exports = __toCommonJS(bundle_channel_exports);
113026
- var import_node_crypto91 = require("node:crypto");
113428
+ var import_node_crypto92 = require("node:crypto");
113027
113429
  var import_node_fs152 = require("node:fs");
113028
113430
  var import_node_path156 = require("node:path");
113029
113431
  var import_node_vm = require("node:vm");
@@ -113199,7 +113601,7 @@ init_expo_native_workspace();
113199
113601
 
113200
113602
  // src/host/staged-host-files.ts
113201
113603
  var import_node_async_hooks4 = require("node:async_hooks");
113202
- var import_node_crypto90 = require("node:crypto");
113604
+ var import_node_crypto91 = require("node:crypto");
113203
113605
  var import_node_fs147 = __toESM(require("node:fs"), 1);
113204
113606
  var import_node_path150 = __toESM(require("node:path"), 1);
113205
113607
 
@@ -113294,10 +113696,10 @@ function stageHostBytes(bytes, origin, extension = "") {
113294
113696
  }
113295
113697
  async function stageHostDerivedBytes(input, producer, origin, extension, derive) {
113296
113698
  const directory2 = prepareStagedDirectory();
113297
- const inputDigest = (0, import_node_crypto90.createHash)("sha256").update(input).digest("hex");
113699
+ const inputDigest = (0, import_node_crypto91.createHash)("sha256").update(input).digest("hex");
113298
113700
  const index = import_node_path150.default.join(
113299
113701
  directory2,
113300
- `derived-${(0, import_node_crypto90.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
113702
+ `derived-${(0, import_node_crypto91.createHash)("sha256").update(`${producer}\0${inputDigest}`).digest("hex")}`
113301
113703
  );
113302
113704
  const recorded = import_node_fs147.default.existsSync(index) ? import_node_fs147.default.readFileSync(index, "utf8") : "";
113303
113705
  if (STAGED_NAME.test(recorded) && import_node_fs147.default.existsSync(import_node_path150.default.join(directory2, recorded))) {
@@ -113308,7 +113710,7 @@ async function stageHostDerivedBytes(input, producer, origin, extension, derive)
113308
113710
  return new URL(STAGED_PREFIX + recorded, origin).toString();
113309
113711
  }
113310
113712
  const staged = writeStagedBytes(await derive(), origin, extension, directory2);
113311
- const temporary = import_node_path150.default.join(directory2, (0, import_node_crypto90.randomUUID)());
113713
+ const temporary = import_node_path150.default.join(directory2, (0, import_node_crypto91.randomUUID)());
113312
113714
  try {
113313
113715
  import_node_fs147.default.writeFileSync(temporary, new URL(staged).pathname.slice(STAGED_PREFIX.length), {
113314
113716
  flag: "wx"
@@ -113333,7 +113735,7 @@ function prepareStagedDirectory() {
113333
113735
  return directory2;
113334
113736
  }
113335
113737
  function writeStagedBytes(bytes, origin, extension, directory2) {
113336
- const digest3 = (0, import_node_crypto90.createHash)("sha256").update(bytes).digest("hex");
113738
+ const digest3 = (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex");
113337
113739
  extension = extension.toLowerCase();
113338
113740
  const name3 = STAGED_NAME.test(digest3 + extension) ? digest3 + extension : digest3;
113339
113741
  stagedCapture.getStore()?.add(name3);
@@ -113342,7 +113744,7 @@ function writeStagedBytes(bytes, origin, extension, directory2) {
113342
113744
  if (import_node_fs147.default.existsSync(destination)) {
113343
113745
  import_node_fs147.default.utimesSync(destination, new Date(now), new Date(now));
113344
113746
  } else {
113345
- const temporary = import_node_path150.default.join(directory2, (0, import_node_crypto90.randomUUID)());
113747
+ const temporary = import_node_path150.default.join(directory2, (0, import_node_crypto91.randomUUID)());
113346
113748
  try {
113347
113749
  import_node_fs147.default.writeFileSync(temporary, bytes, { flag: "wx" });
113348
113750
  import_node_fs147.default.renameSync(temporary, destination);
@@ -113639,7 +114041,7 @@ async function discoverProjectOneNativeAppCatalog(projectRoot, assetOrigin) {
113639
114041
  }
113640
114042
 
113641
114043
  // src/bundle-channel.mjs
113642
- var digest2 = (bytes) => (0, import_node_crypto91.createHash)("sha256").update(bytes).digest("hex");
114044
+ var digest2 = (bytes) => (0, import_node_crypto92.createHash)("sha256").update(bytes).digest("hex");
113643
114045
  var segment2 = /^[a-zA-Z0-9._-]+$/;
113644
114046
  function packagedAssetDirectory(location) {
113645
114047
  const parsed2 = new URL(location, "https://packaged.invalid");
@@ -113745,7 +114147,7 @@ async function prepareChannel({
113745
114147
  files2.set(asset.path, asset.bytes);
113746
114148
  }
113747
114149
  }
113748
- const identity2 = (0, import_node_crypto91.createHash)("sha256").update(bundle).update(icon);
114150
+ const identity2 = (0, import_node_crypto92.createHash)("sha256").update(bundle).update(icon);
113749
114151
  for (const [path143, bytes] of [...files2].sort(
113750
114152
  ([a], [b]) => a < b ? -1 : a > b ? 1 : 0
113751
114153
  )) {
@@ -114068,7 +114470,7 @@ async function snapshotOneProductionBundle(projectRoot, entryFile, env = {}, { r
114068
114470
  return { platforms: snapshots };
114069
114471
  }
114070
114472
  async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable = process.execPath, platforms: platforms2 = ["ios", "android"] } = {}) {
114071
- const { spawn: spawn14 } = await import("node:child_process");
114473
+ const { spawn: spawn15 } = await import("node:child_process");
114072
114474
  const { createServer: createServer2 } = await import("node:net");
114073
114475
  const { createRequire: createRequire24 } = await import("node:module");
114074
114476
  const onePackage = createRequire24((0, import_node_path156.join)(projectRoot, "package.json")).resolve(
@@ -114084,7 +114486,7 @@ async function snapshotOneDevBundle(projectRoot, env = {}, { runtimeExecutable =
114084
114486
  server.close(() => resolve4(port2));
114085
114487
  }).on("error", reject);
114086
114488
  });
114087
- const child = spawn14(runtimeExecutable, [oneBin, "dev", "--port", String(port)], {
114489
+ const child = spawn15(runtimeExecutable, [oneBin, "dev", "--port", String(port)], {
114088
114490
  cwd: projectRoot,
114089
114491
  env: { ...process.env, ...env, CI: "1", PEACH_NO_OPEN: "1" },
114090
114492
  stdio: ["ignore", "inherit", "inherit"],