@wix/himalaya-cli 0.1945.0 → 0.1947.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/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -0
- package/dist/browser-plane/assets.json +5 -5
- package/dist/browser-plane/preview-deferred/{e113c7cdcf8f56ad861b2564505fab2a1975c7a995f92d2f999f9c4ce1a09a40.bin → da958a2a47eef7082c7892c1cc755a58bbeefcb4b617b47fde87f1ce567b3e64.bin} +1 -1
- package/dist/browser-plane/sw.js +7 -7
- package/dist/cli.mjs +811 -283
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/himi-json-output.md +7 -0
- package/guides/himi-test.md +31 -0
- package/package.json +2 -2
- package/templates/bare-fashion/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/beauty-salon/dev/index.ts +1 -0
- package/templates/beauty-salon/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/beauty-salon/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/beauty-salon-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/branded-lite/dev/index.ts +4 -2
- package/templates/branded-lite/l10n/ar.json +5 -5
- package/templates/branded-lite/l10n/cs.json +5 -5
- package/templates/branded-lite/l10n/da.json +5 -5
- package/templates/branded-lite/l10n/de.json +5 -5
- package/templates/branded-lite/l10n/el.json +5 -5
- package/templates/branded-lite/l10n/es.json +5 -5
- package/templates/branded-lite/l10n/fi.json +5 -5
- package/templates/branded-lite/l10n/fr.json +5 -5
- package/templates/branded-lite/l10n/he.json +4 -4
- package/templates/branded-lite/l10n/hu.json +5 -5
- package/templates/branded-lite/l10n/id.json +5 -5
- package/templates/branded-lite/l10n/it.json +5 -5
- package/templates/branded-lite/l10n/ja.json +5 -5
- package/templates/branded-lite/l10n/ko.json +5 -5
- package/templates/branded-lite/l10n/lt.json +5 -5
- package/templates/branded-lite/l10n/nl.json +5 -5
- package/templates/branded-lite/l10n/no.json +5 -5
- package/templates/branded-lite/l10n/pl.json +5 -5
- package/templates/branded-lite/l10n/pt.json +5 -5
- package/templates/branded-lite/l10n/ru.json +5 -5
- package/templates/branded-lite/l10n/sv.json +5 -5
- package/templates/branded-lite/l10n/th.json +5 -5
- package/templates/branded-lite/l10n/tr.json +5 -5
- package/templates/branded-lite/l10n/uk.json +5 -5
- package/templates/branded-lite/l10n/vi.json +5 -5
- package/templates/branded-lite/l10n/zh.json +5 -5
- package/templates/branded-lite/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/branded-lite/tier5-src/_shared/performance-tracker-section.ts +24 -16
- package/templates/branded-lite/tier5-src/_shared/performance-tracker-weeks.ts +27 -20
- package/templates/branded-lite/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/brandy/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/community-club/dev/index.ts +1 -0
- package/templates/community-club/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/community-club/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/community-club-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/conference/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/events-meetups/dev/index.ts +1 -0
- package/templates/events-meetups/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/events-meetups/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/events-meetups-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/fitness-gym/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/fitness-gym/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/fitness-gym/tier5-src/himi-fitcoach-home/index.ts +3 -2
- package/templates/gym-fitness/dev/index.ts +3 -1
- package/templates/gym-fitness/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/gym-fitness/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/gym-fitness-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/medical-services/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/medical-services/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/nonprofit-cause/dev/index.ts +1 -0
- package/templates/nonprofit-cause/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/nonprofit-cause/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/nonprofit-cause-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/owner-lite/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/personal-fitness-trainer/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/personal-fitness-trainer/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/podcast-creator/dev/index.ts +1 -0
- package/templates/podcast-creator/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/podcast-creator/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/podcast-creator-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/portfolio-creative/dev/index.ts +1 -0
- package/templates/portfolio-creative/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/portfolio-creative/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/portfolio-creative-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/professional-services/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/professional-services/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/professional-services/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/restaurant/dev/index.ts +1 -0
- package/templates/restaurant/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/restaurant/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/restaurant-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/retail-store/dev/index.ts +1 -0
- package/templates/retail-store/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/retail-store/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/retail-store-owner/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/salon-spa/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/salon-spa/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/wholesale-store/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/yoga-studio/dev/index.ts +3 -1
- package/templates/yoga-studio/tier5-src/_shared/engine-intl.ts +65 -0
- package/templates/yoga-studio/tier5-src/_shared/weekly-goal.ts +28 -12
- package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +7 -2
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +8 -8
- package/templates/yoga-studio-owner/tier5-src/_shared/engine-intl.ts +65 -0
package/dist/cli.mjs
CHANGED
|
@@ -3964,7 +3964,6 @@ var init_himi_package = __esm({
|
|
|
3964
3964
|
var ICON_VIEW_BOX, ICON_STROKE_WIDTH, ICON_FALLBACK, ICON_CATALOG, ICON_NORMALIZED_INDEX, ICON_NAMES;
|
|
3965
3965
|
var init_icon_catalog_generated = __esm({
|
|
3966
3966
|
"../../core/ts/src/icon-catalog.generated.ts"() {
|
|
3967
|
-
"use strict";
|
|
3968
3967
|
init_define_HHP_CATALOG();
|
|
3969
3968
|
ICON_VIEW_BOX = 24;
|
|
3970
3969
|
ICON_STROKE_WIDTH = 2;
|
|
@@ -10026,12 +10025,12 @@ function fallbackOwnerPrefix(accountId) {
|
|
|
10026
10025
|
const n2 = BigInt("0x" + h2.subarray(0, 8).toString("hex"));
|
|
10027
10026
|
return ("u" + n2.toString(36)).slice(0, OWNER_PREFIX_MAX);
|
|
10028
10027
|
}
|
|
10029
|
-
function federatedOwnerPrefix(
|
|
10030
|
-
if (!/^[a-z]$/.test(
|
|
10028
|
+
function federatedOwnerPrefix(tag2, subject) {
|
|
10029
|
+
if (!/^[a-z]$/.test(tag2)) throw new Error(`federatedOwnerPrefix: tag must be one lowercase letter, got ${JSON.stringify(tag2)}`);
|
|
10031
10030
|
const h2 = createHash("sha256").update(`federated:${subject}`).digest();
|
|
10032
10031
|
const n2 = BigInt("0x" + h2.subarray(0, 10).toString("hex"));
|
|
10033
10032
|
const width = OWNER_PREFIX_MAX - 3;
|
|
10034
|
-
return `${
|
|
10033
|
+
return `${tag2}--${n2.toString(36).padStart(width, "0").slice(0, width)}`;
|
|
10035
10034
|
}
|
|
10036
10035
|
function ownerPrefixFor(account2) {
|
|
10037
10036
|
return sanitizeOwnerPrefix(account2.slug) || fallbackOwnerPrefix(account2.accountId);
|
|
@@ -12731,10 +12730,10 @@ function compileV2(html, profile, options2) {
|
|
|
12731
12730
|
return raw;
|
|
12732
12731
|
}
|
|
12733
12732
|
function compile(el2, treePath, row2 = false) {
|
|
12734
|
-
const element = $2(el2), attrs = el2.attribs,
|
|
12735
|
-
let type2 = attrs["data-component"] ?? tags.get(
|
|
12736
|
-
if (
|
|
12737
|
-
if (
|
|
12733
|
+
const element = $2(el2), attrs = el2.attribs, tag2 = el2.tagName;
|
|
12734
|
+
let type2 = attrs["data-component"] ?? tags.get(tag2) ?? semantic[tag2];
|
|
12735
|
+
if (tag2 === "input" && attrs.type === "checkbox") type2 = "Toggle";
|
|
12736
|
+
if (tag2 === "input" && attrs.type === "range") type2 = "Slider";
|
|
12738
12737
|
const props2 = {}, mods = {};
|
|
12739
12738
|
const matching = rules.filter((r3) => element.is(r3.selector));
|
|
12740
12739
|
const style = Object.assign({}, ...matching.filter((r3) => !r3.breakpoint).map((r3) => r3.declarations));
|
|
@@ -12751,8 +12750,8 @@ function compileV2(html, profile, options2) {
|
|
|
12751
12750
|
error(el2, "HHP-CSS-COMPONENT", `CSS font sets a typography token, but ${type2}.style is not typography.`, 'Put font on text (p, span, h1-h6, label); choose a button or badge look with variant="...".');
|
|
12752
12751
|
delete style.font;
|
|
12753
12752
|
}
|
|
12754
|
-
if (style.display && !["main", "div", "header", "footer", "nav", "himi-v-stack", "himi-h-stack", "himi-grid"].includes(
|
|
12755
|
-
error(el2, "HHP-CSS-COMPONENT", `<${
|
|
12753
|
+
if (style.display && !["main", "div", "header", "footer", "nav", "himi-v-stack", "himi-h-stack", "himi-grid"].includes(tag2))
|
|
12754
|
+
error(el2, "HHP-CSS-COMPONENT", `<${tag2}> sets display, but display layout rules require a stack or grid container.`, `Remove display/flex rules from <${tag2}> and give it plain text; to lay several elements out together, put a <div> stack around them and style that.`);
|
|
12756
12755
|
type2 = translateStyle(style, profile, type2, props2, mods, (message5, hint, property3) => diagnostics.push({ code: "HHP-CSS-VALUE", severity: "error", ...styleLocations[property3 ?? ""] ?? loc(el2), message: message5, ...hint ? { hint } : {} }));
|
|
12757
12756
|
const spec = Object.hasOwn(profile.components, type2) ? profile.components[type2] : void 0;
|
|
12758
12757
|
let id = attrs["data-id"] ?? attrs.id ?? `hhp.${screenId}.${treePath}`;
|
|
@@ -12763,7 +12762,7 @@ function compileV2(html, profile, options2) {
|
|
|
12763
12762
|
sourceMap2[id] = loc(el2);
|
|
12764
12763
|
const component = { id, body: { package: spec?.package ?? "himalaya", type: type2 ?? "Unknown", props: props2 }, modifiers: mods };
|
|
12765
12764
|
if (!spec) {
|
|
12766
|
-
error(el2, "HHP-COMPONENT", `Component ${type2 ??
|
|
12765
|
+
error(el2, "HHP-COMPONENT", `Component ${type2 ?? tag2} is not available for this app's enabled surfaces.`);
|
|
12767
12766
|
return component;
|
|
12768
12767
|
}
|
|
12769
12768
|
const textNodes = element.contents().toArray().filter((n2) => n2.type === "text");
|
|
@@ -12792,8 +12791,8 @@ function compileV2(html, profile, options2) {
|
|
|
12792
12791
|
props2.template = { template, params };
|
|
12793
12792
|
}
|
|
12794
12793
|
} else if (text32) props2.text = text32;
|
|
12795
|
-
if (/^h[1-6]$/.test(
|
|
12796
|
-
const candidates =
|
|
12794
|
+
if (/^h[1-6]$/.test(tag2) && props2.style === void 0) {
|
|
12795
|
+
const candidates = tag2 === "h1" ? ["largeTitle", "title1", "body"] : tag2 === "h2" ? ["title1", "headline", "body"] : ["headline", "body"];
|
|
12797
12796
|
const available = profile.tokens.typography ?? [];
|
|
12798
12797
|
const heading = candidates.find((name) => available.includes(name));
|
|
12799
12798
|
if (heading) props2.style = heading;
|
|
@@ -12813,7 +12812,7 @@ function compileV2(html, profile, options2) {
|
|
|
12813
12812
|
}
|
|
12814
12813
|
if (attrs.alt) mods.accessibilityLabel = attrs.alt;
|
|
12815
12814
|
}
|
|
12816
|
-
if (
|
|
12815
|
+
if (tag2 === "input" || tag2 === "textarea") {
|
|
12817
12816
|
if (attrs.placeholder) props2.placeholder = attrs.placeholder;
|
|
12818
12817
|
if (attrs.type === "password") props2.secure = true;
|
|
12819
12818
|
else if (attrs.type === "email") props2.keyboard = "email";
|
|
@@ -12977,7 +12976,7 @@ function compileV2(html, profile, options2) {
|
|
|
12977
12976
|
structured(el2, props2[name]);
|
|
12978
12977
|
}
|
|
12979
12978
|
}
|
|
12980
|
-
if (
|
|
12979
|
+
if (tag2 === "a") {
|
|
12981
12980
|
if (attrs.href?.startsWith("#")) props2.action = { actionId: "himi.open", params: { screenId: attrs.href.slice(1) } };
|
|
12982
12981
|
else if (/^https:\/\//.test(attrs.href ?? "")) {
|
|
12983
12982
|
requiredCapabilities2.add("open_url");
|
|
@@ -13192,7 +13191,7 @@ function componentAuthoringReference() {
|
|
|
13192
13191
|
}
|
|
13193
13192
|
const examples = {};
|
|
13194
13193
|
const pages2 = {};
|
|
13195
|
-
const lines2 = ["# Native components", "", `Catalog: ${catalog.version}. Search by native type or himi-* tag.`, "", "## Use this reference", "", "Run `himi hhp profile --content . --json` first. The app profile is the intersection of enabled surfaces and is authoritative for eligibility. This complete catalog includes components unavailable in your app. Compilation support is not proof of native renderer, hardware or optional module availability.", "", "Examples demonstrate valid syntax and minimal required props; fill meaningful content/data and use real action handlers. Structured child JSON is for schema witnesses; author ordinary content with HTML children and named slots. Example navigation assumes registered screen home. Controlled examples require the state/policy described below.", "", "## Semantic HTML mapping", "", "| HTML | Native type |", "| --- | --- |", ...Object.entries(semantic).map(([
|
|
13194
|
+
const lines2 = ["# Native components", "", `Catalog: ${catalog.version}. Search by native type or himi-* tag.`, "", "## Use this reference", "", "Run `himi hhp profile --content . --json` first. The app profile is the intersection of enabled surfaces and is authoritative for eligibility. This complete catalog includes components unavailable in your app. Compilation support is not proof of native renderer, hardware or optional module availability.", "", "Examples demonstrate valid syntax and minimal required props; fill meaningful content/data and use real action handlers. Structured child JSON is for schema witnesses; author ordinary content with HTML children and named slots. Example navigation assumes registered screen home. Controlled examples require the state/policy described below.", "", "## Semantic HTML mapping", "", "| HTML | Native type |", "| --- | --- |", ...Object.entries(semantic).map(([tag2, type2]) => `| ${tag2} | ${type2} |`), "", "CSS flex/grid may change container layout types. Input checkbox/range have special native mappings; inspect their generated descriptor.", "", "## Component index", "", ...Object.entries(catalog.components).map(([name, entry]) => `- [${name} \u2014 ${entry.tag}](#${name.toLowerCase()})`), ""];
|
|
13196
13195
|
for (const [name, entry] of Object.entries(catalog.components)) {
|
|
13197
13196
|
const start2 = lines2.length;
|
|
13198
13197
|
const props2 = { ...sample(entry.propsSchema ?? { type: "object" }) };
|
|
@@ -18319,15 +18318,15 @@ __export(locale_exports, {
|
|
|
18319
18318
|
resolveAppLocale: () => resolveAppLocale,
|
|
18320
18319
|
shipsLocale: () => shipsLocale
|
|
18321
18320
|
});
|
|
18322
|
-
function primarySubtag(
|
|
18323
|
-
const primary = (
|
|
18321
|
+
function primarySubtag(tag2) {
|
|
18322
|
+
const primary = (tag2 ?? "").trim().split(/[-_]/)[0].toLowerCase();
|
|
18324
18323
|
return LANGUAGE_ALIASES[primary] ?? primary;
|
|
18325
18324
|
}
|
|
18326
|
-
function isSupportedLocale(
|
|
18327
|
-
return SUPPORTED_LOCALES.includes(
|
|
18325
|
+
function isSupportedLocale(tag2) {
|
|
18326
|
+
return SUPPORTED_LOCALES.includes(tag2);
|
|
18328
18327
|
}
|
|
18329
|
-
function coerceSupportedLocale(
|
|
18330
|
-
const t2 = primarySubtag(
|
|
18328
|
+
function coerceSupportedLocale(tag2) {
|
|
18329
|
+
const t2 = primarySubtag(tag2);
|
|
18331
18330
|
return isSupportedLocale(t2) ? t2 : void 0;
|
|
18332
18331
|
}
|
|
18333
18332
|
function isRTL(locale) {
|
|
@@ -18336,8 +18335,8 @@ function isRTL(locale) {
|
|
|
18336
18335
|
function layoutDirection(locale) {
|
|
18337
18336
|
return isRTL(locale) ? "rtl" : "ltr";
|
|
18338
18337
|
}
|
|
18339
|
-
function shipsLocale(app2,
|
|
18340
|
-
const t2 = coerceSupportedLocale(
|
|
18338
|
+
function shipsLocale(app2, tag2) {
|
|
18339
|
+
const t2 = coerceSupportedLocale(tag2);
|
|
18341
18340
|
if (!t2) return false;
|
|
18342
18341
|
if (t2 === (coerceSupportedLocale(app2?.default) ?? "en")) return true;
|
|
18343
18342
|
const list5 = app2?.translations;
|
|
@@ -18373,10 +18372,10 @@ function availableLocales(app2) {
|
|
|
18373
18372
|
if (t2 && !tags.includes(t2)) tags.push(t2);
|
|
18374
18373
|
}
|
|
18375
18374
|
}
|
|
18376
|
-
return tags.map((
|
|
18375
|
+
return tags.map((tag2) => ({ tag: tag2, nativeName: LOCALE_NATIVE_NAMES[tag2] ?? tag2, dir: layoutDirection(tag2) }));
|
|
18377
18376
|
}
|
|
18378
|
-
function parseLocaleSetTag(app2,
|
|
18379
|
-
const raw = (
|
|
18377
|
+
function parseLocaleSetTag(app2, tag2) {
|
|
18378
|
+
const raw = (tag2 ?? "").trim();
|
|
18380
18379
|
if (raw.toLowerCase() === LOCALE_SYSTEM) return { ok: true, tag: LOCALE_SYSTEM };
|
|
18381
18380
|
const t2 = coerceSupportedLocale(raw);
|
|
18382
18381
|
if (t2 && shipsLocale(app2, t2)) return { ok: true, tag: t2 };
|
|
@@ -18487,10 +18486,10 @@ function entriesOf(catalog4) {
|
|
|
18487
18486
|
return Object.entries(catalog4);
|
|
18488
18487
|
}
|
|
18489
18488
|
function l10nSnapshot(locale, active2, source2) {
|
|
18490
|
-
const
|
|
18489
|
+
const tag2 = typeof locale === "string" && locale ? locale : "en";
|
|
18491
18490
|
return {
|
|
18492
|
-
locale:
|
|
18493
|
-
dir: layoutDirection(
|
|
18491
|
+
locale: tag2,
|
|
18492
|
+
dir: layoutDirection(tag2),
|
|
18494
18493
|
active: cleanCatalog(entriesOf(active2)),
|
|
18495
18494
|
source: source2 && source2 !== active2 ? cleanCatalog(entriesOf(source2)) : /* @__PURE__ */ Object.create(null)
|
|
18496
18495
|
};
|
|
@@ -18856,9 +18855,9 @@ function isBindingField(key4) {
|
|
|
18856
18855
|
function collectAppBindings(root) {
|
|
18857
18856
|
const out2 = [];
|
|
18858
18857
|
const seen = /* @__PURE__ */ new Set();
|
|
18859
|
-
const visit = (node4, at2, key4, unresolved = false) => {
|
|
18858
|
+
const visit = (node4, at2, key4, unresolved = false, collapse = false) => {
|
|
18860
18859
|
if (typeof node4 === "string") {
|
|
18861
|
-
if (node4.trim().startsWith(APP_BINDING_PREFIX)) out2.push({ at: at2, key: key4, value: node4, ...unresolved ? { unresolved } : {} });
|
|
18860
|
+
if (node4.trim().startsWith(APP_BINDING_PREFIX)) out2.push({ at: at2, key: key4, value: node4, ...unresolved ? { unresolved } : {}, ...collapse ? { collapseWhenEmpty: true } : {} });
|
|
18862
18861
|
return;
|
|
18863
18862
|
}
|
|
18864
18863
|
if (!node4 || typeof node4 !== "object" || seen.has(node4)) return;
|
|
@@ -18890,7 +18889,7 @@ function collectAppBindings(root) {
|
|
|
18890
18889
|
continue;
|
|
18891
18890
|
}
|
|
18892
18891
|
if (isOpaqueAuthorJson(k3, v2, at2 === "")) continue;
|
|
18893
|
-
visit(v2, here, k3);
|
|
18892
|
+
visit(v2, here, k3, false, record6.collapseWhenEmpty === true && typeof v2 === "string");
|
|
18894
18893
|
}
|
|
18895
18894
|
};
|
|
18896
18895
|
visit(root, "", "");
|
|
@@ -18982,6 +18981,24 @@ function appActionIssue(actionId, at2, ctx, appActions, registeredNative) {
|
|
|
18982
18981
|
}
|
|
18983
18982
|
return null;
|
|
18984
18983
|
}
|
|
18984
|
+
function tier5NamesAppServiceIssues(actions, ctx, appActions, screenServices) {
|
|
18985
|
+
if (!appActions || !appServicesVerdictOf(ctx).ok || ctx?.appBundleDeclared === false) return [];
|
|
18986
|
+
const issues = [];
|
|
18987
|
+
for (const { actionId, at: at2 } of actions) {
|
|
18988
|
+
const m2 = /^tier5\.([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)$/.exec(actionId);
|
|
18989
|
+
if (!m2 || screenServices?.has(m2[1])) continue;
|
|
18990
|
+
const exported = own(appActions, m2[1]);
|
|
18991
|
+
if (!exported?.includes(m2[2])) continue;
|
|
18992
|
+
issues.push({
|
|
18993
|
+
severity: "warning",
|
|
18994
|
+
pass: "actions",
|
|
18995
|
+
ruleCode: "tier5-names-app-service",
|
|
18996
|
+
path: at2,
|
|
18997
|
+
message: `actionId "${actionId}" names the app service "${m2[1]}" through the tier5.* route \u2014 use "app.${m2[1]}.${m2[2]}", which goes to the app services and nowhere else (RFC 0074 \xA75)`
|
|
18998
|
+
});
|
|
18999
|
+
}
|
|
19000
|
+
return issues;
|
|
19001
|
+
}
|
|
18985
19002
|
function screenBundleAppServiceIssues(input) {
|
|
18986
19003
|
const issues = [];
|
|
18987
19004
|
const verdict = appServicesVerdictOf(input.ctx);
|
|
@@ -19096,7 +19113,7 @@ function collectActionIds(root) {
|
|
|
19096
19113
|
for (const [k3, v2] of Object.entries(node4)) {
|
|
19097
19114
|
if (isOpaqueAuthorJson(k3, v2, false)) continue;
|
|
19098
19115
|
const here = at2 ? `${at2}.${k3}` : k3;
|
|
19099
|
-
if (typeof v2 === "string" && /(^actionId$|ActionId$|^observerAction$|^observer_action$|^link$)/.test(k3)) out2.push({ actionId: v2, at: here });
|
|
19116
|
+
if (typeof v2 === "string" && /(^actionId$|ActionId$|^observerAction$|^observer_action$|^link$)/.test(k3)) out2.push({ actionId: v2, at: here, key: k3 });
|
|
19100
19117
|
else visit(v2, here);
|
|
19101
19118
|
}
|
|
19102
19119
|
};
|
|
@@ -24542,7 +24559,8 @@ async function bootBundleWorker(bundleJs, opts) {
|
|
|
24542
24559
|
action: typeof p2.action === "string" ? p2.action : "",
|
|
24543
24560
|
intervalMs: typeof p2.intervalMs === "number" ? p2.intervalMs : null,
|
|
24544
24561
|
immediate: p2.immediate === void 0 ? bootImmediate : p2.immediate === true,
|
|
24545
|
-
stop: p2.stop === true
|
|
24562
|
+
stop: p2.stop === true,
|
|
24563
|
+
stopExtras: p2.stop === true ? ["intervalMs", "action", "immediate"].filter((k3) => p2[k3] !== void 0) : []
|
|
24546
24564
|
};
|
|
24547
24565
|
pollDirectives.push(record6);
|
|
24548
24566
|
return record6;
|
|
@@ -27010,6 +27028,12 @@ function validateScreenDescriptor(screenId, served, opts = {}) {
|
|
|
27010
27028
|
actionCatalogWithheld: opts.services !== void 0 || opts.bundleBound === true,
|
|
27011
27029
|
appServices: opts.appServices
|
|
27012
27030
|
}));
|
|
27031
|
+
issues.push(...tier5NamesAppServiceIssues(
|
|
27032
|
+
descriptorActions,
|
|
27033
|
+
opts.appServices,
|
|
27034
|
+
opts.appWorkerActions,
|
|
27035
|
+
Object.keys(services2).length > 0 ? new Set(Object.keys(services2)) : void 0
|
|
27036
|
+
));
|
|
27013
27037
|
const screenServicesForCollision = () => {
|
|
27014
27038
|
if (Object.keys(services2).length > 0) return Object.keys(services2);
|
|
27015
27039
|
if (!opts.bundleJs || !(opts.appWorkerActions || opts.appServices?.appState) || opts.services !== void 0) return void 0;
|
|
@@ -39541,8 +39565,8 @@ var init_wix_cache_policy = __esm({
|
|
|
39541
39565
|
});
|
|
39542
39566
|
|
|
39543
39567
|
// ../l10n/pseudo.ts
|
|
39544
|
-
function isPseudoLocale(
|
|
39545
|
-
return typeof
|
|
39568
|
+
function isPseudoLocale(tag2) {
|
|
39569
|
+
return typeof tag2 === "string" && PSEUDO_LOCALE_ALIASES.includes(tag2.trim().toLowerCase());
|
|
39546
39570
|
}
|
|
39547
39571
|
function accentPlain(text32) {
|
|
39548
39572
|
let out2 = "";
|
|
@@ -39686,10 +39710,10 @@ function pseudoCatalog(source2) {
|
|
|
39686
39710
|
function prefersPseudoLocale(acceptLanguage) {
|
|
39687
39711
|
if (!acceptLanguage) return false;
|
|
39688
39712
|
const ranked = acceptLanguage.split(",").map((part7, order) => {
|
|
39689
|
-
const [
|
|
39713
|
+
const [tag2 = "", ...params] = part7.split(";");
|
|
39690
39714
|
const q4 = params.map((p2) => /^\s*q\s*=\s*([0-9.]+)\s*$/i.exec(p2)?.[1]).find((v2) => v2 !== void 0);
|
|
39691
39715
|
const weight2 = q4 === void 0 ? 1 : Number(q4);
|
|
39692
|
-
return { tag:
|
|
39716
|
+
return { tag: tag2.trim(), weight: Number.isFinite(weight2) ? weight2 : 0, order };
|
|
39693
39717
|
}).filter((e2) => e2.tag && e2.weight > 0);
|
|
39694
39718
|
ranked.sort((x2, y2) => y2.weight - x2.weight || x2.order - y2.order);
|
|
39695
39719
|
return ranked.length > 0 && isPseudoLocale(ranked[0].tag);
|
|
@@ -39705,32 +39729,32 @@ var init_l10n_catalog = __esm({
|
|
|
39705
39729
|
import { readFileSync as readFileSync31, existsSync as existsSync33 } from "node:fs";
|
|
39706
39730
|
import { resolve as resolve27 } from "node:path";
|
|
39707
39731
|
import { fileURLToPath as fileURLToPath19 } from "node:url";
|
|
39708
|
-
function loadCatalog(
|
|
39709
|
-
if (catalogCache.has(
|
|
39710
|
-
const pseudo = isPseudoLocale(
|
|
39711
|
-
const path2 = resolve27(ROOT3, `tools/l10n/catalog.${pseudo ? "en" :
|
|
39732
|
+
function loadCatalog(tag2) {
|
|
39733
|
+
if (catalogCache.has(tag2)) return catalogCache.get(tag2);
|
|
39734
|
+
const pseudo = isPseudoLocale(tag2);
|
|
39735
|
+
const path2 = resolve27(ROOT3, `tools/l10n/catalog.${pseudo ? "en" : tag2}.json`);
|
|
39712
39736
|
if (pseudo) {
|
|
39713
39737
|
const map3 = existsSync33(path2) ? sourceMap(pseudoCatalog(parseCatalog(readFileSync31(path2, "utf8")))) : /* @__PURE__ */ new Map();
|
|
39714
|
-
catalogCache.set(
|
|
39738
|
+
catalogCache.set(tag2, map3);
|
|
39715
39739
|
return map3;
|
|
39716
39740
|
}
|
|
39717
39741
|
const map2 = existsSync33(path2) ? sourceMap(parseCatalog(readFileSync31(path2, "utf8"))) : /* @__PURE__ */ new Map();
|
|
39718
|
-
catalogCache.set(
|
|
39742
|
+
catalogCache.set(tag2, map2);
|
|
39719
39743
|
return map2;
|
|
39720
39744
|
}
|
|
39721
39745
|
function pickLocale(acceptLanguage) {
|
|
39722
39746
|
if (!acceptLanguage) return null;
|
|
39723
39747
|
if (prefersPseudoLocale(acceptLanguage)) return PSEUDO_LOCALE;
|
|
39724
39748
|
const tags = acceptLanguage.split(",").map((s5) => s5.split(";")[0].trim().toLowerCase()).map((s5) => s5.split("-")[0]).filter((s5) => s5.length > 0);
|
|
39725
|
-
for (const
|
|
39726
|
-
if (
|
|
39727
|
-
const path2 = resolve27(ROOT3, `tools/l10n/catalog.${
|
|
39728
|
-
if (existsSync33(path2)) return
|
|
39749
|
+
for (const tag2 of tags) {
|
|
39750
|
+
if (tag2 === "en") continue;
|
|
39751
|
+
const path2 = resolve27(ROOT3, `tools/l10n/catalog.${tag2}.json`);
|
|
39752
|
+
if (existsSync33(path2)) return tag2;
|
|
39729
39753
|
}
|
|
39730
39754
|
return null;
|
|
39731
39755
|
}
|
|
39732
|
-
function translate(node4,
|
|
39733
|
-
return translateWith(node4, loadCatalog(
|
|
39756
|
+
function translate(node4, tag2) {
|
|
39757
|
+
return translateWith(node4, loadCatalog(tag2));
|
|
39734
39758
|
}
|
|
39735
39759
|
function translateWith(node4, map2) {
|
|
39736
39760
|
if (map2.size === 0) return node4;
|
|
@@ -52530,9 +52554,9 @@ function keyboardDismissesOnTap(value2) {
|
|
|
52530
52554
|
}
|
|
52531
52555
|
function isTextEntry(el2) {
|
|
52532
52556
|
if (!el2) return false;
|
|
52533
|
-
const
|
|
52534
|
-
if (
|
|
52535
|
-
if (
|
|
52557
|
+
const tag2 = el2.tagName;
|
|
52558
|
+
if (tag2 === "TEXTAREA") return true;
|
|
52559
|
+
if (tag2 === "INPUT") {
|
|
52536
52560
|
const type2 = el2.type;
|
|
52537
52561
|
return !["button", "submit", "reset", "checkbox", "radio", "range", "color", "file", "image"].includes(type2);
|
|
52538
52562
|
}
|
|
@@ -59918,13 +59942,13 @@ function apply(els) {
|
|
|
59918
59942
|
const attr3 = el2.getAttribute(SL_ATTR) ?? "";
|
|
59919
59943
|
let r3 = resolved.get(el2);
|
|
59920
59944
|
if (!r3 || r3.attr !== attr3 || r3.gen !== generation || generation < 0) {
|
|
59921
|
-
let
|
|
59945
|
+
let tag2;
|
|
59922
59946
|
try {
|
|
59923
|
-
|
|
59947
|
+
tag2 = JSON.parse(attr3);
|
|
59924
59948
|
} catch {
|
|
59925
59949
|
return;
|
|
59926
59950
|
}
|
|
59927
|
-
r3 = { attr: attr3, gen: generation, tag, sc:
|
|
59951
|
+
r3 = { attr: attr3, gen: generation, tag: tag2, sc: tag2.pin ? null : scroller(el2, tag2) };
|
|
59928
59952
|
resolved.set(el2, r3);
|
|
59929
59953
|
}
|
|
59930
59954
|
due.push([el2, scrollLinkedValues(r3.tag, r3.sc ? read(r3.sc, r3.tag.axis === "x") : 0)]);
|
|
@@ -59946,13 +59970,13 @@ function screenScroller(el2) {
|
|
|
59946
59970
|
function railOnly(n2) {
|
|
59947
59971
|
return /(auto|scroll|overlay)/.test(n2.style.overflowX) && !n2.style.overflowY && !n2.style.overflow;
|
|
59948
59972
|
}
|
|
59949
|
-
function scroller(el2,
|
|
59950
|
-
const x2 =
|
|
59973
|
+
function scroller(el2, tag2) {
|
|
59974
|
+
const x2 = tag2.axis === "x";
|
|
59951
59975
|
let sc;
|
|
59952
|
-
if (!
|
|
59976
|
+
if (!tag2.source) sc = screenScroller(el2);
|
|
59953
59977
|
else {
|
|
59954
59978
|
let host = el2.parentElement;
|
|
59955
|
-
while (host && host.getAttribute("data-component-id") !==
|
|
59979
|
+
while (host && host.getAttribute("data-component-id") !== tag2.source) host = host.parentElement;
|
|
59956
59980
|
if (!host || !SOURCE_TYPES.has(host.getAttribute("data-component-type") ?? "")) return null;
|
|
59957
59981
|
const scrollers = [host, ...Array.from(host.children)].filter((n2) => n2 === host || !n2.hasAttribute("data-component-type"));
|
|
59958
59982
|
const own6 = scrollers.find((n2) => scrollableOn(n2, x2));
|
|
@@ -62192,8 +62216,8 @@ var init_pdf = __esm({
|
|
|
62192
62216
|
}
|
|
62193
62217
|
};
|
|
62194
62218
|
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function(it2) {
|
|
62195
|
-
var O2,
|
|
62196
|
-
return it2 === void 0 ? "Undefined" : it2 === null ? "Null" : typeof (
|
|
62219
|
+
var O2, tag2, result;
|
|
62220
|
+
return it2 === void 0 ? "Undefined" : it2 === null ? "Null" : typeof (tag2 = tryGet(O2 = $Object(it2), TO_STRING_TAG)) == "string" ? tag2 : CORRECT_ARGUMENTS ? classofRaw(O2) : (result = classofRaw(O2)) === "Object" && isCallable(O2.callee) ? "Arguments" : result;
|
|
62197
62221
|
};
|
|
62198
62222
|
},
|
|
62199
62223
|
/***/
|
|
@@ -77825,19 +77849,19 @@ fn fs_main(in : VertexOutput) -> @location(0) vec4<f32> {
|
|
|
77825
77849
|
this.compose();
|
|
77826
77850
|
this.#endKnockoutElement(started);
|
|
77827
77851
|
}
|
|
77828
|
-
markPoint(opIdx,
|
|
77852
|
+
markPoint(opIdx, tag2) {
|
|
77829
77853
|
}
|
|
77830
|
-
markPointProps(opIdx,
|
|
77854
|
+
markPointProps(opIdx, tag2, properties) {
|
|
77831
77855
|
}
|
|
77832
|
-
beginMarkedContent(opIdx,
|
|
77856
|
+
beginMarkedContent(opIdx, tag2) {
|
|
77833
77857
|
this.dependencyTracker?.beginMarkedContent(opIdx);
|
|
77834
77858
|
this.markedContentStack.push({
|
|
77835
77859
|
visible: true
|
|
77836
77860
|
});
|
|
77837
77861
|
}
|
|
77838
|
-
beginMarkedContentProps(opIdx,
|
|
77862
|
+
beginMarkedContentProps(opIdx, tag2, properties) {
|
|
77839
77863
|
this.dependencyTracker?.beginMarkedContent(opIdx);
|
|
77840
|
-
if (
|
|
77864
|
+
if (tag2 === "OC") {
|
|
77841
77865
|
this.markedContentStack.push({
|
|
77842
77866
|
visible: this.optionalContentConfig.isVisible(properties)
|
|
77843
77867
|
});
|
|
@@ -141606,6 +141630,7 @@ function swipeTabsAdoption(children2) {
|
|
|
141606
141630
|
function wantsRowStretch(node4) {
|
|
141607
141631
|
const { type: type2, props: props2 } = normalize2(node4);
|
|
141608
141632
|
if (type2 === "Toggle") return props2?.fullWidth !== false;
|
|
141633
|
+
if (type2 === "PageControl") return true;
|
|
141609
141634
|
if (type2 === "Button") {
|
|
141610
141635
|
if (props2?.iconOnly) return false;
|
|
141611
141636
|
if (typeof props2?.fullWidth === "boolean") return props2.fullWidth;
|
|
@@ -144526,7 +144551,7 @@ function listSeparatorStyle(separator, horizontal) {
|
|
|
144526
144551
|
const insetLeading = Math.max(0, Number(s5.insetLeading ?? s5.inset_leading ?? 0) || 0);
|
|
144527
144552
|
return { token, thickness, insetLeading };
|
|
144528
144553
|
}
|
|
144529
|
-
var MOTION_WRAPPER_ATTRS, AppearanceActionContext, rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect3, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, MasonryCells, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, APPEAR_KEYFRAMES, linkedEntranceKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, ENTER_KEYFRAMES, ENTRANCE_KEYFRAMES_CSS, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, scrollLinkedRuntime, confettiRuntimeInjected, lottieRuntimeInjected, lottieAssetHeaders, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, fillsZLayer, fillsZHeight, presentsFromOwnSurface, zLayerIndex, ZFILL_CSS, zFillStylesInjected, hAlignItems, bodyFont, kids2, columnKids, PLACED_TYPES, unplaced, columnPlaceStyle, rowKidCtx, rowKidOwnCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, asBoundCopy, useBoundCopy, InterpolatedTextView, txt, oneLineDir, txtRaw, fragmentCaseText, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, substituteItemDeep, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, InScreenMorphHost, ReactiveDirectScalars, resolveNodeBoundTransforms, HiddenGate, ScrollPastGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOCOMPLETE_TOKENS, 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, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, 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, AVATAR_RING_INSET, AVATAR_BORDER_INSET, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, QrCodeNode, ShapeNode, LegendMarker, LegendNode, cellAlign, dataTableProbe, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, LiveWaveformNode, PageControlNode, TimelineNode, ECHO_WINDOW_MS, heldPageIndex, LiveWindowMeasured, LiveWindowPage, 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, railScrollLeft, carouselScrollLeft, scrollCarouselTo, carouselDotsDrawn, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, ptrCopy, 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, rowRenderers, railRowFrame, renderRailRow, RowAnchors, AD_BANNER_PACKAGE, AD_BANNER_TYPE, reportedUnknownComponents, UnknownComponentNode, WebRenderer, ScrollIntoViewNode;
|
|
144554
|
+
var MOTION_WRAPPER_ATTRS, AppearanceActionContext, rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect3, GridColumnsContext, GridBoundList, GRID_SPAN_ALL, ResponsiveGrid, MasonryCells, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, APPEAR_KEYFRAMES, linkedEntranceKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, ENTER_KEYFRAMES, ENTRANCE_KEYFRAMES_CSS, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, scrollLinkedRuntime, confettiRuntimeInjected, lottieRuntimeInjected, lottieAssetHeaders, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, fillsZLayer, fillsZHeight, presentsFromOwnSurface, zLayerIndex, ZFILL_CSS, zFillStylesInjected, hAlignItems, bodyFont, kids2, columnKids, PLACED_TYPES, unplaced, columnPlaceStyle, rowKidCtx, rowKidOwnCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, asBoundCopy, useBoundCopy, InterpolatedTextView, txt, oneLineDir, txtRaw, fragmentCaseText, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, substituteItemDeep, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, InScreenMorphHost, ReactiveDirectScalars, resolveNodeBoundTransforms, HiddenGate, ScrollPastGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOCOMPLETE_TOKENS, 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, ERROR_STATE_VARIANTS, ERROR_STATE_SPACING, ErrorStateNode, 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, AVATAR_RING_INSET, AVATAR_BORDER_INSET, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, QrCodeNode, ShapeNode, LegendMarker, LegendNode, cellAlign, dataTableProbe, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, LiveWaveformNode, pageControlSizing, PageControlNode, TimelineNode, ECHO_WINDOW_MS, heldPageIndex, LiveWindowMeasured, LiveWindowPage, 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, railScrollLeft, carouselScrollLeft, scrollCarouselTo, carouselDotsDrawn, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, ptrCopy, 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, rowRenderers, railRowFrame, renderRailRow, RowAnchors, AD_BANNER_PACKAGE, AD_BANNER_TYPE, reportedUnknownComponents, UnknownComponentNode, WebRenderer, ScrollIntoViewNode;
|
|
144530
144555
|
var init_renderNode = __esm({
|
|
144531
144556
|
"../../core/web-renderer/src/renderNode.tsx"() {
|
|
144532
144557
|
"use strict";
|
|
@@ -150018,6 +150043,7 @@ var init_renderNode = __esm({
|
|
|
150018
150043
|
}
|
|
150019
150044
|
);
|
|
150020
150045
|
});
|
|
150046
|
+
pageControlSizing = (ctx) => ctx.rowStretch ? { flex: "1 1 0" } : ctx.wrapRowChild ? {} : { width: "100%" };
|
|
150021
150047
|
PageControlNode = withExtras("PageControlNode", ({ props: props2, ctx, wrap }) => {
|
|
150022
150048
|
const C2 = ctx.color;
|
|
150023
150049
|
const boundCount = pageNumber(useResolvedScalar(props2.countPath ?? props2.count_path, ctx));
|
|
@@ -150028,13 +150054,18 @@ var init_renderNode = __esm({
|
|
|
150028
150054
|
if (props2.style === "dots") {
|
|
150029
150055
|
const total = Math.max(0, Math.trunc(boundCount ?? (typeof props2.count === "number" ? props2.count : 0)));
|
|
150030
150056
|
const page = Math.min(Math.max(Math.trunc(boundIndex ?? (typeof props2.currentIndex === "number" ? props2.currentIndex : 0)), 0), Math.max(total - 1, 0));
|
|
150031
|
-
return /* @__PURE__ */ jsx16("div", { style: { display: "
|
|
150057
|
+
return /* @__PURE__ */ jsx16("div", { style: rowShareFloor({ display: "flex", justifyContent: "center", alignItems: "center", gap: 6, height: 7, ...pageControlSizing(ctx), ...wrap }, ctx.rowStretch === true, "fit-content"), children: pageControlTaperedDots(total, page).map(({ index, scale }) => (
|
|
150032
150058
|
// Every dot keeps a full 7px slot (the tap area on iOS/Android); the drawn dot is centred in it, so the row
|
|
150033
150059
|
// does not shrink or shift as the taper moves.
|
|
150034
150060
|
/* @__PURE__ */ jsx16("span", { "data-page-control-slot": "", style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: 7, height: 7, flex: "none" }, children: /* @__PURE__ */ jsx16("span", { "data-page-control-dot": "", style: { width: 7 * scale, height: 7 * scale, borderRadius: "50%", background: index === page ? accent : C2("surfaceTertiary", "#cdd2d9") } }) }, index)
|
|
150035
150061
|
)) });
|
|
150036
150062
|
}
|
|
150037
|
-
return
|
|
150063
|
+
return (
|
|
150064
|
+
// In a column it fills the width; in a row (ctx.rowStretch) it shares the row by flex instead of claiming all of it.
|
|
150065
|
+
// (A padding modifier is already border-box: the modifier path adds it.)
|
|
150066
|
+
// Floored at its dots (rowShareFloor, AFTER `...wrap`, as ButtonNode): a long sibling never squeezes it below them.
|
|
150067
|
+
/* @__PURE__ */ jsx16("div", { style: rowShareFloor({ display: "flex", justifyContent: "center", alignItems: "center", gap: 8, ...pageControlSizing(ctx), ...wrap }, ctx.rowStretch === true, "fit-content"), children: Array.from({ length: count3 }).map((_2, i2) => /* @__PURE__ */ jsx16("span", { style: { width: i2 === cur ? 22 : 9, height: 9, flexShrink: 0, borderRadius: 999, background: i2 === cur ? accent : C2("textTertiary", "#aab2bd"), transition: "width .2s" } }, i2)) })
|
|
150068
|
+
);
|
|
150038
150069
|
});
|
|
150039
150070
|
TimelineNode = withExtras("TimelineNode", ({ props: props2, ctx, wrap }) => {
|
|
150040
150071
|
const C2 = ctx.color;
|
|
@@ -154724,9 +154755,9 @@ function isWellFormedAppParam(app2) {
|
|
|
154724
154755
|
}
|
|
154725
154756
|
function sourceTranslationKeys(state) {
|
|
154726
154757
|
if (!state.app) return void 0;
|
|
154727
|
-
const
|
|
154728
|
-
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(
|
|
154729
|
-
const path2 = resolve34(state.app.dir, "l10n", `${
|
|
154758
|
+
const tag2 = uiConfig(state.app.module.config).locale?.default ?? "en";
|
|
154759
|
+
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(tag2)) return /* @__PURE__ */ new Set();
|
|
154760
|
+
const path2 = resolve34(state.app.dir, "l10n", `${tag2}.json`);
|
|
154730
154761
|
if (!existsSync40(path2)) return /* @__PURE__ */ new Set();
|
|
154731
154762
|
try {
|
|
154732
154763
|
return new Set(keyMap(parseCatalog(readFileSync43(path2, "utf8")), { sourceFallback: true }).keys());
|
|
@@ -154738,13 +154769,13 @@ function renderL10nFor(state, locale) {
|
|
|
154738
154769
|
if (typeof locale !== "string" || !state.app) return void 0;
|
|
154739
154770
|
const pseudo = isPseudoLocale(locale);
|
|
154740
154771
|
const sourceLocale = uiConfig(state.app.module.config).locale?.default ?? "en";
|
|
154741
|
-
const
|
|
154742
|
-
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(
|
|
154743
|
-
const path2 = resolve34(state.app.dir, "l10n", `${
|
|
154772
|
+
const tag2 = pseudo ? sourceLocale : locale.trim();
|
|
154773
|
+
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(tag2)) return void 0;
|
|
154774
|
+
const path2 = resolve34(state.app.dir, "l10n", `${tag2}.json`);
|
|
154744
154775
|
if (!existsSync40(path2)) return void 0;
|
|
154745
154776
|
try {
|
|
154746
154777
|
const parsed = parseCatalog(readFileSync43(path2, "utf8"));
|
|
154747
|
-
return { catalog: keyMap(pseudo ? pseudoCatalog(parsed) : parsed, { sourceFallback:
|
|
154778
|
+
return { catalog: keyMap(pseudo ? pseudoCatalog(parsed) : parsed, { sourceFallback: tag2 === sourceLocale }), localeTag: pseudo ? PSEUDO_LOCALE : tag2 };
|
|
154748
154779
|
} catch {
|
|
154749
154780
|
return void 0;
|
|
154750
154781
|
}
|
|
@@ -154752,21 +154783,21 @@ function renderL10nFor(state, locale) {
|
|
|
154752
154783
|
function handleL10nRequest(req, res, state) {
|
|
154753
154784
|
const u2 = new URL(req.url ?? "", "http://localhost");
|
|
154754
154785
|
const app2 = (u2.searchParams.get("app") ?? "").trim();
|
|
154755
|
-
let
|
|
154786
|
+
let tag2 = (u2.searchParams.get("tag") ?? "").trim();
|
|
154756
154787
|
const cors = { "access-control-allow-origin": "*" };
|
|
154757
154788
|
if (!isWellFormedAppParam(app2)) {
|
|
154758
154789
|
return sendJson(res, 400, { error: "bad_app", hint: "pass ?app=<kebab-app-name>&tag=<locale>" }, cors);
|
|
154759
154790
|
}
|
|
154760
|
-
if (!/^[a-z]{2}(-[A-Za-z0-9]+)?$/.test(
|
|
154791
|
+
if (!/^[a-z]{2}(-[A-Za-z0-9]+)?$/.test(tag2)) {
|
|
154761
154792
|
return sendJson(res, 400, { error: "bad_tag", hint: "pass a BCP-47 primary subtag, e.g. tag=he" }, cors);
|
|
154762
154793
|
}
|
|
154763
154794
|
if (!state.app || !servedAppNameMatches(app2, state.app.name)) {
|
|
154764
154795
|
return sendJson(res, 404, { error: "unknown_app", app: app2 }, cors);
|
|
154765
154796
|
}
|
|
154766
154797
|
const sourceLocale = uiConfig(state.app.module.config).locale?.default ?? "en";
|
|
154767
|
-
if (isPseudoLocale(
|
|
154768
|
-
const pseudo =
|
|
154769
|
-
const path2 = resolve34(state.app.dir, "l10n", `${pseudo ? sourceLocale :
|
|
154798
|
+
if (isPseudoLocale(tag2) || tag2 === sourceLocale && prefersPseudoLocale(String(req.headers["accept-language"] ?? ""))) tag2 = PSEUDO_LOCALE;
|
|
154799
|
+
const pseudo = tag2 === PSEUDO_LOCALE;
|
|
154800
|
+
const path2 = resolve34(state.app.dir, "l10n", `${pseudo ? sourceLocale : tag2}.json`);
|
|
154770
154801
|
if (!existsSync40(path2)) {
|
|
154771
154802
|
res.writeHead(204, cors);
|
|
154772
154803
|
res.end();
|
|
@@ -154776,12 +154807,12 @@ function handleL10nRequest(req, res, state) {
|
|
|
154776
154807
|
try {
|
|
154777
154808
|
const parsed = parseCatalog(readFileSync43(path2, "utf8"));
|
|
154778
154809
|
messages = Object.fromEntries(
|
|
154779
|
-
keyMap(pseudo ? pseudoCatalog(parsed) : parsed, { sourceFallback:
|
|
154810
|
+
keyMap(pseudo ? pseudoCatalog(parsed) : parsed, { sourceFallback: tag2 === sourceLocale })
|
|
154780
154811
|
);
|
|
154781
154812
|
} catch {
|
|
154782
|
-
return sendJson(res, 500, { error: "catalog_unreadable", app: app2, tag }, cors);
|
|
154813
|
+
return sendJson(res, 500, { error: "catalog_unreadable", app: app2, tag: tag2 }, cors);
|
|
154783
154814
|
}
|
|
154784
|
-
const body = JSON.stringify({ app: app2, tag, messages });
|
|
154815
|
+
const body = JSON.stringify({ app: app2, tag: tag2, messages });
|
|
154785
154816
|
const etag = makeEtag(body);
|
|
154786
154817
|
if (req.headers["if-none-match"] === etag) {
|
|
154787
154818
|
res.writeHead(304, { etag, ...cors });
|
|
@@ -158641,9 +158672,9 @@ var init_wix_placeholders = __esm({
|
|
|
158641
158672
|
import { existsSync as existsSync42, readFileSync as readFileSync45 } from "node:fs";
|
|
158642
158673
|
import { join as join37, relative as relative10, isAbsolute as isAbsolute4 } from "node:path";
|
|
158643
158674
|
function pinsSingleLanguage(locale) {
|
|
158644
|
-
const
|
|
158645
|
-
if (!
|
|
158646
|
-
return !locale.translations?.some((target) => target !==
|
|
158675
|
+
const tag2 = locale?.default;
|
|
158676
|
+
if (!tag2 || tag2 === "en" || !locale?.pin) return false;
|
|
158677
|
+
return !locale.translations?.some((target) => target !== tag2);
|
|
158647
158678
|
}
|
|
158648
158679
|
function pinnedLanguageSwap(locale, appDir3) {
|
|
158649
158680
|
if (!pinsSingleLanguage(locale)) return void 0;
|
|
@@ -159186,9 +159217,9 @@ function serializationProblem(value2, at2 = "result") {
|
|
|
159186
159217
|
if (!v2 || typeof v2 !== "object") return null;
|
|
159187
159218
|
if (seen.has(v2)) return { fatal: true, what: `a cycle at ${path2}` };
|
|
159188
159219
|
if (typeof v2.toJSON === "function") return null;
|
|
159189
|
-
const
|
|
159190
|
-
if (
|
|
159191
|
-
return { fatal: false, what: `a ${
|
|
159220
|
+
const tag2 = tagOf(v2);
|
|
159221
|
+
if (tag2 === "Map" || tag2 === "Set" || tag2 === "WeakMap" || tag2 === "WeakSet") {
|
|
159222
|
+
return { fatal: false, what: `a ${tag2} at ${path2} (JSON sends {})` };
|
|
159192
159223
|
}
|
|
159193
159224
|
seen.add(v2);
|
|
159194
159225
|
try {
|
|
@@ -160093,6 +160124,7 @@ var init_crawl_relations = __esm({
|
|
|
160093
160124
|
// ../../core/dev-server/src/screen-crawl.ts
|
|
160094
160125
|
var screen_crawl_exports = {};
|
|
160095
160126
|
__export(screen_crawl_exports, {
|
|
160127
|
+
APP_SERVICES_SCREEN: () => APP_SERVICES_SCREEN,
|
|
160096
160128
|
MEMBER_IDENTITY_ACTION: () => MEMBER_IDENTITY_ACTION,
|
|
160097
160129
|
REPEATED_CALL_LIMIT: () => REPEATED_CALL_LIMIT,
|
|
160098
160130
|
UNTRACKED_ITEMS: () => UNTRACKED_ITEMS,
|
|
@@ -160100,6 +160132,7 @@ __export(screen_crawl_exports, {
|
|
|
160100
160132
|
actionSitesForDescriptor: () => actionSitesForDescriptor,
|
|
160101
160133
|
bootAndSnapshotState: () => bootAndSnapshotState,
|
|
160102
160134
|
bootScreenWorker: () => bootScreenWorker,
|
|
160135
|
+
crawlAppServices: () => crawlAppServices,
|
|
160103
160136
|
crawlScreen: () => crawlScreen,
|
|
160104
160137
|
crawlScreenCapabilitySuccess: () => crawlScreenCapabilitySuccess,
|
|
160105
160138
|
crawlScreenDeep: () => crawlScreenDeep,
|
|
@@ -160238,6 +160271,33 @@ function errText(e2) {
|
|
|
160238
160271
|
const msg = e2 && typeof e2 === "object" ? e2.message : void 0;
|
|
160239
160272
|
return typeof msg === "string" ? msg : String(e2);
|
|
160240
160273
|
}
|
|
160274
|
+
function pollStopExtraFinding(screen, trigger, d2, source2) {
|
|
160275
|
+
if (!d2.stop || !d2.stopExtras.length) return null;
|
|
160276
|
+
return {
|
|
160277
|
+
screen,
|
|
160278
|
+
trigger,
|
|
160279
|
+
invariant: "poll-stop-extra-fields",
|
|
160280
|
+
severity: "warning",
|
|
160281
|
+
...source2 ? { source: source2 } : {},
|
|
160282
|
+
message: `_poll "${d2.id || "(no id)"}" is a stop (stop: true) but also sets ${d2.stopExtras.join(", ")} \u2014 every host ignores those fields`,
|
|
160283
|
+
actual: d2.stopExtras.join(","),
|
|
160284
|
+
hint: "the stop form is exactly `{ id, stop: true }`. If you meant to (re)start the poll, drop `stop`; if you meant to stop it, drop the other fields"
|
|
160285
|
+
};
|
|
160286
|
+
}
|
|
160287
|
+
function sourceOfLiteral(bundleJs, bundleMap, action, literal4) {
|
|
160288
|
+
if (!bundleJs || !bundleMap) return void 0;
|
|
160289
|
+
const escaped = action ? action.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") : null;
|
|
160290
|
+
const def2 = escaped ? new RegExp(`[\\s,{"']${escaped}["']?\\s*[:(]`).exec(bundleJs) : null;
|
|
160291
|
+
const from = def2 ? def2.index : 0;
|
|
160292
|
+
const hit = new RegExp(literal4.source, "g");
|
|
160293
|
+
hit.lastIndex = from;
|
|
160294
|
+
const m2 = hit.exec(bundleJs);
|
|
160295
|
+
if (!m2) return void 0;
|
|
160296
|
+
const before = bundleJs.slice(0, m2.index);
|
|
160297
|
+
const line = before.split("\n").length;
|
|
160298
|
+
const col = m2.index - (before.lastIndexOf("\n") + 1);
|
|
160299
|
+
return mapBundleFrame(bundleMap, line, col) ?? void 0;
|
|
160300
|
+
}
|
|
160241
160301
|
function sourceOfStack(stack, bundleMap) {
|
|
160242
160302
|
if (!stack || !bundleMap) return void 0;
|
|
160243
160303
|
const m2 = /himi-bundle\.js:(\d+):(\d+)/.exec(stack);
|
|
@@ -161475,7 +161535,12 @@ async function crawlScreenInner(opts) {
|
|
|
161475
161535
|
const declared = Object.keys(w2.handles);
|
|
161476
161536
|
for (const d2 of w2.pollDirectives.splice(0)) {
|
|
161477
161537
|
const label4 = d2.id ? `_poll "${d2.id}"` : "_poll";
|
|
161478
|
-
if (d2.stop)
|
|
161538
|
+
if (d2.stop) {
|
|
161539
|
+
const act = typeof trigger === "object" ? parseWorkerAction(trigger.action)?.action ?? null : null;
|
|
161540
|
+
const extra = pollStopExtraFinding(screenId, trigger, d2, sourceOfLiteral(bundleJs, opts.bundleMap, act, POLL_STOP_LITERAL));
|
|
161541
|
+
if (extra) findings.push(extra);
|
|
161542
|
+
continue;
|
|
161543
|
+
}
|
|
161479
161544
|
if (!d2.id) {
|
|
161480
161545
|
findings.push({
|
|
161481
161546
|
screen: screenId,
|
|
@@ -162700,7 +162765,319 @@ async function crawlScreenRelations(opts) {
|
|
|
162700
162765
|
return { findings: dedupe(findings), checked, byKind };
|
|
162701
162766
|
});
|
|
162702
162767
|
}
|
|
162703
|
-
|
|
162768
|
+
async function crawlAppServices(opts) {
|
|
162769
|
+
return withSwallowedRejections(async () => {
|
|
162770
|
+
const findings = [];
|
|
162771
|
+
const effects = [];
|
|
162772
|
+
const hooks = [];
|
|
162773
|
+
const gaps = [];
|
|
162774
|
+
let actionsExercised = 0;
|
|
162775
|
+
let bindingsChecked = 0;
|
|
162776
|
+
const T2 = (action, key4 = "app") => ({ tap: null, key: key4, action });
|
|
162777
|
+
const throwHint = "an uncaught throw in an app service leaves the app on whatever state it had \u2014 wrap the failing call and set an error state";
|
|
162778
|
+
const descriptor = { logicBundle: { declaredCapabilities: [...opts.declaredCapabilities ?? []] } };
|
|
162779
|
+
const { call: transport } = layeredTransport({ rules: opts.rules, cmsSeed: opts.cmsSeed, canned: opts.canned });
|
|
162780
|
+
const bootApp = () => bootScreenWorker({
|
|
162781
|
+
bundleJs: opts.bundleJs,
|
|
162782
|
+
descriptor,
|
|
162783
|
+
wixCall: transport,
|
|
162784
|
+
budgetMs: opts.budgetMs,
|
|
162785
|
+
clock: opts.clock,
|
|
162786
|
+
seed: opts.seed,
|
|
162787
|
+
localDbSchema: opts.localDbSchema,
|
|
162788
|
+
l10n: opts.l10n,
|
|
162789
|
+
base44Data: opts.base44Data,
|
|
162790
|
+
...opts.evaluator ? { evaluator: opts.evaluator } : {}
|
|
162791
|
+
});
|
|
162792
|
+
const reportThrow = (service, action, e2, trigger) => {
|
|
162793
|
+
const source2 = sourceOfStack(e2?.stack, opts.bundleMap);
|
|
162794
|
+
findings.push({
|
|
162795
|
+
screen: APP_SERVICES_SCREEN,
|
|
162796
|
+
trigger,
|
|
162797
|
+
invariant: "worker-threw",
|
|
162798
|
+
severity: "error",
|
|
162799
|
+
...source2 ? { source: source2 } : {},
|
|
162800
|
+
message: `${service}: ${action}: ${errText(e2)}`,
|
|
162801
|
+
hint: throwHint
|
|
162802
|
+
});
|
|
162803
|
+
};
|
|
162804
|
+
const ticked2 = /* @__PURE__ */ new Set();
|
|
162805
|
+
const invoke = async (w3, service, action, args, origin, what, trigger) => {
|
|
162806
|
+
const handle = w3.handles[service];
|
|
162807
|
+
if (!handle || !handle.actionNames().includes(action)) return;
|
|
162808
|
+
const mark = { wix: w3.calls.length, host: w3.hostCalls.length };
|
|
162809
|
+
const navMark = w3.navDirectives.length;
|
|
162810
|
+
const pollMark = w3.pollDirectives.length;
|
|
162811
|
+
try {
|
|
162812
|
+
await handle.dispatch(action, ...args);
|
|
162813
|
+
} catch (e2) {
|
|
162814
|
+
reportThrow(service, action, e2, trigger);
|
|
162815
|
+
}
|
|
162816
|
+
const effect = effectSince(w3, mark, `app.${service}.${action}`, null);
|
|
162817
|
+
if (effect) effects.push(effect);
|
|
162818
|
+
for (const nav of w3.navDirectives.slice(navMark)) {
|
|
162819
|
+
if (origin === "gesture") continue;
|
|
162820
|
+
const source2 = sourceOfLiteral(opts.bundleJs, opts.bundleMap, action, /\b_nav\b/);
|
|
162821
|
+
findings.push({
|
|
162822
|
+
screen: APP_SERVICES_SCREEN,
|
|
162823
|
+
trigger,
|
|
162824
|
+
invariant: "app-nav-without-gesture",
|
|
162825
|
+
severity: "error",
|
|
162826
|
+
...source2 ? { source: source2 } : {},
|
|
162827
|
+
message: `${what} (app.${service}.${action}) returned a _nav to "${nav.screenId}" from an ambient invocation \u2014 the host drops it as no_user_gesture, so nothing navigates`,
|
|
162828
|
+
actual: nav.screenId,
|
|
162829
|
+
hint: "only a returned _nav from a user gesture is honoured (RFC 0074 \xA77). From a poll/stream tick, a hook, a push receipt or an app.dispatch, show ui.alert / ui.snackbar with an action whose actionId is an app.<svc>.<action> that returns the _nav \u2014 pressing it is the gesture"
|
|
162830
|
+
});
|
|
162831
|
+
}
|
|
162832
|
+
for (const d2 of w3.pollDirectives.slice(pollMark)) {
|
|
162833
|
+
if (d2.stop) {
|
|
162834
|
+
const extra = pollStopExtraFinding(APP_SERVICES_SCREEN, trigger, d2, sourceOfLiteral(opts.bundleJs, opts.bundleMap, action, POLL_STOP_LITERAL));
|
|
162835
|
+
if (extra) findings.push(extra);
|
|
162836
|
+
continue;
|
|
162837
|
+
}
|
|
162838
|
+
const [svc, act] = d2.action.split(".");
|
|
162839
|
+
if (!d2.id || !svc || !act || d2.action.split(".").length !== 2) continue;
|
|
162840
|
+
const key4 = `${svc}.${act}`;
|
|
162841
|
+
if (ticked2.has(key4) || ticked2.size >= APP_TICK_LIMIT) continue;
|
|
162842
|
+
ticked2.add(key4);
|
|
162843
|
+
await invoke(w3, svc, act, [], "ambient", `a _poll tick ("${d2.id}")`, T2(`app.${svc}.${act}`, "poll"));
|
|
162844
|
+
}
|
|
162845
|
+
};
|
|
162846
|
+
let booted = false;
|
|
162847
|
+
const bootWithLaunch = async () => {
|
|
162848
|
+
ticked2.clear();
|
|
162849
|
+
const effectsMark = effects.length;
|
|
162850
|
+
const w3 = await bootApp();
|
|
162851
|
+
for (const d2 of w3.pollDirectives.splice(0)) {
|
|
162852
|
+
if (d2.stop) {
|
|
162853
|
+
const extra = pollStopExtraFinding(APP_SERVICES_SCREEN, "boot", d2, sourceOfLiteral(opts.bundleJs, opts.bundleMap, null, POLL_STOP_LITERAL));
|
|
162854
|
+
if (extra) findings.push(extra);
|
|
162855
|
+
} else {
|
|
162856
|
+
const [svc, act] = d2.action.split(".");
|
|
162857
|
+
if (d2.id && svc && act && d2.action.split(".").length === 2 && !ticked2.has(d2.action) && ticked2.size < APP_TICK_LIMIT) {
|
|
162858
|
+
ticked2.add(d2.action);
|
|
162859
|
+
await invoke(w3, svc, act, [], "ambient", `a _poll tick ("${d2.id}")`, T2(`app.${svc}.${act}`, "poll"));
|
|
162860
|
+
}
|
|
162861
|
+
}
|
|
162862
|
+
}
|
|
162863
|
+
for (const svc of Object.keys(w3.handles)) {
|
|
162864
|
+
await invoke(w3, svc, "onLaunch", [], "ambient", "onLaunch", T2(`app.${svc}.onLaunch`, "hook"));
|
|
162865
|
+
}
|
|
162866
|
+
if (booted) effects.length = effectsMark;
|
|
162867
|
+
booted = true;
|
|
162868
|
+
return w3;
|
|
162869
|
+
};
|
|
162870
|
+
let launchedState = {};
|
|
162871
|
+
const w2 = await bootWithLaunch();
|
|
162872
|
+
try {
|
|
162873
|
+
const services2 = Object.keys(w2.handles);
|
|
162874
|
+
for (const e2 of w2.errors) {
|
|
162875
|
+
const source2 = sourceOfStack(e2.stack, opts.bundleMap);
|
|
162876
|
+
findings.push({
|
|
162877
|
+
screen: APP_SERVICES_SCREEN,
|
|
162878
|
+
trigger: "boot",
|
|
162879
|
+
invariant: "worker-threw",
|
|
162880
|
+
severity: "error",
|
|
162881
|
+
...source2 ? { source: source2 } : {},
|
|
162882
|
+
message: `${e2.service}: ${e2.message}`,
|
|
162883
|
+
hint: throwHint
|
|
162884
|
+
});
|
|
162885
|
+
}
|
|
162886
|
+
for (const nav of w2.navDirectives.splice(0)) {
|
|
162887
|
+
const source2 = sourceOfLiteral(opts.bundleJs, opts.bundleMap, null, /\b_nav\b/);
|
|
162888
|
+
findings.push({
|
|
162889
|
+
screen: APP_SERVICES_SCREEN,
|
|
162890
|
+
trigger: "boot",
|
|
162891
|
+
invariant: "app-nav-without-gesture",
|
|
162892
|
+
severity: "error",
|
|
162893
|
+
...source2 ? { source: source2 } : {},
|
|
162894
|
+
message: `the app bundle returned a _nav to "${nav.screenId}" while booting (load / onLaunch / first poll tick) \u2014 an ambient invocation, so the host drops it as no_user_gesture`,
|
|
162895
|
+
actual: nav.screenId,
|
|
162896
|
+
hint: "only a returned _nav from a user gesture is honoured (RFC 0074 \xA77)"
|
|
162897
|
+
});
|
|
162898
|
+
}
|
|
162899
|
+
const state = snapshot3(w2).state;
|
|
162900
|
+
launchedState = state;
|
|
162901
|
+
const hooksRun = [];
|
|
162902
|
+
{
|
|
162903
|
+
const launchers = services2.filter((svc) => w2.handles[svc].actionNames().includes("onLaunch"));
|
|
162904
|
+
hooksRun.push({ hook: "onLaunch", services: launchers });
|
|
162905
|
+
}
|
|
162906
|
+
const scanned = [
|
|
162907
|
+
...opts.screens.map((s5) => ({ owner: s5.screenId, tree: s5.descriptor })),
|
|
162908
|
+
...opts.appConfig ? [{ owner: "(app config)", tree: opts.appConfig }] : []
|
|
162909
|
+
];
|
|
162910
|
+
for (const { owner, tree } of scanned) {
|
|
162911
|
+
for (const ref of collectAppBindings(tree)) {
|
|
162912
|
+
const parsed = parseAppBinding(ref.value);
|
|
162913
|
+
if (!parsed) continue;
|
|
162914
|
+
bindingsChecked += 1;
|
|
162915
|
+
const at2 = `${owner}:${ref.at}`;
|
|
162916
|
+
if (!(parsed.service in state)) {
|
|
162917
|
+
findings.push({
|
|
162918
|
+
screen: owner === "(app config)" ? APP_SERVICES_SCREEN : owner,
|
|
162919
|
+
trigger: "boot",
|
|
162920
|
+
invariant: "app-binding-unresolved",
|
|
162921
|
+
severity: ref.collapseWhenEmpty === true ? "warning" : "error",
|
|
162922
|
+
message: `binding "${ref.value}" names app service "${parsed.service}", which the app bundle does not define`,
|
|
162923
|
+
at: at2,
|
|
162924
|
+
hint: `app services defined: ${services2.join(", ") || "none"}`
|
|
162925
|
+
});
|
|
162926
|
+
continue;
|
|
162927
|
+
}
|
|
162928
|
+
const first = parsed.path.split(/[.[]/)[0];
|
|
162929
|
+
if (first && pathValue(state[parsed.service], first) === void 0) {
|
|
162930
|
+
const source2 = sourceOfLiteral(opts.bundleJs, opts.bundleMap, null, new RegExp(`defineService\\w*\\(\\s*["']${parsed.service}["']`));
|
|
162931
|
+
findings.push({
|
|
162932
|
+
screen: owner === "(app config)" ? APP_SERVICES_SCREEN : owner,
|
|
162933
|
+
trigger: "boot",
|
|
162934
|
+
invariant: "app-binding-unresolved",
|
|
162935
|
+
severity: ref.collapseWhenEmpty === true ? "warning" : "error",
|
|
162936
|
+
...source2 ? { source: source2 } : {},
|
|
162937
|
+
message: `binding "${ref.value}" reads "${first}", which is absent from ${parsed.service}'s state after onLaunch`,
|
|
162938
|
+
at: at2,
|
|
162939
|
+
hint: `${parsed.service} state keys: ${Object.keys(state[parsed.service] ?? {}).join(", ") || "none"}`
|
|
162940
|
+
});
|
|
162941
|
+
}
|
|
162942
|
+
}
|
|
162943
|
+
}
|
|
162944
|
+
for (const hook of APP_HOOKS) {
|
|
162945
|
+
const declaring = services2.filter((svc) => w2.handles[svc].actionNames().includes(hook.name));
|
|
162946
|
+
if (!hooksRun.some((h2) => h2.hook === hook.label)) hooksRun.push({ hook: hook.label, services: declaring });
|
|
162947
|
+
for (const svc of declaring) {
|
|
162948
|
+
await invoke(w2, svc, hook.name, hook.args, hook.origin, hook.label, T2(`app.${svc}.${hook.name}`, "hook"));
|
|
162949
|
+
}
|
|
162950
|
+
if (hook.name === "onPushOpened" && declaring.length) {
|
|
162951
|
+
gaps.push({
|
|
162952
|
+
surface: "onPushOpened",
|
|
162953
|
+
why: "dispatched with a synthetic { link, payload: {}, resolved: false }; a real notification payload and the host's route resolution (which sets `resolved: true` and withholds gesture credit) are not reachable headlessly",
|
|
162954
|
+
remedy: "drive a real push on a device (Argus) \u2014 a notification tap \u2014 to see the hook with the payload your server sends"
|
|
162955
|
+
});
|
|
162956
|
+
}
|
|
162957
|
+
if (hook.name === "onIdentityChange" && declaring.length && hook.args[0] && hook.args[0].signedIn === true) {
|
|
162958
|
+
gaps.push({
|
|
162959
|
+
surface: "onIdentityChange",
|
|
162960
|
+
why: "the worker's wixApi is not rebound to a member session and its persisted snapshot is not re-keyed \u2014 only the reducer runs",
|
|
162961
|
+
remedy: "sign in and out on a device to prove the member-session rebind and the snapshot re-key"
|
|
162962
|
+
});
|
|
162963
|
+
}
|
|
162964
|
+
}
|
|
162965
|
+
hooks.push(...hooksRun);
|
|
162966
|
+
} finally {
|
|
162967
|
+
w2.dispose();
|
|
162968
|
+
}
|
|
162969
|
+
const refs = [];
|
|
162970
|
+
const seenRefs = /* @__PURE__ */ new Set();
|
|
162971
|
+
const addRef = (r3) => {
|
|
162972
|
+
const id = `${r3.actionId}|${r3.origin}|${JSON.stringify(r3.args)}`;
|
|
162973
|
+
if (seenRefs.has(id)) return;
|
|
162974
|
+
seenRefs.add(id);
|
|
162975
|
+
refs.push(r3);
|
|
162976
|
+
};
|
|
162977
|
+
const dropped = [];
|
|
162978
|
+
const appState = launchedState;
|
|
162979
|
+
const fixtureArgs = (actionId, params, args) => {
|
|
162980
|
+
const out2 = {};
|
|
162981
|
+
for (const [k3, v2] of Object.entries({ ...params ?? {}, ...args ?? {} })) {
|
|
162982
|
+
if (typeof v2 === "string" && /^\$(?:item\.|service:|app:|t:|input\.)/.test(v2)) {
|
|
162983
|
+
const parsed = parseAppBinding(v2);
|
|
162984
|
+
const value2 = parsed ? pathValue(appState[parsed.service], parsed.path) : void 0;
|
|
162985
|
+
if (value2 === void 0) {
|
|
162986
|
+
dropped.push(`${actionId}.${k3}`);
|
|
162987
|
+
continue;
|
|
162988
|
+
}
|
|
162989
|
+
out2[k3] = value2;
|
|
162990
|
+
} else out2[k3] = v2;
|
|
162991
|
+
}
|
|
162992
|
+
return Object.keys(out2).length ? [out2] : [];
|
|
162993
|
+
};
|
|
162994
|
+
for (const screen of opts.screens) {
|
|
162995
|
+
for (const site of actionSitesForDescriptor(screen.descriptor)) {
|
|
162996
|
+
if (!parseAppActionId(site.actionId)) continue;
|
|
162997
|
+
if (opts.skipAction?.(site.actionId, site.componentId)) continue;
|
|
162998
|
+
addRef({ actionId: site.actionId, origin: "gesture", origin_label: "a tap", owner: screen.screenId, componentId: site.componentId, key: site.key, args: fixtureArgs(site.actionId, site.params, site.args) });
|
|
162999
|
+
}
|
|
163000
|
+
if (screen.bundleJs) {
|
|
163001
|
+
for (const m2 of screen.bundleJs.matchAll(/\bapp\.dispatch\(\s*["']([A-Za-z0-9_-]+)\.([A-Za-z0-9_-]+)["']/g)) {
|
|
163002
|
+
addRef({ actionId: `app.${m2[1]}.${m2[2]}`, origin: "ambient", origin_label: "an app.dispatch from the screen worker", owner: screen.screenId, componentId: null, key: "app.dispatch", args: [] });
|
|
163003
|
+
}
|
|
163004
|
+
}
|
|
163005
|
+
}
|
|
163006
|
+
if (opts.appConfig) {
|
|
163007
|
+
for (const ref of collectActionIds(opts.appConfig)) {
|
|
163008
|
+
if (!parseAppActionId(ref.actionId)) continue;
|
|
163009
|
+
const receipt = /^(?:observerAction|observer_action)$/.test(ref.key);
|
|
163010
|
+
addRef({
|
|
163011
|
+
actionId: ref.actionId,
|
|
163012
|
+
origin: receipt ? "ambient" : "gesture",
|
|
163013
|
+
origin_label: receipt ? "a push receipt (observer_action)" : "a chrome tap",
|
|
163014
|
+
owner: APP_SERVICES_SCREEN,
|
|
163015
|
+
componentId: ref.at,
|
|
163016
|
+
key: ref.key,
|
|
163017
|
+
args: []
|
|
163018
|
+
});
|
|
163019
|
+
}
|
|
163020
|
+
} else {
|
|
163021
|
+
gaps.push({ surface: "app config", why: "the baked app config was not supplied, so chrome actions, push routes and observer_action ids were not scanned", remedy: "run through `himi test --content <dir>`, which passes the baked app config" });
|
|
163022
|
+
}
|
|
163023
|
+
for (const ref of refs) {
|
|
163024
|
+
const parsed = parseAppActionId(ref.actionId);
|
|
163025
|
+
const trigger = { tap: ref.componentId, key: ref.key, action: ref.actionId };
|
|
163026
|
+
const w22 = await bootWithLaunch();
|
|
163027
|
+
try {
|
|
163028
|
+
const handle = w22.handles[parsed.service];
|
|
163029
|
+
if (!handle) {
|
|
163030
|
+
findings.push({
|
|
163031
|
+
screen: ref.owner,
|
|
163032
|
+
trigger,
|
|
163033
|
+
invariant: "app-action-unresolved",
|
|
163034
|
+
severity: "error",
|
|
163035
|
+
...ref.componentId ? { at: ref.componentId } : {},
|
|
163036
|
+
message: `"${ref.key}" dispatches ${ref.actionId}, but the app bundle defines no service "${parsed.service}"`,
|
|
163037
|
+
hint: `app services defined: ${Object.keys(w22.handles).join(", ") || "none"}`
|
|
163038
|
+
});
|
|
163039
|
+
continue;
|
|
163040
|
+
}
|
|
163041
|
+
if (!handle.actionNames().includes(parsed.action)) {
|
|
163042
|
+
findings.push({
|
|
163043
|
+
screen: ref.owner,
|
|
163044
|
+
trigger,
|
|
163045
|
+
invariant: "app-action-unresolved",
|
|
163046
|
+
severity: "error",
|
|
163047
|
+
...ref.componentId ? { at: ref.componentId } : {},
|
|
163048
|
+
message: `"${ref.key}" dispatches ${ref.actionId}, but app service "${parsed.service}" declares no action "${parsed.action}"`,
|
|
163049
|
+
hint: `${parsed.service} actions: ${handle.actionNames().join(", ") || "none"}`
|
|
163050
|
+
});
|
|
163051
|
+
continue;
|
|
163052
|
+
}
|
|
163053
|
+
actionsExercised += 1;
|
|
163054
|
+
const before = findings.length;
|
|
163055
|
+
await invoke(w22, parsed.service, parsed.action, ref.args, ref.origin, ref.origin_label, trigger);
|
|
163056
|
+
for (const f2 of findings.slice(before)) if (ref.owner !== APP_SERVICES_SCREEN && f2.screen === APP_SERVICES_SCREEN) f2.screen = ref.owner;
|
|
163057
|
+
} finally {
|
|
163058
|
+
w22.dispose();
|
|
163059
|
+
}
|
|
163060
|
+
}
|
|
163061
|
+
if (dropped.length) {
|
|
163062
|
+
gaps.push({
|
|
163063
|
+
surface: "app.* args",
|
|
163064
|
+
why: `${dropped.length} param(s) bound to a row, screen state or an unset app path were dispatched without a value (${[...new Set(dropped)].slice(0, 6).join(", ")})`,
|
|
163065
|
+
remedy: "the crawl has no row or screen state at an app.* tap; drive the filled-in flow on a preview (himi push) or a device"
|
|
163066
|
+
});
|
|
163067
|
+
}
|
|
163068
|
+
return { findings: dedupeAppFindings(findings), effects, services: Object.keys(appState), bindingsChecked, actionsExercised, hooks, gaps, state: appState };
|
|
163069
|
+
});
|
|
163070
|
+
}
|
|
163071
|
+
function dedupeAppFindings(findings) {
|
|
163072
|
+
const seen = /* @__PURE__ */ new Set();
|
|
163073
|
+
return findings.filter((f2) => {
|
|
163074
|
+
const key4 = `${f2.invariant}|${f2.screen}|${f2.at ?? ""}|${f2.message}`;
|
|
163075
|
+
if (seen.has(key4)) return false;
|
|
163076
|
+
seen.add(key4);
|
|
163077
|
+
return true;
|
|
163078
|
+
});
|
|
163079
|
+
}
|
|
163080
|
+
var ACTION_KEYS, UNTRACKED_ITEMS, NESTED_ITEMS_SEP, REJECT_ALL_MESSAGE, POLL_STOP_LITERAL, WIX_DATA_QUERY, WIX_DATA_ANY, CAPABILITY_ACTION, detached, CRAWL_PRINCIPAL, CRAWL_CLOCK, MEMBER_IDENTITY_ACTION, BLANK_WHEN_BOUND, CONTROL_ROLES, NAME_KEYS, A11Y_ROWS_PER_LIST, A11Y_LIST_DEPTH, ITEM_PATH_RE, UNOBSERVED_COPY_KEYS, LABEL_NEEDS_HANDLER, REPEATER_TEMPLATE_KEYS, STALE_SNAPSHOT_HINT, REPEATED_CALL_LIMIT, UNBINDABLE_ROW, APP_SERVICES_SCREEN, APP_HOOKS, APP_TICK_LIMIT;
|
|
162704
163081
|
var init_screen_crawl = __esm({
|
|
162705
163082
|
"../../core/dev-server/src/screen-crawl.ts"() {
|
|
162706
163083
|
init_define_HHP_CATALOG();
|
|
@@ -162715,6 +163092,8 @@ var init_screen_crawl = __esm({
|
|
|
162715
163092
|
init_actionParams();
|
|
162716
163093
|
init_implications();
|
|
162717
163094
|
init_bindings();
|
|
163095
|
+
init_app_services_gate();
|
|
163096
|
+
init_app_services_lint();
|
|
162718
163097
|
init_capability_fixtures();
|
|
162719
163098
|
init_base44_crawl_data();
|
|
162720
163099
|
init_webview_bridge_crawl();
|
|
@@ -162740,6 +163119,7 @@ var init_screen_crawl = __esm({
|
|
|
162740
163119
|
UNTRACKED_ITEMS = "__untracked-items__";
|
|
162741
163120
|
NESTED_ITEMS_SEP = "[].";
|
|
162742
163121
|
REJECT_ALL_MESSAGE = "offline crawl: no net fixture \u2014 the Wix transport rejects by design";
|
|
163122
|
+
POLL_STOP_LITERAL = /\bstop\s*:\s*(?:true|!0)/;
|
|
162743
163123
|
WIX_DATA_QUERY = /\/wix-data\/v2\/items\/query$/;
|
|
162744
163124
|
WIX_DATA_ANY = /\/wix-data\//;
|
|
162745
163125
|
CAPABILITY_ACTION = /^capability\.([a-z0-9_]+)\.([A-Za-z0-9_]+)$/;
|
|
@@ -162786,6 +163166,15 @@ var init_screen_crawl = __esm({
|
|
|
162786
163166
|
STALE_SNAPSHOT_HINT = 'if every path already does, look for a stale-snapshot write-back: `return s` (or `{ ...s }`) after an await or from an early-return guard writes back the state as it was BEFORE the await, loading flag included \u2014 to change nothing, return `undefined` instead (not `null` or `{}`); see `himi docs tier-5-add-a-screen`, "Should this result be committed at all?"';
|
|
162787
163167
|
REPEATED_CALL_LIMIT = 50;
|
|
162788
163168
|
UNBINDABLE_ROW = Symbol("unbindable-row");
|
|
163169
|
+
APP_SERVICES_SCREEN = "(app services)";
|
|
163170
|
+
APP_HOOKS = [
|
|
163171
|
+
{ name: "onIdentityChange", label: "onIdentityChange({ signedIn: true })", args: [{ signedIn: true, userId: "crawl-user" }], origin: "ambient" },
|
|
163172
|
+
{ name: "onIdentityChange", label: "onIdentityChange({ signedIn: false })", args: [{ signedIn: false }], origin: "ambient" },
|
|
163173
|
+
{ name: "onForeground", label: "onForeground", args: [], origin: "ambient" },
|
|
163174
|
+
{ name: "onBackground", label: "onBackground", args: [], origin: "ambient" },
|
|
163175
|
+
{ name: "onPushOpened", label: "onPushOpened({ resolved: false })", args: [{ link: "himalaya://crawl", payload: {}, resolved: false }], origin: "gesture" }
|
|
163176
|
+
];
|
|
163177
|
+
APP_TICK_LIMIT = 25;
|
|
162789
163178
|
}
|
|
162790
163179
|
});
|
|
162791
163180
|
|
|
@@ -163344,8 +163733,8 @@ function l10nLintOptions(locale, appDir3) {
|
|
|
163344
163733
|
if (!locale || !enforce || enforce === "off") return void 0;
|
|
163345
163734
|
const tags = (locale.translations ?? []).filter((t2) => t2 !== locale.default);
|
|
163346
163735
|
const catalog4 = /* @__PURE__ */ new Set();
|
|
163347
|
-
for (const
|
|
163348
|
-
const path2 = join38(appDir3, "l10n", `${
|
|
163736
|
+
for (const tag2 of tags) {
|
|
163737
|
+
const path2 = join38(appDir3, "l10n", `${tag2}.json`);
|
|
163349
163738
|
if (!existsSync43(path2)) continue;
|
|
163350
163739
|
try {
|
|
163351
163740
|
const parsed = JSON.parse(readFileSync46(path2, "utf8"));
|
|
@@ -163360,10 +163749,10 @@ function l10nLintOptions(locale, appDir3) {
|
|
|
163360
163749
|
return { enforce, catalog: catalog4, locales: tags };
|
|
163361
163750
|
}
|
|
163362
163751
|
function sourceTranslationKeys2(locale, appDir3) {
|
|
163363
|
-
const
|
|
163364
|
-
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(
|
|
163752
|
+
const tag2 = locale?.default || "en";
|
|
163753
|
+
if (!/^[a-z]{2,3}(-[A-Za-z0-9]{1,8})?$/.test(tag2)) return /* @__PURE__ */ new Set();
|
|
163365
163754
|
const l10nDir = join38(appDir3, "l10n");
|
|
163366
|
-
const path2 = join38(l10nDir, `${
|
|
163755
|
+
const path2 = join38(l10nDir, `${tag2}.json`);
|
|
163367
163756
|
if (!existsSync43(path2)) return /* @__PURE__ */ new Set();
|
|
163368
163757
|
try {
|
|
163369
163758
|
const realDir = realpathSync6(l10nDir);
|
|
@@ -163380,13 +163769,13 @@ async function bakeCatalogs(app2, locale, fetchCatalog, putDoc) {
|
|
|
163380
163769
|
const declared = locale?.translations ?? [];
|
|
163381
163770
|
const source2 = locale?.default ?? "en";
|
|
163382
163771
|
const tags = [.../* @__PURE__ */ new Set([source2, ...declared])];
|
|
163383
|
-
for (const
|
|
163384
|
-
const text32 = await fetchCatalog(
|
|
163772
|
+
for (const tag2 of tags) {
|
|
163773
|
+
const text32 = await fetchCatalog(tag2);
|
|
163385
163774
|
if (!text32) continue;
|
|
163386
163775
|
if (!declared.length && !servesMessages(text32)) continue;
|
|
163387
163776
|
const hash3 = sha2563(text32);
|
|
163388
163777
|
await putDoc(app2, hash3, text32);
|
|
163389
|
-
out2[
|
|
163778
|
+
out2[tag2] = hash3;
|
|
163390
163779
|
}
|
|
163391
163780
|
return out2;
|
|
163392
163781
|
}
|
|
@@ -164810,9 +165199,9 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
164810
165199
|
Object.assign(catalogs, await bakeCatalogs(
|
|
164811
165200
|
app2,
|
|
164812
165201
|
config.locale,
|
|
164813
|
-
async (
|
|
165202
|
+
async (tag2) => {
|
|
164814
165203
|
const res = await devFetch(
|
|
164815
|
-
`${base2}/v1/l10n?app=${encodeURIComponent(app2)}&tag=${encodeURIComponent(
|
|
165204
|
+
`${base2}/v1/l10n?app=${encodeURIComponent(app2)}&tag=${encodeURIComponent(tag2)}`,
|
|
164816
165205
|
{ headers: { "X-Himalaya-App": app2 } }
|
|
164817
165206
|
);
|
|
164818
165207
|
return res.status === 200 ? await res.text() : null;
|
|
@@ -165036,6 +165425,12 @@ async function buildFromLoaded(preloaded, dest, opts = {}) {
|
|
|
165036
165425
|
...collect2?.lint ? { lint, workers } : {},
|
|
165037
165426
|
...renderer ? { renders: renderer.renders } : {},
|
|
165038
165427
|
...collect2?.descriptors ? { descriptors: baked, linkableScreenIds: [...linkable], ...bakedAppConfig ? { appConfig: bakedAppConfig } : {} } : {},
|
|
165428
|
+
...collect2?.descriptors && appBundleName && readBundle(appBundleName) !== void 0 ? { appBundle: {
|
|
165429
|
+
name: appBundleName,
|
|
165430
|
+
js: readBundle(appBundleName),
|
|
165431
|
+
map: bundleMapFor(bundleDirFor(appBundleName), appBundleName).bundleMap,
|
|
165432
|
+
declaredCapabilities: [...appLogicBundleRef(config)?.declaredCapabilities ?? []]
|
|
165433
|
+
} } : {},
|
|
165039
165434
|
...typeof preloaded.meta.homeScreenId === "string" && preloaded.meta.homeScreenId ? { homeScreenId: preloaded.meta.homeScreenId } : {},
|
|
165040
165435
|
...renderTokens !== void 0 ? { tokens: renderTokens } : {},
|
|
165041
165436
|
...preloaded.meta.surfaces ? { surfaceNav: preloaded.meta.surfaces } : {},
|
|
@@ -165125,6 +165520,7 @@ var init_build3 = __esm({
|
|
|
165125
165520
|
init_web_fallback();
|
|
165126
165521
|
init_src6();
|
|
165127
165522
|
init_check();
|
|
165523
|
+
init_app_services_gate();
|
|
165128
165524
|
init_file_store();
|
|
165129
165525
|
init_release_patch();
|
|
165130
165526
|
init_screen_views();
|
|
@@ -167218,6 +167614,7 @@ async function loadAuthoring() {
|
|
|
167218
167614
|
uncoveredFunctions: cov.uncoveredFunctions,
|
|
167219
167615
|
crawlScreenDeep: crawl.crawlScreenDeep,
|
|
167220
167616
|
crawlSignature: crawl.crawlSignature,
|
|
167617
|
+
crawlAppServices: crawl.crawlAppServices,
|
|
167221
167618
|
recordScreenTraffic: crawl.recordScreenTraffic,
|
|
167222
167619
|
mintVisitor: wml.mintVisitor,
|
|
167223
167620
|
mintOneAppVisitorToken: wml.mintOneAppVisitorToken,
|
|
@@ -173411,7 +173808,7 @@ var init_Expression = __esm({
|
|
|
173411
173808
|
throw new Error(`Invalid namespace in pattern: ${part7}`);
|
|
173412
173809
|
}
|
|
173413
173810
|
}
|
|
173414
|
-
let
|
|
173811
|
+
let tag2 = void 0;
|
|
173415
173812
|
let positionMatch = null;
|
|
173416
173813
|
if (tagAndPosition.includes(":")) {
|
|
173417
173814
|
const colonIndex = tagAndPosition.lastIndexOf(":");
|
|
@@ -173419,18 +173816,18 @@ var init_Expression = __esm({
|
|
|
173419
173816
|
const posPart = tagAndPosition.substring(colonIndex + 1).trim();
|
|
173420
173817
|
const isPositionKeyword = ["first", "last", "odd", "even"].includes(posPart) || /^nth\(\d+\)$/.test(posPart);
|
|
173421
173818
|
if (isPositionKeyword) {
|
|
173422
|
-
|
|
173819
|
+
tag2 = tagPart;
|
|
173423
173820
|
positionMatch = posPart;
|
|
173424
173821
|
} else {
|
|
173425
|
-
|
|
173822
|
+
tag2 = tagAndPosition;
|
|
173426
173823
|
}
|
|
173427
173824
|
} else {
|
|
173428
|
-
|
|
173825
|
+
tag2 = tagAndPosition;
|
|
173429
173826
|
}
|
|
173430
|
-
if (!
|
|
173827
|
+
if (!tag2) {
|
|
173431
173828
|
throw new Error(`Invalid segment pattern: ${part7}`);
|
|
173432
173829
|
}
|
|
173433
|
-
segment3.tag =
|
|
173830
|
+
segment3.tag = tag2;
|
|
173434
173831
|
if (namespace) {
|
|
173435
173832
|
segment3.namespace = namespace;
|
|
173436
173833
|
}
|
|
@@ -173532,12 +173929,12 @@ var init_ExpressionSet = __esm({
|
|
|
173532
173929
|
}
|
|
173533
173930
|
const depth = expression.length;
|
|
173534
173931
|
const lastSeg = expression.segments[expression.segments.length - 1];
|
|
173535
|
-
const
|
|
173536
|
-
if (!
|
|
173932
|
+
const tag2 = lastSeg?.tag;
|
|
173933
|
+
if (!tag2 || tag2 === "*") {
|
|
173537
173934
|
if (!this._wildcardByDepth.has(depth)) this._wildcardByDepth.set(depth, []);
|
|
173538
173935
|
this._wildcardByDepth.get(depth).push(expression);
|
|
173539
173936
|
} else {
|
|
173540
|
-
const key4 = `${depth}:${
|
|
173937
|
+
const key4 = `${depth}:${tag2}`;
|
|
173541
173938
|
if (!this._byDepthAndTag.has(key4)) this._byDepthAndTag.set(key4, []);
|
|
173542
173939
|
this._byDepthAndTag.get(key4).push(expression);
|
|
173543
173940
|
}
|
|
@@ -173631,8 +174028,8 @@ var init_ExpressionSet = __esm({
|
|
|
173631
174028
|
*/
|
|
173632
174029
|
findMatch(matcher) {
|
|
173633
174030
|
const depth = matcher.getDepth();
|
|
173634
|
-
const
|
|
173635
|
-
const exactKey = `${depth}:${
|
|
174031
|
+
const tag2 = matcher.getCurrentTag();
|
|
174032
|
+
const exactKey = `${depth}:${tag2}`;
|
|
173636
174033
|
const exactBucket = this._byDepthAndTag.get(exactKey);
|
|
173637
174034
|
if (exactBucket) {
|
|
173638
174035
|
for (let i2 = 0; i2 < exactBucket.length; i2++) {
|
|
@@ -176764,7 +177161,7 @@ function sha12(data) {
|
|
|
176764
177161
|
}
|
|
176765
177162
|
function readAt(buf, i2) {
|
|
176766
177163
|
if (i2 >= buf.length) return void 0;
|
|
176767
|
-
const
|
|
177164
|
+
const tag2 = buf[i2];
|
|
176768
177165
|
let lenOff = i2 + 1;
|
|
176769
177166
|
if (lenOff >= buf.length) return void 0;
|
|
176770
177167
|
const first = buf[lenOff];
|
|
@@ -176782,7 +177179,7 @@ function readAt(buf, i2) {
|
|
|
176782
177179
|
}
|
|
176783
177180
|
const end2 = lenOff + length2;
|
|
176784
177181
|
if (end2 > buf.length) return void 0;
|
|
176785
|
-
return { tag, contents: buf.subarray(lenOff, end2), end: end2 };
|
|
177182
|
+
return { tag: tag2, contents: buf.subarray(lenOff, end2), end: end2 };
|
|
176786
177183
|
}
|
|
176787
177184
|
function readSequence(buf, i2) {
|
|
176788
177185
|
const t2 = readAt(buf, i2);
|
|
@@ -176852,12 +177249,12 @@ var init_pkcs12 = __esm({
|
|
|
176852
177249
|
// ../../packages/serve/src/customer-signing-assets.ts
|
|
176853
177250
|
import { createHash as createHash29 } from "node:crypto";
|
|
176854
177251
|
function readValue(node4) {
|
|
176855
|
-
const [
|
|
176856
|
-
if (!
|
|
176857
|
-
if (
|
|
176858
|
-
if (["string", "key", "date", "data", "integer"].includes(
|
|
176859
|
-
if (
|
|
176860
|
-
if (
|
|
177252
|
+
const [tag2, children2] = Object.entries(node4)[0] ?? [];
|
|
177253
|
+
if (!tag2 || !Array.isArray(children2)) return refuse2("customer_profile_invalid");
|
|
177254
|
+
if (tag2 === "true" || tag2 === "false") return tag2 === "true";
|
|
177255
|
+
if (["string", "key", "date", "data", "integer"].includes(tag2)) return String(children2[0]?.["#text"] ?? "");
|
|
177256
|
+
if (tag2 === "array") return children2.map(readValue);
|
|
177257
|
+
if (tag2 !== "dict" || children2.length % 2) return refuse2("customer_profile_invalid");
|
|
176861
177258
|
const dict = /* @__PURE__ */ Object.create(null);
|
|
176862
177259
|
for (let index = 0; index < children2.length; index += 2) {
|
|
176863
177260
|
if (!("key" in children2[index])) return refuse2("customer_profile_invalid");
|
|
@@ -185986,26 +186383,26 @@ __export(app_locale_edit_exports, {
|
|
|
185986
186383
|
import { existsSync as existsSync60, readFileSync as readFileSync65 } from "node:fs";
|
|
185987
186384
|
import { join as join53 } from "node:path";
|
|
185988
186385
|
import ts13 from "typescript";
|
|
185989
|
-
function setAppLocaleInConfig(source2,
|
|
185990
|
-
const others = [...new Set(translations)].filter((t2) => t2 !==
|
|
185991
|
-
if (
|
|
186386
|
+
function setAppLocaleInConfig(source2, tag2, fileName = "config.ts", translations = []) {
|
|
186387
|
+
const others = [...new Set(translations)].filter((t2) => t2 !== tag2);
|
|
186388
|
+
if (tag2 === SOURCE_LANGUAGE && others.length === 0) return { source: source2, status: "source-language" };
|
|
185992
186389
|
const file2 = ts13.createSourceFile(fileName, source2, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.TS);
|
|
185993
186390
|
const app2 = defineAppLiteral(file2);
|
|
185994
186391
|
if (!app2 || lookup(app2, "locale").kind !== "absent") return { source: source2, status: "kept" };
|
|
185995
186392
|
const lines2 = others.length > 0 ? [
|
|
185996
186393
|
"// The app's languages. The release bakes a catalog for each, and the in-app language picker offers exactly these.",
|
|
185997
|
-
`locale: { default: ${JSON.stringify(
|
|
186394
|
+
`locale: { default: ${JSON.stringify(tag2)}, translations: ${JSON.stringify(others)} },`
|
|
185998
186395
|
] : [
|
|
185999
186396
|
"// The app's language. Pinned, so a device in another language does not change the text or its direction.",
|
|
186000
|
-
`locale: { default: ${JSON.stringify(
|
|
186397
|
+
`locale: { default: ${JSON.stringify(tag2)}, pin: true },`
|
|
186001
186398
|
];
|
|
186002
186399
|
const splice = appendProperties(app2, file2, lines2);
|
|
186003
186400
|
return { source: applySplices(source2, [splice]), status: "written" };
|
|
186004
186401
|
}
|
|
186005
|
-
function applyAppLocale(dir,
|
|
186402
|
+
function applyAppLocale(dir, tag2, translations = []) {
|
|
186006
186403
|
const path2 = join53(dir, "config.ts");
|
|
186007
186404
|
if (!existsSync60(path2)) return "kept";
|
|
186008
|
-
const edit = setAppLocaleInConfig(readFileSync65(path2, "utf8"),
|
|
186405
|
+
const edit = setAppLocaleInConfig(readFileSync65(path2, "utf8"), tag2, "config.ts", translations);
|
|
186009
186406
|
if (edit.status === "written") writeFileAtomic(path2, edit.source);
|
|
186010
186407
|
return edit.status;
|
|
186011
186408
|
}
|
|
@@ -186057,8 +186454,8 @@ function publishedCatalogs(template) {
|
|
|
186057
186454
|
function isUnpublishedCatalog(template, rel2) {
|
|
186058
186455
|
const keep = publishedCatalogs(template);
|
|
186059
186456
|
if (!keep) return false;
|
|
186060
|
-
const
|
|
186061
|
-
return
|
|
186457
|
+
const tag2 = CATALOG_PATH.exec(rel2.split(sep17).join("/"))?.[1];
|
|
186458
|
+
return tag2 !== void 0 && !keep.includes(tag2);
|
|
186062
186459
|
}
|
|
186063
186460
|
function omitUnpublishedCatalogs(template, files) {
|
|
186064
186461
|
return Object.fromEntries(Object.entries(files).filter(([rel2]) => !isUnpublishedCatalog(template, rel2)));
|
|
@@ -186069,14 +186466,14 @@ function omitUnpublishedCatalogEntries(template, entries) {
|
|
|
186069
186466
|
function restoreTemplateCatalogs(appDir3, template, tags, bundledDir = templateSourceDir) {
|
|
186070
186467
|
if (!template || !publishedCatalogs(template)) return [];
|
|
186071
186468
|
const restored = [];
|
|
186072
|
-
for (const
|
|
186073
|
-
if (!/^[a-z]{2,3}$/.test(
|
|
186074
|
-
const target = join54(appDir3, "l10n", `${
|
|
186075
|
-
const source2 = join54(bundledDir(template), "l10n", `${
|
|
186469
|
+
for (const tag2 of new Set(tags)) {
|
|
186470
|
+
if (!/^[a-z]{2,3}$/.test(tag2)) continue;
|
|
186471
|
+
const target = join54(appDir3, "l10n", `${tag2}.json`);
|
|
186472
|
+
const source2 = join54(bundledDir(template), "l10n", `${tag2}.json`);
|
|
186076
186473
|
if (existsSync61(target) || !existsSync61(source2)) continue;
|
|
186077
186474
|
mkdirSync30(dirname37(target), { recursive: true });
|
|
186078
186475
|
copyFileSync2(source2, target);
|
|
186079
|
-
restored.push(
|
|
186476
|
+
restored.push(tag2);
|
|
186080
186477
|
}
|
|
186081
186478
|
return restored;
|
|
186082
186479
|
}
|
|
@@ -188515,13 +188912,13 @@ async function initCommand(ctx) {
|
|
|
188515
188912
|
io2.error(JSON.stringify({ ok: false, code: "invalid_locale", error: `--locale "${localeFlag2}" is not supported`, hint: `choose one of ${SUPPORTED_LOCALES2.join(", ")}` }));
|
|
188516
188913
|
return 2;
|
|
188517
188914
|
}
|
|
188518
|
-
const
|
|
188915
|
+
const appLocale2 = localeFlag2 ?? migrationLocale2(resolve51(parentDir, name));
|
|
188519
188916
|
const appLanguages = migrationLanguages2(resolve51(parentDir, name));
|
|
188520
188917
|
const localeApplied = (dir) => {
|
|
188521
|
-
if (
|
|
188522
|
-
const config = applyAppLocale2(dir,
|
|
188523
|
-
const restored = restoreTemplateCatalogs2(dir, template, [
|
|
188524
|
-
return { locale: { tag:
|
|
188918
|
+
if (appLocale2 === void 0) return {};
|
|
188919
|
+
const config = applyAppLocale2(dir, appLocale2, appLanguages);
|
|
188920
|
+
const restored = restoreTemplateCatalogs2(dir, template, [appLocale2, ...appLanguages]);
|
|
188921
|
+
return { locale: { tag: appLocale2, config, ...restored.length ? { catalogs: restored } : {}, ...config === "written" && appLanguages.length ? { translations: appLanguages } : {}, from: localeFlag2 === void 0 ? "one-app manifest" : "--locale" } };
|
|
188525
188922
|
};
|
|
188526
188923
|
const base44Applied = (dir) => {
|
|
188527
188924
|
if (base44AppId === void 0) return {};
|
|
@@ -191658,15 +192055,15 @@ function requireType() {
|
|
|
191658
192055
|
}
|
|
191659
192056
|
return result;
|
|
191660
192057
|
}
|
|
191661
|
-
function Type22(
|
|
192058
|
+
function Type22(tag2, options2) {
|
|
191662
192059
|
options2 = options2 || {};
|
|
191663
192060
|
Object.keys(options2).forEach(function(name) {
|
|
191664
192061
|
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
|
|
191665
|
-
throw new YAMLException2('Unknown option "' + name + '" is met in definition of "' +
|
|
192062
|
+
throw new YAMLException2('Unknown option "' + name + '" is met in definition of "' + tag2 + '" YAML type.');
|
|
191666
192063
|
}
|
|
191667
192064
|
});
|
|
191668
192065
|
this.options = options2;
|
|
191669
|
-
this.tag =
|
|
192066
|
+
this.tag = tag2;
|
|
191670
192067
|
this.kind = options2["kind"] || null;
|
|
191671
192068
|
this.resolve = options2["resolve"] || function() {
|
|
191672
192069
|
return true;
|
|
@@ -191682,7 +192079,7 @@ function requireType() {
|
|
|
191682
192079
|
this.multi = options2["multi"] || false;
|
|
191683
192080
|
this.styleAliases = compileStyleAliases(options2["styleAliases"] || null);
|
|
191684
192081
|
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
|
|
191685
|
-
throw new YAMLException2('Unknown kind "' + this.kind + '" is specified for "' +
|
|
192082
|
+
throw new YAMLException2('Unknown kind "' + this.kind + '" is specified for "' + tag2 + '" YAML type.');
|
|
191686
192083
|
}
|
|
191687
192084
|
}
|
|
191688
192085
|
type = Type22;
|
|
@@ -193837,16 +194234,16 @@ function requireDumper() {
|
|
|
193837
194234
|
const result = {};
|
|
193838
194235
|
const keys2 = Object.keys(map2);
|
|
193839
194236
|
for (let index = 0, length2 = keys2.length; index < length2; index += 1) {
|
|
193840
|
-
let
|
|
193841
|
-
let style = String(map2[
|
|
193842
|
-
if (
|
|
193843
|
-
|
|
194237
|
+
let tag2 = keys2[index];
|
|
194238
|
+
let style = String(map2[tag2]);
|
|
194239
|
+
if (tag2.slice(0, 2) === "!!") {
|
|
194240
|
+
tag2 = "tag:yaml.org,2002:" + tag2.slice(2);
|
|
193844
194241
|
}
|
|
193845
|
-
const type2 = schema2.compiledTypeMap["fallback"][
|
|
194242
|
+
const type2 = schema2.compiledTypeMap["fallback"][tag2];
|
|
193846
194243
|
if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) {
|
|
193847
194244
|
style = type2.styleAliases[style];
|
|
193848
194245
|
}
|
|
193849
|
-
result[
|
|
194246
|
+
result[tag2] = style;
|
|
193850
194247
|
}
|
|
193851
194248
|
return result;
|
|
193852
194249
|
}
|
|
@@ -197266,19 +197663,19 @@ function renderAndroidServicesXml(plan, indent) {
|
|
|
197266
197663
|
for (const name of plan.removals?.services ?? []) lines2.push(`${indent}<service android:name="${name}" tools:node="remove" />`);
|
|
197267
197664
|
for (const name of plan.removals?.receivers ?? []) lines2.push(`${indent}<receiver android:name="${name}" tools:node="remove" />`);
|
|
197268
197665
|
for (const a3 of plan.activities ?? []) {
|
|
197269
|
-
const
|
|
197666
|
+
const tag2 = a3.targetActivity ? "activity-alias" : "activity";
|
|
197270
197667
|
const attrs = [`android:name="${a3.name}"`];
|
|
197271
197668
|
if (a3.targetActivity) attrs.push(`android:targetActivity="${a3.targetActivity}"`);
|
|
197272
197669
|
attrs.push(`android:exported="${a3.exported}"`);
|
|
197273
197670
|
if (a3.permission) attrs.push(`android:permission="${a3.permission}"`);
|
|
197274
|
-
lines2.push(`${indent}<${
|
|
197671
|
+
lines2.push(`${indent}<${tag2} ${attrs.join(" ")}>`);
|
|
197275
197672
|
for (const f2 of a3.intentFilters) {
|
|
197276
197673
|
lines2.push(`${indent} <intent-filter>`);
|
|
197277
197674
|
for (const act of f2.actions) lines2.push(`${indent} <action android:name="${act}" />`);
|
|
197278
197675
|
for (const c2 of f2.categories ?? []) lines2.push(`${indent} <category android:name="${c2}" />`);
|
|
197279
197676
|
lines2.push(`${indent} </intent-filter>`);
|
|
197280
197677
|
}
|
|
197281
|
-
lines2.push(`${indent}</${
|
|
197678
|
+
lines2.push(`${indent}</${tag2}>`);
|
|
197282
197679
|
}
|
|
197283
197680
|
return lines2;
|
|
197284
197681
|
}
|
|
@@ -201234,16 +201631,16 @@ async function l10nWorkerSnapshot(dir) {
|
|
|
201234
201631
|
}
|
|
201235
201632
|
async function l10nSourceCatalogFile(dir) {
|
|
201236
201633
|
const locale = (await loadContentConfigQuietly(dir))?.locale;
|
|
201237
|
-
const
|
|
201238
|
-
if (!L10N_TAG.test(
|
|
201634
|
+
const tag2 = typeof locale?.default === "string" && locale.default ? locale.default : "en";
|
|
201635
|
+
if (!L10N_TAG.test(tag2)) return null;
|
|
201239
201636
|
const l10nDir = resolve59(dir, "l10n");
|
|
201240
|
-
const file2 = resolve59(l10nDir, `${
|
|
201637
|
+
const file2 = resolve59(l10nDir, `${tag2}.json`);
|
|
201241
201638
|
if (!existsSync87(file2)) return null;
|
|
201242
201639
|
try {
|
|
201243
201640
|
const realDir = realpathSync10(l10nDir);
|
|
201244
201641
|
const realFile = realpathSync10(file2);
|
|
201245
201642
|
if (!realDir.startsWith(realpathSync10(dir) + sep24) || dirname49(realFile) !== realDir) return null;
|
|
201246
|
-
return { tag, text: readFileSync94(realFile, "utf8") };
|
|
201643
|
+
return { tag: tag2, text: readFileSync94(realFile, "utf8") };
|
|
201247
201644
|
} catch {
|
|
201248
201645
|
return null;
|
|
201249
201646
|
}
|
|
@@ -202126,7 +202523,31 @@ async function runCrawl(opts) {
|
|
|
202126
202523
|
message: issue3.message,
|
|
202127
202524
|
hint: "Fix the value in the tokens file; `himi validate` reports the same finding."
|
|
202128
202525
|
}));
|
|
202129
|
-
const
|
|
202526
|
+
const appServiceFindings = [];
|
|
202527
|
+
let appServicesReport;
|
|
202528
|
+
if (opts.appBundle && deps.crawlAppServices) {
|
|
202529
|
+
const ar2 = await deps.crawlAppServices({
|
|
202530
|
+
bundleJs: opts.appBundle.js,
|
|
202531
|
+
bundleMap: opts.appBundle.map ?? null,
|
|
202532
|
+
declaredCapabilities: opts.appBundle.declaredCapabilities ?? [],
|
|
202533
|
+
// Every screen that bakes, not just the crawled representatives: a `$app:` / `app.*` on a collapsed
|
|
202534
|
+
// templated instance is the same defect, but an un-collapsed screen is where it is written.
|
|
202535
|
+
screens: descriptors.filter((d2) => !invalid4.has(d2.screenId) && (!only || only.has(d2.screenId))).map((d2) => ({ screenId: d2.screenId, descriptor: d2.descriptor, bundleJs: d2.bundleJs })),
|
|
202536
|
+
appConfig: opts.appConfig,
|
|
202537
|
+
rules: net2?.rules ?? null,
|
|
202538
|
+
...opts.cmsSeed && Object.keys(opts.cmsSeed).length ? { cmsSeed: opts.cmsSeed } : {},
|
|
202539
|
+
...opts.canned?.count ? { canned: opts.canned.byKey } : {},
|
|
202540
|
+
...localDbSchema?.length ? { localDbSchema } : {},
|
|
202541
|
+
...l10n ? { l10n } : {},
|
|
202542
|
+
...opts.base44Data ? { base44Data: opts.base44Data } : {},
|
|
202543
|
+
...opts.budgetMs ? { budgetMs: opts.budgetMs } : {},
|
|
202544
|
+
skipAction: (actionId, componentId) => matchSuppression(APP_SERVICES_FINDING_SCREEN, actionId, componentId) !== void 0
|
|
202545
|
+
});
|
|
202546
|
+
appServiceFindings.push(...ar2.findings);
|
|
202547
|
+
for (const e2 of ar2.effects) writes.push(...writesFromEffects(APP_SERVICES_FINDING_SCREEN, [e2]));
|
|
202548
|
+
appServicesReport = { services: ar2.services, bindingsChecked: ar2.bindingsChecked, actionsExercised: ar2.actionsExercised, hooks: ar2.hooks, gaps: ar2.gaps };
|
|
202549
|
+
}
|
|
202550
|
+
const all = [...results.flatMap((r3) => r3.findings), ...hostileFindings, ...appServiceFindings, ...deepFindings, ...journeyFindings, ...edgeFindings, ...relationFindings, ...webviewFindings, ...writeFindings, ...tokenFindings].filter((f2) => {
|
|
202130
202551
|
if (f2.invariant === "no-request-issued" && !f2.axis && fetchProven.has(f2.screen)) {
|
|
202131
202552
|
const by = fetchProven.get(f2.screen);
|
|
202132
202553
|
if (!retired.some((x2) => x2.screen === f2.screen)) retired.push({ screen: f2.screen, from: by.from, params: by.params });
|
|
@@ -202170,6 +202591,7 @@ async function runCrawl(opts) {
|
|
|
202170
202591
|
failures,
|
|
202171
202592
|
warnings,
|
|
202172
202593
|
unverifiable: results.flatMap((r3) => r3.unverifiable),
|
|
202594
|
+
...appServicesReport ? { appServices: appServicesReport } : {},
|
|
202173
202595
|
...webviewScreens.length ? { webview: webviewScreens } : {},
|
|
202174
202596
|
...suppressed.length ? { suppressed } : {},
|
|
202175
202597
|
...unknownScreens.length ? { unknownScreens } : {},
|
|
@@ -202374,7 +202796,7 @@ function formatReport(r3) {
|
|
|
202374
202796
|
}
|
|
202375
202797
|
return out2.join("\n");
|
|
202376
202798
|
}
|
|
202377
|
-
var TEST_CONFIG_FILE, mapResult, TOKENS_FINDING_SCREEN, triggerLabel;
|
|
202799
|
+
var TEST_CONFIG_FILE, mapResult, TOKENS_FINDING_SCREEN, APP_SERVICES_FINDING_SCREEN, triggerLabel;
|
|
202378
202800
|
var init_test = __esm({
|
|
202379
202801
|
"src/test.ts"() {
|
|
202380
202802
|
init_define_HHP_CATALOG();
|
|
@@ -202390,6 +202812,7 @@ var init_test = __esm({
|
|
|
202390
202812
|
TEST_CONFIG_FILE = "himi-test.json";
|
|
202391
202813
|
mapResult = (r3) => ({ screen: r3.screen, navEdges: r3.navEdges ?? [], navUnfollowed: r3.navUnfollowed ?? 0, failed: (r3.findings ?? []).some((x2) => x2.severity === "error") });
|
|
202392
202814
|
TOKENS_FINDING_SCREEN = "tokens.json";
|
|
202815
|
+
APP_SERVICES_FINDING_SCREEN = "(app services)";
|
|
202393
202816
|
triggerLabel = (f2) => (f2.trigger === "boot" ? "on appear" : `${f2.trigger.key} ${f2.trigger.tap ?? "(no id)"} \u2192 ${f2.trigger.action}`) + (f2.axis ? ` [${f2.axis}]` : "");
|
|
202394
202817
|
}
|
|
202395
202818
|
});
|
|
@@ -206706,8 +207129,8 @@ var init_invite_flow = __esm({
|
|
|
206706
207129
|
});
|
|
206707
207130
|
|
|
206708
207131
|
// ../../stdlib/flows/screens/src/store-invite-message.ts
|
|
206709
|
-
function storeInviteCopyFor(
|
|
206710
|
-
const language = (
|
|
207132
|
+
function storeInviteCopyFor(tag2) {
|
|
207133
|
+
const language = (tag2 ?? "en").toLowerCase().split("-")[0];
|
|
206711
207134
|
const lines2 = STORE_INVITE_TRANSLATIONS[language];
|
|
206712
207135
|
return { copy: { ...STORE_INVITE_COPY, ...lines2 }, translated: lines2 !== void 0 };
|
|
206713
207136
|
}
|
|
@@ -208696,6 +209119,114 @@ var init_recipes = __esm({
|
|
|
208696
209119
|
}
|
|
208697
209120
|
});
|
|
208698
209121
|
|
|
209122
|
+
// ../../core/dev-server/tier5-bundles-src/_shared/app-locale.ts
|
|
209123
|
+
function appLocale() {
|
|
209124
|
+
return tag;
|
|
209125
|
+
}
|
|
209126
|
+
function isIanaTimeZone(value2) {
|
|
209127
|
+
if (typeof value2 !== "string" || !/^(?:UTC|[A-Za-z]+(?:\/[A-Za-z0-9_+-]+)+)$/.test(value2)) return false;
|
|
209128
|
+
if (typeof Intl === "object" && typeof Intl.DateTimeFormat === "function") {
|
|
209129
|
+
try {
|
|
209130
|
+
new Intl.DateTimeFormat("en-US", { timeZone: value2 });
|
|
209131
|
+
return true;
|
|
209132
|
+
} catch {
|
|
209133
|
+
return false;
|
|
209134
|
+
}
|
|
209135
|
+
}
|
|
209136
|
+
return false;
|
|
209137
|
+
}
|
|
209138
|
+
var tag;
|
|
209139
|
+
var init_app_locale = __esm({
|
|
209140
|
+
"../../core/dev-server/tier5-bundles-src/_shared/app-locale.ts"() {
|
|
209141
|
+
init_define_HHP_CATALOG();
|
|
209142
|
+
tag = "en";
|
|
209143
|
+
}
|
|
209144
|
+
});
|
|
209145
|
+
|
|
209146
|
+
// ../../core/dev-server/tier5-bundles-src/_shared/engine-intl.ts
|
|
209147
|
+
function intlFirstDayOfWeek(locale) {
|
|
209148
|
+
try {
|
|
209149
|
+
if (typeof Intl !== "undefined" && typeof Intl.Locale === "function") {
|
|
209150
|
+
const loc = new Intl.Locale(locale);
|
|
209151
|
+
const firstDay = (typeof loc.getWeekInfo === "function" ? loc.getWeekInfo() : loc.weekInfo)?.firstDay;
|
|
209152
|
+
if (typeof firstDay === "number" && Number.isInteger(firstDay) && firstDay >= 1 && firstDay <= 7) return firstDay;
|
|
209153
|
+
}
|
|
209154
|
+
} catch {
|
|
209155
|
+
}
|
|
209156
|
+
return void 0;
|
|
209157
|
+
}
|
|
209158
|
+
function regionOf(locale) {
|
|
209159
|
+
const parts = locale.split(/[-_]/);
|
|
209160
|
+
const region = parts.slice(1).find((p2) => /^(?:[A-Za-z]{2}|\d{3})$/.test(p2));
|
|
209161
|
+
if (region) return region.toUpperCase();
|
|
209162
|
+
if (parts[0]?.toLowerCase() === "zh" && parts.some((p2) => p2.toLowerCase() === "hant")) return "TW";
|
|
209163
|
+
return LIKELY_REGION[(parts[0] ?? "").toLowerCase()] ?? "";
|
|
209164
|
+
}
|
|
209165
|
+
function firstWeekdayOf(locale = appLocale()) {
|
|
209166
|
+
const firstDay = intlFirstDayOfWeek(locale);
|
|
209167
|
+
if (firstDay !== void 0) return firstDay % 7;
|
|
209168
|
+
const region = regionOf(locale);
|
|
209169
|
+
if (SUNDAY_REGIONS.has(region)) return 0;
|
|
209170
|
+
if (SATURDAY_REGIONS.has(region)) return 6;
|
|
209171
|
+
if (FRIDAY_REGIONS.has(region)) return 5;
|
|
209172
|
+
return MONDAY;
|
|
209173
|
+
}
|
|
209174
|
+
var CURRENCY_SYMBOL, KNOWN_SYMBOLS, MONDAY, SUNDAY_REGIONS, SATURDAY_REGIONS, FRIDAY_REGIONS, LIKELY_REGION;
|
|
209175
|
+
var init_engine_intl = __esm({
|
|
209176
|
+
"../../core/dev-server/tier5-bundles-src/_shared/engine-intl.ts"() {
|
|
209177
|
+
init_define_HHP_CATALOG();
|
|
209178
|
+
init_app_locale();
|
|
209179
|
+
CURRENCY_SYMBOL = {
|
|
209180
|
+
USD: "$",
|
|
209181
|
+
EUR: "\u20AC",
|
|
209182
|
+
GBP: "\xA3",
|
|
209183
|
+
ILS: "\u20AA",
|
|
209184
|
+
JPY: "\xA5",
|
|
209185
|
+
CAD: "CA$",
|
|
209186
|
+
AUD: "A$"
|
|
209187
|
+
};
|
|
209188
|
+
KNOWN_SYMBOLS = new Set(Object.values(CURRENCY_SYMBOL));
|
|
209189
|
+
MONDAY = 1;
|
|
209190
|
+
SUNDAY_REGIONS = new Set("AG AS BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW".split(" "));
|
|
209191
|
+
SATURDAY_REGIONS = new Set("AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY".split(" "));
|
|
209192
|
+
FRIDAY_REGIONS = /* @__PURE__ */ new Set(["MV"]);
|
|
209193
|
+
LIKELY_REGION = {
|
|
209194
|
+
en: "US",
|
|
209195
|
+
he: "IL",
|
|
209196
|
+
iw: "IL",
|
|
209197
|
+
ar: "EG",
|
|
209198
|
+
pt: "BR",
|
|
209199
|
+
ja: "JP",
|
|
209200
|
+
zh: "CN",
|
|
209201
|
+
ko: "KR",
|
|
209202
|
+
hi: "IN",
|
|
209203
|
+
bn: "BD",
|
|
209204
|
+
th: "TH",
|
|
209205
|
+
id: "ID",
|
|
209206
|
+
fa: "IR",
|
|
209207
|
+
ur: "PK",
|
|
209208
|
+
my: "MM",
|
|
209209
|
+
km: "KH",
|
|
209210
|
+
lo: "LA",
|
|
209211
|
+
ne: "NP",
|
|
209212
|
+
am: "ET",
|
|
209213
|
+
mr: "IN",
|
|
209214
|
+
ta: "IN",
|
|
209215
|
+
te: "IN",
|
|
209216
|
+
gu: "IN",
|
|
209217
|
+
kn: "IN",
|
|
209218
|
+
ml: "IN",
|
|
209219
|
+
pa: "IN",
|
|
209220
|
+
fil: "PH",
|
|
209221
|
+
tl: "PH",
|
|
209222
|
+
zu: "ZA",
|
|
209223
|
+
dz: "BT",
|
|
209224
|
+
dv: "MV",
|
|
209225
|
+
ps: "AF"
|
|
209226
|
+
};
|
|
209227
|
+
}
|
|
209228
|
+
});
|
|
209229
|
+
|
|
208699
209230
|
// ../../stdlib/flows/screens/src/podcast.ts
|
|
208700
209231
|
function publicHttpHost(raw) {
|
|
208701
209232
|
if (!raw || raw.length > MAX_URL_LENGTH || CONTROL.test(raw)) return "";
|
|
@@ -208988,6 +209519,9 @@ function plansSection(id, s5, index, ctx, options2) {
|
|
|
208988
209519
|
function textAlign(alignment) {
|
|
208989
209520
|
return alignment === "center" ? "center" : alignment === "right" || alignment === "end" ? "trailing" : "leading";
|
|
208990
209521
|
}
|
|
209522
|
+
function weekFirstDayOf(locale) {
|
|
209523
|
+
return locale ? String(firstWeekdayOf(locale)) : void 0;
|
|
209524
|
+
}
|
|
208991
209525
|
function membersDirectory(id, s5, index, ctx) {
|
|
208992
209526
|
const svc = ctx.uses("members", `members${index}`, { showRole: true, showActivity: true, showBadges: true, showFollow: true, letterBands: true });
|
|
208993
209527
|
return composed2(id, s5, svc, ctx.recipeNodes("members-list", { svc, id, detailScreen: "himi_member" }));
|
|
@@ -209533,7 +210067,8 @@ function generateScreens(input) {
|
|
|
209533
210067
|
return true;
|
|
209534
210068
|
}
|
|
209535
210069
|
return claimed.params[key4] === value2;
|
|
209536
|
-
}
|
|
210070
|
+
},
|
|
210071
|
+
firstWeekday: weekFirstDayOf(input.homeInvite?.locale)
|
|
209537
210072
|
};
|
|
209538
210073
|
const children2 = [];
|
|
209539
210074
|
elements2.forEach((element) => {
|
|
@@ -209976,6 +210511,7 @@ var init_generate = __esm({
|
|
|
209976
210511
|
init_define_HHP_CATALOG();
|
|
209977
210512
|
init_recipes();
|
|
209978
210513
|
init_recipes();
|
|
210514
|
+
init_engine_intl();
|
|
209979
210515
|
init_podcast();
|
|
209980
210516
|
init_tab_ids();
|
|
209981
210517
|
init_events_section();
|
|
@@ -210766,7 +211302,7 @@ var init_generate = __esm({
|
|
|
210766
211302
|
const goal = countOf2(obj19(display.defaultWeeklyGoal).value);
|
|
210767
211303
|
const showTotal = obj19(display.totalNumberOfSessions).show !== false;
|
|
210768
211304
|
const mode = str15(obj19(st2.progressCalculation).calculationMode).trim();
|
|
210769
|
-
ctx.gap(sectionId, type2, `the section counts the member's confirmed bookings that already took place (the rule of My Bookings' "This week"), not the source's tracker service; a weekly goal of ${goal ?? "2"} is the default, a member picks their own from 1 to 14 as in the source but it stays on that member's device (the source keeps it in a private service a member's session cannot call, so it is not shared with the source app or the member's other devices); weeks
|
|
211305
|
+
ctx.gap(sectionId, type2, `the section counts the member's confirmed bookings that already took place (the rule of My Bookings' "This week"), not the source's tracker service; a weekly goal of ${goal ?? "2"} is the default, a member picks their own from 1 to 14 as in the source but it stays on that member's device (the source keeps it in a private service a member's session cannot call, so it is not shared with the source app or the member's other devices); weeks start on the app language's first day, as in the source; the all-time row reads "All-time sessions", not the source's "Sessions attended in total", because a member cannot read check-ins; the "N of G sessions this week" lines and a See All button to My Bookings are additions the source's card does not show`);
|
|
210770
211306
|
ctx.gap(sectionId, type2, mode === "all" ? "the source counts every scheduled session in the week, including those still to come; the section counts only those that took place" : "the source counts only sessions marked attended; a visitor cannot read attendance, so the section counts every confirmed session that took place");
|
|
210771
211307
|
if (obj19(st2.dailyActivity).enabled === true) ctx.gap(sectionId, type2, "the source shows the member's daily activity from Apple Health; the section has no health data");
|
|
210772
211308
|
const svc = ctx.uses("performanceTracker", `performanceTracker${index}`, { ...goal !== void 0 ? { goal } : {}, showTotal });
|
|
@@ -210776,7 +211312,8 @@ var init_generate = __esm({
|
|
|
210776
211312
|
if (!title) card2 = withoutNode(card2, `${id}.title`);
|
|
210777
211313
|
if (!ctx.hasScreen("himi_sign_in")) card2 = withoutNode(card2, `${id}.signin.button`);
|
|
210778
211314
|
children2.push(card2, ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
|
|
210779
|
-
|
|
211315
|
+
const params = ctx.firstWeekday !== void 0 ? { firstWeekday: ctx.firstWeekday } : {};
|
|
211316
|
+
return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params } });
|
|
210780
211317
|
},
|
|
210781
211318
|
// The programs carousel: the shared programs module in carousel layout, configured from the section's own settings. The source
|
|
210782
211319
|
// component always offers See All to the programs screen (no setting turns it off), so it is drawn whenever the scaffold can.
|
|
@@ -221441,8 +221978,8 @@ function length(n2) {
|
|
|
221441
221978
|
bytes2.unshift(v2 & 255);
|
|
221442
221979
|
return Buffer.from([128 | bytes2.length, ...bytes2]);
|
|
221443
221980
|
}
|
|
221444
|
-
function tlv(
|
|
221445
|
-
return Buffer.concat([Buffer.from([
|
|
221981
|
+
function tlv(tag2, value2) {
|
|
221982
|
+
return Buffer.concat([Buffer.from([tag2]), length(value2.length), value2]);
|
|
221446
221983
|
}
|
|
221447
221984
|
function integer(value2) {
|
|
221448
221985
|
let bytes2;
|
|
@@ -221508,10 +222045,10 @@ function readOne(buf, start2, depth) {
|
|
|
221508
222045
|
throw new DerError("ASN.1 nested too deeply");
|
|
221509
222046
|
if (start2 + 2 > buf.length)
|
|
221510
222047
|
throw new DerError("ASN.1 truncated");
|
|
221511
|
-
const
|
|
221512
|
-
if ((
|
|
222048
|
+
const tag2 = buf[start2];
|
|
222049
|
+
if ((tag2 & 31) === 31)
|
|
221513
222050
|
throw new DerError("multi-byte ASN.1 tags aren't expected here");
|
|
221514
|
-
const constructed = (
|
|
222051
|
+
const constructed = (tag2 & 32) !== 0;
|
|
221515
222052
|
let i2 = start2 + 1;
|
|
221516
222053
|
const first = buf[i2++];
|
|
221517
222054
|
let len;
|
|
@@ -221562,9 +222099,9 @@ function readOne(buf, start2, depth) {
|
|
|
221562
222099
|
}
|
|
221563
222100
|
const contentEnd = len === void 0 ? end2 - 2 : end2;
|
|
221564
222101
|
let value2 = buf.subarray(contentStart, contentEnd);
|
|
221565
|
-
if (constructed && (
|
|
222102
|
+
if (constructed && (tag2 & 31) === TAG.OCTET_STRING)
|
|
221566
222103
|
value2 = Buffer.concat(children2.map((c2) => c2.value));
|
|
221567
|
-
return { node: { tag, constructed, raw: buf.subarray(start2, end2), value: value2, children: children2 }, end: end2 };
|
|
222104
|
+
return { node: { tag: tag2, constructed, raw: buf.subarray(start2, end2), value: value2, children: children2 }, end: end2 };
|
|
221568
222105
|
}
|
|
221569
222106
|
function parse4(buf) {
|
|
221570
222107
|
const { node: node4, end: end2 } = readOne(buf, 0, 0);
|
|
@@ -221572,12 +222109,12 @@ function parse4(buf) {
|
|
|
221572
222109
|
throw new DerError("trailing bytes after ASN.1 value");
|
|
221573
222110
|
return node4;
|
|
221574
222111
|
}
|
|
221575
|
-
function child2(node4, index,
|
|
222112
|
+
function child2(node4, index, tag2) {
|
|
221576
222113
|
const c2 = node4.children[index];
|
|
221577
222114
|
if (!c2)
|
|
221578
222115
|
throw new DerError(`ASN.1: no element ${index}`);
|
|
221579
|
-
if (
|
|
221580
|
-
throw new DerError(`ASN.1: element ${index} has tag 0x${c2.tag.toString(16)}, expected 0x${
|
|
222116
|
+
if (tag2 !== void 0 && c2.tag !== tag2)
|
|
222117
|
+
throw new DerError(`ASN.1: element ${index} has tag 0x${c2.tag.toString(16)}, expected 0x${tag2.toString(16)}`);
|
|
221581
222118
|
return c2;
|
|
221582
222119
|
}
|
|
221583
222120
|
function readOid2(node4) {
|
|
@@ -265000,6 +265537,15 @@ function assembleLedger(r3, options2 = {}) {
|
|
|
265000
265537
|
list5.push(u2.node);
|
|
265001
265538
|
unverifiableByScreen.set(u2.screen, list5);
|
|
265002
265539
|
}
|
|
265540
|
+
for (const g2 of r3.appServices?.gaps ?? []) {
|
|
265541
|
+
out2.push({
|
|
265542
|
+
key: `unverifiable|app-services|${g2.surface}`,
|
|
265543
|
+
kind: "unverifiable",
|
|
265544
|
+
screen: null,
|
|
265545
|
+
gap: `app services \u2014 ${g2.surface}: ${g2.why}`,
|
|
265546
|
+
remedy: g2.remedy
|
|
265547
|
+
});
|
|
265548
|
+
}
|
|
265003
265549
|
for (const [screen, nodes3] of unverifiableByScreen) {
|
|
265004
265550
|
out2.push({
|
|
265005
265551
|
key: `unverifiable|${screen}`,
|
|
@@ -266481,7 +267027,7 @@ async function testCommand(ctx) {
|
|
|
266481
267027
|
return results.every((result2) => result2.ok) ? 0 : 1;
|
|
266482
267028
|
}
|
|
266483
267029
|
const app2 = await appId(dir);
|
|
266484
|
-
const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2, crawlScreen: crawlScreen2, crawlScreenJourney: crawlScreenJourney2, crawlScreenHostile: crawlScreenHostile2, crawlScreenRelations: crawlScreenRelations2, crawlScreenCapabilitySuccess: crawlScreenCapabilitySuccess2, crawlScreenWebView: crawlScreenWebView2, findingKey: findingKey2, startWorkerCoverage: startWorkerCoverage2, uncoveredFunctions: uncoveredFunctions2, crawlScreenDeep: crawlScreenDeep2, crawlSignature: crawlSignature2, recordScreenTraffic: recordScreenTraffic2, mintVisitor: mintVisitor2, mintOneAppVisitorToken: mintOneAppVisitorToken2, webWixCall: webWixCall2, freezeTrafficToMocks: freezeTrafficToMocks2, bootAndSnapshotState: bootAndSnapshotState2, isUnservedRequest: isUnservedRequest2, renderDescriptorWeb: renderDescriptorWeb2, renderPngBatch: renderPngBatch2, pngAvailable: pngAvailable2, crawlBlockingPasses } = await loadAuthoring();
|
|
267030
|
+
const { buildContentBundles: buildContentBundles2, buildReleaseFromContent: buildReleaseFromContent2, bundleOutDir: bundleOutDir2, crawlScreen: crawlScreen2, crawlScreenJourney: crawlScreenJourney2, crawlScreenHostile: crawlScreenHostile2, crawlScreenRelations: crawlScreenRelations2, crawlScreenCapabilitySuccess: crawlScreenCapabilitySuccess2, crawlScreenWebView: crawlScreenWebView2, findingKey: findingKey2, startWorkerCoverage: startWorkerCoverage2, uncoveredFunctions: uncoveredFunctions2, crawlScreenDeep: crawlScreenDeep2, crawlSignature: crawlSignature2, crawlAppServices: crawlAppServices2, recordScreenTraffic: recordScreenTraffic2, mintVisitor: mintVisitor2, mintOneAppVisitorToken: mintOneAppVisitorToken2, webWixCall: webWixCall2, freezeTrafficToMocks: freezeTrafficToMocks2, bootAndSnapshotState: bootAndSnapshotState2, isUnservedRequest: isUnservedRequest2, renderDescriptorWeb: renderDescriptorWeb2, renderPngBatch: renderPngBatch2, pngAvailable: pngAvailable2, crawlBlockingPasses } = await loadAuthoring();
|
|
266485
267031
|
const { readTestConfig: readTestConfig2, runCrawl: runCrawl2, formatReport: formatReport2, readCannedResponses: readCannedResponses2, makeRecordingWixCall: makeRecordingWixCall2, runRecordPass: runRecordPass2, runShotsPass: runShotsPass2, defaultNetRules: defaultNetRules2, readNetRules: readNetRules2, scopeDescriptors: scopeDescriptors2, writeRecordedMocks: writeRecordedMocks2 } = await Promise.resolve().then(() => (init_test(), test_exports));
|
|
266486
267032
|
let config;
|
|
266487
267033
|
let capturedConfig;
|
|
@@ -266765,10 +267311,11 @@ async function testCommand(ctx) {
|
|
|
266765
267311
|
...outcome.linkableScreenIds?.length ? { linkableScreenIds: new Set(outcome.linkableScreenIds) } : {},
|
|
266766
267312
|
// The app-level worker's services (the top bar's badge counts): not judged against each screen's own worker.
|
|
266767
267313
|
...appServices.size ? { appServices } : {},
|
|
267314
|
+
...outcome.appBundle ? { appBundle: outcome.appBundle, ...outcome.appConfig ? { appConfig: outcome.appConfig } : {} } : {},
|
|
266768
267315
|
...deep ? { deep } : {},
|
|
266769
267316
|
...offline ? { offline: true } : {},
|
|
266770
267317
|
...offline || flags["no-hostile"] === true ? { hostile: false } : {},
|
|
266771
|
-
deps: { crawlScreen: crawlScreen2, crawlScreenJourney: crawlScreenJourney2, crawlScreenHostile: crawlScreenHostile2, crawlScreenRelations: crawlScreenRelations2, crawlScreenCapabilitySuccess: crawlScreenCapabilitySuccess2, crawlScreenWebView: crawlScreenWebView2, findingKey: findingKey2, startWorkerCoverage: startWorkerCoverage2, uncoveredFunctions: uncoveredFunctions2, crawlScreenDeep: crawlScreenDeep2, crawlSignature: crawlSignature2 }
|
|
267318
|
+
deps: { crawlScreen: crawlScreen2, crawlScreenJourney: crawlScreenJourney2, crawlScreenHostile: crawlScreenHostile2, crawlScreenRelations: crawlScreenRelations2, crawlScreenCapabilitySuccess: crawlScreenCapabilitySuccess2, crawlScreenWebView: crawlScreenWebView2, findingKey: findingKey2, startWorkerCoverage: startWorkerCoverage2, uncoveredFunctions: uncoveredFunctions2, crawlScreenDeep: crawlScreenDeep2, crawlSignature: crawlSignature2, crawlAppServices: crawlAppServices2 }
|
|
266772
267319
|
});
|
|
266773
267320
|
} catch (e2) {
|
|
266774
267321
|
io2.error(JSON.stringify({ error: e2.message }));
|
|
@@ -274135,13 +274682,13 @@ ${releaseId}`;
|
|
|
274135
274682
|
}
|
|
274136
274683
|
if (path2 === "/v1/l10n") {
|
|
274137
274684
|
if (!app2) return json6(400, { error: "missing_app" });
|
|
274138
|
-
const
|
|
274139
|
-
if (!/^[a-z]{2}(-[A-Za-z0-9]+)?$/.test(
|
|
274685
|
+
const tag2 = (url.searchParams.get("tag") ?? "").trim();
|
|
274686
|
+
if (!/^[a-z]{2}(-[A-Za-z0-9]+)?$/.test(tag2)) {
|
|
274140
274687
|
return json6(400, { error: "bad_tag", hint: "pass a BCP-47 primary subtag, e.g. tag=he" });
|
|
274141
274688
|
}
|
|
274142
274689
|
const m2 = pin ? await pinnedManifest(app2, pin) : await manifest2(app2);
|
|
274143
274690
|
if (!m2) return json6(404, pin ? { error: "release_not_found", app: app2, releaseId: pin } : { error: "no_release", app: app2 });
|
|
274144
|
-
const hash3 = m2.catalogs?.[
|
|
274691
|
+
const hash3 = m2.catalogs?.[tag2];
|
|
274145
274692
|
if (!hash3) return new Response(null, { status: 204 });
|
|
274146
274693
|
if (!store.getDoc) return json6(501, { error: "docs_unsupported" });
|
|
274147
274694
|
const bytes2 = await store.getDoc(app2, hash3);
|
|
@@ -274445,7 +274992,7 @@ function embedManifest(assets) {
|
|
|
274445
274992
|
});
|
|
274446
274993
|
}
|
|
274447
274994
|
const html = new TextDecoder().decode(assetBytes(index)).replace(/(=|url\()(["']?)\/preview\//g, "$1$2");
|
|
274448
|
-
const attr3 = (
|
|
274995
|
+
const attr3 = (tag2, name) => tag2.match(new RegExp(`\\s${name}=["']([^"']+)["']`, "i"))?.[1];
|
|
274449
274996
|
const script2 = [...html.matchAll(/<script\b[^>]*>/gi)].map((m2) => m2[0]).filter((t2) => /type=["']module["']/i.test(t2)).map((t2) => attr3(t2, "src")).find(Boolean);
|
|
274450
274997
|
const styles = [...html.matchAll(/<link\b[^>]*>/gi)].map((m2) => m2[0]).filter((t2) => /rel=["']stylesheet["']/i.test(t2)).map((t2) => attr3(t2, "href")).filter((h2) => !!h2);
|
|
274451
274998
|
const css = [...html.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi)].map((m2) => m2[1]).join("\n");
|
|
@@ -274478,13 +275025,13 @@ function stripHandoverParamJs() {
|
|
|
274478
275025
|
}
|
|
274479
275026
|
function parserAssetRefs(html, nonce) {
|
|
274480
275027
|
const js2 = (s5) => JSON.stringify(s5).replace(/</g, "\\u003c");
|
|
274481
|
-
return html.replace(/<script\b[^>]*>\s*<\/script>|<link\b[^>]*>/gi, (
|
|
274482
|
-
const attr3 = /\b(?:src|href)=(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(
|
|
274483
|
-
if (!attr3) return
|
|
275028
|
+
return html.replace(/<script\b[^>]*>\s*<\/script>|<link\b[^>]*>/gi, (tag2) => {
|
|
275029
|
+
const attr3 = /\b(?:src|href)=(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(tag2);
|
|
275030
|
+
if (!attr3) return tag2;
|
|
274484
275031
|
const ref = attr3[1] ?? attr3[2] ?? attr3[3];
|
|
274485
|
-
if (!/^(?:\.\/)?assets\//.test(ref)) return
|
|
275032
|
+
if (!/^(?:\.\/)?assets\//.test(ref)) return tag2;
|
|
274486
275033
|
const start2 = attr3.index + attr3[0].indexOf(ref);
|
|
274487
|
-
return `<script nonce="${nonce}">document.write(${js2(
|
|
275034
|
+
return `<script nonce="${nonce}">document.write(${js2(tag2.slice(0, start2))}+new URL(${js2(ref)},document.baseURI).href+${js2(tag2.slice(start2 + ref.length))})</script>`;
|
|
274488
275035
|
});
|
|
274489
275036
|
}
|
|
274490
275037
|
function indexHtml(asset, pathname, creds, handoverAttempted = false) {
|
|
@@ -274492,7 +275039,7 @@ function indexHtml(asset, pathname, creds, handoverAttempted = false) {
|
|
|
274492
275039
|
const nonce = scriptNonce();
|
|
274493
275040
|
const raw = new TextDecoder().decode(assetBytes(asset));
|
|
274494
275041
|
const head2 = `<script nonce="${nonce}">${PREVIEW_BASE_JS}</script><script nonce="${nonce}">${PREVIEW_ENTRY_RECOVERY_JS}</script>` + (creds ? `<script nonce="${nonce}">${previewCredentialsJs(creds)}</script>` : handoverAttempted ? `<script nonce="${nonce}">${stripHandoverParamJs()}</script>` : "");
|
|
274495
|
-
const html = parserAssetRefs(raw.replace(/(=|url\()(["']?)\/preview\//g, "$1$2"), nonce).replace(/<head(\s[^>]*)?>/i, (
|
|
275042
|
+
const html = parserAssetRefs(raw.replace(/(=|url\()(["']?)\/preview\//g, "$1$2"), nonce).replace(/<head(\s[^>]*)?>/i, (tag2) => `${tag2}${head2}`);
|
|
274496
275043
|
return new Response(html, {
|
|
274497
275044
|
status: 200,
|
|
274498
275045
|
// The shell only changes on an artifact deploy, and everything it loads is
|
|
@@ -274952,55 +275499,55 @@ var init_preview_assets_generated = __esm({
|
|
|
274952
275499
|
init_define_HHP_CATALOG();
|
|
274953
275500
|
init_preview_assets_format();
|
|
274954
275501
|
PREVIEW_ASSET_MANIFEST = [
|
|
274955
|
-
{ key: "assets/DashboardHost-
|
|
274956
|
-
{ key: "assets/DevDrawer-
|
|
274957
|
-
{ key: "assets/IdiomCompare-
|
|
274958
|
-
{ key: "assets/LightboxViewer-
|
|
274959
|
-
{ key: "assets/OfflineReadingBar-
|
|
274960
|
-
{ key: "assets/PhonePreviewControl-
|
|
274961
|
-
{ key: "assets/SchemeCompare-
|
|
274962
|
-
{ key: "assets/TopBarSearchStates-
|
|
274963
|
-
{ key: "assets/WixFrogTelemetrySink-
|
|
275502
|
+
{ key: "assets/DashboardHost-CPcLBW3C.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "06797e0933bc9b18ed2d1576d7bba4e45cf84055553dd900147acac82ed6ee8d" },
|
|
275503
|
+
{ key: "assets/DevDrawer-9hJCD3SX.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "9468af745879ca314a9d6cefd9f54f2fa8a100185c532c7f0dc8b491b162de47" },
|
|
275504
|
+
{ key: "assets/IdiomCompare-Eg5h7I1L.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "936e410dcec4702b39bbaebef2763bce1aba4a7eee0efabdbb2b005d27d6ce8e" },
|
|
275505
|
+
{ key: "assets/LightboxViewer-DKBQbuYE.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15970, sha256: "e9d56e2a268d23e04debc002f8a43d53545227f616d2a4d59f3419836982ea68" },
|
|
275506
|
+
{ key: "assets/OfflineReadingBar-L7I_gkug.js", contentType: "application/javascript; charset=utf-8", offset: 37672, length: 1761, sha256: "c401bd2131cc4a3139fb62f87395c52fef8097d580bd1c6235850ac823597ed3" },
|
|
275507
|
+
{ key: "assets/PhonePreviewControl-Dh1OvDHE.js", contentType: "application/javascript; charset=utf-8", offset: 39433, length: 37851, sha256: "f528b20d62415ab6f9e15a1aa32ad3933726bcb17bc4ae2eb751dfb34b162e34" },
|
|
275508
|
+
{ key: "assets/SchemeCompare-BbdqObZs.js", contentType: "application/javascript; charset=utf-8", offset: 77284, length: 1858, sha256: "d16827668391b23ae912fb8e27db980ac4cbb68902c1dfd2e7a2888574dc752c" },
|
|
275509
|
+
{ key: "assets/TopBarSearchStates-0LxZVjjS.js", contentType: "application/javascript; charset=utf-8", offset: 79142, length: 4068, sha256: "e9f8e4fb5dfca158dc91937840fbc94390613f17fe72bd4dbaae5d2772674d3c" },
|
|
275510
|
+
{ key: "assets/WixFrogTelemetrySink-ClQbTCz6.js", contentType: "application/javascript; charset=utf-8", offset: 83210, length: 3586, sha256: "d7a691c78c5ce2a024c3ba301ea2ac11cfb56621506e8640a3a48937114c68af" },
|
|
274964
275511
|
{ key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 86796, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
|
|
274965
275512
|
{ key: "assets/catalog-B4UJpy5D.js", contentType: "application/javascript; charset=utf-8", offset: 88988, length: 35626, sha256: "90111ffcf2d13eff399836acafd1f2b387859440a29dcd4a0afd8370915992cb" },
|
|
274966
|
-
{ key: "assets/catalogFontFaces-
|
|
275513
|
+
{ key: "assets/catalogFontFaces-AYxoZgxT.js", contentType: "application/javascript; charset=utf-8", offset: 124614, length: 1111, sha256: "f40725c6ff50fb684db30a3eecb579f092a711fa4e785c6700328bdf44b25892" },
|
|
274967
275514
|
{ key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 125725, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
|
|
274968
|
-
{ key: "assets/files-transfer-
|
|
275515
|
+
{ key: "assets/files-transfer-_8KpqoTV.js", contentType: "application/javascript; charset=utf-8", offset: 128292, length: 6446, sha256: "6ccec45d8ed191f1d14e685a7739204d2b272f8dd176d327ce1669009bab5012" },
|
|
274969
275516
|
{ key: "assets/frogActionMap-DzUppDSb.js", contentType: "application/javascript; charset=utf-8", offset: 134738, length: 1172, sha256: "6d59e1dd1c68aaeb2d9927693f6e107c354cc82a611979679c137277f29e14c9" },
|
|
274970
|
-
{ key: "assets/frogApiRules-
|
|
275517
|
+
{ key: "assets/frogApiRules-DEJDODeP.js", contentType: "application/javascript; charset=utf-8", offset: 135910, length: 2207, sha256: "b120ab3763c93ff6cdecaaffcb3c7ebed1b35b9bed4d09ae46975048ac0dc973" },
|
|
274971
275518
|
{ key: "assets/frogScreenMap-LM0nfzDQ.js", contentType: "application/javascript; charset=utf-8", offset: 138117, length: 1096, sha256: "991b931a02a029c9c4514f0ccbdc8a07f4cf2168ea3e23ffe5e244327fa05141" },
|
|
274972
275519
|
{ key: "assets/frogScreenNavArgs-mIYDwUYX.js", contentType: "application/javascript; charset=utf-8", offset: 139213, length: 780, sha256: "6c9e52135322e0a752b57ef6f360d71400cb77414b4f29d480230ae174201230" },
|
|
274973
275520
|
{ key: "assets/glassPreviewBrowser-OVmIRgHt.js", contentType: "application/javascript; charset=utf-8", offset: 139993, length: 6800, sha256: "3671697a4f66a1f5f68610fab57d590630be70be934f59675ef1bda9a96e6fe3" },
|
|
274974
275521
|
{ key: "assets/godot-pack-cache-Cuhrw41M.js", contentType: "application/javascript; charset=utf-8", offset: 146793, length: 1626, sha256: "70b16367b8938ebd6eb8494a2b472171dd2acdcb452c52f35f140eb8ede9c0b7" },
|
|
274975
275522
|
{ key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 148419, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
|
|
274976
|
-
{ key: "assets/index-
|
|
274977
|
-
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
274978
|
-
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
274979
|
-
{ key: "assets/pdf-
|
|
274980
|
-
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
274981
|
-
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset:
|
|
274982
|
-
{ key: "assets/pdfDocument-
|
|
274983
|
-
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
274984
|
-
{ key: "assets/scrollLinkedRuntime-
|
|
274985
|
-
{ key: "assets/webviewBridgeHost-
|
|
274986
|
-
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset:
|
|
274987
|
-
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset:
|
|
274988
|
-
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset:
|
|
274989
|
-
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
274990
|
-
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset:
|
|
274991
|
-
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset:
|
|
274992
|
-
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
274993
|
-
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset:
|
|
274994
|
-
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset:
|
|
274995
|
-
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset:
|
|
274996
|
-
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset:
|
|
274997
|
-
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset:
|
|
274998
|
-
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset:
|
|
274999
|
-
{ key: "index.html", contentType: "text/html; charset=utf-8", offset:
|
|
275000
|
-
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset:
|
|
275001
|
-
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset:
|
|
275002
|
-
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
275003
|
-
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset:
|
|
275523
|
+
{ key: "assets/index-B0PWuFWG.js", contentType: "application/javascript; charset=utf-8", offset: 151123, length: 1746654, sha256: "025d855841fa1c132e8e98b01e4f97c182488a3a8ca104726e8d252e60427e52" },
|
|
275524
|
+
{ key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1897777, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
|
|
275525
|
+
{ key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1905528, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
|
|
275526
|
+
{ key: "assets/pdf-CHk_jb5s.js", contentType: "application/javascript; charset=utf-8", offset: 1916059, length: 488215, sha256: "da958a2a47eef7082c7892c1cc755a58bbeefcb4b617b47fde87f1ce567b3e64" },
|
|
275527
|
+
{ key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2404274, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
|
|
275528
|
+
{ key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2404364, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
|
|
275529
|
+
{ key: "assets/pdfDocument-Bj_vGGei.js", contentType: "application/javascript; charset=utf-8", offset: 3721398, length: 3836, sha256: "fcc0155128be49914d0ced282c1861a2941bf11bea55ecd37a58ebeac4cf129b" },
|
|
275530
|
+
{ key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3725234, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
|
|
275531
|
+
{ key: "assets/scrollLinkedRuntime-DU1kWsV4.js", contentType: "application/javascript; charset=utf-8", offset: 3727500, length: 2278, sha256: "1fa5fa1bddaf90f6e8cf6f6e1767249949ebdf6943244bb220b69c00babf1ea9" },
|
|
275532
|
+
{ key: "assets/webviewBridgeHost-CD8POTu6.js", contentType: "application/javascript; charset=utf-8", offset: 3729778, length: 9889, sha256: "e1a334930e86ed2d0f62fd4937c94af81db7248d51aa4f89d4ca2cb3ce3ba2aa" },
|
|
275533
|
+
{ key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3739667, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
|
|
275534
|
+
{ key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3744277, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
|
|
275535
|
+
{ key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4232861, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
|
|
275536
|
+
{ key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4323785, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
|
|
275537
|
+
{ key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4414769, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
|
|
275538
|
+
{ key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4505749, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
|
|
275539
|
+
{ key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4596621, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
|
|
275540
|
+
{ key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4687601, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
|
|
275541
|
+
{ key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4796237, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
|
|
275542
|
+
{ key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4905321, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
|
|
275543
|
+
{ key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 5014369, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
|
|
275544
|
+
{ key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5122069, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
|
|
275545
|
+
{ key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5210177, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
|
|
275546
|
+
{ key: "index.html", contentType: "text/html; charset=utf-8", offset: 5216995, length: 4924, sha256: "14f57710fe002c1343653175fd51d4c9fc8e51b79d25583c9045034777750829" },
|
|
275547
|
+
{ key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5221919, length: 15585, sha256: "98ec60ef8f9568532f0746d1092b5c76f1c52d718365c586c8bade8f62c7c5eb" },
|
|
275548
|
+
{ key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5237504, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
|
|
275549
|
+
{ key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5238675, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
|
|
275550
|
+
{ key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5262978, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
|
|
275004
275551
|
];
|
|
275005
275552
|
}
|
|
275006
275553
|
});
|
|
@@ -276550,18 +277097,18 @@ function defaultGitOps(cwd = process.cwd()) {
|
|
|
276550
277097
|
return null;
|
|
276551
277098
|
}
|
|
276552
277099
|
},
|
|
276553
|
-
tagExists(
|
|
277100
|
+
tagExists(tag2) {
|
|
276554
277101
|
try {
|
|
276555
|
-
return run4(["tag", "--list",
|
|
277102
|
+
return run4(["tag", "--list", tag2]).length > 0;
|
|
276556
277103
|
} catch {
|
|
276557
277104
|
return false;
|
|
276558
277105
|
}
|
|
276559
277106
|
},
|
|
276560
|
-
createTag(
|
|
276561
|
-
run4(["tag", "-a",
|
|
277107
|
+
createTag(tag2, message5) {
|
|
277108
|
+
run4(["tag", "-a", tag2, "-m", message5]);
|
|
276562
277109
|
},
|
|
276563
|
-
pushTag(
|
|
276564
|
-
run4(["push", "origin",
|
|
277110
|
+
pushTag(tag2) {
|
|
277111
|
+
run4(["push", "origin", tag2]);
|
|
276565
277112
|
}
|
|
276566
277113
|
};
|
|
276567
277114
|
}
|
|
@@ -292690,29 +293237,29 @@ function convertOneApp(options2) {
|
|
|
292690
293237
|
sourceByKey.set(key4, { id: keyOf4(shared ? key4 + "\0" + text32 : text32), text: text32 });
|
|
292691
293238
|
}
|
|
292692
293239
|
const catalogs = {};
|
|
292693
|
-
for (const
|
|
292694
|
-
const raw = files[
|
|
292695
|
-
if (!raw) throw new Error(`convertOneApp: files["${
|
|
293240
|
+
for (const tag2 of [...tags]) {
|
|
293241
|
+
const raw = files[tag2];
|
|
293242
|
+
if (!raw) throw new Error(`convertOneApp: files["${tag2}"] is required for a requested tag`);
|
|
292696
293243
|
const imported = /* @__PURE__ */ new Map();
|
|
292697
293244
|
for (const key4 of Object.keys(raw).sort()) {
|
|
292698
293245
|
const src = sourceByKey.get(key4);
|
|
292699
293246
|
if (!src) {
|
|
292700
|
-
if (
|
|
293247
|
+
if (tag2 !== source2) {
|
|
292701
293248
|
const locales = missing4.get(key4) ?? [];
|
|
292702
|
-
locales.push(
|
|
293249
|
+
locales.push(tag2);
|
|
292703
293250
|
missing4.set(key4, locales);
|
|
292704
293251
|
}
|
|
292705
293252
|
continue;
|
|
292706
293253
|
}
|
|
292707
293254
|
let translation = "";
|
|
292708
|
-
if (
|
|
293255
|
+
if (tag2 !== source2) {
|
|
292709
293256
|
const analysis = analyzePattern(raw[key4]);
|
|
292710
|
-
report9(key4,
|
|
293257
|
+
report9(key4, tag2, analysis);
|
|
292711
293258
|
translation = analysis.text;
|
|
292712
293259
|
}
|
|
292713
293260
|
imported.set(src.id, { source: src.text, key: key4, translation });
|
|
292714
293261
|
}
|
|
292715
|
-
const prior = existing[
|
|
293262
|
+
const prior = existing[tag2]?.messages ?? {};
|
|
292716
293263
|
const merged = {};
|
|
292717
293264
|
const finalKey = /* @__PURE__ */ new Map();
|
|
292718
293265
|
for (const [id, now] of imported) {
|
|
@@ -292729,7 +293276,7 @@ function convertOneApp(options2) {
|
|
|
292729
293276
|
for (const [id, now] of imported) {
|
|
292730
293277
|
const key4 = finalKey.get(id);
|
|
292731
293278
|
if (key4 === void 0 || key4 === now.key || !losesKey(id, key4)) continue;
|
|
292732
|
-
staleKeys.push({ tag, id, key: key4, replacedBy: sourceByKey.get(key4).id });
|
|
293279
|
+
staleKeys.push({ tag: tag2, id, key: key4, replacedBy: sourceByKey.get(key4).id });
|
|
292733
293280
|
finalKey.set(id, now.key);
|
|
292734
293281
|
changed = true;
|
|
292735
293282
|
}
|
|
@@ -292739,7 +293286,7 @@ function convertOneApp(options2) {
|
|
|
292739
293286
|
for (const [id, was] of Object.entries(prior)) {
|
|
292740
293287
|
if (imported.has(id) || typeof was?.key !== "string" || !was.key || !losesKey(id, was.key)) continue;
|
|
292741
293288
|
const home2 = sourceByKey.get(was.key);
|
|
292742
|
-
staleKeys.push({ tag, id, key: was.key, replacedBy: home2.id });
|
|
293289
|
+
staleKeys.push({ tag: tag2, id, key: was.key, replacedBy: home2.id });
|
|
292743
293290
|
const { key: _key, keyOrigin: _origin, ...rest } = was;
|
|
292744
293291
|
stripped.set(id, rest);
|
|
292745
293292
|
const dest = prior[home2.id];
|
|
@@ -292762,7 +293309,7 @@ function convertOneApp(options2) {
|
|
|
292762
293309
|
continue;
|
|
292763
293310
|
}
|
|
292764
293311
|
if (key4 !== now.key && typeof was.key === "string" && now.key !== void 0) {
|
|
292765
|
-
keyConflicts.push({ tag, id, existingKey: was.key, importedKey: now.key });
|
|
293312
|
+
keyConflicts.push({ tag: tag2, id, existingKey: was.key, importedKey: now.key });
|
|
292766
293313
|
}
|
|
292767
293314
|
merged[id] = {
|
|
292768
293315
|
...was,
|
|
@@ -292773,7 +293320,7 @@ function convertOneApp(options2) {
|
|
|
292773
293320
|
};
|
|
292774
293321
|
if (merged[id].key !== was.key) delete merged[id].keyOrigin;
|
|
292775
293322
|
}
|
|
292776
|
-
catalogs[
|
|
293323
|
+
catalogs[tag2] = { $source: tag2, messages: merged };
|
|
292777
293324
|
}
|
|
292778
293325
|
return {
|
|
292779
293326
|
catalogs,
|
|
@@ -292949,8 +293496,8 @@ async function l10nCommand(ctx) {
|
|
|
292949
293496
|
return fail19("locale_file_missing", { error: `no messages_<tag>.json for: ${absent.join(", ")}`, missing: absent, found }, 1);
|
|
292950
293497
|
}
|
|
292951
293498
|
const files = {};
|
|
292952
|
-
for (const
|
|
292953
|
-
const path2 = fileByTag.get(
|
|
293499
|
+
for (const tag2 of [.../* @__PURE__ */ new Set([source2, ...requested])]) {
|
|
293500
|
+
const path2 = fileByTag.get(tag2);
|
|
292954
293501
|
let buf;
|
|
292955
293502
|
try {
|
|
292956
293503
|
buf = readRegularFile(path2);
|
|
@@ -292978,7 +293525,7 @@ async function l10nCommand(ctx) {
|
|
|
292978
293525
|
if (bad4.length > 0) {
|
|
292979
293526
|
return fail19("messages_unreadable", { error: `${relative37(process.cwd(), path2)} has non-string values`, file: path2, keys: bad4.slice(0, 5) }, 1);
|
|
292980
293527
|
}
|
|
292981
|
-
files[
|
|
293528
|
+
files[tag2] = parsed;
|
|
292982
293529
|
}
|
|
292983
293530
|
const { convertOneApp: convertOneApp2, undeclaredLocales: undeclaredLocales2 } = await Promise.resolve().then(() => (init_import_oneapp(), import_oneapp_exports));
|
|
292984
293531
|
const existing = {};
|
|
@@ -292991,15 +293538,15 @@ async function l10nCommand(ctx) {
|
|
|
292991
293538
|
if (unsafe3 !== void 0) {
|
|
292992
293539
|
return fail19("unsafe_path", { error: `${unsafe3} \u2014 the import does not read or write through links`, hint: "replace the link with a real directory/file inside the app, then re-run" }, 1);
|
|
292993
293540
|
}
|
|
292994
|
-
for (const
|
|
292995
|
-
const path2 = join201(appDir3, "l10n", `${
|
|
293541
|
+
for (const tag2 of requested) {
|
|
293542
|
+
const path2 = join201(appDir3, "l10n", `${tag2}.json`);
|
|
292996
293543
|
if (!existsSync160(path2)) continue;
|
|
292997
293544
|
try {
|
|
292998
293545
|
const parsed = JSON.parse(readRegularFile(path2).toString("utf8"));
|
|
292999
293546
|
if (!parsed || typeof parsed !== "object" || !parsed.messages || typeof parsed.messages !== "object") throw new Error("no messages object");
|
|
293000
293547
|
const badRow = Object.entries(parsed.messages).find(([, v2]) => !v2 || typeof v2 !== "object" || Array.isArray(v2));
|
|
293001
293548
|
if (badRow) throw new Error(`message "${badRow[0]}" is not an object`);
|
|
293002
|
-
existing[
|
|
293549
|
+
existing[tag2] = parsed;
|
|
293003
293550
|
} catch (e2) {
|
|
293004
293551
|
return fail19("catalog_unreadable", {
|
|
293005
293552
|
error: `existing catalog ${relative37(process.cwd(), path2)} cannot be parsed \u2014 refusing to overwrite it`,
|
|
@@ -293075,10 +293622,10 @@ async function l10nCommand(ctx) {
|
|
|
293075
293622
|
if (swapped !== void 0 || l10nReal !== join201(realpathSync23(appDir3), "l10n")) {
|
|
293076
293623
|
throw new UnsafePath(swapped ?? `${join201(appDir3, "l10n")} resolves outside the app`);
|
|
293077
293624
|
}
|
|
293078
|
-
for (const
|
|
293079
|
-
const path2 = join201(appDir3, "l10n", `${
|
|
293080
|
-
writeCatalog(path2, JSON.stringify(catalogs[
|
|
293081
|
-
written.push({ tag, path: relative37(process.cwd(), path2), count: Object.keys(catalogs[
|
|
293625
|
+
for (const tag2 of requested) {
|
|
293626
|
+
const path2 = join201(appDir3, "l10n", `${tag2}.json`);
|
|
293627
|
+
writeCatalog(path2, JSON.stringify(catalogs[tag2], null, 2) + "\n");
|
|
293628
|
+
written.push({ tag: tag2, path: relative37(process.cwd(), path2), count: Object.keys(catalogs[tag2].messages).length });
|
|
293082
293629
|
}
|
|
293083
293630
|
} catch (e2) {
|
|
293084
293631
|
if (isUnsafe2(e2)) return fail19("unsafe_path", { error: `${e2.message} \u2014 nothing more was written`, written }, 1);
|
|
@@ -295185,9 +295732,9 @@ function parsePublishedHtml2(html, base2) {
|
|
|
295185
295732
|
const lang = /<html\b[^>]*>/i.exec(html);
|
|
295186
295733
|
if (lang) out2.lang = attr2(lang[0], "lang");
|
|
295187
295734
|
for (const m2 of html.matchAll(/<meta\b[^>]*>/gi)) {
|
|
295188
|
-
const
|
|
295189
|
-
const key4 = (attr2(
|
|
295190
|
-
const content = attr2(
|
|
295735
|
+
const tag2 = m2[0];
|
|
295736
|
+
const key4 = (attr2(tag2, "name") ?? attr2(tag2, "property") ?? "").toLowerCase();
|
|
295737
|
+
const content = attr2(tag2, "content");
|
|
295191
295738
|
if (!content) continue;
|
|
295192
295739
|
if (key4 === "description" || key4 === "og:description") out2.description ??= decodeEntities2(content);
|
|
295193
295740
|
else if (key4 === "og:site_name" || key4 === "application-name" || key4 === "apple-mobile-web-app-title") out2.siteName ??= decodeEntities2(content);
|
|
@@ -295426,8 +295973,8 @@ var init_visitor = __esm({
|
|
|
295426
295973
|
MAX_BUNDLES = 4;
|
|
295427
295974
|
MAX_ROUTES = 80;
|
|
295428
295975
|
APP_ID4 = /^[a-f0-9]{24}$/;
|
|
295429
|
-
attr2 = (
|
|
295430
|
-
const m2 = new RegExp(`\\b${name}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i").exec(
|
|
295976
|
+
attr2 = (tag2, name) => {
|
|
295977
|
+
const m2 = new RegExp(`\\b${name}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i").exec(tag2);
|
|
295431
295978
|
return m2 ? m2[2] ?? m2[3] : void 0;
|
|
295432
295979
|
};
|
|
295433
295980
|
decodeEntities2 = (s5) => s5.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").trim();
|
|
@@ -299793,25 +300340,6 @@ var init_business_address = __esm({
|
|
|
299793
300340
|
}
|
|
299794
300341
|
});
|
|
299795
300342
|
|
|
299796
|
-
// ../../core/dev-server/tier5-bundles-src/_shared/app-locale.ts
|
|
299797
|
-
function isIanaTimeZone(value2) {
|
|
299798
|
-
if (typeof value2 !== "string" || !/^(?:UTC|[A-Za-z]+(?:\/[A-Za-z0-9_+-]+)+)$/.test(value2)) return false;
|
|
299799
|
-
if (typeof Intl === "object" && typeof Intl.DateTimeFormat === "function") {
|
|
299800
|
-
try {
|
|
299801
|
-
new Intl.DateTimeFormat("en-US", { timeZone: value2 });
|
|
299802
|
-
return true;
|
|
299803
|
-
} catch {
|
|
299804
|
-
return false;
|
|
299805
|
-
}
|
|
299806
|
-
}
|
|
299807
|
-
return false;
|
|
299808
|
-
}
|
|
299809
|
-
var init_app_locale = __esm({
|
|
299810
|
-
"../../core/dev-server/tier5-bundles-src/_shared/app-locale.ts"() {
|
|
299811
|
-
init_define_HHP_CATALOG();
|
|
299812
|
-
}
|
|
299813
|
-
});
|
|
299814
|
-
|
|
299815
300343
|
// ../../stdlib/wix-sdk/rich-content/src/display.ts
|
|
299816
300344
|
function trimAscii(s5) {
|
|
299817
300345
|
return s5.replace(/^[\t\n\v\f\r ]+|[\t\n\v\f\r ]+$/g, "");
|
|
@@ -303212,7 +303740,7 @@ validate-payments checks site-bound payment evidence and explicit paid-flow deci
|
|
|
303212
303740
|
} else languageWarnings.push({ code: "source_language_unavailable", message: `${found.reason ?? "The source language is unknown"}. The source was collected in English: pass --locale <tag> if the app is in another language.` });
|
|
303213
303741
|
}
|
|
303214
303742
|
locale ??= "en";
|
|
303215
|
-
const languages = options2.languages.filter((
|
|
303743
|
+
const languages = options2.languages.filter((tag2) => tag2 !== locale);
|
|
303216
303744
|
const { languages: _flagLanguages, ...requested } = manifest2.requested;
|
|
303217
303745
|
manifest2 = { ...manifest2, requested: { ...requested, locale, localeSource, ...languages.length ? { languages } : {} } };
|
|
303218
303746
|
progress("collecting");
|
|
@@ -304919,8 +305447,8 @@ function siteFetchFor(ports) {
|
|
|
304919
305447
|
return ports.siteFetch ?? guardedSiteFetch;
|
|
304920
305448
|
}
|
|
304921
305449
|
function localeFromSiteLanguage(languageCode) {
|
|
304922
|
-
const
|
|
304923
|
-
return
|
|
305450
|
+
const tag2 = coerceSupportedLocale(languageCode);
|
|
305451
|
+
return tag2 && tag2 !== "en" ? { default: tag2, pin: true } : void 0;
|
|
304924
305452
|
}
|
|
304925
305453
|
async function analyzeSite(input, ports) {
|
|
304926
305454
|
const clientId = input.clientId?.trim() || void 0;
|