@wix/himalaya-cli 0.1479.0 → 0.1480.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cli.mjs +454 -270
  2. package/dist/preview-assets.generated.bin +0 -0
  3. package/guides/component-reference.json +2 -25
  4. package/guides/component-reference.md +3 -9
  5. package/package.json +2 -2
  6. package/templates/beauty-salon/dev/index.ts +29 -229
  7. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +69 -9
  8. package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +6 -1
  9. package/templates/beauty-salon/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
  10. package/templates/branded-lite/dev/index.ts +58 -364
  11. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +69 -9
  12. package/templates/branded-lite/tier5-src/himi-events-rsvp/index.ts +5 -0
  13. package/templates/branded-lite/tier5-src/himi-store-account/index.ts +6 -1
  14. package/templates/branded-lite/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
  15. package/templates/community-club/dev/index.ts +26 -134
  16. package/templates/community-club/tier5-src/himi-events-rsvp/index.ts +5 -0
  17. package/templates/community-club/tier5-src/himi-store-account/index.ts +6 -1
  18. package/templates/events-meetups/dev/index.ts +26 -134
  19. package/templates/events-meetups/tier5-src/himi-events-rsvp/index.ts +5 -0
  20. package/templates/events-meetups/tier5-src/himi-store-account/index.ts +6 -1
  21. package/templates/gym-fitness/dev/index.ts +55 -363
  22. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +69 -9
  23. package/templates/gym-fitness/tier5-src/himi-events-rsvp/index.ts +5 -0
  24. package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +6 -1
  25. package/templates/gym-fitness/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
  26. package/templates/nonprofit-cause/dev/index.ts +29 -136
  27. package/templates/nonprofit-cause/tier5-src/himi-events-rsvp/index.ts +5 -0
  28. package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +6 -1
  29. package/templates/nonprofit-cause/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
  30. package/templates/podcast-creator/dev/index.ts +29 -136
  31. package/templates/podcast-creator/tier5-src/himi-events-rsvp/index.ts +5 -0
  32. package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +6 -1
  33. package/templates/podcast-creator/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
  34. package/templates/portfolio-creative/dev/index.ts +26 -134
  35. package/templates/portfolio-creative/tier5-src/himi-events-rsvp/index.ts +5 -0
  36. package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +6 -1
  37. package/templates/restaurant/dev/index.ts +26 -134
  38. package/templates/restaurant/tier5-src/himi-events-rsvp/index.ts +5 -0
  39. package/templates/restaurant/tier5-src/himi-store-account/index.ts +6 -1
  40. package/templates/retail-store/tier5-src/himi-store-account/index.ts +6 -1
  41. package/templates/yoga-studio/dev/index.ts +55 -363
  42. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +69 -9
  43. package/templates/yoga-studio/tier5-src/himi-events-rsvp/index.ts +5 -0
  44. package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +6 -1
  45. package/templates/yoga-studio/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
package/dist/cli.mjs CHANGED
@@ -6186,15 +6186,15 @@ function analyzeController(source, file2, profile, diagnostics) {
6186
6186
  error(declaration ?? sf2, "Default-export defineController({ initialState, handlers }).");
6187
6187
  return;
6188
6188
  }
6189
- const object7 = declaration.expression.arguments[0];
6190
- if (!object7 || !ts2.isObjectLiteralExpression(object7)) {
6189
+ const object8 = declaration.expression.arguments[0];
6190
+ if (!object8 || !ts2.isObjectLiteralExpression(object8)) {
6191
6191
  error(declaration, "Controller definition must be an object literal.");
6192
6192
  return;
6193
6193
  }
6194
- const props = new Map(object7.properties.map((p2) => [p2.name?.getText(sf2).replace(/^["']|["']$/g, ""), p2]));
6194
+ const props = new Map(object8.properties.map((p2) => [p2.name?.getText(sf2).replace(/^["']|["']$/g, ""), p2]));
6195
6195
  const state = props.get("initialState"), handlers = props.get("handlers");
6196
6196
  if (!state || !ts2.isPropertyAssignment(state) || !handlers || !ts2.isPropertyAssignment(handlers) || !ts2.isObjectLiteralExpression(handlers.initializer)) {
6197
- error(object7, "initialState and handlers must be object literals.");
6197
+ error(object8, "initialState and handlers must be object literals.");
6198
6198
  return;
6199
6199
  }
6200
6200
  function literal(n2) {
@@ -10053,6 +10053,7 @@ function webViewOriginAllowed(url, origins) {
10053
10053
  }
10054
10054
  var init_webview_origin = __esm({
10055
10055
  "../../core/ts/src/webview-origin.ts"() {
10056
+ "use strict";
10056
10057
  }
10057
10058
  });
10058
10059
 
@@ -13228,6 +13229,29 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
13228
13229
  }
13229
13230
  };
13230
13231
  scanItemsPathHost(descriptor, "");
13232
+ const scanMenuActionSheet = (node, at2) => {
13233
+ if (Array.isArray(node)) {
13234
+ node.forEach((v3, i2) => scanMenuActionSheet(v3, `${at2}[${i2}]`));
13235
+ return;
13236
+ }
13237
+ if (!node || typeof node !== "object") return;
13238
+ const record2 = node;
13239
+ const body = record2.body;
13240
+ const props = body?.props;
13241
+ if (body?.type === "Menu" && (body.package === void 0 || body.package === "himalaya") && props?.style === "action_sheet") {
13242
+ issues.push({
13243
+ severity: "warning",
13244
+ pass: "components",
13245
+ path: at2 ? `${at2}.body.props.style` : "body.props.style",
13246
+ message: '`Menu.style: "action_sheet"` renders as the dropdown menu on every platform \u2014 iOS, Android, web and React Native alike; none present an action sheet. For a real cross-platform action sheet use the ALERT verb (RFC 0066 \xA74); for a long-press menu use `style: "context"`.'
13247
+ });
13248
+ }
13249
+ for (const [k2, val] of Object.entries(record2)) {
13250
+ if (isOpaqueAuthorJson(k2, val, at2 === "")) continue;
13251
+ if (val && typeof val === "object") scanMenuActionSheet(val, at2 ? `${at2}.${k2}` : k2);
13252
+ }
13253
+ };
13254
+ scanMenuActionSheet(descriptor, "");
13231
13255
  if (Object.keys(services).length > 0) {
13232
13256
  const scanOptionsPath = (node, at2) => {
13233
13257
  if (Array.isArray(node)) {
@@ -18729,6 +18753,7 @@ function resolveIdiom(tokens2, ctx = {}) {
18729
18753
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
18730
18754
  var init_idiom = __esm({
18731
18755
  "../../core/ts/src/idiom.ts"() {
18756
+ "use strict";
18732
18757
  IDIOM_CONTEXTS = {
18733
18758
  ios: { native: ["ios"] },
18734
18759
  android: { native: ["material"] },
@@ -40055,6 +40080,28 @@ var init_actionParams = __esm({
40055
40080
  }
40056
40081
  });
40057
40082
 
40083
+ // ../../core/web-renderer/src/menuItems.ts
40084
+ function decodeMenuItems(value) {
40085
+ if (!Array.isArray(value)) return void 0;
40086
+ return value.filter((item) => {
40087
+ if (!object2(item) || !string(item.id) || !string(item.label)) return false;
40088
+ if (!optional(item.icon, string) || !optional(item.destructive, bool) || !optional(item.disabled, bool)) return false;
40089
+ if (item.action == null) return true;
40090
+ const action = item.action;
40091
+ return object2(action) && string(action.actionId) && optional(action.params, (v2) => object2(v2) && Object.values(v2).every(string)) && optional(action.args, object2) && optional(action.presentation, (v2) => string(v2) && presentations.has(v2));
40092
+ });
40093
+ }
40094
+ var object2, optional, string, bool, presentations;
40095
+ var init_menuItems = __esm({
40096
+ "../../core/web-renderer/src/menuItems.ts"() {
40097
+ object2 = (v2) => v2 != null && typeof v2 === "object" && !Array.isArray(v2);
40098
+ optional = (v2, check) => v2 == null || check(v2);
40099
+ string = (v2) => typeof v2 === "string";
40100
+ bool = (v2) => typeof v2 === "boolean";
40101
+ presentations = /* @__PURE__ */ new Set(["push", "sheet", "replace", "dismiss", "back", "full_screen", "alert", "snackbar"]);
40102
+ }
40103
+ });
40104
+
40058
40105
  // ../../core/web-renderer/src/icons.tsx
40059
40106
  import { jsx as jsx4 } from "react/jsx-runtime";
40060
40107
  function normalize2(name) {
@@ -45797,11 +45844,11 @@ var init_pdf = __esm({
45797
45844
  var DESCRIPTORS = __webpack_require__3(3724);
45798
45845
  var definePropertyModule = __webpack_require__3(4913);
45799
45846
  var createPropertyDescriptor = __webpack_require__3(6980);
45800
- module.exports = DESCRIPTORS ? function(object7, key3, value) {
45801
- return definePropertyModule.f(object7, key3, createPropertyDescriptor(1, value));
45802
- } : function(object7, key3, value) {
45803
- object7[key3] = value;
45804
- return object7;
45847
+ module.exports = DESCRIPTORS ? function(object8, key3, value) {
45848
+ return definePropertyModule.f(object8, key3, createPropertyDescriptor(1, value));
45849
+ } : function(object8, key3, value) {
45850
+ object8[key3] = value;
45851
+ return object8;
45805
45852
  };
45806
45853
  },
45807
45854
  /***/
@@ -45820,9 +45867,9 @@ var init_pdf = __esm({
45820
45867
  var DESCRIPTORS = __webpack_require__3(3724);
45821
45868
  var definePropertyModule = __webpack_require__3(4913);
45822
45869
  var createPropertyDescriptor = __webpack_require__3(6980);
45823
- module.exports = function(object7, key3, value) {
45824
- if (DESCRIPTORS) definePropertyModule.f(object7, key3, createPropertyDescriptor(0, value));
45825
- else object7[key3] = value;
45870
+ module.exports = function(object8, key3, value) {
45871
+ if (DESCRIPTORS) definePropertyModule.f(object8, key3, createPropertyDescriptor(0, value));
45872
+ else object8[key3] = value;
45826
45873
  };
45827
45874
  },
45828
45875
  /***/
@@ -46112,9 +46159,9 @@ var init_pdf = __esm({
46112
46159
  6706(module, __unused_webpack_exports, __webpack_require__3) {
46113
46160
  var uncurryThis = __webpack_require__3(9504);
46114
46161
  var aCallable = __webpack_require__3(9306);
46115
- module.exports = function(object7, key3, method) {
46162
+ module.exports = function(object8, key3, method) {
46116
46163
  try {
46117
- return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object7, key3)[method]));
46164
+ return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object8, key3)[method]));
46118
46165
  } catch (error) {
46119
46166
  }
46120
46167
  };
@@ -46444,8 +46491,8 @@ var init_pdf = __esm({
46444
46491
  var value = data[normalize4(feature)];
46445
46492
  return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
46446
46493
  };
46447
- var normalize4 = isForced.normalize = function(string5) {
46448
- return String(string5).replace(replacement, ".").toLowerCase();
46494
+ var normalize4 = isForced.normalize = function(string6) {
46495
+ return String(string6).replace(replacement, ".").toLowerCase();
46449
46496
  };
46450
46497
  var data = isForced.data = {};
46451
46498
  var NATIVE = isForced.NATIVE = "N";
@@ -47082,13 +47129,13 @@ var init_pdf = __esm({
47082
47129
  var $Object = Object;
47083
47130
  var ObjectPrototype = $Object.prototype;
47084
47131
  module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function(O2) {
47085
- var object7 = toObject(O2);
47086
- if (hasOwn(object7, IE_PROTO)) return object7[IE_PROTO];
47087
- var constructor = object7.constructor;
47088
- if (isCallable(constructor) && object7 instanceof constructor) {
47132
+ var object8 = toObject(O2);
47133
+ if (hasOwn(object8, IE_PROTO)) return object8[IE_PROTO];
47134
+ var constructor = object8.constructor;
47135
+ if (isCallable(constructor) && object8 instanceof constructor) {
47089
47136
  return constructor.prototype;
47090
47137
  }
47091
- return object7 instanceof $Object ? ObjectPrototype : null;
47138
+ return object8 instanceof $Object ? ObjectPrototype : null;
47092
47139
  };
47093
47140
  },
47094
47141
  /***/
@@ -47104,8 +47151,8 @@ var init_pdf = __esm({
47104
47151
  var indexOf = __webpack_require__3(9617).indexOf;
47105
47152
  var hiddenKeys = __webpack_require__3(421);
47106
47153
  var push = uncurryThis([].push);
47107
- module.exports = function(object7, names2) {
47108
- var O2 = toIndexedObject(object7);
47154
+ module.exports = function(object8, names2) {
47155
+ var O2 = toIndexedObject(object8);
47109
47156
  var i2 = 0;
47110
47157
  var result = [];
47111
47158
  var key3;
@@ -47746,10 +47793,10 @@ var init_pdf = __esm({
47746
47793
  var $Array = globalThis2.Array;
47747
47794
  var at2 = uncurryThis("".charAt);
47748
47795
  var floor2 = Math.floor;
47749
- var skipAsciiWhitespace = function(string5, index) {
47750
- var length = string5.length;
47796
+ var skipAsciiWhitespace = function(string6, index) {
47797
+ var length = string6.length;
47751
47798
  for (; index < length; index++) {
47752
- var chr = at2(string5, index);
47799
+ var chr = at2(string6, index);
47753
47800
  if (chr !== " " && chr !== " " && chr !== "\n" && chr !== "\f" && chr !== "\r") break;
47754
47801
  }
47755
47802
  return index;
@@ -47786,8 +47833,8 @@ var init_pdf = __esm({
47786
47833
  }
47787
47834
  return written + elementsLength;
47788
47835
  };
47789
- module.exports = function(string5, options, into, maxLength) {
47790
- aString(string5);
47836
+ module.exports = function(string6, options, into, maxLength) {
47837
+ aString(string6);
47791
47838
  anObjectOrUndefined(options);
47792
47839
  var alphabet = getAlphabetOption(options) === "base64" ? base64Alphabet : base64UrlAlphabet;
47793
47840
  var lastChunkHandling = options ? options.lastChunkHandling : void 0;
@@ -47796,14 +47843,14 @@ var init_pdf = __esm({
47796
47843
  throw new TypeError2("Incorrect `lastChunkHandling` option");
47797
47844
  }
47798
47845
  if (into) notDetached(into.buffer);
47799
- var stringLength = string5.length;
47846
+ var stringLength = string6.length;
47800
47847
  var bytes2 = into || $Array(floor2(stringLength * 3 / 4));
47801
47848
  var written = 0;
47802
47849
  var read = 0;
47803
47850
  var chunk = "";
47804
47851
  var index = 0;
47805
47852
  if (maxLength) while (true) {
47806
- index = skipAsciiWhitespace(string5, index);
47853
+ index = skipAsciiWhitespace(string6, index);
47807
47854
  if (index === stringLength) {
47808
47855
  if (chunk.length > 0) {
47809
47856
  if (lastChunkHandling === "stop-before-partial") {
@@ -47821,13 +47868,13 @@ var init_pdf = __esm({
47821
47868
  read = stringLength;
47822
47869
  break;
47823
47870
  }
47824
- var chr = at2(string5, index);
47871
+ var chr = at2(string6, index);
47825
47872
  ++index;
47826
47873
  if (chr === "=") {
47827
47874
  if (chunk.length < 2) {
47828
47875
  throw new SyntaxError2("Padding is too early");
47829
47876
  }
47830
- index = skipAsciiWhitespace(string5, index);
47877
+ index = skipAsciiWhitespace(string6, index);
47831
47878
  if (chunk.length === 2) {
47832
47879
  if (index === stringLength) {
47833
47880
  if (lastChunkHandling === "stop-before-partial") {
@@ -47835,9 +47882,9 @@ var init_pdf = __esm({
47835
47882
  }
47836
47883
  throw new SyntaxError2("Malformed padding: only one =");
47837
47884
  }
47838
- if (at2(string5, index) === "=") {
47885
+ if (at2(string6, index) === "=") {
47839
47886
  ++index;
47840
- index = skipAsciiWhitespace(string5, index);
47887
+ index = skipAsciiWhitespace(string6, index);
47841
47888
  }
47842
47889
  }
47843
47890
  if (index < stringLength) {
@@ -47876,12 +47923,12 @@ var init_pdf = __esm({
47876
47923
  var SyntaxError2 = globalThis2.SyntaxError;
47877
47924
  var min = Math.min;
47878
47925
  var stringMatch = uncurryThis("".match);
47879
- module.exports = function(string5, into) {
47880
- var stringLength = string5.length;
47926
+ module.exports = function(string6, into) {
47927
+ var stringLength = string6.length;
47881
47928
  if (stringLength % 2 !== 0) throw new SyntaxError2("String should be an even number of characters");
47882
47929
  var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2;
47883
47930
  var bytes2 = into || new Uint8Array2(maxLength);
47884
- var segments = stringMatch(string5, /[\S\s]{2}/g);
47931
+ var segments = stringMatch(string6, /[\S\s]{2}/g);
47885
47932
  var written = 0;
47886
47933
  for (; written < maxLength; written++) {
47887
47934
  var result = +("0x" + segments[written] + "0");
@@ -48548,13 +48595,13 @@ var init_pdf = __esm({
48548
48595
  }
48549
48596
  return call(reviver, holder, name, val, context);
48550
48597
  };
48551
- var internalizeProperty = function(object7, key3, value) {
48598
+ var internalizeProperty = function(object8, key3, value) {
48552
48599
  if (DESCRIPTORS) {
48553
- var descriptor = getOwnPropertyDescriptor(object7, key3);
48600
+ var descriptor = getOwnPropertyDescriptor(object8, key3);
48554
48601
  if (descriptor && !descriptor.configurable) return;
48555
48602
  }
48556
- if (value === void 0) delete object7[key3];
48557
- else createProperty(object7, key3, value);
48603
+ if (value === void 0) delete object8[key3];
48604
+ else createProperty(object8, key3, value);
48558
48605
  };
48559
48606
  var Node2 = function(value, end, source, nodes) {
48560
48607
  this.value = value;
@@ -48599,7 +48646,7 @@ var init_pdf = __esm({
48599
48646
  var source = this.source;
48600
48647
  var i2 = this.index + 1;
48601
48648
  var expectKeypair = false;
48602
- var object7 = {};
48649
+ var object8 = {};
48603
48650
  var nodes = {};
48604
48651
  var closed = false;
48605
48652
  while (i2 < source.length) {
@@ -48616,7 +48663,7 @@ var init_pdf = __esm({
48616
48663
  i2 = this.skip(IS_WHITESPACE, i2);
48617
48664
  result = this.fork(i2).parse();
48618
48665
  createProperty(nodes, key3, result);
48619
- createProperty(object7, key3, result.value);
48666
+ createProperty(object8, key3, result.value);
48620
48667
  i2 = this.until([",", "}"], result.end);
48621
48668
  var chr = at2(source, i2);
48622
48669
  if (chr === ",") {
@@ -48629,7 +48676,7 @@ var init_pdf = __esm({
48629
48676
  }
48630
48677
  }
48631
48678
  if (!closed) throw new SyntaxError2("Unterminated object at: " + i2);
48632
- return this.node(OBJECT, object7, this.index, i2, nodes);
48679
+ return this.node(OBJECT, object8, this.index, i2, nodes);
48633
48680
  },
48634
48681
  array: function() {
48635
48682
  var source = this.source;
@@ -48784,9 +48831,9 @@ var init_pdf = __esm({
48784
48831
  if (!isSymbol(replaced)) return replaced;
48785
48832
  }, space);
48786
48833
  } : $stringify;
48787
- var fixIllFormedJSON = function(match, offset, string5) {
48788
- var prev = charAt(string5, offset - 1);
48789
- var next = charAt(string5, offset + 1);
48834
+ var fixIllFormedJSON = function(match, offset, string6) {
48835
+ var prev = charAt(string6, offset - 1);
48836
+ var next = charAt(string6, offset + 1);
48790
48837
  if (exec(leadingSurrogates, match) && !exec(trailingSurrogates, next) || exec(trailingSurrogates, match) && !exec(leadingSurrogates, prev)) {
48791
48838
  return "\\u" + numberToString2(charCodeAt(match, 0), 16);
48792
48839
  }
@@ -48904,10 +48951,10 @@ var init_pdf = __esm({
48904
48951
  var chr = charAt(json8, i2);
48905
48952
  if (chr === '"') {
48906
48953
  var end = parseJSONString(json8, ++i2).end - 1;
48907
- var string5 = slice(json8, i2, end);
48908
- if (slice(string5, 0, RAW_MARK_LENGTH) === RAW_MARK) result += rawStrings[slice(string5, RAW_MARK_LENGTH)];
48909
- else if (slice(string5, 0, KEY_MARK_LENGTH) === KEY_MARK) result += '"' + slice(string5, KEY_MARK_LENGTH) + '"';
48910
- else result += '"' + string5 + '"';
48954
+ var string6 = slice(json8, i2, end);
48955
+ if (slice(string6, 0, RAW_MARK_LENGTH) === RAW_MARK) result += rawStrings[slice(string6, RAW_MARK_LENGTH)];
48956
+ else if (slice(string6, 0, KEY_MARK_LENGTH) === KEY_MARK) result += '"' + slice(string6, KEY_MARK_LENGTH) + '"';
48957
+ else result += '"' + string6 + '"';
48911
48958
  i2 = end;
48912
48959
  } else result += chr;
48913
48960
  }
@@ -49282,8 +49329,8 @@ var init_pdf = __esm({
49282
49329
  }
49283
49330
  })();
49284
49331
  if (Uint8Array2) $2({ target: "Uint8Array", stat: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
49285
- fromBase64: function fromBase642(string5) {
49286
- var result = $fromBase64(string5, arguments.length > 1 ? arguments[1] : void 0, null, 9007199254740991);
49332
+ fromBase64: function fromBase642(string6) {
49333
+ var result = $fromBase64(string6, arguments.length > 1 ? arguments[1] : void 0, null, 9007199254740991);
49287
49334
  return arrayFromConstructorAndList(Uint8Array2, result.bytes);
49288
49335
  }
49289
49336
  });
@@ -49314,9 +49361,9 @@ var init_pdf = __esm({
49314
49361
  }
49315
49362
  })();
49316
49363
  if (Uint8Array2) $2({ target: "Uint8Array", proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
49317
- setFromBase64: function setFromBase64(string5) {
49364
+ setFromBase64: function setFromBase64(string6) {
49318
49365
  anUint8Array(this);
49319
- var result = $fromBase64(string5, arguments.length > 1 ? arguments[1] : void 0, this, this.length);
49366
+ var result = $fromBase64(string6, arguments.length > 1 ? arguments[1] : void 0, this, this.length);
49320
49367
  return { read: result.read, written: result.written };
49321
49368
  }
49322
49369
  });
@@ -49338,11 +49385,11 @@ var init_pdf = __esm({
49338
49385
  }
49339
49386
  }
49340
49387
  if (globalThis2.Uint8Array) $2({ target: "Uint8Array", proto: true, forced: throwsOnLengthTrackingView() }, {
49341
- setFromHex: function setFromHex(string5) {
49388
+ setFromHex: function setFromHex(string6) {
49342
49389
  anUint8Array(this);
49343
- aString(string5);
49390
+ aString(string6);
49344
49391
  notDetached(this.buffer);
49345
- var read = $fromHex(string5, this).read;
49392
+ var read = $fromHex(string6, this).read;
49346
49393
  return { read, written: read / 2 };
49347
49394
  }
49348
49395
  });
@@ -127350,7 +127397,7 @@ function reportUnknownComponent(ctx, pkg, type) {
127350
127397
  function unknownComponentShowsDeveloperLabel(ctx) {
127351
127398
  return ctx.debugUnknownComponents ?? ctx.previewSurface != null;
127352
127399
  }
127353
- var loadPdfFetch, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_LONG_PRESS_MS, MenuNode, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
127400
+ var loadPdfFetch, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
127354
127401
  var init_renderNode = __esm({
127355
127402
  "../../core/web-renderer/src/renderNode.tsx"() {
127356
127403
  "use strict";
@@ -127372,6 +127419,7 @@ var init_renderNode = __esm({
127372
127419
  init_env();
127373
127420
  init_ambient_motion();
127374
127421
  init_actionParams();
127422
+ init_menuItems();
127375
127423
  init_icons();
127376
127424
  init_picker_field();
127377
127425
  init_pickerField();
@@ -128341,13 +128389,16 @@ var init_renderNode = __esm({
128341
128389
  revealed ? /* @__PURE__ */ jsx11("span", { id: errorId, role: "alert", style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: C2("danger", "#E62214"), paddingLeft: 2 }, children: message }) : (props.helperText ?? cfg.helperText) != null ? /* @__PURE__ */ jsx11("span", { style: { fontFamily: bodyFont(ctx), fontSize: pxToRem(12), color: errored ? C2("danger", "#E62214") : muted, paddingLeft: 2 }, children: txt(props.helperText ?? cfg.helperText, ctx) }) : null
128342
128390
  ] });
128343
128391
  };
128344
- MENU_LONG_PRESS_MS = 500;
128392
+ MENU_ANCHOR_CONTROL = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="button"], [role="link"]';
128345
128393
  MenuNode = withExtras("MenuNode", ({ props, ctx, wrap }) => {
128346
128394
  const [open, setOpen] = React11.useState(false);
128347
128395
  const hostRef = React11.useRef(null);
128348
- const context = props.style === "context";
128396
+ const context = menuOpensOnLongPress(props.style);
128397
+ const itemsPath = typeof props.itemsPath === "string" && props.itemsPath.startsWith("$service:") ? props.itemsPath : "";
128398
+ const boundItems = useBoundValue(ctx, itemsPath);
128399
+ const sourceItems = decodeMenuItems(boundItems) ?? (Array.isArray(props.items) ? props.items : []);
128349
128400
  const previewMode = context && props.preview != null;
128350
- const items = (Array.isArray(props.items) ? props.items : []).map((it2) => it2 && typeof it2.label === "string" && it2.label.startsWith("$item") ? { ...it2, label: resolveItemDeep2(it2.label, ctx) } : it2);
128401
+ const items = sourceItems.map((it2) => ({ ...it2, label: typeof it2?.label === "string" && it2.label.startsWith("$item") ? resolveItemDeep2(it2.label, ctx) : it2?.label, disabled: it2?.disabled === true || !it2?.action }));
128351
128402
  const C2 = ctx.color;
128352
128403
  React11.useEffect(() => {
128353
128404
  if (!open) return;
@@ -128378,6 +128429,57 @@ var init_renderNode = __esm({
128378
128429
  const anchorRef = React11.useRef(null);
128379
128430
  const menuRef = React11.useRef(null);
128380
128431
  const dialogRef = React11.useRef(null);
128432
+ const [popupAlignLeft, setPopupAlignLeft] = React11.useState(false);
128433
+ const [popupAbove, setPopupAbove] = React11.useState(false);
128434
+ useIsomorphicLayoutEffect(() => {
128435
+ if (!open || !anchorRef.current || !menuRef.current) return;
128436
+ const anchor = anchorRef.current.getBoundingClientRect();
128437
+ const popup = (dialogRef.current ?? menuRef.current).getBoundingClientRect();
128438
+ let left = 0;
128439
+ let bottom = window.innerHeight;
128440
+ let top = 0;
128441
+ let parent = hostRef.current?.parentElement;
128442
+ while (parent) {
128443
+ const css = window.getComputedStyle(parent);
128444
+ if (/hidden|clip|auto|scroll/.test(`${css.overflow} ${css.overflowX}`)) left = Math.max(left, parent.getBoundingClientRect().left);
128445
+ if (/hidden|clip|auto|scroll/.test(`${css.overflow} ${css.overflowY}`)) {
128446
+ const clip3 = parent.getBoundingClientRect();
128447
+ bottom = Math.min(bottom, clip3.bottom);
128448
+ top = Math.max(top, clip3.top);
128449
+ }
128450
+ parent = parent.parentElement;
128451
+ }
128452
+ setPopupAlignLeft(anchor.right - popup.width < left);
128453
+ setPopupAbove(anchor.bottom + popup.height + 4 > bottom && anchor.top - popup.height - 4 >= top);
128454
+ });
128455
+ const [innerControl, setInnerControl] = React11.useState(null);
128456
+ const innerControlRef = React11.useRef(null);
128457
+ useIsomorphicLayoutEffect(() => {
128458
+ const anchor = anchorRef.current;
128459
+ const refresh = () => {
128460
+ const root = context ? anchor?.firstElementChild : null;
128461
+ const found = root instanceof HTMLElement && root.matches(MENU_ANCHOR_CONTROL) && !root.matches(":disabled") ? root : null;
128462
+ innerControlRef.current = found;
128463
+ setInnerControl(found);
128464
+ };
128465
+ refresh();
128466
+ const Observer = anchor?.ownerDocument.defaultView?.MutationObserver;
128467
+ if (!context || !anchor || !Observer) return;
128468
+ const observer = new Observer(refresh);
128469
+ observer.observe(anchor, { childList: true, subtree: true, attributes: true, attributeFilter: ["disabled", "tabindex", "href", "role"] });
128470
+ return () => observer.disconnect();
128471
+ });
128472
+ React11.useEffect(() => {
128473
+ if (!innerControl) return;
128474
+ innerControl.setAttribute("aria-haspopup", "menu");
128475
+ innerControl.setAttribute("aria-expanded", String(open));
128476
+ innerControl.setAttribute("aria-keyshortcuts", "Shift+F10");
128477
+ return () => {
128478
+ innerControl.removeAttribute("aria-haspopup");
128479
+ innerControl.removeAttribute("aria-expanded");
128480
+ innerControl.removeAttribute("aria-keyshortcuts");
128481
+ };
128482
+ }, [innerControl, open]);
128381
128483
  const itemsKey = items.map((it2, i2) => `${it2?.id ?? i2}:${it2?.disabled ? 0 : 1}`).join("|");
128382
128484
  React11.useEffect(() => {
128383
128485
  if (!open || !modal) return;
@@ -128391,84 +128493,156 @@ var init_renderNode = __esm({
128391
128493
  return () => {
128392
128494
  layer.release();
128393
128495
  const active = document.activeElement;
128394
- if (active == null || active === document.body || !document.contains(active)) anchorRef.current?.focus();
128496
+ if (active == null || active === document.body || !document.contains(active)) (innerControlRef.current ?? anchorRef.current)?.focus();
128395
128497
  };
128396
128498
  }, [open, modal]);
128397
- const press = React11.useRef(null);
128398
- const pressFired = React11.useRef(false);
128499
+ const present = (menu) => previewMode ? /* @__PURE__ */ jsx11(PreviewMenuOverlay, { label: anchorLabel, dialogRef, preview: props.preview, ctx, onClose: () => setOpen(false), anchorHost: hostRef.current, children: menu }) : wrapModalMenu(modal, anchorLabel, { ...popupPlacement, ...popupAlignLeft ? { left: 0, right: "auto" } : {}, ...popupAbove ? { bottom: "100%", top: "auto", marginBottom: 4, marginTop: 0 } : {} }, dialogRef, menu);
128500
+ const trapTab = (e2) => {
128501
+ if (!modal || e2.key !== "Tab") return;
128502
+ const items2 = Array.from(menuRef.current?.querySelectorAll('[role="menuitem"][tabindex="0"]') ?? []);
128503
+ if (!items2.length) {
128504
+ e2.preventDefault();
128505
+ return;
128506
+ }
128507
+ const at2 = items2.indexOf(document.activeElement);
128508
+ const next = e2.shiftKey ? at2 <= 0 ? items2.length - 1 : at2 - 1 : at2 < 0 || at2 === items2.length - 1 ? 0 : at2 + 1;
128509
+ e2.preventDefault();
128510
+ items2[next].focus();
128511
+ };
128512
+ const pressTimer = React11.useRef(null);
128513
+ const longPressed = React11.useRef(false);
128514
+ const touchOrigin = React11.useRef(null);
128515
+ const suppressNextClick = React11.useRef(false);
128516
+ const suppressTimer = React11.useRef(null);
128517
+ const clearSuppress = () => {
128518
+ suppressNextClick.current = false;
128519
+ if (suppressTimer.current != null) {
128520
+ clearTimeout(suppressTimer.current);
128521
+ suppressTimer.current = null;
128522
+ }
128523
+ };
128399
128524
  const cancelPress = () => {
128400
- if (press.current) {
128401
- clearTimeout(press.current.timer);
128402
- press.current = null;
128525
+ if (pressTimer.current != null) {
128526
+ clearTimeout(pressTimer.current);
128527
+ pressTimer.current = null;
128403
128528
  }
128404
128529
  };
128405
- React11.useEffect(() => cancelPress, []);
128406
- const contextHandlers = context ? {
128530
+ React11.useEffect(() => () => {
128531
+ cancelPress();
128532
+ clearSuppress();
128533
+ }, []);
128534
+ const startHold = (origin) => {
128535
+ touchOrigin.current = origin;
128536
+ longPressed.current = false;
128537
+ clearSuppress();
128538
+ cancelPress();
128539
+ pressTimer.current = setTimeout(() => {
128540
+ pressTimer.current = null;
128541
+ longPressed.current = true;
128542
+ suppressNextClick.current = true;
128543
+ setOpen(true);
128544
+ }, MENU_LONG_PRESS_MS);
128545
+ };
128546
+ const moveHold = (at2) => {
128547
+ const origin = touchOrigin.current;
128548
+ if (!at2 || !origin || Math.hypot(at2.x - origin.x, at2.y - origin.y) > 10) cancelPress();
128549
+ };
128550
+ const endHold = () => {
128551
+ cancelPress();
128552
+ if (!longPressed.current) return false;
128553
+ if (suppressTimer.current != null) clearTimeout(suppressTimer.current);
128554
+ suppressTimer.current = setTimeout(clearSuppress, MENU_LONG_PRESS_MS);
128555
+ return true;
128556
+ };
128557
+ const anchorHandlers = context ? {
128558
+ // Preserve an interactive anchor's own click without also activating an ancestor.
128559
+ onClick: (e2) => {
128560
+ e2.stopPropagation();
128561
+ },
128407
128562
  onContextMenu: (e2) => {
128408
128563
  e2.preventDefault();
128409
128564
  e2.stopPropagation();
128410
128565
  cancelPress();
128411
128566
  setOpen(true);
128412
128567
  },
128568
+ onTouchStart: (e2) => {
128569
+ const touch = e2.touches?.[0];
128570
+ startHold(touch ? { x: touch.clientX, y: touch.clientY } : null);
128571
+ },
128572
+ onTouchMove: (e2) => {
128573
+ const touch = e2.touches?.[0];
128574
+ moveHold(touch ? { x: touch.clientX, y: touch.clientY } : null);
128575
+ },
128576
+ onTouchCancel: cancelPress,
128577
+ onTouchEnd: (e2) => {
128578
+ if (endHold()) e2.preventDefault();
128579
+ },
128580
+ // The same hold from Pointer Events (a browser may deliver a touch as pointer events
128581
+ // only). One finger raises both families; each start restarts the one timer, so the
128582
+ // hold is still timed once.
128413
128583
  onPointerDown: (e2) => {
128414
- if (e2.pointerType !== "touch") return;
128415
- cancelPress();
128416
- pressFired.current = false;
128417
- press.current = { x: e2.clientX, y: e2.clientY, timer: setTimeout(() => {
128418
- press.current = null;
128419
- pressFired.current = true;
128420
- setOpen(true);
128421
- }, MENU_LONG_PRESS_MS) };
128584
+ if (e2.pointerType === "touch") startHold({ x: e2.clientX, y: e2.clientY });
128422
128585
  },
128423
128586
  onPointerMove: (e2) => {
128424
- if (press.current && Math.hypot(e2.clientX - press.current.x, e2.clientY - press.current.y) > 10) cancelPress();
128587
+ if (e2.pointerType === "touch") moveHold({ x: e2.clientX, y: e2.clientY });
128588
+ },
128589
+ onPointerCancel: (e2) => {
128590
+ if (e2.pointerType === "touch") cancelPress();
128591
+ },
128592
+ onPointerUp: (e2) => {
128593
+ if (e2.pointerType === "touch") endHold();
128425
128594
  },
128426
- onPointerUp: cancelPress,
128427
- onPointerCancel: cancelPress,
128428
128595
  onClickCapture: (e2) => {
128429
- if (pressFired.current) {
128430
- pressFired.current = false;
128596
+ if (!suppressNextClick.current || e2.detail === 0) return;
128597
+ e2.preventDefault();
128598
+ e2.stopPropagation();
128599
+ clearSuppress();
128600
+ },
128601
+ // Browsers raise `contextmenu` for these on a focused element; handled here as well so
128602
+ // the keyboard path does not depend on that. Over an interactive anchor, Enter / Space
128603
+ // stay that control's own; over an inert one the wrapper IS the control, and opening
128604
+ // the menu is the only thing it can do.
128605
+ onKeyDown: (e2) => {
128606
+ if (e2.key === "ContextMenu" || e2.key === "F10" && e2.shiftKey) {
128607
+ e2.preventDefault();
128608
+ e2.stopPropagation();
128609
+ setOpen(true);
128610
+ return;
128611
+ }
128612
+ if (!innerControl && e2.target === e2.currentTarget && (e2.key === "Enter" || e2.key === " ")) {
128431
128613
  e2.preventDefault();
128432
128614
  e2.stopPropagation();
128615
+ setOpen(true);
128433
128616
  }
128434
128617
  }
128435
- } : null;
128436
- const present = (menu) => previewMode ? /* @__PURE__ */ jsx11(PreviewMenuOverlay, { label: anchorLabel, dialogRef, preview: props.preview, ctx, onClose: () => setOpen(false), anchorHost: hostRef.current, children: menu }) : wrapModalMenu(modal, anchorLabel, popupPlacement, dialogRef, menu);
128437
- const trapTab = (e2) => {
128438
- if (!modal || e2.key !== "Tab") return;
128439
- const items2 = Array.from(menuRef.current?.querySelectorAll('[role="menuitem"][tabindex="0"]') ?? []);
128440
- if (!items2.length) {
128618
+ } : {
128619
+ // A Button/ListItem anchor stops its own click from bubbling. Dropdown
128620
+ // activation belongs to Menu, so intercept it before that child handler.
128621
+ onClickCapture: (e2) => {
128441
128622
  e2.preventDefault();
128442
- return;
128623
+ e2.stopPropagation();
128624
+ setOpen((v2) => !v2);
128625
+ },
128626
+ onKeyDown: (e2) => {
128627
+ if (e2.key === "Enter" || e2.key === " ") {
128628
+ e2.preventDefault();
128629
+ e2.stopPropagation();
128630
+ setOpen((v2) => !v2);
128631
+ }
128443
128632
  }
128444
- const at2 = items2.indexOf(document.activeElement);
128445
- const next = e2.shiftKey ? at2 <= 0 ? items2.length - 1 : at2 - 1 : at2 < 0 || at2 === items2.length - 1 ? 0 : at2 + 1;
128446
- e2.preventDefault();
128447
- items2[next].focus();
128448
128633
  };
128449
128634
  return /* @__PURE__ */ jsxs8("span", { ref: hostRef, "data-menu-fill": fill ? "" : void 0, style: { position: "relative", display: fill ? "flex" : "inline-flex", ...wrap }, children: [
128450
128635
  /* @__PURE__ */ jsx11(
128451
128636
  "span",
128452
128637
  {
128453
128638
  ref: anchorRef,
128454
- role: "button",
128455
- tabIndex: 0,
128456
- "aria-haspopup": "menu",
128457
- "aria-expanded": open,
128458
- "aria-label": anchorLabel,
128459
- ...contextHandlers ?? {
128460
- onClick: (e2) => {
128461
- e2.stopPropagation();
128462
- setOpen((v2) => !v2);
128463
- },
128464
- onKeyDown: (e2) => {
128465
- if (e2.key === "Enter" || e2.key === " ") {
128466
- e2.preventDefault();
128467
- e2.stopPropagation();
128468
- setOpen((v2) => !v2);
128469
- }
128470
- }
128471
- },
128639
+ role: innerControl ? void 0 : "button",
128640
+ tabIndex: innerControl ? void 0 : 0,
128641
+ "aria-haspopup": innerControl ? void 0 : "menu",
128642
+ "aria-expanded": innerControl ? void 0 : open,
128643
+ "aria-label": innerControl ? void 0 : anchorLabel,
128644
+ "aria-keyshortcuts": context && !innerControl ? "Shift+F10" : void 0,
128645
+ ...anchorHandlers,
128472
128646
  style: { display: fill ? "flex" : "inline-flex", alignItems: "center", justifyContent: fill ? "stretch" : "center", ...fill ? { flex: "1 1 auto", width: "100%" } : {}, minWidth: 44, minHeight: 44, cursor: context ? void 0 : "pointer", ...context ? { WebkitTouchCallout: "none", userSelect: "none" } : {} },
128473
128647
  children: props.anchor ? fill ? /* @__PURE__ */ jsx11("span", { style: { display: "block", flex: "1 1 auto", minWidth: 0 }, children: renderNode(props.anchor, ctx) }) : renderNode(props.anchor, ctx) : iconSvg("more", { size: 20, color: C2("textSecondary", "#636b78") })
128474
128648
  }
@@ -128480,7 +128654,7 @@ var init_renderNode = __esm({
128480
128654
  role: "menu",
128481
128655
  tabIndex: modal ? -1 : void 0,
128482
128656
  onKeyDown: trapTab,
128483
- style: { ...modal ? {} : popupPlacement, display: "flex", flexDirection: "column", minWidth: 180, ...previewMode ? { width: "100%", boxSizing: "border-box" } : {}, background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 12, boxShadow: "0 6px 20px rgba(0,0,0,.12)", overflow: "hidden", padding: 4 },
128657
+ style: { ...modal ? {} : { ...popupPlacement, ...popupAlignLeft ? { left: 0, right: "auto" } : {}, ...popupAbove ? { bottom: "100%", top: "auto", marginBottom: 4, marginTop: 0 } : {} }, display: "flex", flexDirection: "column", minWidth: 180, ...previewMode ? { width: "100%", boxSizing: "border-box" } : {}, background: C2("surfacePrimary", "#fff"), border: `1px solid ${C2("border", "#e3e3e3")}`, borderRadius: 12, boxShadow: "0 6px 20px rgba(0,0,0,.12)", overflow: "hidden", padding: 4 },
128484
128658
  children: items.map((it2, i2) => /* @__PURE__ */ jsxs8(
128485
128659
  "div",
128486
128660
  {
@@ -128512,6 +128686,8 @@ var init_renderNode = __esm({
128512
128686
  ))
128513
128687
  ] });
128514
128688
  });
128689
+ MENU_LONG_PRESS_MS = 500;
128690
+ menuOpensOnLongPress = (style) => style === "context";
128515
128691
  LoadMoreSentinel = ({ ctx, pagination }) => {
128516
128692
  const raw = pagination?.cursor;
128517
128693
  const isBound = typeof raw === "string" && isBinding(raw);
@@ -129171,7 +129347,7 @@ var init_renderNode = __esm({
129171
129347
  const data = base + pdfOpenFragment(sourceHash, { page, zoom: zoomable ? view.zoom : null, fitWidth: !zoomable });
129172
129348
  const label3 = typeof props.title === "string" && props.title ? props.title : "PDF document";
129173
129349
  const documentStyle = showPageControls || zoomable || allowShare ? { display: "block", width: "100%", flex: "1 1 auto", minHeight: ph ? 0 : 280, border: "none" } : frame;
129174
- const object7 = typeof window === "undefined" ? /* @__PURE__ */ jsx11("object", { "data-himalaya-pdf": "static-fallback", data, type: "application/pdf", "aria-label": label3, style: documentStyle }) : /* @__PURE__ */ jsx11(React11.Suspense, { fallback: /* @__PURE__ */ jsx11("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: documentStyle }), children: /* @__PURE__ */ jsx11(
129350
+ const object8 = typeof window === "undefined" ? /* @__PURE__ */ jsx11("object", { "data-himalaya-pdf": "static-fallback", data, type: "application/pdf", "aria-label": label3, style: documentStyle }) : /* @__PURE__ */ jsx11(React11.Suspense, { fallback: /* @__PURE__ */ jsx11("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: documentStyle }), children: /* @__PURE__ */ jsx11(
129175
129351
  PdfDocumentCanvas,
129176
129352
  {
129177
129353
  src: loadSrc ?? src,
@@ -129185,7 +129361,7 @@ var init_renderNode = __esm({
129185
129361
  style: documentStyle
129186
129362
  }
129187
129363
  ) });
129188
- if (!showPageControls && !zoomable && !allowShare) return object7;
129364
+ if (!showPageControls && !zoomable && !allowShare) return object8;
129189
129365
  const C2 = ctx.color;
129190
129366
  const go2 = (p2) => setNav({ from: rawUrl, page: Math.max(1, pageCount != null ? Math.min(p2, pageCount) : p2), zoom: view.zoom });
129191
129367
  const zoomBy = (d2) => setNav({ from: rawUrl, page: view.page, zoom: pdfZoomStep(view.zoom ?? sourceZoomPercent(sourceHash) ?? null, d2) });
@@ -129203,7 +129379,7 @@ var init_renderNode = __esm({
129203
129379
  const downloadHref = plan?.mode === "retype" ? base : directDoc?.blobUrl ?? null;
129204
129380
  const openHref = base + pdfOpenFragment(sourceHash, { page: shownPage, zoom: zoomable ? view.zoom : null, viewerChrome: true });
129205
129381
  return /* @__PURE__ */ jsxs8("div", { "data-himalaya-pdf": "reader", style: { ...frame, display: "flex", flexDirection: "column", background: C2("surfaceTertiary", "#f4f4f4") }, children: [
129206
- object7,
129382
+ object8,
129207
129383
  /* @__PURE__ */ jsxs8(
129208
129384
  "div",
129209
129385
  {
@@ -138751,8 +138927,8 @@ function sha256hex(b2) {
138751
138927
  function stableStringify(value) {
138752
138928
  if (value === null || typeof value !== "object") return JSON.stringify(value);
138753
138929
  if (Array.isArray(value)) return "[" + value.map(stableStringify).join(",") + "]";
138754
- const object7 = value;
138755
- return "{" + Object.keys(object7).sort().map((key3) => JSON.stringify(key3) + ":" + stableStringify(object7[key3])).join(",") + "}";
138930
+ const object8 = value;
138931
+ return "{" + Object.keys(object8).sort().map((key3) => JSON.stringify(key3) + ":" + stableStringify(object8[key3])).join(",") + "}";
138756
138932
  }
138757
138933
  function manifestContent(m2) {
138758
138934
  const {
@@ -140744,15 +140920,15 @@ async function crawlScreenInner(opts) {
140744
140920
  }
140745
140921
  const first2 = ref.path.split(/[.[]/)[0];
140746
140922
  if (first2 && pathValue(state[ref.svc], first2) === void 0) {
140747
- const optional = ref.collapseWhenEmpty === true;
140923
+ const optional2 = ref.collapseWhenEmpty === true;
140748
140924
  findings.push({
140749
140925
  screen: screenId,
140750
140926
  trigger,
140751
140927
  invariant: "binding-unresolved",
140752
- severity: optional ? "warning" : "error",
140928
+ severity: optional2 ? "warning" : "error",
140753
140929
  message: `binding "$service:${ref.svc}.${ref.path}" reads "${first2}", which is absent from ${ref.svc}'s state`,
140754
140930
  at: ref.at,
140755
- hint: optional ? `this bound prop declares collapseWhenEmpty, so an absent optional value collapses to zero size; declare the field when the UI is meant to show content. ${ref.svc} state keys: ${Object.keys(state[ref.svc] ?? {}).join(", ") || "none"}` : `${ref.svc} state keys: ${Object.keys(state[ref.svc] ?? {}).join(", ") || "none"}`
140931
+ hint: optional2 ? `this bound prop declares collapseWhenEmpty, so an absent optional value collapses to zero size; declare the field when the UI is meant to show content. ${ref.svc} state keys: ${Object.keys(state[ref.svc] ?? {}).join(", ") || "none"}` : `${ref.svc} state keys: ${Object.keys(state[ref.svc] ?? {}).join(", ") || "none"}`
140756
140932
  });
140757
140933
  }
140758
140934
  }
@@ -145426,9 +145602,9 @@ var init_customer_apple_connect = __esm({
145426
145602
  });
145427
145603
 
145428
145604
  // ../../node_modules/fast-xml-parser/src/util.js
145429
- function getAllMatches(string5, regex) {
145605
+ function getAllMatches(string6, regex) {
145430
145606
  const matches = [];
145431
- let match = regex.exec(string5);
145607
+ let match = regex.exec(string6);
145432
145608
  while (match) {
145433
145609
  const allmatches = [];
145434
145610
  allmatches.startIndex = regex.lastIndex - match[0].length;
@@ -145437,7 +145613,7 @@ function getAllMatches(string5, regex) {
145437
145613
  allmatches.push(match[index]);
145438
145614
  }
145439
145615
  matches.push(allmatches);
145440
- match = regex.exec(string5);
145616
+ match = regex.exec(string6);
145441
145617
  }
145442
145618
  return matches;
145443
145619
  }
@@ -145452,8 +145628,8 @@ var init_util2 = __esm({
145452
145628
  nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
145453
145629
  nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*";
145454
145630
  regexName = new RegExp("^" + nameRegexp + "$");
145455
- isName2 = function(string5) {
145456
- const match = regexName.exec(string5);
145631
+ isName2 = function(string6) {
145632
+ const match = regexName.exec(string6);
145457
145633
  return !(match === null || typeof match === "undefined");
145458
145634
  };
145459
145635
  DANGEROUS_PROPERTY_NAMES = [
@@ -151016,22 +151192,22 @@ function resolveTagName2(name, isAttribute2, options, matcher, xmlVersion) {
151016
151192
  if (qName(name, { xmlVersion })) return name;
151017
151193
  return options.sanitizeName(name, { isAttribute: isAttribute2, matcher: matcher.readOnly() });
151018
151194
  }
151019
- function processTextOrObjNode(object7, key3, level, matcher, xmlVersion) {
151020
- const attrValues = this.extractAttributes(object7);
151195
+ function processTextOrObjNode(object8, key3, level, matcher, xmlVersion) {
151196
+ const attrValues = this.extractAttributes(object8);
151021
151197
  matcher.push(key3, attrValues);
151022
151198
  const isStopNode = this.checkStopNode(matcher);
151023
151199
  if (isStopNode) {
151024
- const rawContent = this.buildRawContent(object7);
151025
- const attrStr = this.buildAttributesForStopNode(object7);
151200
+ const rawContent = this.buildRawContent(object8);
151201
+ const attrStr = this.buildAttributesForStopNode(object8);
151026
151202
  matcher.pop();
151027
151203
  return this.buildObjectNode(rawContent, key3, attrStr, level);
151028
151204
  }
151029
- const result = this.j2x(object7, level + 1, matcher, xmlVersion);
151205
+ const result = this.j2x(object8, level + 1, matcher, xmlVersion);
151030
151206
  matcher.pop();
151031
151207
  if (key3[0] === "?") {
151032
151208
  return this.buildTextValNode("", key3, result.attrStr, level, matcher);
151033
- } else if (object7[this.options.textNodeName] !== void 0 && Object.keys(object7).length === 1) {
151034
- return this.buildTextValNode(object7[this.options.textNodeName], key3, result.attrStr, level, matcher);
151209
+ } else if (object8[this.options.textNodeName] !== void 0 && Object.keys(object8).length === 1) {
151210
+ return this.buildTextValNode(object8[this.options.textNodeName], key3, result.attrStr, level, matcher);
151035
151211
  } else {
151036
151212
  return this.buildObjectNode(result.val, key3, result.attrStr, level);
151037
151213
  }
@@ -162124,7 +162300,7 @@ ${releaseId}`;
162124
162300
  "access-control-allow-origin": origin,
162125
162301
  vary: "Origin",
162126
162302
  "access-control-allow-methods": "GET, HEAD, POST, PUT, DELETE, OPTIONS",
162127
- "access-control-allow-headers": "Content-Type, If-None-Match, X-Himalaya-Schema-Versions, Accept-Language, X-Himalaya-Session, X-Himalaya-User, X-Himalaya-Platform, X-Himalaya-App-Version, X-Himalaya-App, X-Himalaya-Release, X-Himalaya-Release-Source, X-Himalaya-Preview-Token",
162303
+ "access-control-allow-headers": "Content-Type, If-None-Match, X-Himalaya-Schema-Versions, Accept-Language, X-Himalaya-Session, X-Himalaya-User, X-Himalaya-Platform, X-Himalaya-App-Version, X-Himalaya-App, X-Himalaya-Release, X-Himalaya-Release-Source, X-Himalaya-Preview-Token, X-Himalaya-Member-Session",
162128
162304
  "access-control-expose-headers": "ETag, X-Himalaya-Bundle-Integrity, X-Himalaya-App",
162129
162305
  "access-control-allow-credentials": "true"
162130
162306
  };
@@ -162375,23 +162551,31 @@ ${releaseId}`;
162375
162551
  }
162376
162552
  const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
162377
162553
  if ("error" in exchangeClient) return json5(501, { error: `member_exchange_${exchangeClient.error}` }, noStore);
162378
- let rawBody;
162379
- try {
162380
- rawBody = await request.text();
162381
- } catch {
162382
- return json5(400, { error: "body_unreadable" }, noStore);
162383
- }
162384
- if (!rawBody) return json5(400, { error: "empty_body" }, noStore);
162385
- let exchangeBody;
162386
- try {
162387
- exchangeBody = JSON.parse(rawBody);
162388
- } catch {
162389
- return json5(400, { error: "invalid_json" }, noStore);
162554
+ const headerToken = request.headers.get("x-himalaya-member-session");
162555
+ let sessionToken = headerToken ?? void 0;
162556
+ let received = { via: "header", tokenType: typeof sessionToken };
162557
+ if (headerToken === null) {
162558
+ let rawBody;
162559
+ try {
162560
+ rawBody = await request.text();
162561
+ } catch {
162562
+ return json5(400, { error: "body_unreadable" }, noStore);
162563
+ }
162564
+ if (!rawBody) return json5(400, { error: "empty_body" }, noStore);
162565
+ let exchangeBody;
162566
+ try {
162567
+ exchangeBody = JSON.parse(rawBody);
162568
+ } catch {
162569
+ return json5(400, { error: "invalid_json" }, noStore);
162570
+ }
162571
+ if (!exchangeBody || typeof exchangeBody !== "object" || Array.isArray(exchangeBody)) return json5(400, { error: "invalid_body" }, noStore);
162572
+ sessionToken = exchangeBody.sessionToken;
162573
+ received = { via: "body", keys: Object.keys(exchangeBody).slice(0, 8), tokenType: typeof sessionToken, bodyBytes: new TextEncoder().encode(rawBody).length };
162390
162574
  }
162391
- if (!exchangeBody || typeof exchangeBody !== "object" || Array.isArray(exchangeBody)) return json5(400, { error: "invalid_body" }, noStore);
162392
- const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken: exchangeBody.sessionToken }, webwixFetch);
162575
+ if (typeof sessionToken === "string") received.tokenLength = sessionToken.length;
162576
+ const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken }, webwixFetch);
162393
162577
  if (exchanged.ok) return json5(200, { accessToken: exchanged.accessToken, expiresAt: exchanged.expiresAt }, noStore);
162394
- if (exchanged.code === "bad_request") return json5(400, { error: "invalid_session_token" }, noStore);
162578
+ if (exchanged.code === "bad_request") return json5(400, { error: "invalid_session_token", received }, noStore);
162395
162579
  return json5(502, { error: exchanged.code, ...exchanged.status !== void 0 ? { status: exchanged.status } : {} }, noStore);
162396
162580
  }
162397
162581
  if (request.method === "POST" && path2 === "/v1/__webwix/call") {
@@ -163470,33 +163654,33 @@ var init_preview_assets_generated = __esm({
163470
163654
  "../../packages/serve/src/preview-assets.generated.ts"() {
163471
163655
  init_preview_assets_format();
163472
163656
  PREVIEW_ASSET_MANIFEST = [
163473
- { key: "assets/DashboardHost-1jypScD2.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "73b7086df0cf3448a2bfe3ba276ec00a38c55542caebb2156675a36738a83fa3" },
163474
- { key: "assets/DevDrawer-BQ1xp__f.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "d431422763f468ea57239ef416f3bce71549375b67f20e83d29511d75f15c46f" },
163475
- { key: "assets/IdiomCompare-CK_q192T.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "59ca2d4f2faac878ecae8740faecf1d8e50136c0bb2ab28cb3ec12cd6df5d7bc" },
163476
- { key: "assets/LightboxViewer-COhqSEoj.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "bf1696b76f086904f2e6f5aa88d73c809f0b75ccf0e2f85bb20170b4d4b93d43" },
163477
- { key: "assets/PhonePreviewControl-CJBzXYBw.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "bafcaf544306b6c960671f01480b68b97b8d9f639f59f71bfe0a40d1630483c3" },
163478
- { key: "assets/SchemeCompare-s2ETtRsO.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "c5f62861ae1843b28a961e2154c026e71e3f14b9bf933e3fb482eebaef2eb36f" },
163479
- { key: "assets/index-C4uN0_ln.js", contentType: "application/javascript; charset=utf-8", offset: 69245, length: 1301860, sha256: "b9728fe4fee91086095f4f6ccd03c4eb067e10b39c513a7c7e67ad07001f4919" },
163480
- { key: "assets/pdf-CJsqT7M-.js", contentType: "application/javascript; charset=utf-8", offset: 1371105, length: 488199, sha256: "5daa7c97dddee008bb1fc809bc405cb3b1fb6aad7392584218136961e503018d" },
163481
- { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1859304, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
163482
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1859377, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
163483
- { key: "assets/pdfDocument-Cii5pAUm.js", contentType: "application/javascript; charset=utf-8", offset: 3176411, length: 3379, sha256: "bab1c624304f13d68d450b4bc8abd0574d394b1e4cddd3ac0d5ff6151debad24" },
163484
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3179790, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
163485
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3182056, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
163486
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3186666, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
163487
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3675250, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
163488
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3766174, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
163489
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3857158, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
163490
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3948138, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
163491
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4039010, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
163492
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4129990, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
163493
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4238626, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
163494
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4347710, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
163495
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4456758, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
163496
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4564458, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
163497
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4652566, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
163498
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4659314, length: 4947, sha256: "f1696b9320a90e440ce6db5a9eb3cfc62260a1d7a8b32c0fa78c749b013359e0" },
163499
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4664261, length: 17786, sha256: "084107ca997628c248f1b0ba3a7494744850df39fad813546ab8bdb82a6058da" }
163657
+ { key: "assets/DashboardHost-BlGAa_tG.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "0f7cc9e2b70351a23ff4931d09bc963cf0e33f1f2949b1dac93e9ffcf8b69633" },
163658
+ { key: "assets/DevDrawer-Clq7zqoV.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "0f318554db9dd003ee67102b44e9aca5e45e6d30c62af2c2bf0a766db4ab3df3" },
163659
+ { key: "assets/IdiomCompare-C4dinyX6.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "2f783ec20211c0ca3e44c4ac9d53f2ba2c4eba7991e31b1f619ba2cdf1f39e8b" },
163660
+ { key: "assets/LightboxViewer-3j1E4vH3.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "4fafd99e12232059515afa9160d62c04db384bd56d15e7cebdd1f0a53851d703" },
163661
+ { key: "assets/PhonePreviewControl-b-i9t3rn.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "874b3acf0fdd3563ae7d37bd141d007507a366c9c9b47af1150197a80b7f0238" },
163662
+ { key: "assets/SchemeCompare-QJzbc_PN.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "8c79c45e546bb90e6dcde9ef4d60680067af86824761207623570b5fd4d74140" },
163663
+ { key: "assets/index-DYn2kUhP.js", contentType: "application/javascript; charset=utf-8", offset: 69245, length: 1305180, sha256: "8ff192e0ea1d950b45d1acab0c4163b418adb77c89be423e45f08d3c3cafe938" },
163664
+ { key: "assets/pdf-B59NrUcT.js", contentType: "application/javascript; charset=utf-8", offset: 1374425, length: 488199, sha256: "6a5411ab72f5c19d596e97fc8318e467eea6ce27d6b83a26ffc66b31a8d0a9bd" },
163665
+ { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1862624, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
163666
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1862697, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
163667
+ { key: "assets/pdfDocument-DEzCQYk6.js", contentType: "application/javascript; charset=utf-8", offset: 3179731, length: 3379, sha256: "718ddb164baa2dd7707570d42aea9b40b92f9005af346dde70e3c33ee9b86c54" },
163668
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3183110, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
163669
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3185376, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
163670
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3189986, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
163671
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3678570, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
163672
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3769494, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
163673
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3860478, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
163674
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3951458, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
163675
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4042330, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
163676
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4133310, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
163677
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4241946, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
163678
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4351030, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
163679
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4460078, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
163680
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4567778, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
163681
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4655886, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
163682
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4662634, length: 4947, sha256: "8b24700b2d1b5ab3f2356f4ccb659e6c079ad023a026f253418efc38ea1b7394" },
163683
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4667581, length: 17786, sha256: "084107ca997628c248f1b0ba3a7494744850df39fad813546ab8bdb82a6058da" }
163500
163684
  ];
163501
163685
  }
163502
163686
  });
@@ -176141,8 +176325,8 @@ function isString(data) {
176141
176325
  function isObject(data) {
176142
176326
  return objectToString(data) === "[object Object]";
176143
176327
  }
176144
- function validate3(bool, cbOrMessage, message) {
176145
- if (bool) return;
176328
+ function validate3(bool2, cbOrMessage, message) {
176329
+ if (bool2) return;
176146
176330
  const cb = typeof cbOrMessage === "function" ? cbOrMessage : void 0;
176147
176331
  let options = typeof cbOrMessage === "function" ? message : cbOrMessage;
176148
176332
  if (!isObject(options)) options = "[object Object]";
@@ -179287,11 +179471,11 @@ import { createHash as createHash46 } from "node:crypto";
179287
179471
  import { readFileSync as readFileSync105, statSync as statSync22 } from "node:fs";
179288
179472
  import { resolve as resolve62, join as join92 } from "node:path";
179289
179473
  import ts9 from "typescript";
179290
- function object4(value) {
179474
+ function object5(value) {
179291
179475
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
179292
179476
  }
179293
179477
  function readJson9(path2) {
179294
- return object4(JSON.parse(readFileSync105(path2, "utf8"))) ?? {};
179478
+ return object5(JSON.parse(readFileSync105(path2, "utf8"))) ?? {};
179295
179479
  }
179296
179480
  function parseArgs(args) {
179297
179481
  let evidenceDir;
@@ -179319,22 +179503,22 @@ function parseArgs(args) {
179319
179503
  return { evidenceDir: resolve62(evidenceDir), contentDir: resolve62(contentDir2), json: json8 };
179320
179504
  }
179321
179505
  function authoredControls(raw) {
179322
- const screens = object4(raw.screens);
179323
- const headers2 = object4(raw.headers);
179506
+ const screens = object5(raw.screens);
179507
+ const headers2 = object5(raw.headers);
179324
179508
  if (!screens || !headers2 || !Object.keys(screens).length) {
179325
179509
  return { controls: /* @__PURE__ */ new Set(), screens: 0, error: "raw-structure.json is missing authored screens or headers." };
179326
179510
  }
179327
179511
  const controls = /* @__PURE__ */ new Set();
179328
179512
  let count2 = 0;
179329
179513
  for (const [screenId, rawScreen] of Object.entries(screens)) {
179330
- const screen = object4(rawScreen);
179514
+ const screen = object5(rawScreen);
179331
179515
  const headerId = typeof screen?.headerId === "string" ? screen.headerId : void 0;
179332
179516
  if (!headerId) continue;
179333
179517
  count2++;
179334
- const header = object4(headers2[headerId]);
179518
+ const header = object5(headers2[headerId]);
179335
179519
  if (!header) return { controls, screens: count2, error: `Authored header ${headerId} is missing for screen ${screenId}.` };
179336
- const settings = object4(header?.settings) ?? header;
179337
- const topBarSettings = object4(settings?.topBarSettings);
179520
+ const settings = object5(header?.settings) ?? header;
179521
+ const topBarSettings = object5(settings?.topBarSettings);
179338
179522
  const choice = (modern, legacy) => {
179339
179523
  const current = topBarSettings?.[modern];
179340
179524
  if (current !== void 0) return typeof current === "boolean" ? current : void 0;
@@ -179437,7 +179621,7 @@ function validate4(evidenceDir, contentDir2) {
179437
179621
  if (manifest.stage !== "collected") throw new Error('manifest.json must have stage "collected".');
179438
179622
  const rawPath = join92(evidenceDir, "raw-structure.json");
179439
179623
  const rawBytes = readFileSync105(rawPath);
179440
- const expectedHash = object4(manifest.sha256)?.["raw-structure.json"];
179624
+ const expectedHash = object5(manifest.sha256)?.["raw-structure.json"];
179441
179625
  if (typeof expectedHash !== "string" || !/^[a-f0-9]{64}$/i.test(expectedHash)) {
179442
179626
  throw new Error("manifest.json is missing a valid raw-structure.json hash.");
179443
179627
  }
@@ -179510,46 +179694,46 @@ function buildSourceGraph(raw, enriched = {}) {
179510
179694
  function sourceMap2(key3) {
179511
179695
  const result = {};
179512
179696
  for (const structure of enrichedStructures) {
179513
- for (const [id, value] of Object.entries(object5(structure[key3]))) {
179697
+ for (const [id, value] of Object.entries(object6(structure[key3]))) {
179514
179698
  if (!own4(result, id)) result[id] = value;
179515
179699
  }
179516
179700
  }
179517
- for (const [id, value] of Object.entries(object5(raw[key3]))) {
179518
- result[id] = own4(result, id) ? { ...object5(result[id]), ...object5(value) } : value;
179701
+ for (const [id, value] of Object.entries(object6(raw[key3]))) {
179702
+ result[id] = own4(result, id) ? { ...object6(result[id]), ...object6(value) } : value;
179519
179703
  }
179520
179704
  return result;
179521
179705
  }
179522
179706
  function definitionMap(key3) {
179523
179707
  const result = {};
179524
179708
  for (const structure of enrichedStructures) {
179525
- for (const [id, value] of Object.entries(object5(object5(structure.definitions)[key3]))) {
179709
+ for (const [id, value] of Object.entries(object6(object6(structure.definitions)[key3]))) {
179526
179710
  if (!own4(result, id)) result[id] = value;
179527
179711
  }
179528
179712
  }
179529
- for (const [id, value] of Object.entries(object5(object5(raw.definitions)[key3]))) {
179530
- result[id] = own4(result, id) ? { ...object5(result[id]), ...object5(value) } : value;
179713
+ for (const [id, value] of Object.entries(object6(object6(raw.definitions)[key3]))) {
179714
+ result[id] = own4(result, id) ? { ...object6(result[id]), ...object6(value) } : value;
179531
179715
  }
179532
179716
  return result;
179533
179717
  }
179534
179718
  function platformMap(platformStructure, key3) {
179535
- const result = { ...object5(platformStructure[key3]) };
179536
- for (const [id, value] of Object.entries(object5(raw[key3]))) {
179537
- result[id] = own4(result, id) ? { ...object5(result[id]), ...object5(value) } : value;
179719
+ const result = { ...object6(platformStructure[key3]) };
179720
+ for (const [id, value] of Object.entries(object6(raw[key3]))) {
179721
+ result[id] = own4(result, id) ? { ...object6(result[id]), ...object6(value) } : value;
179538
179722
  }
179539
179723
  return result;
179540
179724
  }
179541
179725
  function platformDefinitionMap(platformStructure, key3) {
179542
- const result = { ...object5(object5(platformStructure.definitions)[key3]) };
179543
- for (const [id, value] of Object.entries(object5(object5(raw.definitions)[key3]))) {
179544
- result[id] = own4(result, id) ? { ...object5(result[id]), ...object5(value) } : value;
179726
+ const result = { ...object6(object6(platformStructure.definitions)[key3]) };
179727
+ for (const [id, value] of Object.entries(object6(object6(raw.definitions)[key3]))) {
179728
+ result[id] = own4(result, id) ? { ...object6(result[id]), ...object6(value) } : value;
179545
179729
  }
179546
179730
  return result;
179547
179731
  }
179548
179732
  const screens = sourceMap2("screens");
179549
- const layouts = object5(raw.layoutItems);
179550
- const allSections = object5(raw.sections);
179551
- const sections = Object.fromEntries(Object.entries(allSections).filter(([, v2]) => !string3(object5(v2).sectionDefinitionId)?.startsWith("ntt.")));
179552
- const headers2 = object5(raw.headers);
179733
+ const layouts = object6(raw.layoutItems);
179734
+ const allSections = object6(raw.sections);
179735
+ const sections = Object.fromEntries(Object.entries(allSections).filter(([, v2]) => !string4(object6(v2).sectionDefinitionId)?.startsWith("ntt.")));
179736
+ const headers2 = object6(raw.headers);
179553
179737
  const topBars = sourceMap2("topBars");
179554
179738
  const topBarButtonDefinitions = definitionMap("topBarButtons");
179555
179739
  const actionDefinitions = definitionMap("actions");
@@ -179561,23 +179745,23 @@ function buildSourceGraph(raw, enriched = {}) {
179561
179745
  const layoutAliases = /* @__PURE__ */ new Map();
179562
179746
  const interactions = [];
179563
179747
  for (const [id, value] of Object.entries(layouts)) {
179564
- const slug = string3(object5(value).slug);
179748
+ const slug = string4(object6(value).slug);
179565
179749
  if (slug) layoutAliases.set(slug, [...layoutAliases.get(slug) ?? [], id]);
179566
179750
  }
179567
179751
  for (const [id, value] of Object.entries(screens)) {
179568
- for (const ref of array3(object5(object5(value).layout).items)) {
179569
- const layoutId = string3(object5(ref).layoutItemId);
179752
+ for (const ref of array3(object6(object6(value).layout).items)) {
179753
+ const layoutId = string4(object6(ref).layoutItemId);
179570
179754
  if (layoutId) parents.set(layoutId, [.../* @__PURE__ */ new Set([...parents.get(layoutId) ?? [], id])]);
179571
179755
  }
179572
179756
  }
179573
179757
  for (const [name, values] of Object.entries({ screens, layoutItems: layouts, sections, headers: headers2 })) {
179574
179758
  for (const [id, value] of Object.entries(values)) {
179575
- const declared = string3(object5(value).id);
179759
+ const declared = string4(object6(value).id);
179576
179760
  if (declared !== void 0 && declared !== id) warnings.push({ code: "id_conflict", pointer: `/${name}/${part(id)}/id`, reference: declared });
179577
179761
  }
179578
179762
  }
179579
179763
  function order(refs, pointer) {
179580
- const indexes = refs.map((ref) => object5(ref).orderIndex).filter((v2) => typeof v2 === "number");
179764
+ const indexes = refs.map((ref) => object6(ref).orderIndex).filter((v2) => typeof v2 === "number");
179581
179765
  if (indexes.some((v2, i2) => i2 > 0 && v2 <= indexes[i2 - 1])) warnings.push({ code: "order_conflict", pointer });
179582
179766
  }
179583
179767
  function route(value, contract, pointer) {
@@ -179607,10 +179791,10 @@ function buildSourceGraph(raw, enriched = {}) {
179607
179791
  warnings.push({ code: "action_depth_limit", pointer: current.pointer });
179608
179792
  continue;
179609
179793
  }
179610
- const item = object5(current.value);
179611
- const kind = string3(item.type);
179794
+ const item = object6(current.value);
179795
+ const kind = string4(item.type);
179612
179796
  if (kind && ["goToScreen", "vertical", "form", "url", "tel", "mailto"].includes(kind)) {
179613
- const dest = string3(item.screenId);
179797
+ const dest = string4(item.screenId);
179614
179798
  interactions.push({ pointer: current.pointer, context, action: item, ...kind === "goToScreen" && dest ? { destination: route(dest, "layout", current.pointer) } : {} });
179615
179799
  }
179616
179800
  for (const [key3, child] of Object.entries(current.value)) pending.push({ value: child, pointer: `${current.pointer}/${part(key3)}`, depth: current.depth + 1 });
@@ -179619,17 +179803,17 @@ function buildSourceGraph(raw, enriched = {}) {
179619
179803
  function placements(value, pointer, context = pointer) {
179620
179804
  const refs = array3(value);
179621
179805
  const inScope = refs.filter((ref) => {
179622
- const id = string3(object5(ref).elementId);
179623
- return !id || !string3(object5(allSections[id]).sectionDefinitionId)?.startsWith("ntt.");
179806
+ const id = string4(object6(ref).elementId);
179807
+ return !id || !string4(object6(allSections[id]).sectionDefinitionId)?.startsWith("ntt.");
179624
179808
  });
179625
179809
  order(inScope, pointer);
179626
179810
  return refs.flatMap((value2, index) => {
179627
- const ref = object5(value2);
179628
- const id = string3(ref.elementId);
179629
- if (id && string3(object5(allSections[id]).sectionDefinitionId)?.startsWith("ntt.")) return [];
179811
+ const ref = object6(value2);
179812
+ const id = string4(ref.elementId);
179813
+ if (id && string4(object6(allSections[id]).sectionDefinitionId)?.startsWith("ntt.")) return [];
179630
179814
  const refPointer = `${pointer}/${index}`;
179631
179815
  if (ref.elementType !== "SECTION") {
179632
- warnings.push({ code: "unknown_element_type", pointer: refPointer, reference: string3(ref.elementType) });
179816
+ warnings.push({ code: "unknown_element_type", pointer: refPointer, reference: string4(ref.elementType) });
179633
179817
  return [];
179634
179818
  }
179635
179819
  if (!id || !own4(sections, id)) {
@@ -179639,19 +179823,19 @@ function buildSourceGraph(raw, enriched = {}) {
179639
179823
  usedSections.add(id);
179640
179824
  const placementContext = `${context}/${index}`;
179641
179825
  actions(sections[id], `/sections/${part(id)}`, placementContext);
179642
- return [{ pointer: refPointer, context: placementContext, arrayIndex: index, ...own4(ref, "orderIndex") ? { orderIndex: ref.orderIndex } : {}, sectionId: id, sectionDefinitionId: string3(object5(sections[id]).sectionDefinitionId), reference: ref }];
179826
+ return [{ pointer: refPointer, context: placementContext, arrayIndex: index, ...own4(ref, "orderIndex") ? { orderIndex: ref.orderIndex } : {}, sectionId: id, sectionDefinitionId: string4(object6(sections[id]).sectionDefinitionId), reference: ref }];
179643
179827
  });
179644
179828
  }
179645
179829
  function topBarButtons(value, side2, pointer, context, buttonDefinitions = topBarButtonDefinitions, availableActions = actionDefinitions, trackInteractions = true) {
179646
- const bar = object5(value);
179830
+ const bar = object6(value);
179647
179831
  const idsKey = `${side2}ButtonIds`;
179648
179832
  const definitionsKey = `${side2}ButtonDefinitions`;
179649
179833
  const refs = own4(bar, idsKey) ? array3(bar[idsKey]) : array3(bar[definitionsKey]);
179650
179834
  return refs.map((ref, index) => {
179651
- const refObject = object5(ref);
179652
- const id = typeof ref === "string" ? ref : string3(refObject.topBarButtonDefinitionId) ?? string3(refObject.id);
179835
+ const refObject = object6(ref);
179836
+ const id = typeof ref === "string" ? ref : string4(refObject.topBarButtonDefinitionId) ?? string4(refObject.id);
179653
179837
  const definition = id && own4(buttonDefinitions, id) ? buttonDefinitions[id] : typeof ref === "object" && ref !== null ? ref : void 0;
179654
- const actionDefinitionId = string3(object5(definition).actionDefinitionId) ?? string3(refObject.actionDefinitionId);
179838
+ const actionDefinitionId = string4(object6(definition).actionDefinitionId) ?? string4(refObject.actionDefinitionId);
179655
179839
  const actionDefinition = actionDefinitionId && own4(availableActions, actionDefinitionId) ? availableActions[actionDefinitionId] : void 0;
179656
179840
  const buttonPointer = `${pointer}/${side2}/${index}`;
179657
179841
  if (trackInteractions) {
@@ -179667,19 +179851,19 @@ function buildSourceGraph(raw, enriched = {}) {
179667
179851
  });
179668
179852
  }
179669
179853
  const screenGraph = Object.entries(screens).map(([screenId, source]) => {
179670
- const screen = object5(source);
179671
- const layout = object5(screen.layout);
179672
- const type = string3(layout.type);
179854
+ const screen = object6(source);
179855
+ const layout = object6(screen.layout);
179856
+ const type = string4(layout.type);
179673
179857
  const refs = array3(layout.items);
179674
179858
  const pointer = `/screens/${part(screenId)}`;
179675
179859
  order(refs, `${pointer}/layout/items`);
179676
179860
  if (type !== "TOP_TABS" && type !== "LINEAR") warnings.push({ code: "unknown_layout", pointer: `${pointer}/layout/type` });
179677
- const headerId = string3(screen.headerId);
179861
+ const headerId = string4(screen.headerId);
179678
179862
  if (headerId) {
179679
179863
  if (!own4(headers2, headerId)) warnings.push({ code: "missing_reference", pointer: `${pointer}/headerId`, reference: headerId });
179680
179864
  else actions(headers2[headerId], `/headers/${part(headerId)}`, pointer);
179681
179865
  }
179682
- const topBarId = string3(screen.topBarId);
179866
+ const topBarId = string4(screen.topBarId);
179683
179867
  const topBar = topBarId && own4(topBars, topBarId) ? topBars[topBarId] : void 0;
179684
179868
  if (topBarId && topBar === void 0 && own4(raw, "topBars")) {
179685
179869
  warnings.push({ code: "missing_reference", pointer: `${pointer}/topBarId`, reference: topBarId });
@@ -179691,8 +179875,8 @@ function buildSourceGraph(raw, enriched = {}) {
179691
179875
  };
179692
179876
  const topBarByPlatform = Object.fromEntries(Object.entries(enriched).flatMap(([platform, platformStructure]) => {
179693
179877
  if (!platformStructure) return [];
179694
- const platformScreen = { ...object5(object5(platformStructure.screens)[screenId]), ...object5(object5(raw.screens)[screenId]) };
179695
- const platformTopBarId = string3(platformScreen.topBarId);
179878
+ const platformScreen = { ...object6(object6(platformStructure.screens)[screenId]), ...object6(object6(raw.screens)[screenId]) };
179879
+ const platformTopBarId = string4(platformScreen.topBarId);
179696
179880
  if (!platformTopBarId) return [];
179697
179881
  const platformTopBar = platformMap(platformStructure, "topBars")[platformTopBarId];
179698
179882
  if (platformTopBar === void 0) return [];
@@ -179710,13 +179894,13 @@ function buildSourceGraph(raw, enriched = {}) {
179710
179894
  }]];
179711
179895
  }));
179712
179896
  const pages2 = refs.flatMap((value, index) => {
179713
- const ref = object5(value), id = string3(ref.layoutItemId);
179897
+ const ref = object6(value), id = string4(ref.layoutItemId);
179714
179898
  if (!id || !own4(layouts, id)) {
179715
179899
  warnings.push({ code: "missing_reference", pointer: `${pointer}/layout/items/${index}`, ...id ? { reference: id } : {} });
179716
179900
  return [];
179717
179901
  }
179718
179902
  usedLayouts.add(id);
179719
- const item = object5(layouts[id]);
179903
+ const item = object6(layouts[id]);
179720
179904
  return [{
179721
179905
  layoutItemId: id,
179722
179906
  arrayIndex: index,
@@ -179746,7 +179930,7 @@ function buildSourceGraph(raw, enriched = {}) {
179746
179930
  };
179747
179931
  });
179748
179932
  const detachedLayouts = Object.entries(layouts).filter(([id]) => !usedLayouts.has(id)).map(([id, value]) => {
179749
- const item = object5(value);
179933
+ const item = object6(value);
179750
179934
  return {
179751
179935
  layoutItemId: id,
179752
179936
  title: item.title,
@@ -179756,26 +179940,26 @@ function buildSourceGraph(raw, enriched = {}) {
179756
179940
  placements: placements(item.elements, `/layoutItems/${part(id)}/elements`)
179757
179941
  };
179758
179942
  });
179759
- const bottomTabs = array3(object5(raw.navigation).bottomTabs);
179943
+ const bottomTabs = array3(object6(raw.navigation).bottomTabs);
179760
179944
  order(bottomTabs, "/navigation/bottomTabs");
179761
179945
  const navigation = bottomTabs.map((value, index) => {
179762
- const entry = object5(value), id = string3(entry.screenId);
179946
+ const entry = object6(value), id = string4(entry.screenId);
179763
179947
  if (!id) warnings.push({ code: "missing_reference", pointer: `/navigation/bottomTabs/${index}/screenId` });
179764
179948
  return { arrayIndex: index, entry, ...id ? { destination: route(id, "screen", `/navigation/bottomTabs/${index}/screenId`) } : {} };
179765
179949
  });
179766
- const overrides = Object.entries(object5(raw.screenOverrides)).map(([alias2, value]) => {
179767
- const id = string3(object5(value).screenId);
179950
+ const overrides = Object.entries(object6(raw.screenOverrides)).map(([alias2, value]) => {
179951
+ const id = string4(object6(value).screenId);
179768
179952
  if (!id) warnings.push({ code: "missing_reference", pointer: `/screenOverrides/${part(alias2)}/screenId` });
179769
179953
  return { alias: alias2, source: value, ...id ? { destination: route(id, "screen", `/screenOverrides/${part(alias2)}/screenId`) } : {} };
179770
179954
  });
179771
- const profile = object5(raw.businessProfile);
179955
+ const profile = object6(raw.businessProfile);
179772
179956
  const profilePlacements = placements(profile.elements, "/businessProfile/elements");
179773
179957
  return {
179774
179958
  schemaVersion: 1,
179775
179959
  interpretation: "authored-evidence-not-evaluated-access",
179776
179960
  ordering: "source-array-order",
179777
179961
  appSettings: raw.settings,
179778
- navigation: { entries: navigation, settings: object5(raw.navigation).settings, firstAuthoredScreenId: string3(object5(bottomTabs[0]).screenId) },
179962
+ navigation: { entries: navigation, settings: object6(raw.navigation).settings, firstAuthoredScreenId: string4(object6(bottomTabs[0]).screenId) },
179779
179963
  screens: screenGraph,
179780
179964
  detachedLayouts,
179781
179965
  businessProfile: { settings: profile.settings, placements: profilePlacements },
@@ -179789,12 +179973,12 @@ function buildSourceGraph(raw, enriched = {}) {
179789
179973
  next: "Interpret source settings, definition CTAs, top bars and runtime conditions with himi docs one-app-to-himi-app. This graph indexes basic actions; it does not claim complete business-journey coverage."
179790
179974
  };
179791
179975
  }
179792
- var object5, array3, string3, part, own4;
179976
+ var object6, array3, string4, part, own4;
179793
179977
  var init_graph = __esm({
179794
179978
  "src/one-app/graph.ts"() {
179795
- object5 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
179979
+ object6 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
179796
179980
  array3 = (value) => Array.isArray(value) ? value : [];
179797
- string3 = (value) => typeof value === "string" ? value : void 0;
179981
+ string4 = (value) => typeof value === "string" ? value : void 0;
179798
179982
  part = (value) => value.replaceAll("~", "~0").replaceAll("/", "~1");
179799
179983
  own4 = (value, key3) => Object.hasOwn(value, key3);
179800
179984
  }
@@ -179802,40 +179986,40 @@ var init_graph = __esm({
179802
179986
 
179803
179987
  // src/one-app/navigation.ts
179804
179988
  function sourceNavigationKind(raw) {
179805
- const navigation = object6(raw.navigation);
179806
- if (object6(navigation.settings).drawerMode === true) return "side-menu";
179989
+ const navigation = object7(raw.navigation);
179990
+ if (object7(navigation.settings).drawerMode === true) return "side-menu";
179807
179991
  const entries = array4(navigation.bottomTabs);
179808
179992
  if (entries.length > 1) return "bottom-tabs";
179809
- const screens = object6(raw.screens);
179810
- const screenId = string4(object6(entries[0]).screenId);
179811
- const screen = screenId && Object.hasOwn(screens, screenId) ? object6(screens[screenId]) : {};
179812
- return object6(screen.layout).type === "TOP_TABS" ? "top-tabs" : "single";
179993
+ const screens = object7(raw.screens);
179994
+ const screenId = string5(object7(entries[0]).screenId);
179995
+ const screen = screenId && Object.hasOwn(screens, screenId) ? object7(screens[screenId]) : {};
179996
+ return object7(screen.layout).type === "TOP_TABS" ? "top-tabs" : "single";
179813
179997
  }
179814
179998
  function planNavigation(raw, policy = "bottom-tabs") {
179815
- const navigation = object6(raw.navigation);
179999
+ const navigation = object7(raw.navigation);
179816
180000
  const entries = array4(navigation.bottomTabs);
179817
- const screens = object6(raw.screens);
179818
- const layouts = object6(raw.layoutItems);
180001
+ const screens = object7(raw.screens);
180002
+ const layouts = object7(raw.layoutItems);
179819
180003
  const kind = sourceNavigationKind(raw);
179820
180004
  const warnings = [];
179821
- const firstEntry = object6(entries[0]);
179822
- const rootScreenId = string4(firstEntry.screenId) ?? null;
179823
- const rootScreen = rootScreenId && Object.hasOwn(screens, rootScreenId) ? object6(screens[rootScreenId]) : {};
179824
- const rootLayout = object6(rootScreen.layout);
179825
- const settings = object6(navigation.settings);
179826
- const appInstance = string4(raw.appInstance) ?? null;
180005
+ const firstEntry = object7(entries[0]);
180006
+ const rootScreenId = string5(firstEntry.screenId) ?? null;
180007
+ const rootScreen = rootScreenId && Object.hasOwn(screens, rootScreenId) ? object7(screens[rootScreenId]) : {};
180008
+ const rootLayout = object7(rootScreen.layout);
180009
+ const settings = object7(navigation.settings);
180010
+ const appInstance = string5(raw.appInstance) ?? null;
179827
180011
  const source = {
179828
180012
  kind,
179829
180013
  appInstance,
179830
180014
  rootScreenId,
179831
- initialTabId: kind === "top-tabs" ? string4(rootLayout.initialTabId) ?? null : null,
180015
+ initialTabId: kind === "top-tabs" ? string5(rootLayout.initialTabId) ?? null : null,
179832
180016
  showBottomNavigationLabels: settings.showBottomNavigationLabels
179833
180017
  };
179834
180018
  const next = "Build navigation from this plan with himi docs one-app-to-himi-app. Report every warning; the plan does not replace the source graph.";
179835
180019
  if (kind === "bottom-tabs") {
179836
180020
  entries.forEach((value, index) => {
179837
- const id = string4(object6(value).screenId);
179838
- if (id && Object.hasOwn(screens, id) && object6(object6(screens[id]).layout).type === "TOP_TABS") {
180021
+ const id = string5(object7(value).screenId);
180022
+ if (id && Object.hasOwn(screens, id) && object7(object7(screens[id]).layout).type === "TOP_TABS") {
179839
180023
  warnings.push({ code: "nested_top_tabs", pointer: `/screens/${part2(id)}/layout/type`, reference: `/navigation/bottomTabs/${index}` });
179840
180024
  }
179841
180025
  });
@@ -179846,30 +180030,30 @@ function planNavigation(raw, policy = "bottom-tabs") {
179846
180030
  const tabs = [];
179847
180031
  const hiddenPages = [];
179848
180032
  array4(rootLayout.items).forEach((value, index) => {
179849
- const layoutItemId = string4(object6(value).layoutItemId);
180033
+ const layoutItemId = string5(object7(value).layoutItemId);
179850
180034
  const itemPointer = `${pointer}/${index}`;
179851
180035
  if (!layoutItemId || !Object.hasOwn(layouts, layoutItemId)) {
179852
180036
  warnings.push({ code: "missing_reference", pointer: itemPointer, ...layoutItemId ? { reference: layoutItemId } : {} });
179853
180037
  return;
179854
180038
  }
179855
- const layout = object6(layouts[layoutItemId]);
179856
- if (object6(layout.settings).hideFromNavigation === true) {
180039
+ const layout = object7(layouts[layoutItemId]);
180040
+ if (object7(layout.settings).hideFromNavigation === true) {
179857
180041
  hiddenPages.push({ layoutItemId, pointer: itemPointer });
179858
180042
  return;
179859
180043
  }
179860
180044
  const layoutPointer = `/layoutItems/${part2(layoutItemId)}`;
179861
- const label3 = string4(layout.title) ?? null;
180045
+ const label3 = string5(layout.title) ?? null;
179862
180046
  if (label3 === null) warnings.push({ code: "missing_label", pointer: `${layoutPointer}/title` });
179863
- const fallback = tabs.length === 0 ? string4(firstEntry.icon) : void 0;
179864
- const icon = string4(layout.icon) ?? fallback ?? null;
180047
+ const fallback = tabs.length === 0 ? string5(firstEntry.icon) : void 0;
180048
+ const icon = string5(layout.icon) ?? fallback ?? null;
179865
180049
  if (icon === null) warnings.push({ code: "missing_icon", pointer: `${layoutPointer}/icon` });
179866
180050
  tabs.push({
179867
180051
  layoutItemId,
179868
180052
  pointer: itemPointer,
179869
180053
  label: label3,
179870
180054
  icon,
179871
- iconSource: string4(layout.icon) ? "layout-item" : fallback ? "bottom-entry" : "missing",
179872
- header: tabs.length === 0 ? { kind: "source", headerId: string4(rootScreen.headerId) ?? null } : { kind: "default" }
180055
+ iconSource: string5(layout.icon) ? "layout-item" : fallback ? "bottom-entry" : "missing",
180056
+ header: tabs.length === 0 ? { kind: "source", headerId: string5(rootScreen.headerId) ?? null } : { kind: "default" }
179873
180057
  });
179874
180058
  });
179875
180059
  if (!tabs.length) warnings.push({ code: "no_visible_page", pointer });
@@ -179898,12 +180082,12 @@ function planNavigation(raw, policy = "bottom-tabs") {
179898
180082
  next
179899
180083
  };
179900
180084
  }
179901
- var object6, array4, string4, part2, TOP_TABS_POLICIES, MAX_BAR_TABS;
180085
+ var object7, array4, string5, part2, TOP_TABS_POLICIES, MAX_BAR_TABS;
179902
180086
  var init_navigation = __esm({
179903
180087
  "src/one-app/navigation.ts"() {
179904
- object6 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
180088
+ object7 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
179905
180089
  array4 = (value) => Array.isArray(value) ? value : [];
179906
- string4 = (value) => typeof value === "string" && value ? value : void 0;
180090
+ string5 = (value) => typeof value === "string" && value ? value : void 0;
179907
180091
  part2 = (value) => value.replaceAll("~", "~0").replaceAll("/", "~1");
179908
180092
  TOP_TABS_POLICIES = ["bottom-tabs", "keep"];
179909
180093
  MAX_BAR_TABS = 5;