@wix/himalaya-cli 0.1979.0 → 0.1981.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -3964,6 +3964,7 @@ 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";
3967
3968
  init_define_HHP_CATALOG();
3968
3969
  ICON_VIEW_BOX = 24;
3969
3970
  ICON_STROKE_WIDTH = 2;
@@ -8143,6 +8144,7 @@ function assertExternalUrl(site, value2, where) {
8143
8144
  var WIX_FREE_SITE_HOST_SUFFIXES, SITE_KINDS, SITE_LAYOUTS, SITE_PAGE_TITLES, SITE_TOP_BAR_MAX_ACTIONS, SITE_BUILTIN_NATIVE_SCREENS, SITE_PRIVATE_NATIVE_SCREENS, SITE_SHELL_MAX_TABS, SITE_SCREEN_PREFIX, SITE_PAGE_SCREEN_ID, BASE44_ORIGINS, PAGE_ID, SITE_PAGE_NODE_ID, SITE_SCREEN_FORMS, SITE_NODE_SCREEN_RENDERER, PLACEMENTS, ICONS, SITE_MEMBER_PAGE_SCREENS, SITE_MEMBER_CART_SCREENS, SITE_MEMBER_ONLY_SCREENS;
8144
8145
  var init_site_shell = __esm({
8145
8146
  "../../core/ts/src/site-shell.ts"() {
8147
+ "use strict";
8146
8148
  init_define_HHP_CATALOG();
8147
8149
  init_himi_package();
8148
8150
  init_icon_catalog_generated();
@@ -15763,8 +15765,8 @@ function tsExtResolvePlugin() {
15763
15765
  setup(b3) {
15764
15766
  b3.onResolve({ filter: /\.js$/ }, (args) => {
15765
15767
  if (args.kind === "entry-point" || !args.path.startsWith(".")) return void 0;
15766
- const ts42 = resolve11(args.resolveDir, args.path.replace(/\.js$/, ".ts"));
15767
- return existsSync13(ts42) ? { path: ts42 } : void 0;
15768
+ const ts43 = resolve11(args.resolveDir, args.path.replace(/\.js$/, ".ts"));
15769
+ return existsSync13(ts43) ? { path: ts43 } : void 0;
15768
15770
  });
15769
15771
  }
15770
15772
  };
@@ -16560,7 +16562,7 @@ function bundleFor(file2) {
16560
16562
  const match = /^tier5-src\/([^/]+)\//.exec(file2);
16561
16563
  return match?.[1] ?? "_shared";
16562
16564
  }
16563
- function toIssue(ts42, contentDir2, diagnostic) {
16565
+ function toIssue(ts43, contentDir2, diagnostic) {
16564
16566
  const file2 = diagnostic.file ? relativeFile(contentDir2, diagnostic.file.fileName) : void 0;
16565
16567
  const position = diagnostic.file && diagnostic.start !== void 0 ? diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start) : void 0;
16566
16568
  return {
@@ -16568,13 +16570,13 @@ function toIssue(ts42, contentDir2, diagnostic) {
16568
16570
  ...file2 ? { file: file2 } : {},
16569
16571
  ...position ? { line: position.line + 1, column: position.character + 1 } : {},
16570
16572
  code: `TS${diagnostic.code}`,
16571
- message: ts42.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
16573
+ message: ts43.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
16572
16574
  };
16573
16575
  }
16574
- function confinedHost(ts42, contentDir2, options2) {
16576
+ function confinedHost(ts43, contentDir2, options2) {
16575
16577
  if (!buildConfinementRequired()) return void 0;
16576
- const host = ts42.createCompilerHost(options2);
16577
- const libDir = resolve13(ts42.getDefaultLibFilePath(options2), "..");
16578
+ const host = ts43.createCompilerHost(options2);
16579
+ const libDir = resolve13(ts43.getDefaultLibFilePath(options2), "..");
16578
16580
  const allows = confinementMatcher(contentDir2, [libDir]);
16579
16581
  const getSourceFile = host.getSourceFile.bind(host);
16580
16582
  const readFile26 = host.readFile.bind(host);
@@ -16686,13 +16688,13 @@ function recordingHost(base2, spellings) {
16686
16688
  }
16687
16689
  return { host, answers: () => h2.digest("hex") };
16688
16690
  }
16689
- function programKey(ts42, spellings, rootNames, options2, answers2) {
16691
+ function programKey(ts43, spellings, rootNames, options2, answers2) {
16690
16692
  const opts = JSON.stringify(options2, (_key, value2) => typeof value2 === "string" ? tokenized(spellings, value2) : value2);
16691
- return digest(["tier5-typecheck-v1", ts42.version, opts, ...rootNames.map((name) => tokenized(spellings, name)), answers2()].join("\n"));
16693
+ return digest(["tier5-typecheck-v1", ts43.version, opts, ...rootNames.map((name) => tokenized(spellings, name)), answers2()].join("\n"));
16692
16694
  }
16693
16695
  async function typecheckContentWorkers(contentDir2, options2) {
16694
16696
  if (!existsSync14(resolve13(contentDir2, "tier5-src"))) return [];
16695
- const ts42 = await compiler2();
16697
+ const ts43 = await compiler2();
16696
16698
  const config = {
16697
16699
  compilerOptions: {
16698
16700
  ...CONTENT_WORKER_COMPILER_OPTIONS,
@@ -16702,29 +16704,29 @@ async function typecheckContentWorkers(contentDir2, options2) {
16702
16704
  // The deployed authoring runtime stages TypeScript 6, which requires an explicit
16703
16705
  // acknowledgement for this compatibility `baseUrl`; the repository's TypeScript 5 lane
16704
16706
  // rejects that 6.0 value, so keep it specific to the compiler that needs it.
16705
- ...Number.parseInt(ts42.versionMajorMinor, 10) >= 6 ? { ignoreDeprecations: "6.0" } : {}
16707
+ ...Number.parseInt(ts43.versionMajorMinor, 10) >= 6 ? { ignoreDeprecations: "6.0" } : {}
16706
16708
  },
16707
16709
  include: ["tier5-src/*/index.ts", "tier5-src/_shared/**/*.ts"]
16708
16710
  };
16709
- const parsed = ts42.parseJsonConfigFileContent(config, ts42.sys, contentDir2);
16711
+ const parsed = ts43.parseJsonConfigFileContent(config, ts43.sys, contentDir2);
16710
16712
  if (parsed.fileNames.length === 0) return [];
16711
- const contentIssues = (diagnostics) => diagnostics.filter((diagnostic) => diagnostic.category === ts42.DiagnosticCategory.Error && belongsToContentWorkers(contentDir2, diagnostic)).map((diagnostic) => toIssue(ts42, contentDir2, diagnostic));
16712
- const host = confinedHost(ts42, contentDir2, parsed.options) ?? ts42.createCompilerHost(parsed.options);
16713
+ const contentIssues = (diagnostics) => diagnostics.filter((diagnostic) => diagnostic.category === ts43.DiagnosticCategory.Error && belongsToContentWorkers(contentDir2, diagnostic)).map((diagnostic) => toIssue(ts43, contentDir2, diagnostic));
16714
+ const host = confinedHost(ts43, contentDir2, parsed.options) ?? ts43.createCompilerHost(parsed.options);
16713
16715
  const spellings = contentDirSpellings(contentDir2);
16714
16716
  const recorder = recordingHost(host, spellings);
16715
- const program = ts42.createProgram({
16717
+ const program = ts43.createProgram({
16716
16718
  rootNames: parsed.fileNames,
16717
16719
  options: parsed.options,
16718
16720
  host: recorder.host
16719
16721
  });
16720
- const key4 = programKey(ts42, spellings, parsed.fileNames, parsed.options, recorder.answers);
16722
+ const key4 = programKey(ts43, spellings, parsed.fileNames, parsed.options, recorder.answers);
16721
16723
  let checked = checkedPrograms.get(key4);
16722
16724
  if (checked) {
16723
16725
  checkedPrograms.delete(key4);
16724
16726
  checkedPrograms.set(key4, checked);
16725
16727
  } else {
16726
16728
  checkerRuns++;
16727
- checked = contentIssues(ts42.getPreEmitDiagnostics(program)).map((issue3) => ({ ...issue3, message: tokenized(spellings, issue3.message) }));
16729
+ checked = contentIssues(ts43.getPreEmitDiagnostics(program)).map((issue3) => ({ ...issue3, message: tokenized(spellings, issue3.message) }));
16728
16730
  checkedPrograms.set(key4, checked);
16729
16731
  if (checkedPrograms.size > CHECKED_PROGRAMS_MAX) checkedPrograms.delete(checkedPrograms.keys().next().value);
16730
16732
  }
@@ -31796,22 +31798,22 @@ var init_pixels = __esm({
31796
31798
  });
31797
31799
 
31798
31800
  // ../../core/dev-server/src/declared-navigation-ast.ts
31799
- function fixedNavigations(bundleJs, ts42) {
31800
- literalTargets(bundleJs, ts42);
31801
+ function fixedNavigations(bundleJs, ts43) {
31802
+ literalTargets(bundleJs, ts43);
31801
31803
  return fixedCache.get(bundleJs) ?? /* @__PURE__ */ new Map();
31802
31804
  }
31803
- function literalTargets(bundleJs, ts42) {
31804
- const name = (n2) => n2 && (ts42.isIdentifier(n2) || ts42.isStringLiteral(n2) || ts42.isNoSubstitutionTemplateLiteral(n2)) ? n2.text : void 0;
31805
+ function literalTargets(bundleJs, ts43) {
31806
+ const name = (n2) => n2 && (ts43.isIdentifier(n2) || ts43.isStringLiteral(n2) || ts43.isNoSubstitutionTemplateLiteral(n2)) ? n2.text : void 0;
31805
31807
  const object16 = (n2) => {
31806
- while (n2 && ts42.isParenthesizedExpression(n2)) n2 = n2.expression;
31807
- return n2 && ts42.isObjectLiteralExpression(n2) ? n2 : void 0;
31808
+ while (n2 && ts43.isParenthesizedExpression(n2)) n2 = n2.expression;
31809
+ return n2 && ts43.isObjectLiteralExpression(n2) ? n2 : void 0;
31808
31810
  };
31809
31811
  const property3 = (o2, key4) => o2?.properties.find((p2) => name(p2.name) === key4);
31810
- const initializer = (p2) => p2 && ts42.isPropertyAssignment(p2) ? p2.initializer : void 0;
31811
- const callable = (n2) => !!n2 && (ts42.isArrowFunction(n2) || ts42.isFunctionExpression(n2) || ts42.isFunctionDeclaration(n2) || ts42.isMethodDeclaration(n2));
31812
+ const initializer = (p2) => p2 && ts43.isPropertyAssignment(p2) ? p2.initializer : void 0;
31813
+ const callable = (n2) => !!n2 && (ts43.isArrowFunction(n2) || ts43.isFunctionExpression(n2) || ts43.isFunctionDeclaration(n2) || ts43.isMethodDeclaration(n2));
31812
31814
  const cached3 = cache.get(bundleJs);
31813
31815
  if (cached3) return cached3;
31814
- const file2 = ts42.createSourceFile("himi-bundle.js", bundleJs, ts42.ScriptTarget.Latest, true, ts42.ScriptKind.JS);
31816
+ const file2 = ts43.createSourceFile("himi-bundle.js", bundleJs, ts43.ScriptTarget.Latest, true, ts43.ScriptKind.JS);
31815
31817
  const symbols = /* @__PURE__ */ new Map();
31816
31818
  const note = (key4, fn2) => {
31817
31819
  if (!key4) return;
@@ -31819,16 +31821,16 @@ function literalTargets(bundleJs, ts42) {
31819
31821
  symbols.set(key4, { count: (prior?.count ?? 0) + 1, fn: fn2 });
31820
31822
  };
31821
31823
  const declarations = (node4) => {
31822
- if (ts42.isFunctionDeclaration(node4)) note(name(node4.name), node4);
31823
- else if (ts42.isVariableDeclaration(node4)) note(name(node4.name), callable(node4.initializer) ? node4.initializer : void 0);
31824
- else if (ts42.isParameter(node4)) note(name(node4.name));
31825
- else if (ts42.isBindingElement(node4)) note(name(node4.name));
31826
- ts42.forEachChild(node4, declarations);
31824
+ if (ts43.isFunctionDeclaration(node4)) note(name(node4.name), node4);
31825
+ else if (ts43.isVariableDeclaration(node4)) note(name(node4.name), callable(node4.initializer) ? node4.initializer : void 0);
31826
+ else if (ts43.isParameter(node4)) note(name(node4.name));
31827
+ else if (ts43.isBindingElement(node4)) note(name(node4.name));
31828
+ ts43.forEachChild(node4, declarations);
31827
31829
  };
31828
31830
  declarations(file2);
31829
31831
  const resolve141 = (node4) => {
31830
31832
  if (callable(node4)) return node4;
31831
- if (node4 && ts42.isIdentifier(node4)) {
31833
+ if (node4 && ts43.isIdentifier(node4)) {
31832
31834
  const symbol = symbols.get(node4.text);
31833
31835
  if (symbol?.count === 1) return symbol.fn;
31834
31836
  }
@@ -31842,9 +31844,9 @@ function literalTargets(bundleJs, ts42) {
31842
31844
  const nav = {};
31843
31845
  for (const p2 of o2.properties) {
31844
31846
  const key4 = name(p2.name);
31845
- if (!ts42.isPropertyAssignment(p2) || !key4 || !NAV_KEYS.has(key4)) return void 0;
31846
- if (ts42.isStringLiteralLike(p2.initializer) && p2.initializer.text) nav[key4] = p2.initializer.text;
31847
- else if (key4 === "reset" && p2.initializer.kind === ts42.SyntaxKind.TrueKeyword) nav[key4] = true;
31847
+ if (!ts43.isPropertyAssignment(p2) || !key4 || !NAV_KEYS.has(key4)) return void 0;
31848
+ if (ts43.isStringLiteralLike(p2.initializer) && p2.initializer.text) nav[key4] = p2.initializer.text;
31849
+ else if (key4 === "reset" && p2.initializer.kind === ts43.SyntaxKind.TrueKeyword) nav[key4] = true;
31848
31850
  else return void 0;
31849
31851
  }
31850
31852
  const { screenId, presentation, tab, reset } = nav;
@@ -31855,75 +31857,75 @@ function literalTargets(bundleJs, ts42) {
31855
31857
  };
31856
31858
  const assigned = /* @__PURE__ */ new Set();
31857
31859
  const assignedNames = (n2) => {
31858
- if (ts42.isIdentifier(n2)) assigned.add(n2.text);
31859
- else ts42.forEachChild(n2, assignedNames);
31860
+ if (ts43.isIdentifier(n2)) assigned.add(n2.text);
31861
+ else ts43.forEachChild(n2, assignedNames);
31860
31862
  };
31861
31863
  const assignments = (n2) => {
31862
- if (ts42.isBinaryExpression(n2) && n2.operatorToken.kind >= ts42.SyntaxKind.FirstAssignment && n2.operatorToken.kind <= ts42.SyntaxKind.LastAssignment) assignedNames(n2.left);
31863
- else if ((ts42.isPrefixUnaryExpression(n2) || ts42.isPostfixUnaryExpression(n2)) && (n2.operator === ts42.SyntaxKind.PlusPlusToken || n2.operator === ts42.SyntaxKind.MinusMinusToken)) assignedNames(n2.operand);
31864
- else if ((ts42.isForOfStatement(n2) || ts42.isForInStatement(n2)) && !ts42.isVariableDeclarationList(n2.initializer)) assignedNames(n2.initializer);
31865
- ts42.forEachChild(n2, assignments);
31864
+ if (ts43.isBinaryExpression(n2) && n2.operatorToken.kind >= ts43.SyntaxKind.FirstAssignment && n2.operatorToken.kind <= ts43.SyntaxKind.LastAssignment) assignedNames(n2.left);
31865
+ else if ((ts43.isPrefixUnaryExpression(n2) || ts43.isPostfixUnaryExpression(n2)) && (n2.operator === ts43.SyntaxKind.PlusPlusToken || n2.operator === ts43.SyntaxKind.MinusMinusToken)) assignedNames(n2.operand);
31866
+ else if ((ts43.isForOfStatement(n2) || ts43.isForInStatement(n2)) && !ts43.isVariableDeclarationList(n2.initializer)) assignedNames(n2.initializer);
31867
+ ts43.forEachChild(n2, assignments);
31866
31868
  };
31867
31869
  assignments(file2);
31868
31870
  const plain5 = (fn2) => {
31869
- const modifiers = ts42.canHaveModifiers(fn2) ? ts42.getModifiers(fn2) ?? [] : [];
31870
- return !fn2.asteriskToken && !modifiers.some((m2) => m2.kind === ts42.SyntaxKind.AsyncKeyword);
31871
+ const modifiers = ts43.canHaveModifiers(fn2) ? ts43.getModifiers(fn2) ?? [] : [];
31872
+ return !fn2.asteriskToken && !modifiers.some((m2) => m2.kind === ts43.SyntaxKind.AsyncKeyword);
31871
31873
  };
31872
31874
  const plainParams = (fn2) => {
31873
31875
  const names2 = /* @__PURE__ */ new Set();
31874
31876
  for (const p2 of fn2.parameters) {
31875
- if (!ts42.isIdentifier(p2.name) || p2.initializer || p2.dotDotDotToken) return void 0;
31877
+ if (!ts43.isIdentifier(p2.name) || p2.initializer || p2.dotDotDotToken) return void 0;
31876
31878
  names2.add(p2.name.text);
31877
31879
  }
31878
31880
  return names2;
31879
31881
  };
31880
31882
  const provenSafe = (expr, params) => {
31881
- while (ts42.isParenthesizedExpression(expr)) expr = expr.expression;
31882
- if (ts42.isStringLiteral(expr) || ts42.isNoSubstitutionTemplateLiteral(expr) || ts42.isNumericLiteral(expr)) return true;
31883
- if (expr.kind === ts42.SyntaxKind.TrueKeyword || expr.kind === ts42.SyntaxKind.FalseKeyword || expr.kind === ts42.SyntaxKind.NullKeyword) return true;
31884
- if (ts42.isIdentifier(expr)) return params.has(expr.text);
31885
- if (ts42.isArrayLiteralExpression(expr)) {
31886
- return expr.elements.every((e2) => !ts42.isSpreadElement(e2) && !ts42.isOmittedExpression(e2) && provenSafe(e2, params));
31887
- }
31888
- if (ts42.isObjectLiteralExpression(expr)) return expr.properties.every((p2) => safeProperty(p2, params));
31883
+ while (ts43.isParenthesizedExpression(expr)) expr = expr.expression;
31884
+ if (ts43.isStringLiteral(expr) || ts43.isNoSubstitutionTemplateLiteral(expr) || ts43.isNumericLiteral(expr)) return true;
31885
+ if (expr.kind === ts43.SyntaxKind.TrueKeyword || expr.kind === ts43.SyntaxKind.FalseKeyword || expr.kind === ts43.SyntaxKind.NullKeyword) return true;
31886
+ if (ts43.isIdentifier(expr)) return params.has(expr.text);
31887
+ if (ts43.isArrayLiteralExpression(expr)) {
31888
+ return expr.elements.every((e2) => !ts43.isSpreadElement(e2) && !ts43.isOmittedExpression(e2) && provenSafe(e2, params));
31889
+ }
31890
+ if (ts43.isObjectLiteralExpression(expr)) return expr.properties.every((p2) => safeProperty(p2, params));
31889
31891
  return false;
31890
31892
  };
31891
31893
  const safeProperty = (p2, params) => {
31892
- if (ts42.isSpreadAssignment(p2)) return provenSafe(p2.expression, params);
31893
- if (ts42.isPropertyAssignment(p2)) return !ts42.isComputedPropertyName(p2.name) && provenSafe(p2.initializer, params);
31894
- if (ts42.isShorthandPropertyAssignment(p2)) return params.has(p2.name.text) && !p2.objectAssignmentInitializer;
31894
+ if (ts43.isSpreadAssignment(p2)) return provenSafe(p2.expression, params);
31895
+ if (ts43.isPropertyAssignment(p2)) return !ts43.isComputedPropertyName(p2.name) && provenSafe(p2.initializer, params);
31896
+ if (ts43.isShorthandPropertyAssignment(p2)) return params.has(p2.name.text) && !p2.objectAssignmentInitializer;
31895
31897
  return false;
31896
31898
  };
31897
31899
  const isNavigateHelper = (callee) => {
31898
- if (!ts42.isIdentifier(callee) || !/^navigate[0-9]*$/.test(callee.text) || assigned.has(callee.text)) return false;
31900
+ if (!ts43.isIdentifier(callee) || !/^navigate[0-9]*$/.test(callee.text) || assigned.has(callee.text)) return false;
31899
31901
  const symbol = symbols.get(callee.text);
31900
31902
  const helper = symbol?.count === 1 ? symbol.fn : void 0;
31901
31903
  if (!helper?.body || !plain5(helper) || helper.parameters.length !== 2 || !plainParams(helper)) return false;
31902
31904
  const [stateParam, navParam] = helper.parameters.map((p2) => name(p2.name));
31903
- const body = ts42.isBlock(helper.body) ? helper.body.statements.length === 1 && ts42.isReturnStatement(helper.body.statements[0]) ? helper.body.statements[0].expression : void 0 : helper.body;
31905
+ const body = ts43.isBlock(helper.body) ? helper.body.statements.length === 1 && ts43.isReturnStatement(helper.body.statements[0]) ? helper.body.statements[0].expression : void 0 : helper.body;
31904
31906
  const o2 = object16(body);
31905
31907
  if (!o2 || o2.properties.length !== 2 || !stateParam || !navParam) return false;
31906
31908
  const [spread, nav] = o2.properties;
31907
- return ts42.isSpreadAssignment(spread) && ts42.isIdentifier(spread.expression) && spread.expression.text === stateParam && ts42.isPropertyAssignment(nav) && name(nav.name) === "_nav" && ts42.isIdentifier(nav.initializer) && nav.initializer.text === navParam;
31909
+ return ts43.isSpreadAssignment(spread) && ts43.isIdentifier(spread.expression) && spread.expression.text === stateParam && ts43.isPropertyAssignment(nav) && name(nav.name) === "_nav" && ts43.isIdentifier(nav.initializer) && nav.initializer.text === navParam;
31908
31910
  };
31909
31911
  const fixedOf = (fn2) => {
31910
31912
  const params = plainParams(fn2);
31911
31913
  if (!fn2.body || !plain5(fn2) || !params) return void 0;
31912
31914
  let result = void 0;
31913
- if (ts42.isBlock(fn2.body)) {
31915
+ if (ts43.isBlock(fn2.body)) {
31914
31916
  const [only, ...rest] = fn2.body.statements;
31915
- if (!only || rest.length > 0 || !ts42.isReturnStatement(only)) return void 0;
31917
+ if (!only || rest.length > 0 || !ts43.isReturnStatement(only)) return void 0;
31916
31918
  result = only.expression;
31917
31919
  } else result = fn2.body;
31918
- while (result && ts42.isParenthesizedExpression(result)) result = result.expression;
31920
+ while (result && ts43.isParenthesizedExpression(result)) result = result.expression;
31919
31921
  let navNode;
31920
- if (result && ts42.isObjectLiteralExpression(result)) {
31922
+ if (result && ts43.isObjectLiteralExpression(result)) {
31921
31923
  const props2 = result.properties;
31922
31924
  const lastProp = props2[props2.length - 1];
31923
- if (!lastProp || !ts42.isPropertyAssignment(lastProp) || ts42.isComputedPropertyName(lastProp.name) || name(lastProp.name) !== "_nav") return void 0;
31925
+ if (!lastProp || !ts43.isPropertyAssignment(lastProp) || ts43.isComputedPropertyName(lastProp.name) || name(lastProp.name) !== "_nav") return void 0;
31924
31926
  if (!props2.slice(0, -1).every((p2) => safeProperty(p2, params))) return void 0;
31925
31927
  navNode = lastProp.initializer;
31926
- } else if (result && ts42.isCallExpression(result) && result.arguments.length === 2 && isNavigateHelper(result.expression)) {
31928
+ } else if (result && ts43.isCallExpression(result) && result.arguments.length === 2 && isNavigateHelper(result.expression)) {
31927
31929
  if (!provenSafe(result.arguments[0], params)) return void 0;
31928
31930
  navNode = result.arguments[1];
31929
31931
  }
@@ -31933,58 +31935,58 @@ function literalTargets(bundleJs, ts42) {
31933
31935
  return { nav, line: position.line + 1, column: position.character };
31934
31936
  };
31935
31937
  const visit = (node4) => {
31936
- if (ts42.isCallExpression(node4)) {
31937
- const callee = ts42.isPropertyAccessExpression(node4.expression) ? node4.expression.name.text : name(node4.expression);
31938
+ if (ts43.isCallExpression(node4)) {
31939
+ const callee = ts43.isPropertyAccessExpression(node4.expression) ? node4.expression.name.text : name(node4.expression);
31938
31940
  const service = node4.arguments[0];
31939
- if (callee && /^defineService[0-9]*$/.test(callee) && service && ts42.isStringLiteralLike(service)) {
31941
+ if (callee && /^defineService[0-9]*$/.test(callee) && service && ts43.isStringLiteralLike(service)) {
31940
31942
  const actions = object16(initializer(property3(object16(node4.arguments[1]), "actions")));
31941
31943
  for (const member of actions?.properties ?? []) {
31942
31944
  const action = name(member.name);
31943
- const fn2 = ts42.isMethodDeclaration(member) ? member : resolve141(ts42.isShorthandPropertyAssignment(member) ? member.name : initializer(member));
31945
+ const fn2 = ts43.isMethodDeclaration(member) ? member : resolve141(ts43.isShorthandPropertyAssignment(member) ? member.name : initializer(member));
31944
31946
  if (!action || !fn2?.body) continue;
31945
31947
  const targets = [];
31946
31948
  const target = (expr) => {
31947
31949
  const sid = initializer(property3(object16(expr), "screenId"));
31948
- if (!sid || !ts42.isStringLiteralLike(sid)) return;
31950
+ if (!sid || !ts43.isStringLiteralLike(sid)) return;
31949
31951
  const position = file2.getLineAndCharacterOfPosition(sid.getStart(file2));
31950
31952
  targets.push({ screenId: sid.text, line: position.line + 1, column: position.character });
31951
31953
  };
31952
31954
  const returned = (expr) => {
31953
31955
  if (!expr) return;
31954
- if (ts42.isParenthesizedExpression(expr) || ts42.isAwaitExpression(expr)) {
31956
+ if (ts43.isParenthesizedExpression(expr) || ts43.isAwaitExpression(expr)) {
31955
31957
  returned(expr.expression);
31956
31958
  return;
31957
31959
  }
31958
- if (ts42.isConditionalExpression(expr)) {
31960
+ if (ts43.isConditionalExpression(expr)) {
31959
31961
  returned(expr.whenTrue);
31960
31962
  returned(expr.whenFalse);
31961
31963
  return;
31962
31964
  }
31963
- if (ts42.isObjectLiteralExpression(expr)) {
31965
+ if (ts43.isObjectLiteralExpression(expr)) {
31964
31966
  target(initializer(property3(expr, "_nav")));
31965
31967
  return;
31966
31968
  }
31967
- if (ts42.isCallExpression(expr)) {
31968
- const called = ts42.isPropertyAccessExpression(expr.expression) ? expr.expression.name.text : name(expr.expression);
31969
+ if (ts43.isCallExpression(expr)) {
31970
+ const called = ts43.isPropertyAccessExpression(expr.expression) ? expr.expression.name.text : name(expr.expression);
31969
31971
  if (called && /^navigate[0-9]*$/.test(called)) target(expr.arguments[1]);
31970
31972
  }
31971
31973
  };
31972
- if (ts42.isBlock(fn2.body)) {
31974
+ if (ts43.isBlock(fn2.body)) {
31973
31975
  const returns = (part7) => {
31974
31976
  if (callable(part7)) return;
31975
- if (ts42.isReturnStatement(part7)) returned(part7.expression);
31976
- else ts42.forEachChild(part7, returns);
31977
+ if (ts43.isReturnStatement(part7)) returned(part7.expression);
31978
+ else ts43.forEachChild(part7, returns);
31977
31979
  };
31978
31980
  returns(fn2.body);
31979
31981
  } else returned(fn2.body);
31980
31982
  results.set("tier5." + service.text + "." + action, targets);
31981
- const ref = ts42.isShorthandPropertyAssignment(member) ? member.name : initializer(member);
31982
- const always = ref && ts42.isIdentifier(ref) && assigned.has(ref.text) ? void 0 : fixedOf(fn2);
31983
+ const ref = ts43.isShorthandPropertyAssignment(member) ? member.name : initializer(member);
31984
+ const always = ref && ts43.isIdentifier(ref) && assigned.has(ref.text) ? void 0 : fixedOf(fn2);
31983
31985
  if (always) fixed.set("tier5." + service.text + "." + action, always);
31984
31986
  }
31985
31987
  }
31986
31988
  }
31987
- ts42.forEachChild(node4, visit);
31989
+ ts43.forEachChild(node4, visit);
31988
31990
  };
31989
31991
  visit(file2);
31990
31992
  cache.set(bundleJs, results);
@@ -44699,6 +44701,7 @@ function resolveIdiom(tokens2, ctx = {}) {
44699
44701
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
44700
44702
  var init_idiom = __esm({
44701
44703
  "../../core/ts/src/idiom.ts"() {
44704
+ "use strict";
44702
44705
  init_define_HHP_CATALOG();
44703
44706
  IDIOM_CONTEXTS = {
44704
44707
  ios: { native: ["ios"] },
@@ -150772,7 +150775,7 @@ var init_renderNode = __esm({
150772
150775
  const on4 = selected.includes(c2.id);
150773
150776
  const chipStyle = { display: "flex", flex: "none", whiteSpace: "nowrap", gap: 6, alignItems: "center", fontFamily: bodyFont(ctx), fontWeight: 500, fontSize: pxToRem(13), border: `1px solid ${on4 ? "transparent" : C2("border", "#ddd")}`, background: on4 ? C2("accentPrimary", "#116DFF") : "transparent", color: on4 ? C2("textOnAccent", "#fff") : C2("textSecondary", "#666"), padding: "6px 12px", borderRadius: 999 };
150774
150777
  const inner = /* @__PURE__ */ jsxs12(Fragment5, { children: [
150775
- isolateRun(asText2(c2.label), ctx),
150778
+ isolateRun(asFinalTextL10n(c2.label, ctx), ctx),
150776
150779
  c2.count != null && /* @__PURE__ */ jsxs12(Fragment5, { children: [
150777
150780
  " ",
150778
150781
  /* @__PURE__ */ jsx16("span", { style: { ...on4 ? {} : { opacity: 0.7 }, fontSize: pxToRem(11) }, children: c2.count })
@@ -159166,23 +159169,35 @@ function pinsSingleLanguage(locale) {
159166
159169
  return !locale.translations?.some((target) => target !== tag2);
159167
159170
  }
159168
159171
  function pinnedLanguageSwap(locale, appDir3) {
159169
- if (!pinsSingleLanguage(locale)) return void 0;
159170
- if (!isSupportedLocale(locale.default)) return void 0;
159171
- const directory = join38(appDir3, "l10n");
159172
- const path2 = join38(directory, `${locale.default}.json`);
159173
- const outside = relative10(directory, path2);
159174
- if (outside.startsWith("..") || isAbsolute4(outside)) return void 0;
159175
- const map2 = existsSync42(path2) ? sourceMap(parseCatalog(readFileSync46(path2, "utf8"))) : /* @__PURE__ */ new Map();
159172
+ const pinned = pinnedCatalog(locale, appDir3);
159173
+ if (!pinned) return void 0;
159174
+ const { tag: tag2, map: map2 } = pinned;
159176
159175
  return (descriptor, workerSource) => {
159177
159176
  translateWith(descriptor, map2);
159178
159177
  const onAppear = descriptor?.payload?.modifiers?.onAppear;
159179
159178
  if (typeof onAppear?.actionId !== "string" || !onAppear.actionId.startsWith("tier5.")) return;
159180
159179
  const params = onAppear.params ??= {};
159181
- params.locale ??= locale.default;
159180
+ params.locale ??= tag2;
159182
159181
  const textCopy = workerSource === void 0 || params.textCopy !== void 0 ? void 0 : textCopyFor(workerSource, map2);
159183
159182
  if (textCopy) params.textCopy = textCopy;
159184
159183
  };
159185
159184
  }
159185
+ function pinnedWorkerParams(locale, appDir3, workerSource) {
159186
+ const pinned = pinnedCatalog(locale, appDir3);
159187
+ if (!pinned) return void 0;
159188
+ const textCopy = textCopyFor(workerSource, pinned.map);
159189
+ return { locale: pinned.tag, ...textCopy ? { textCopy } : {} };
159190
+ }
159191
+ function pinnedCatalog(locale, appDir3) {
159192
+ if (!pinsSingleLanguage(locale)) return void 0;
159193
+ if (!isSupportedLocale(locale.default)) return void 0;
159194
+ const directory = join38(appDir3, "l10n");
159195
+ const path2 = join38(directory, `${locale.default}.json`);
159196
+ const outside = relative10(directory, path2);
159197
+ if (outside.startsWith("..") || isAbsolute4(outside)) return void 0;
159198
+ const map2 = existsSync42(path2) ? sourceMap(parseCatalog(readFileSync46(path2, "utf8"))) : /* @__PURE__ */ new Map();
159199
+ return { tag: locale.default, map: map2 };
159200
+ }
159186
159201
  function textCopyFor(workerSource, map2) {
159187
159202
  const found = {};
159188
159203
  for (const [source2, translation] of [...map2].sort(([a3], [b3]) => a3 < b3 ? -1 : a3 > b3 ? 1 : 0)) {
@@ -167170,9 +167185,9 @@ function stateOf(view) {
167170
167185
  build: b3 && view.live ? { ok: b3.ok, ms: b3.ms, screens: b3.screens, at: b3.at, run: view.live.runId } : null
167171
167186
  };
167172
167187
  }
167173
- function frameFor(state, prev, ts42, v2, key4) {
167174
- if (key4 || !prev) return { ts: ts42, v: v2, key: true, ...state };
167175
- const f2 = { ts: ts42, v: v2 };
167188
+ function frameFor(state, prev, ts43, v2, key4) {
167189
+ if (key4 || !prev) return { ts: ts43, v: v2, key: true, ...state };
167190
+ const f2 = { ts: ts43, v: v2 };
167176
167191
  if (!same2(state.step, prev.step)) f2.step = state.step;
167177
167192
  if (!same2(state.now, prev.now)) f2.now = state.now;
167178
167193
  const screens = {};
@@ -188373,15 +188388,15 @@ function loadMemory2(dir) {
188373
188388
  for (const t2 of m2.timeline) {
188374
188389
  if (!isObj3(t2)) continue;
188375
188390
  const file2 = historyName(t2.sha, t2.ext);
188376
- const ts42 = str7(t2.ts);
188391
+ const ts43 = str7(t2.ts);
188377
188392
  const id = str7(t2.id);
188378
- if (file2 && ts42 && id) timeline.push({ ts: ts42, id, file: file2 });
188393
+ if (file2 && ts43 && id) timeline.push({ ts: ts43, id, file: file2 });
188379
188394
  }
188380
188395
  return { createdAt: str7(m2.createdAt), shots, timeline };
188381
188396
  }
188382
- function captionAt(entries, ts42) {
188397
+ function captionAt(entries, ts43) {
188383
188398
  let best = null;
188384
- for (const e2 of entries) if (e2.ts <= ts42) best = e2;
188399
+ for (const e2 of entries) if (e2.ts <= ts43) best = e2;
188385
188400
  return best ? best.message : null;
188386
188401
  }
188387
188402
  function thin(items, max) {
@@ -188501,13 +188516,13 @@ function duration(ms2) {
188501
188516
  const m2 = Math.round(ms2 / 6e4);
188502
188517
  return m2 < 60 ? `${m2} min` : `${Math.floor(m2 / 60)} h ${m2 % 60} min`;
188503
188518
  }
188504
- function utcDay(ts42) {
188505
- const d2 = new Date(ts42);
188519
+ function utcDay(ts43) {
188520
+ const d2 = new Date(ts43);
188506
188521
  return Number.isNaN(d2.getTime()) ? "" : `${d2.toUTCString().slice(0, 16)} (UTC)`;
188507
188522
  }
188508
- function sinceStart(start2, ts42) {
188523
+ function sinceStart(start2, ts43) {
188509
188524
  if (!start2) return "";
188510
- const s5 = Math.max(0, Math.round((Date.parse(ts42) - Date.parse(start2)) / 1e3));
188525
+ const s5 = Math.max(0, Math.round((Date.parse(ts43) - Date.parse(start2)) / 1e3));
188511
188526
  const h2 = Math.floor(s5 / 3600);
188512
188527
  const m2 = Math.floor(s5 % 3600 / 60);
188513
188528
  const sec = String(s5 % 60).padStart(2, "0");
@@ -188517,7 +188532,7 @@ function renderReel(plan, images) {
188517
188532
  const img = (f2, alt, cls = "") => f2 && images.has(f2) ? `<img class="${cls}" src="${images.get(f2)}" alt="${escapeHtml(alt)}">` : "";
188518
188533
  const count3 = (n2) => escapeHtml(String(Number.isSafeInteger(n2) && n2 >= 0 ? n2 : 0));
188519
188534
  const accent = ACCENT2.test(plan.accent) ? plan.accent : DEFAULT_ACCENT;
188520
- const clock = (ts42) => sinceStart(plan.startedAt, ts42);
188535
+ const clock = (ts43) => sinceStart(plan.startedAt, ts43);
188521
188536
  const frames = plan.frames.filter((f2) => images.has(f2.file));
188522
188537
  const flip = frames.length ? `<section class="flip"><div class="phone">${frames.map((f2, i2) => `<img class="fr${i2 === 0 ? " on" : ""}" src="${images.get(f2.file)}" alt="${escapeHtml(plan.focusId ?? "")} at ${clock(f2.ts)}">`).join("")}</div>
188523
188538
  <div class="flipcap"><div class="t" id="ft">${frames[0] ? clock(frames[0].ts) : ""}</div><div id="fc">${escapeHtml(frames[0]?.caption ?? "")}</div><div class="bar"><div id="fb"></div></div></div></section>` : `<p class="muted">No screen versions were recorded \u2014 open the build board with <code>himi studio</code> before building to capture them.</p>`;
@@ -189605,13 +189620,13 @@ async function initCommand(ctx) {
189605
189620
  io2.error(JSON.stringify({ ok: false, code: "invalid_locale", error: `--locale "${localeFlag2}" is not supported`, hint: `choose one of ${SUPPORTED_LOCALES2.join(", ")}` }));
189606
189621
  return 2;
189607
189622
  }
189608
- const appLocale2 = localeFlag2 ?? migrationLocale2(resolve51(parentDir, name));
189623
+ const appLocale3 = localeFlag2 ?? migrationLocale2(resolve51(parentDir, name));
189609
189624
  const appLanguages = migrationLanguages2(resolve51(parentDir, name));
189610
189625
  const localeApplied = (dir) => {
189611
- if (appLocale2 === void 0) return {};
189612
- const config = applyAppLocale2(dir, appLocale2, appLanguages);
189613
- const restored = restoreTemplateCatalogs2(dir, template, [appLocale2, ...appLanguages]);
189614
- return { locale: { tag: appLocale2, config, ...restored.length ? { catalogs: restored } : {}, ...config === "written" && appLanguages.length ? { translations: appLanguages } : {}, from: localeFlag2 === void 0 ? "one-app manifest" : "--locale" } };
189626
+ if (appLocale3 === void 0) return {};
189627
+ const config = applyAppLocale2(dir, appLocale3, appLanguages);
189628
+ const restored = restoreTemplateCatalogs2(dir, template, [appLocale3, ...appLanguages]);
189629
+ return { locale: { tag: appLocale3, config, ...restored.length ? { catalogs: restored } : {}, ...config === "written" && appLanguages.length ? { translations: appLanguages } : {}, from: localeFlag2 === void 0 ? "one-app manifest" : "--locale" } };
189615
189630
  };
189616
189631
  const base44Applied = (dir) => {
189617
189632
  if (base44AppId === void 0) return {};
@@ -211995,6 +212010,7 @@ function generateScreens(input) {
211995
212010
  page: { label: label4, screenId, layoutItemId },
211996
212011
  taken: taken2,
211997
212012
  hasScreen: (id) => !input.takenScreenIds || input.takenScreenIds.has(id),
212013
+ workerCopy: (module) => input.workerCopy?.(module) ?? {},
211998
212014
  action: (action) => controlAction(input, screenId, action, () => {
211999
212015
  if (input.hasModule && !input.hasModule(MODULES.memberAction.file)) return false;
212000
212016
  const svc = memberActionService(screenId);
@@ -212496,7 +212512,7 @@ function addNavigation(out2, plan, taken2, pageIconOf) {
212496
212512
  out2.routes.push({ layoutItemId: "(more)", label: "More", screenId, kind: "generated" });
212497
212513
  out2.tabs.push({ layoutItemId: "(more)", label: "More", screenId });
212498
212514
  }
212499
- var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj19, arr3, str15, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
212515
+ var TEMPLATE_HOME_SCREEN, TEMPLATE_SCREEN_PARAM_KEYS, SYSTEM_ALL_PRODUCTS_ID, collectionParams, faqHiddenCategories, TEMPLATE_PARAMS, countOf2, SCREEN_ADAPTATIONS, FALLBACK_TARGETS, BOTTOM_TABS_BEFORE_MORE, TEMPLATE_VERTICALS, PAGE_TYPE_ICONS, HOME_TAB_ICON, TEMPLATE_FALLBACKS, MODULES, obj19, arr3, str15, node3, text10, vstack, hstack, inset, youtubeIdOf, DIRECT_VIDEO_FILE, UNREAD_IMAGE_RATIO, REPEATER_COLUMNS_MAX, BUSINESS_CHAT_SCREEN, SUBSCRIPTIONS_MAX, selectedPlanIds, MEMBERS_RAIL, PROGRAMS_DEFAULT_LIMIT, PROGRAMS_INLINE_MAX, PODCAST_INLINE, GALLERIES_INLINE_MAX, GALLERIES_LIST_INLINE, BLOG_HERO_MAX, BLOG_SEARCH_POSTS, EVENT_SCHEDULE_INLINE, SHOP_ALL, SERVICES_INLINE, UPCOMING_INLINE, CALENDAR_INLINE, UPCOMING_SESSIONS_INLINE, UPCOMING_INTERVALS, HISTORY_INLINE, PRODUCTS_INLINE, GROUP_FEED_POSTS_MAX, POST_ACTION_LABELS, postActionsGap, NEWSFEED_GROUPS_MAX, LOYALTY_TIERS_INLINE, VIDEOS_INLINE_DEFAULT, VIDEOS_INLINE_MAX, WISHLIST_INLINE, EVENTS_RAIL_INLINE, SOCIAL_NETWORKS, HANDLERS, memberActionService, MERGED_PAGES_BUNDLE, hasCtaButton, chevron;
212500
212516
  var init_generate = __esm({
212501
212517
  "src/one-app/generate.ts"() {
212502
212518
  init_define_HHP_CATALOG();
@@ -212526,6 +212542,7 @@ var init_generate = __esm({
212526
212542
  const id = str15(obj19(st2.collection).id).trim();
212527
212543
  return id && id !== SYSTEM_ALL_PRODUCTS_ID ? { categoryId: id } : {};
212528
212544
  };
212545
+ faqHiddenCategories = (st2) => Object.entries(obj19(st2.categories)).filter(([id, shown3]) => id.trim() && shown3 === false).map(([id]) => id.trim());
212529
212546
  TEMPLATE_PARAMS = {
212530
212547
  groups_feed_section: (_section, st2) => ({
212531
212548
  ...str15(st2.sectionTitle).trim() ? { title: str15(st2.sectionTitle).trim() } : {},
@@ -212560,10 +212577,12 @@ var init_generate = __esm({
212560
212577
  return chosen ? [`the source shows the feed of only its ${chosen} chosen group(s); the template screen takes no group selection and shows every group`] : [];
212561
212578
  },
212562
212579
  faq_list_section: (st2) => {
212563
- const limit = countOf2(obj19(st2.questions).NumberOfFAQs);
212580
+ const limit = countOf2(obj19(st2.questions).NumberOfFAQs), hidden = faqHiddenCategories(st2).length;
212564
212581
  return [
212565
212582
  ...limit !== void 0 ? [`the source shows ${limit} question(s); himi_faq lists every question`] : [],
212566
- ...Object.keys(obj19(st2.categories)).length ? ["the source limits its questions to chosen categories; himi_faq takes no category selection and lists every category"] : []
212583
+ ...hidden ? [`the source hides ${hidden} categor${hidden === 1 ? "y" : "ies"}; himi_faq takes no category selection and lists every category`] : [],
212584
+ // The chips reach himi_faq only from an inline section's View All; opened as a page it has the screen's own layout.
212585
+ obj19(st2.questions).showCategories !== false ? "the source shows its categories as filter chips; himi_faq opened as a page lists every category under its heading" : "the source shows one list with no categories; himi_faq opened as a page lists every category under its heading"
212567
212586
  ];
212568
212587
  },
212569
212588
  newBlog_postlist_carousel_full_section: (st2) => blogCarouselScreenGaps(st2),
@@ -213206,25 +213225,32 @@ var init_generate = __esm({
213206
213225
  children2.push(ctx.recipe("blog-categories", { svc, id, blogScreen: "himi_blog" }), ...ctx.optionalRecipe("section-error", { svc, id, action: "load" }));
213207
213226
  return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
213208
213227
  },
213209
- // The FAQ: questions grouped by category as disclosure rows, with the source's own settings. What the recipe has no control for is reported.
213228
+ // The FAQ as the source's section shows it: its category chips (All first unless turned off) over the chosen chip's questions as
213229
+ // disclosure rows, its categories turned off left out, its limit, and View All opening the FAQ screen with the same filters on the
213230
+ // chosen chip. The settings and their defaults are the One App FAQ module's own (`settings-reader.ts` of wix-one-app-faq-app).
213210
213231
  faq_list_section: (id, s5, st2, index, ctx, sectionId) => {
213211
213232
  const q4 = obj19(st2.questions);
213212
213233
  const limit = countOf2(q4.NumberOfFAQs);
213234
+ const showCategories = q4.showCategories !== false;
213235
+ const hiddenCategoryIds = faqHiddenCategories(st2);
213236
+ const viewAll = limit !== void 0 && ctx.hasScreen("himi_faq");
213213
213237
  const options2 = {
213214
213238
  ...limit !== void 0 ? { limit } : {},
213215
- showCategories: q4.showCategories !== false,
213216
- firstOpen: q4.showFirsAnswerOpen === true,
213217
- oneAtATime: q4.showOneAnswetAtATime === true,
213218
- showSearch: q4.showSearchBar !== false
213239
+ showCategories,
213240
+ ...showCategories ? { categoryFilter: true, allChip: q4.ShowAllCategoriesLabel !== false } : {},
213241
+ ...hiddenCategoryIds.length ? { hiddenCategoryIds } : {},
213242
+ firstOpen: q4.showFirstAnswerOpen === true,
213243
+ oneAtATime: q4.showOneAnswerAtATime !== false,
213244
+ showSearch: q4.showSearchBar !== false,
213245
+ ...viewAll ? { viewAllScreen: "himi_faq" } : {}
213219
213246
  };
213220
- if (Object.keys(obj19(st2.categories)).length) ctx.gap(sectionId, "faq_list_section", "the source limits its questions to chosen categories; the section lists every category");
213221
- if (q4.ShowAllCategoriesLabel === true && q4.showCategories !== false) ctx.gap(sectionId, "faq_list_section", "the source has an All-categories filter; the section shows every category's questions under its own heading, with no filter");
213247
+ if (limit !== void 0 && !viewAll) ctx.gap(sectionId, "faq_list_section", "the source offers View All for every question; this scaffold has no himi_faq screen, so the button is left out");
213222
213248
  const svc = ctx.uses("faq", `faq${index}`, options2);
213223
213249
  const children2 = [];
213224
213250
  const title = str15(s5.title).trim();
213225
213251
  if (s5.showTitle === true && title) children2.push(text10(`${id}.title`, title, "title3", {}, inset(0, 0, 0)));
213226
- children2.push(ctx.recipe("faq-list", { svc, id }));
213227
- return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: {} } });
213252
+ children2.push(ctx.recipe("faq-list", { svc, id, viewAllLabel: "View All" }));
213253
+ return vstack(`${id}.box`, children2, 12, { ...inset(16, 16), onAppear: { actionId: `tier5.${svc}.load`, params: ctx.workerCopy(MODULES.faq.file) } });
213228
213254
  },
213229
213255
  // The groups the source chose (or all), as rows that open the group, with the source's own View All button.
213230
213256
  groups_list_section: groupsSection("groups-list", "groups_list_section"),
@@ -266680,20 +266706,20 @@ __export(input_evidence_isolation_exports, {
266680
266706
  });
266681
266707
  async function installInputEvidenceIsolation(dir) {
266682
266708
  const { lstatSync: lstatSync45, readdirSync: readdirSync69, readlinkSync: readlinkSync4, realpathSync: realpathSync28 } = await import("node:fs");
266683
- const { dirname: dirname96, isAbsolute: isAbsolute25, join: join229, relative: relative41, resolve: resolve141, sep: sep38 } = await import("node:path");
266709
+ const { dirname: dirname96, isAbsolute: isAbsolute26, join: join229, relative: relative41, resolve: resolve141, sep: sep38 } = await import("node:path");
266684
266710
  const root = resolve141(dir);
266685
266711
  const privateDir = join229(root, ".himi");
266686
266712
  const privateReal = join229(realpathSync28(root), ".himi") + sep38;
266687
266713
  const within2 = (base2, path2) => {
266688
266714
  const rel2 = relative41(base2, path2);
266689
- return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute25(rel2);
266715
+ return !!rel2 && rel2 !== ".." && !rel2.startsWith(`..${sep38}`) && !isAbsolute26(rel2);
266690
266716
  };
266691
266717
  const recording = join229(dir, "dev", "net-mocks.json");
266692
266718
  const isAllowedLink = (path2) => {
266693
266719
  try {
266694
266720
  if (path2 === recording) {
266695
266721
  const link4 = readlinkSync4(path2);
266696
- if (isAbsolute25(link4)) return false;
266722
+ if (isAbsolute26(link4)) return false;
266697
266723
  const target = resolve141(dirname96(path2), link4);
266698
266724
  if (!within2(privateDir, target)) return false;
266699
266725
  if (realpathSync28(path2) !== join229(realpathSync28(root), relative41(root, target))) return false;
@@ -268619,6 +268645,8 @@ var init_widgets_plan = __esm({
268619
268645
  // src/one-app/generate-cli.ts
268620
268646
  import { existsSync as existsSync130, mkdirSync as mkdirSync59, readdirSync as readdirSync56, readFileSync as readFileSync154, rmSync as rmSync37, writeFileSync as writeFileSync61 } from "node:fs";
268621
268647
  import { dirname as dirname74, join as join164, resolve as resolve101 } from "node:path";
268648
+ import ts36 from "typescript";
268649
+ import { relative as relativePath, isAbsolute as isAbsolute21 } from "node:path";
268622
268650
  function removeStaleGeneratedWorkers(contentDir2, current) {
268623
268651
  const root = join164(contentDir2, "tier5-src");
268624
268652
  if (!existsSync130(root)) return;
@@ -268747,7 +268775,8 @@ async function runOneAppGenerate(args, io2) {
268747
268775
  let result;
268748
268776
  try {
268749
268777
  const topBarDefault = readTopBarDefault(options2.contentDir);
268750
- result = generateScreens({ raw, pages: pages2, business, opaquePngs, imageRatios, navigation, homeInvite, takenScreenIds: taken2, ...homeScreenId ? { homeScreenId } : {}, ...topBarDefault ? { topBarDefault } : {}, recipe: (name, values) => readRecipe(options2.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options2.contentDir, name, values), hasModule: (file2) => existsSync130(join164(options2.contentDir, "tier5-src", "_shared", `${file2}.ts`)), customWidget: (key4) => readWidgetComponent(options2.contentDir, key4) });
268778
+ const workerCopy = sectionWorkerCopy(options2.contentDir, await appLocale2(options2.contentDir));
268779
+ result = generateScreens({ raw, pages: pages2, business, opaquePngs, imageRatios, navigation, homeInvite, takenScreenIds: taken2, workerCopy, ...homeScreenId ? { homeScreenId } : {}, ...topBarDefault ? { topBarDefault } : {}, recipe: (name, values) => readRecipe(options2.contentDir, name, values), recipeNodes: (name, values) => readRecipeNodes(options2.contentDir, name, values), hasModule: (file2) => existsSync130(join164(options2.contentDir, "tier5-src", "_shared", `${file2}.ts`)), customWidget: (key4) => readWidgetComponent(options2.contentDir, key4) });
268751
268780
  } catch (error) {
268752
268781
  if (error instanceof RecipeError) return report6(io2, false, { code: "recipe_unavailable", error: error.message });
268753
268782
  throw error;
@@ -268875,6 +268904,62 @@ async function runOneAppGenerate(args, io2) {
268875
268904
  }
268876
268905
  return report6(io2, true, { ...body, next: `himi template screens --upsert --from ${shellArg(options2.out)}` + (result.tabs.length ? ` && himi one-app apply-navigation --evidence-dir ${shellArg(options2.evidenceDir)} --content ${shellArg(options2.contentDir)} --tabs ${shellArg(tabsFileOf(options2.out))}` : "") });
268877
268906
  }
268907
+ async function appLocale2(contentDir2) {
268908
+ try {
268909
+ const locale = (await loadAppConfigModule(contentDir2))?.locale;
268910
+ return locale && typeof locale === "object" ? locale : void 0;
268911
+ } catch {
268912
+ return void 0;
268913
+ }
268914
+ }
268915
+ function sectionWorkerCopy(contentDir2, locale) {
268916
+ const done = /* @__PURE__ */ new Map();
268917
+ return (module) => {
268918
+ const hit = done.get(module);
268919
+ if (hit) return hit;
268920
+ let params = {};
268921
+ if (/^[a-z0-9-]+$/.test(module)) {
268922
+ try {
268923
+ const source2 = readFileSync154(join164(contentDir2, "tier5-src", "_shared", `${module}.ts`), "utf8");
268924
+ params = pinnedWorkerParams(locale, contentDir2, source2) ?? keyedWorkerCopy(contentDir2, locale, source2);
268925
+ } catch {
268926
+ params = {};
268927
+ }
268928
+ }
268929
+ done.set(module, params);
268930
+ return params;
268931
+ };
268932
+ }
268933
+ function keyedWorkerCopy(contentDir2, locale, source2) {
268934
+ const tag2 = locale?.default ?? "en";
268935
+ const others = (locale?.translations ?? []).filter((t2) => t2 !== tag2);
268936
+ if (!others.length || pinsSingleLanguage(locale) || !isSupportedLocale(tag2)) return {};
268937
+ const directory = join164(contentDir2, "l10n");
268938
+ const path2 = join164(directory, `${tag2}.json`);
268939
+ const outside = relativePath(directory, path2);
268940
+ if (outside.startsWith("..") || isAbsolute21(outside)) return {};
268941
+ let keyed;
268942
+ try {
268943
+ keyed = keyMap(parseCatalog(readFileSync154(path2, "utf8")), { sourceFallback: true });
268944
+ } catch {
268945
+ return {};
268946
+ }
268947
+ const params = {};
268948
+ for (const key4 of copyParamKeys(source2).sort()) if (keyed.has(key4)) params[key4] = `$t:${key4}`;
268949
+ return params;
268950
+ }
268951
+ function copyParamKeys(source2) {
268952
+ const keys2 = /* @__PURE__ */ new Set();
268953
+ const visit = (node4) => {
268954
+ if (ts36.isCallExpression(node4) && ts36.isIdentifier(node4.expression) && node4.expression.text === "copyParam") {
268955
+ const [key4] = node4.arguments;
268956
+ if (key4 && ts36.isStringLiteralLike(key4)) keys2.add(key4.text);
268957
+ }
268958
+ ts36.forEachChild(node4, visit);
268959
+ };
268960
+ visit(ts36.createSourceFile("module.ts", source2, ts36.ScriptTarget.Latest, true));
268961
+ return [...keys2];
268962
+ }
268878
268963
  var GENERATE_USAGE, idsFile, homeFile, shellArg, generatedPagesFile;
268879
268964
  var init_generate_cli = __esm({
268880
268965
  "src/one-app/generate-cli.ts"() {
@@ -268897,6 +268982,10 @@ var init_generate_cli = __esm({
268897
268982
  init_custom_widget_component();
268898
268983
  init_widgets_plan();
268899
268984
  init_home_topbar();
268985
+ init_pinned_language();
268986
+ init_l10n_catalog();
268987
+ init_locale();
268988
+ init_app_config_loader();
268900
268989
  GENERATE_USAGE = "himi one-app generate --evidence-dir <.himi/one-app> --content <app-dir> [--out <screens.json>]";
268901
268990
  idsFile = (out2) => `${out2}.ids.json`;
268902
268991
  homeFile = (out2) => `${out2}.home.json`;
@@ -271429,8 +271518,8 @@ __export(validate_design_exports, {
271429
271518
  });
271430
271519
  import { randomBytes as randomBytes22 } from "node:crypto";
271431
271520
  import { closeSync as closeSync12, constants as constants10, existsSync as existsSync137, lstatSync as lstatSync37, openSync as openSync11, readFileSync as readFileSync161, realpathSync as realpathSync21, renameSync as renameSync22, unlinkSync as unlinkSync9, writeFileSync as writeFileSync64 } from "node:fs";
271432
- import { dirname as dirname76, isAbsolute as isAbsolute21, join as join172, relative as relative31, resolve as resolve105, sep as sep33, win32 } from "node:path";
271433
- import ts36 from "typescript";
271521
+ import { dirname as dirname76, isAbsolute as isAbsolute22, join as join172, relative as relative31, resolve as resolve105, sep as sep33, win32 } from "node:path";
271522
+ import ts37 from "typescript";
271434
271523
  function readColorToken(tokens2, name) {
271435
271524
  const entry = obj24(tokens2.colors)?.[name];
271436
271525
  if (typeof entry === "string") return { value: entry, origin: "token" };
@@ -271601,11 +271690,11 @@ function tokensLocation(contentDir2) {
271601
271690
  }
271602
271691
  function literalPolicyValue(expression) {
271603
271692
  const node4 = unwrap(expression);
271604
- if (ts36.isStringLiteralLike(node4)) return node4.text;
271605
- if (!ts36.isObjectLiteralExpression(node4)) throw new Error("The app idiom policy is computed and cannot be checked.");
271693
+ if (ts37.isStringLiteralLike(node4)) return node4.text;
271694
+ if (!ts37.isObjectLiteralExpression(node4)) throw new Error("The app idiom policy is computed and cannot be checked.");
271606
271695
  const value2 = {};
271607
271696
  for (const property3 of node4.properties) {
271608
- if (!ts36.isPropertyAssignment(property3) || !property3.name || !ts36.isIdentifier(property3.name) && !ts36.isStringLiteral(property3.name)) {
271697
+ if (!ts37.isPropertyAssignment(property3) || !property3.name || !ts37.isIdentifier(property3.name) && !ts37.isStringLiteral(property3.name)) {
271609
271698
  throw new Error("The app idiom policy is computed and cannot be checked.");
271610
271699
  }
271611
271700
  value2[property3.name.text] = literalPolicyValue(property3.initializer);
@@ -271618,7 +271707,7 @@ function activeIdiomNames(contentDir2, tokens2) {
271618
271707
  for (const name of ["config.ts", "config.js", "himi.config.ts"]) {
271619
271708
  const file2 = join172(contentDir2, name);
271620
271709
  if (!existsSync137(file2)) continue;
271621
- const source2 = ts36.createSourceFile(file2, readFileSync161(file2, "utf8"), ts36.ScriptTarget.Latest, true);
271710
+ const source2 = ts37.createSourceFile(file2, readFileSync161(file2, "utf8"), ts37.ScriptTarget.Latest, true);
271622
271711
  const app2 = defineAppLiteral(source2);
271623
271712
  if (!app2) throw new Error("The app config cannot be inspected for active idiom overlays.");
271624
271713
  const field = lookup(app2, "idiom");
@@ -271648,13 +271737,13 @@ function activeIdiomNames(contentDir2, tokens2) {
271648
271737
  return /* @__PURE__ */ new Set();
271649
271738
  }
271650
271739
  function writableTokensPath(contentDir2, location) {
271651
- if (isAbsolute21(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
271740
+ if (isAbsolute22(location) || win32.isAbsolute(location) || location.split(/[\\/]/).includes("..")) {
271652
271741
  throw new Error("--fix requires a token path inside the content directory without traversal.");
271653
271742
  }
271654
271743
  const root = realpathSync21(contentDir2);
271655
271744
  const path2 = resolve105(root, location);
271656
271745
  const rel2 = relative31(root, path2);
271657
- if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute21(rel2)) {
271746
+ if (!rel2 || rel2 === ".." || rel2.startsWith(`..${sep33}`) || isAbsolute22(rel2)) {
271658
271747
  throw new Error("--fix requires a token path inside the content directory.");
271659
271748
  }
271660
271749
  let current = root;
@@ -271667,7 +271756,7 @@ function writableTokensPath(contentDir2, location) {
271667
271756
  }
271668
271757
  }
271669
271758
  const real = relative31(root, realpathSync21(path2));
271670
- if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
271759
+ if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute22(real)) {
271671
271760
  throw new Error("--fix cannot write outside the content directory.");
271672
271761
  }
271673
271762
  return path2;
@@ -271867,7 +271956,7 @@ function safeEvidencePath(contentDir2, name) {
271867
271956
  const dir = realDirIn(root, ".himi/one-app");
271868
271957
  if (!dir) throw new Error("The design evidence directory is not a regular directory.");
271869
271958
  const real = relative31(root, realpathSync21(dir));
271870
- if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute21(real)) {
271959
+ if (!real || real === ".." || real.startsWith(`..${sep33}`) || isAbsolute22(real)) {
271871
271960
  throw new Error("The design evidence directory is outside the content directory.");
271872
271961
  }
271873
271962
  const path2 = join172(dir, name);
@@ -277630,57 +277719,57 @@ var init_preview_assets_generated = __esm({
277630
277719
  init_define_HHP_CATALOG();
277631
277720
  init_preview_assets_format();
277632
277721
  PREVIEW_ASSET_MANIFEST = [
277633
- { key: "assets/DashboardHost-BFWXnAss.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "cf99e0a75ed7745ca99a5eceef93dc3c5505a2b790ef622709d711346b40843c" },
277634
- { key: "assets/DevDrawer-CBRKIBaX.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "3c615630091f1b1c41b7360d87422898cbcbe5b1152a7ef8e7eb6b75e08e536f" },
277635
- { key: "assets/IdiomCompare-Cr9PaP3O.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "9eedaf8aab48332365d623af04f264c8642e77710b52ed6d4a9096ea03ed917b" },
277636
- { key: "assets/LightboxViewer-CiQxUwD_.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15970, sha256: "13ac13ae0c5fa6dff478d4cb1443aaf7b5228f59edae3712c1b50c59dc9b7e75" },
277637
- { key: "assets/OfflineReadingBar-BvuruzO3.js", contentType: "application/javascript; charset=utf-8", offset: 37672, length: 1761, sha256: "01a49758ee894bb4c792f6ce66b38ec54c311767555c868809dcbc9d3adfa383" },
277638
- { key: "assets/PhonePreviewControl-BYo9DxSn.js", contentType: "application/javascript; charset=utf-8", offset: 39433, length: 37851, sha256: "2dcc4d8377c7e304cf4b6b0c84d0a8b71314604f81685fd95a6ee08c5f2dbd27" },
277639
- { key: "assets/SchemeCompare-2cgeSN07.js", contentType: "application/javascript; charset=utf-8", offset: 77284, length: 1858, sha256: "17a25bf664d535f14fe50c529b2b37f9b5e09f7bc5b57c7b7d7403edad00a790" },
277640
- { key: "assets/TopBandLayer-DU4dvX97.js", contentType: "application/javascript; charset=utf-8", offset: 79142, length: 1275, sha256: "42ab0e3af6d060b39895e962ce8059f88b930417c371628885f2f6f8294bc420" },
277641
- { key: "assets/TopBarSearchStates-CTCtEND6.js", contentType: "application/javascript; charset=utf-8", offset: 80417, length: 4069, sha256: "be239d3ddd3adbdb6a2029d5578e37aa8d76971ee4c8464af8d97d5a921ee989" },
277642
- { key: "assets/WixFrogTelemetrySink-CPPs6ZjE.js", contentType: "application/javascript; charset=utf-8", offset: 84486, length: 3586, sha256: "3035c25be9e12ab7a7a985f01ffe0a78dea6b7ef6ee1f0d9edb486bee849f95c" },
277722
+ { key: "assets/DashboardHost-CmxkZdxD.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2985, sha256: "889534c4a1e70a4c83ffdd04dc4a17e6ca62ad8c5d84b6fa90fdccb006bc135e" },
277723
+ { key: "assets/DevDrawer-B5CbOJ5l.js", contentType: "application/javascript; charset=utf-8", offset: 2993, length: 16783, sha256: "a60a7c31c5b09d0b2b756b7b4988ce5039662f73817356392ddd1ceedd493230" },
277724
+ { key: "assets/IdiomCompare-Dm6eQkgH.js", contentType: "application/javascript; charset=utf-8", offset: 19776, length: 1926, sha256: "3acb56c1bb50f7114ceaa43d92571e5ab1dccd0b9283fba3ad6102149e151163" },
277725
+ { key: "assets/LightboxViewer-BeDlB9da.js", contentType: "application/javascript; charset=utf-8", offset: 21702, length: 15970, sha256: "886a5fba6e7677f721cc9e45397a841d1cb4cdb8d01119f4f55f69ec0c4db53d" },
277726
+ { key: "assets/OfflineReadingBar-CmzHoKy8.js", contentType: "application/javascript; charset=utf-8", offset: 37672, length: 1761, sha256: "e92947ed0ca2103dbd62a2f6daf8f0d65ee0e0cdd736dd498705800cd4de9e01" },
277727
+ { key: "assets/PhonePreviewControl-DSCr1Ceu.js", contentType: "application/javascript; charset=utf-8", offset: 39433, length: 37851, sha256: "55ef0a5d07044ac940d0148de5d9350a756b862863d8e6f72aa839f58eb7e874" },
277728
+ { key: "assets/SchemeCompare-BZOqzbSJ.js", contentType: "application/javascript; charset=utf-8", offset: 77284, length: 1858, sha256: "bd8d7b2cf1cb00b851096a06fb621eae6b61d6ee41f92c39f1894c94aac12a1e" },
277729
+ { key: "assets/TopBandLayer-BPoqM6MV.js", contentType: "application/javascript; charset=utf-8", offset: 79142, length: 1275, sha256: "a2b91d6557a104dd0dcc396407d82e1a2c2e7ec528ca83f559a916bed2387a5a" },
277730
+ { key: "assets/TopBarSearchStates-FnmS57SO.js", contentType: "application/javascript; charset=utf-8", offset: 80417, length: 4069, sha256: "0e538ff04858d79a93c715fa335c3e9645299a65e27033923a6c80966c820dbf" },
277731
+ { key: "assets/WixFrogTelemetrySink-C0SSAHLb.js", contentType: "application/javascript; charset=utf-8", offset: 84486, length: 3586, sha256: "9552aa5ae26583c013b00c3ac7e05c80621864cc07ed067c8a008bac79bb9522" },
277643
277732
  { key: "assets/calendar-ics-BvfIYWjG.js", contentType: "application/javascript; charset=utf-8", offset: 88072, length: 2192, sha256: "1636167041e9829ceccd3544297b86b8475c38bd2f759c4dbc17c813dc6e9254" },
277644
277733
  { key: "assets/catalog-B4UJpy5D.js", contentType: "application/javascript; charset=utf-8", offset: 90264, length: 35626, sha256: "90111ffcf2d13eff399836acafd1f2b387859440a29dcd4a0afd8370915992cb" },
277645
- { key: "assets/catalogFontFaces-DfnSVyg6.js", contentType: "application/javascript; charset=utf-8", offset: 125890, length: 1111, sha256: "36c641e53886bebf5df6754e094a3fbd44810970a50318511772c0a81a8f5884" },
277734
+ { key: "assets/catalogFontFaces-CuMGTd7j.js", contentType: "application/javascript; charset=utf-8", offset: 125890, length: 1111, sha256: "4687d31be8096624653437cd02a910cd5f0c1d7519eec51ed3e5a003cae30ff0" },
277646
277735
  { key: "assets/contacts-vcard-BcohPQ0m.js", contentType: "application/javascript; charset=utf-8", offset: 127001, length: 2567, sha256: "c4ff75e96cd909bbb9182c5dc78794fcebc65139fbddef2537711d774fb33ad0" },
277647
- { key: "assets/files-transfer-_WvgegEe.js", contentType: "application/javascript; charset=utf-8", offset: 129568, length: 9311, sha256: "6aa311a2730b12d49b9f388e998e08f9146c9bb44d91dbc4c02fe73366e213a7" },
277736
+ { key: "assets/files-transfer-BNlfwh5F.js", contentType: "application/javascript; charset=utf-8", offset: 129568, length: 9311, sha256: "52661386c152ea5f2a4bf3702af015d7399c5d1bf003a79b1571ea8a7fede5d7" },
277648
277737
  { key: "assets/frogActionMap-DzUppDSb.js", contentType: "application/javascript; charset=utf-8", offset: 138879, length: 1172, sha256: "6d59e1dd1c68aaeb2d9927693f6e107c354cc82a611979679c137277f29e14c9" },
277649
- { key: "assets/frogApiRules-BJuOtkyC.js", contentType: "application/javascript; charset=utf-8", offset: 140051, length: 2207, sha256: "e1b91653f7fe10e15007c315d3b4519572dde2e5c2fdecb847f79045cafaedee" },
277738
+ { key: "assets/frogApiRules-vYwkTwg7.js", contentType: "application/javascript; charset=utf-8", offset: 140051, length: 2207, sha256: "134b592aa0004033ba599330512b742e9d7a5e5fee05475f433e34e3edd22659" },
277650
277739
  { key: "assets/frogScreenMap-LM0nfzDQ.js", contentType: "application/javascript; charset=utf-8", offset: 142258, length: 1096, sha256: "991b931a02a029c9c4514f0ccbdc8a07f4cf2168ea3e23ffe5e244327fa05141" },
277651
277740
  { key: "assets/frogScreenNavArgs-mIYDwUYX.js", contentType: "application/javascript; charset=utf-8", offset: 143354, length: 780, sha256: "6c9e52135322e0a752b57ef6f360d71400cb77414b4f29d480230ae174201230" },
277652
277741
  { key: "assets/glassPreviewBrowser-OVmIRgHt.js", contentType: "application/javascript; charset=utf-8", offset: 144134, length: 6800, sha256: "3671697a4f66a1f5f68610fab57d590630be70be934f59675ef1bda9a96e6fe3" },
277653
277742
  { key: "assets/godot-pack-cache-Cuhrw41M.js", contentType: "application/javascript; charset=utf-8", offset: 150934, length: 1626, sha256: "70b16367b8938ebd6eb8494a2b472171dd2acdcb452c52f35f140eb8ede9c0b7" },
277654
277743
  { key: "assets/image-preparation-Cj4gldm6.js", contentType: "application/javascript; charset=utf-8", offset: 152560, length: 2704, sha256: "32944ea587c2f3b84389b66b50a850437560238f1c8d33b6275973ee04eee865" },
277655
- { key: "assets/index-LhGl2_B0.js", contentType: "application/javascript; charset=utf-8", offset: 155264, length: 1748690, sha256: "98b4866b9750654886e49efa4f261339390d62c8c25e3d07b7740c60ab739b94" },
277656
- { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1903954, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
277657
- { key: "assets/network-watches-DqkZgFzj.js", contentType: "application/javascript; charset=utf-8", offset: 1911705, length: 1299, sha256: "ba0b454891f8d16a75d9cf85009003914d0214c70e40b1a5cb08919795f1bdbb" },
277658
- { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1913004, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
277659
- { key: "assets/pdf-uN3Sa_xI.js", contentType: "application/javascript; charset=utf-8", offset: 1923535, length: 488215, sha256: "c8bb518bde682f10e6ec491dce590312b268015da3ec73d5abe284e1e99863c8" },
277660
- { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2411750, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
277661
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2411840, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
277662
- { key: "assets/pdfDocument-Cnasm9sO.js", contentType: "application/javascript; charset=utf-8", offset: 3728874, length: 3836, sha256: "d3dec2afdde087e59e8f2bb89dcdedf223fee59c3791b72698d1d6278ea3cd7e" },
277663
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3732710, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
277664
- { key: "assets/scrollLinkedRuntime-DlYkes99.js", contentType: "application/javascript; charset=utf-8", offset: 3734976, length: 2278, sha256: "31c58640d6d9deb691b2cede38841b0bc779b5d51d0a62a03e41cf58682e5066" },
277665
- { key: "assets/webviewBridgeHost-CSgiK-ts.js", contentType: "application/javascript; charset=utf-8", offset: 3737254, length: 9946, sha256: "2ef215ce5eecfdf29928262dec67563a4bdf56dacabb2162f7fc6d48e06681f8" },
277666
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3747200, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
277667
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3751810, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
277668
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4240394, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
277669
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4331318, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
277670
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4422302, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
277671
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4513282, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
277672
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4604154, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
277673
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4695134, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
277674
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4803770, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
277675
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4912854, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
277676
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 5021902, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
277677
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5129602, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
277678
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5217710, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
277679
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5224528, length: 4924, sha256: "9f5356ccfce2de439865b014382ed3fa8c159372d57f46d19014764dda91e98b" },
277680
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5229452, length: 15585, sha256: "98ec60ef8f9568532f0746d1092b5c76f1c52d718365c586c8bade8f62c7c5eb" },
277681
- { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5245037, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
277682
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5246208, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
277683
- { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5270511, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
277744
+ { key: "assets/index-FRd-7j3m.js", contentType: "application/javascript; charset=utf-8", offset: 155264, length: 1748692, sha256: "0c2c957076b5ad228c7b559f8ac063f9d540861e8f6f91b5a5fd26b640d5f31b" },
277745
+ { key: "assets/jsx-runtime-CdvZGgm7.js", contentType: "application/javascript; charset=utf-8", offset: 1903956, length: 7751, sha256: "42a78b508d0f309f6a4a6efbb8669015211b3c26574c5b0929884c4d9d20b806" },
277746
+ { key: "assets/network-watches-BzUbqhPs.js", contentType: "application/javascript; charset=utf-8", offset: 1911707, length: 1299, sha256: "cf0363d66dfdc46653dc8992ffa25f85fb19b7cde8e907c7c6bf12908cd45430" },
277747
+ { key: "assets/on-device-ml-D5QGvW8P.js", contentType: "application/javascript; charset=utf-8", offset: 1913006, length: 10531, sha256: "914ea54d973624e7bc82d1847444f26084ac16d69be3051b4b5938b1e35beced" },
277748
+ { key: "assets/pdf-C3rJCYHp.js", contentType: "application/javascript; charset=utf-8", offset: 1923537, length: 488215, sha256: "4a6f910bf580b4fbc462abad75f9f9a8274914d66d468efef11bb741e11f834e" },
277749
+ { key: "assets/pdf.worker.min-BGnVRhRG.js", contentType: "application/javascript; charset=utf-8", offset: 2411752, length: 90, sha256: "521a0e528916d678d7588b2cddf3dadd3bb959a6d62426382f61c77a82017e35" },
277750
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 2411842, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
277751
+ { key: "assets/pdfDocument-BmbO2Yaw.js", contentType: "application/javascript; charset=utf-8", offset: 3728876, length: 3836, sha256: "a0837b0f9fc9094c5495a07b9fcd2c57c7ac36f67b5ed48e8d2870ce49b4ddf5" },
277752
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3732712, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
277753
+ { key: "assets/scrollLinkedRuntime-BpoAtRvM.js", contentType: "application/javascript; charset=utf-8", offset: 3734978, length: 2278, sha256: "ee71bdc237e882ff884c811b72463b9780bf7e9433af2ef386035b19033637eb" },
277754
+ { key: "assets/webviewBridgeHost-Bo9Y7eGN.js", contentType: "application/javascript; charset=utf-8", offset: 3737256, length: 9946, sha256: "d0133d20239da06edddcb54e975dc8673fee5857fe1e7e454a609364d484a9ee" },
277755
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3747202, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
277756
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3751812, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
277757
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 4240396, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
277758
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 4331320, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
277759
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 4422304, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
277760
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 4513284, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
277761
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4604156, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
277762
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4695136, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
277763
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4803772, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
277764
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4912856, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
277765
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 5021904, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
277766
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 5129604, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
277767
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 5217712, length: 6818, sha256: "835250c3d8004f27c2b67f9b471984351ba6df07b916d97e33b43c691200a18c" },
277768
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 5224530, length: 4924, sha256: "1258caf3d295ce00f7c9597262d495277b110871709ecf719dd0ecb77f19e354" },
277769
+ { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 5229454, length: 15585, sha256: "98ec60ef8f9568532f0746d1092b5c76f1c52d718365c586c8bade8f62c7c5eb" },
277770
+ { key: "kit-tab-bar.css", contentType: "text/css; charset=utf-8", offset: 5245039, length: 1171, sha256: "9e2c3a0faaf05d5471badf167a4d3bdf1c4e6dd65c432eea6d254158bfd99585" },
277771
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 5246210, length: 24303, sha256: "7ee3dbacf4e6da69c1c7085a2423e33e2adaec933cd897fb2ee2391e3277c3ae" },
277772
+ { key: "t5-worker-frame.html", contentType: "text/html; charset=utf-8", offset: 5270513, length: 24320, sha256: "d24f399a1fcfa7f696a0d96aadbc983d2624b45712dae9a15545f6914dbb9506" }
277684
277773
  ];
277685
277774
  }
277686
277775
  });
@@ -285994,11 +286083,11 @@ var init_redact = __esm({
285994
286083
  // src/iap-config-edit.ts
285995
286084
  import { existsSync as existsSync151, readFileSync as readFileSync178 } from "node:fs";
285996
286085
  import { basename as basename42, join as join188 } from "node:path";
285997
- import ts37 from "typescript";
286086
+ import ts38 from "typescript";
285998
286087
  function bindPurchasesAppInConfig(source2, options2) {
285999
286088
  const fileName = options2.fileName ?? "config.ts";
286000
- const kind = fileName.endsWith(".ts") ? ts37.ScriptKind.TS : ts37.ScriptKind.JS;
286001
- const file2 = ts37.createSourceFile(fileName, source2, ts37.ScriptTarget.Latest, true, kind);
286089
+ const kind = fileName.endsWith(".ts") ? ts38.ScriptKind.TS : ts38.ScriptKind.JS;
286090
+ const file2 = ts38.createSourceFile(fileName, source2, ts38.ScriptTarget.Latest, true, kind);
286002
286091
  const wanted = `wixIap: { purchasesAppId: ${JSON.stringify(options2.purchasesAppId)} }`;
286003
286092
  const unchanged = (result) => ({ source: source2, changed: false, applied: [], conflicts: [], instructions: [], ...result });
286004
286093
  const app2 = defineAppLiteral(file2);
@@ -286026,7 +286115,7 @@ function siteFinding(app2, siteId, fileName) {
286026
286115
  if (login2.kind !== "member") return { instruction: `${fileName} does not write auth as a WixConsumerAuthProvider({ \u2026 }) call it can read, so ${check}` };
286027
286116
  const found = lookup(login2.literal, "siteId");
286028
286117
  const value2 = found.kind === "written" ? unwrap(found.node.initializer) : void 0;
286029
- if (!value2 || !ts37.isStringLiteralLike(value2)) return { instruction: `auth's siteId is not written as a literal, so ${check}` };
286118
+ if (!value2 || !ts38.isStringLiteralLike(value2)) return { instruction: `auth's siteId is not written as a literal, so ${check}` };
286030
286119
  if (value2.text.toLowerCase() === siteId.toLowerCase()) return {};
286031
286120
  return { conflict: `auth's siteId is "${value2.text}", but the purchases app is registered on site "${siteId}". A build bakes the binding only when they match, so ${fileName} was not edited.` };
286032
286121
  }
@@ -286037,7 +286126,7 @@ function bundleFinding(app2, { bundleId, storeBundleId }, fileName) {
286037
286126
  }
286038
286127
  const found = lookup(app2, "bundleId");
286039
286128
  const value2 = found.kind === "written" ? unwrap(found.node.initializer) : void 0;
286040
- if (!value2 || !ts37.isStringLiteralLike(value2)) {
286129
+ if (!value2 || !ts38.isStringLiteralLike(value2)) {
286041
286130
  return { instruction: `${fileName} does not write bundleId as a literal: make sure this app builds bundle ${JSON.stringify(bundleId)}, the one the purchases app is registered for.` };
286042
286131
  }
286043
286132
  if (value2.text === bundleId || defaultProdBundleId(value2.text) === bundleId) return {};
@@ -286047,23 +286136,23 @@ function bindingFinding2(app2, file2, purchasesAppId, wanted, fileName) {
286047
286136
  const wixIap = lookup(app2, "wixIap");
286048
286137
  if (wixIap.kind === "absent") return { splice: appendProperties(app2, file2, [`${wanted},`]), applied: "wixIap.purchasesAppId" };
286049
286138
  const literal4 = wixIap.kind === "written" ? unwrap(wixIap.node.initializer) : void 0;
286050
- if (!literal4 || !ts37.isObjectLiteralExpression(literal4)) return { instruction: `${fileName} computes wixIap, so it was not edited: it must evaluate to ${wanted}.` };
286139
+ if (!literal4 || !ts38.isObjectLiteralExpression(literal4)) return { instruction: `${fileName} computes wixIap, so it was not edited: it must evaluate to ${wanted}.` };
286051
286140
  const current = lookup(literal4, "purchasesAppId");
286052
286141
  if (current.kind === "absent") return { splice: appendProperties(literal4, file2, [`purchasesAppId: ${JSON.stringify(purchasesAppId)},`]), applied: "wixIap.purchasesAppId" };
286053
286142
  const value2 = current.kind === "written" ? unwrap(current.node.initializer) : void 0;
286054
- if (!value2 || !ts37.isStringLiteralLike(value2)) return { instruction: `${fileName} computes wixIap.purchasesAppId, so it was not edited: it must evaluate to ${JSON.stringify(purchasesAppId)}.` };
286143
+ if (!value2 || !ts38.isStringLiteralLike(value2)) return { instruction: `${fileName} computes wixIap.purchasesAppId, so it was not edited: it must evaluate to ${JSON.stringify(purchasesAppId)}.` };
286055
286144
  if (value2.text === purchasesAppId) return {};
286056
286145
  return { conflict: `${fileName} already binds purchases app "${value2.text}", but this site's purchases app for the bundle is "${purchasesAppId}". Nothing was changed; fix whichever is stale.` };
286057
286146
  }
286058
286147
  function capabilityFinding(app2, fileName) {
286059
286148
  const capabilities = lookup(app2, "capabilities");
286060
286149
  const list5 = capabilities.kind === "written" ? unwrap(capabilities.node.initializer) : void 0;
286061
- if (capabilities.kind !== "absent" && (!list5 || !ts37.isArrayLiteralExpression(list5))) {
286150
+ if (capabilities.kind !== "absent" && (!list5 || !ts38.isArrayLiteralExpression(list5))) {
286062
286151
  return { instruction: `Add "iap" to capabilities: the purchases app is baked only into a build that declares it, and ${fileName} does not list capabilities inline.` };
286063
286152
  }
286064
286153
  if (!list5) return { instruction: `Add capabilities: ["iap"] (with the app's other capabilities) to ${fileName}: the purchases app is baked only into a build that declares it.` };
286065
286154
  const elements2 = list5.elements;
286066
- if (elements2.some((e2) => ts37.isStringLiteralLike(e2) && e2.text === "iap")) return {};
286155
+ if (elements2.some((e2) => ts38.isStringLiteralLike(e2) && e2.text === "iap")) return {};
286067
286156
  const last = elements2[elements2.length - 1];
286068
286157
  return {
286069
286158
  splice: last ? { at: last.end, end: last.end, text: ', "iap"' } : { at: list5.getStart(), end: list5.end, text: '["iap"]' },
@@ -303920,7 +304009,7 @@ var init_header_badges_cli = __esm({
303920
304009
 
303921
304010
  // src/site-analyze/velo-source.ts
303922
304011
  import path from "node:path";
303923
- import ts38 from "typescript";
304012
+ import ts39 from "typescript";
303924
304013
  function applySourceEdits(source2, edits) {
303925
304014
  const chunks = [];
303926
304015
  let cursor = 0;
@@ -303938,13 +304027,13 @@ function redactVeloSource(source2, knownSecrets = []) {
303938
304027
  /\b(?:IST\.[\w.-]+|eyJ[\w-]+\.[\w-]+\.[\w-]+|(?:sk|rk)_(?:live|test)_[\w-]+|gh[pousr]_[\w]+|github_pat_[\w]+|AKIA[A-Z0-9]{16})\b/g,
303939
304028
  REDACTED2
303940
304029
  ).replace(/\b(?:Bearer|Basic)\s+[A-Za-z0-9._~+/=-]+/gi, REDACTED2).replace(/\b([a-z][a-z0-9+.-]*:\/\/)[^\s/'"`]+:[^\s/'"`]+@/gi, "$1[REDACTED]@").replace(/([?&](?:api[-_]?key|token|secret|password|signature)=)[^&#\s'"`]+/gi, "$1[REDACTED]");
303941
- const parsed = ts38.createSourceFile("backend.ts", source2, ts38.ScriptTarget.Latest, true);
304030
+ const parsed = ts39.createSourceFile("backend.ts", source2, ts39.ScriptTarget.Latest, true);
303942
304031
  const comments = /* @__PURE__ */ new Map();
303943
304032
  const visitComments = (node4) => {
303944
304033
  for (const range of [
303945
- ...ts38.getLeadingCommentRanges(source2, node4.pos) ?? [],
303946
- ...ts38.getTrailingCommentRanges(source2, node4.pos) ?? [],
303947
- ...ts38.getTrailingCommentRanges(source2, node4.end) ?? []
304034
+ ...ts39.getLeadingCommentRanges(source2, node4.pos) ?? [],
304035
+ ...ts39.getTrailingCommentRanges(source2, node4.pos) ?? [],
304036
+ ...ts39.getTrailingCommentRanges(source2, node4.end) ?? []
303948
304037
  ]) comments.set(range.pos, range.end);
303949
304038
  for (const child3 of node4.getChildren(parsed)) visitComments(child3);
303950
304039
  };
@@ -303963,22 +304052,22 @@ function redactVeloSource(source2, knownSecrets = []) {
303963
304052
  if (/^["'`][A-Za-z0-9_+/=-]{24,}["'`]$/.test(token)) return JSON.stringify(REDACTED2);
303964
304053
  return token;
303965
304054
  };
303966
- const clean4 = ts38.createSourceFile("backend.ts", source2, ts38.ScriptTarget.Latest, true);
304055
+ const clean4 = ts39.createSourceFile("backend.ts", source2, ts39.ScriptTarget.Latest, true);
303967
304056
  const masks = [];
303968
304057
  const collectMasks = (node4) => {
303969
304058
  const start2 = node4.getStart(clean4);
303970
- if (ts38.isRegularExpressionLiteral(node4)) {
304059
+ if (ts39.isRegularExpressionLiteral(node4)) {
303971
304060
  masks.push({ start: start2, end: node4.end, text: " ".repeat(node4.end - start2) });
303972
- } else if (ts38.isStringLiteral(node4) || ts38.isTemplateLiteralToken(node4)) {
304061
+ } else if (ts39.isStringLiteral(node4) || ts39.isTemplateLiteralToken(node4)) {
303973
304062
  masks.push({ start: start2, end: node4.end, text: source2.slice(start2, node4.end).replace(/;/g, " ") });
303974
304063
  }
303975
- ts38.forEachChild(node4, collectMasks);
304064
+ ts39.forEachChild(node4, collectMasks);
303976
304065
  };
303977
304066
  collectMasks(clean4);
303978
304067
  const assignmentContext = applySourceEdits(source2, masks);
303979
304068
  const edits = [];
303980
304069
  const visitLiterals = (node4) => {
303981
- if (ts38.isStringLiteral(node4) || ts38.isNoSubstitutionTemplateLiteral(node4) || ts38.isTemplateExpression(node4)) {
304070
+ if (ts39.isStringLiteral(node4) || ts39.isNoSubstitutionTemplateLiteral(node4) || ts39.isTemplateExpression(node4)) {
303982
304071
  const start2 = node4.getStart(clean4);
303983
304072
  const text32 = source2.slice(start2, node4.end);
303984
304073
  const redacted = redactLiteral(text32, start2);
@@ -303987,7 +304076,7 @@ function redactVeloSource(source2, knownSecrets = []) {
303987
304076
  return;
303988
304077
  }
303989
304078
  }
303990
- ts38.forEachChild(node4, visitLiterals);
304079
+ ts39.forEachChild(node4, visitLiterals);
303991
304080
  };
303992
304081
  visitLiterals(clean4);
303993
304082
  return applySourceEdits(source2, edits);
@@ -304026,19 +304115,19 @@ function selectVeloSource(files, request2, knownSecrets = []) {
304026
304115
  selected.set(file2.path, { source: excerpt, sourceTruncated: excerpt.length < redacted.length });
304027
304116
  remaining -= excerpt.length;
304028
304117
  const dependencies = [];
304029
- const parsed = ts38.createSourceFile(file2.path, file2.content, ts38.ScriptTarget.Latest, true);
304118
+ const parsed = ts39.createSourceFile(file2.path, file2.content, ts39.ScriptTarget.Latest, true);
304030
304119
  const specifiers = [];
304031
304120
  const collectImports = (node4) => {
304032
304121
  let specifier;
304033
- if (ts38.isImportDeclaration(node4) || ts38.isExportDeclaration(node4)) {
304122
+ if (ts39.isImportDeclaration(node4) || ts39.isExportDeclaration(node4)) {
304034
304123
  specifier = node4.moduleSpecifier;
304035
- } else if (ts38.isImportEqualsDeclaration(node4) && ts38.isExternalModuleReference(node4.moduleReference)) {
304124
+ } else if (ts39.isImportEqualsDeclaration(node4) && ts39.isExternalModuleReference(node4.moduleReference)) {
304036
304125
  specifier = node4.moduleReference.expression;
304037
- } else if (ts38.isCallExpression(node4) && (node4.expression.kind === ts38.SyntaxKind.ImportKeyword || ts38.isIdentifier(node4.expression) && node4.expression.text === "require")) {
304126
+ } else if (ts39.isCallExpression(node4) && (node4.expression.kind === ts39.SyntaxKind.ImportKeyword || ts39.isIdentifier(node4.expression) && node4.expression.text === "require")) {
304038
304127
  specifier = node4.arguments[0];
304039
304128
  }
304040
- if (specifier && ts38.isStringLiteralLike(specifier)) specifiers.push(specifier.text);
304041
- ts38.forEachChild(node4, collectImports);
304129
+ if (specifier && ts39.isStringLiteralLike(specifier)) specifiers.push(specifier.text);
304130
+ ts39.forEachChild(node4, collectImports);
304042
304131
  };
304043
304132
  collectImports(parsed);
304044
304133
  for (const specifier of specifiers) {
@@ -304070,13 +304159,13 @@ var init_velo_source = __esm({
304070
304159
  });
304071
304160
 
304072
304161
  // src/one-app/widget-velo.ts
304073
- import ts39 from "typescript";
304162
+ import ts40 from "typescript";
304074
304163
  function analyzeVeloSource(source2) {
304075
- const file2 = ts39.createSourceFile("page.js", source2, ts39.ScriptTarget.Latest, true, ts39.ScriptKind.JS);
304164
+ const file2 = ts40.createSourceFile("page.js", source2, ts40.ScriptTarget.Latest, true, ts40.ScriptKind.JS);
304076
304165
  const result = { imports: [], mobileCalls: [], onPress: 0, onClick: 0, data: [], backendImports: [], parseErrors: file2.parseDiagnostics?.length ?? 0 };
304077
304166
  const bindings = /* @__PURE__ */ new Map();
304078
304167
  for (const statement of file2.statements) {
304079
- if (!ts39.isImportDeclaration(statement) || !ts39.isStringLiteral(statement.moduleSpecifier)) continue;
304168
+ if (!ts40.isImportDeclaration(statement) || !ts40.isStringLiteral(statement.moduleSpecifier)) continue;
304080
304169
  const module = statement.moduleSpecifier.text.slice(0, MAX_LITERAL);
304081
304170
  const names2 = [];
304082
304171
  const clause = statement.importClause;
@@ -304085,11 +304174,11 @@ function analyzeVeloSource(source2) {
304085
304174
  bindings.set(clause.name.text, { module, member: "*" });
304086
304175
  }
304087
304176
  const named5 = clause?.namedBindings;
304088
- if (named5 && ts39.isNamespaceImport(named5)) {
304177
+ if (named5 && ts40.isNamespaceImport(named5)) {
304089
304178
  names2.push("*");
304090
304179
  bindings.set(named5.name.text, { module, member: "*" });
304091
304180
  }
304092
- if (named5 && ts39.isNamedImports(named5)) for (const el2 of named5.elements) {
304181
+ if (named5 && ts40.isNamedImports(named5)) for (const el2 of named5.elements) {
304093
304182
  const imported = (el2.propertyName ?? el2.name).text;
304094
304183
  names2.push(imported);
304095
304184
  bindings.set(el2.name.text, { module, member: imported });
@@ -304098,19 +304187,19 @@ function analyzeVeloSource(source2) {
304098
304187
  if (/^backend\//.test(module) && result.backendImports.length < MAX_ITEMS2) result.backendImports.push({ module, names: names2.filter((n2) => n2 !== "*" && n2 !== "default") });
304099
304188
  }
304100
304189
  const resolveCallee = (callee) => {
304101
- if (ts39.isIdentifier(callee)) {
304190
+ if (ts40.isIdentifier(callee)) {
304102
304191
  const b3 = bindings.get(callee.text);
304103
304192
  return b3 && b3.member !== "*" ? b3 : void 0;
304104
304193
  }
304105
- if (ts39.isPropertyAccessExpression(callee)) {
304194
+ if (ts40.isPropertyAccessExpression(callee)) {
304106
304195
  const member = callee.name.text;
304107
304196
  const target = callee.expression;
304108
- if (ts39.isIdentifier(target)) {
304197
+ if (ts40.isIdentifier(target)) {
304109
304198
  const b3 = bindings.get(target.text);
304110
304199
  if (!b3) return void 0;
304111
304200
  return { module: b3.module, member: b3.member === "*" ? member : `${b3.member}.${member}` };
304112
304201
  }
304113
- if (ts39.isPropertyAccessExpression(target) && ts39.isIdentifier(target.expression)) {
304202
+ if (ts40.isPropertyAccessExpression(target) && ts40.isIdentifier(target.expression)) {
304114
304203
  const b3 = bindings.get(target.expression.text);
304115
304204
  if (!b3) return void 0;
304116
304205
  return { module: b3.module, member: `${b3.member === "*" ? "" : `${b3.member}.`}${target.name.text}.${member}` };
@@ -304119,9 +304208,9 @@ function analyzeVeloSource(source2) {
304119
304208
  return void 0;
304120
304209
  };
304121
304210
  const visit = (node4) => {
304122
- if (ts39.isCallExpression(node4)) {
304211
+ if (ts40.isCallExpression(node4)) {
304123
304212
  const callee = node4.expression;
304124
- if (ts39.isPropertyAccessExpression(callee)) {
304213
+ if (ts40.isPropertyAccessExpression(callee)) {
304125
304214
  if (callee.name.text === "onPress") result.onPress++;
304126
304215
  else if (callee.name.text === "onClick") result.onClick++;
304127
304216
  }
@@ -304137,23 +304226,23 @@ function analyzeVeloSource(source2) {
304137
304226
  }
304138
304227
  }
304139
304228
  }
304140
- ts39.forEachChild(node4, visit);
304229
+ ts40.forEachChild(node4, visit);
304141
304230
  };
304142
304231
  visit(file2);
304143
304232
  return result;
304144
304233
  }
304145
304234
  function backendExportNames(stub) {
304146
- const file2 = ts39.createSourceFile("backend.js", stub, ts39.ScriptTarget.Latest, true, ts39.ScriptKind.JS);
304235
+ const file2 = ts40.createSourceFile("backend.js", stub, ts40.ScriptTarget.Latest, true, ts40.ScriptKind.JS);
304147
304236
  const names2 = /* @__PURE__ */ new Set();
304148
304237
  const visit = (node4) => {
304149
- if (ts39.isBinaryExpression(node4) && node4.operatorToken.kind === ts39.SyntaxKind.EqualsToken && ts39.isPropertyAccessExpression(node4.left) && ts39.isIdentifier(node4.left.expression) && node4.left.expression.text === "exports") names2.add(node4.left.name.text);
304150
- if ((ts39.isFunctionDeclaration(node4) || ts39.isVariableStatement(node4)) && ts39.canHaveModifiers(node4) && ts39.getModifiers(node4)?.some((m2) => m2.kind === ts39.SyntaxKind.ExportKeyword)) {
304151
- if (ts39.isFunctionDeclaration(node4) && node4.name) names2.add(node4.name.text);
304152
- if (ts39.isVariableStatement(node4)) {
304153
- for (const d2 of node4.declarationList.declarations) if (ts39.isIdentifier(d2.name)) names2.add(d2.name.text);
304238
+ if (ts40.isBinaryExpression(node4) && node4.operatorToken.kind === ts40.SyntaxKind.EqualsToken && ts40.isPropertyAccessExpression(node4.left) && ts40.isIdentifier(node4.left.expression) && node4.left.expression.text === "exports") names2.add(node4.left.name.text);
304239
+ if ((ts40.isFunctionDeclaration(node4) || ts40.isVariableStatement(node4)) && ts40.canHaveModifiers(node4) && ts40.getModifiers(node4)?.some((m2) => m2.kind === ts40.SyntaxKind.ExportKeyword)) {
304240
+ if (ts40.isFunctionDeclaration(node4) && node4.name) names2.add(node4.name.text);
304241
+ if (ts40.isVariableStatement(node4)) {
304242
+ for (const d2 of node4.declarationList.declarations) if (ts40.isIdentifier(d2.name)) names2.add(d2.name.text);
304154
304243
  }
304155
304244
  }
304156
- ts39.forEachChild(node4, visit);
304245
+ ts40.forEachChild(node4, visit);
304157
304246
  };
304158
304247
  visit(file2);
304159
304248
  return [...names2].slice(0, MAX_ITEMS2);
@@ -304169,7 +304258,7 @@ var init_widget_velo = __esm({
304169
304258
  MAX_ITEMS2 = 200;
304170
304259
  literal3 = (node4) => {
304171
304260
  if (!node4) return void 0;
304172
- if (ts39.isStringLiteral(node4) || ts39.isNoSubstitutionTemplateLiteral(node4)) return node4.text.slice(0, MAX_LITERAL);
304261
+ if (ts40.isStringLiteral(node4) || ts40.isNoSubstitutionTemplateLiteral(node4)) return node4.text.slice(0, MAX_LITERAL);
304173
304262
  return void 0;
304174
304263
  };
304175
304264
  }
@@ -304873,7 +304962,7 @@ var init_widget_inspect = __esm({
304873
304962
  // src/one-app/widget-tests.ts
304874
304963
  import { createHash as createHash106 } from "node:crypto";
304875
304964
  import { mkdirSync as mkdirSync72, readFileSync as readFileSync202, writeFileSync as writeFileSync83 } from "node:fs";
304876
- import { isAbsolute as isAbsolute22, join as join214, relative as relative38, resolve as resolve132 } from "node:path";
304965
+ import { isAbsolute as isAbsolute23, join as join214, relative as relative38, resolve as resolve132 } from "node:path";
304877
304966
  function runWidgetTests(options2) {
304878
304967
  const content = resolve132(options2.contentDir);
304879
304968
  const stamp = (options2.now?.() ?? (/* @__PURE__ */ new Date()).toISOString()).replace(/[^0-9A-Za-z]/g, "");
@@ -304883,7 +304972,7 @@ function runWidgetTests(options2) {
304883
304972
  const files = options2.files.map((f2) => {
304884
304973
  const abs = resolve132(content, f2);
304885
304974
  const rel2 = relative38(content, abs);
304886
- return rel2.startsWith("..") || isAbsolute22(rel2) ? abs : rel2;
304975
+ return rel2.startsWith("..") || isAbsolute23(rel2) ? abs : rel2;
304887
304976
  });
304888
304977
  const child3 = invokeNodeTests({ contentDir: content, evidenceDir: options2.evidenceDir, files, imports: options2.imports, reportPath: reportAbs, timeoutMs: options2.timeoutMs });
304889
304978
  const args = child3.args;
@@ -308006,7 +308095,7 @@ var init_analyze2 = __esm({
308006
308095
  // src/site-analyze/site-pages-apply.ts
308007
308096
  import { existsSync as existsSync173, readFileSync as readFileSync206 } from "node:fs";
308008
308097
  import { join as join218 } from "node:path";
308009
- import ts40 from "typescript";
308098
+ import ts41 from "typescript";
308010
308099
  function packageScreenIds(dir) {
308011
308100
  const dev = join218(dir, "dev", "index.ts");
308012
308101
  const config = join218(dir, "config.ts");
@@ -308019,20 +308108,20 @@ function packageScreenIds(dir) {
308019
308108
  }
308020
308109
  }
308021
308110
  function spliceWebsiteDrawer(source2, site, fileName = "config.ts") {
308022
- const file2 = ts40.createSourceFile(fileName, source2, ts40.ScriptTarget.Latest, true, ts40.ScriptKind.TS);
308111
+ const file2 = ts41.createSourceFile(fileName, source2, ts41.ScriptTarget.Latest, true, ts41.ScriptKind.TS);
308023
308112
  const objectOf2 = (literal4, name) => {
308024
308113
  if (!literal4) return void 0;
308025
308114
  const found = lookup(literal4, name);
308026
308115
  const value2 = found.kind === "written" ? unwrap(found.node.initializer) : void 0;
308027
- return value2 && ts40.isObjectLiteralExpression(value2) ? value2 : void 0;
308116
+ return value2 && ts41.isObjectLiteralExpression(value2) ? value2 : void 0;
308028
308117
  };
308029
308118
  const navigation = objectOf2(defineAppLiteral(file2), "navigation");
308030
308119
  if (!navigation) return { refused: "config.ts has no `navigation: { \u2026 }` object literal in its defineApp call" };
308031
308120
  const drawer = objectOf2(navigation, "drawer");
308032
308121
  const itemsProp = drawer ? lookup(drawer, "items") : void 0;
308033
308122
  const items = itemsProp?.kind === "written" ? unwrap(itemsProp.node.initializer) : void 0;
308034
- if (!items || !ts40.isArrayLiteralExpression(items)) return { refused: "`navigation.drawer.items` is not an array literal this step can rewrite" };
308035
- const commentAt = (pos) => (ts40.getLeadingCommentRanges(source2, pos) ?? []).length > 0;
308123
+ if (!items || !ts41.isArrayLiteralExpression(items)) return { refused: "`navigation.drawer.items` is not an array literal this step can rewrite" };
308124
+ const commentAt = (pos) => (ts41.getLeadingCommentRanges(source2, pos) ?? []).length > 0;
308036
308125
  if (items.elements.some((element) => commentAt(element.pos)) || commentAt(items.elements.end)) {
308037
308126
  return { refused: "`navigation.drawer.items` has comments between its rows, which rewriting the drawer would drop" };
308038
308127
  }
@@ -308121,7 +308210,7 @@ var init_customer_build = __esm({
308121
308210
 
308122
308211
  // src/site-analyze/apply.ts
308123
308212
  import { existsSync as existsSync174, readFileSync as readFileSync207, writeFileSync as writeFileSync85, copyFileSync as copyFileSync5, mkdirSync as mkdirSync74, realpathSync as realpathSync26, statSync as statSync57 } from "node:fs";
308124
- import { dirname as dirname94, isAbsolute as isAbsolute23, join as join219, resolve as resolve136, sep as sep36 } from "node:path";
308213
+ import { dirname as dirname94, isAbsolute as isAbsolute24, join as join219, resolve as resolve136, sep as sep36 } from "node:path";
308125
308214
  import { spawnSync as spawnSync15 } from "node:child_process";
308126
308215
  function inRepoBakeRefusal(repoRoot2, shell) {
308127
308216
  if (isBrandable(repoRoot2, shell)) return null;
@@ -308462,7 +308551,7 @@ function buildMergedContract(options2) {
308462
308551
  const branding = merged.branding ?? {};
308463
308552
  const staged = [];
308464
308553
  const contained = (root, rel2) => {
308465
- if (isAbsolute23(rel2)) return void 0;
308554
+ if (isAbsolute24(rel2)) return void 0;
308466
308555
  const full = resolve136(root, rel2);
308467
308556
  return full.startsWith(resolve136(root) + sep36) ? full : void 0;
308468
308557
  };
@@ -311040,7 +311129,7 @@ __export(check_report_exports, {
311040
311129
  import { createHash as createHash108, randomUUID as randomUUID20 } from "node:crypto";
311041
311130
  import { request as httpRequest2 } from "node:http";
311042
311131
  import { createConnection } from "node:net";
311043
- import { isAbsolute as isAbsolute24, relative as relative39, resolve as resolve138 } from "node:path";
311132
+ import { isAbsolute as isAbsolute25, relative as relative39, resolve as resolve138 } from "node:path";
311044
311133
  function credentialValue(value2) {
311045
311134
  const v2 = value2.trim();
311046
311135
  if (!v2 || /^(?:[01]|true|false|yes|no|on|off|null|none|undefined)$/i.test(v2)) return null;
@@ -311132,9 +311221,9 @@ function boundedText(value2, secrets) {
311132
311221
  return clean4.length <= MAX_TEXT4 ? clean4 : `${clean4.slice(0, MAX_TEXT4 - 1)}\u2026`;
311133
311222
  }
311134
311223
  function contentRelative(file2, contentDir2) {
311135
- const rel2 = isAbsolute24(file2) ? relative39(resolve138(contentDir2), file2) : file2;
311224
+ const rel2 = isAbsolute25(file2) ? relative39(resolve138(contentDir2), file2) : file2;
311136
311225
  const normal = rel2.split(/[\\/]+/).filter((part7) => part7 && part7 !== ".");
311137
- if (!normal.length || isAbsolute24(rel2) || normal.includes("..")) return void 0;
311226
+ if (!normal.length || isAbsolute25(rel2) || normal.includes("..")) return void 0;
311138
311227
  const joined = normal.join("/");
311139
311228
  return joined.length <= 256 ? joined : void 0;
311140
311229
  }
@@ -313116,7 +313205,7 @@ __export(ext_impl_exports, {
313116
313205
  });
313117
313206
  import { existsSync as existsSync181, mkdirSync as mkdirSync78, readFileSync as readFileSync212, writeFileSync as writeFileSync90 } from "node:fs";
313118
313207
  import { join as join228 } from "node:path";
313119
- import ts41 from "typescript";
313208
+ import ts42 from "typescript";
313120
313209
  async function runExt(ctx) {
313121
313210
  const { pos, flags, io: io2, print } = ctx;
313122
313211
  const fail19 = (code3, error, extra = {}, exit = 1) => {
@@ -313230,7 +313319,7 @@ function loadModelFor(extDir) {
313230
313319
  return { ok: true, model: iface.model };
313231
313320
  }
313232
313321
  function addExtensionToConfigSource(source2, name) {
313233
- const file2 = ts41.createSourceFile("config.ts", source2, ts41.ScriptTarget.ES2022, true, ts41.ScriptKind.TS);
313322
+ const file2 = ts42.createSourceFile("config.ts", source2, ts42.ScriptTarget.ES2022, true, ts42.ScriptKind.TS);
313234
313323
  const app2 = defineAppLiteral(file2);
313235
313324
  if (!app2) throw new Error("config.ts has no defineApp({ \u2026 }) literal");
313236
313325
  const existing = declaredExtensionsNode(app2);
@@ -313248,7 +313337,7 @@ function addExtensionToConfigSource(source2, name) {
313248
313337
  }
313249
313338
  function declaredExtensionsNode(app2) {
313250
313339
  for (const p2 of app2.properties) {
313251
- if (ts41.isPropertyAssignment(p2) && p2.name && (ts41.isIdentifier(p2.name) || ts41.isStringLiteral(p2.name)) && p2.name.text === "extensions" && ts41.isArrayLiteralExpression(p2.initializer)) return p2.initializer;
313340
+ if (ts42.isPropertyAssignment(p2) && p2.name && (ts42.isIdentifier(p2.name) || ts42.isStringLiteral(p2.name)) && p2.name.text === "extensions" && ts42.isArrayLiteralExpression(p2.initializer)) return p2.initializer;
313252
313341
  }
313253
313342
  return void 0;
313254
313343
  }