peachsim 0.1.2587 → 0.1.2589

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 (130) 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 +63 -47
  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-YIT53CUW.mjs → acorn-6FUOY6FX.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-W7KT52XE.mjs → chunk-33SCXU3Y.mjs} +1 -1
  28. package/dist-lib/esm-chunks/{chunk-PDSHFDO2.mjs → chunk-3VNUC4DT.mjs} +1 -1
  29. package/dist-lib/esm-chunks/{chunk-MKUJNT6M.mjs → chunk-464CBA5U.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-7UTPX7DP.mjs → chunk-47K4QPVA.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-Q7MIJAYP.mjs → chunk-57FFWABF.mjs} +5 -5
  32. package/dist-lib/esm-chunks/{chunk-TOK4D3JW.mjs → chunk-5EFD2VBY.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-WQB3O2KB.mjs → chunk-5QWQDXXD.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-YQETPIM2.mjs → chunk-BSAAJR25.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-TI62KNSX.mjs → chunk-CRIYVOMB.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-WIS3FIS4.mjs → chunk-EAIFG4MQ.mjs} +3 -3
  37. package/dist-lib/esm-chunks/{chunk-VZ2SRV3L.mjs → chunk-FMWEI6OI.mjs} +4 -4
  38. package/dist-lib/esm-chunks/{chunk-EINVPQJH.mjs → chunk-FQQ2DMXS.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-QRBN2H6X.mjs → chunk-I22LAVD5.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-LBJDNPVZ.mjs → chunk-JLOJZF2Y.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-33X4F77A.mjs → chunk-KFHCRS5K.mjs} +2 -2
  42. package/dist-lib/esm-chunks/{chunk-MHQ3V3HA.mjs → chunk-L3OSVIGA.mjs} +65 -55
  43. package/dist-lib/esm-chunks/{chunk-KIM7TUG6.mjs → chunk-M4KUWGU3.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-SES3L2SB.mjs → chunk-MKSOJCRT.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-MCQPJCCL.mjs → chunk-PUBH3EXI.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-BZY37WHL.mjs → chunk-WQ73RKJY.mjs} +5 -5
  47. package/dist-lib/esm-chunks/{chunk-DS7BSRKS.mjs → chunk-XTKKROVU.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-HH6E35Z7.mjs → chunk-Y4PV4HZB.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{metro-layout-parser-IGRR2DCH.mjs → metro-layout-parser-T5QIJTEV.mjs} +3 -3
  50. package/dist-lib/esm-chunks/{swift-package-prebuilt-B2NMSGIS.mjs → swift-package-prebuilt-AWTZHPDM.mjs} +10 -10
  51. package/dist-lib/esm-chunks/{swift-sdk-app-module-FYORV7GD.mjs → swift-sdk-app-module-MGTJTVKU.mjs} +14 -14
  52. package/dist-lib/esm-chunks/{swift-sdk-image-BQ4UZV7O.mjs → swift-sdk-image-JABGF3ZR.mjs} +14 -14
  53. package/dist-lib/esm-chunks/{swift-sdk-image-producer-ESIHEVXH.mjs → swift-sdk-image-producer-RJRJ3EFU.mjs} +4 -4
  54. package/dist-lib/expo-swift-bundle.cjs +62 -46
  55. package/dist-lib/expo-swift-metadata.cjs +1 -1
  56. package/dist-lib/expo-swift-metadata.mjs +7 -7
  57. package/dist-lib/home-paths.cjs +1 -1
  58. package/dist-lib/host/bridge-host.cjs +233 -130
  59. package/dist-lib/host/fetch-proxy-handler.cjs +12 -4
  60. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  61. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  62. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  63. package/dist-lib/host/websocket-proxy.cjs +1 -1
  64. package/dist-lib/index.cjs +1 -1
  65. package/dist-lib/kotlin-host.cjs +1 -1
  66. package/dist-lib/menu.cjs +1 -1
  67. package/dist-lib/menu.mjs +3 -3
  68. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  69. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  70. package/dist-lib/metro-production-bundle.cjs +1 -1
  71. package/dist-lib/metro-production-bundle.mjs +4 -4
  72. package/dist-lib/native-app-identity-project.cjs +10 -2
  73. package/dist-lib/native-app-identity-project.mjs +16 -16
  74. package/dist-lib/native-app-identity.cjs +1 -1
  75. package/dist-lib/native-app-identity.mjs +6 -6
  76. package/dist-lib/native-firebase-metadata.cjs +1 -1
  77. package/dist-lib/native-firebase-metadata.mjs +3 -3
  78. package/dist-lib/pdfium-raster.cjs +1 -1
  79. package/dist-lib/pdfium-raster.mjs +2 -2
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +3 -3
  82. package/dist-lib/profiles.cjs +1 -1
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +82 -81
  85. package/dist-lib/public-origins-lib.json +76 -69
  86. package/dist-lib/react-native-host-modules.cjs +1 -1
  87. package/dist-lib/react-native-host-modules.mjs +2 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +1 -1
  91. package/dist-lib/sdk.mjs +8 -8
  92. package/dist-lib/skills.cjs +241 -132
  93. package/dist-lib/swift-compile.cjs +60 -44
  94. package/dist-lib/swift-compile.mjs +10 -10
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +3 -3
  97. package/dist-lib/swift-submit.cjs +1 -1
  98. package/dist-lib/swift-submit.mjs +6 -6
  99. package/dist-lib/swift-svg-raster.cjs +1 -1
  100. package/dist-lib/swift-svg-raster.mjs +2 -2
  101. package/dist-lib/swift-toolchain.cjs +1 -1
  102. package/dist-lib/swift.cjs +1 -1
  103. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  104. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  105. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  106. package/dist-lib/vendor/@xmldom/xmldom.cjs +1 -1
  107. package/dist-lib/vendor/acorn.cjs +1 -1
  108. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  109. package/dist-lib/vendor/ignore.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/plist.cjs +1 -1
  112. package/dist-lib/vendor/smol-toml.cjs +1 -1
  113. package/dist-lib/vendor/stream-json.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  117. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  118. package/dist-lib/vendor/sucrase.cjs +1 -1
  119. package/dist-lib/vendor/terser.cjs +1 -1
  120. package/dist-lib/vendor/valibot.cjs +1 -1
  121. package/dist-lib/vendor/ws.cjs +1 -1
  122. package/dist-lib/vendor/zod.cjs +1 -1
  123. package/dist-lib/worklet-executable.cjs +1 -1
  124. package/dist-lib/worklet-executable.mjs +3 -3
  125. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +1 -1
  126. package/package.json +1 -1
  127. package/src/one-native-controls-package.ts +125 -81
  128. package/src/swift-compile.ts +2 -44
  129. package/src/swift-shared-sdk.ts +8 -4
  130. package/src/swift-source-closure.ts +59 -0
package/dist-lib/sdk.mjs CHANGED
@@ -1,26 +1,26 @@
1
- /*! peach v0.1.2587 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2589 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  SEMANTIC_WAIT_MAX_TIMEOUT_MS,
4
4
  parseDiagnosticsResult
5
- } from "./esm-chunks/chunk-WIS3FIS4.mjs";
5
+ } from "./esm-chunks/chunk-EAIFG4MQ.mjs";
6
6
  import {
7
7
  LAUNCH_METADATA_KEYS,
8
8
  LAUNCH_METADATA_QUERY_PARAM
9
- } from "./esm-chunks/chunk-HH6E35Z7.mjs";
10
- import "./esm-chunks/chunk-PDSHFDO2.mjs";
9
+ } from "./esm-chunks/chunk-Y4PV4HZB.mjs";
10
+ import "./esm-chunks/chunk-3VNUC4DT.mjs";
11
11
  import {
12
12
  HEADLESS_TENANT_FETCH_HUNG_MARKER,
13
13
  readyProbeContentBasis,
14
14
  readyProbeHasContent,
15
15
  readyProbeIsReady
16
- } from "./esm-chunks/chunk-MCQPJCCL.mjs";
16
+ } from "./esm-chunks/chunk-PUBH3EXI.mjs";
17
17
  import {
18
18
  sleep
19
- } from "./esm-chunks/chunk-YQETPIM2.mjs";
20
- import "./esm-chunks/chunk-SES3L2SB.mjs";
19
+ } from "./esm-chunks/chunk-BSAAJR25.mjs";
20
+ import "./esm-chunks/chunk-MKSOJCRT.mjs";
21
21
  import {
22
22
  __publicField
23
- } from "./esm-chunks/chunk-W7KT52XE.mjs";
23
+ } from "./esm-chunks/chunk-33SCXU3Y.mjs";
24
24
 
25
25
  // cli/commands/inspect/core.ts
26
26
  var MAX_MS_FLAG_ALIASES = ["--max-ms", "--maxMs", "--maxms", "--max_ms", "--timeout"];
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2587 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2589 | (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;
@@ -35538,13 +35538,13 @@ var init_swift_standin_digest = __esm({
35538
35538
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
35539
35539
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
35540
35540
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
35541
- STANDIN_SOURCE_DIGEST = true ? "f9c7192135f0d9ee6cc78cbd2401aa19d73d0b5e5e6b3138b21fcbc7c062213f" : standinSourceDigest();
35541
+ STANDIN_SOURCE_DIGEST = true ? "b4ec01293af51e43890fb5aa52c9dc6d240c73b8fe722cdaff952457b08d94ff" : standinSourceDigest();
35542
35542
  }
35543
35543
  });
35544
35544
 
35545
35545
  // src/expo-native-compiler-digest.ts
35546
35546
  function expoNativeCompilerDigestValue() {
35547
- return true ? "af47be4907da44ab4fd386094b725e7b59e01c2cd6598d604074664c01c5f649" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35547
+ return true ? "bc9bf63858735336bd46e9b34db5ced39d682f7200bbbc3eafbf5470dae0018f" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
35548
35548
  }
35549
35549
  var import_node_crypto12;
35550
35550
  var init_expo_native_compiler_digest = __esm({
@@ -57252,6 +57252,7 @@ function stageOverlaySlot(realRoot, stagingRoot, relPath) {
57252
57252
  const segment2 = segments[i];
57253
57253
  for (const entry of (0, import_node_fs53.readdirSync)(real)) {
57254
57254
  if (entry === segment2 || i === 0 && entry === SWIFT_CACHE_HOLD_MARKER) continue;
57255
+ if (mirror === stagingRoot && entry === "configuration") continue;
57255
57256
  const dest = import_node_path51.default.join(mirror, entry);
57256
57257
  if (!import_node_fs53.default.lstatSync(dest, { throwIfNoEntry: false })) {
57257
57258
  import_node_fs53.default.symlinkSync(import_node_path51.default.join(real, entry), dest);
@@ -57286,7 +57287,7 @@ function swiftSharedSdkViewOptions(moduleRoot, distribution, toolchainBin, sdk2)
57286
57287
  const stdint = import_node_path51.default.join(overlay, "include/stdint.h");
57287
57288
  const key2 = JSON.stringify([
57288
57289
  // bump the recipe when the transformation changes; bundling changes function text.
57289
- "v38",
57290
+ "v39",
57290
57291
  [...WEAKEN_FOUNDATION_SYMS],
57291
57292
  toolchainBin,
57292
57293
  sdk2,
@@ -74252,6 +74253,60 @@ var init_swift_reproducible = __esm({
74252
74253
  }
74253
74254
  });
74254
74255
 
74256
+ // src/swift-source-closure.ts
74257
+ function collectSwiftSourceClosure(files2, roots, swiftCodeMask2, extensionMembersOnly) {
74258
+ const sources = /* @__PURE__ */ new Map();
74259
+ const owners = /* @__PURE__ */ new Map();
74260
+ for (const [file, source] of Object.entries(files2)) {
74261
+ if (!file.endsWith(".swift")) continue;
74262
+ const code = swiftCodeMask2(source);
74263
+ const references = new Set(code.match(/[A-Za-z_]\w*/g) ?? []);
74264
+ const pattern = /[{}]|\b(class|struct|enum|protocol|actor|typealias|func|var|let|extension)\s+([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)|\b(?:init|subscript)(?=\s*[?(])/g;
74265
+ let depth = 0;
74266
+ let memberExtension;
74267
+ for (const match of code.matchAll(pattern)) {
74268
+ if (match[0] === "{") {
74269
+ depth++;
74270
+ continue;
74271
+ }
74272
+ if (match[0] === "}") {
74273
+ if (--depth === 0) memberExtension = void 0;
74274
+ continue;
74275
+ }
74276
+ if (depth !== 0 && !(depth === 1 && memberExtension)) continue;
74277
+ const name3 = match[2]?.split(".").pop() ?? memberExtension;
74278
+ if (!name3) continue;
74279
+ if (match[1] === "extension" && extensionMembersOnly?.has(name3) && /^\s*\{/.test(code.slice(match.index + match[0].length))) {
74280
+ memberExtension = name3;
74281
+ continue;
74282
+ }
74283
+ const set2 = owners.get(name3) ?? /* @__PURE__ */ new Set();
74284
+ set2.add(file);
74285
+ owners.set(name3, set2);
74286
+ }
74287
+ sources.set(file, references);
74288
+ }
74289
+ const included = /* @__PURE__ */ new Set();
74290
+ const pending2 = [...roots];
74291
+ const seen = /* @__PURE__ */ new Set();
74292
+ while (pending2.length) {
74293
+ const name3 = pending2.pop();
74294
+ if (seen.has(name3)) continue;
74295
+ seen.add(name3);
74296
+ for (const file of owners.get(name3) ?? []) {
74297
+ if (included.has(file)) continue;
74298
+ included.add(file);
74299
+ for (const reference of sources.get(file)) pending2.push(reference);
74300
+ }
74301
+ }
74302
+ return Object.fromEntries(Object.entries(files2).filter(([file]) => included.has(file)));
74303
+ }
74304
+ var init_swift_source_closure = __esm({
74305
+ "src/swift-source-closure.ts"() {
74306
+ "use strict";
74307
+ }
74308
+ });
74309
+
74255
74310
  // src/swift-uniform-type-constants.ts
74256
74311
  function compileUniformTypeConstants(args) {
74257
74312
  const source = import_node_path77.default.join(args.packageRoot, "runtime/UniformTypeIdentifiersConstants.m");
@@ -76591,47 +76646,7 @@ function swiftSourceAsIOS(source, overlayFrameworks, swiftPackage, arm64 = true)
76591
76646
  return lowerAVAssetURLCluster(out + conditioned.slice(copied));
76592
76647
  }
76593
76648
  function swiftSourceClosure(files2, roots) {
76594
- const sources = /* @__PURE__ */ new Map();
76595
- const owners = /* @__PURE__ */ new Map();
76596
- const extensions = /* @__PURE__ */ new Map();
76597
- for (const [file, source] of Object.entries(files2)) {
76598
- if (!file.endsWith(".swift")) continue;
76599
- const code = swiftCodeMask(source);
76600
- const references = new Set(code.match(/[A-Za-z_]\w*/g) ?? []);
76601
- const pattern = /[{}]|\b(class|struct|enum|protocol|actor|typealias|func|var|let|extension)\s+([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)/g;
76602
- let depth = 0;
76603
- for (const match of code.matchAll(pattern)) {
76604
- if (match[0] === "{") {
76605
- depth++;
76606
- continue;
76607
- }
76608
- if (match[0] === "}") {
76609
- depth--;
76610
- continue;
76611
- }
76612
- if (depth !== 0 || !match[2]) continue;
76613
- const name3 = match[2].split(".").pop();
76614
- const index = match[1] === "extension" ? extensions : owners;
76615
- const set2 = index.get(name3) ?? /* @__PURE__ */ new Set();
76616
- set2.add(file);
76617
- index.set(name3, set2);
76618
- }
76619
- sources.set(file, references);
76620
- }
76621
- const included = /* @__PURE__ */ new Set();
76622
- const pending2 = [...roots];
76623
- const seen = /* @__PURE__ */ new Set();
76624
- while (pending2.length) {
76625
- const name3 = pending2.pop();
76626
- if (seen.has(name3)) continue;
76627
- seen.add(name3);
76628
- for (const file of [...owners.get(name3) ?? [], ...extensions.get(name3) ?? []]) {
76629
- if (included.has(file)) continue;
76630
- included.add(file);
76631
- for (const reference of sources.get(file)) pending2.push(reference);
76632
- }
76633
- }
76634
- return Object.fromEntries(Object.entries(files2).filter(([file]) => included.has(file)));
76649
+ return collectSwiftSourceClosure(files2, roots, swiftCodeMask);
76635
76650
  }
76636
76651
  function swiftApplicationEntry(file, source) {
76637
76652
  const code = [...swiftConditionalLines(swiftCodeMask(source))].map(({ line, active }) => active === false ? " ".repeat(line.length) : line).join("\n");
@@ -80527,6 +80542,7 @@ var init_swift_compile = __esm({
80527
80542
  init_swift_root_lock();
80528
80543
  init_swift_sdk_image_wasm();
80529
80544
  init_swift_shared_sdk();
80545
+ init_swift_source_closure();
80530
80546
  init_swift_toolchain();
80531
80547
  init_swift_uniform_type_constants();
80532
80548
  init_swift_wasm_prune();
@@ -80734,7 +80750,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
80734
80750
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
80735
80751
  MULTI_MANIFEST_VERSION = 76;
80736
80752
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
80737
- compilerSourceDigest = true ? "7f07c5d38c4336ee78ed7a604ccc745b3c5a397079c26a81cbfd9c54e4573829" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
80753
+ compilerSourceDigest = true ? "80c152de0e5f41327f3fe7c71ce7df4cd206c0ba2bb0373f71654a0661829c6e" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
80738
80754
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
80739
80755
  MODULE_MAP_RESPONSE_FILE_RUN = 16;
80740
80756
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
@@ -137818,6 +137834,23 @@ function configuration(name3, source) {
137818
137834
  if (!update) throw new Error(`${name3}: no updateProps`);
137819
137835
  return { viewClass, guard, update };
137820
137836
  }
137837
+ function arrayBindings(name3, body) {
137838
+ const bindings = /* @__PURE__ */ new Map();
137839
+ for (const [, prop, element] of body.matchAll(
137840
+ /for \(const auto &item : next\.(\w+)\) \[\w+ addObject:(.*?)\];/g
137841
+ )) {
137842
+ if (element === "RCTNSStringFromString(item)") {
137843
+ bindings.set(prop, []);
137844
+ continue;
137845
+ }
137846
+ const fields = [
137847
+ ...element.matchAll(/@"(\w+)" ?: (RCTNSStringFromString|@)\(item\.\w+\)/g)
137848
+ ].map(([, name4, kind]) => ({ name: name4, defaultValue: kind === "@" ? 0 : "" }));
137849
+ if (!fields.length) throw new Error(`${name3}: unmapped array ${prop}`);
137850
+ bindings.set(prop, fields);
137851
+ }
137852
+ return bindings;
137853
+ }
137821
137854
  function componentViews(one, selected) {
137822
137855
  const schema4 = JSON.parse((0, import_node_fs150.readFileSync)((0, import_node_path151.join)(one, "schema.json"), "utf8"));
137823
137856
  const folders = [(0, import_node_path151.join)(one, "ios/Generated"), (0, import_node_path151.join)(one, "ios")];
@@ -137834,17 +137867,24 @@ function componentViews(one, selected) {
137834
137867
  return [{ name: name3, props, commands, source, file: (0, import_node_path151.join)(folder, file) }];
137835
137868
  });
137836
137869
  }
137837
- function swiftGuestControls(one, names) {
137870
+ function swiftGuestControls(one, names, linkedGroups) {
137838
137871
  const watched = [(0, import_node_path151.join)(one, "schema.json")];
137872
+ const defines = /* @__PURE__ */ new Set();
137839
137873
  const views = componentViews(one, names);
137840
- const entries2 = views.map(({ name: name3, props, source, file }) => {
137841
- const { viewClass, update } = configuration(name3, source);
137874
+ const groupDefines = linkedGroups && new Set(linkedGroups.map((group) => `ONE_GROUP_${group.toUpperCase()}`));
137875
+ const entries2 = views.flatMap(({ name: name3, props, source, file }) => {
137876
+ const { viewClass, guard, update } = configuration(name3, source);
137877
+ if (guard) {
137878
+ if (groupDefines && !groupDefines.has(guard)) return [];
137879
+ defines.add(guard);
137880
+ }
137881
+ const arrays = arrayBindings(name3, update);
137842
137882
  const swift = (0, import_node_path151.join)((0, import_node_path151.dirname)(file), viewClass + ".swift");
137843
137883
  const declaration = (0, import_node_fs150.readFileSync)(swift, "utf8");
137844
137884
  watched.push(file, swift);
137845
137885
  const initializer = /public (?:override )?init\(\)/.test(declaration) ? "()" : "(frame: .zero)";
137846
137886
  const lines = [
137847
- ` "${name3}": { existing, spec, style, emit in`,
137887
+ ` "${name3}": { existing, spec, previous, style, emit in`,
137848
137888
  ` let view = existing as? ${viewClass} ?? ${viewClass}${initializer}`
137849
137889
  ];
137850
137890
  for (const statement of statements(update)) {
@@ -137859,8 +137899,18 @@ function swiftGuestControls(one, names) {
137859
137899
  }
137860
137900
  const withLabel = /^(\w+)With([A-Z])(\w*)$/.exec(first);
137861
137901
  const args = selector.map(({ label, expression }, index) => {
137902
+ const fields = arrays.get(expression);
137862
137903
  let value;
137863
137904
  if (expression === "OneNativeStyleDictionary(next.swiftStyle)") value = "style";
137905
+ else if (expression === "boundedHeight")
137906
+ value = 'spec["boundedHeight"] as? Bool ?? false';
137907
+ else if (/^@"[^"]*"$/.test(expression)) value = expression.slice(1);
137908
+ else if (fields?.length) {
137909
+ const entries3 = fields.map(
137910
+ ({ name: name4, defaultValue: defaultValue2 }) => `"${name4}": row["${name4}"].flatMap { $0 is NSNull ? nil : $0 } ?? ${JSON.stringify(defaultValue2)}`
137911
+ ).join(", ");
137912
+ value = `(spec["${expression}"] as? [Spec] ?? []).map { row in [${entries3}] }`;
137913
+ } else if (fields) value = `spec["${expression}"] as? [String] ?? []`;
137864
137914
  else {
137865
137915
  const prop = /\bnext\.(\w+)/.exec(expression)?.[1];
137866
137916
  const types2 = {
@@ -137869,14 +137919,19 @@ function swiftGuestControls(one, names) {
137869
137919
  Double: "Double ?? 0",
137870
137920
  Int32: "Int ?? 0"
137871
137921
  };
137872
- if (!prop || !types2[props[prop]?.type])
137873
- throw new Error(`${name3}: unmapped guest argument ${expression}`);
137874
- value = `spec["${prop}"] as? ${types2[props[prop].type]}`;
137922
+ const type = prop && props[prop]?.type;
137923
+ if (type === "ColorValue") value = `spec["${prop}"].flatMap(oneControlColor)`;
137924
+ else if (type && types2[type]) value = `spec["${prop}"] as? ${types2[type]}`;
137925
+ else throw new Error(`${name3}: unmapped guest argument ${expression}`);
137875
137926
  }
137876
137927
  const argLabel = index ? label : withLabel ? withLabel[2].toLowerCase() + withLabel[3] : "";
137877
137928
  return argLabel ? argLabel + ": " + value : value;
137878
137929
  });
137879
- lines.push(` view.${withLabel?.[1] ?? first}(${args.join(", ")})`);
137930
+ const call = `view.${withLabel?.[1] ?? first}(${args.join(", ")})`;
137931
+ const array8 = selector[0].expression;
137932
+ lines.push(
137933
+ arrays.has(array8) ? ` if previous == nil || (spec["${array8}"] as? NSArray) != (previous?["${array8}"] as? NSArray) { ${call} }` : ` ${call}`
137934
+ );
137880
137935
  }
137881
137936
  for (const { property: property2, parameters, fields, event, sync } of eventBindings(
137882
137937
  name3,
@@ -137899,11 +137954,12 @@ function swiftGuestControls(one, names) {
137899
137954
  return {
137900
137955
  source: [
137901
137956
  "import UIKit",
137902
- "let guestControls: [String: (UIView?, Spec, Spec, @escaping (String, Spec) -> Void) -> UIView] = [",
137957
+ "let guestControls: [String: (UIView?, Spec, Spec?, Spec, @escaping (String, Spec) -> Void) -> UIView] = [",
137903
137958
  ...entries2,
137904
137959
  "]",
137905
137960
  ""
137906
137961
  ].join("\n"),
137962
+ defines: [...defines].sort(),
137907
137963
  watched
137908
137964
  };
137909
137965
  }
@@ -137965,35 +138021,61 @@ function resolveOneNativeAppleIosDir(appRoot) {
137965
138021
  }
137966
138022
  return workspace;
137967
138023
  }
137968
- async function oneNativeControlsPackage(appRoot) {
138024
+ function excludedGroupSource(source, defines) {
138025
+ const code = swiftCodeMask(source).trim();
138026
+ const group = /^#if (ONE_GROUP_\w+)[ \t]*\r?\n/.exec(code)?.[1];
138027
+ if (!group || defines.has(group)) return false;
138028
+ let depth = 0;
138029
+ for (const directive of code.matchAll(/^[ \t]*#(if|elseif|else|endif)\b[^\n]*/gm)) {
138030
+ if (directive[1] === "if") depth++;
138031
+ else if (directive[1] === "endif" && --depth === 0)
138032
+ return directive.index + directive[0].length === code.length;
138033
+ else if ((directive[1] === "else" || directive[1] === "elseif") && depth === 1)
138034
+ return false;
138035
+ }
138036
+ return false;
138037
+ }
138038
+ async function oneNativeControlsPackage(appRoot, linkedGroups) {
137969
138039
  const iosDir = resolveOneNativeAppleIosDir(appRoot);
137970
- const sdkDir = import_node_path152.default.join(iosDir, "SDK");
137971
- const sdkFiles = import_node_fs151.default.readdirSync(sdkDir).filter((name3) => name3.endsWith(".swift")).sort().map((name3) => `SDK/${name3}`);
137972
- const files2 = /* @__PURE__ */ new Map();
137973
- const watched = [];
137974
- const digest3 = (0, import_node_crypto89.createHash)("sha256");
137975
- for (const relative6 of [...ONE_CONTROL_SOURCES, ...sdkFiles]) {
137976
- const full = import_node_path152.default.join(iosDir, relative6);
137977
- const content = import_node_fs151.default.readFileSync(full, "utf8");
137978
- const flatName = import_node_path152.default.basename(relative6);
137979
- if (files2.has(flatName)) {
137980
- throw new Error(`duplicate Swift filename ${flatName} in OneNativeControls`);
137981
- }
137982
- files2.set(flatName, content);
137983
- watched.push(full);
137984
- digest3.update(flatName).update("\0").update(content).update("\0");
137985
- }
137986
- const generated = swiftGuestControls(import_node_path152.default.dirname(iosDir), [
137987
- "OneNativeButton",
137988
- "OneNativeLabel",
137989
- "OneNativeText",
137990
- "OneNativeImage"
137991
- ]);
137992
- files2.set("OneNativeGuestControls.swift", generated.source);
137993
- watched.push(...generated.watched);
137994
- digest3.update("OneNativeGuestControls.swift\0").update(generated.source).update("\0");
137995
- files2.set("OneNativeControlsBridge.swift", BRIDGE_SWIFT);
137996
- digest3.update("OneNativeControlsBridge.swift\0").update(BRIDGE_SWIFT).update("\0");
138040
+ const generated = swiftGuestControls(
138041
+ import_node_path152.default.dirname(iosDir),
138042
+ ["OneNativeButton", "OneNativeLabel", "OneNativeText", "OneNativeImage"],
138043
+ linkedGroups
138044
+ );
138045
+ const sources = {};
138046
+ const paths = /* @__PURE__ */ new Map();
138047
+ const defines = /* @__PURE__ */ new Set([...ONE_SDK_DEFINES, ...generated.defines]);
138048
+ for (const folder of ["", "Generated", "SDK"]) {
138049
+ for (const name3 of import_node_fs151.default.readdirSync(import_node_path152.default.join(iosDir, folder)).sort()) {
138050
+ if (!name3.endsWith(".swift") || name3 === "OneSwiftPackage.swift") continue;
138051
+ if (paths.has(name3))
138052
+ throw new Error(`duplicate Swift filename ${name3} in OneNativeControls`);
138053
+ const full = import_node_path152.default.join(iosDir, folder, name3);
138054
+ const source = import_node_fs151.default.readFileSync(full, "utf8");
138055
+ if (excludedGroupSource(source, defines)) continue;
138056
+ paths.set(name3, full);
138057
+ sources[name3] = source;
138058
+ }
138059
+ }
138060
+ sources["OneNativeGuestControls.swift"] = generated.source;
138061
+ sources["OneNativeControlsBridge.swift"] = BRIDGE_SWIFT;
138062
+ const files2 = new Map(
138063
+ Object.entries(
138064
+ collectSwiftSourceClosure(
138065
+ sources,
138066
+ ["OneNativeControlsGuest"],
138067
+ swiftCodeMask,
138068
+ /* @__PURE__ */ new Set(["View"])
138069
+ )
138070
+ )
138071
+ );
138072
+ const watched = new Set(generated.watched);
138073
+ const digest3 = (0, import_node_crypto89.createHash)("sha256").update([...defines].join("\0")).update("\0");
138074
+ for (const [name3, source] of files2) {
138075
+ const full = paths.get(name3);
138076
+ if (full) watched.add(full);
138077
+ digest3.update(name3).update("\0").update(source).update("\0");
138078
+ }
137997
138079
  const key2 = digest3.digest("hex").slice(0, 16);
137998
138080
  files2.set(
137999
138081
  "Package.swift",
@@ -138002,7 +138084,7 @@ async function oneNativeControlsPackage(appRoot) {
138002
138084
  `// OneNativeControls ${key2}`,
138003
138085
  "import PackageDescription",
138004
138086
  `let package = Package(name: "${ONE_NATIVE_CONTROLS_PACKAGE}", platforms: [.iOS(.v17)], targets: [`,
138005
- ` .executableTarget(name: "${ONE_NATIVE_CONTROLS_PACKAGE}", path: ".", swiftSettings: [.swiftLanguageMode(.v5), ${ONE_SDK_DEFINES.map((flag) => `.define("${flag}")`).join(", ")}]),`,
138087
+ ` .executableTarget(name: "${ONE_NATIVE_CONTROLS_PACKAGE}", path: ".", swiftSettings: [.swiftLanguageMode(.v5), ${[...defines].map((flag) => `.define("${flag}")`).join(", ")}]),`,
138006
138088
  "])",
138007
138089
  ""
138008
138090
  ].join("\n")
@@ -138018,9 +138100,9 @@ async function oneNativeControlsPackage(appRoot) {
138018
138100
  packagePath,
138019
138101
  new Map([...files2].map(([file, text7]) => [import_node_path152.default.join(packagePath, file), text7]))
138020
138102
  );
138021
- return { packagePath, watched };
138103
+ return { packagePath, watched: [...watched] };
138022
138104
  }
138023
- var import_node_crypto89, import_node_fs151, import_node_module21, import_node_path152, import_node_url8, ONE_CONTROL_SOURCES, ONE_SDK_DEFINES, BRIDGE_SWIFT;
138105
+ var import_node_crypto89, import_node_fs151, import_node_module21, import_node_path152, import_node_url8, ONE_SDK_DEFINES, BRIDGE_SWIFT;
138024
138106
  var init_one_native_controls_package = __esm({
138025
138107
  "src/one-native-controls-package.ts"() {
138026
138108
  "use strict";
@@ -138033,37 +138115,9 @@ var init_one_native_controls_package = __esm({
138033
138115
  init_oneNativeControlsContract2();
138034
138116
  init_swift_compile();
138035
138117
  init_swift_host();
138118
+ init_swift_source_closure();
138036
138119
  init_swift_submit();
138037
138120
  init_swift_toolchain();
138038
- ONE_CONTROL_SOURCES = [
138039
- "Generated/OneNativeNavigationSplitViewView.swift",
138040
- "Generated/OneNativeNavigationStackView.swift",
138041
- "Generated/OneNativeViewSlots.swift",
138042
- "Generated/OneNativeToolbarView.swift",
138043
- "Generated/OneNativeListView.swift",
138044
- "Generated/OneNativeSectionView.swift",
138045
- "Generated/OneNativeFileImporterView.swift",
138046
- "Generated/OneNativeButtonView.swift",
138047
- "Generated/OneNativeLabelView.swift",
138048
- "Generated/OneNativeTextView.swift",
138049
- "Generated/OneNativeImageView.swift",
138050
- "Generated/OneNativeSwiftUI.swift",
138051
- "Generated/OneNativeAnimationValues.swift",
138052
- "Generated/OneNativeEnvironment.swift",
138053
- "OneNativeContainerSlotView.swift",
138054
- "OneNativeSyncState.swift",
138055
- "OneNativeAnimators.swift",
138056
- "OneNativeDragBinding.swift",
138057
- "OneNativeAccessibility.swift",
138058
- "OneNativeAsyncAction.swift",
138059
- "OneNativeControlled.swift",
138060
- "OneZoomSources.swift",
138061
- "OneNativeComposition.swift",
138062
- "OneNativeHostingController.swift",
138063
- "OneNativeSlot.swift",
138064
- "OneNativeStyle.swift",
138065
- "OneNativeRemoteImage.swift"
138066
- ];
138067
138121
  ONE_SDK_DEFINES = ["ONE_IOS_27_SDK", "ONE_IOS_27_1_SDK"];
138068
138122
  BRIDGE_SWIFT = `import SwiftUI
138069
138123
  @_spi(Peach) import UIKit
@@ -138111,7 +138165,7 @@ private func platformColor(named name: String) -> UIColor? {
138111
138165
  }
138112
138166
  }
138113
138167
 
138114
- private func parseColor(_ raw: Any) -> UIColor? {
138168
+ func oneControlColor(_ raw: Any) -> UIColor? {
138115
138169
  if let color = raw as? UIColor { return color }
138116
138170
  if let number = raw as? NSNumber {
138117
138171
  let argb = UInt32(truncatingIfNeeded: number.int64Value)
@@ -138151,8 +138205,8 @@ private func parseColor(_ raw: Any) -> UIColor? {
138151
138205
  }
138152
138206
  }
138153
138207
  if let dynamic = dict["dynamic"] as? Spec,
138154
- let light = dynamic["light"].flatMap(parseColor),
138155
- let dark = dynamic["dark"].flatMap(parseColor) {
138208
+ let light = dynamic["light"].flatMap(oneControlColor),
138209
+ let dark = dynamic["dark"].flatMap(oneControlColor) {
138156
138210
  return UIColor { traits in
138157
138211
  traits.userInterfaceStyle == .dark ? dark : light
138158
138212
  }
@@ -138169,7 +138223,7 @@ private func normalizeStyle(_ raw: Spec?) -> Spec {
138169
138223
  }
138170
138224
  }
138171
138225
  for key in ["foregroundStyle", "tint", "background", "borderColor", "glassEffectTint"] {
138172
- if let value = style[key], let color = parseColor(value) {
138226
+ if let value = style[key], let color = oneControlColor(value) {
138173
138227
  style[key] = color
138174
138228
  }
138175
138229
  }
@@ -138185,7 +138239,12 @@ private func normalizeStyle(_ raw: Spec?) -> Spec {
138185
138239
  }
138186
138240
 
138187
138241
  private class ControlComposition {
138242
+ private static let reconciledContainers: Set<String> = [
138243
+ "OneNativeLazyVStack", "OneNativeLazyHStack", "OneNativeLazyVGrid", "OneNativeLazyHGrid",
138244
+ "OneNativeList", "OneNativeSection", "OneNativeForm",
138245
+ ]
138188
138246
  var views: [String: UIView] = [:]
138247
+ var specs: [String: Spec] = [:]
138189
138248
  var children: [String: [UIView]] = [:]
138190
138249
  var slots: [String: UIView] = [:]
138191
138250
  var emit: ((String, String) -> Void)?
@@ -138203,7 +138262,10 @@ private class ControlComposition {
138203
138262
  ) {
138204
138263
  let prefix = zip(previous, next).prefix(while: { $0 === $1 }).count
138205
138264
  for child in previous.dropFirst(prefix).reversed() { remove(child) }
138206
- for (index, child) in next.enumerated().dropFirst(prefix) { insert(child, index) }
138265
+ for (index, child) in next.enumerated().dropFirst(prefix) {
138266
+ child.removeFromSuperview()
138267
+ insert(child, index)
138268
+ }
138207
138269
  }
138208
138270
 
138209
138271
  func render(_ node: Spec, visited: inout Set<String>) -> UIView {
@@ -138247,22 +138309,30 @@ private class ControlComposition {
138247
138309
  slot.configure(height: spec["height"] as? Double ?? 0, width: spec["width"] as? Double ?? 0)
138248
138310
  slot.configureSwiftStyle(style)
138249
138311
  slot.onSwiftStyleEvent = visit
138312
+ slot.onLayout = { [weak self] frame in
138313
+ self?.send(id, "onNativeLayout", ["x": frame.minX, "y": frame.minY, "width": frame.width, "height": frame.height])
138314
+ }
138250
138315
  view = slot
138251
138316
  default:
138252
- guard let mount = guestControls[control] else { preconditionFailure("unsupported One toolbar child \\(control)") }
138253
- view = mount(views[id], spec, style) { [weak self] event, fields in self?.send(id, event, fields) }
138317
+ guard let mount = guestControls[control] else { preconditionFailure("unsupported One control \\(control)") }
138318
+ view = mount(views[id], spec, specs[id], style) { [weak self] event, fields in self?.send(id, event, fields) }
138319
+ specs[id] = spec
138254
138320
  }
138255
138321
  views[id] = view
138256
138322
  if let container = view as? OneNativeContainerView {
138257
138323
  container.configureSwiftStyle(style)
138258
138324
  container.onSwiftStyleEvent = visit
138259
138325
  let nested = (node["children"] as? [Spec] ?? []).map { render($0, visited: &visited) }
138260
- reconcile(
138261
- nested,
138262
- previous: children[id] ?? [],
138263
- remove: container.removeChild,
138264
- insert: container.insertChild
138265
- )
138326
+ if Self.reconciledContainers.contains(control) {
138327
+ container.reconcileComposedChildren(nested)
138328
+ } else {
138329
+ reconcile(
138330
+ nested,
138331
+ previous: children[id] ?? [],
138332
+ remove: container.removeChild,
138333
+ insert: container.insertChild
138334
+ )
138335
+ }
138266
138336
  children[id] = nested
138267
138337
  }
138268
138338
  return view
@@ -138272,12 +138342,42 @@ private class ControlComposition {
138272
138342
  for (id, view) in views where !visited.contains(id) {
138273
138343
  if let container = view as? OneNativeContainerView { container.reset() }
138274
138344
  views.removeValue(forKey: id)
138345
+ specs.removeValue(forKey: id)
138275
138346
  children.removeValue(forKey: id)
138276
138347
  slots.removeValue(forKey: id)
138277
138348
  }
138278
138349
  }
138279
138350
  }
138280
138351
 
138352
+ private struct ControlBridge: UIViewRepresentable {
138353
+ let root: Spec
138354
+ let emit: (String, String) -> Void
138355
+
138356
+ func makeCoordinator() -> ControlComposition { ControlComposition() }
138357
+
138358
+ func makeUIView(context: Context) -> UIView { UIView(frame: .zero) }
138359
+
138360
+ func updateUIView(_ host: UIView, context: Context) {
138361
+ let state = context.coordinator
138362
+ state.emit = emit
138363
+ var visited = Set<String>()
138364
+ let control = state.render(root, visited: &visited)
138365
+ if control.superview !== host {
138366
+ host.subviews.forEach { $0.removeFromSuperview() }
138367
+ control.frame = host.bounds
138368
+ control.autoresizingMask = [.flexibleWidth, .flexibleHeight]
138369
+ host.addSubview(control)
138370
+ }
138371
+ state.prune(keeping: visited)
138372
+ }
138373
+
138374
+ static func dismantleUIView(_ host: UIView, coordinator: ControlComposition) {
138375
+ host.subviews.forEach { $0.removeFromSuperview() }
138376
+ coordinator.prune(keeping: [])
138377
+ coordinator.emit = nil
138378
+ }
138379
+ }
138380
+
138281
138381
  private struct NavigationDestinationSlot: Identifiable, Equatable {
138282
138382
  let id: String
138283
138383
  let contentHost: String
@@ -138549,7 +138649,10 @@ private struct NavigationSplitViewBridge: UIViewRepresentable {
138549
138649
  .frame(maxWidth: .infinity, maxHeight: .infinity)
138550
138650
  .ignoresSafeArea(.container))
138551
138651
  default:
138552
- preconditionFailure("unexpected compiled One control request \\(view)")
138652
+ let root = spec["root"] as! Spec
138653
+ precondition((root["spec"] as? Spec)?["control"] as? String == view)
138654
+ return AnyView(ControlBridge(root: root, emit: emit)
138655
+ .frame(maxWidth: .infinity, maxHeight: .infinity))
138553
138656
  }
138554
138657
  }
138555
138658
  }
@@ -143071,7 +143174,7 @@ var init_nitro_superset = __esm({
143071
143174
  init_nitroContract();
143072
143175
  init_swift_standin_digest();
143073
143176
  NITRO_SUPERSET_ENTRY_NAME = "superset";
143074
- NITRO_COMPILER_DIGEST = true ? "d7332e8094966a9964f28748a0f8eb19acb8509eca15e182bea368f0cc6b6f13" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
143177
+ NITRO_COMPILER_DIGEST = true ? "59081cf672cb2bb9c125425cd97f2df60507acfc6de96f1525f18ddca39ff000" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
143075
143178
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
143076
143179
  nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
143077
143180
  published3 = /* @__PURE__ */ new Map();
@@ -155778,8 +155881,14 @@ var init_privacy = __esm({
155778
155881
  // ../peach-globals/src/event-identity.ts
155779
155882
  function eventUuid(timestamp2 = Date.now()) {
155780
155883
  const time = timestamp2.toString(16).padStart(12, "0");
155781
- const random = crypto.randomUUID();
155782
- return `${time.slice(0, 8)}-${time.slice(8)}-7${random.slice(15, 18)}-${random.slice(19)}`;
155884
+ const bytes = crypto.getRandomValues(new Uint8Array(10));
155885
+ bytes[0] = bytes[0] & 15 | 112;
155886
+ bytes[2] = bytes[2] & 63 | 128;
155887
+ let hex = "";
155888
+ for (let i = 0; i < bytes.length; i++) {
155889
+ hex += bytes[i].toString(16).padStart(2, "0");
155890
+ }
155891
+ return `${time.slice(0, 8)}-${time.slice(8)}-${hex.slice(0, 4)}-${hex.slice(4, 8)}-${hex.slice(8)}`;
155783
155892
  }
155784
155893
  var init_event_identity = __esm({
155785
155894
  "../peach-globals/src/event-identity.ts"() {