@wix/himalaya-cli 0.1478.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.
- package/dist/cli.mjs +454 -263
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +2 -25
- package/guides/component-reference.md +3 -9
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +29 -229
- package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/beauty-salon/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/branded-lite/dev/index.ts +58 -364
- package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/branded-lite/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/branded-lite/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/community-club/dev/index.ts +26 -134
- package/templates/community-club/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/community-club/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/events-meetups/dev/index.ts +26 -134
- package/templates/events-meetups/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/gym-fitness/dev/index.ts +55 -363
- package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/gym-fitness/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/gym-fitness/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/nonprofit-cause/dev/index.ts +29 -136
- package/templates/nonprofit-cause/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/nonprofit-cause/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/podcast-creator/dev/index.ts +29 -136
- package/templates/podcast-creator/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/podcast-creator/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/portfolio-creative/dev/index.ts +26 -134
- package/templates/portfolio-creative/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/restaurant/dev/index.ts +26 -134
- package/templates/restaurant/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/yoga-studio/dev/index.ts +55 -363
- package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/yoga-studio/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +6 -1
- 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
|
|
6190
|
-
if (!
|
|
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(
|
|
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(
|
|
6197
|
+
error(object8, "initialState and handlers must be object literals.");
|
|
6198
6198
|
return;
|
|
6199
6199
|
}
|
|
6200
6200
|
function literal(n2) {
|
|
@@ -13229,6 +13229,29 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
|
|
|
13229
13229
|
}
|
|
13230
13230
|
};
|
|
13231
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, "");
|
|
13232
13255
|
if (Object.keys(services).length > 0) {
|
|
13233
13256
|
const scanOptionsPath = (node, at2) => {
|
|
13234
13257
|
if (Array.isArray(node)) {
|
|
@@ -18730,6 +18753,7 @@ function resolveIdiom(tokens2, ctx = {}) {
|
|
|
18730
18753
|
var IDIOM_CONTEXTS, UNSAFE_KEYS;
|
|
18731
18754
|
var init_idiom = __esm({
|
|
18732
18755
|
"../../core/ts/src/idiom.ts"() {
|
|
18756
|
+
"use strict";
|
|
18733
18757
|
IDIOM_CONTEXTS = {
|
|
18734
18758
|
ios: { native: ["ios"] },
|
|
18735
18759
|
android: { native: ["material"] },
|
|
@@ -40056,6 +40080,28 @@ var init_actionParams = __esm({
|
|
|
40056
40080
|
}
|
|
40057
40081
|
});
|
|
40058
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
|
+
|
|
40059
40105
|
// ../../core/web-renderer/src/icons.tsx
|
|
40060
40106
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
40061
40107
|
function normalize2(name) {
|
|
@@ -45798,11 +45844,11 @@ var init_pdf = __esm({
|
|
|
45798
45844
|
var DESCRIPTORS = __webpack_require__3(3724);
|
|
45799
45845
|
var definePropertyModule = __webpack_require__3(4913);
|
|
45800
45846
|
var createPropertyDescriptor = __webpack_require__3(6980);
|
|
45801
|
-
module.exports = DESCRIPTORS ? function(
|
|
45802
|
-
return definePropertyModule.f(
|
|
45803
|
-
} : function(
|
|
45804
|
-
|
|
45805
|
-
return
|
|
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;
|
|
45806
45852
|
};
|
|
45807
45853
|
},
|
|
45808
45854
|
/***/
|
|
@@ -45821,9 +45867,9 @@ var init_pdf = __esm({
|
|
|
45821
45867
|
var DESCRIPTORS = __webpack_require__3(3724);
|
|
45822
45868
|
var definePropertyModule = __webpack_require__3(4913);
|
|
45823
45869
|
var createPropertyDescriptor = __webpack_require__3(6980);
|
|
45824
|
-
module.exports = function(
|
|
45825
|
-
if (DESCRIPTORS) definePropertyModule.f(
|
|
45826
|
-
else
|
|
45870
|
+
module.exports = function(object8, key3, value) {
|
|
45871
|
+
if (DESCRIPTORS) definePropertyModule.f(object8, key3, createPropertyDescriptor(0, value));
|
|
45872
|
+
else object8[key3] = value;
|
|
45827
45873
|
};
|
|
45828
45874
|
},
|
|
45829
45875
|
/***/
|
|
@@ -46113,9 +46159,9 @@ var init_pdf = __esm({
|
|
|
46113
46159
|
6706(module, __unused_webpack_exports, __webpack_require__3) {
|
|
46114
46160
|
var uncurryThis = __webpack_require__3(9504);
|
|
46115
46161
|
var aCallable = __webpack_require__3(9306);
|
|
46116
|
-
module.exports = function(
|
|
46162
|
+
module.exports = function(object8, key3, method) {
|
|
46117
46163
|
try {
|
|
46118
|
-
return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(
|
|
46164
|
+
return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object8, key3)[method]));
|
|
46119
46165
|
} catch (error) {
|
|
46120
46166
|
}
|
|
46121
46167
|
};
|
|
@@ -46445,8 +46491,8 @@ var init_pdf = __esm({
|
|
|
46445
46491
|
var value = data[normalize4(feature)];
|
|
46446
46492
|
return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
46447
46493
|
};
|
|
46448
|
-
var normalize4 = isForced.normalize = function(
|
|
46449
|
-
return String(
|
|
46494
|
+
var normalize4 = isForced.normalize = function(string6) {
|
|
46495
|
+
return String(string6).replace(replacement, ".").toLowerCase();
|
|
46450
46496
|
};
|
|
46451
46497
|
var data = isForced.data = {};
|
|
46452
46498
|
var NATIVE = isForced.NATIVE = "N";
|
|
@@ -47083,13 +47129,13 @@ var init_pdf = __esm({
|
|
|
47083
47129
|
var $Object = Object;
|
|
47084
47130
|
var ObjectPrototype = $Object.prototype;
|
|
47085
47131
|
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function(O2) {
|
|
47086
|
-
var
|
|
47087
|
-
if (hasOwn(
|
|
47088
|
-
var constructor =
|
|
47089
|
-
if (isCallable(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) {
|
|
47090
47136
|
return constructor.prototype;
|
|
47091
47137
|
}
|
|
47092
|
-
return
|
|
47138
|
+
return object8 instanceof $Object ? ObjectPrototype : null;
|
|
47093
47139
|
};
|
|
47094
47140
|
},
|
|
47095
47141
|
/***/
|
|
@@ -47105,8 +47151,8 @@ var init_pdf = __esm({
|
|
|
47105
47151
|
var indexOf = __webpack_require__3(9617).indexOf;
|
|
47106
47152
|
var hiddenKeys = __webpack_require__3(421);
|
|
47107
47153
|
var push = uncurryThis([].push);
|
|
47108
|
-
module.exports = function(
|
|
47109
|
-
var O2 = toIndexedObject(
|
|
47154
|
+
module.exports = function(object8, names2) {
|
|
47155
|
+
var O2 = toIndexedObject(object8);
|
|
47110
47156
|
var i2 = 0;
|
|
47111
47157
|
var result = [];
|
|
47112
47158
|
var key3;
|
|
@@ -47747,10 +47793,10 @@ var init_pdf = __esm({
|
|
|
47747
47793
|
var $Array = globalThis2.Array;
|
|
47748
47794
|
var at2 = uncurryThis("".charAt);
|
|
47749
47795
|
var floor2 = Math.floor;
|
|
47750
|
-
var skipAsciiWhitespace = function(
|
|
47751
|
-
var length =
|
|
47796
|
+
var skipAsciiWhitespace = function(string6, index) {
|
|
47797
|
+
var length = string6.length;
|
|
47752
47798
|
for (; index < length; index++) {
|
|
47753
|
-
var chr = at2(
|
|
47799
|
+
var chr = at2(string6, index);
|
|
47754
47800
|
if (chr !== " " && chr !== " " && chr !== "\n" && chr !== "\f" && chr !== "\r") break;
|
|
47755
47801
|
}
|
|
47756
47802
|
return index;
|
|
@@ -47787,8 +47833,8 @@ var init_pdf = __esm({
|
|
|
47787
47833
|
}
|
|
47788
47834
|
return written + elementsLength;
|
|
47789
47835
|
};
|
|
47790
|
-
module.exports = function(
|
|
47791
|
-
aString(
|
|
47836
|
+
module.exports = function(string6, options, into, maxLength) {
|
|
47837
|
+
aString(string6);
|
|
47792
47838
|
anObjectOrUndefined(options);
|
|
47793
47839
|
var alphabet = getAlphabetOption(options) === "base64" ? base64Alphabet : base64UrlAlphabet;
|
|
47794
47840
|
var lastChunkHandling = options ? options.lastChunkHandling : void 0;
|
|
@@ -47797,14 +47843,14 @@ var init_pdf = __esm({
|
|
|
47797
47843
|
throw new TypeError2("Incorrect `lastChunkHandling` option");
|
|
47798
47844
|
}
|
|
47799
47845
|
if (into) notDetached(into.buffer);
|
|
47800
|
-
var stringLength =
|
|
47846
|
+
var stringLength = string6.length;
|
|
47801
47847
|
var bytes2 = into || $Array(floor2(stringLength * 3 / 4));
|
|
47802
47848
|
var written = 0;
|
|
47803
47849
|
var read = 0;
|
|
47804
47850
|
var chunk = "";
|
|
47805
47851
|
var index = 0;
|
|
47806
47852
|
if (maxLength) while (true) {
|
|
47807
|
-
index = skipAsciiWhitespace(
|
|
47853
|
+
index = skipAsciiWhitespace(string6, index);
|
|
47808
47854
|
if (index === stringLength) {
|
|
47809
47855
|
if (chunk.length > 0) {
|
|
47810
47856
|
if (lastChunkHandling === "stop-before-partial") {
|
|
@@ -47822,13 +47868,13 @@ var init_pdf = __esm({
|
|
|
47822
47868
|
read = stringLength;
|
|
47823
47869
|
break;
|
|
47824
47870
|
}
|
|
47825
|
-
var chr = at2(
|
|
47871
|
+
var chr = at2(string6, index);
|
|
47826
47872
|
++index;
|
|
47827
47873
|
if (chr === "=") {
|
|
47828
47874
|
if (chunk.length < 2) {
|
|
47829
47875
|
throw new SyntaxError2("Padding is too early");
|
|
47830
47876
|
}
|
|
47831
|
-
index = skipAsciiWhitespace(
|
|
47877
|
+
index = skipAsciiWhitespace(string6, index);
|
|
47832
47878
|
if (chunk.length === 2) {
|
|
47833
47879
|
if (index === stringLength) {
|
|
47834
47880
|
if (lastChunkHandling === "stop-before-partial") {
|
|
@@ -47836,9 +47882,9 @@ var init_pdf = __esm({
|
|
|
47836
47882
|
}
|
|
47837
47883
|
throw new SyntaxError2("Malformed padding: only one =");
|
|
47838
47884
|
}
|
|
47839
|
-
if (at2(
|
|
47885
|
+
if (at2(string6, index) === "=") {
|
|
47840
47886
|
++index;
|
|
47841
|
-
index = skipAsciiWhitespace(
|
|
47887
|
+
index = skipAsciiWhitespace(string6, index);
|
|
47842
47888
|
}
|
|
47843
47889
|
}
|
|
47844
47890
|
if (index < stringLength) {
|
|
@@ -47877,12 +47923,12 @@ var init_pdf = __esm({
|
|
|
47877
47923
|
var SyntaxError2 = globalThis2.SyntaxError;
|
|
47878
47924
|
var min = Math.min;
|
|
47879
47925
|
var stringMatch = uncurryThis("".match);
|
|
47880
|
-
module.exports = function(
|
|
47881
|
-
var stringLength =
|
|
47926
|
+
module.exports = function(string6, into) {
|
|
47927
|
+
var stringLength = string6.length;
|
|
47882
47928
|
if (stringLength % 2 !== 0) throw new SyntaxError2("String should be an even number of characters");
|
|
47883
47929
|
var maxLength = into ? min(into.length, stringLength / 2) : stringLength / 2;
|
|
47884
47930
|
var bytes2 = into || new Uint8Array2(maxLength);
|
|
47885
|
-
var segments = stringMatch(
|
|
47931
|
+
var segments = stringMatch(string6, /[\S\s]{2}/g);
|
|
47886
47932
|
var written = 0;
|
|
47887
47933
|
for (; written < maxLength; written++) {
|
|
47888
47934
|
var result = +("0x" + segments[written] + "0");
|
|
@@ -48549,13 +48595,13 @@ var init_pdf = __esm({
|
|
|
48549
48595
|
}
|
|
48550
48596
|
return call(reviver, holder, name, val, context);
|
|
48551
48597
|
};
|
|
48552
|
-
var internalizeProperty = function(
|
|
48598
|
+
var internalizeProperty = function(object8, key3, value) {
|
|
48553
48599
|
if (DESCRIPTORS) {
|
|
48554
|
-
var descriptor = getOwnPropertyDescriptor(
|
|
48600
|
+
var descriptor = getOwnPropertyDescriptor(object8, key3);
|
|
48555
48601
|
if (descriptor && !descriptor.configurable) return;
|
|
48556
48602
|
}
|
|
48557
|
-
if (value === void 0) delete
|
|
48558
|
-
else createProperty(
|
|
48603
|
+
if (value === void 0) delete object8[key3];
|
|
48604
|
+
else createProperty(object8, key3, value);
|
|
48559
48605
|
};
|
|
48560
48606
|
var Node2 = function(value, end, source, nodes) {
|
|
48561
48607
|
this.value = value;
|
|
@@ -48600,7 +48646,7 @@ var init_pdf = __esm({
|
|
|
48600
48646
|
var source = this.source;
|
|
48601
48647
|
var i2 = this.index + 1;
|
|
48602
48648
|
var expectKeypair = false;
|
|
48603
|
-
var
|
|
48649
|
+
var object8 = {};
|
|
48604
48650
|
var nodes = {};
|
|
48605
48651
|
var closed = false;
|
|
48606
48652
|
while (i2 < source.length) {
|
|
@@ -48617,7 +48663,7 @@ var init_pdf = __esm({
|
|
|
48617
48663
|
i2 = this.skip(IS_WHITESPACE, i2);
|
|
48618
48664
|
result = this.fork(i2).parse();
|
|
48619
48665
|
createProperty(nodes, key3, result);
|
|
48620
|
-
createProperty(
|
|
48666
|
+
createProperty(object8, key3, result.value);
|
|
48621
48667
|
i2 = this.until([",", "}"], result.end);
|
|
48622
48668
|
var chr = at2(source, i2);
|
|
48623
48669
|
if (chr === ",") {
|
|
@@ -48630,7 +48676,7 @@ var init_pdf = __esm({
|
|
|
48630
48676
|
}
|
|
48631
48677
|
}
|
|
48632
48678
|
if (!closed) throw new SyntaxError2("Unterminated object at: " + i2);
|
|
48633
|
-
return this.node(OBJECT,
|
|
48679
|
+
return this.node(OBJECT, object8, this.index, i2, nodes);
|
|
48634
48680
|
},
|
|
48635
48681
|
array: function() {
|
|
48636
48682
|
var source = this.source;
|
|
@@ -48785,9 +48831,9 @@ var init_pdf = __esm({
|
|
|
48785
48831
|
if (!isSymbol(replaced)) return replaced;
|
|
48786
48832
|
}, space);
|
|
48787
48833
|
} : $stringify;
|
|
48788
|
-
var fixIllFormedJSON = function(match, offset,
|
|
48789
|
-
var prev = charAt(
|
|
48790
|
-
var next = charAt(
|
|
48834
|
+
var fixIllFormedJSON = function(match, offset, string6) {
|
|
48835
|
+
var prev = charAt(string6, offset - 1);
|
|
48836
|
+
var next = charAt(string6, offset + 1);
|
|
48791
48837
|
if (exec(leadingSurrogates, match) && !exec(trailingSurrogates, next) || exec(trailingSurrogates, match) && !exec(leadingSurrogates, prev)) {
|
|
48792
48838
|
return "\\u" + numberToString2(charCodeAt(match, 0), 16);
|
|
48793
48839
|
}
|
|
@@ -48905,10 +48951,10 @@ var init_pdf = __esm({
|
|
|
48905
48951
|
var chr = charAt(json8, i2);
|
|
48906
48952
|
if (chr === '"') {
|
|
48907
48953
|
var end = parseJSONString(json8, ++i2).end - 1;
|
|
48908
|
-
var
|
|
48909
|
-
if (slice(
|
|
48910
|
-
else if (slice(
|
|
48911
|
-
else result += '"' +
|
|
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 + '"';
|
|
48912
48958
|
i2 = end;
|
|
48913
48959
|
} else result += chr;
|
|
48914
48960
|
}
|
|
@@ -49283,8 +49329,8 @@ var init_pdf = __esm({
|
|
|
49283
49329
|
}
|
|
49284
49330
|
})();
|
|
49285
49331
|
if (Uint8Array2) $2({ target: "Uint8Array", stat: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
|
|
49286
|
-
fromBase64: function fromBase642(
|
|
49287
|
-
var result = $fromBase64(
|
|
49332
|
+
fromBase64: function fromBase642(string6) {
|
|
49333
|
+
var result = $fromBase64(string6, arguments.length > 1 ? arguments[1] : void 0, null, 9007199254740991);
|
|
49288
49334
|
return arrayFromConstructorAndList(Uint8Array2, result.bytes);
|
|
49289
49335
|
}
|
|
49290
49336
|
});
|
|
@@ -49315,9 +49361,9 @@ var init_pdf = __esm({
|
|
|
49315
49361
|
}
|
|
49316
49362
|
})();
|
|
49317
49363
|
if (Uint8Array2) $2({ target: "Uint8Array", proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
|
|
49318
|
-
setFromBase64: function setFromBase64(
|
|
49364
|
+
setFromBase64: function setFromBase64(string6) {
|
|
49319
49365
|
anUint8Array(this);
|
|
49320
|
-
var result = $fromBase64(
|
|
49366
|
+
var result = $fromBase64(string6, arguments.length > 1 ? arguments[1] : void 0, this, this.length);
|
|
49321
49367
|
return { read: result.read, written: result.written };
|
|
49322
49368
|
}
|
|
49323
49369
|
});
|
|
@@ -49339,11 +49385,11 @@ var init_pdf = __esm({
|
|
|
49339
49385
|
}
|
|
49340
49386
|
}
|
|
49341
49387
|
if (globalThis2.Uint8Array) $2({ target: "Uint8Array", proto: true, forced: throwsOnLengthTrackingView() }, {
|
|
49342
|
-
setFromHex: function setFromHex(
|
|
49388
|
+
setFromHex: function setFromHex(string6) {
|
|
49343
49389
|
anUint8Array(this);
|
|
49344
|
-
aString(
|
|
49390
|
+
aString(string6);
|
|
49345
49391
|
notDetached(this.buffer);
|
|
49346
|
-
var read = $fromHex(
|
|
49392
|
+
var read = $fromHex(string6, this).read;
|
|
49347
49393
|
return { read, written: read / 2 };
|
|
49348
49394
|
}
|
|
49349
49395
|
});
|
|
@@ -127351,7 +127397,7 @@ function reportUnknownComponent(ctx, pkg, type) {
|
|
|
127351
127397
|
function unknownComponentShowsDeveloperLabel(ctx) {
|
|
127352
127398
|
return ctx.debugUnknownComponents ?? ctx.previewSurface != null;
|
|
127353
127399
|
}
|
|
127354
|
-
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,
|
|
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;
|
|
127355
127401
|
var init_renderNode = __esm({
|
|
127356
127402
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
127357
127403
|
"use strict";
|
|
@@ -127373,6 +127419,7 @@ var init_renderNode = __esm({
|
|
|
127373
127419
|
init_env();
|
|
127374
127420
|
init_ambient_motion();
|
|
127375
127421
|
init_actionParams();
|
|
127422
|
+
init_menuItems();
|
|
127376
127423
|
init_icons();
|
|
127377
127424
|
init_picker_field();
|
|
127378
127425
|
init_pickerField();
|
|
@@ -128342,13 +128389,16 @@ var init_renderNode = __esm({
|
|
|
128342
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
|
|
128343
128390
|
] });
|
|
128344
128391
|
};
|
|
128345
|
-
|
|
128392
|
+
MENU_ANCHOR_CONTROL = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="button"], [role="link"]';
|
|
128346
128393
|
MenuNode = withExtras("MenuNode", ({ props, ctx, wrap }) => {
|
|
128347
128394
|
const [open, setOpen] = React11.useState(false);
|
|
128348
128395
|
const hostRef = React11.useRef(null);
|
|
128349
|
-
const context = props.style
|
|
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 : []);
|
|
128350
128400
|
const previewMode = context && props.preview != null;
|
|
128351
|
-
const items =
|
|
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 }));
|
|
128352
128402
|
const C2 = ctx.color;
|
|
128353
128403
|
React11.useEffect(() => {
|
|
128354
128404
|
if (!open) return;
|
|
@@ -128379,6 +128429,57 @@ var init_renderNode = __esm({
|
|
|
128379
128429
|
const anchorRef = React11.useRef(null);
|
|
128380
128430
|
const menuRef = React11.useRef(null);
|
|
128381
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]);
|
|
128382
128483
|
const itemsKey = items.map((it2, i2) => `${it2?.id ?? i2}:${it2?.disabled ? 0 : 1}`).join("|");
|
|
128383
128484
|
React11.useEffect(() => {
|
|
128384
128485
|
if (!open || !modal) return;
|
|
@@ -128392,84 +128493,156 @@ var init_renderNode = __esm({
|
|
|
128392
128493
|
return () => {
|
|
128393
128494
|
layer.release();
|
|
128394
128495
|
const active = document.activeElement;
|
|
128395
|
-
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();
|
|
128396
128497
|
};
|
|
128397
128498
|
}, [open, modal]);
|
|
128398
|
-
const
|
|
128399
|
-
const
|
|
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
|
+
};
|
|
128400
128524
|
const cancelPress = () => {
|
|
128401
|
-
if (
|
|
128402
|
-
clearTimeout(
|
|
128403
|
-
|
|
128525
|
+
if (pressTimer.current != null) {
|
|
128526
|
+
clearTimeout(pressTimer.current);
|
|
128527
|
+
pressTimer.current = null;
|
|
128404
128528
|
}
|
|
128405
128529
|
};
|
|
128406
|
-
React11.useEffect(() =>
|
|
128407
|
-
|
|
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
|
+
},
|
|
128408
128562
|
onContextMenu: (e2) => {
|
|
128409
128563
|
e2.preventDefault();
|
|
128410
128564
|
e2.stopPropagation();
|
|
128411
128565
|
cancelPress();
|
|
128412
128566
|
setOpen(true);
|
|
128413
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.
|
|
128414
128583
|
onPointerDown: (e2) => {
|
|
128415
|
-
if (e2.pointerType
|
|
128416
|
-
cancelPress();
|
|
128417
|
-
pressFired.current = false;
|
|
128418
|
-
press.current = { x: e2.clientX, y: e2.clientY, timer: setTimeout(() => {
|
|
128419
|
-
press.current = null;
|
|
128420
|
-
pressFired.current = true;
|
|
128421
|
-
setOpen(true);
|
|
128422
|
-
}, MENU_LONG_PRESS_MS) };
|
|
128584
|
+
if (e2.pointerType === "touch") startHold({ x: e2.clientX, y: e2.clientY });
|
|
128423
128585
|
},
|
|
128424
128586
|
onPointerMove: (e2) => {
|
|
128425
|
-
if (
|
|
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();
|
|
128426
128594
|
},
|
|
128427
|
-
onPointerUp: cancelPress,
|
|
128428
|
-
onPointerCancel: cancelPress,
|
|
128429
128595
|
onClickCapture: (e2) => {
|
|
128430
|
-
if (
|
|
128431
|
-
|
|
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) {
|
|
128432
128607
|
e2.preventDefault();
|
|
128433
128608
|
e2.stopPropagation();
|
|
128609
|
+
setOpen(true);
|
|
128610
|
+
return;
|
|
128611
|
+
}
|
|
128612
|
+
if (!innerControl && e2.target === e2.currentTarget && (e2.key === "Enter" || e2.key === " ")) {
|
|
128613
|
+
e2.preventDefault();
|
|
128614
|
+
e2.stopPropagation();
|
|
128615
|
+
setOpen(true);
|
|
128434
128616
|
}
|
|
128435
128617
|
}
|
|
128436
|
-
} :
|
|
128437
|
-
|
|
128438
|
-
|
|
128439
|
-
|
|
128440
|
-
const items2 = Array.from(menuRef.current?.querySelectorAll('[role="menuitem"][tabindex="0"]') ?? []);
|
|
128441
|
-
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) => {
|
|
128442
128622
|
e2.preventDefault();
|
|
128443
|
-
|
|
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
|
+
}
|
|
128444
128632
|
}
|
|
128445
|
-
const at2 = items2.indexOf(document.activeElement);
|
|
128446
|
-
const next = e2.shiftKey ? at2 <= 0 ? items2.length - 1 : at2 - 1 : at2 < 0 || at2 === items2.length - 1 ? 0 : at2 + 1;
|
|
128447
|
-
e2.preventDefault();
|
|
128448
|
-
items2[next].focus();
|
|
128449
128633
|
};
|
|
128450
128634
|
return /* @__PURE__ */ jsxs8("span", { ref: hostRef, "data-menu-fill": fill ? "" : void 0, style: { position: "relative", display: fill ? "flex" : "inline-flex", ...wrap }, children: [
|
|
128451
128635
|
/* @__PURE__ */ jsx11(
|
|
128452
128636
|
"span",
|
|
128453
128637
|
{
|
|
128454
128638
|
ref: anchorRef,
|
|
128455
|
-
role: "button",
|
|
128456
|
-
tabIndex: 0,
|
|
128457
|
-
"aria-haspopup": "menu",
|
|
128458
|
-
"aria-expanded": open,
|
|
128459
|
-
"aria-label": anchorLabel,
|
|
128460
|
-
|
|
128461
|
-
|
|
128462
|
-
e2.stopPropagation();
|
|
128463
|
-
setOpen((v2) => !v2);
|
|
128464
|
-
},
|
|
128465
|
-
onKeyDown: (e2) => {
|
|
128466
|
-
if (e2.key === "Enter" || e2.key === " ") {
|
|
128467
|
-
e2.preventDefault();
|
|
128468
|
-
e2.stopPropagation();
|
|
128469
|
-
setOpen((v2) => !v2);
|
|
128470
|
-
}
|
|
128471
|
-
}
|
|
128472
|
-
},
|
|
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,
|
|
128473
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" } : {} },
|
|
128474
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") })
|
|
128475
128648
|
}
|
|
@@ -128481,7 +128654,7 @@ var init_renderNode = __esm({
|
|
|
128481
128654
|
role: "menu",
|
|
128482
128655
|
tabIndex: modal ? -1 : void 0,
|
|
128483
128656
|
onKeyDown: trapTab,
|
|
128484
|
-
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 },
|
|
128485
128658
|
children: items.map((it2, i2) => /* @__PURE__ */ jsxs8(
|
|
128486
128659
|
"div",
|
|
128487
128660
|
{
|
|
@@ -128513,6 +128686,8 @@ var init_renderNode = __esm({
|
|
|
128513
128686
|
))
|
|
128514
128687
|
] });
|
|
128515
128688
|
});
|
|
128689
|
+
MENU_LONG_PRESS_MS = 500;
|
|
128690
|
+
menuOpensOnLongPress = (style) => style === "context";
|
|
128516
128691
|
LoadMoreSentinel = ({ ctx, pagination }) => {
|
|
128517
128692
|
const raw = pagination?.cursor;
|
|
128518
128693
|
const isBound = typeof raw === "string" && isBinding(raw);
|
|
@@ -129172,7 +129347,7 @@ var init_renderNode = __esm({
|
|
|
129172
129347
|
const data = base + pdfOpenFragment(sourceHash, { page, zoom: zoomable ? view.zoom : null, fitWidth: !zoomable });
|
|
129173
129348
|
const label3 = typeof props.title === "string" && props.title ? props.title : "PDF document";
|
|
129174
129349
|
const documentStyle = showPageControls || zoomable || allowShare ? { display: "block", width: "100%", flex: "1 1 auto", minHeight: ph ? 0 : 280, border: "none" } : frame;
|
|
129175
|
-
const
|
|
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(
|
|
129176
129351
|
PdfDocumentCanvas,
|
|
129177
129352
|
{
|
|
129178
129353
|
src: loadSrc ?? src,
|
|
@@ -129186,7 +129361,7 @@ var init_renderNode = __esm({
|
|
|
129186
129361
|
style: documentStyle
|
|
129187
129362
|
}
|
|
129188
129363
|
) });
|
|
129189
|
-
if (!showPageControls && !zoomable && !allowShare) return
|
|
129364
|
+
if (!showPageControls && !zoomable && !allowShare) return object8;
|
|
129190
129365
|
const C2 = ctx.color;
|
|
129191
129366
|
const go2 = (p2) => setNav({ from: rawUrl, page: Math.max(1, pageCount != null ? Math.min(p2, pageCount) : p2), zoom: view.zoom });
|
|
129192
129367
|
const zoomBy = (d2) => setNav({ from: rawUrl, page: view.page, zoom: pdfZoomStep(view.zoom ?? sourceZoomPercent(sourceHash) ?? null, d2) });
|
|
@@ -129204,7 +129379,7 @@ var init_renderNode = __esm({
|
|
|
129204
129379
|
const downloadHref = plan?.mode === "retype" ? base : directDoc?.blobUrl ?? null;
|
|
129205
129380
|
const openHref = base + pdfOpenFragment(sourceHash, { page: shownPage, zoom: zoomable ? view.zoom : null, viewerChrome: true });
|
|
129206
129381
|
return /* @__PURE__ */ jsxs8("div", { "data-himalaya-pdf": "reader", style: { ...frame, display: "flex", flexDirection: "column", background: C2("surfaceTertiary", "#f4f4f4") }, children: [
|
|
129207
|
-
|
|
129382
|
+
object8,
|
|
129208
129383
|
/* @__PURE__ */ jsxs8(
|
|
129209
129384
|
"div",
|
|
129210
129385
|
{
|
|
@@ -138752,8 +138927,8 @@ function sha256hex(b2) {
|
|
|
138752
138927
|
function stableStringify(value) {
|
|
138753
138928
|
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
138754
138929
|
if (Array.isArray(value)) return "[" + value.map(stableStringify).join(",") + "]";
|
|
138755
|
-
const
|
|
138756
|
-
return "{" + Object.keys(
|
|
138930
|
+
const object8 = value;
|
|
138931
|
+
return "{" + Object.keys(object8).sort().map((key3) => JSON.stringify(key3) + ":" + stableStringify(object8[key3])).join(",") + "}";
|
|
138757
138932
|
}
|
|
138758
138933
|
function manifestContent(m2) {
|
|
138759
138934
|
const {
|
|
@@ -140745,15 +140920,15 @@ async function crawlScreenInner(opts) {
|
|
|
140745
140920
|
}
|
|
140746
140921
|
const first2 = ref.path.split(/[.[]/)[0];
|
|
140747
140922
|
if (first2 && pathValue(state[ref.svc], first2) === void 0) {
|
|
140748
|
-
const
|
|
140923
|
+
const optional2 = ref.collapseWhenEmpty === true;
|
|
140749
140924
|
findings.push({
|
|
140750
140925
|
screen: screenId,
|
|
140751
140926
|
trigger,
|
|
140752
140927
|
invariant: "binding-unresolved",
|
|
140753
|
-
severity:
|
|
140928
|
+
severity: optional2 ? "warning" : "error",
|
|
140754
140929
|
message: `binding "$service:${ref.svc}.${ref.path}" reads "${first2}", which is absent from ${ref.svc}'s state`,
|
|
140755
140930
|
at: ref.at,
|
|
140756
|
-
hint:
|
|
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"}`
|
|
140757
140932
|
});
|
|
140758
140933
|
}
|
|
140759
140934
|
}
|
|
@@ -145427,9 +145602,9 @@ var init_customer_apple_connect = __esm({
|
|
|
145427
145602
|
});
|
|
145428
145603
|
|
|
145429
145604
|
// ../../node_modules/fast-xml-parser/src/util.js
|
|
145430
|
-
function getAllMatches(
|
|
145605
|
+
function getAllMatches(string6, regex) {
|
|
145431
145606
|
const matches = [];
|
|
145432
|
-
let match = regex.exec(
|
|
145607
|
+
let match = regex.exec(string6);
|
|
145433
145608
|
while (match) {
|
|
145434
145609
|
const allmatches = [];
|
|
145435
145610
|
allmatches.startIndex = regex.lastIndex - match[0].length;
|
|
@@ -145438,7 +145613,7 @@ function getAllMatches(string5, regex) {
|
|
|
145438
145613
|
allmatches.push(match[index]);
|
|
145439
145614
|
}
|
|
145440
145615
|
matches.push(allmatches);
|
|
145441
|
-
match = regex.exec(
|
|
145616
|
+
match = regex.exec(string6);
|
|
145442
145617
|
}
|
|
145443
145618
|
return matches;
|
|
145444
145619
|
}
|
|
@@ -145453,8 +145628,8 @@ var init_util2 = __esm({
|
|
|
145453
145628
|
nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
145454
145629
|
nameRegexp = "[" + nameStartChar + "][" + nameChar + "]*";
|
|
145455
145630
|
regexName = new RegExp("^" + nameRegexp + "$");
|
|
145456
|
-
isName2 = function(
|
|
145457
|
-
const match = regexName.exec(
|
|
145631
|
+
isName2 = function(string6) {
|
|
145632
|
+
const match = regexName.exec(string6);
|
|
145458
145633
|
return !(match === null || typeof match === "undefined");
|
|
145459
145634
|
};
|
|
145460
145635
|
DANGEROUS_PROPERTY_NAMES = [
|
|
@@ -151017,22 +151192,22 @@ function resolveTagName2(name, isAttribute2, options, matcher, xmlVersion) {
|
|
|
151017
151192
|
if (qName(name, { xmlVersion })) return name;
|
|
151018
151193
|
return options.sanitizeName(name, { isAttribute: isAttribute2, matcher: matcher.readOnly() });
|
|
151019
151194
|
}
|
|
151020
|
-
function processTextOrObjNode(
|
|
151021
|
-
const attrValues = this.extractAttributes(
|
|
151195
|
+
function processTextOrObjNode(object8, key3, level, matcher, xmlVersion) {
|
|
151196
|
+
const attrValues = this.extractAttributes(object8);
|
|
151022
151197
|
matcher.push(key3, attrValues);
|
|
151023
151198
|
const isStopNode = this.checkStopNode(matcher);
|
|
151024
151199
|
if (isStopNode) {
|
|
151025
|
-
const rawContent = this.buildRawContent(
|
|
151026
|
-
const attrStr = this.buildAttributesForStopNode(
|
|
151200
|
+
const rawContent = this.buildRawContent(object8);
|
|
151201
|
+
const attrStr = this.buildAttributesForStopNode(object8);
|
|
151027
151202
|
matcher.pop();
|
|
151028
151203
|
return this.buildObjectNode(rawContent, key3, attrStr, level);
|
|
151029
151204
|
}
|
|
151030
|
-
const result = this.j2x(
|
|
151205
|
+
const result = this.j2x(object8, level + 1, matcher, xmlVersion);
|
|
151031
151206
|
matcher.pop();
|
|
151032
151207
|
if (key3[0] === "?") {
|
|
151033
151208
|
return this.buildTextValNode("", key3, result.attrStr, level, matcher);
|
|
151034
|
-
} else if (
|
|
151035
|
-
return this.buildTextValNode(
|
|
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);
|
|
151036
151211
|
} else {
|
|
151037
151212
|
return this.buildObjectNode(result.val, key3, result.attrStr, level);
|
|
151038
151213
|
}
|
|
@@ -162125,7 +162300,7 @@ ${releaseId}`;
|
|
|
162125
162300
|
"access-control-allow-origin": origin,
|
|
162126
162301
|
vary: "Origin",
|
|
162127
162302
|
"access-control-allow-methods": "GET, HEAD, POST, PUT, DELETE, OPTIONS",
|
|
162128
|
-
"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",
|
|
162129
162304
|
"access-control-expose-headers": "ETag, X-Himalaya-Bundle-Integrity, X-Himalaya-App",
|
|
162130
162305
|
"access-control-allow-credentials": "true"
|
|
162131
162306
|
};
|
|
@@ -162376,16 +162551,32 @@ ${releaseId}`;
|
|
|
162376
162551
|
}
|
|
162377
162552
|
const exchangeClient = wixClientIdOf(utf8Decode(exchangeCfg.bytes));
|
|
162378
162553
|
if ("error" in exchangeClient) return json5(501, { error: `member_exchange_${exchangeClient.error}` }, noStore);
|
|
162379
|
-
|
|
162380
|
-
|
|
162381
|
-
|
|
162382
|
-
|
|
162383
|
-
|
|
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 };
|
|
162384
162574
|
}
|
|
162385
|
-
if (
|
|
162386
|
-
const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken
|
|
162575
|
+
if (typeof sessionToken === "string") received.tokenLength = sessionToken.length;
|
|
162576
|
+
const exchanged = await exchangeMemberSession({ clientId: exchangeClient.clientId, sessionToken }, webwixFetch);
|
|
162387
162577
|
if (exchanged.ok) return json5(200, { accessToken: exchanged.accessToken, expiresAt: exchanged.expiresAt }, noStore);
|
|
162388
|
-
|
|
162578
|
+
if (exchanged.code === "bad_request") return json5(400, { error: "invalid_session_token", received }, noStore);
|
|
162579
|
+
return json5(502, { error: exchanged.code, ...exchanged.status !== void 0 ? { status: exchanged.status } : {} }, noStore);
|
|
162389
162580
|
}
|
|
162390
162581
|
if (request.method === "POST" && path2 === "/v1/__webwix/call") {
|
|
162391
162582
|
const served = { rung: "none" };
|
|
@@ -163463,33 +163654,33 @@ var init_preview_assets_generated = __esm({
|
|
|
163463
163654
|
"../../packages/serve/src/preview-assets.generated.ts"() {
|
|
163464
163655
|
init_preview_assets_format();
|
|
163465
163656
|
PREVIEW_ASSET_MANIFEST = [
|
|
163466
|
-
{ key: "assets/DashboardHost-
|
|
163467
|
-
{ key: "assets/DevDrawer-
|
|
163468
|
-
{ key: "assets/IdiomCompare-
|
|
163469
|
-
{ key: "assets/LightboxViewer-
|
|
163470
|
-
{ key: "assets/PhonePreviewControl-
|
|
163471
|
-
{ key: "assets/SchemeCompare-
|
|
163472
|
-
{ key: "assets/index-
|
|
163473
|
-
{ key: "assets/pdf-
|
|
163474
|
-
{ key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
163475
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
163476
|
-
{ key: "assets/pdfDocument-
|
|
163477
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
163478
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
163479
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
163480
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
163481
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
163482
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
163483
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
163484
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
163485
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
163486
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
163487
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
163488
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
163489
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
163490
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
163491
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
163492
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
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" }
|
|
163493
163684
|
];
|
|
163494
163685
|
}
|
|
163495
163686
|
});
|
|
@@ -176134,8 +176325,8 @@ function isString(data) {
|
|
|
176134
176325
|
function isObject(data) {
|
|
176135
176326
|
return objectToString(data) === "[object Object]";
|
|
176136
176327
|
}
|
|
176137
|
-
function validate3(
|
|
176138
|
-
if (
|
|
176328
|
+
function validate3(bool2, cbOrMessage, message) {
|
|
176329
|
+
if (bool2) return;
|
|
176139
176330
|
const cb = typeof cbOrMessage === "function" ? cbOrMessage : void 0;
|
|
176140
176331
|
let options = typeof cbOrMessage === "function" ? message : cbOrMessage;
|
|
176141
176332
|
if (!isObject(options)) options = "[object Object]";
|
|
@@ -179280,11 +179471,11 @@ import { createHash as createHash46 } from "node:crypto";
|
|
|
179280
179471
|
import { readFileSync as readFileSync105, statSync as statSync22 } from "node:fs";
|
|
179281
179472
|
import { resolve as resolve62, join as join92 } from "node:path";
|
|
179282
179473
|
import ts9 from "typescript";
|
|
179283
|
-
function
|
|
179474
|
+
function object5(value) {
|
|
179284
179475
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
179285
179476
|
}
|
|
179286
179477
|
function readJson9(path2) {
|
|
179287
|
-
return
|
|
179478
|
+
return object5(JSON.parse(readFileSync105(path2, "utf8"))) ?? {};
|
|
179288
179479
|
}
|
|
179289
179480
|
function parseArgs(args) {
|
|
179290
179481
|
let evidenceDir;
|
|
@@ -179312,22 +179503,22 @@ function parseArgs(args) {
|
|
|
179312
179503
|
return { evidenceDir: resolve62(evidenceDir), contentDir: resolve62(contentDir2), json: json8 };
|
|
179313
179504
|
}
|
|
179314
179505
|
function authoredControls(raw) {
|
|
179315
|
-
const screens =
|
|
179316
|
-
const headers2 =
|
|
179506
|
+
const screens = object5(raw.screens);
|
|
179507
|
+
const headers2 = object5(raw.headers);
|
|
179317
179508
|
if (!screens || !headers2 || !Object.keys(screens).length) {
|
|
179318
179509
|
return { controls: /* @__PURE__ */ new Set(), screens: 0, error: "raw-structure.json is missing authored screens or headers." };
|
|
179319
179510
|
}
|
|
179320
179511
|
const controls = /* @__PURE__ */ new Set();
|
|
179321
179512
|
let count2 = 0;
|
|
179322
179513
|
for (const [screenId, rawScreen] of Object.entries(screens)) {
|
|
179323
|
-
const screen =
|
|
179514
|
+
const screen = object5(rawScreen);
|
|
179324
179515
|
const headerId = typeof screen?.headerId === "string" ? screen.headerId : void 0;
|
|
179325
179516
|
if (!headerId) continue;
|
|
179326
179517
|
count2++;
|
|
179327
|
-
const header =
|
|
179518
|
+
const header = object5(headers2[headerId]);
|
|
179328
179519
|
if (!header) return { controls, screens: count2, error: `Authored header ${headerId} is missing for screen ${screenId}.` };
|
|
179329
|
-
const settings =
|
|
179330
|
-
const topBarSettings =
|
|
179520
|
+
const settings = object5(header?.settings) ?? header;
|
|
179521
|
+
const topBarSettings = object5(settings?.topBarSettings);
|
|
179331
179522
|
const choice = (modern, legacy) => {
|
|
179332
179523
|
const current = topBarSettings?.[modern];
|
|
179333
179524
|
if (current !== void 0) return typeof current === "boolean" ? current : void 0;
|
|
@@ -179430,7 +179621,7 @@ function validate4(evidenceDir, contentDir2) {
|
|
|
179430
179621
|
if (manifest.stage !== "collected") throw new Error('manifest.json must have stage "collected".');
|
|
179431
179622
|
const rawPath = join92(evidenceDir, "raw-structure.json");
|
|
179432
179623
|
const rawBytes = readFileSync105(rawPath);
|
|
179433
|
-
const expectedHash =
|
|
179624
|
+
const expectedHash = object5(manifest.sha256)?.["raw-structure.json"];
|
|
179434
179625
|
if (typeof expectedHash !== "string" || !/^[a-f0-9]{64}$/i.test(expectedHash)) {
|
|
179435
179626
|
throw new Error("manifest.json is missing a valid raw-structure.json hash.");
|
|
179436
179627
|
}
|
|
@@ -179503,46 +179694,46 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179503
179694
|
function sourceMap2(key3) {
|
|
179504
179695
|
const result = {};
|
|
179505
179696
|
for (const structure of enrichedStructures) {
|
|
179506
|
-
for (const [id, value] of Object.entries(
|
|
179697
|
+
for (const [id, value] of Object.entries(object6(structure[key3]))) {
|
|
179507
179698
|
if (!own4(result, id)) result[id] = value;
|
|
179508
179699
|
}
|
|
179509
179700
|
}
|
|
179510
|
-
for (const [id, value] of Object.entries(
|
|
179511
|
-
result[id] = own4(result, id) ? { ...
|
|
179701
|
+
for (const [id, value] of Object.entries(object6(raw[key3]))) {
|
|
179702
|
+
result[id] = own4(result, id) ? { ...object6(result[id]), ...object6(value) } : value;
|
|
179512
179703
|
}
|
|
179513
179704
|
return result;
|
|
179514
179705
|
}
|
|
179515
179706
|
function definitionMap(key3) {
|
|
179516
179707
|
const result = {};
|
|
179517
179708
|
for (const structure of enrichedStructures) {
|
|
179518
|
-
for (const [id, value] of Object.entries(
|
|
179709
|
+
for (const [id, value] of Object.entries(object6(object6(structure.definitions)[key3]))) {
|
|
179519
179710
|
if (!own4(result, id)) result[id] = value;
|
|
179520
179711
|
}
|
|
179521
179712
|
}
|
|
179522
|
-
for (const [id, value] of Object.entries(
|
|
179523
|
-
result[id] = own4(result, id) ? { ...
|
|
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;
|
|
179524
179715
|
}
|
|
179525
179716
|
return result;
|
|
179526
179717
|
}
|
|
179527
179718
|
function platformMap(platformStructure, key3) {
|
|
179528
|
-
const result = { ...
|
|
179529
|
-
for (const [id, value] of Object.entries(
|
|
179530
|
-
result[id] = own4(result, id) ? { ...
|
|
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;
|
|
179531
179722
|
}
|
|
179532
179723
|
return result;
|
|
179533
179724
|
}
|
|
179534
179725
|
function platformDefinitionMap(platformStructure, key3) {
|
|
179535
|
-
const result = { ...
|
|
179536
|
-
for (const [id, value] of Object.entries(
|
|
179537
|
-
result[id] = own4(result, id) ? { ...
|
|
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;
|
|
179538
179729
|
}
|
|
179539
179730
|
return result;
|
|
179540
179731
|
}
|
|
179541
179732
|
const screens = sourceMap2("screens");
|
|
179542
|
-
const layouts =
|
|
179543
|
-
const allSections =
|
|
179544
|
-
const sections = Object.fromEntries(Object.entries(allSections).filter(([, v2]) => !
|
|
179545
|
-
const headers2 =
|
|
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);
|
|
179546
179737
|
const topBars = sourceMap2("topBars");
|
|
179547
179738
|
const topBarButtonDefinitions = definitionMap("topBarButtons");
|
|
179548
179739
|
const actionDefinitions = definitionMap("actions");
|
|
@@ -179554,23 +179745,23 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179554
179745
|
const layoutAliases = /* @__PURE__ */ new Map();
|
|
179555
179746
|
const interactions = [];
|
|
179556
179747
|
for (const [id, value] of Object.entries(layouts)) {
|
|
179557
|
-
const slug =
|
|
179748
|
+
const slug = string4(object6(value).slug);
|
|
179558
179749
|
if (slug) layoutAliases.set(slug, [...layoutAliases.get(slug) ?? [], id]);
|
|
179559
179750
|
}
|
|
179560
179751
|
for (const [id, value] of Object.entries(screens)) {
|
|
179561
|
-
for (const ref of array3(
|
|
179562
|
-
const layoutId =
|
|
179752
|
+
for (const ref of array3(object6(object6(value).layout).items)) {
|
|
179753
|
+
const layoutId = string4(object6(ref).layoutItemId);
|
|
179563
179754
|
if (layoutId) parents.set(layoutId, [.../* @__PURE__ */ new Set([...parents.get(layoutId) ?? [], id])]);
|
|
179564
179755
|
}
|
|
179565
179756
|
}
|
|
179566
179757
|
for (const [name, values] of Object.entries({ screens, layoutItems: layouts, sections, headers: headers2 })) {
|
|
179567
179758
|
for (const [id, value] of Object.entries(values)) {
|
|
179568
|
-
const declared =
|
|
179759
|
+
const declared = string4(object6(value).id);
|
|
179569
179760
|
if (declared !== void 0 && declared !== id) warnings.push({ code: "id_conflict", pointer: `/${name}/${part(id)}/id`, reference: declared });
|
|
179570
179761
|
}
|
|
179571
179762
|
}
|
|
179572
179763
|
function order(refs, pointer) {
|
|
179573
|
-
const indexes = refs.map((ref) =>
|
|
179764
|
+
const indexes = refs.map((ref) => object6(ref).orderIndex).filter((v2) => typeof v2 === "number");
|
|
179574
179765
|
if (indexes.some((v2, i2) => i2 > 0 && v2 <= indexes[i2 - 1])) warnings.push({ code: "order_conflict", pointer });
|
|
179575
179766
|
}
|
|
179576
179767
|
function route(value, contract, pointer) {
|
|
@@ -179600,10 +179791,10 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179600
179791
|
warnings.push({ code: "action_depth_limit", pointer: current.pointer });
|
|
179601
179792
|
continue;
|
|
179602
179793
|
}
|
|
179603
|
-
const item =
|
|
179604
|
-
const kind =
|
|
179794
|
+
const item = object6(current.value);
|
|
179795
|
+
const kind = string4(item.type);
|
|
179605
179796
|
if (kind && ["goToScreen", "vertical", "form", "url", "tel", "mailto"].includes(kind)) {
|
|
179606
|
-
const dest =
|
|
179797
|
+
const dest = string4(item.screenId);
|
|
179607
179798
|
interactions.push({ pointer: current.pointer, context, action: item, ...kind === "goToScreen" && dest ? { destination: route(dest, "layout", current.pointer) } : {} });
|
|
179608
179799
|
}
|
|
179609
179800
|
for (const [key3, child] of Object.entries(current.value)) pending.push({ value: child, pointer: `${current.pointer}/${part(key3)}`, depth: current.depth + 1 });
|
|
@@ -179612,17 +179803,17 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179612
179803
|
function placements(value, pointer, context = pointer) {
|
|
179613
179804
|
const refs = array3(value);
|
|
179614
179805
|
const inScope = refs.filter((ref) => {
|
|
179615
|
-
const id =
|
|
179616
|
-
return !id || !
|
|
179806
|
+
const id = string4(object6(ref).elementId);
|
|
179807
|
+
return !id || !string4(object6(allSections[id]).sectionDefinitionId)?.startsWith("ntt.");
|
|
179617
179808
|
});
|
|
179618
179809
|
order(inScope, pointer);
|
|
179619
179810
|
return refs.flatMap((value2, index) => {
|
|
179620
|
-
const ref =
|
|
179621
|
-
const id =
|
|
179622
|
-
if (id &&
|
|
179811
|
+
const ref = object6(value2);
|
|
179812
|
+
const id = string4(ref.elementId);
|
|
179813
|
+
if (id && string4(object6(allSections[id]).sectionDefinitionId)?.startsWith("ntt.")) return [];
|
|
179623
179814
|
const refPointer = `${pointer}/${index}`;
|
|
179624
179815
|
if (ref.elementType !== "SECTION") {
|
|
179625
|
-
warnings.push({ code: "unknown_element_type", pointer: refPointer, reference:
|
|
179816
|
+
warnings.push({ code: "unknown_element_type", pointer: refPointer, reference: string4(ref.elementType) });
|
|
179626
179817
|
return [];
|
|
179627
179818
|
}
|
|
179628
179819
|
if (!id || !own4(sections, id)) {
|
|
@@ -179632,19 +179823,19 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179632
179823
|
usedSections.add(id);
|
|
179633
179824
|
const placementContext = `${context}/${index}`;
|
|
179634
179825
|
actions(sections[id], `/sections/${part(id)}`, placementContext);
|
|
179635
|
-
return [{ pointer: refPointer, context: placementContext, arrayIndex: index, ...own4(ref, "orderIndex") ? { orderIndex: ref.orderIndex } : {}, sectionId: id, sectionDefinitionId:
|
|
179826
|
+
return [{ pointer: refPointer, context: placementContext, arrayIndex: index, ...own4(ref, "orderIndex") ? { orderIndex: ref.orderIndex } : {}, sectionId: id, sectionDefinitionId: string4(object6(sections[id]).sectionDefinitionId), reference: ref }];
|
|
179636
179827
|
});
|
|
179637
179828
|
}
|
|
179638
179829
|
function topBarButtons(value, side2, pointer, context, buttonDefinitions = topBarButtonDefinitions, availableActions = actionDefinitions, trackInteractions = true) {
|
|
179639
|
-
const bar =
|
|
179830
|
+
const bar = object6(value);
|
|
179640
179831
|
const idsKey = `${side2}ButtonIds`;
|
|
179641
179832
|
const definitionsKey = `${side2}ButtonDefinitions`;
|
|
179642
179833
|
const refs = own4(bar, idsKey) ? array3(bar[idsKey]) : array3(bar[definitionsKey]);
|
|
179643
179834
|
return refs.map((ref, index) => {
|
|
179644
|
-
const refObject =
|
|
179645
|
-
const id = typeof ref === "string" ? ref :
|
|
179835
|
+
const refObject = object6(ref);
|
|
179836
|
+
const id = typeof ref === "string" ? ref : string4(refObject.topBarButtonDefinitionId) ?? string4(refObject.id);
|
|
179646
179837
|
const definition = id && own4(buttonDefinitions, id) ? buttonDefinitions[id] : typeof ref === "object" && ref !== null ? ref : void 0;
|
|
179647
|
-
const actionDefinitionId =
|
|
179838
|
+
const actionDefinitionId = string4(object6(definition).actionDefinitionId) ?? string4(refObject.actionDefinitionId);
|
|
179648
179839
|
const actionDefinition = actionDefinitionId && own4(availableActions, actionDefinitionId) ? availableActions[actionDefinitionId] : void 0;
|
|
179649
179840
|
const buttonPointer = `${pointer}/${side2}/${index}`;
|
|
179650
179841
|
if (trackInteractions) {
|
|
@@ -179660,19 +179851,19 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179660
179851
|
});
|
|
179661
179852
|
}
|
|
179662
179853
|
const screenGraph = Object.entries(screens).map(([screenId, source]) => {
|
|
179663
|
-
const screen =
|
|
179664
|
-
const layout =
|
|
179665
|
-
const type =
|
|
179854
|
+
const screen = object6(source);
|
|
179855
|
+
const layout = object6(screen.layout);
|
|
179856
|
+
const type = string4(layout.type);
|
|
179666
179857
|
const refs = array3(layout.items);
|
|
179667
179858
|
const pointer = `/screens/${part(screenId)}`;
|
|
179668
179859
|
order(refs, `${pointer}/layout/items`);
|
|
179669
179860
|
if (type !== "TOP_TABS" && type !== "LINEAR") warnings.push({ code: "unknown_layout", pointer: `${pointer}/layout/type` });
|
|
179670
|
-
const headerId =
|
|
179861
|
+
const headerId = string4(screen.headerId);
|
|
179671
179862
|
if (headerId) {
|
|
179672
179863
|
if (!own4(headers2, headerId)) warnings.push({ code: "missing_reference", pointer: `${pointer}/headerId`, reference: headerId });
|
|
179673
179864
|
else actions(headers2[headerId], `/headers/${part(headerId)}`, pointer);
|
|
179674
179865
|
}
|
|
179675
|
-
const topBarId =
|
|
179866
|
+
const topBarId = string4(screen.topBarId);
|
|
179676
179867
|
const topBar = topBarId && own4(topBars, topBarId) ? topBars[topBarId] : void 0;
|
|
179677
179868
|
if (topBarId && topBar === void 0 && own4(raw, "topBars")) {
|
|
179678
179869
|
warnings.push({ code: "missing_reference", pointer: `${pointer}/topBarId`, reference: topBarId });
|
|
@@ -179684,8 +179875,8 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179684
179875
|
};
|
|
179685
179876
|
const topBarByPlatform = Object.fromEntries(Object.entries(enriched).flatMap(([platform, platformStructure]) => {
|
|
179686
179877
|
if (!platformStructure) return [];
|
|
179687
|
-
const platformScreen = { ...
|
|
179688
|
-
const platformTopBarId =
|
|
179878
|
+
const platformScreen = { ...object6(object6(platformStructure.screens)[screenId]), ...object6(object6(raw.screens)[screenId]) };
|
|
179879
|
+
const platformTopBarId = string4(platformScreen.topBarId);
|
|
179689
179880
|
if (!platformTopBarId) return [];
|
|
179690
179881
|
const platformTopBar = platformMap(platformStructure, "topBars")[platformTopBarId];
|
|
179691
179882
|
if (platformTopBar === void 0) return [];
|
|
@@ -179703,13 +179894,13 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179703
179894
|
}]];
|
|
179704
179895
|
}));
|
|
179705
179896
|
const pages2 = refs.flatMap((value, index) => {
|
|
179706
|
-
const ref =
|
|
179897
|
+
const ref = object6(value), id = string4(ref.layoutItemId);
|
|
179707
179898
|
if (!id || !own4(layouts, id)) {
|
|
179708
179899
|
warnings.push({ code: "missing_reference", pointer: `${pointer}/layout/items/${index}`, ...id ? { reference: id } : {} });
|
|
179709
179900
|
return [];
|
|
179710
179901
|
}
|
|
179711
179902
|
usedLayouts.add(id);
|
|
179712
|
-
const item =
|
|
179903
|
+
const item = object6(layouts[id]);
|
|
179713
179904
|
return [{
|
|
179714
179905
|
layoutItemId: id,
|
|
179715
179906
|
arrayIndex: index,
|
|
@@ -179739,7 +179930,7 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179739
179930
|
};
|
|
179740
179931
|
});
|
|
179741
179932
|
const detachedLayouts = Object.entries(layouts).filter(([id]) => !usedLayouts.has(id)).map(([id, value]) => {
|
|
179742
|
-
const item =
|
|
179933
|
+
const item = object6(value);
|
|
179743
179934
|
return {
|
|
179744
179935
|
layoutItemId: id,
|
|
179745
179936
|
title: item.title,
|
|
@@ -179749,26 +179940,26 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179749
179940
|
placements: placements(item.elements, `/layoutItems/${part(id)}/elements`)
|
|
179750
179941
|
};
|
|
179751
179942
|
});
|
|
179752
|
-
const bottomTabs = array3(
|
|
179943
|
+
const bottomTabs = array3(object6(raw.navigation).bottomTabs);
|
|
179753
179944
|
order(bottomTabs, "/navigation/bottomTabs");
|
|
179754
179945
|
const navigation = bottomTabs.map((value, index) => {
|
|
179755
|
-
const entry =
|
|
179946
|
+
const entry = object6(value), id = string4(entry.screenId);
|
|
179756
179947
|
if (!id) warnings.push({ code: "missing_reference", pointer: `/navigation/bottomTabs/${index}/screenId` });
|
|
179757
179948
|
return { arrayIndex: index, entry, ...id ? { destination: route(id, "screen", `/navigation/bottomTabs/${index}/screenId`) } : {} };
|
|
179758
179949
|
});
|
|
179759
|
-
const overrides = Object.entries(
|
|
179760
|
-
const id =
|
|
179950
|
+
const overrides = Object.entries(object6(raw.screenOverrides)).map(([alias2, value]) => {
|
|
179951
|
+
const id = string4(object6(value).screenId);
|
|
179761
179952
|
if (!id) warnings.push({ code: "missing_reference", pointer: `/screenOverrides/${part(alias2)}/screenId` });
|
|
179762
179953
|
return { alias: alias2, source: value, ...id ? { destination: route(id, "screen", `/screenOverrides/${part(alias2)}/screenId`) } : {} };
|
|
179763
179954
|
});
|
|
179764
|
-
const profile =
|
|
179955
|
+
const profile = object6(raw.businessProfile);
|
|
179765
179956
|
const profilePlacements = placements(profile.elements, "/businessProfile/elements");
|
|
179766
179957
|
return {
|
|
179767
179958
|
schemaVersion: 1,
|
|
179768
179959
|
interpretation: "authored-evidence-not-evaluated-access",
|
|
179769
179960
|
ordering: "source-array-order",
|
|
179770
179961
|
appSettings: raw.settings,
|
|
179771
|
-
navigation: { entries: navigation, settings:
|
|
179962
|
+
navigation: { entries: navigation, settings: object6(raw.navigation).settings, firstAuthoredScreenId: string4(object6(bottomTabs[0]).screenId) },
|
|
179772
179963
|
screens: screenGraph,
|
|
179773
179964
|
detachedLayouts,
|
|
179774
179965
|
businessProfile: { settings: profile.settings, placements: profilePlacements },
|
|
@@ -179782,12 +179973,12 @@ function buildSourceGraph(raw, enriched = {}) {
|
|
|
179782
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."
|
|
179783
179974
|
};
|
|
179784
179975
|
}
|
|
179785
|
-
var
|
|
179976
|
+
var object6, array3, string4, part, own4;
|
|
179786
179977
|
var init_graph = __esm({
|
|
179787
179978
|
"src/one-app/graph.ts"() {
|
|
179788
|
-
|
|
179979
|
+
object6 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
179789
179980
|
array3 = (value) => Array.isArray(value) ? value : [];
|
|
179790
|
-
|
|
179981
|
+
string4 = (value) => typeof value === "string" ? value : void 0;
|
|
179791
179982
|
part = (value) => value.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
179792
179983
|
own4 = (value, key3) => Object.hasOwn(value, key3);
|
|
179793
179984
|
}
|
|
@@ -179795,40 +179986,40 @@ var init_graph = __esm({
|
|
|
179795
179986
|
|
|
179796
179987
|
// src/one-app/navigation.ts
|
|
179797
179988
|
function sourceNavigationKind(raw) {
|
|
179798
|
-
const navigation =
|
|
179799
|
-
if (
|
|
179989
|
+
const navigation = object7(raw.navigation);
|
|
179990
|
+
if (object7(navigation.settings).drawerMode === true) return "side-menu";
|
|
179800
179991
|
const entries = array4(navigation.bottomTabs);
|
|
179801
179992
|
if (entries.length > 1) return "bottom-tabs";
|
|
179802
|
-
const screens =
|
|
179803
|
-
const screenId =
|
|
179804
|
-
const screen = screenId && Object.hasOwn(screens, screenId) ?
|
|
179805
|
-
return
|
|
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";
|
|
179806
179997
|
}
|
|
179807
179998
|
function planNavigation(raw, policy = "bottom-tabs") {
|
|
179808
|
-
const navigation =
|
|
179999
|
+
const navigation = object7(raw.navigation);
|
|
179809
180000
|
const entries = array4(navigation.bottomTabs);
|
|
179810
|
-
const screens =
|
|
179811
|
-
const layouts =
|
|
180001
|
+
const screens = object7(raw.screens);
|
|
180002
|
+
const layouts = object7(raw.layoutItems);
|
|
179812
180003
|
const kind = sourceNavigationKind(raw);
|
|
179813
180004
|
const warnings = [];
|
|
179814
|
-
const firstEntry =
|
|
179815
|
-
const rootScreenId =
|
|
179816
|
-
const rootScreen = rootScreenId && Object.hasOwn(screens, rootScreenId) ?
|
|
179817
|
-
const rootLayout =
|
|
179818
|
-
const settings =
|
|
179819
|
-
const appInstance =
|
|
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;
|
|
179820
180011
|
const source = {
|
|
179821
180012
|
kind,
|
|
179822
180013
|
appInstance,
|
|
179823
180014
|
rootScreenId,
|
|
179824
|
-
initialTabId: kind === "top-tabs" ?
|
|
180015
|
+
initialTabId: kind === "top-tabs" ? string5(rootLayout.initialTabId) ?? null : null,
|
|
179825
180016
|
showBottomNavigationLabels: settings.showBottomNavigationLabels
|
|
179826
180017
|
};
|
|
179827
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.";
|
|
179828
180019
|
if (kind === "bottom-tabs") {
|
|
179829
180020
|
entries.forEach((value, index) => {
|
|
179830
|
-
const id =
|
|
179831
|
-
if (id && Object.hasOwn(screens, id) &&
|
|
180021
|
+
const id = string5(object7(value).screenId);
|
|
180022
|
+
if (id && Object.hasOwn(screens, id) && object7(object7(screens[id]).layout).type === "TOP_TABS") {
|
|
179832
180023
|
warnings.push({ code: "nested_top_tabs", pointer: `/screens/${part2(id)}/layout/type`, reference: `/navigation/bottomTabs/${index}` });
|
|
179833
180024
|
}
|
|
179834
180025
|
});
|
|
@@ -179839,30 +180030,30 @@ function planNavigation(raw, policy = "bottom-tabs") {
|
|
|
179839
180030
|
const tabs = [];
|
|
179840
180031
|
const hiddenPages = [];
|
|
179841
180032
|
array4(rootLayout.items).forEach((value, index) => {
|
|
179842
|
-
const layoutItemId =
|
|
180033
|
+
const layoutItemId = string5(object7(value).layoutItemId);
|
|
179843
180034
|
const itemPointer = `${pointer}/${index}`;
|
|
179844
180035
|
if (!layoutItemId || !Object.hasOwn(layouts, layoutItemId)) {
|
|
179845
180036
|
warnings.push({ code: "missing_reference", pointer: itemPointer, ...layoutItemId ? { reference: layoutItemId } : {} });
|
|
179846
180037
|
return;
|
|
179847
180038
|
}
|
|
179848
|
-
const layout =
|
|
179849
|
-
if (
|
|
180039
|
+
const layout = object7(layouts[layoutItemId]);
|
|
180040
|
+
if (object7(layout.settings).hideFromNavigation === true) {
|
|
179850
180041
|
hiddenPages.push({ layoutItemId, pointer: itemPointer });
|
|
179851
180042
|
return;
|
|
179852
180043
|
}
|
|
179853
180044
|
const layoutPointer = `/layoutItems/${part2(layoutItemId)}`;
|
|
179854
|
-
const label3 =
|
|
180045
|
+
const label3 = string5(layout.title) ?? null;
|
|
179855
180046
|
if (label3 === null) warnings.push({ code: "missing_label", pointer: `${layoutPointer}/title` });
|
|
179856
|
-
const fallback = tabs.length === 0 ?
|
|
179857
|
-
const icon =
|
|
180047
|
+
const fallback = tabs.length === 0 ? string5(firstEntry.icon) : void 0;
|
|
180048
|
+
const icon = string5(layout.icon) ?? fallback ?? null;
|
|
179858
180049
|
if (icon === null) warnings.push({ code: "missing_icon", pointer: `${layoutPointer}/icon` });
|
|
179859
180050
|
tabs.push({
|
|
179860
180051
|
layoutItemId,
|
|
179861
180052
|
pointer: itemPointer,
|
|
179862
180053
|
label: label3,
|
|
179863
180054
|
icon,
|
|
179864
|
-
iconSource:
|
|
179865
|
-
header: tabs.length === 0 ? { kind: "source", headerId:
|
|
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" }
|
|
179866
180057
|
});
|
|
179867
180058
|
});
|
|
179868
180059
|
if (!tabs.length) warnings.push({ code: "no_visible_page", pointer });
|
|
@@ -179891,12 +180082,12 @@ function planNavigation(raw, policy = "bottom-tabs") {
|
|
|
179891
180082
|
next
|
|
179892
180083
|
};
|
|
179893
180084
|
}
|
|
179894
|
-
var
|
|
180085
|
+
var object7, array4, string5, part2, TOP_TABS_POLICIES, MAX_BAR_TABS;
|
|
179895
180086
|
var init_navigation = __esm({
|
|
179896
180087
|
"src/one-app/navigation.ts"() {
|
|
179897
|
-
|
|
180088
|
+
object7 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
179898
180089
|
array4 = (value) => Array.isArray(value) ? value : [];
|
|
179899
|
-
|
|
180090
|
+
string5 = (value) => typeof value === "string" && value ? value : void 0;
|
|
179900
180091
|
part2 = (value) => value.replaceAll("~", "~0").replaceAll("/", "~1");
|
|
179901
180092
|
TOP_TABS_POLICIES = ["bottom-tabs", "keep"];
|
|
179902
180093
|
MAX_BAR_TABS = 5;
|