@wix/himalaya-cli 0.1519.0 → 0.1521.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
@@ -11758,10 +11758,10 @@ function appBindingIssues(root, ctx, appActions, isNavItemHidden = (at2) => /^to
11758
11758
  continue;
11759
11759
  }
11760
11760
  if ((ref.key === "itemsPath" || ref.key === "optionsPath") && ctx?.appState) {
11761
- const bound = initialValue(own3(ctx.appState, parsed.service), parsed.path);
11762
- if (bound !== void 0 && !Array.isArray(bound)) {
11761
+ const bound2 = initialValue(own3(ctx.appState, parsed.service), parsed.path);
11762
+ if (bound2 !== void 0 && !Array.isArray(bound2)) {
11763
11763
  issues.push({
11764
- ...issue2(`${ref.key} "${ref.value}" resolves to ${bound === null ? "null" : typeof bound} in the app service's INITIAL state, not an array \u2014 the list renders no rows`),
11764
+ ...issue2(`${ref.key} "${ref.value}" resolves to ${bound2 === null ? "null" : typeof bound2} in the app service's INITIAL state, not an array \u2014 the list renders no rows`),
11765
11765
  severity: ref.key === "itemsPath" || strict ? "error" : "warning"
11766
11766
  });
11767
11767
  }
@@ -12112,8 +12112,8 @@ function mountable(c2, inTemplate = false) {
12112
12112
  const pages2 = type === "Carousel" ? props.items : props.pages;
12113
12113
  const perPage = Array.isArray(pages2) ? pages2.map((p2) => isComponent(p2) ? mountable(p2) : 0) : [];
12114
12114
  const window2 = typeof props.liveWindow === "number" && props.liveWindow > 0 ? Math.floor(props.liveWindow) : 0;
12115
- const bound = type === "Carousel" && hasItemsPath(props);
12116
- if (bound) {
12115
+ const bound2 = type === "Carousel" && hasItemsPath(props);
12116
+ if (bound2) {
12117
12117
  const template = perPage[0] ?? 0;
12118
12118
  if (template === 0) return 0;
12119
12119
  return repeated(window2 > 0 ? template * (2 * window2 + 1) : Infinity);
@@ -12185,8 +12185,8 @@ function webViewEmbeddedFindings(descriptor) {
12185
12185
  });
12186
12186
  }
12187
12187
  if ((bridged || isPerInstance(props)) && !s2.inTemplate) {
12188
- const explicit = props.instanceId;
12189
- const effective = isLiteral(explicit) ? explicit : explicit === void 0 || explicit === "" ? effectiveWebViewInstanceId(screenId, void 0, s2.id) : null;
12188
+ const explicit2 = props.instanceId;
12189
+ const effective = isLiteral(explicit2) ? explicit2 : explicit2 === void 0 || explicit2 === "" ? effectiveWebViewInstanceId(screenId, void 0, s2.id) : null;
12190
12190
  if (effective !== null) {
12191
12191
  const first = seen.get(effective);
12192
12192
  if (first !== void 0) {
@@ -13300,8 +13300,8 @@ function deviceParityWithheldFrom(root) {
13300
13300
  function setDefaultEvaluator(evaluator) {
13301
13301
  defaultEvaluator = evaluator;
13302
13302
  }
13303
- function resolveEvaluator(explicit) {
13304
- const chosen = explicit ?? defaultEvaluator;
13303
+ function resolveEvaluator(explicit2) {
13304
+ const chosen = explicit2 ?? defaultEvaluator;
13305
13305
  if (!chosen) {
13306
13306
  throw new Error(
13307
13307
  "no RealmEvaluator installed \u2014 import validate-descriptor.js (node) or validate-descriptor.browser.js (browser), or pass `evaluator` explicitly"
@@ -13315,8 +13315,8 @@ function setBootEvaluator(evaluator) {
13315
13315
  function installedBootEvaluator() {
13316
13316
  return bootEvaluator;
13317
13317
  }
13318
- function resolveBootEvaluator(explicit) {
13319
- return explicit ?? bootEvaluator ?? resolveEvaluator();
13318
+ function resolveBootEvaluator(explicit2) {
13319
+ return explicit2 ?? bootEvaluator ?? resolveEvaluator();
13320
13320
  }
13321
13321
  function setActionEvaluator(evaluator) {
13322
13322
  actionEvaluator = evaluator;
@@ -13324,8 +13324,8 @@ function setActionEvaluator(evaluator) {
13324
13324
  function installedActionEvaluator() {
13325
13325
  return actionEvaluator;
13326
13326
  }
13327
- function resolveActionEvaluator(explicit) {
13328
- return explicit ?? actionEvaluator ?? resolveEvaluator();
13327
+ function resolveActionEvaluator(explicit2) {
13328
+ return explicit2 ?? actionEvaluator ?? resolveEvaluator();
13329
13329
  }
13330
13330
  function responseBytes(value) {
13331
13331
  try {
@@ -15129,13 +15129,13 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
15129
15129
  if (k2 === "itemsPath" && typeof val === "string") {
15130
15130
  const m2 = /^\$service:([A-Za-z0-9_-]+)\.([A-Za-z0-9_.[\]]+)/.exec(val);
15131
15131
  if (m2 && m2[1] in services) {
15132
- const bound = pathValue(services[m2[1]], m2[2]);
15133
- if (bound !== void 0 && !Array.isArray(bound)) {
15132
+ const bound2 = pathValue(services[m2[1]], m2[2]);
15133
+ if (bound2 !== void 0 && !Array.isArray(bound2)) {
15134
15134
  issues.push({
15135
15135
  severity: "error",
15136
15136
  pass: "bindings",
15137
15137
  path: here,
15138
- message: `itemsPath must bind to an array \u2014 $service:${m2[1]}.${m2[2]} is ${bound === null ? "null" : typeof bound} in the bundle's initial state; initialize it as [] (see the dynamic-list recipe: himi docs recipe-dynamic-list)`
15138
+ message: `itemsPath must bind to an array \u2014 $service:${m2[1]}.${m2[2]} is ${bound2 === null ? "null" : typeof bound2} in the bundle's initial state; initialize it as [] (see the dynamic-list recipe: himi docs recipe-dynamic-list)`
15139
15139
  });
15140
15140
  }
15141
15141
  }
@@ -15208,13 +15208,13 @@ function validateScreenDescriptor(screenId, descriptor, opts = {}) {
15208
15208
  if (OPTIONS_BINDING_PROPS.has(k2) && typeof val === "string") {
15209
15209
  const mm = /^\$service:([A-Za-z0-9_-]+)\.([A-Za-z0-9_.[\]]+)/.exec(val);
15210
15210
  if (mm && mm[1] in services) {
15211
- const bound = pathValue(services[mm[1]], mm[2]);
15212
- if (bound !== void 0 && !Array.isArray(bound)) {
15211
+ const bound2 = pathValue(services[mm[1]], mm[2]);
15212
+ if (bound2 !== void 0 && !Array.isArray(bound2)) {
15213
15213
  issues.push({
15214
15214
  severity: strict ? "error" : "warning",
15215
15215
  pass: "bindings",
15216
15216
  path: here,
15217
- message: `\`${k2}\` must bind to a list of options \u2014 $service:${mm[1]}.${mm[2]} is ${bound === null ? "null" : typeof bound} in the bundle's initial state, so the component renders no bound options on device (it silently keeps its static list). Initialize it as \`[]\` and populate it in an action (see the dynamic-list recipe: himi docs recipe-dynamic-list).`
15217
+ message: `\`${k2}\` must bind to a list of options \u2014 $service:${mm[1]}.${mm[2]} is ${bound2 === null ? "null" : typeof bound2} in the bundle's initial state, so the component renders no bound options on device (it silently keeps its static list). Initialize it as \`[]\` and populate it in an action (see the dynamic-list recipe: himi docs recipe-dynamic-list).`
15218
15218
  });
15219
15219
  }
15220
15220
  }
@@ -22307,6 +22307,7 @@ function resolveIdiom(tokens2, ctx = {}) {
22307
22307
  var IDIOM_CONTEXTS, UNSAFE_KEYS;
22308
22308
  var init_idiom = __esm({
22309
22309
  "../../core/ts/src/idiom.ts"() {
22310
+ "use strict";
22310
22311
  IDIOM_CONTEXTS = {
22311
22312
  ios: { native: ["ios"] },
22312
22313
  android: { native: ["material"] },
@@ -29785,8 +29786,8 @@ function resolveServeBase() {
29785
29786
  return (raw ?? "").replace(/\/$/, "");
29786
29787
  }
29787
29788
  function resolvePlaneControlReadBase() {
29788
- const explicit = process.env.HIMALAYA_PLAYER_CONTROL_URL;
29789
- if (explicit) return explicit.replace(/\/$/, "");
29789
+ const explicit2 = process.env.HIMALAYA_PLAYER_CONTROL_URL;
29790
+ if (explicit2) return explicit2.replace(/\/$/, "");
29790
29791
  const override = process.env.HIMALAYA_PLAYER_SERVE_URL;
29791
29792
  if (override) {
29792
29793
  const base = resolveServeBase();
@@ -31103,10 +31104,10 @@ function servicePath(binding2) {
31103
31104
  }
31104
31105
  function useResolvedScalar(v2, ctx) {
31105
31106
  const isService = typeof v2 === "string" && isBinding(v2) && v2.startsWith("$service:");
31106
- const bound = useBoundValue(ctx, isService ? v2 : "");
31107
+ const bound2 = useBoundValue(ctx, isService ? v2 : "");
31107
31108
  if (!isService) return resolveScalarStatic(v2, ctx);
31108
31109
  if (!ctx.provider) return void 0;
31109
- return bound ?? void 0;
31110
+ return bound2 ?? void 0;
31110
31111
  }
31111
31112
  function useBoundValue(ctx, binding2) {
31112
31113
  const path2 = servicePath(binding2);
@@ -31181,8 +31182,8 @@ var init_bindings2 = __esm({
31181
31182
  };
31182
31183
  BoundList = ({ ctx, itemsPath, template, renderRow }) => {
31183
31184
  const local = itemsPath.startsWith("$item.");
31184
- const bound = useBoundValue(ctx, local ? "" : itemsPath);
31185
- const arr2 = local ? ctx.itemScope?.[itemsPath.slice("$item.".length)] : bound;
31185
+ const bound2 = useBoundValue(ctx, local ? "" : itemsPath);
31186
+ const arr2 = local ? ctx.itemScope?.[itemsPath.slice("$item.".length)] : bound2;
31186
31187
  const items = Array.isArray(arr2) ? arr2 : [];
31187
31188
  return /* @__PURE__ */ jsx3(Fragment, { children: items.map((item, i2) => {
31188
31189
  const scope2 = item && typeof item === "object" ? { ...item, __index: i2 } : { value: item, __index: i2 };
@@ -31347,10 +31348,10 @@ function clampDateFieldValue(encoded2, minUnix, maxUnix, mode) {
31347
31348
  return String(clampDateUnix(Number(encoded2), minUnix, maxUnix, mode));
31348
31349
  }
31349
31350
  function clampDateUnix(unix, minUnix, maxUnix, mode) {
31350
- const onDay = (bound) => {
31351
- if (typeof bound !== "number") return null;
31352
- if (mode !== "time") return bound;
31353
- const b2 = new Date(bound * 1e3);
31351
+ const onDay = (bound2) => {
31352
+ if (typeof bound2 !== "number") return null;
31353
+ if (mode !== "time") return bound2;
31354
+ const b2 = new Date(bound2 * 1e3);
31354
31355
  const d2 = new Date(unix * 1e3);
31355
31356
  d2.setHours(b2.getHours(), b2.getMinutes(), b2.getSeconds(), 0);
31356
31357
  return Math.floor(d2.getTime() / 1e3);
@@ -33068,8 +33069,8 @@ var init_controls = __esm({
33068
33069
  rowShareFloor = (style, rowStretch, floor2) => rowStretch ? { ...style, minWidth: floor2 } : style;
33069
33070
  A11ySwitch = ({ props, ctx, wrap }) => {
33070
33071
  const C2 = ctx.color;
33071
- const bound = useResolvedScalar(props.valuePath, ctx);
33072
- const resolved2 = ctx.empty ? false : props.valuePath != null ? encodeToggleFieldValue(bound) === "true" : encodeToggleFieldValue(props.value, props.on === true) === "true";
33072
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
33073
+ const resolved2 = ctx.empty ? false : props.valuePath != null ? encodeToggleFieldValue(bound2) === "true" : encodeToggleFieldValue(props.value, props.on === true) === "true";
33073
33074
  const bag = React7.useContext(FormValuesContext);
33074
33075
  const fieldId = props.__formFieldId;
33075
33076
  const inForm = Boolean(bag && fieldId);
@@ -33080,7 +33081,7 @@ var init_controls = __esm({
33080
33081
  setFormOn(null);
33081
33082
  }, [resolved2]);
33082
33083
  const toggleServiceBound = typeof props.valuePath === "string" && props.valuePath.startsWith("$service:");
33083
- const toggleReady = !toggleServiceBound || bound !== void 0;
33084
+ const toggleReady = !toggleServiceBound || bound2 !== void 0;
33084
33085
  React7.useEffect(() => {
33085
33086
  if (!bag || !fieldId) return;
33086
33087
  if (!toggleReady && !hasContributed(bag, fieldId)) return;
@@ -33144,18 +33145,18 @@ var init_controls = __esm({
33144
33145
  const min = props.min ?? 0, max = props.max ?? 1;
33145
33146
  const boundValue = useResolvedScalar(props.valuePath, ctx);
33146
33147
  const raw = props.valuePath != null ? boundValue : props.value;
33147
- const bound = typeof raw === "number" ? raw : (min + max) / 2;
33148
+ const bound2 = typeof raw === "number" ? raw : (min + max) / 2;
33148
33149
  const tint = C2(props.tint ?? "accentPrimary", "#116DFF");
33149
33150
  const step = typeof props.step === "number" && props.step > 0 ? props.step : (max - min) / 100 || 0.01;
33150
33151
  const range = props.range === true && typeof props.upperValue === "number";
33151
- const [val, setVal] = React7.useState(bound);
33152
- const latestValue = React7.useRef(bound);
33152
+ const [val, setVal] = React7.useState(bound2);
33153
+ const latestValue = React7.useRef(bound2);
33153
33154
  const dragging = React7.useRef(false);
33154
33155
  React7.useEffect(() => {
33155
33156
  if (dragging.current) return;
33156
- latestValue.current = bound;
33157
- setVal(bound);
33158
- }, [bound]);
33157
+ latestValue.current = bound2;
33158
+ setVal(bound2);
33159
+ }, [bound2]);
33159
33160
  const lastEmit = React7.useRef(void 0);
33160
33161
  const canFire = !!(ctx.onAction && props.onChange && !props.disabled);
33161
33162
  const commit = (nv) => {
@@ -33166,10 +33167,10 @@ var init_controls = __esm({
33166
33167
  ctx.onAction({ ...act, args: { ...act.args ?? {}, value: nv } });
33167
33168
  };
33168
33169
  const clampPct = (n2) => max > min ? Math.max(0, Math.min(1, (n2 - min) / (max - min))) : 0;
33169
- const [pair, setPair] = React7.useState(() => [Math.min(bound, props.upperValue ?? bound), Math.max(bound, props.upperValue ?? bound)]);
33170
+ const [pair, setPair] = React7.useState(() => [Math.min(bound2, props.upperValue ?? bound2), Math.max(bound2, props.upperValue ?? bound2)]);
33170
33171
  React7.useEffect(() => {
33171
- if (range) setPair([Math.min(bound, props.upperValue), Math.max(bound, props.upperValue)]);
33172
- }, [range, bound, props.upperValue]);
33172
+ if (range) setPair([Math.min(bound2, props.upperValue), Math.max(bound2, props.upperValue)]);
33173
+ }, [range, bound2, props.upperValue]);
33173
33174
  if (range) {
33174
33175
  const [lo2, hi2] = pair;
33175
33176
  const thumbKey = (which) => (e2) => {
@@ -33406,8 +33407,8 @@ var init_controls = __esm({
33406
33407
  }
33407
33408
  return value;
33408
33409
  };
33409
- tabsActiveColorName = (raw, bound) => {
33410
- const name = typeof raw === "string" && isBinding(raw) ? bound : raw;
33410
+ tabsActiveColorName = (raw, bound2) => {
33411
+ const name = typeof raw === "string" && isBinding(raw) ? bound2 : raw;
33411
33412
  return typeof name === "string" && name.trim() ? name.trim() : void 0;
33412
33413
  };
33413
33414
  swipeTabPage = (pages2, tabId) => {
@@ -35021,6 +35022,448 @@ var init_pdfFetch = __esm({
35021
35022
  }
35022
35023
  });
35023
35024
 
35025
+ // ../../core/web-renderer/src/webviewBridge.ts
35026
+ function canonicalJson2(value, path2 = /* @__PURE__ */ new Set()) {
35027
+ if (value === null || typeof value === "boolean" || typeof value === "string") return JSON.stringify(value);
35028
+ if (typeof value === "number") {
35029
+ if (!Number.isFinite(value)) throw new TypeError(`canonicalJson: ${value} is not representable in JSON`);
35030
+ return String(value);
35031
+ }
35032
+ if (typeof value !== "object") throw new TypeError(`canonicalJson: a ${typeof value} is not JSON data`);
35033
+ if (path2.has(value)) throw new TypeError("canonicalJson: a cyclic value is not JSON data");
35034
+ path2.add(value);
35035
+ try {
35036
+ if (Array.isArray(value)) {
35037
+ const parts = [];
35038
+ for (let i2 = 0; i2 < value.length; i2++) {
35039
+ if (!(i2 in value) || value[i2] === void 0) throw new TypeError(`canonicalJson: array element ${i2} is not JSON data`);
35040
+ parts.push(canonicalJson2(value[i2], path2));
35041
+ }
35042
+ return `[${parts.join(",")}]`;
35043
+ }
35044
+ const proto = Object.getPrototypeOf(value);
35045
+ if (proto !== Object.prototype && proto !== null) throw new TypeError("canonicalJson: not a plain object");
35046
+ const rec = value;
35047
+ const keys = Object.keys(rec).filter((k2) => rec[k2] !== void 0).sort(byCodeUnit2);
35048
+ return `{${keys.map((k2) => `${JSON.stringify(k2)}:${canonicalJson2(rec[k2], path2)}`).join(",")}}`;
35049
+ } finally {
35050
+ path2.delete(value);
35051
+ }
35052
+ }
35053
+ function canonicalScreenArgs2(args) {
35054
+ if (!args) return "";
35055
+ return Object.keys(args).filter((k2) => args[k2] !== void 0).sort(byCodeUnit2).map((k2) => `${encodeURIComponent(k2)}=${encodeURIComponent(canonicalJson2(args[k2]))}`).join("&");
35056
+ }
35057
+ function effectiveWebViewInstanceId2(screenId, args, componentId, explicitInstanceId) {
35058
+ if (typeof explicitInstanceId === "string" && explicitInstanceId !== "") return explicitInstanceId;
35059
+ return `${screenId}?${canonicalScreenArgs2(args)}/${componentId}`;
35060
+ }
35061
+ function webViewBridgePlan(input) {
35062
+ if (input.inlineHtml != null && input.inlineHtml !== "") return { bridged: false, reason: "web_srcdoc_unbridged" };
35063
+ const pageOrigin = input.pageOrigin === void 0 ? currentOrigin() : input.pageOrigin;
35064
+ const target = input.url ? classifyEmbedUrl(input.url, pageOrigin) : null;
35065
+ if (!target || !target.crossOrigin || target.protocol !== "https:" && target.protocol !== "http:") {
35066
+ return { bridged: false, reason: "web_url_same_origin_unbridged" };
35067
+ }
35068
+ const origin = new URL(target.href).origin;
35069
+ if (input.allowedOrigins.length === 0 || !webViewOriginAllowed(input.url ?? "", input.allowedOrigins)) {
35070
+ return { bridged: false, reason: "web_url_not_app_controlled" };
35071
+ }
35072
+ return { bridged: true, trustOrigin: origin };
35073
+ }
35074
+ function webViewBridgeLimits(security) {
35075
+ const sec = security && typeof security === "object" ? security : {};
35076
+ const base = sec.profile === "app_content" ? APP_CONTENT_LIMITS : FLOOR_LIMITS;
35077
+ return {
35078
+ maxCalls: explicit(sec.rateLimitMaxCalls, base.maxCalls),
35079
+ windowMs: explicit(sec.rateLimitWindowMs, base.windowMs),
35080
+ maxStringLength: explicit(sec.maxArgStringLength, base.maxStringLength),
35081
+ maxDepth: explicit(sec.maxArgDepth, base.maxDepth),
35082
+ maxBytes: explicit(sec.maxMessageBytes, base.maxBytes),
35083
+ allowsLineBreaks: base.allowsLineBreaks
35084
+ };
35085
+ }
35086
+ function admitRaw(raw, limits, callTimes, now) {
35087
+ while (callTimes.length > 0 && callTimes[0] < now - limits.windowMs) callTimes.shift();
35088
+ if (callTimes.length >= limits.maxCalls) return "rate_limit";
35089
+ callTimes.push(now);
35090
+ if (utf83(raw) > limits.maxBytes) return "too_large";
35091
+ return null;
35092
+ }
35093
+ function containsUnsafe(s2, allowsLineBreaks) {
35094
+ const lower = s2.toLowerCase();
35095
+ if (lower.includes("<script") || lower.includes("</script")) return true;
35096
+ for (let i2 = 0; i2 < s2.length; i2++) {
35097
+ const c2 = s2.charCodeAt(i2);
35098
+ if (c2 === 9 || allowsLineBreaks && (c2 === 10 || c2 === 13)) continue;
35099
+ if (c2 < 32 || c2 === 127) return true;
35100
+ if (c2 >= 8234 && c2 <= 8238 || c2 >= 8294 && c2 <= 8297) return true;
35101
+ }
35102
+ return false;
35103
+ }
35104
+ function argsClean(value, depth, limits) {
35105
+ if (depth > limits.maxDepth) return false;
35106
+ if (typeof value === "string") return value.length <= limits.maxStringLength && !containsUnsafe(value, limits.allowsLineBreaks);
35107
+ if (Array.isArray(value)) return value.every((v2) => argsClean(v2, depth + 1, limits));
35108
+ if (value && typeof value === "object") return Object.values(value).every((v2) => argsClean(v2, depth + 1, limits));
35109
+ return true;
35110
+ }
35111
+ function judged(payload) {
35112
+ if (typeof payload !== "string") return payload;
35113
+ try {
35114
+ return JSON.parse(payload);
35115
+ } catch {
35116
+ return payload;
35117
+ }
35118
+ }
35119
+ function pagePayloadJson(payload) {
35120
+ if (payload === void 0 || payload === null) return "null";
35121
+ return typeof payload === "string" ? payload : JSON.stringify(payload);
35122
+ }
35123
+ function scrubKind(kind) {
35124
+ return kind.slice(0, 64).replace(/[\u0000-\u001f\u007f\u202a-\u202e\u2066-\u2069]/g, "");
35125
+ }
35126
+ function isConsoleEnvelope(payload) {
35127
+ const j2 = judged(payload);
35128
+ return !!j2 && typeof j2 === "object" && !Array.isArray(j2) && j2.sys === "console";
35129
+ }
35130
+ function consoleArgLength(limits) {
35131
+ return Math.min(limits.maxStringLength, Math.max(16, Math.floor(limits.maxBytes / (CONSOLE_MAX_ARGS * 6))));
35132
+ }
35133
+ function admitConsole(budget, now) {
35134
+ while (budget.consoleTimes.length > 0 && budget.consoleTimes[0] <= now - 1e3) budget.consoleTimes.shift();
35135
+ if (budget.consoleTimes.length >= CONSOLE_MAX_PER_SECOND) {
35136
+ budget.consoleDropped++;
35137
+ return false;
35138
+ }
35139
+ budget.consoleTimes.push(now);
35140
+ return true;
35141
+ }
35142
+ function lifecycleEnvelope(instanceId, state, detail) {
35143
+ return JSON.stringify(detail === void 0 ? { iid: instanceId, state, sys: "lifecycle", v: 1 } : { detail, iid: instanceId, state, sys: "lifecycle", v: 1 });
35144
+ }
35145
+ var byCodeUnit2, FLOOR_LIMITS, APP_CONTENT_LIMITS, explicit, utf83, CONSOLE_MAX_PER_SECOND, CONSOLE_MAX_ARGS, ANNOUNCE, PORT, HOST_CONTROL, MAX_HELD, MAX_REPORTED, WebViewBridgeSession;
35146
+ var init_webviewBridge = __esm({
35147
+ "../../core/web-renderer/src/webviewBridge.ts"() {
35148
+ init_webviewFrame();
35149
+ byCodeUnit2 = (a2, b2) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0;
35150
+ FLOOR_LIMITS = { maxCalls: 50, windowMs: 1e3, maxStringLength: 2048, maxDepth: 10, maxBytes: 1048576, allowsLineBreaks: false };
35151
+ APP_CONTENT_LIMITS = { maxCalls: 200, windowMs: 1e3, maxStringLength: 262144, maxDepth: 32, maxBytes: 4194304, allowsLineBreaks: true };
35152
+ explicit = (v2, base) => typeof v2 === "number" && Number.isFinite(v2) ? v2 : base;
35153
+ utf83 = (s2) => new TextEncoder().encode(s2).byteLength;
35154
+ CONSOLE_MAX_PER_SECOND = 20;
35155
+ CONSOLE_MAX_ARGS = 16;
35156
+ ANNOUNCE = "webview.announce";
35157
+ PORT = "webview.port";
35158
+ HOST_CONTROL = "webview.host";
35159
+ MAX_HELD = 64;
35160
+ MAX_REPORTED = 32;
35161
+ WebViewBridgeSession = class {
35162
+ constructor(opts) {
35163
+ this.opts = opts;
35164
+ this.active = opts.active !== false;
35165
+ this.muted = opts.muted === true;
35166
+ }
35167
+ registration = null;
35168
+ port = null;
35169
+ boundDoc = null;
35170
+ held = [];
35171
+ loaded = false;
35172
+ active;
35173
+ muted;
35174
+ stopped = false;
35175
+ everBound = false;
35176
+ boundTo = null;
35177
+ reported = /* @__PURE__ */ new Set();
35178
+ onWindowMessage = (event) => this.announce(event);
35179
+ get instanceId() {
35180
+ return this.opts.instanceId;
35181
+ }
35182
+ get bridged() {
35183
+ return this.opts.plan.bridged;
35184
+ }
35185
+ /** Whether a page document ever took a port from this session (it then holds it, and stops announcing). */
35186
+ get hasBoundPage() {
35187
+ return this.everBound;
35188
+ }
35189
+ /** The frame window whose page holds this session's latest port (`null` if none ever bound). */
35190
+ get boundWindow() {
35191
+ return this.boundTo;
35192
+ }
35193
+ /** Mount: register with the worker's hub, tell it `mounted` (with the reason when unbridged), and
35194
+ * start listening for the page's announce. */
35195
+ start() {
35196
+ const { channel: channel3, instanceId, plan } = this.opts;
35197
+ const registration = channel3.register(instanceId, (json8) => this.toPage(json8));
35198
+ this.registration = registration;
35199
+ channel3.deliverLifecycle(instanceId, registration.replacedLive ? lifecycleEnvelope(instanceId, "reloaded") : lifecycleEnvelope(instanceId, "mounted", plan.bridged ? { bridged: true } : { bridged: false, reason: plan.reason }));
35200
+ if (!this.active) channel3.deliverLifecycle(instanceId, lifecycleEnvelope(instanceId, "inactive"));
35201
+ if (plan.bridged) this.opts.win.addEventListener("message", this.onWindowMessage);
35202
+ }
35203
+ /** The iframe's `load`. Only the first one of a document epoch is `loaded`: an in-frame navigation
35204
+ * loads again, and that new document is announced (`reloaded`) when it binds its port. */
35205
+ frameLoaded() {
35206
+ if (this.stopped || this.loaded) return;
35207
+ this.loaded = true;
35208
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "loaded"));
35209
+ }
35210
+ /** `active_path` changed. */
35211
+ setActive(active) {
35212
+ if (this.stopped || active === this.active) return;
35213
+ this.active = active;
35214
+ this.control("active", active);
35215
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, active ? "active" : "inactive"));
35216
+ }
35217
+ /** `muted_path` changed: the page-side muted sweep, best effort. */
35218
+ setMuted(muted) {
35219
+ if (this.stopped || muted === this.muted) return;
35220
+ this.muted = muted;
35221
+ this.control("muted", muted);
35222
+ }
35223
+ /** `reload_key_path` changed: the caller remounts the iframe; this ends the old document. */
35224
+ reloaded() {
35225
+ if (this.stopped) return;
35226
+ this.closePort();
35227
+ this.boundDoc = null;
35228
+ this.held = [];
35229
+ this.loaded = false;
35230
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "reloaded"));
35231
+ }
35232
+ /** Unmount: close the port, unregister (THIS registration only) and tell the worker. */
35233
+ stop() {
35234
+ if (this.stopped) return;
35235
+ this.stopped = true;
35236
+ this.opts.win.removeEventListener("message", this.onWindowMessage);
35237
+ this.closePort();
35238
+ this.held = [];
35239
+ const still = this.registration?.unregister() ?? false;
35240
+ this.registration = null;
35241
+ if (still) this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "unmounted"));
35242
+ }
35243
+ // ── page handshake ──
35244
+ announce(event) {
35245
+ if (this.stopped || !this.opts.plan.bridged) return;
35246
+ const frame = this.opts.frameWindow();
35247
+ if (!frame || event.source !== frame) return;
35248
+ const data = event.data;
35249
+ if (!data || typeof data !== "object" || data.himalaya !== ANNOUNCE || data.v !== 1) return;
35250
+ const doc = typeof data.doc === "string" && data.doc.length > 0 && data.doc.length <= 64 ? data.doc : null;
35251
+ if (!doc) return;
35252
+ if (event.origin !== this.opts.plan.trustOrigin) {
35253
+ this.deny("untrusted_origin", `origin ${event.origin}`, "-");
35254
+ return;
35255
+ }
35256
+ if (doc === this.boundDoc) return;
35257
+ if (this.port) {
35258
+ this.closePort();
35259
+ this.loaded = false;
35260
+ this.opts.channel.deliverLifecycle(this.opts.instanceId, lifecycleEnvelope(this.opts.instanceId, "reloaded"));
35261
+ }
35262
+ const channel3 = this.opts.createChannel?.() ?? new MessageChannel();
35263
+ const port = channel3.port1;
35264
+ port.onmessage = (e2) => this.fromPage(e2.data);
35265
+ port.start?.();
35266
+ this.port = port;
35267
+ this.boundDoc = doc;
35268
+ this.everBound = true;
35269
+ this.boundTo = frame;
35270
+ const hello = {
35271
+ himalaya: PORT,
35272
+ v: 1,
35273
+ doc,
35274
+ active: this.active,
35275
+ muted: this.muted,
35276
+ console: this.opts.consoleForwarding ? { maxArgs: CONSOLE_MAX_ARGS, argLength: consoleArgLength(this.opts.limits) } : null
35277
+ };
35278
+ try {
35279
+ frame.postMessage(hello, this.opts.plan.trustOrigin, [channel3.port2]);
35280
+ } catch {
35281
+ this.closePort();
35282
+ this.boundDoc = null;
35283
+ return;
35284
+ }
35285
+ const held = this.held;
35286
+ this.held = [];
35287
+ for (const json8 of held) this.toPage(json8);
35288
+ }
35289
+ // ── page → worker ──
35290
+ fromPage(raw) {
35291
+ if (this.stopped || !this.port) return;
35292
+ const { channel: channel3, instanceId, limits } = this.opts;
35293
+ if (typeof raw !== "string") {
35294
+ this.deny("unsafe_args", "non-string");
35295
+ return;
35296
+ }
35297
+ const budget = channel3.budget(instanceId);
35298
+ const now = this.opts.now?.() ?? Date.now();
35299
+ const rejected = admitRaw(raw, limits, budget.callTimes, now);
35300
+ if (rejected) {
35301
+ this.deny(rejected, rejected);
35302
+ return;
35303
+ }
35304
+ let msg;
35305
+ try {
35306
+ msg = JSON.parse(raw);
35307
+ } catch {
35308
+ this.deny("unsafe_args", "unparsable");
35309
+ return;
35310
+ }
35311
+ if (!msg || typeof msg !== "object" || Array.isArray(msg)) {
35312
+ this.deny("unsafe_args", "not-object");
35313
+ return;
35314
+ }
35315
+ const kind = typeof msg.kind === "string" ? msg.kind : "";
35316
+ if (kind !== "worker.message") {
35317
+ const shown2 = scrubKind(kind);
35318
+ this.deny("bridged_action_path", `kind ${shown2}`, shown2);
35319
+ return;
35320
+ }
35321
+ const payload = msg.payload;
35322
+ const consoleLine = isConsoleEnvelope(payload);
35323
+ if (consoleLine && !this.opts.consoleForwarding) return;
35324
+ if (consoleLine && !admitConsole(budget, now)) return;
35325
+ if (consoleLine) budget.callTimes.pop();
35326
+ const parsed = typeof payload === "string" ? judged(payload) : void 0;
35327
+ if (!argsClean(msg, 0, limits) || parsed !== void 0 && parsed !== payload && !argsClean(parsed, 1, limits)) {
35328
+ this.deny("unsafe_args", "unsafe_args");
35329
+ return;
35330
+ }
35331
+ if (consoleLine) {
35332
+ const env = judged(payload);
35333
+ (this.opts.log ?? ((line) => console.info(line)))(`[himalaya.webview] [${typeof env.level === "string" ? env.level : "log"}] ${JSON.stringify(env.args ?? [])}`);
35334
+ }
35335
+ channel3.deliverMessage(instanceId, pagePayloadJson(payload));
35336
+ }
35337
+ // ── worker → page ──
35338
+ toPage(json8) {
35339
+ if (this.stopped || !this.opts.plan.bridged) return;
35340
+ if (!this.port) {
35341
+ if (this.held.length < MAX_HELD) this.held.push(json8);
35342
+ return;
35343
+ }
35344
+ try {
35345
+ this.port.postMessage(json8);
35346
+ } catch {
35347
+ }
35348
+ }
35349
+ control(op, value) {
35350
+ try {
35351
+ this.port?.postMessage({ himalaya: HOST_CONTROL, v: 1, op, value });
35352
+ } catch {
35353
+ }
35354
+ }
35355
+ closePort() {
35356
+ if (!this.port) return;
35357
+ this.port.onmessage = null;
35358
+ try {
35359
+ this.port.close();
35360
+ } catch {
35361
+ }
35362
+ this.port = null;
35363
+ }
35364
+ /** A refused page message. With `actionId` it is reported as `bridge_call_denied` (native reports the
35365
+ * origin gate and the action-path refusal); the caps (`rate_limit`, `too_large`, `unsafe_args`) are
35366
+ * only logged, as native logs them. Bounded per session either way. */
35367
+ deny(reason, key3, actionId) {
35368
+ const k2 = `${reason}:${key3}`;
35369
+ if (this.reported.size >= MAX_REPORTED || this.reported.has(k2)) return;
35370
+ this.reported.add(k2);
35371
+ if (actionId !== void 0) this.opts.channel.reportDenied(reason, this.opts.instanceId, actionId);
35372
+ else (this.opts.warn ?? ((line) => console.warn(line)))(`[himalaya.webview] message rejected: ${reason} (bridged) iid=${this.opts.instanceId}`);
35373
+ }
35374
+ };
35375
+ }
35376
+ });
35377
+
35378
+ // ../../core/web-renderer/src/webviewBridgeHost.tsx
35379
+ var webviewBridgeHost_exports = {};
35380
+ __export(webviewBridgeHost_exports, {
35381
+ default: () => WebViewBridgeHost
35382
+ });
35383
+ import React10 from "react";
35384
+ function WebViewBridgeHost(p2) {
35385
+ const { channel: channel3, props, ctx } = p2;
35386
+ const explicit2 = useResolvedScalar(props.instanceId, ctx);
35387
+ const explicitId = typeof explicit2 === "string" || typeof explicit2 === "number" ? String(explicit2) : "";
35388
+ const active = useResolvedScalar(bound(props.activePath), ctx) !== false;
35389
+ const muted = useResolvedScalar(bound(props.mutedPath), ctx) === true;
35390
+ const cfg = props.config && typeof props.config === "object" ? props.config : {};
35391
+ const consoleForwarding = cfg.consoleForwarding === true;
35392
+ const security = JSON.stringify(cfg.bridgeSecurity ?? null);
35393
+ const screenArgs = JSON.stringify(ctx.screenArgs ?? null);
35394
+ const source = p2.htmlStr != null ? "\0html" : p2.urlStr ?? "";
35395
+ const origins = p2.allowedOrigins.join("\n");
35396
+ const sessionRef = React10.useRef(null);
35397
+ const live3 = React10.useRef({ active, muted });
35398
+ live3.current = { active, muted };
35399
+ React10.useEffect(() => {
35400
+ if (typeof window === "undefined") return;
35401
+ if (p2.urlStr == null && p2.htmlStr == null) return;
35402
+ let instanceId;
35403
+ try {
35404
+ instanceId = effectiveWebViewInstanceId2(ctx.screenId ?? "", ctx.screenArgs, p2.nodeId ?? "", explicitId || void 0);
35405
+ } catch {
35406
+ return;
35407
+ }
35408
+ const session = new WebViewBridgeSession({
35409
+ instanceId,
35410
+ channel: channel3,
35411
+ plan: webViewBridgePlan({ url: p2.urlStr, inlineHtml: p2.htmlStr, allowedOrigins: p2.allowedOrigins }),
35412
+ limits: webViewBridgeLimits(cfg.bridgeSecurity),
35413
+ consoleForwarding,
35414
+ win: window,
35415
+ frameWindow: () => p2.frameRef.current?.contentWindow ?? null,
35416
+ active: live3.current.active,
35417
+ muted: live3.current.muted
35418
+ });
35419
+ session.start();
35420
+ sessionRef.current = session;
35421
+ p2.load.onLoad = () => session.frameLoaded();
35422
+ const frame = p2.frameRef.current;
35423
+ if (frame && p2.load.boundFrame === frame) {
35424
+ p2.load.boundFrame = null;
35425
+ p2.load.loaded = false;
35426
+ if (frame.getAttribute("src")) frame.setAttribute("src", frame.getAttribute("src"));
35427
+ } else if (p2.load.loaded) {
35428
+ session.frameLoaded();
35429
+ }
35430
+ return () => {
35431
+ const current = p2.frameRef.current;
35432
+ p2.load.boundFrame = session.hasBoundPage && current && current.contentWindow === session.boundWindow ? current : null;
35433
+ session.stop();
35434
+ if (sessionRef.current === session) sessionRef.current = null;
35435
+ p2.load.onLoad = void 0;
35436
+ };
35437
+ }, [channel3, ctx.screenId, screenArgs, p2.nodeId, explicitId, source, origins, security, consoleForwarding]);
35438
+ React10.useEffect(() => {
35439
+ sessionRef.current?.setActive(active);
35440
+ }, [active]);
35441
+ React10.useEffect(() => {
35442
+ sessionRef.current?.setMuted(muted);
35443
+ }, [muted]);
35444
+ const first = React10.useRef(true);
35445
+ useLayoutEffectInBrowser(() => {
35446
+ if (first.current) {
35447
+ first.current = false;
35448
+ return;
35449
+ }
35450
+ p2.load.loaded = false;
35451
+ sessionRef.current?.reloaded();
35452
+ }, [p2.reloadKey, p2.htmlStr]);
35453
+ return null;
35454
+ }
35455
+ var useLayoutEffectInBrowser, bound;
35456
+ var init_webviewBridgeHost = __esm({
35457
+ "../../core/web-renderer/src/webviewBridgeHost.tsx"() {
35458
+ "use strict";
35459
+ init_bindings2();
35460
+ init_helpers();
35461
+ init_webviewBridge();
35462
+ useLayoutEffectInBrowser = typeof globalThis.document === "undefined" ? React10.useEffect : React10.useLayoutEffect;
35463
+ bound = (v2) => typeof v2 === "string" && isBinding(v2) ? v2 : void 0;
35464
+ }
35465
+ });
35466
+
35024
35467
  // ../../core/web-renderer/src/pdfPainter.ts
35025
35468
  async function paintPdfDocument(document2, container, width = container.clientWidth || 600, startPage = 1, zoomPercent = 100, isCurrent = () => true, onPageCount) {
35026
35469
  if (!isCurrent()) return document2.numPages;
@@ -115629,7 +116072,7 @@ __export(pdfDocument_exports, {
115629
116072
  PdfDocument: () => PdfDocument,
115630
116073
  destroyPdfDocumentLoad: () => destroyPdfDocumentLoad
115631
116074
  });
115632
- import React10 from "react";
116075
+ import React11 from "react";
115633
116076
  import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
115634
116077
  async function loadPdfDocument(src, ownerDocument) {
115635
116078
  const [pdfjs, pdfWorkerAsset] = await Promise.all([
@@ -115648,18 +116091,18 @@ async function destroyPdfDocumentLoad(loading) {
115648
116091
  }
115649
116092
  }
115650
116093
  function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, style, onPageCount, onFallback, loadDocument = loadPdfDocument }) {
115651
- const [pages2, setPages] = React10.useState(0);
115652
- const [failedRequest, setFailedRequest] = React10.useState(null);
116094
+ const [pages2, setPages] = React11.useState(0);
116095
+ const [failedRequest, setFailedRequest] = React11.useState(null);
115653
116096
  const request = JSON.stringify([src, zoomPercent]);
115654
116097
  const failed3 = failedRequest === request;
115655
- const containerRef = React10.useRef(null);
115656
- const frameRef = React10.useRef(null);
115657
- const startPageRef = React10.useRef(startPage);
116098
+ const containerRef = React11.useRef(null);
116099
+ const frameRef = React11.useRef(null);
116100
+ const startPageRef = React11.useRef(startPage);
115658
116101
  startPageRef.current = startPage;
115659
- React10.useEffect(() => {
116102
+ React11.useEffect(() => {
115660
116103
  if (failed3) onFallback?.();
115661
116104
  }, [failed3, onFallback]);
115662
- React10.useEffect(() => {
116105
+ React11.useEffect(() => {
115663
116106
  const frame2 = frameRef.current;
115664
116107
  const page = Math.min(pages2, Math.max(1, Math.floor(startPage ?? 1) || 1));
115665
116108
  const canvas = pages2 ? containerRef.current?.querySelector(`[data-pdf-page="${page}"]`) : null;
@@ -115668,7 +116111,7 @@ function PdfDocument({ src, nativeSrc, title, height, startPage, zoomPercent, st
115668
116111
  const scale = frame2.offsetHeight > 0 && box.height > 0 ? box.height / frame2.offsetHeight : 1;
115669
116112
  frame2.scrollTop += (canvas.getBoundingClientRect().top - box.top) / scale;
115670
116113
  }, [startPage, pages2]);
115671
- React10.useEffect(() => {
116114
+ React11.useEffect(() => {
115672
116115
  let live3 = true;
115673
116116
  let loading;
115674
116117
  const container = containerRef.current;
@@ -115730,7 +116173,7 @@ var init_pdfDocument = __esm({
115730
116173
  });
115731
116174
 
115732
116175
  // ../../core/web-renderer/src/renderNode.tsx
115733
- import React11 from "react";
116176
+ import React12 from "react";
115734
116177
  import { createPortal } from "react-dom";
115735
116178
  import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
115736
116179
  function boundTokenName(path2, fallback, ctx) {
@@ -115778,6 +116221,7 @@ function makeCtx(tokens2, scheme = "light", opts = {}) {
115778
116221
  emitTelemetry: opts.emitTelemetry,
115779
116222
  assetBaseUrl: opts.assetBaseUrl,
115780
116223
  runtimeDegraded: opts.runtimeDegraded,
116224
+ screenArgs: opts.screenArgs,
115781
116225
  previewSurface: opts.previewSurface,
115782
116226
  debugUnknownComponents: opts.debugUnknownComponents,
115783
116227
  appId: opts.appId,
@@ -115822,8 +116266,8 @@ function isNumericLike(s2) {
115822
116266
  return NUMERIC_TEXT.test(s2.trim());
115823
116267
  }
115824
116268
  function useValueSwap(value, enabled) {
115825
- const prev = React11.useRef(value);
115826
- const gen = React11.useRef(0);
116269
+ const prev = React12.useRef(value);
116270
+ const gen = React12.useRef(0);
115827
116271
  if (prev.current !== value) {
115828
116272
  if (enabled && prev.current !== void 0 && value !== void 0) gen.current += 1;
115829
116273
  prev.current = value;
@@ -115891,9 +116335,9 @@ function revealOnFocusStyle(C2) {
115891
116335
  };
115892
116336
  }
115893
116337
  function FormFieldLabelIdScope({ render, fieldKey, ...extras }) {
115894
- const id = React11.useId().replace(/[^A-Za-z0-9_-]/g, "");
116338
+ const id = React12.useId().replace(/[^A-Za-z0-9_-]/g, "");
115895
116339
  const el2 = render(`${fieldKey ? `${fieldKey}-` : ""}auto-${id}`);
115896
- return Object.keys(extras).length ? React11.cloneElement(el2, extras) : el2;
116340
+ return Object.keys(extras).length ? React12.cloneElement(el2, extras) : el2;
115897
116341
  }
115898
116342
  function formFieldA11y(props) {
115899
116343
  const labelledBy = props.__labelledBy;
@@ -116628,9 +117072,9 @@ function sectionSlot(raw) {
116628
117072
  }
116629
117073
  }
116630
117074
  function useLoadingTiming(target, graceMs, floorMs) {
116631
- const [shown2, setShown] = React11.useState(() => target === "loading" && graceMs > 0 ? "pending" : target);
116632
- const loadingSince = React11.useRef(shown2 === "loading" ? Date.now() : null);
116633
- React11.useEffect(() => {
117075
+ const [shown2, setShown] = React12.useState(() => target === "loading" && graceMs > 0 ? "pending" : target);
117076
+ const loadingSince = React12.useRef(shown2 === "loading" ? Date.now() : null);
117077
+ React12.useEffect(() => {
116634
117078
  if (target === shown2) return void 0;
116635
117079
  if (target === "loading") {
116636
117080
  if (graceMs <= 0) {
@@ -116669,8 +117113,8 @@ function autoGrowBox(contentHeight, lineHeight, verticalPadding, maxLines) {
116669
117113
  function PreviewMenuOverlay({ label: label3, dialogRef, preview, ctx, onClose, anchorHost, children }) {
116670
117114
  const host = anchorHost?.closest(`[${MODAL_SCOPE_ATTR}]`) ?? (typeof document !== "undefined" ? document.body : null);
116671
117115
  const reduce = ctx.reduceMotion();
116672
- const [shown2, setShown] = React11.useState(reduce);
116673
- React11.useEffect(() => {
117116
+ const [shown2, setShown] = React12.useState(reduce);
117117
+ React12.useEffect(() => {
116674
117118
  if (reduce || typeof requestAnimationFrame !== "function") {
116675
117119
  setShown(true);
116676
117120
  return;
@@ -116679,7 +117123,7 @@ function PreviewMenuOverlay({ label: label3, dialogRef, preview, ctx, onClose, a
116679
117123
  return () => cancelAnimationFrame(raf);
116680
117124
  }, [reduce]);
116681
117125
  const inScope = host != null && host !== host.ownerDocument.body;
116682
- const previewCtx = React11.useMemo(() => ctx.onAction ? { ...ctx, onAction: (a2) => {
117126
+ const previewCtx = React12.useMemo(() => ctx.onAction ? { ...ctx, onAction: (a2) => {
116683
117127
  onClose();
116684
117128
  ctx.onAction(a2);
116685
117129
  } } : ctx, [ctx, onClose]);
@@ -116746,7 +117190,7 @@ function youtubeId(item) {
116746
117190
  }
116747
117191
  }
116748
117192
  function useResolvedMediaItems(items, ctx) {
116749
- const paths = React11.useMemo(() => {
117193
+ const paths = React12.useMemo(() => {
116750
117194
  const set = /* @__PURE__ */ new Set();
116751
117195
  for (const it2 of items) {
116752
117196
  if (!it2 || typeof it2 !== "object") continue;
@@ -116758,17 +117202,17 @@ function useResolvedMediaItems(items, ctx) {
116758
117202
  return [...set];
116759
117203
  }, [items]);
116760
117204
  const key3 = paths.join("\0");
116761
- const [values, setValues] = React11.useState(() => {
117205
+ const [values, setValues] = React12.useState(() => {
116762
117206
  const seed2 = {};
116763
117207
  if (ctx.provider) for (const p2 of paths) seed2[p2] = ctx.provider.value(p2);
116764
117208
  return seed2;
116765
117209
  });
116766
- React11.useEffect(() => {
117210
+ React12.useEffect(() => {
116767
117211
  if (!ctx.provider || paths.length === 0) return;
116768
117212
  const unsubs = paths.map((p2) => ctx.provider.subscribe(p2, (v2) => setValues((prev) => prev[p2] === v2 ? prev : { ...prev, [p2]: v2 })));
116769
117213
  return () => unsubs.forEach((u2) => u2());
116770
117214
  }, [ctx.provider, key3]);
116771
- return React11.useMemo(() => items.map((it2) => {
117215
+ return React12.useMemo(() => items.map((it2) => {
116772
117216
  if (!it2 || typeof it2 !== "object") return it2;
116773
117217
  let out2 = null;
116774
117218
  for (const f2 of MEDIA_ITEM_BINDABLE) {
@@ -116795,9 +117239,24 @@ function sourceZoomPercent(fragment) {
116795
117239
  const zoom = match ? Number(match[1]) : NaN;
116796
117240
  return Number.isFinite(zoom) && zoom > 0 ? zoom : void 0;
116797
117241
  }
117242
+ function webViewChannelOf(provider) {
117243
+ const host = provider;
117244
+ return host && typeof host.webViewChannel === "function" ? host.webViewChannel() : null;
117245
+ }
117246
+ function reloadKeyOf(v2) {
117247
+ if (v2 === void 0 || v2 === null) return null;
117248
+ if (typeof v2 === "object") {
117249
+ try {
117250
+ return JSON.stringify(v2);
117251
+ } catch {
117252
+ return "?";
117253
+ }
117254
+ }
117255
+ return String(v2);
117256
+ }
116798
117257
  function cloneWithKids(el2, props, kids3) {
116799
- if (kids3 === el2.props.children) return React11.cloneElement(el2, props);
116800
- return React11.cloneElement(el2, props, ...Array.isArray(kids3) ? kids3 : [kids3]);
117258
+ if (kids3 === el2.props.children) return React12.cloneElement(el2, props);
117259
+ return React12.cloneElement(el2, props, ...Array.isArray(kids3) ? kids3 : [kids3]);
116801
117260
  }
116802
117261
  function editA11yParts(node, edit) {
116803
117262
  if (Array.isArray(node)) {
@@ -116809,7 +117268,7 @@ function editA11yParts(node, edit) {
116809
117268
  });
116810
117269
  return changed ? out2 : node;
116811
117270
  }
116812
- if (!React11.isValidElement(node) || typeof node.type !== "string") return node;
117271
+ if (!React12.isValidElement(node) || typeof node.type !== "string") return node;
116813
117272
  const own6 = node.props;
116814
117273
  if (own6["data-component-id"] != null) return node;
116815
117274
  const part3 = own6[A11Y_PART];
@@ -116853,8 +117312,8 @@ function isNativeInteractiveElement(el2) {
116853
117312
  return typeof el2.type === "string" && (["button", "input", "select", "textarea"].includes(el2.type) || el2.type === "a" && typeof props.href === "string");
116854
117313
  }
116855
117314
  function hasInteractiveReactDescendant(el2) {
116856
- return React11.Children.toArray(el2.props.children).some((child) => {
116857
- if (!React11.isValidElement(child)) return false;
117315
+ return React12.Children.toArray(el2.props.children).some((child) => {
117316
+ if (!React12.isValidElement(child)) return false;
116858
117317
  if (isNativeInteractiveElement(child)) return true;
116859
117318
  const props = child.props;
116860
117319
  if (typeof child.type === "string" && typeof props.role === "string" && INTERACTIVE_ROLES.has(props.role)) return true;
@@ -116930,8 +117389,8 @@ function trackActivatorName(activator) {
116930
117389
  activatorNameObservers.set(activator, observer);
116931
117390
  }
116932
117391
  function TapActivator({ label: label3, state, tabIndex = 0, role = "button", hint, initialFocus }) {
116933
- const ref = React11.useRef(null);
116934
- const hintId = `hm-tap-hint${React11.useId()}`;
117392
+ const ref = React12.useRef(null);
117393
+ const hintId = `hm-tap-hint${React12.useId()}`;
116935
117394
  useIsomorphicLayoutEffect(() => {
116936
117395
  const el2 = ref.current;
116937
117396
  if (!el2 || label3) return;
@@ -116970,9 +117429,9 @@ function TapActivator({ label: label3, state, tabIndex = 0, role = "button", hin
116970
117429
  function withExtras(name, render) {
116971
117430
  const Wrapped = ({ props, ctx, wrap, nodeId, gap, ...pass }) => {
116972
117431
  const el2 = render({ props, ctx, wrap, nodeId, gap, nodeExtras: pass });
116973
- if (!React11.isValidElement(el2)) return /* @__PURE__ */ jsx11(Fragment4, { children: el2 });
117432
+ if (!React12.isValidElement(el2)) return /* @__PURE__ */ jsx11(Fragment4, { children: el2 });
116974
117433
  if (el2.props[NODE_EXTRAS_TARGET] === "bottom-drawer-panel") {
116975
- return React11.cloneElement(el2, { [NODE_EXTRAS_TARGET]: void 0 });
117434
+ return React12.cloneElement(el2, { [NODE_EXTRAS_TARGET]: void 0 });
116976
117435
  }
116977
117436
  const additive = addIntrinsicPadding(el2.props.style, wrap ?? {});
116978
117437
  const inferredDecorative = el2.props[INFERRED_DECORATIVE] === true;
@@ -116992,7 +117451,7 @@ function withExtras(name, render) {
116992
117451
  }, hasA11yParts ? editA11yParts(kids3, a11yPartEdit({}, false, () => {
116993
117452
  })) : kids3));
116994
117453
  }
116995
- return withCircleClipBorder(additive ? React11.cloneElement(el2, { style: additive }) : el2);
117454
+ return withCircleClipBorder(additive ? React12.cloneElement(el2, { style: additive }) : el2);
116996
117455
  }
116997
117456
  const prev = el2.props;
116998
117457
  const next = { ...pass };
@@ -117093,7 +117552,7 @@ function withExtras(name, render) {
117093
117552
  }
117094
117553
  return withCircleClipBorder(cloneWithKids(el2, next, kids3));
117095
117554
  }
117096
- return withCircleClipBorder(React11.cloneElement(el2, next));
117555
+ return withCircleClipBorder(React12.cloneElement(el2, next));
117097
117556
  };
117098
117557
  Wrapped.displayName = name;
117099
117558
  return Wrapped;
@@ -117201,7 +117660,7 @@ function overlayEdgeStyle(edge, gap) {
117201
117660
  }
117202
117661
  function useFlippedEdge(edge, open, bubbleRef, anchorRef, gap = TOOLTIP_GAP) {
117203
117662
  const initial = { edge, x: 0, y: 0, maxWidth: Infinity };
117204
- const [placed, setPlaced] = React11.useState(initial);
117663
+ const [placed, setPlaced] = React12.useState(initial);
117205
117664
  useIsomorphicLayoutEffect(() => {
117206
117665
  if (!open) {
117207
117666
  setPlaced((previous) => previous.edge === edge && previous.x === 0 && previous.y === 0 && previous.maxWidth === Infinity ? previous : initial);
@@ -117995,7 +118454,7 @@ function renderNodeInner(node, ctx) {
117995
118454
  }
117996
118455
  }
117997
118456
  const el2 = renderInner(node, ctx);
117998
- if (!React11.isValidElement(el2)) return el2;
118457
+ if (!React12.isValidElement(el2)) return el2;
117999
118458
  const extra = {};
118000
118459
  const material = node?.modifiers?.material;
118001
118460
  const materialName = typeof material === "string" ? material : material?.token ?? material?.name;
@@ -118158,10 +118617,10 @@ function renderNodeInner(node, ctx) {
118158
118617
  }
118159
118618
  {
118160
118619
  const mods = node?.modifiers;
118161
- const bound = mods ? boundPaddingInsets(mods, ctx) : {};
118162
- if (mods?.padding != null || bound.paddingTop != null || bound.paddingBottom != null) {
118620
+ const bound2 = mods ? boundPaddingInsets(mods, ctx) : {};
118621
+ if (mods?.padding != null || bound2.paddingTop != null || bound2.paddingBottom != null) {
118163
118622
  const style = extra.style ?? el2.props.style;
118164
- const modPad = { ...ctx.modStyle({ padding: mods?.padding, density: mods?.density }), ...bound };
118623
+ const modPad = { ...ctx.modStyle({ padding: mods?.padding, density: mods?.density }), ...bound2 };
118165
118624
  const composed2 = addIntrinsicPadding(style, modPad);
118166
118625
  if (composed2) extra.style = composed2;
118167
118626
  }
@@ -118174,8 +118633,8 @@ function renderNodeInner(node, ctx) {
118174
118633
  const finalStyle = extra.style ?? el2.props.style;
118175
118634
  if (!finalStyle?.position) extra.style = { ...finalStyle ?? {}, position: "relative" };
118176
118635
  }
118177
- let out2 = tapActivator ? React11.cloneElement(el2, extra, tapActivator, el2.props.children) : Object.keys(extra).length ? React11.cloneElement(el2, extra) : el2;
118178
- if (React11.isValidElement(out2)) out2 = withCircleClipBorder(out2);
118636
+ let out2 = tapActivator ? React12.cloneElement(el2, extra, tapActivator, el2.props.children) : Object.keys(extra).length ? React12.cloneElement(el2, extra) : el2;
118637
+ if (React12.isValidElement(out2)) out2 = withCircleClipBorder(out2);
118179
118638
  if (a11yHint && !tapActivator) {
118180
118639
  out2 = /* @__PURE__ */ jsx11(A11yHintDescription, { hint: a11yHint, idBase: componentId, children: out2 });
118181
118640
  }
@@ -118392,10 +118851,10 @@ function renderInner(node, ctx) {
118392
118851
  template: items[0],
118393
118852
  renderRow: (t2, ic) => {
118394
118853
  let row = renderNode(t2, asItem(ic));
118395
- if (boundStagger > 0 && React11.isValidElement(row)) {
118854
+ if (boundStagger > 0 && React12.isValidElement(row)) {
118396
118855
  const i2 = Number(ic.itemScope?.__index ?? 0);
118397
118856
  const prev = row.props.style ?? {};
118398
- row = React11.cloneElement(row, { style: { ...prev, animationDelay: `${i2 * boundStagger}ms` } });
118857
+ row = React12.cloneElement(row, { style: { ...prev, animationDelay: `${i2 * boundStagger}ms` } });
118399
118858
  }
118400
118859
  if (boundSwipe && ctx.onAction && !props.horizontal) {
118401
118860
  const leading = resolveSwipeActions(boundSwipe.leading, ic);
@@ -118455,7 +118914,7 @@ function renderInner(node, ctx) {
118455
118914
  if (swipe && ctx.onAction && !props.horizontal) {
118456
118915
  const leading = swipe.leading ?? [];
118457
118916
  const trailing = swipe.trailing ?? [];
118458
- const arr2 = React11.Children.toArray(rendered);
118917
+ const arr2 = React12.Children.toArray(rendered);
118459
118918
  body = arr2.map((child, i2) => /* @__PURE__ */ jsx11(
118460
118919
  SwipeRow,
118461
118920
  {
@@ -118513,8 +118972,8 @@ function renderInner(node, ctx) {
118513
118972
  const card2 = ctx.elevation("card");
118514
118973
  const elevation = card2 && ownSurface ? { border: card2.border } : card2;
118515
118974
  const wrapShadow = wrap.boxShadow;
118516
- const explicit = m2?.shadow != null || m2?.boxShadow != null || m2?.box_shadow != null;
118517
- const elevationShadow = !elevation ? wrapShadow : explicit ? elevationBoxShadow({ border: elevation.border, shadow: wrapShadow }) : [elevationBoxShadow(elevation), wrapShadow].filter(Boolean).join(", ") || void 0;
118975
+ const explicit2 = m2?.shadow != null || m2?.boxShadow != null || m2?.box_shadow != null;
118976
+ const elevationShadow = !elevation ? wrapShadow : explicit2 ? elevationBoxShadow({ border: elevation.border, shadow: wrapShadow }) : [elevationBoxShadow(elevation), wrapShadow].filter(Boolean).join(", ") || void 0;
118518
118977
  return /* @__PURE__ */ jsx11("div", { style: { display: "flex", flexDirection: "column", gap: props.spacing == null ? 8 : ctx.sp(props.spacing), padding: props.padding == null ? 12 : ctx.sp(props.padding), background: elevation?.tint ? mixColor(fill, elevation.tint.color, elevation.tint.alpha) : fill, borderRadius: ctx.radius(props.cornerRadius ?? "md", 10), overflow: "hidden", alignSelf: "stretch", ...props.alignment ? { alignItems: props.alignment === "center" ? "center" : props.alignment === "trailing" ? "flex-end" : "flex-start" } : {}, ...wrap, ...elevationShadow ? { boxShadow: elevationShadow } : {} }, children: kids2(props.children, ctx) });
118519
118978
  }
118520
118979
  case "SplitView":
@@ -118944,7 +119403,7 @@ function renderInner(node, ctx) {
118944
119403
  ] });
118945
119404
  // ───────────── embeddable WebView ─────────────
118946
119405
  case "WebView":
118947
- return /* @__PURE__ */ jsx11(WebViewNode, { props, ctx, wrap });
119406
+ return /* @__PURE__ */ jsx11(WebViewNode, { props, ctx, wrap, nodeId: resolvedComponentId(node.id, ctx) ?? "" });
118948
119407
  // ───────────── app intents + unknown ─────────────
118949
119408
  default: {
118950
119409
  const intent = pkg ? ctx.intents?.[`${pkg}.${type}`] : void 0;
@@ -118966,7 +119425,7 @@ function reportUnknownComponent(ctx, pkg, type) {
118966
119425
  function unknownComponentShowsDeveloperLabel(ctx) {
118967
119426
  return ctx.debugUnknownComponents ?? ctx.previewSurface != null;
118968
119427
  }
118969
- var rowValue, loadPdfFetch, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
119428
+ var rowValue, loadPdfFetch, WebViewBridgeHost2, useIsomorphicLayoutEffect, ResponsiveGrid, SPLIT_EXPANDED_MIN_WIDTH, SPLIT_COLUMN_GAP, ResponsiveSplitView, ABSOLUTE_URL_RE, appearKeyframesInjected, valueSwapKeyframesInjected, NUMERIC_TEXT, shimmerKeyframesInjected, pressStylesInjected, REVEAL_ON_FOCUS_ATTR, FOCUS_RING_CSS, focusStylesInjected, HLIST_CHILD_CSS, hListStylesInjected, listAnimateRuntimeInstalled, transitionKeyframesInjected, countUpRuntimeInjected, MEASURE_PREFIX, measureRuntimeInjected, revealRuntimeInjected, AMBIENT_HOST_STYLE, AmbientMotionBox, vectorAnimStylesInjected, scrollProgressRuntimeInjected, confettiRuntimeInjected, lottieRuntimeInjected, LOTTIE_RUNTIME_ATTRIBUTES, lottieAnims, riveRuntimeInjected, gradientKeyframesInjected, parallaxRuntimeInjected, spinKeyframesInjected, marqueeKeyframesInjected, alignItems, zJustifyItems, hAlignItems, bodyFont, kids2, rowKidCtx, rowKids, staggeredKids, asTextL10n, asFinalTextL10n, asBoundText, useBoundString, InterpolatedTextView, txt, selectFragmentCase, fragmentValueHash, fragmentSlotContent, FragmentSlotNode, RichContentEditorNode, MediaFieldNode, WorkerSubtreeNode, RichContentNode, resolveItemDeep2, resolveRowAction2, resolveSwipeActions, resolveModBindings, resolvedComponentId, directServiceBindings, withRootStyle, ReactiveDirectScalars, HiddenGate, ExitPresence, StatefulSectionNode, KEYBOARD_INPUT_MODES, AUTOCAPITALIZE_VALUES, ENTER_KEY_HINTS, AUTOGROW_CEILING, EditableField, MENU_ANCHOR_CONTROL, MenuNode, MENU_LONG_PRESS_MS, menuOpensOnLongPress, LoadMoreSentinel, FieldErrorNode, FormView, MediaSlotProvider, MEDIA_ITEM_BINDABLE, MediaPlayerView, VideoNode, PdfDocumentCanvas, PdfViewNode, WebViewNode, InteractivePicker, InteractiveDatePicker, InteractiveSearchField, InteractiveStepper, NODE_EXTRAS_TARGET, SYNTHETIC_TAP_ROLE, SYNTHETIC_TABINDEX, INFERRED_DECORATIVE, SELF_RENDERED_LEAF, ROLE_WHEN_NAMED, AUTHORED_ROLE, PENDING_RANGE, RANGE_ROLES, NODE_A11Y_ATTRS, INTERACTIVE_ROLES, ALWAYS_INTERACTIVE_COMPONENT_TYPES, TAP_ACTIVATOR_ATTR, TAP_GROUP_ATTR, NESTED_CONTROL_SELECTOR, VISUALLY_HIDDEN, NAME_SKIP_SELECTOR, activatorNameObservers, ACTIVATOR_STATE_ATTRS, controlNode, ToggleNode, SliderNode, SelectionControlNode, TabsNode, SegmentedControlNode, DisclosureGroupNode, GridNode, SplitViewNode, REVEAL_RELEASE_MS, REVEAL_FADE_MS, REVEAL_BUFFER, revealProgress, countWords, RevealText, TextNode, ImageNode, ANIMATION_LEAF, LottieNode, RiveNode, AvatarNode, IconNode, EMPTY_STATE_SPACING, EmptyStateNode, ButtonNode, OtpInputNode, ProgressBarNode, SnackbarNode, ACTIVITY_DEFAULT_NAME, ACTIVITY_RING_ARC, ActivityIndicatorNode, NATIVELY_TABBABLE, BottomSheetNode, BOTTOM_DRAWER_HOST_STACK_EVENT, ModalBottomSheetNode, BottomDrawerNode, PRESENTED_OVERLAY_ATTR, TooltipNode, PopoverNode, ChipsInputNode, ChipNode, TableNode, GaugeRing, GaugeNode, RATING_METRICS, ratingMetrics, RatingNode, AvatarStripNode, CHART_STROKE_CYCLE, chartStrokeAt, chartBarCenter, ChartNode, donutSliceOpacity, DonutChartNode, ShapeNode, LegendMarker, LegendNode, cellAlign, DataTableNode, voiceNoteState, voiceNoteDelivery, VOICE_NOTE_DEFAULT_BARS, clampBarCount, VoiceNoteNode, TimelineNode, PagingNode, WheelPickerNode, ColorPickerNode, FilterChipsNode, TILE_PX, MAX_MERCATOR_LAT, DEFAULT_TILE_MAX_ZOOM, CIRCLE_SEGMENTS, METRES_PER_DEG_LAT, MARKER_HIT_RADIUS, SHAPE_HIT_RADIUS, MapNode, CAROUSEL_SETTLE_MS, scrollCarouselTo, CarouselNode, BannerNode, CollapsingHeaderNode, UnsupportedOnSurface, CALENDAR_DATE_ONLY_RE, CAL_DEFAULT_MAX_DOTS, CAL_AGENDA_INITIAL_DAYS, CAL_AGENDA_PAGE_DAYS, CAL_DEFAULT_SNAP_MINUTES, CAL_UNASSIGNED_LANE_ID, MonthCalendarNode, TimeGridNode, AgendaNode, ARIA_ROLE, initialFocusScheduled, PRESENTED_SCOPE, focusRoots, A11yHintDescription, reportedUnknownComponents, UnknownComponentNode, WebRenderer;
118970
119429
  var init_renderNode = __esm({
118971
119430
  "../../core/web-renderer/src/renderNode.tsx"() {
118972
119431
  "use strict";
@@ -119015,11 +119474,12 @@ var init_renderNode = __esm({
119015
119474
  init_richContent();
119016
119475
  rowValue = (v2, ctx) => typeof v2 === "string" && v2.startsWith("$item") ? resolveScalarStatic(v2, ctx) : v2;
119017
119476
  loadPdfFetch = () => Promise.resolve().then(() => (init_pdfFetch(), pdfFetch_exports));
119018
- useIsomorphicLayoutEffect = typeof globalThis.document === "undefined" ? React11.useEffect : React11.useLayoutEffect;
119477
+ WebViewBridgeHost2 = React12.lazy(() => Promise.resolve().then(() => (init_webviewBridgeHost(), webviewBridgeHost_exports)));
119478
+ useIsomorphicLayoutEffect = typeof globalThis.document === "undefined" ? React12.useEffect : React12.useLayoutEffect;
119019
119479
  ResponsiveGrid = ({ base, medium, expanded, initialCols, seedWidth, spacing, extra, children }) => {
119020
- const [el2, setEl] = React11.useState(null);
119021
- const [cols, setCols] = React11.useState(initialCols);
119022
- React11.useEffect(() => {
119480
+ const [el2, setEl] = React12.useState(null);
119481
+ const [cols, setCols] = React12.useState(initialCols);
119482
+ React12.useEffect(() => {
119023
119483
  if (!el2) return;
119024
119484
  const measure2 = () => {
119025
119485
  const w2 = seededWidth(el2.clientWidth, seedWidth);
@@ -119045,9 +119505,9 @@ var init_renderNode = __esm({
119045
119505
  SPLIT_EXPANDED_MIN_WIDTH = 840;
119046
119506
  SPLIT_COLUMN_GAP = 16;
119047
119507
  ResponsiveSplitView = ({ primary, detail, primaryMaxWidth, initialWide, seedWidth, extra }) => {
119048
- const ref = React11.useRef(null);
119049
- const [wide, setWide] = React11.useState(initialWide);
119050
- React11.useEffect(() => {
119508
+ const ref = React12.useRef(null);
119509
+ const [wide, setWide] = React12.useState(initialWide);
119510
+ React12.useEffect(() => {
119051
119511
  const el2 = ref.current;
119052
119512
  if (!el2) return;
119053
119513
  const measure2 = () => {
@@ -119093,9 +119553,9 @@ var init_renderNode = __esm({
119093
119553
  revealRuntimeInjected = false;
119094
119554
  AMBIENT_HOST_STYLE = { display: "contents" };
119095
119555
  AmbientMotionBox = ({ spec, kind, children }) => {
119096
- const ref = React11.useRef(null);
119556
+ const ref = React12.useRef(null);
119097
119557
  const { minGapMs, maxGapMs } = spec;
119098
- React11.useEffect(() => {
119558
+ React12.useEffect(() => {
119099
119559
  const el2 = ref.current?.firstElementChild;
119100
119560
  if (!el2 || typeof el2.animate !== "function") return;
119101
119561
  let timer;
@@ -119179,14 +119639,14 @@ var init_renderNode = __esm({
119179
119639
  }
119180
119640
  };
119181
119641
  bodyFont = (ctx) => fontStack(ctx.font("body").family, ctx.idiom);
119182
- kids2 = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React11.Fragment, { children: renderNode(n2, ctx) }, n2?.id ?? i2)) : null;
119642
+ kids2 = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React12.Fragment, { children: renderNode(n2, ctx) }, n2?.id ?? i2)) : null;
119183
119643
  rowKidCtx = (n2, ctx) => wantsRowStretch(n2) ? { ...ctx, rowStretch: true } : normalize(n2).type === "Divider" ? { ...ctx, rowDivider: true } : ctx;
119184
- rowKids = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React11.Fragment, { children: renderNode(n2, rowKidCtx(n2, ctx)) }, n2?.id ?? i2)) : null;
119644
+ rowKids = (arr2, ctx) => Array.isArray(arr2) ? arr2.map((n2, i2) => /* @__PURE__ */ jsx11(React12.Fragment, { children: renderNode(n2, rowKidCtx(n2, ctx)) }, n2?.id ?? i2)) : null;
119185
119645
  staggeredKids = (arr2, ctx, staggerMs) => Array.isArray(arr2) ? arr2.map((n2, i2) => {
119186
119646
  const el2 = renderNode(n2, ctx);
119187
- if (!React11.isValidElement(el2)) return /* @__PURE__ */ jsx11(React11.Fragment, { children: el2 }, n2?.id ?? i2);
119647
+ if (!React12.isValidElement(el2)) return /* @__PURE__ */ jsx11(React12.Fragment, { children: el2 }, n2?.id ?? i2);
119188
119648
  const prev = el2.props.style ?? {};
119189
- return React11.cloneElement(el2, { key: n2?.id ?? i2, style: { ...prev, animationDelay: `${i2 * staggerMs}ms` } });
119649
+ return React12.cloneElement(el2, { key: n2?.id ?? i2, style: { ...prev, animationDelay: `${i2 * staggerMs}ms` } });
119190
119650
  }) : null;
119191
119651
  asTextL10n = (v2, ctx) => typeof v2 === "string" && v2.startsWith(TRANSLATION_PREFIX) ? asText2(resolveTranslation(v2, ctx.catalog)) : asText2(v2);
119192
119652
  asFinalTextL10n = (v2, ctx) => typeof v2 === "string" ? v2.startsWith(TRANSLATION_PREFIX) ? asText2(resolveTranslation(v2, ctx.catalog)) : v2 : asText2(v2);
@@ -119196,19 +119656,19 @@ var init_renderNode = __esm({
119196
119656
  return isBinding(v2) ? asTextL10n(resolved2 ?? "", ctx) : asText2(v2);
119197
119657
  };
119198
119658
  InterpolatedTextView = ({ pattern, params, ctx }) => {
119199
- const bound = Object.entries(params).filter(
119659
+ const bound2 = Object.entries(params).filter(
119200
119660
  ([, v2]) => typeof v2 === "string" && v2.startsWith("$service:")
119201
119661
  );
119202
- const [live3, setLive] = React11.useState(() => {
119662
+ const [live3, setLive] = React12.useState(() => {
119203
119663
  const seed2 = {};
119204
- if (ctx.provider) for (const [k2, p2] of bound) seed2[k2] = ctx.provider.value(servicePath(p2));
119664
+ if (ctx.provider) for (const [k2, p2] of bound2) seed2[k2] = ctx.provider.value(servicePath(p2));
119205
119665
  return seed2;
119206
119666
  });
119207
- const subKey = bound.map(([k2, p2]) => `${k2}=${p2}`).join("|");
119208
- React11.useEffect(() => {
119667
+ const subKey = bound2.map(([k2, p2]) => `${k2}=${p2}`).join("|");
119668
+ React12.useEffect(() => {
119209
119669
  const provider = ctx.provider;
119210
119670
  if (!provider) return;
119211
- const unsubs = bound.map(
119671
+ const unsubs = bound2.map(
119212
119672
  ([k2, p2]) => provider.subscribe(servicePath(p2), (v2) => setLive((prev) => prev[k2] === v2 ? prev : { ...prev, [k2]: v2 }))
119213
119673
  );
119214
119674
  return () => unsubs.forEach((u2) => u2());
@@ -119247,11 +119707,11 @@ var init_renderNode = __esm({
119247
119707
  fragmentSlotContent = ({ props, ctx, discriminator, slotId, extra }) => {
119248
119708
  const selected = selectFragmentCase(props, discriminator);
119249
119709
  const selectedId = typeof selected?.id === "string" ? selected.id : "";
119250
- const previousId = React11.useRef(selectedId);
119251
- const reportedUnknown = React11.useRef(/* @__PURE__ */ new Set());
119252
- const reportedInvalid = React11.useRef(/* @__PURE__ */ new Set());
119253
- const [announcement, setAnnouncement] = React11.useState("");
119254
- React11.useEffect(() => {
119710
+ const previousId = React12.useRef(selectedId);
119711
+ const reportedUnknown = React12.useRef(/* @__PURE__ */ new Set());
119712
+ const reportedInvalid = React12.useRef(/* @__PURE__ */ new Set());
119713
+ const [announcement, setAnnouncement] = React12.useState("");
119714
+ React12.useEffect(() => {
119255
119715
  if (typeof discriminator === "string") {
119256
119716
  if (discriminator && !props.cases?.some((candidate) => candidate.id === discriminator) && !reportedUnknown.current.has(discriminator)) {
119257
119717
  reportedUnknown.current.add(discriminator);
@@ -119265,7 +119725,7 @@ var init_renderNode = __esm({
119265
119725
  }
119266
119726
  }
119267
119727
  }, [ctx, discriminator, props.cases, slotId]);
119268
- React11.useEffect(() => {
119728
+ React12.useEffect(() => {
119269
119729
  if (previousId.current !== selectedId) {
119270
119730
  const next = selected?.accessibilityAnnouncement ?? selected?.accessibility_announcement;
119271
119731
  setAnnouncement(typeof next === "string" ? next : "");
@@ -119279,7 +119739,7 @@ var init_renderNode = __esm({
119279
119739
  // and the right edge clips (branded-lite's home is a FragmentSlot → 32px cut in
119280
119740
  // the phone preview). Included before ...extra so a modifier can still override.
119281
119741
  /* @__PURE__ */ jsxs8("div", { "data-fragment-slot": slotId ?? "", "data-fragment-case": selectedId, style: { width: "100%", boxSizing: "border-box", ...extra }, children: [
119282
- selected?.content ? /* @__PURE__ */ jsx11(React11.Fragment, { children: renderNode(selected.content, ctx) }, selectedId) : null,
119742
+ selected?.content ? /* @__PURE__ */ jsx11(React12.Fragment, { children: renderNode(selected.content, ctx) }, selectedId) : null,
119283
119743
  /* @__PURE__ */ jsx11("span", { "aria-live": "polite", style: { position: "absolute", width: 1, height: 1, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", border: 0 }, children: announcement })
119284
119744
  ] })
119285
119745
  );
@@ -119287,24 +119747,24 @@ var init_renderNode = __esm({
119287
119747
  FragmentSlotNode = withExtras("FragmentSlotNode", ({ props, ctx, wrap, nodeId }) => {
119288
119748
  const casePath = props.casePath ?? props.case_path;
119289
119749
  const isService = typeof casePath === "string" && casePath.startsWith("$service:");
119290
- const bound = useBoundValue(ctx, isService ? casePath : "");
119291
- const discriminator = isService ? bound : isEnvExpr(casePath) ? evalEnvExpr(casePath, ctxEnv(ctx)) : resolveScalarStatic(casePath, ctx);
119750
+ const bound2 = useBoundValue(ctx, isService ? casePath : "");
119751
+ const discriminator = isService ? bound2 : isEnvExpr(casePath) ? evalEnvExpr(casePath, ctxEnv(ctx)) : resolveScalarStatic(casePath, ctx);
119292
119752
  return fragmentSlotContent({ props, ctx, discriminator, slotId: nodeId, extra: wrap });
119293
119753
  });
119294
119754
  RichContentEditorNode = withExtras("RichContentEditorNode", ({ props, ctx, wrap, nodeId }) => /* @__PURE__ */ jsx11(RichContentEditorView, { props, ctx, wrap, nodeId, renderChild: (n2) => renderNode(n2, ctx) }));
119295
119755
  MediaFieldNode = withExtras("MediaFieldNode", ({ props, ctx, wrap }) => {
119296
119756
  const C2 = ctx.color;
119297
119757
  const servicePathStr = mediaFieldServicePath(props.valuePath);
119298
- const bound = useBoundValue(ctx, servicePathStr ? String(props.valuePath) : "");
119299
- const imageUrl = typeof bound === "string" ? bound : "";
119758
+ const bound2 = useBoundValue(ctx, servicePathStr ? String(props.valuePath) : "");
119759
+ const imageUrl = typeof bound2 === "string" ? bound2 : "";
119300
119760
  const fallbackPathStr = mediaFieldServicePath(props.fallbackTextPath);
119301
119761
  const fallbackBound = useBoundValue(ctx, fallbackPathStr ? String(props.fallbackTextPath) : "");
119302
119762
  const fallbackText = typeof fallbackBound === "string" ? fallbackBound : "";
119303
- const [uploading, setUploading] = React11.useState(false);
119304
- const [failed3, setFailed] = React11.useState(false);
119305
- const fileRef = React11.useRef(null);
119306
- const previewRef = React11.useRef(null);
119307
- const [localPreview, setLocalPreview] = React11.useState("");
119763
+ const [uploading, setUploading] = React12.useState(false);
119764
+ const [failed3, setFailed] = React12.useState(false);
119765
+ const fileRef = React12.useRef(null);
119766
+ const previewRef = React12.useRef(null);
119767
+ const [localPreview, setLocalPreview] = React12.useState("");
119308
119768
  const uploadService = typeof props.uploadService === "string" ? props.uploadService : "";
119309
119769
  const resolvedLabel = asText2(resolveScalarStatic(props.label, ctx));
119310
119770
  const name = mediaFieldName(resolvedLabel);
@@ -119349,7 +119809,7 @@ var init_renderNode = __esm({
119349
119809
  setUploading(false);
119350
119810
  }
119351
119811
  };
119352
- React11.useEffect(() => () => {
119812
+ React12.useEffect(() => () => {
119353
119813
  const previewUrl = previewRef.current;
119354
119814
  if (previewUrl && typeof URL.revokeObjectURL === "function") URL.revokeObjectURL(previewUrl);
119355
119815
  previewRef.current = null;
@@ -119421,7 +119881,7 @@ var init_renderNode = __esm({
119421
119881
  const value = useBoundValue(ctx, typeof path2 === "string" ? path2 : "");
119422
119882
  const policy = props.policy;
119423
119883
  const catalog3 = ctx.provider && typeof ctx.provider.listActions === "function" ? ctx.provider : null;
119424
- const validation = React11.useMemo(() => {
119884
+ const validation = React12.useMemo(() => {
119425
119885
  if (value === void 0 || value === null) return { ok: false, reason: "unresolved" };
119426
119886
  if (typeof value !== "string") return { ok: false, reason: "value_type" };
119427
119887
  if (!policy || typeof policy !== "object") return { ok: false, reason: "typed_decode" };
@@ -119431,8 +119891,8 @@ var init_renderNode = __esm({
119431
119891
  return { ok: false, reason: "typed_decode" };
119432
119892
  }
119433
119893
  }, [catalog3, policy, slotId, value]);
119434
- const reported = React11.useRef(/* @__PURE__ */ new Set());
119435
- React11.useEffect(() => {
119894
+ const reported = React12.useRef(/* @__PURE__ */ new Set());
119895
+ React12.useEffect(() => {
119436
119896
  const key3 = validation.ok ? `ok:${validation.treeHash}` : `bad:${validation.treeHash ?? validation.reason}`;
119437
119897
  if (reported.current.has(key3)) return;
119438
119898
  reported.current.add(key3);
@@ -119459,12 +119919,12 @@ var init_renderNode = __esm({
119459
119919
  const componentId = nodeId ?? "";
119460
119920
  const path2 = props.documentJsonPath ?? props.document_json_path;
119461
119921
  const hasPath = typeof path2 === "string" && path2 !== "";
119462
- const bound = useResolvedScalar(hasPath ? path2 : void 0, ctx);
119463
- const raw = hasPath ? bound : props.documentJson ?? props.document_json;
119464
- const result = React11.useMemo(() => layoutRichContentValue(raw), [raw]);
119922
+ const bound2 = useResolvedScalar(hasPath ? path2 : void 0, ctx);
119923
+ const raw = hasPath ? bound2 : props.documentJson ?? props.document_json;
119924
+ const result = React12.useMemo(() => layoutRichContentValue(raw), [raw]);
119465
119925
  const reason = result && "rejected" in result ? result.rejected : void 0;
119466
- const reported = React11.useRef(/* @__PURE__ */ new Set());
119467
- React11.useEffect(() => {
119926
+ const reported = React12.useRef(/* @__PURE__ */ new Set());
119927
+ React12.useEffect(() => {
119468
119928
  if (!reason) return;
119469
119929
  const key3 = typeof raw === "string" ? `${reason}:${raw.length}:${richContentDocumentHash(raw)}` : `${reason}:non-string`;
119470
119930
  if (reported.current.has(key3)) return;
@@ -119558,17 +120018,17 @@ var init_renderNode = __esm({
119558
120018
  };
119559
120019
  withRootStyle = (content, style) => {
119560
120020
  if (Array.isArray(content)) return content.map((child) => withRootStyle(child, style));
119561
- if (!React11.isValidElement(content)) return content;
119562
- if (content.type === React11.Fragment) {
119563
- return React11.cloneElement(content, {}, React11.Children.map(content.props.children, (child) => withRootStyle(child, style)));
120021
+ if (!React12.isValidElement(content)) return content;
120022
+ if (content.type === React12.Fragment) {
120023
+ return React12.cloneElement(content, {}, React12.Children.map(content.props.children, (child) => withRootStyle(child, style)));
119564
120024
  }
119565
120025
  const element = content;
119566
- return React11.cloneElement(element, { style: { ...element.props.style, ...style } });
120026
+ return React12.cloneElement(element, { style: { ...element.props.style, ...style } });
119567
120027
  };
119568
120028
  ReactiveDirectScalars = ({ node, ctx, bindings, style }) => {
119569
- const [, rerender] = React11.useState(0);
120029
+ const [, rerender] = React12.useState(0);
119570
120030
  const bindingKey = bindings.join("|");
119571
- React11.useEffect(() => {
120031
+ React12.useEffect(() => {
119572
120032
  if (!ctx.provider) return;
119573
120033
  const unsubs = bindings.map((binding2) => ctx.provider.subscribe(servicePath(binding2), () => rerender((n2) => n2 + 1)));
119574
120034
  return () => unsubs.forEach((unsubscribe) => unsubscribe());
@@ -119581,14 +120041,14 @@ var init_renderNode = __esm({
119581
120041
  return /* @__PURE__ */ jsx11(ExitPresence, { hidden: hiddenBool(v2), exit: exit ?? null, children });
119582
120042
  };
119583
120043
  ExitPresence = ({ hidden, exit, children }) => {
119584
- const [prevHidden, setPrevHidden] = React11.useState(hidden);
119585
- const [exiting, setExiting] = React11.useState(false);
120044
+ const [prevHidden, setPrevHidden] = React12.useState(hidden);
120045
+ const [exiting, setExiting] = React12.useState(false);
119586
120046
  if (hidden !== prevHidden) {
119587
120047
  setPrevHidden(hidden);
119588
120048
  setExiting(hidden && exit != null);
119589
120049
  }
119590
- const ref = React11.useRef(null);
119591
- const exitRef = React11.useRef(exit);
120050
+ const ref = React12.useRef(null);
120051
+ const exitRef = React12.useRef(exit);
119592
120052
  exitRef.current = exit;
119593
120053
  useIsomorphicLayoutEffect(() => {
119594
120054
  if (!exiting) return void 0;
@@ -119616,13 +120076,13 @@ var init_renderNode = __esm({
119616
120076
  const C2 = ctx.color;
119617
120077
  const raw = props.state;
119618
120078
  const isBound = typeof raw === "string" && raw.startsWith("$service:");
119619
- const bound = useResolvedScalar(isBound ? raw : void 0, ctx);
120079
+ const bound2 = useResolvedScalar(isBound ? raw : void 0, ctx);
119620
120080
  const legacy = isNodeLike(props.data) ? "data" : isNodeLike(props.loading) ? "loading" : props.state === "error" ? "error" : "empty";
119621
- const target = raw == null || raw === "" || isBound && !ctx.provider ? legacy : sectionSlot(isBound ? bound : raw);
120081
+ const target = raw == null || raw === "" || isBound && !ctx.provider ? legacy : sectionSlot(isBound ? bound2 : raw);
119622
120082
  const { graceMs, floorMs } = loadingTiming(ctx.kit, props.loadingGraceMs ?? props.loading_grace_ms, props.loadingFloorMs ?? props.loading_floor_ms);
119623
120083
  const shown2 = useLoadingTiming(target, graceMs, floorMs);
119624
- const changed = React11.useRef(false);
119625
- const first = React11.useRef(shown2);
120084
+ const changed = React12.useRef(false);
120085
+ const first = React12.useRef(shown2);
119626
120086
  if (shown2 !== first.current) changed.current = true;
119627
120087
  const renderCfg = (cfg) => cfg && typeof cfg === "object" ? /* @__PURE__ */ jsxs8("div", { style: { textAlign: "center", padding: "24px 12px", color: C2("textSecondary", "#9aa2ad") }, children: [
119628
120088
  cfg.title && /* @__PURE__ */ jsx11("div", { style: { fontSize: pxToRem(15), fontWeight: 600, color: C2("textPrimary", "#111") }, children: asText2(cfg.title) }),
@@ -119654,8 +120114,8 @@ var init_renderNode = __esm({
119654
120114
  }
119655
120115
  const animate = motionDefaultsAnimate(ctx);
119656
120116
  const fadeMs = motionDefaultsDuration(ctx.kit, 220);
119657
- const lastShown = React11.useRef(null);
119658
- const [outgoing, setOutgoing] = React11.useState(null);
120117
+ const lastShown = React12.useRef(null);
120118
+ const [outgoing, setOutgoing] = React12.useState(null);
119659
120119
  useIsomorphicLayoutEffect(() => {
119660
120120
  const was = lastShown.current;
119661
120121
  if (!animate || !was || was.slot === shown2 || was.node == null) return void 0;
@@ -119663,7 +120123,7 @@ var init_renderNode = __esm({
119663
120123
  const t2 = setTimeout(() => setOutgoing(null), fadeMs);
119664
120124
  return () => clearTimeout(t2);
119665
120125
  }, [shown2]);
119666
- React11.useEffect(() => {
120126
+ React12.useEffect(() => {
119667
120127
  lastShown.current = { slot: shown2, node: content };
119668
120128
  });
119669
120129
  if (changed.current && animate) {
@@ -119699,7 +120159,7 @@ var init_renderNode = __esm({
119699
120159
  const onChangeAction = resolveRowAction2(props.onChange ?? cfg.onChange, ctx);
119700
120160
  const borderless = props.borderless === true || cfg.borderless === true;
119701
120161
  const secure = props.secure === true || cfg.secure === true;
119702
- const [valueVisible, setValueVisible] = React11.useState(false);
120162
+ const [valueVisible, setValueVisible] = React12.useState(false);
119703
120163
  const visibilityToggle = secure && (props.visibilityToggle === true || cfg.visibilityToggle === true);
119704
120164
  const visibilityLabel = ctx.catalog?.get(valueVisible ? "auth.gate.password.hide" : "auth.gate.password.show") ?? (valueVisible ? "Hide password" : "Show password");
119705
120165
  const erroredProp = props.error === true || cfg.error === true;
@@ -119713,20 +120173,20 @@ var init_renderNode = __esm({
119713
120173
  const boundRawText = typeof boundVal === "string" ? boundVal : typeof boundVal === "number" ? String(boundVal) : void 0;
119714
120174
  const boundText = serializeRichText && boundRawText !== void 0 ? richTextHtmlToPlainText(boundRawText) : boundRawText;
119715
120175
  const literalText = typeof valueBinding === "string" ? serializeRichText ? richTextHtmlToPlainText(valueBinding) : valueBinding : "";
119716
- const [local, setLocal] = React11.useState(
120176
+ const [local, setLocal] = React12.useState(
119717
120177
  isBound ? boundText ?? "" : literalText
119718
120178
  );
119719
- const [edited, setEdited] = React11.useState(false);
119720
- const [pristineRichValue, setPristineRichValue] = React11.useState(
120179
+ const [edited, setEdited] = React12.useState(false);
120180
+ const [pristineRichValue, setPristineRichValue] = React12.useState(
119721
120181
  serializeRichText ? isBound ? boundRawText : typeof valueBinding === "string" ? valueBinding : void 0 : void 0
119722
120182
  );
119723
- const focused = React11.useRef(false);
119724
- const [touched, setTouched] = React11.useState(false);
119725
- const [isFocused, setIsFocused] = React11.useState(false);
119726
- const pendingEdits = React11.useRef([]);
119727
- const previousBoundText = React11.useRef(boundText);
119728
- const previousBoundRawText = React11.useRef(boundRawText);
119729
- React11.useEffect(() => {
120183
+ const focused = React12.useRef(false);
120184
+ const [touched, setTouched] = React12.useState(false);
120185
+ const [isFocused, setIsFocused] = React12.useState(false);
120186
+ const pendingEdits = React12.useRef([]);
120187
+ const previousBoundText = React12.useRef(boundText);
120188
+ const previousBoundRawText = React12.useRef(boundRawText);
120189
+ React12.useEffect(() => {
119730
120190
  if (!isBound || boundText === void 0) return;
119731
120191
  const boundTextChanged = previousBoundText.current !== boundText;
119732
120192
  const boundRawTextChanged = previousBoundRawText.current !== boundRawText;
@@ -119757,23 +120217,23 @@ var init_renderNode = __esm({
119757
120217
  }
119758
120218
  if (!focused.current && boundText !== local) setLocal(boundText);
119759
120219
  }, [boundText, serializeRichText ? boundRawText : void 0, isFocused, serializeRichText ? edited : false]);
119760
- const formBag = React11.useContext(FormValuesContext);
120220
+ const formBag = React12.useContext(FormValuesContext);
119761
120221
  const fieldId = props.__formFieldId;
119762
- const previousBinding = React11.useRef(binding2);
120222
+ const previousBinding = React12.useRef(binding2);
119763
120223
  const rule = props.validation ?? cfg.validation;
119764
120224
  const { "aria-labelledby": labelledBy } = formFieldA11y(props);
119765
120225
  const required3 = rule?.required === true || void 0;
119766
- const ruleKey = React11.useMemo(() => rule ? JSON.stringify(rule) : "", [rule]);
119767
- React11.useEffect(() => {
120226
+ const ruleKey = React12.useMemo(() => rule ? JSON.stringify(rule) : "", [rule]);
120227
+ React12.useEffect(() => {
119768
120228
  if (!formBag || !fieldId) return;
119769
120229
  formBag.register(fieldId, rule);
119770
120230
  return () => formBag.unregister(fieldId);
119771
120231
  }, [fieldId, formBag, ruleKey]);
119772
120232
  const formValue = serializeRichText && !edited && pristineRichValue !== void 0 ? pristineRichValue : serializeRichText ? richTextEditedHtml(pristineRichValue, pristineRichValue === void 0 ? "" : richTextHtmlToPlainText(pristineRichValue), local) : local;
119773
- React11.useEffect(() => {
120233
+ React12.useEffect(() => {
119774
120234
  if (formBag && fieldId) formBag.set(fieldId, formValue);
119775
120235
  }, [formValue, fieldId, formBag, binding2]);
119776
- React11.useEffect(() => {
120236
+ React12.useEffect(() => {
119777
120237
  if (previousBinding.current === binding2) return;
119778
120238
  previousBinding.current = binding2;
119779
120239
  pendingEdits.current = [];
@@ -119792,7 +120252,7 @@ var init_renderNode = __esm({
119792
120252
  const errorTextRaw = props.errorText ?? cfg.errorText;
119793
120253
  const errorTextResolved = useBoundString(errorTextRaw, ctx);
119794
120254
  const workerError = typeof boundError === "string" ? boundError : errorTextRaw == null ? void 0 : errorTextResolved;
119795
- const validationCatalog = React11.useMemo(
120255
+ const validationCatalog = React12.useMemo(
119796
120256
  () => ctx.catalog ? new Proxy({}, { get: (_t2, k2) => typeof k2 === "string" ? ctx.catalog.get(k2) : void 0 }) : void 0,
119797
120257
  [ctx.catalog]
119798
120258
  );
@@ -119807,7 +120267,7 @@ var init_renderNode = __esm({
119807
120267
  const hasWorkerError = Boolean(workerError && workerError.trim());
119808
120268
  const painted2 = rawMessage === null ? "" : translateOnly(rawMessage);
119809
120269
  const message = !painted2.trim() || ruleMessagePending && !hasWorkerError ? null : painted2;
119810
- const [feedbackShown, setFeedbackShown] = React11.useState(false);
120270
+ const [feedbackShown, setFeedbackShown] = React12.useState(false);
119811
120271
  const revealed = message !== null && shouldRevealError({
119812
120272
  rule,
119813
120273
  feedbackShown,
@@ -119816,11 +120276,11 @@ var init_renderNode = __esm({
119816
120276
  focused: isFocused,
119817
120277
  submitAttempted: formBag?.submitAttempted ?? false
119818
120278
  });
119819
- React11.useEffect(() => {
120279
+ React12.useEffect(() => {
119820
120280
  if (revealed) setFeedbackShown(true);
119821
120281
  }, [revealed]);
119822
120282
  const errored = erroredProp || revealed;
119823
- const generatedId = React11.useId();
120283
+ const generatedId = React12.useId();
119824
120284
  const errorId = revealed ? `${componentId ?? generatedId}__error` : void 0;
119825
120285
  const emit = (v2) => {
119826
120286
  if (onChangeAction && ctx.onAction) {
@@ -119832,16 +120292,16 @@ var init_renderNode = __esm({
119832
120292
  });
119833
120293
  }
119834
120294
  };
119835
- const ownsPrivateDraft = React11.useRef(false);
119836
- React11.useEffect(() => {
120295
+ const ownsPrivateDraft = React12.useRef(false);
120296
+ React12.useEffect(() => {
119837
120297
  if (visibilityToggle && !isBound) ownsPrivateDraft.current = true;
119838
120298
  }, [visibilityToggle, isBound]);
119839
- const clearSensitiveDraft = React11.useRef(() => {
120299
+ const clearSensitiveDraft = React12.useRef(() => {
119840
120300
  });
119841
120301
  clearSensitiveDraft.current = () => {
119842
120302
  if (ownsPrivateDraft.current && !isBound) emit("");
119843
120303
  };
119844
- React11.useEffect(() => () => clearSensitiveDraft.current(), []);
120304
+ React12.useEffect(() => () => clearSensitiveDraft.current(), []);
119845
120305
  const onInput = (e2) => {
119846
120306
  const v2 = e2.currentTarget.value;
119847
120307
  setLocal(v2);
@@ -119873,7 +120333,7 @@ var init_renderNode = __esm({
119873
120333
  const submitLabelRaw = props.submitLabel ?? cfg.submitLabel;
119874
120334
  const onSubmitAction = props.onSubmit ?? cfg.onSubmit;
119875
120335
  const enterKeyHint = !multilineBox && ENTER_KEY_HINTS.has(submitLabelRaw) ? submitLabelRaw : !multilineBox && onSubmitAction ? "done" : void 0;
119876
- const inputRef = React11.useRef(null);
120336
+ const inputRef = React12.useRef(null);
119877
120337
  useIsomorphicLayoutEffect(() => {
119878
120338
  const el2 = inputRef.current;
119879
120339
  const view = el2?.ownerDocument?.defaultView;
@@ -119888,8 +120348,8 @@ var init_renderNode = __esm({
119888
120348
  }, [local, multilineBox, maxLines]);
119889
120349
  const focusBinding = (typeof props.focusPath === "string" ? props.focusPath : typeof cfg.focusPath === "string" ? cfg.focusPath : void 0) ?? "";
119890
120350
  const focusTokenVal = useBoundValue(ctx, focusBinding);
119891
- const lastFocusToken = React11.useRef(void 0);
119892
- React11.useEffect(() => {
120351
+ const lastFocusToken = React12.useRef(void 0);
120352
+ React12.useEffect(() => {
119893
120353
  if (!focusBinding) return;
119894
120354
  const next = typeof focusTokenVal === "string" ? focusTokenVal : typeof focusTokenVal === "number" ? String(focusTokenVal) : "";
119895
120355
  if (!next || next === lastFocusToken.current) return;
@@ -119964,8 +120424,8 @@ var init_renderNode = __esm({
119964
120424
  };
119965
120425
  MENU_ANCHOR_CONTROL = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"]), [role="button"], [role="link"]';
119966
120426
  MenuNode = withExtras("MenuNode", ({ props, ctx, wrap }) => {
119967
- const [open, setOpen] = React11.useState(false);
119968
- const hostRef = React11.useRef(null);
120427
+ const [open, setOpen] = React12.useState(false);
120428
+ const hostRef = React12.useRef(null);
119969
120429
  const context = menuOpensOnLongPress(props.style);
119970
120430
  const itemsPath = typeof props.itemsPath === "string" && props.itemsPath.startsWith("$service:") ? props.itemsPath : "";
119971
120431
  const boundItems = useBoundValue(ctx, itemsPath);
@@ -119973,7 +120433,7 @@ var init_renderNode = __esm({
119973
120433
  const previewMode = context && props.preview != null;
119974
120434
  const items = sourceItems.map((it2) => ({ ...it2, label: typeof it2?.label === "string" && it2.label.startsWith("$item") ? resolveItemDeep2(it2.label, ctx) : it2?.label, disabled: it2?.disabled === true || !it2?.action }));
119975
120435
  const C2 = ctx.color;
119976
- React11.useEffect(() => {
120436
+ React12.useEffect(() => {
119977
120437
  if (!open) return;
119978
120438
  const onTop = () => menuRef.current != null && isWithinTopModal(menuRef.current);
119979
120439
  const onDown = (e2) => {
@@ -119999,11 +120459,11 @@ var init_renderNode = __esm({
119999
120459
  const flexGrow = typeof wrap?.flex === "string" ? parseFloat(wrap.flex) : typeof wrap?.flex === "number" ? wrap.flex : Number(wrap?.flexGrow ?? 0);
120000
120460
  const fill = wrap?.width === "100%" || Number.isFinite(flexGrow) && flexGrow > 0;
120001
120461
  const popupPlacement = fill ? { position: "absolute", top: "100%", left: 0, right: 0, zIndex: 20, marginTop: 4 } : { position: "absolute", top: "100%", right: 0, zIndex: 20, marginTop: 4 };
120002
- const anchorRef = React11.useRef(null);
120003
- const menuRef = React11.useRef(null);
120004
- const dialogRef = React11.useRef(null);
120005
- const [popupAlignLeft, setPopupAlignLeft] = React11.useState(false);
120006
- const [popupAbove, setPopupAbove] = React11.useState(false);
120462
+ const anchorRef = React12.useRef(null);
120463
+ const menuRef = React12.useRef(null);
120464
+ const dialogRef = React12.useRef(null);
120465
+ const [popupAlignLeft, setPopupAlignLeft] = React12.useState(false);
120466
+ const [popupAbove, setPopupAbove] = React12.useState(false);
120007
120467
  useIsomorphicLayoutEffect(() => {
120008
120468
  if (!open || !anchorRef.current || !menuRef.current) return;
120009
120469
  const anchor = anchorRef.current.getBoundingClientRect();
@@ -120025,8 +120485,8 @@ var init_renderNode = __esm({
120025
120485
  setPopupAlignLeft(anchor.right - popup.width < left);
120026
120486
  setPopupAbove(anchor.bottom + popup.height + 4 > bottom && anchor.top - popup.height - 4 >= top);
120027
120487
  });
120028
- const [innerControl, setInnerControl] = React11.useState(null);
120029
- const innerControlRef = React11.useRef(null);
120488
+ const [innerControl, setInnerControl] = React12.useState(null);
120489
+ const innerControlRef = React12.useRef(null);
120030
120490
  useIsomorphicLayoutEffect(() => {
120031
120491
  const anchor = anchorRef.current;
120032
120492
  const refresh = () => {
@@ -120042,7 +120502,7 @@ var init_renderNode = __esm({
120042
120502
  observer.observe(anchor, { childList: true, subtree: true, attributes: true, attributeFilter: ["disabled", "tabindex", "href", "role"] });
120043
120503
  return () => observer.disconnect();
120044
120504
  });
120045
- React11.useEffect(() => {
120505
+ React12.useEffect(() => {
120046
120506
  if (!innerControl) return;
120047
120507
  innerControl.setAttribute("aria-haspopup", "menu");
120048
120508
  innerControl.setAttribute("aria-expanded", String(open));
@@ -120054,13 +120514,13 @@ var init_renderNode = __esm({
120054
120514
  };
120055
120515
  }, [innerControl, open]);
120056
120516
  const itemsKey = items.map((it2, i2) => `${it2?.id ?? i2}:${it2?.disabled ? 0 : 1}`).join("|");
120057
- React11.useEffect(() => {
120517
+ React12.useEffect(() => {
120058
120518
  if (!open || !modal) return;
120059
120519
  const menu = menuRef.current;
120060
120520
  if (!menu || menu.contains(document.activeElement)) return;
120061
120521
  (menu.querySelector('[role="menuitem"][tabindex="0"]') ?? menu).focus();
120062
120522
  }, [open, modal, itemsKey]);
120063
- React11.useEffect(() => {
120523
+ React12.useEffect(() => {
120064
120524
  if (!open || !modal) return;
120065
120525
  const layer = pushModalLayer(() => dialogRef.current);
120066
120526
  return () => {
@@ -120082,11 +120542,11 @@ var init_renderNode = __esm({
120082
120542
  e2.preventDefault();
120083
120543
  items2[next].focus();
120084
120544
  };
120085
- const pressTimer = React11.useRef(null);
120086
- const longPressed = React11.useRef(false);
120087
- const touchOrigin = React11.useRef(null);
120088
- const suppressNextClick = React11.useRef(false);
120089
- const suppressTimer = React11.useRef(null);
120545
+ const pressTimer = React12.useRef(null);
120546
+ const longPressed = React12.useRef(false);
120547
+ const touchOrigin = React12.useRef(null);
120548
+ const suppressNextClick = React12.useRef(false);
120549
+ const suppressTimer = React12.useRef(null);
120090
120550
  const clearSuppress = () => {
120091
120551
  suppressNextClick.current = false;
120092
120552
  if (suppressTimer.current != null) {
@@ -120100,7 +120560,7 @@ var init_renderNode = __esm({
120100
120560
  pressTimer.current = null;
120101
120561
  }
120102
120562
  };
120103
- React11.useEffect(() => () => {
120563
+ React12.useEffect(() => () => {
120104
120564
  cancelPress();
120105
120565
  clearSuppress();
120106
120566
  }, []);
@@ -120264,11 +120724,11 @@ var init_renderNode = __esm({
120264
120724
  LoadMoreSentinel = ({ ctx, pagination, style }) => {
120265
120725
  const raw = pagination?.cursor;
120266
120726
  const isBound = typeof raw === "string" && isBinding(raw);
120267
- const bound = useBoundValue(ctx, isBound ? raw : "");
120268
- const cursor = isBound ? typeof bound === "string" ? bound : "" : String(raw ?? "");
120269
- const ref = React11.useRef(null);
120270
- const fired = React11.useRef("");
120271
- React11.useEffect(() => {
120727
+ const bound2 = useBoundValue(ctx, isBound ? raw : "");
120728
+ const cursor = isBound ? typeof bound2 === "string" ? bound2 : "" : String(raw ?? "");
120729
+ const ref = React12.useRef(null);
120730
+ const fired = React12.useRef("");
120731
+ React12.useEffect(() => {
120272
120732
  fired.current = "";
120273
120733
  const el2 = ref.current;
120274
120734
  if (!cursor || !ctx.onAction || !el2 || typeof IntersectionObserver === "undefined") return;
@@ -120288,8 +120748,8 @@ var init_renderNode = __esm({
120288
120748
  const literalErrorText = useBoundString(props.text ?? props.message, ctx);
120289
120749
  const C2 = ctx.color;
120290
120750
  const isBoundText = typeof props.textPath === "string" && isBinding(props.textPath);
120291
- const bound = useResolvedScalar(isBoundText ? props.textPath : void 0, ctx);
120292
- const text11 = isBoundText ? typeof bound === "string" || typeof bound === "number" ? String(bound) : "" : literalErrorText;
120751
+ const bound2 = useResolvedScalar(isBoundText ? props.textPath : void 0, ctx);
120752
+ const text11 = isBoundText ? typeof bound2 === "string" || typeof bound2 === "number" ? String(bound2) : "" : literalErrorText;
120293
120753
  if (props.visible === false) return null;
120294
120754
  if (isBoundText && !text11) return null;
120295
120755
  const c2 = (props.severity ?? "error") === "warning" ? C2("warning", "#E89F00") : C2("danger", "#E62214");
@@ -120299,11 +120759,11 @@ var init_renderNode = __esm({
120299
120759
  ] });
120300
120760
  });
120301
120761
  FormView = withExtras("FormView", ({ props, ctx, wrap }) => {
120302
- const bagRef = React11.useRef(null);
120762
+ const bagRef = React12.useRef(null);
120303
120763
  if (!bagRef.current) bagRef.current = createFormBag();
120304
120764
  const bag = bagRef.current;
120305
- React11.useSyncExternalStore(
120306
- React11.useCallback((cb) => bag.subscribe(cb), [bag]),
120765
+ React12.useSyncExternalStore(
120766
+ React12.useCallback((cb) => bag.subscribe(cb), [bag]),
120307
120767
  () => bag.version,
120308
120768
  () => bag.version
120309
120769
  );
@@ -120320,7 +120780,7 @@ var init_renderNode = __esm({
120320
120780
  ctx.onAction?.({ ...action, args: merged });
120321
120781
  }
120322
120782
  };
120323
- const submitNode = React11.useMemo(() => {
120783
+ const submitNode = React12.useMemo(() => {
120324
120784
  const node = props.submitButton;
120325
120785
  if (!node || valid) return node;
120326
120786
  if (node.body) return { ...node, body: { ...node.body, props: { ...node.body.props ?? {}, disabled: true } } };
@@ -120370,11 +120830,11 @@ var init_renderNode = __esm({
120370
120830
  const startPositionPath = typeof props.startPositionSeconds === "string" && isBinding(props.startPositionSeconds) ? props.startPositionSeconds : "";
120371
120831
  const boundStartPosition = useResolvedScalar(startPositionPath || void 0, ctx);
120372
120832
  const initialStartPosition = startPositionPath && typeof boundStartPosition === "number" && Number.isFinite(boundStartPosition) ? Math.max(0, boundStartPosition) : Math.max(0, Number.isFinite(Number(props.startPositionSeconds)) ? Number(props.startPositionSeconds) : 0);
120373
- const [index, setIndex] = React11.useState(initialIndex);
120833
+ const [index, setIndex] = React12.useState(initialIndex);
120374
120834
  const queueReady = !itemsPath || Array.isArray(boundQueue);
120375
120835
  const seatKey = `${itemsPath ?? ""}|${startIndex}`;
120376
- const seated = React11.useRef(null);
120377
- React11.useEffect(() => {
120836
+ const seated = React12.useRef(null);
120837
+ React12.useEffect(() => {
120378
120838
  const last = Math.max(0, resolvedItems.length - 1);
120379
120839
  if (resolvedItems.length === 0) return;
120380
120840
  if (queueReady && seated.current !== seatKey) {
@@ -120389,19 +120849,19 @@ var init_renderNode = __esm({
120389
120849
  }
120390
120850
  setIndex((i2) => Math.min(Math.max(0, i2), last));
120391
120851
  }, [resolvedItems.length, startIndex, queueReady, seatKey]);
120392
- const [status, setStatus] = React11.useState("idle");
120393
- const [position, setPosition] = React11.useState(initialStartPosition);
120394
- const [duration2, setDuration] = React11.useState(0);
120395
- const [buffered, setBuffered] = React11.useState(0);
120396
- const [rate, setRateState] = React11.useState(1);
120397
- const [fullscreen, setFullscreen] = React11.useState(false);
120398
- const [error, setError] = React11.useState("");
120399
- const mediaRef = React11.useRef(null);
120400
- const hostRef = React11.useRef(null);
120401
- const autoplayConsumed = React11.useRef(false);
120852
+ const [status, setStatus] = React12.useState("idle");
120853
+ const [position, setPosition] = React12.useState(initialStartPosition);
120854
+ const [duration2, setDuration] = React12.useState(0);
120855
+ const [buffered, setBuffered] = React12.useState(0);
120856
+ const [rate, setRateState] = React12.useState(1);
120857
+ const [fullscreen, setFullscreen] = React12.useState(false);
120858
+ const [error, setError] = React12.useState("");
120859
+ const mediaRef = React12.useRef(null);
120860
+ const hostRef = React12.useRef(null);
120861
+ const autoplayConsumed = React12.useRef(false);
120402
120862
  const item = resolvedItems[index];
120403
120863
  const mediaKey2 = `${index}:${item?.id ?? item?.url ?? ""}`;
120404
- React11.useEffect(() => {
120864
+ React12.useEffect(() => {
120405
120865
  const outgoing = mediaRef.current;
120406
120866
  return () => {
120407
120867
  try {
@@ -120415,7 +120875,7 @@ var init_renderNode = __esm({
120415
120875
  const isYouTube = provider === "youtube";
120416
120876
  const isUnsupportedProvider = provider !== "direct" && !isYouTube;
120417
120877
  const isAudio = ["audio", "podcast", "radio"].includes(String(item?.kind ?? ""));
120418
- const capabilities = React11.useMemo(() => ({
120878
+ const capabilities = React12.useMemo(() => ({
120419
120879
  seek: !isUnsupportedProvider && item?.live !== true,
120420
120880
  rate: !isUnsupportedProvider && item?.live !== true,
120421
120881
  queue: !isUnsupportedProvider && items.length > 1,
@@ -120443,9 +120903,9 @@ var init_renderNode = __esm({
120443
120903
  error,
120444
120904
  capabilities
120445
120905
  };
120446
- const slotProvider = React11.useMemo(() => new MediaSlotProvider(state), []);
120447
- React11.useEffect(() => slotProvider.set(state));
120448
- React11.useEffect(() => {
120906
+ const slotProvider = React12.useMemo(() => new MediaSlotProvider(state), []);
120907
+ React12.useEffect(() => slotProvider.set(state));
120908
+ React12.useEffect(() => {
120449
120909
  if (!startPositionPath || typeof boundStartPosition !== "number" || !Number.isFinite(boundStartPosition) || status !== "idle") return;
120450
120910
  const next = Math.max(0, boundStartPosition);
120451
120911
  setPosition(next);
@@ -120456,7 +120916,7 @@ var init_renderNode = __esm({
120456
120916
  }
120457
120917
  }
120458
120918
  }, [startPositionPath, boundStartPosition, status]);
120459
- const emit = React11.useCallback((action, extra = {}) => {
120919
+ const emit = React12.useCallback((action, extra = {}) => {
120460
120920
  if (!action || !ctx.onAction) return;
120461
120921
  const snapshot2 = {
120462
120922
  sessionId,
@@ -120475,13 +120935,13 @@ var init_renderNode = __esm({
120475
120935
  };
120476
120936
  ctx.onAction({ ...action, args: { ...action.args ?? {}, ...snapshot2, ...extra }, params: { ...action.params ?? {}, sessionId, index: String(index), ...Object.fromEntries(Object.entries(extra).map(([k2, v2]) => [k2, String(v2)])) } });
120477
120937
  }, [ctx.onAction, sessionId, status, index, position, duration2, item, buffered, rate, props.muted, fullscreen, error]);
120478
- React11.useEffect(() => {
120938
+ React12.useEffect(() => {
120479
120939
  if (!isUnsupportedProvider || status === "error") return;
120480
120940
  setStatus("error");
120481
120941
  setError("provider_unsupported");
120482
120942
  emit(props.onError, { state: "error", status: "error", error: "provider_unsupported", code: "provider_unsupported" });
120483
120943
  }, [isUnsupportedProvider, status, emit, props.onError]);
120484
- const play = React11.useCallback(async () => {
120944
+ const play = React12.useCallback(async () => {
120485
120945
  if (isYouTube) return;
120486
120946
  if (isUnsupportedProvider) {
120487
120947
  setStatus("error");
@@ -120503,17 +120963,17 @@ var init_renderNode = __esm({
120503
120963
  emit(props.onError, { state: "blocked", status: "blocked", error: message, code: "playback_blocked" });
120504
120964
  }
120505
120965
  }, [isYouTube, isUnsupportedProvider, emit, props.onError]);
120506
- const pause = React11.useCallback(() => {
120966
+ const pause = React12.useCallback(() => {
120507
120967
  mediaRef.current?.pause();
120508
120968
  setStatus("paused");
120509
120969
  }, []);
120510
- const seek = React11.useCallback((seconds) => {
120970
+ const seek = React12.useCallback((seconds) => {
120511
120971
  const media = mediaRef.current;
120512
120972
  if (!media || !Number.isFinite(seconds)) return;
120513
120973
  media.currentTime = Math.max(0, Math.min(seconds, Number.isFinite(media.duration) ? media.duration : seconds));
120514
120974
  setPosition(media.currentTime);
120515
120975
  }, []);
120516
- const select2 = React11.useCallback((next) => {
120976
+ const select2 = React12.useCallback((next) => {
120517
120977
  if (resolvedItems.length === 0) return;
120518
120978
  const normalized = (next % resolvedItems.length + resolvedItems.length) % resolvedItems.length;
120519
120979
  const nextItem = resolvedItems[normalized];
@@ -120535,7 +120995,7 @@ var init_renderNode = __esm({
120535
120995
  error: ""
120536
120996
  });
120537
120997
  }, [resolvedItems, emit, props.onItemChange]);
120538
- const toggleFullscreen = React11.useCallback(async () => {
120998
+ const toggleFullscreen = React12.useCallback(async () => {
120539
120999
  if (props.fullscreen === "disabled") return;
120540
121000
  const host = hostRef.current;
120541
121001
  try {
@@ -120545,7 +121005,7 @@ var init_renderNode = __esm({
120545
121005
  setFullscreen((value) => !value);
120546
121006
  }
120547
121007
  }, [props.fullscreen]);
120548
- React11.useEffect(() => {
121008
+ React12.useEffect(() => {
120549
121009
  const listener = (event) => {
120550
121010
  const detail = event.detail;
120551
121011
  if (!detail || detail.sessionId !== sessionId) return;
@@ -120593,7 +121053,7 @@ var init_renderNode = __esm({
120593
121053
  window.addEventListener("himalaya-media-command", listener);
120594
121054
  return () => window.removeEventListener("himalaya-media-command", listener);
120595
121055
  }, [sessionId, index, play, pause, seek, select2, toggleFullscreen]);
120596
- React11.useEffect(() => {
121056
+ React12.useEffect(() => {
120597
121057
  const listener = () => {
120598
121058
  const value = document.fullscreenElement === hostRef.current;
120599
121059
  setFullscreen(value);
@@ -120602,14 +121062,14 @@ var init_renderNode = __esm({
120602
121062
  document.addEventListener("fullscreenchange", listener);
120603
121063
  return () => document.removeEventListener("fullscreenchange", listener);
120604
121064
  }, [emit, props.onFullscreenChange]);
120605
- React11.useEffect(() => {
121065
+ React12.useEffect(() => {
120606
121066
  const media = mediaRef.current;
120607
121067
  if (!media || isYouTube || isUnsupportedProvider) return;
120608
121068
  media.muted = props.muted === true;
120609
121069
  media.playbackRate = rate;
120610
121070
  if (position > 0) media.currentTime = position;
120611
121071
  }, [item?.url, isUnsupportedProvider]);
120612
- React11.useEffect(() => {
121072
+ React12.useEffect(() => {
120613
121073
  if (isYouTube || isUnsupportedProvider || props.autoplay === "never" || autoplayConsumed.current) return;
120614
121074
  if (props.autoplay === "once") {
120615
121075
  autoplayConsumed.current = true;
@@ -120811,15 +121271,15 @@ var init_renderNode = __esm({
120811
121271
  }
120812
121272
  );
120813
121273
  });
120814
- PdfDocumentCanvas = React11.lazy(() => Promise.resolve().then(() => (init_pdfDocument(), pdfDocument_exports)).then((module) => ({ default: module.PdfDocument })));
121274
+ PdfDocumentCanvas = React12.lazy(() => Promise.resolve().then(() => (init_pdfDocument(), pdfDocument_exports)).then((module) => ({ default: module.PdfDocument })));
120815
121275
  PdfViewNode = withExtras("PdfViewNode", ({ props, ctx, wrap }) => {
120816
121276
  const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
120817
121277
  const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
120818
121278
  const rawUrl = typeof url === "string" && !isBinding(url) ? url : "";
120819
121279
  const plan = rawUrl ? pdfEmbedPlan(rawUrl, void 0, typeof document !== "undefined" ? document.baseURI : void 0) : null;
120820
121280
  const retypeSrc = plan?.mode === "retype" ? plan.src : null;
120821
- const [retyped, setRetyped] = React11.useState(null);
120822
- React11.useEffect(() => {
121281
+ const [retyped, setRetyped] = React12.useState(null);
121282
+ React12.useEffect(() => {
120823
121283
  if (!retypeSrc) return;
120824
121284
  let live3 = true;
120825
121285
  let made = null;
@@ -120841,11 +121301,11 @@ var init_renderNode = __esm({
120841
121301
  }, [retypeSrc]);
120842
121302
  const settled = retyped && retyped.from === retypeSrc ? retyped : null;
120843
121303
  const wantsShare = props.allowShare === true;
120844
- const [fellBackFrom, setFellBackFrom] = React11.useState(null);
121304
+ const [fellBackFrom, setFellBackFrom] = React12.useState(null);
120845
121305
  const directFellBack = plan?.mode === "direct" && fellBackFrom === plan.src;
120846
121306
  const directSrc = plan?.mode === "direct" && (wantsShare || props.showPageControls !== false && directFellBack) ? plan.src : null;
120847
- const [direct, setDirect] = React11.useState(null);
120848
- React11.useEffect(() => {
121307
+ const [direct, setDirect] = React12.useState(null);
121308
+ React12.useEffect(() => {
120849
121309
  if (!directSrc) return;
120850
121310
  let live3 = true;
120851
121311
  let made = null;
@@ -120862,16 +121322,16 @@ var init_renderNode = __esm({
120862
121322
  }, [directSrc, wantsShare]);
120863
121323
  const directDoc = direct && direct.from === directSrc ? direct : null;
120864
121324
  const fallbackPageCount = plan?.mode === "retype" ? settled?.pageCount ?? null : directDoc?.count ?? null;
120865
- const [nav, setNav] = React11.useState({ from: rawUrl, page: null, zoom: null });
121325
+ const [nav, setNav] = React12.useState({ from: rawUrl, page: null, zoom: null });
120866
121326
  const view = nav.from === rawUrl ? nav : { from: rawUrl, page: null, zoom: null };
120867
121327
  const src = plan?.mode === "direct" ? plan.src : settled?.url ?? null;
120868
- const [canvasCount, setCanvasCount] = React11.useState(null);
120869
- const onPageCount = React11.useCallback((count2) => {
121328
+ const [canvasCount, setCanvasCount] = React12.useState(null);
121329
+ const onPageCount = React12.useCallback((count2) => {
120870
121330
  if (!Number.isInteger(count2) || count2 < 1) return;
120871
121331
  setCanvasCount((cur) => cur?.from === src && cur.count === count2 ? cur : { from: src, count: count2 });
120872
121332
  }, [src]);
120873
121333
  const pageCount = canvasCount?.from === src ? canvasCount.count : fallbackPageCount;
120874
- const onFallback = React11.useCallback(() => setFellBackFrom(src), [src]);
121334
+ const onFallback = React12.useCallback(() => setFellBackFrom(src), [src]);
120875
121335
  const loading = plan?.mode === "retype" && !settled || directSrc != null && wantsShare && !directDoc && typeof window !== "undefined";
120876
121336
  const loadSrc = plan?.mode === "direct" && wantsShare ? directDoc?.blobUrl ?? src : src;
120877
121337
  const ph = typeof props.height === "number" && props.height > 0 ? props.height : void 0;
@@ -120921,7 +121381,7 @@ var init_renderNode = __esm({
120921
121381
  const data = base + pdfOpenFragment(sourceHash, { page, zoom: zoomable ? view.zoom : null, fitWidth: !zoomable });
120922
121382
  const label3 = typeof props.title === "string" && props.title ? props.title : "PDF document";
120923
121383
  const documentStyle = showPageControls || zoomable || allowShare ? { display: "block", width: "100%", flex: "1 1 auto", minHeight: ph ? 0 : 280, border: "none" } : frame;
120924
- const object9 = typeof window === "undefined" ? /* @__PURE__ */ jsx11("object", { "data-himalaya-pdf": "static-fallback", data, type: "application/pdf", "aria-label": label3, style: documentStyle }) : /* @__PURE__ */ jsx11(React11.Suspense, { fallback: /* @__PURE__ */ jsx11("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: documentStyle }), children: /* @__PURE__ */ jsx11(
121384
+ const object9 = typeof window === "undefined" ? /* @__PURE__ */ jsx11("object", { "data-himalaya-pdf": "static-fallback", data, type: "application/pdf", "aria-label": label3, style: documentStyle }) : /* @__PURE__ */ jsx11(React12.Suspense, { fallback: /* @__PURE__ */ jsx11("div", { "data-himalaya-pdf": "loading", role: "img", "aria-label": "loading document", "aria-busy": "true", style: documentStyle }), children: /* @__PURE__ */ jsx11(
120925
121385
  PdfDocumentCanvas,
120926
121386
  {
120927
121387
  src: loadSrc ?? src,
@@ -120985,7 +121445,7 @@ var init_renderNode = __esm({
120985
121445
  )
120986
121446
  ] });
120987
121447
  });
120988
- WebViewNode = withExtras("WebViewNode", ({ props, ctx, wrap }) => {
121448
+ WebViewNode = withExtras("WebViewNode", ({ props, ctx, wrap, nodeId }) => {
120989
121449
  const boundUrl = useResolvedScalar(props.url != null && isBinding(props.url) ? props.url : void 0, ctx);
120990
121450
  const boundHtml = useResolvedScalar(props.inlineHtml != null && isBinding(props.inlineHtml) ? props.inlineHtml : void 0, ctx);
120991
121451
  const url = props.url != null && isBinding(props.url) ? boundUrl : props.url;
@@ -120997,26 +121457,63 @@ var init_renderNode = __esm({
120997
121457
  const htmlStr = rawHtml != null ? injectIntoInlineHtml(rawHtml, config, scrollEnabled) : void 0;
120998
121458
  const urlAllowed = urlStr != null && (config.allowedOrigins.length === 0 || webViewOriginAllowed(urlStr, config.allowedOrigins));
120999
121459
  const urlFrame = urlStr && urlAllowed ? webviewFrameSandbox(urlStr) : null;
121000
- const h2 = typeof props.height === "number" && props.height > 0 ? props.height : void 0;
121460
+ const boundHeight = useResolvedScalar(props.heightPath != null && isBinding(props.heightPath) ? props.heightPath : void 0, ctx);
121461
+ const fill = props.fill === true;
121462
+ const h2 = typeof boundHeight === "number" && boundHeight > 0 ? boundHeight : typeof props.height === "number" && props.height > 0 ? props.height : void 0;
121001
121463
  const ar2 = typeof props.aspectRatio === "number" && props.aspectRatio > 0 ? props.aspectRatio : void 0;
121002
- const frameStyle = { width: "100%", boxSizing: "border-box", border: "none", borderRadius: ctx.radius("md", 8), background: "#fff", ...scrollEnabled ? {} : { overflow: "hidden" }, ...h2 ? { height: h2 } : ar2 ? { aspectRatio: String(ar2) } : { height: 200 } };
121003
- const frameKey = htmlStr ?? urlFrame?.src ?? null;
121004
- const [loadedKey, setLoadedKey] = React11.useState(null);
121464
+ const frameStyle = { width: "100%", boxSizing: "border-box", border: "none", borderRadius: ctx.radius("md", 8), background: "#fff", ...scrollEnabled ? {} : { overflow: "hidden" }, ...fill ? { flex: "1 1 0", minHeight: 0 } : h2 ? { height: h2 } : ar2 ? { aspectRatio: String(ar2) } : { height: 200 } };
121465
+ const reloadValue = reloadKeyOf(useResolvedScalar(props.reloadKeyPath != null && isBinding(props.reloadKeyPath) ? props.reloadKeyPath : void 0, ctx));
121466
+ const reloadState = React12.useRef({ base: null, epoch: 0 });
121467
+ if (reloadValue !== null && reloadValue !== reloadState.current.base) {
121468
+ if (reloadState.current.base !== null) reloadState.current.epoch++;
121469
+ reloadState.current.base = reloadValue;
121470
+ }
121471
+ const reloadKey = reloadState.current.epoch > 0 ? String(reloadState.current.epoch) : "";
121472
+ const sourceKey = htmlStr ?? urlFrame?.src ?? null;
121473
+ const frameKey = sourceKey == null ? null : reloadKey ? `${sourceKey}\0${reloadKey}` : sourceKey;
121474
+ const [loadedKey, setLoadedKey] = React12.useState(null);
121005
121475
  const loaded = loadedKey === frameKey;
121476
+ const bridgeChannel = props.bridge === "worker" ? webViewChannelOf(ctx.provider) : null;
121477
+ const frameRef = React12.useRef(null);
121478
+ const bridgeLoad = React12.useRef({ loaded: false });
121479
+ if (bridgeLoad.current.key !== frameKey) {
121480
+ bridgeLoad.current.key = frameKey;
121481
+ bridgeLoad.current.loaded = false;
121482
+ }
121006
121483
  const frameProps = {
121484
+ ref: frameRef,
121007
121485
  title: "webview",
121008
121486
  scrolling: scrollEnabled ? void 0 : "no",
121009
121487
  "data-scroll-enabled": scrollEnabled ? "true" : "false",
121010
121488
  allow: config.allow || void 0,
121011
- onLoad: () => setLoadedKey(frameKey),
121489
+ onLoad: () => {
121490
+ setLoadedKey(frameKey);
121491
+ bridgeLoad.current.loaded = true;
121492
+ bridgeLoad.current.onLoad?.();
121493
+ },
121012
121494
  style: frameStyle
121013
121495
  };
121014
121496
  const showLoading = !loaded && (config.loadingText != null || config.showProgressBar) && (htmlStr != null || urlFrame != null);
121015
121497
  const rawBand = config.coverBandColor ?? props.coverBandColor;
121016
121498
  const bandColor = typeof rawBand === "string" && rawBand.length > 0 ? rawBand : void 0;
121017
- return /* @__PURE__ */ jsxs8("div", { style: { width: "100%", position: "relative", ...bandColor ? { background: bandColor, borderRadius: ctx.radius("md", 8), overflow: "hidden" } : {}, ...wrap }, children: [
121499
+ return /* @__PURE__ */ jsxs8("div", { style: { width: "100%", position: "relative", ...fill ? { height: "100%", flex: "1 1 0", minHeight: 0, display: "flex", flexDirection: "column" } : {}, ...bandColor ? { background: bandColor, borderRadius: ctx.radius("md", 8), overflow: "hidden" } : {}, ...wrap }, children: [
121018
121500
  bandColor ? /* @__PURE__ */ jsx11("div", { "data-testid": "webview-cover-band", style: { height: 8, background: bandColor } }) : null,
121019
- htmlStr ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, srcDoc: htmlStr, sandbox: "allow-scripts" }) : urlFrame ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, src: urlFrame.src, sandbox: urlFrame.sandbox }) : /* @__PURE__ */ jsx11("div", { style: { ...frameStyle, display: "grid", placeItems: "center", color: "#999", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), border: "1px dashed #ccc" }, children: urlStr ? "WebView (url not allowed)" : "WebView (no url)" }),
121501
+ htmlStr ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, srcDoc: htmlStr, sandbox: "allow-scripts" }, frameKey ?? void 0) : urlFrame ? /* @__PURE__ */ jsx11("iframe", { ...frameProps, src: urlFrame.src, sandbox: urlFrame.sandbox }, frameKey ?? void 0) : /* @__PURE__ */ jsx11("div", { style: { ...frameStyle, display: "grid", placeItems: "center", color: "#999", fontFamily: "ui-monospace, monospace", fontSize: pxToRem(11), border: "1px dashed #ccc" }, children: urlStr ? "WebView (url not allowed)" : "WebView (no url)" }),
121502
+ bridgeChannel ? /* @__PURE__ */ jsx11(React12.Suspense, { fallback: null, children: /* @__PURE__ */ jsx11(
121503
+ WebViewBridgeHost2,
121504
+ {
121505
+ channel: bridgeChannel,
121506
+ props,
121507
+ ctx,
121508
+ nodeId,
121509
+ urlStr,
121510
+ htmlStr,
121511
+ allowedOrigins: config.allowedOrigins,
121512
+ reloadKey,
121513
+ frameRef,
121514
+ load: bridgeLoad.current
121515
+ }
121516
+ ) }) : null,
121020
121517
  showLoading ? /* @__PURE__ */ jsxs8("div", { "data-testid": "webview-loading", role: "status", "aria-live": "polite", "aria-label": config.loadingText ? void 0 : "Loading", style: { position: "absolute", left: 0, right: 0, top: bandColor ? 8 : 0, bottom: 0, display: "grid", placeItems: "center", pointerEvents: "none", fontFamily: bodyFont(ctx), fontSize: pxToRem(13), color: ctx.color("textSecondary", "#666") }, children: [
121021
121518
  config.showProgressBar ? /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: { position: "absolute", left: 0, top: 0, height: 3, width: "40%", background: ctx.color("accentPrimary", "#116DFF") } }) : null,
121022
121519
  config.loadingText ?? null
@@ -121027,24 +121524,24 @@ var init_renderNode = __esm({
121027
121524
  const placeholderText = useBoundString(props.placeholder, ctx);
121028
121525
  const C2 = ctx.color;
121029
121526
  const optionsPath = props.optionsPath;
121030
- const bound = useBoundValue(ctx, typeof optionsPath === "string" && isBinding(optionsPath) ? optionsPath : "");
121031
- const opts = Array.isArray(bound) && bound.length ? bound : Array.isArray(props.options) ? props.options : [];
121527
+ const bound2 = useBoundValue(ctx, typeof optionsPath === "string" && isBinding(optionsPath) ? optionsPath : "");
121528
+ const opts = Array.isArray(bound2) && bound2.length ? bound2 : Array.isArray(props.options) ? props.options : [];
121032
121529
  const onChange = props.onChange;
121033
121530
  const boundSel = useResolvedScalar(isBinding(props.selectedId) ? props.selectedId : void 0, ctx);
121034
121531
  const selectedId = isBinding(props.selectedId) ? boundSel : props.selectedId;
121035
- const [sel, setSel] = React11.useState(ctx.empty ? "" : String(selectedId ?? ""));
121036
- React11.useEffect(() => {
121532
+ const [sel, setSel] = React12.useState(ctx.empty ? "" : String(selectedId ?? ""));
121533
+ React12.useEffect(() => {
121037
121534
  if (!ctx.empty && selectedId != null) setSel(String(selectedId));
121038
121535
  }, [selectedId, ctx.empty]);
121039
- const pickerBag = React11.useContext(FormValuesContext);
121536
+ const pickerBag = React12.useContext(FormValuesContext);
121040
121537
  const pickerFieldId = props.__formFieldId;
121041
121538
  const pickerRuleKey = props.validation ? JSON.stringify(props.validation) : "";
121042
- React11.useEffect(() => {
121539
+ React12.useEffect(() => {
121043
121540
  if (!pickerBag || !pickerFieldId) return;
121044
121541
  pickerBag.register(pickerFieldId, props.validation);
121045
121542
  return () => pickerBag.unregister(pickerFieldId);
121046
121543
  }, [pickerFieldId, pickerBag, pickerRuleKey]);
121047
- React11.useEffect(() => {
121544
+ React12.useEffect(() => {
121048
121545
  if (pickerBag && pickerFieldId) pickerBag.set(pickerFieldId, sel);
121049
121546
  }, [sel, pickerFieldId, pickerBag]);
121050
121547
  const emitPick = (id) => {
@@ -121160,24 +121657,24 @@ var init_renderNode = __esm({
121160
121657
  const s2 = seedUnix();
121161
121658
  return s2 == null ? null : clampUnix(s2);
121162
121659
  };
121163
- const [val, setVal] = React11.useState(ctx.empty ? "" : toInput(shownSeed()));
121660
+ const [val, setVal] = React12.useState(ctx.empty ? "" : toInput(shownSeed()));
121164
121661
  const dateServiceBound = typeof props.valuePath === "string" && props.valuePath.startsWith("$service:");
121165
121662
  const bagSource = () => dateServiceBound ? boundRaw : boundRaw !== void 0 && boundRaw !== null && boundRaw !== "" ? boundRaw : props.valueUnix;
121166
- const [dateBagVal, setDateBagVal] = React11.useState(ctx.empty ? "" : clampDateFieldValue(encodeDateFieldValue(bagSource()), props.minUnix, props.maxUnix, props.mode));
121167
- React11.useEffect(() => {
121663
+ const [dateBagVal, setDateBagVal] = React12.useState(ctx.empty ? "" : clampDateFieldValue(encodeDateFieldValue(bagSource()), props.minUnix, props.maxUnix, props.mode));
121664
+ React12.useEffect(() => {
121168
121665
  if (ctx.empty) return;
121169
121666
  setVal(toInput(shownSeed()));
121170
121667
  setDateBagVal(clampDateFieldValue(encodeDateFieldValue(bagSource()), props.minUnix, props.maxUnix, props.mode));
121171
121668
  }, [boundRaw, props.valueUnix, props.valuePath, ctx.empty]);
121172
- const dateBag = React11.useContext(FormValuesContext);
121669
+ const dateBag = React12.useContext(FormValuesContext);
121173
121670
  const dateFieldId = props.__formFieldId;
121174
121671
  const dateRuleKey = props.validation ? JSON.stringify(props.validation) : "";
121175
- React11.useEffect(() => {
121672
+ React12.useEffect(() => {
121176
121673
  if (!dateBag || !dateFieldId) return;
121177
121674
  dateBag.register(dateFieldId, props.validation);
121178
121675
  return () => dateBag.unregister(dateFieldId);
121179
121676
  }, [dateFieldId, dateBag, dateRuleKey]);
121180
- React11.useEffect(() => {
121677
+ React12.useEffect(() => {
121181
121678
  if (dateBag && dateFieldId) dateBag.set(dateFieldId, dateBagVal);
121182
121679
  }, [dateBagVal, dateFieldId, dateBag]);
121183
121680
  if (!ctx.onAction) {
@@ -121246,11 +121743,11 @@ var init_renderNode = __esm({
121246
121743
  const valueBinding = isBinding(props.value) ? props.value : void 0;
121247
121744
  const boundValue = useResolvedScalar(valueBinding, ctx);
121248
121745
  const initialValue2 = ctx.empty ? "" : valueBinding ? boundValue == null ? "" : String(boundValue) : String(props.value ?? "");
121249
- const [local, setLocal] = React11.useState(initialValue2);
121250
- React11.useEffect(() => {
121746
+ const [local, setLocal] = React12.useState(initialValue2);
121747
+ React12.useEffect(() => {
121251
121748
  if (!ctx.empty && valueBinding) setLocal(boundValue == null ? "" : String(boundValue));
121252
121749
  }, [boundValue, ctx.empty, valueBinding]);
121253
- const timer = React11.useRef(null);
121750
+ const timer = React12.useRef(null);
121254
121751
  const dispatch = (action, v2) => {
121255
121752
  if (!action || !ctx.onAction) return;
121256
121753
  ctx.onAction({ ...action, params: { ...action.params ?? {}, value: v2 }, args: { ...action.args ?? {}, value: v2 } });
@@ -121292,33 +121789,33 @@ var init_renderNode = __esm({
121292
121789
  const boundValue = useResolvedScalar(props.valuePath, ctx);
121293
121790
  const effectiveValue = props.valuePath != null ? boundValue : props.value;
121294
121791
  const fallbackValue = effectiveValue ?? props.value ?? 0;
121295
- const [value, setValue] = React11.useState(() => {
121792
+ const [value, setValue] = React12.useState(() => {
121296
121793
  const seed2 = Number(fallbackValue);
121297
121794
  return Number.isFinite(seed2) ? Math.min(max, Math.max(min, seed2)) : 0;
121298
121795
  });
121299
- React11.useEffect(() => {
121796
+ React12.useEffect(() => {
121300
121797
  const next = Number(fallbackValue);
121301
121798
  if (Number.isFinite(next)) setValue(Math.min(max, Math.max(min, next)));
121302
121799
  }, [fallbackValue, min, max]);
121303
- const stepperBag = React11.useContext(FormValuesContext);
121800
+ const stepperBag = React12.useContext(FormValuesContext);
121304
121801
  const stepperFieldId = props.__formFieldId;
121305
121802
  const stepperRuleKey = props.validation ? JSON.stringify(props.validation) : "";
121306
- React11.useEffect(() => {
121803
+ React12.useEffect(() => {
121307
121804
  if (!stepperBag || !stepperFieldId) return;
121308
121805
  stepperBag.register(stepperFieldId, props.validation);
121309
121806
  return () => stepperBag.unregister(stepperFieldId);
121310
121807
  }, [stepperFieldId, stepperBag, stepperRuleKey]);
121311
121808
  const serviceBound = typeof props.valuePath === "string" && isBinding(props.valuePath) && props.valuePath.startsWith("$service:");
121312
- const [bagValue, setBagValue] = React11.useState(() => serviceBound ? boundValue != null ? encodeStepperFieldValue(boundValue, { min, max }) : "" : encodeStepperFieldValue(value, { min, max }));
121313
- React11.useEffect(() => {
121809
+ const [bagValue, setBagValue] = React12.useState(() => serviceBound ? boundValue != null ? encodeStepperFieldValue(boundValue, { min, max }) : "" : encodeStepperFieldValue(value, { min, max }));
121810
+ React12.useEffect(() => {
121314
121811
  if (!serviceBound || boundValue == null) return;
121315
121812
  setBagValue(encodeStepperFieldValue(boundValue, { min, max }));
121316
121813
  }, [boundValue, serviceBound, min, max]);
121317
- React11.useEffect(() => {
121814
+ React12.useEffect(() => {
121318
121815
  if (serviceBound) return;
121319
121816
  setBagValue(encodeStepperFieldValue(value, { min, max }));
121320
121817
  }, [value, serviceBound, min, max]);
121321
- React11.useEffect(() => {
121818
+ React12.useEffect(() => {
121322
121819
  if (stepperBag && stepperFieldId) stepperBag.set(stepperFieldId, bagValue);
121323
121820
  }, [bagValue, stepperFieldId, stepperBag]);
121324
121821
  const dispatch = (next) => {
@@ -121333,7 +121830,7 @@ var init_renderNode = __esm({
121333
121830
  dispatch(next);
121334
121831
  return next;
121335
121832
  };
121336
- const [pressed, setPressed] = React11.useState({ text: "", count: 0 });
121833
+ const [pressed, setPressed] = React12.useState({ text: "", count: 0 });
121337
121834
  const bump = (delta) => commit(value + delta);
121338
121835
  const press = (delta) => {
121339
121836
  const next = bump(delta);
@@ -121477,9 +121974,9 @@ var init_renderNode = __esm({
121477
121974
  const items = Array.isArray(props.items) ? props.items : [];
121478
121975
  const gridStagger = ctx.reduceMotion() ? 0 : Number(props.staggerMs ?? props.stagger_ms ?? 0);
121479
121976
  const stagger = (el2, i2) => {
121480
- if (!(gridStagger > 0) || !React11.isValidElement(el2)) return el2;
121977
+ if (!(gridStagger > 0) || !React12.isValidElement(el2)) return el2;
121481
121978
  const prev = el2.props.style ?? {};
121482
- return React11.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
121979
+ return React12.cloneElement(el2, { style: { ...prev, animationDelay: `${i2 * gridStagger}ms` } });
121483
121980
  };
121484
121981
  const inner = itemsPath && items[0] && ctx.provider ? /* @__PURE__ */ jsx11(
121485
121982
  BoundList,
@@ -121554,13 +122051,13 @@ var init_renderNode = __esm({
121554
122051
  revealProgress = /* @__PURE__ */ new Map();
121555
122052
  countWords = (s2) => s2.split(/\s+/).filter((t2) => t2 !== "").length;
121556
122053
  RevealText = ({ text: text11, reduce, markdownHtml }) => {
121557
- const tokens2 = React11.useMemo(() => text11.split(/(\s+)/).filter((t2) => t2 !== ""), [text11]);
121558
- const total = React11.useMemo(
122054
+ const tokens2 = React12.useMemo(() => text11.split(/(\s+)/).filter((t2) => t2 !== ""), [text11]);
122055
+ const total = React12.useMemo(
121559
122056
  () => markdownHtml != null ? revealHtml(markdownHtml, 0, void 0).total : countWords(text11),
121560
122057
  [text11, markdownHtml]
121561
122058
  );
121562
- const [shown2, setShown] = React11.useState(total);
121563
- const prevRef = React11.useRef(null);
122059
+ const [shown2, setShown] = React12.useState(total);
122060
+ const prevRef = React12.useRef(null);
121564
122061
  useIsomorphicLayoutEffect(() => {
121565
122062
  const prev = prevRef.current;
121566
122063
  prevRef.current = text11;
@@ -121636,9 +122133,9 @@ var init_renderNode = __esm({
121636
122133
  }
121637
122134
  }
121638
122135
  if (collapse) {
121639
- const bound = isBinding(props.text) && props.text.startsWith("$service:");
121640
- if (!bound || ctx.provider) {
121641
- const eff = bound ? resolvedForCollapse : isBinding(props.text) ? resolveScalarStatic(props.text, ctx) : props.text;
122136
+ const bound2 = isBinding(props.text) && props.text.startsWith("$service:");
122137
+ if (!bound2 || ctx.provider) {
122138
+ const eff = bound2 ? resolvedForCollapse : isBinding(props.text) ? resolveScalarStatic(props.text, ctx) : props.text;
121642
122139
  const s2 = eff == null ? "" : String(eff).trim();
121643
122140
  if (s2 === "" || s2 === "\u2014") return null;
121644
122141
  }
@@ -121683,8 +122180,8 @@ var init_renderNode = __esm({
121683
122180
  const boundInitials = useResolvedScalar(props.initials != null && isBinding(props.initials) ? props.initials : void 0, ctx);
121684
122181
  const boundAlt = useResolvedScalar(contentDescription, ctx);
121685
122182
  const fadeIn = motionDefaultsAnimate(ctx);
121686
- const [shownSrc, setShownSrc] = React11.useState(null);
121687
- const imgRef = React11.useRef(null);
122183
+ const [shownSrc, setShownSrc] = React12.useState(null);
122184
+ const imgRef = React12.useRef(null);
121688
122185
  const hasSource = props.url != null || props.initials != null || props.asset != null || props.icon != null;
121689
122186
  const banner = fillWidth === true || props.width == null && props.height == null && !props.initials;
121690
122187
  const w2 = banner ? "100%" : props.width ?? 40;
@@ -121698,7 +122195,7 @@ var init_renderNode = __esm({
121698
122195
  const ph = props.placeholder ? C2(props.placeholder, "#e6e6e6") : void 0;
121699
122196
  const imgUrl = props.url != null && isBinding(props.url) ? boundUrl : props.url;
121700
122197
  const imgInitials = props.initials != null && isBinding(props.initials) ? boundInitials : props.initials;
121701
- const [failedSrc, setFailedSrc] = React11.useState(null);
122198
+ const [failedSrc, setFailedSrc] = React12.useState(null);
121702
122199
  const resolvedSrc = imgUrl && typeof imgUrl === "string" ? resolveAssetUrl(imgUrl, ctx.assetBaseUrl) : null;
121703
122200
  const imgShown = !fadeIn || resolvedSrc != null && shownSrc === resolvedSrc;
121704
122201
  useIsomorphicLayoutEffect(() => {
@@ -121731,7 +122228,7 @@ var init_renderNode = __esm({
121731
122228
  if (imgInitials && typeof imgInitials === "string") {
121732
122229
  const alt = asText2(boundAlt).trim();
121733
122230
  const circle = avatarCircle(String(imgInitials), typeof w2 === "number" ? w2 : 40, C2, false, bodyFont(ctx));
121734
- return React11.cloneElement(circle, alt ? { role: "img", "aria-label": alt, [SELF_RENDERED_LEAF]: true } : { [ROLE_WHEN_NAMED]: "img", [SELF_RENDERED_LEAF]: true });
122231
+ return React12.cloneElement(circle, alt ? { role: "img", "aria-label": alt, [SELF_RENDERED_LEAF]: true } : { [ROLE_WHEN_NAMED]: "img", [SELF_RENDERED_LEAF]: true });
121735
122232
  }
121736
122233
  if (props.icon != null && props.url == null && props.asset == null && imgInitials == null) {
121737
122234
  const side2 = typeof w2 === "number" ? w2 : 40;
@@ -121746,13 +122243,13 @@ var init_renderNode = __esm({
121746
122243
  const reduce = ctx.reduceMotion();
121747
122244
  const servicePlayPath = typeof props.playPath === "string" && props.playPath.startsWith("$service:") ? props.playPath : void 0;
121748
122245
  const nonce = lottieNonce(useResolvedScalar(servicePlayPath, ctx));
121749
- const [replay, setReplay] = React11.useState({ plays: 0 });
121750
- const [gen, setGen] = React11.useState(0);
121751
- React11.useEffect(() => {
122246
+ const [replay, setReplay] = React12.useState({ plays: 0 });
122247
+ const [gen, setGen] = React12.useState(0);
122248
+ React12.useEffect(() => {
121752
122249
  setReplay((s2) => ({ plays: s2.plays }));
121753
122250
  setGen((g2) => g2 + 1);
121754
122251
  }, [servicePlayPath, ctx.provider, props.source]);
121755
- React11.useEffect(() => {
122252
+ React12.useEffect(() => {
121756
122253
  setReplay((s2) => lottieReplayStep(s2, nonce, reduce));
121757
122254
  }, [nonce, servicePlayPath, ctx.provider, props.source]);
121758
122255
  return /* @__PURE__ */ jsx11(
@@ -121803,14 +122300,14 @@ var init_renderNode = __esm({
121803
122300
  const C2 = ctx.color;
121804
122301
  const effectStyle = useSymbolEffect(props.effect, ctx.reduceMotion);
121805
122302
  const size = props.size ?? 22;
121806
- const bound = useResolvedScalar(isBinding(props.name) ? props.name : void 0, ctx);
121807
- const iconName = isBinding(props.name) ? String(bound ?? "") : props.name;
122303
+ const bound2 = useResolvedScalar(isBinding(props.name) ? props.name : void 0, ctx);
122304
+ const iconName = isBinding(props.name) ? String(bound2 ?? "") : props.name;
121808
122305
  const contentDescription = useResolvedScalar(props.contentDescription, ctx);
121809
122306
  const described = contentDescription != null && String(contentDescription).trim() !== "";
121810
122307
  const a11y = described ? { role: "img", "aria-label": String(contentDescription), [SELF_RENDERED_LEAF]: true } : { "aria-hidden": "true", [INFERRED_DECORATIVE]: true, [SELF_RENDERED_LEAF]: true, [ROLE_WHEN_NAMED]: "img" };
121811
122308
  const glyph = iconSvg(iconName, { size, color: C2(resolveScalarStatic(props.tint, ctx) ?? "textPrimary", "#636b78") });
121812
122309
  const swap = useIconSwap(iconName, ctx);
121813
- const animatedGlyph = Object.keys(effectStyle).length || swap.key > 0 ? React11.cloneElement(glyph, { style: { ...glyph.props.style, ...swap.style, ...effectStyle }, key: swap.key }) : glyph;
122310
+ const animatedGlyph = Object.keys(effectStyle).length || swap.key > 0 ? React12.cloneElement(glyph, { style: { ...glyph.props.style, ...swap.style, ...effectStyle }, key: swap.key }) : glyph;
121814
122311
  return /* @__PURE__ */ jsx11("span", { ...a11y, style: { display: "inline-grid", placeItems: "center", width: size + 6, height: size + 6, lineHeight: 1, flex: "none", ...wrap }, children: animatedGlyph });
121815
122312
  });
121816
122313
  EMPTY_STATE_SPACING = {
@@ -121995,14 +122492,14 @@ var init_renderNode = __esm({
121995
122492
  });
121996
122493
  OtpInputNode = withExtras("OtpInputNode", ({ props, ctx, wrap }) => {
121997
122494
  const C2 = ctx.color;
121998
- const bound = useResolvedScalar(props.valuePath, ctx);
121999
- const boundText = props.valuePath != null ? typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : "" : void 0;
122000
- const [typed, setTyped] = React11.useState(void 0);
122001
- React11.useEffect(() => {
122495
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
122496
+ const boundText = props.valuePath != null ? typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) : "" : void 0;
122497
+ const [typed, setTyped] = React12.useState(void 0);
122498
+ React12.useEffect(() => {
122002
122499
  setTyped(void 0);
122003
122500
  }, [boundText, props.value, props.valuePath, typeof props.valuePath === "string" && props.valuePath.startsWith("$service:") ? ctx.provider : null]);
122004
122501
  const otpPath = typeof props.valuePath === "string" && props.valuePath.startsWith("$service:") ? servicePath(props.valuePath) : "";
122005
- React11.useEffect(() => {
122502
+ React12.useEffect(() => {
122006
122503
  if (!ctx.provider || !otpPath) return;
122007
122504
  let subscribing = true;
122008
122505
  let active = true;
@@ -122093,10 +122590,10 @@ var init_renderNode = __esm({
122093
122590
  return /* @__PURE__ */ jsx11("div", { ...a11y, style: { width: "100%", height: 6, borderRadius: 999, background: C2(boundTokenName(props.trackColorPath, props.trackColor, ctx) ?? "surfaceTertiary", "#eee"), overflow: "hidden", ...wrap }, children: /* @__PURE__ */ jsx11("div", { style: { width: `${Math.round((p2 ?? 0.4) * 100)}%`, height: "100%", borderRadius: 999, background: C2(boundTokenName(props.tintPath, props.tint, ctx) ?? "accentPrimary", "#116DFF"), opacity: p2 == null ? 0.45 : 1, ...animatedFill ? { transition: ctx.motionTransition(ctx.kit?.motion) } : {} } }) });
122094
122591
  });
122095
122592
  SnackbarNode = withExtras("SnackbarNode", ({ props, ctx, wrap }) => {
122096
- const [phase, setPhase] = React11.useState("shown");
122593
+ const [phase, setPhase] = React12.useState("shown");
122097
122594
  const hideAfter = ctx.empty ? void 0 : snackbarAutoHideMs(props.durationMs);
122098
122595
  const identity = snackbarIdentity(props);
122099
- React11.useEffect(() => {
122596
+ React12.useEffect(() => {
122100
122597
  setPhase("shown");
122101
122598
  if (hideAfter === void 0) return;
122102
122599
  let fade;
@@ -122125,8 +122622,8 @@ var init_renderNode = __esm({
122125
122622
  const tint = C2(boundTokenName(props.tintPath, props.tint, ctx) ?? "accentPrimary", "#116DFF");
122126
122623
  const track = activityRingTrack(C2, tint, { cssMix: true });
122127
122624
  const thick = Math.max(3, Math.round(size / 8));
122128
- const bound = useResolvedScalar(props.valuePath, ctx);
122129
- const aiRaw = props.valuePath != null ? bound : props.value;
122625
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
122626
+ const aiRaw = props.valuePath != null ? bound2 : props.value;
122130
122627
  const aiNum = typeof aiRaw === "number" ? aiRaw : typeof aiRaw === "string" && aiRaw.trim() !== "" ? Number(aiRaw) : void 0;
122131
122628
  const determinate = !props.indeterminate && aiNum !== void 0 && Number.isFinite(aiNum);
122132
122629
  if (determinate) {
@@ -122148,12 +122645,12 @@ var init_renderNode = __esm({
122148
122645
  ModalBottomSheetNode = withExtras("ModalBottomSheetNode", ({ props, ctx, wrap }) => {
122149
122646
  const sheetTitle = useBoundString(props.title, ctx);
122150
122647
  const C2 = ctx.color;
122151
- const bound = useResolvedScalar(props.presentedPath, ctx);
122648
+ const bound2 = useResolvedScalar(props.presentedPath, ctx);
122152
122649
  const gated2 = props.presentedPath != null || props.presented != null;
122153
- const presented = props.presentedPath != null ? bound : props.presented;
122650
+ const presented = props.presentedPath != null ? bound2 : props.presented;
122154
122651
  const gateOpen = !gated2 || presented === true || presented === "true";
122155
- const [dismissed, setDismissed] = React11.useState(false);
122156
- React11.useEffect(() => {
122652
+ const [dismissed, setDismissed] = React12.useState(false);
122653
+ React12.useEffect(() => {
122157
122654
  if (!gateOpen) setDismissed(false);
122158
122655
  }, [gateOpen]);
122159
122656
  const shown2 = gateOpen && !dismissed;
@@ -122161,26 +122658,26 @@ var init_renderNode = __esm({
122161
122658
  const dismissible = props.dismissible !== false;
122162
122659
  const edge = sheetEdge(props.edge);
122163
122660
  const detents = edge === "bottom" ? sheetDetents(props.detents) : [];
122164
- const [detentIndex, setDetentIndex] = React11.useState(0);
122165
- React11.useEffect(() => {
122661
+ const [detentIndex, setDetentIndex] = React12.useState(0);
122662
+ React12.useEffect(() => {
122166
122663
  if (!shown2) setDetentIndex(0);
122167
122664
  }, [shown2]);
122168
- const dialogRef = React11.useRef(null);
122665
+ const dialogRef = React12.useRef(null);
122169
122666
  const trapTab = useModalOverlay(dialogRef, shown2 && modal);
122170
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
122667
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss });
122171
122668
  latest.current = { ctx, onDismiss: props.onDismiss };
122172
- const closed = React11.useRef(false);
122173
- React11.useEffect(() => {
122669
+ const closed = React12.useRef(false);
122670
+ React12.useEffect(() => {
122174
122671
  if (shown2) closed.current = false;
122175
122672
  }, [shown2]);
122176
- const dismiss = React11.useCallback(() => {
122673
+ const dismiss = React12.useCallback(() => {
122177
122674
  if (closed.current) return;
122178
122675
  closed.current = true;
122179
122676
  setDismissed(true);
122180
122677
  const { ctx: now, onDismiss } = latest.current;
122181
122678
  if (onDismiss != null) now.onAction?.(resolveItemDeep2(onDismiss, now));
122182
122679
  }, []);
122183
- React11.useEffect(() => {
122680
+ React12.useEffect(() => {
122184
122681
  if (!shown2 || !dismissible) return;
122185
122682
  const doc = dialogRef.current?.ownerDocument;
122186
122683
  if (!doc) return;
@@ -122194,11 +122691,11 @@ var init_renderNode = __esm({
122194
122691
  doc.addEventListener("keydown", onKey, true);
122195
122692
  return () => doc.removeEventListener("keydown", onKey, true);
122196
122693
  }, [shown2, dismissible, dismiss]);
122197
- const drag = React11.useRef(null);
122694
+ const drag = React12.useRef(null);
122198
122695
  const reduceMotion = ctx.reduceMotion();
122199
- const [mounted, setMounted] = React11.useState(shown2);
122200
- const [entered, setEntered] = React11.useState(shown2 && ctx.staticRender === true);
122201
- React11.useEffect(() => {
122696
+ const [mounted, setMounted] = React12.useState(shown2);
122697
+ const [entered, setEntered] = React12.useState(shown2 && ctx.staticRender === true);
122698
+ React12.useEffect(() => {
122202
122699
  if (shown2) {
122203
122700
  setMounted(true);
122204
122701
  if (reduceMotion || typeof requestAnimationFrame !== "function") {
@@ -122222,8 +122719,8 @@ var init_renderNode = __esm({
122222
122719
  const t2 = setTimeout(() => setMounted(false), DRAWER_EXIT_MS);
122223
122720
  return () => clearTimeout(t2);
122224
122721
  }, [shown2, reduceMotion]);
122225
- const scrimRef = React11.useRef(null);
122226
- const [rtl, setRtl] = React11.useState(false);
122722
+ const scrimRef = React12.useRef(null);
122723
+ const [rtl, setRtl] = React12.useState(false);
122227
122724
  useIsomorphicLayoutEffect(() => {
122228
122725
  const el2 = scrimRef.current;
122229
122726
  if (el2 && el2.ownerDocument.defaultView) setRtl(el2.ownerDocument.defaultView.getComputedStyle(el2).direction === "rtl");
@@ -122327,12 +122824,12 @@ var init_renderNode = __esm({
122327
122824
  BottomDrawerNode = withExtras("BottomDrawerNode", ({ props, ctx, wrap, nodeId, nodeExtras = {} }) => {
122328
122825
  const C2 = ctx.color;
122329
122826
  const label3 = useBoundString(props.label, ctx);
122330
- const bound = useResolvedScalar(props.presentedPath, ctx);
122827
+ const bound2 = useResolvedScalar(props.presentedPath, ctx);
122331
122828
  const gated2 = props.presentedPath != null || props.presented != null;
122332
- const presented = props.presentedPath != null ? bound : props.presented;
122829
+ const presented = props.presentedPath != null ? bound2 : props.presented;
122333
122830
  const gateOpen = !gated2 || presented === true || presented === "true";
122334
- const [dismissed, setDismissed] = React11.useState(false);
122335
- React11.useEffect(() => {
122831
+ const [dismissed, setDismissed] = React12.useState(false);
122832
+ React12.useEffect(() => {
122336
122833
  if (!gateOpen) setDismissed(false);
122337
122834
  }, [gateOpen]);
122338
122835
  const shown2 = gateOpen && !dismissed;
@@ -122340,18 +122837,18 @@ var init_renderNode = __esm({
122340
122837
  const autoMs = drawerAutoDismissMs(props.autoDismissMs);
122341
122838
  const placement = sheetPlacement(props.placement);
122342
122839
  const detents = sheetDetents(props.detents);
122343
- const [detentIndex, setDetentIndex] = React11.useState(0);
122344
- const [expanded, setExpanded] = React11.useState(false);
122345
- React11.useEffect(() => {
122840
+ const [detentIndex, setDetentIndex] = React12.useState(0);
122841
+ const [expanded, setExpanded] = React12.useState(false);
122842
+ React12.useEffect(() => {
122346
122843
  if (!shown2) {
122347
122844
  setDetentIndex(0);
122348
122845
  setExpanded(false);
122349
122846
  }
122350
122847
  }, [shown2]);
122351
122848
  const reduceMotion = ctx.reduceMotion();
122352
- const [mounted, setMounted] = React11.useState(shown2);
122353
- const [entered, setEntered] = React11.useState(shown2 && ctx.staticRender === true);
122354
- React11.useEffect(() => {
122849
+ const [mounted, setMounted] = React12.useState(shown2);
122850
+ const [entered, setEntered] = React12.useState(shown2 && ctx.staticRender === true);
122851
+ React12.useEffect(() => {
122355
122852
  if (shown2) {
122356
122853
  setMounted(true);
122357
122854
  if (reduceMotion || typeof requestAnimationFrame !== "function") {
@@ -122375,10 +122872,10 @@ var init_renderNode = __esm({
122375
122872
  const t2 = setTimeout(() => setMounted(false), DRAWER_EXIT_MS);
122376
122873
  return () => clearTimeout(t2);
122377
122874
  }, [shown2, reduceMotion]);
122378
- const anchorRef = React11.useRef(null);
122379
- const panelRef = React11.useRef(null);
122380
- const [host, setHost] = React11.useState(null);
122381
- const [hostTop, setHostTop] = React11.useState(true);
122875
+ const anchorRef = React12.useRef(null);
122876
+ const panelRef = React12.useRef(null);
122877
+ const [host, setHost] = React12.useState(null);
122878
+ const [hostTop, setHostTop] = React12.useState(true);
122382
122879
  useIsomorphicLayoutEffect(() => {
122383
122880
  if (!host) {
122384
122881
  setHostTop(true);
@@ -122406,7 +122903,7 @@ var init_renderNode = __esm({
122406
122903
  setHost(overlay ?? own6(DRAWER_HOST_ATTR));
122407
122904
  }, [mounted, placement]);
122408
122905
  const overHost = host?.hasAttribute(SHEET_OVERLAY_HOST_ATTR) ?? false;
122409
- const [regionPx, setRegionPx] = React11.useState(0);
122906
+ const [regionPx, setRegionPx] = React12.useState(0);
122410
122907
  useIsomorphicLayoutEffect(() => {
122411
122908
  if (!detents.length || !mounted) return;
122412
122909
  const region = host ? overHost ? host.parentElement : host.previousElementSibling : null;
@@ -122433,38 +122930,38 @@ var init_renderNode = __esm({
122433
122930
  resizeObserver?.disconnect();
122434
122931
  };
122435
122932
  }, [host, overHost, mounted, detents.length]);
122436
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
122933
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss });
122437
122934
  latest.current = { ctx, onDismiss: props.onDismiss };
122438
- const closed = React11.useRef(false);
122439
- const remaining = React11.useRef(autoMs ?? 0);
122440
- React11.useEffect(() => {
122935
+ const closed = React12.useRef(false);
122936
+ const remaining = React12.useRef(autoMs ?? 0);
122937
+ React12.useEffect(() => {
122441
122938
  if (!shown2) return;
122442
122939
  closed.current = false;
122443
122940
  remaining.current = autoMs ?? 0;
122444
122941
  }, [shown2, autoMs]);
122445
- const close = React11.useCallback(() => {
122942
+ const close = React12.useCallback(() => {
122446
122943
  if (closed.current) return;
122447
122944
  closed.current = true;
122448
122945
  setDismissed(true);
122449
122946
  const { ctx: now, onDismiss } = latest.current;
122450
122947
  if (onDismiss != null) now.onAction?.(resolveItemDeep2(onDismiss, now));
122451
122948
  }, []);
122452
- const toDetent = React11.useCallback((next, from) => {
122949
+ const toDetent = React12.useCallback((next, from) => {
122453
122950
  if (next > from) setExpanded(true);
122454
122951
  setDetentIndex(next);
122455
122952
  }, []);
122456
- const [hover, setHover] = React11.useState(false);
122457
- const [pressed, setPressed] = React11.useState(false);
122458
- const [focusIn, setFocusIn] = React11.useState(false);
122953
+ const [hover, setHover] = React12.useState(false);
122954
+ const [pressed, setPressed] = React12.useState(false);
122955
+ const [focusIn, setFocusIn] = React12.useState(false);
122459
122956
  const paused = hover || pressed || focusIn;
122460
- React11.useEffect(() => {
122957
+ React12.useEffect(() => {
122461
122958
  if (!shown2) {
122462
122959
  setHover(false);
122463
122960
  setPressed(false);
122464
122961
  setFocusIn(false);
122465
122962
  }
122466
122963
  }, [shown2]);
122467
- React11.useEffect(() => {
122964
+ React12.useEffect(() => {
122468
122965
  if (!shown2 || !hostTop || autoMs == null || paused || expanded) return;
122469
122966
  const since = Date.now();
122470
122967
  const t2 = setTimeout(() => {
@@ -122475,7 +122972,7 @@ var init_renderNode = __esm({
122475
122972
  remaining.current = drawerRemainingMs(remaining.current, Date.now() - since);
122476
122973
  };
122477
122974
  }, [shown2, hostTop, autoMs, paused, expanded, close]);
122478
- React11.useEffect(() => {
122975
+ React12.useEffect(() => {
122479
122976
  if (!shown2 || !dismissible) return;
122480
122977
  const doc = panelRef.current?.ownerDocument;
122481
122978
  if (!doc) return;
@@ -122488,13 +122985,13 @@ var init_renderNode = __esm({
122488
122985
  doc.addEventListener("keydown", onKey, true);
122489
122986
  return () => doc.removeEventListener("keydown", onKey, true);
122490
122987
  }, [shown2, dismissible, close, host]);
122491
- const drag = React11.useRef(null);
122492
- const dragged = React11.useRef(false);
122493
- const [dragDy, setDragDy] = React11.useState(0);
122494
- React11.useEffect(() => {
122988
+ const drag = React12.useRef(null);
122989
+ const dragged = React12.useRef(false);
122990
+ const [dragDy, setDragDy] = React12.useState(0);
122991
+ React12.useEffect(() => {
122495
122992
  if (!shown2) setDragDy(0);
122496
122993
  }, [shown2]);
122497
- const dragState = React11.useRef({ index: 0, count: 0, dismissible });
122994
+ const dragState = React12.useRef({ index: 0, count: 0, dismissible });
122498
122995
  if (!shown2 && !mounted) return /* @__PURE__ */ jsx11("span", { ref: anchorRef, "data-bottom-drawer-anchor": "", hidden: true, ...{ [NODE_EXTRAS_TARGET]: "bottom-drawer-panel" } });
122499
122996
  const sheet = idiomControls(ctx.idiom).sheet;
122500
122997
  const r3 = `${sheet.cornerRadius}px`;
@@ -122636,23 +123133,23 @@ var init_renderNode = __esm({
122636
123133
  const rich = title !== "";
122637
123134
  const trigger = resolveTooltipTrigger(props.trigger, "pointer");
122638
123135
  const edge = resolveOverlayEdge("Tooltip", props.edge);
122639
- const [open, setOpen] = React11.useState(false);
122640
- const anchorRef = React11.useRef(null);
122641
- const bubbleRef = React11.useRef(null);
122642
- const pressTimer = React11.useRef(null);
123136
+ const [open, setOpen] = React12.useState(false);
123137
+ const anchorRef = React12.useRef(null);
123138
+ const bubbleRef = React12.useRef(null);
123139
+ const pressTimer = React12.useRef(null);
122643
123140
  const placement = useFlippedEdge(edge, open, bubbleRef, anchorRef);
122644
123141
  const placed = placement.edge;
122645
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss, open });
123142
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss, open });
122646
123143
  latest.current = { ctx, onDismiss: props.onDismiss, open };
122647
- const holding = React11.useRef({ hover: false, focus: false });
122648
- const [needsTabStop, setNeedsTabStop] = React11.useState(false);
123144
+ const holding = React12.useRef({ hover: false, focus: false });
123145
+ const [needsTabStop, setNeedsTabStop] = React12.useState(false);
122649
123146
  useIsomorphicLayoutEffect(() => {
122650
123147
  const el2 = anchorRef.current;
122651
123148
  const want = trigger === "hover" && el2 != null && !hasTabStop(el2);
122652
123149
  if (want !== needsTabStop) setNeedsTabStop(want);
122653
123150
  });
122654
- const show = React11.useCallback(() => setOpen(true), []);
122655
- const dismiss = React11.useCallback(() => {
123151
+ const show = React12.useCallback(() => setOpen(true), []);
123152
+ const dismiss = React12.useCallback(() => {
122656
123153
  holding.current = { hover: false, focus: false };
122657
123154
  const { ctx: now, onDismiss, open: wasOpen } = latest.current;
122658
123155
  if (!wasOpen) return;
@@ -122660,7 +123157,7 @@ var init_renderNode = __esm({
122660
123157
  setOpen(false);
122661
123158
  if (onDismiss != null) now.onAction?.(resolveItemDeep2(onDismiss, now));
122662
123159
  }, []);
122663
- React11.useEffect(() => {
123160
+ React12.useEffect(() => {
122664
123161
  if (!open) return;
122665
123162
  const doc = bubbleRef.current?.ownerDocument;
122666
123163
  if (!doc) return;
@@ -122684,7 +123181,7 @@ var init_renderNode = __esm({
122684
123181
  if (timer) clearTimeout(timer);
122685
123182
  };
122686
123183
  }, [open, trigger, dismiss]);
122687
- React11.useEffect(() => () => {
123184
+ React12.useEffect(() => () => {
122688
123185
  if (pressTimer.current) clearTimeout(pressTimer.current);
122689
123186
  }, []);
122690
123187
  const cancelPress = () => {
@@ -122724,7 +123221,7 @@ var init_renderNode = __esm({
122724
123221
  };
122725
123222
  const hint = [title, text11].filter((s2) => s2 !== "").join(". ");
122726
123223
  const anchor = props.anchor ? renderNode(props.anchor, ctx) : null;
122727
- const wrapperHintId = `hm-tip-hint${React11.useId()}`;
123224
+ const wrapperHintId = `hm-tip-hint${React12.useId()}`;
122728
123225
  useIsomorphicLayoutEffect(() => {
122729
123226
  const wrapper = anchorRef.current;
122730
123227
  if (!wrapper || !hint || needsTabStop) return;
@@ -122746,7 +123243,7 @@ var init_renderNode = __esm({
122746
123243
  /* @__PURE__ */ jsx11(OverlayAnchorClip, { wrap, children: needsTabStop ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
122747
123244
  anchor,
122748
123245
  hint && /* @__PURE__ */ jsx11("span", { id: wrapperHintId, hidden: true, "data-hm-a11y-hint": "", children: hint })
122749
- ] }) : hint && React11.isValidElement(anchor) ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
123246
+ ] }) : hint && React12.isValidElement(anchor) ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
122750
123247
  /* @__PURE__ */ jsx11(A11yHintDescription, { hint, children: anchor }),
122751
123248
  /* @__PURE__ */ jsx11("span", { id: wrapperHintId, hidden: true, "data-hm-a11y-hint": "", children: hint })
122752
123249
  ] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
@@ -122761,30 +123258,30 @@ var init_renderNode = __esm({
122761
123258
  });
122762
123259
  PopoverNode = withExtras("PopoverNode", ({ props, ctx, wrap }) => {
122763
123260
  const C2 = ctx.color;
122764
- const bound = useResolvedScalar(props.presentedPath, ctx);
123261
+ const bound2 = useResolvedScalar(props.presentedPath, ctx);
122765
123262
  const gated2 = props.presentedPath != null || props.presented != null;
122766
- const gate = props.presentedPath != null ? bound : props.presented;
123263
+ const gate = props.presentedPath != null ? bound2 : props.presented;
122767
123264
  const gateOpen = gate === true || gate === "true";
122768
123265
  const literal = props.presentedPath == null && props.presented != null;
122769
123266
  const identity = { path: props.presentedPath, presented: props.presented, provider: ctx.provider };
122770
- const [local, setLocal] = React11.useState({ ...identity, opened: false, dismissed: false });
123267
+ const [local, setLocal] = React12.useState({ ...identity, opened: false, dismissed: false });
122771
123268
  const sameGate = local.path === identity.path && local.presented === identity.presented && local.provider === identity.provider;
122772
123269
  const current = sameGate ? local : { ...identity, opened: false, dismissed: false };
122773
123270
  if (!sameGate) setLocal(current);
122774
- React11.useEffect(() => {
123271
+ React12.useEffect(() => {
122775
123272
  if (!gateOpen) setLocal((previous) => previous.dismissed ? { ...previous, dismissed: false } : previous);
122776
123273
  }, [gateOpen]);
122777
123274
  const shown2 = !gated2 || (gateOpen || current.opened) && !current.dismissed;
122778
123275
  const modal = gated2 && isOverlayModal("Popover", props.modal);
122779
- const dialogRef = React11.useRef(null);
122780
- const anchorRef = React11.useRef(null);
122781
- const boxRef = React11.useRef(null);
123276
+ const dialogRef = React12.useRef(null);
123277
+ const anchorRef = React12.useRef(null);
123278
+ const boxRef = React12.useRef(null);
122782
123279
  const trapTab = useModalOverlay(dialogRef, shown2 && modal);
122783
123280
  const placement = useFlippedEdge(resolveOverlayEdge("Popover", props.edge), gated2 && shown2, dialogRef, boxRef, 6);
122784
123281
  const placed = placement.edge;
122785
- const latest = React11.useRef({ ctx, onDismiss: props.onDismiss });
123282
+ const latest = React12.useRef({ ctx, onDismiss: props.onDismiss });
122786
123283
  latest.current = { ctx, onDismiss: props.onDismiss };
122787
- React11.useEffect(() => {
123284
+ React12.useEffect(() => {
122788
123285
  if (!gated2 || !shown2) return;
122789
123286
  const doc = dialogRef.current?.ownerDocument;
122790
123287
  if (!doc) return;
@@ -122822,8 +123319,8 @@ var init_renderNode = __esm({
122822
123319
  if (shown2) return;
122823
123320
  setLocal({ ...identity, opened: true, dismissed: false });
122824
123321
  } : void 0;
122825
- const [anchorIsButton, setAnchorIsButton] = React11.useState(false);
122826
- const [needsSeparateOpener, setNeedsSeparateOpener] = React11.useState(false);
123322
+ const [anchorIsButton, setAnchorIsButton] = React12.useState(false);
123323
+ const [needsSeparateOpener, setNeedsSeparateOpener] = React12.useState(false);
122827
123324
  useIsomorphicLayoutEffect(() => {
122828
123325
  const el2 = anchorRef.current;
122829
123326
  const want = literal && el2 != null && !hasTabStop(el2);
@@ -122850,10 +123347,10 @@ var init_renderNode = __esm({
122850
123347
  });
122851
123348
  ChipsInputNode = withExtras("ChipsInputNode", ({ props, ctx, wrap }) => {
122852
123349
  const placeholderText = useBoundString(props.placeholder, ctx);
122853
- const [draft, setDraft] = React11.useState("");
123350
+ const [draft, setDraft] = React12.useState("");
122854
123351
  const C2 = ctx.color;
122855
- const bound = useResolvedScalar(props.valuesPath, ctx);
122856
- const raw = props.valuesPath != null ? bound : props.values;
123352
+ const bound2 = useResolvedScalar(props.valuesPath, ctx);
123353
+ const raw = props.valuesPath != null ? bound2 : props.values;
122857
123354
  const values = Array.isArray(raw) ? raw : [];
122858
123355
  const hasAddField = props.onAdd != null;
122859
123356
  const canAdd = !!ctx.onAction && hasAddField && !props.disabled;
@@ -122942,9 +123439,9 @@ var init_renderNode = __esm({
122942
123439
  });
122943
123440
  TableNode = withExtras("TableNode", ({ props, ctx, wrap }) => {
122944
123441
  const C2 = ctx.color;
122945
- const bound = useResolvedScalar(props.rowsPath, ctx);
123442
+ const bound2 = useResolvedScalar(props.rowsPath, ctx);
122946
123443
  const cols = Array.isArray(props.columns) ? props.columns : [];
122947
- const rawRows = props.rowsPath != null ? bound : props.rows;
123444
+ const rawRows = props.rowsPath != null ? bound2 : props.rows;
122948
123445
  const rows = Array.isArray(rawRows) ? rawRows : [];
122949
123446
  const cellStyle = (head) => ({ padding: "8px 12px", fontFamily: bodyFont(ctx), fontSize: pxToRem(14), textAlign: "left", borderBottom: `1px solid ${C2("border", "#eceef1")}`, color: head ? C2("textSecondary", "#636b78") : C2("textPrimary", "#13171e"), fontWeight: head ? 600 : 400, whiteSpace: "nowrap" });
122950
123447
  return /* @__PURE__ */ jsx11("div", { style: { width: "100%", boxSizing: "border-box", overflowX: "auto", border: `1px solid ${C2("border", "#e8eaed")}`, borderRadius: 10, ...wrap }, children: /* @__PURE__ */ jsxs8("table", { style: { width: "100%", borderCollapse: "collapse" }, children: [
@@ -122956,8 +123453,8 @@ var init_renderNode = __esm({
122956
123453
  ] }) });
122957
123454
  });
122958
123455
  GaugeRing = ({ ring, ctx, index, size, step, thick, track }) => {
122959
- const bound = useResolvedScalar(ring?.valuePath, ctx);
122960
- const rv = ring?.valuePath != null ? bound : ring?.value;
123456
+ const bound2 = useResolvedScalar(ring?.valuePath, ctx);
123457
+ const rv = ring?.valuePath != null ? bound2 : ring?.value;
122961
123458
  const rp = Math.max(0, Math.min(1, typeof rv === "number" && Number.isFinite(rv) ? rv : 0));
122962
123459
  const rt2 = ctx.color(ring?.tint ?? "accentPrimary", "#116DFF");
122963
123460
  const d2 = size - index * step, off = (size - d2) / 2;
@@ -122967,8 +123464,8 @@ var init_renderNode = __esm({
122967
123464
  GaugeNode = withExtras("GaugeNode", ({ props, ctx, wrap }) => {
122968
123465
  const C2 = ctx.color;
122969
123466
  const min = props.min ?? 0, max = props.max ?? 1;
122970
- const bound = useResolvedScalar(props.valuePath, ctx);
122971
- const gSource = props.valuePath != null ? bound : props.value;
123467
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
123468
+ const gSource = props.valuePath != null ? bound2 : props.value;
122972
123469
  const gRaw = typeof gSource === "string" && gSource.trim() !== "" && Number.isFinite(Number(gSource)) ? Number(gSource) : gSource;
122973
123470
  const v2 = typeof gRaw === "number" ? gRaw : (min + max) / 2;
122974
123471
  const pct = max > min ? Math.max(0, Math.min(1, (v2 - min) / (max - min))) : 0;
@@ -123004,8 +123501,8 @@ var init_renderNode = __esm({
123004
123501
  ratingMetrics = (size) => size === "sm" ? RATING_METRICS.sm : RATING_METRICS.md;
123005
123502
  RatingNode = withExtras("RatingNode", ({ props, ctx, wrap }) => {
123006
123503
  const C2 = ctx.color;
123007
- const bound = useResolvedScalar(props.valuePath, ctx);
123008
- const raw = props.valuePath != null ? bound : props.value;
123504
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
123505
+ const raw = props.valuePath != null ? bound2 : props.value;
123009
123506
  const val = typeof raw === "number" ? raw : 0;
123010
123507
  const max = props.max ?? 5;
123011
123508
  const m2 = ratingMetrics(props.size);
@@ -123023,8 +123520,8 @@ var init_renderNode = __esm({
123023
123520
  AvatarStripNode = withExtras("AvatarStripNode", ({ props, ctx, wrap }) => {
123024
123521
  const C2 = ctx.color;
123025
123522
  const path2 = props.avatarsPath ?? props.avatars_path;
123026
- const bound = useResolvedScalar(path2, ctx);
123027
- const raw = path2 != null ? bound : props.avatars;
123523
+ const bound2 = useResolvedScalar(path2, ctx);
123524
+ const raw = path2 != null ? bound2 : props.avatars;
123028
123525
  const avatars = Array.isArray(raw) ? raw : [];
123029
123526
  const size = props.size ?? 36;
123030
123527
  const maxVisible = props.maxVisible ?? 4;
@@ -123043,7 +123540,7 @@ var init_renderNode = __esm({
123043
123540
  const who = asText2(a2.initials).trim();
123044
123541
  const initials = avatarCircle(who || "?", size, C2, true, bodyFont(ctx));
123045
123542
  const photo = typeof a2.imageUrl === "string" && a2.imageUrl && !isBinding(a2.imageUrl) ? a2.imageUrl : "";
123046
- const circle = photo ? React11.cloneElement(
123543
+ const circle = photo ? React12.cloneElement(
123047
123544
  initials,
123048
123545
  { style: { ...initials.props.style, position: "relative", overflow: "hidden" } },
123049
123546
  initials.props.children,
@@ -123051,7 +123548,7 @@ var init_renderNode = __esm({
123051
123548
  e2.currentTarget.style.display = "none";
123052
123549
  }, style: { position: "absolute", inset: 0, width: "100%", height: "100%", objectFit: "cover" } })
123053
123550
  ) : initials;
123054
- return who ? /* @__PURE__ */ jsx11("div", { role: "listitem", style: wrapStyle, children: React11.cloneElement(circle, { role: "img", "aria-label": who }) }, i2) : /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: wrapStyle, children: circle }, i2);
123551
+ return who ? /* @__PURE__ */ jsx11("div", { role: "listitem", style: wrapStyle, children: React12.cloneElement(circle, { role: "img", "aria-label": who }) }, i2) : /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: wrapStyle, children: circle }, i2);
123055
123552
  }),
123056
123553
  overflow > 0 && /* @__PURE__ */ jsx11("div", { role: "listitem", style: { marginLeft: -(size - shift), width: size, height: size, borderRadius: "50%", border: `2px solid ${C2("surfacePrimary", "#fff")}`, background: C2("surfaceTertiary", "#e6e6e6"), color: C2("textPrimary", "#111"), display: "grid", placeItems: "center", fontSize: size * 0.32, fontWeight: 700, fontFamily: bodyFont(ctx) }, children: /* @__PURE__ */ jsxs8("span", { role: "img", "aria-label": `${overflow} more`, children: [
123057
123554
  "+",
@@ -123072,7 +123569,7 @@ var init_renderNode = __esm({
123072
123569
  const declared = Array.isArray(props.series) ? props.series : [];
123073
123570
  const multi = declared.length > 0;
123074
123571
  const singleBound = useBoundValue(ctx, typeof props.valuesPath === "string" && !multi ? props.valuesPath : "");
123075
- const seriesBindings = React11.useMemo(
123572
+ const seriesBindings = React12.useMemo(
123076
123573
  () => declared.map((d2) => typeof d2?.valuesPath === "string" ? d2.valuesPath : ""),
123077
123574
  // eslint-disable-next-line react-hooks/exhaustive-deps
123078
123575
  [declared.map((d2) => String(d2?.valuesPath ?? "")).join("\0")]
@@ -123166,8 +123663,8 @@ var init_renderNode = __esm({
123166
123663
  donutSliceOpacity = (i2) => Math.max(1 - i2 * 0.18, 0.25);
123167
123664
  DonutChartNode = withExtras("DonutChartNode", ({ props, ctx, wrap }) => {
123168
123665
  const C2 = ctx.color;
123169
- const bound = useResolvedScalar(props.slicesPath, ctx);
123170
- const slices = donutSlices(props.slicesPath != null ? bound : props.slices);
123666
+ const bound2 = useResolvedScalar(props.slicesPath, ctx);
123667
+ const slices = donutSlices(props.slicesPath != null ? bound2 : props.slices);
123171
123668
  const size = props.size ?? 160;
123172
123669
  const thickness = props.thickness ?? 28;
123173
123670
  const base = C2(String(resolveScalarStatic(props.color, ctx) ?? "accentPrimary"), "#116DFF");
@@ -123218,9 +123715,9 @@ var init_renderNode = __esm({
123218
123715
  ] }) });
123219
123716
  });
123220
123717
  ShapeNode = withExtras("ShapeNode", ({ props, ctx, wrap }) => {
123221
- const ref = React11.useRef(null);
123222
- const [box, setBox] = React11.useState(null);
123223
- React11.useEffect(() => {
123718
+ const ref = React12.useRef(null);
123719
+ const [box, setBox] = React12.useState(null);
123720
+ React12.useEffect(() => {
123224
123721
  const el2 = ref.current;
123225
123722
  if (!el2) return;
123226
123723
  const measure2 = () => {
@@ -123296,8 +123793,8 @@ var init_renderNode = __esm({
123296
123793
  };
123297
123794
  LegendNode = withExtras("LegendNode", ({ props, ctx, wrap }) => {
123298
123795
  const C2 = ctx.color;
123299
- const bound = useResolvedScalar(props.itemsPath, ctx);
123300
- const items = legendItems(props.itemsPath != null ? bound : props.items);
123796
+ const bound2 = useResolvedScalar(props.itemsPath, ctx);
123797
+ const items = legendItems(props.itemsPath != null ? bound2 : props.items);
123301
123798
  if (items.length === 0) return /* @__PURE__ */ jsx11("div", { style: { ...wrap } });
123302
123799
  const vertical = props.orientation === "vertical";
123303
123800
  return /* @__PURE__ */ jsx11("ul", { style: {
@@ -123362,8 +123859,8 @@ var init_renderNode = __esm({
123362
123859
  const boundState = useResolvedScalar(props.statePath, ctx);
123363
123860
  const boundDelivery = useResolvedScalar(props.deliveryPath, ctx);
123364
123861
  const boundRate = useResolvedScalar(props.ratePath, ctx);
123365
- const num4 = (bound, literal, dflt) => {
123366
- const v2 = bound !== void 0 && bound !== null ? bound : literal;
123862
+ const num4 = (bound2, literal, dflt) => {
123863
+ const v2 = bound2 !== void 0 && bound2 !== null ? bound2 : literal;
123367
123864
  const n2 = typeof v2 === "number" ? v2 : typeof v2 === "string" ? Number(v2) : NaN;
123368
123865
  return Number.isFinite(n2) ? n2 : dflt;
123369
123866
  };
@@ -123378,10 +123875,10 @@ var init_renderNode = __esm({
123378
123875
  const isPlayable = !isFailed && !isUploading;
123379
123876
  const isPlaying = state === "playing";
123380
123877
  const isLoading = state === "loading";
123381
- const [scrub, setScrub] = React11.useState(null);
123382
- const [seeked, setSeeked] = React11.useState(null);
123878
+ const [scrub, setScrub] = React12.useState(null);
123879
+ const [seeked, setSeeked] = React12.useState(null);
123383
123880
  const positionMs = Math.max(0, num4(props.positionMsPath != null ? boundPosition : void 0, props.positionMs, 0));
123384
- React11.useEffect(() => {
123881
+ React12.useEffect(() => {
123385
123882
  setSeeked(null);
123386
123883
  }, [positionMs]);
123387
123884
  const effectivePositionMs = seeked ?? positionMs;
@@ -123423,8 +123920,8 @@ var init_renderNode = __esm({
123423
123920
  const barW = Math.max(0.6, slot * 0.58);
123424
123921
  const cut2 = progress * W2;
123425
123922
  const rates = Array.isArray(props.rates) ? props.rates.map(Number).filter((n2) => n2 > 0) : [];
123426
- const [pickedRate, setPickedRate] = React11.useState(null);
123427
- React11.useEffect(() => {
123923
+ const [pickedRate, setPickedRate] = React12.useState(null);
123924
+ React12.useEffect(() => {
123428
123925
  setPickedRate(null);
123429
123926
  }, [rate]);
123430
123927
  const effectiveRate = pickedRate ?? rate;
@@ -123575,8 +124072,8 @@ var init_renderNode = __esm({
123575
124072
  });
123576
124073
  TimelineNode = withExtras("TimelineNode", ({ props, ctx, wrap }) => {
123577
124074
  const C2 = ctx.color;
123578
- const bound = useResolvedScalar(props.entriesPath, ctx);
123579
- const raw = props.entriesPath != null ? bound : props.entries;
124075
+ const bound2 = useResolvedScalar(props.entriesPath, ctx);
124076
+ const raw = props.entriesPath != null ? bound2 : props.entries;
123580
124077
  const entries = Array.isArray(raw) ? raw : [];
123581
124078
  return /* @__PURE__ */ jsx11("div", { style: { display: "flex", flexDirection: "column", width: "100%", ...wrap }, children: entries.map((e2, i2) => {
123582
124079
  const done = e2?.done === true;
@@ -123601,9 +124098,9 @@ var init_renderNode = __esm({
123601
124098
  const items = (props.__pager ? props.pages : props.items) ?? [];
123602
124099
  const pages2 = items.filter((page) => isNodeLike(page) || page?.type);
123603
124100
  const requested = Math.max(0, Math.min(pages2.length - 1, props.currentIndex ?? 0));
123604
- const [current, setCurrent] = React11.useState(requested);
123605
- const rail = React11.useRef(null);
123606
- const currentRef = React11.useRef(current);
124101
+ const [current, setCurrent] = React12.useState(requested);
124102
+ const rail = React12.useRef(null);
124103
+ const currentRef = React12.useRef(current);
123607
124104
  const itemsPath = props.itemsPath ?? props.items_path;
123608
124105
  const boundRail = !!itemsPath && !!items[0] && !!ctx.provider;
123609
124106
  const select2 = (index) => {
@@ -123612,12 +124109,12 @@ var init_renderNode = __esm({
123612
124109
  setCurrent(index);
123613
124110
  if (props.onChange && ctx.onAction) ctx.onAction({ ...props.onChange, args: { ...props.onChange.args ?? {}, index } });
123614
124111
  };
123615
- React11.useEffect(() => {
124112
+ React12.useEffect(() => {
123616
124113
  currentRef.current = requested;
123617
124114
  setCurrent(requested);
123618
124115
  if (rail.current && !boundRail) rail.current.scrollLeft = requested * rail.current.clientWidth;
123619
124116
  }, [requested, boundRail, pages2.length]);
123620
- React11.useEffect(() => {
124117
+ React12.useEffect(() => {
123621
124118
  const interval = props.autoplayIntervalMs;
123622
124119
  if (props.__pager || boundRail || !Number.isFinite(interval) || interval <= 0 || pages2.length < 2 || ctx.reduceMotion()) return;
123623
124120
  const timer = setInterval(() => {
@@ -123660,19 +124157,19 @@ var init_renderNode = __esm({
123660
124157
  const opts = Array.isArray(rawOpts) ? rawOpts : [];
123661
124158
  const selectedId = isBinding(props.selectedId) ? boundSel : props.selectedId;
123662
124159
  const selIdx = Math.max(0, opts.findIndex((o2) => o2?.id === selectedId));
123663
- const viewport = React11.useRef(null);
123664
- const settle = React11.useRef(void 0);
123665
- const pickerId = React11.useId();
124160
+ const viewport = React12.useRef(null);
124161
+ const settle = React12.useRef(void 0);
124162
+ const pickerId = React12.useId();
123666
124163
  const interactive = !!ctx.onAction && !!props.onChange;
123667
124164
  const emit = (index) => {
123668
124165
  const id = opts[index]?.id;
123669
124166
  if (!interactive || id == null || index === selIdx) return;
123670
124167
  ctx.onAction({ ...props.onChange, args: { ...props.onChange.args ?? {}, selectedId: String(id) } });
123671
124168
  };
123672
- React11.useEffect(() => {
124169
+ React12.useEffect(() => {
123673
124170
  if (viewport.current) viewport.current.scrollTop = selIdx * 32;
123674
124171
  }, [selIdx, opts.length]);
123675
- React11.useEffect(() => () => clearTimeout(settle.current), []);
124172
+ React12.useEffect(() => () => clearTimeout(settle.current), []);
123676
124173
  return /* @__PURE__ */ jsxs8("div", { style: { position: "relative", width: "100%", maxWidth: 220, height: 160, overflow: "hidden", background: C2("surfaceSecondary", "#f5f7fa"), borderRadius: 12, ...wrap }, children: [
123677
124174
  /* @__PURE__ */ jsx11("div", { "aria-hidden": "true", style: { position: "absolute", top: 64, left: 8, right: 8, height: 32, background: C2("surfacePrimary", "#fff"), borderRadius: 8, boxShadow: "inset 0 0 0 1px rgba(0,0,0,.06)" } }),
123678
124175
  /* @__PURE__ */ jsx11(
@@ -123714,8 +124211,8 @@ var init_renderNode = __esm({
123714
124211
  });
123715
124212
  ColorPickerNode = withExtras("ColorPickerNode", ({ props, ctx, wrap }) => {
123716
124213
  const C2 = ctx.color;
123717
- const bound = useResolvedScalar(props.valuePath, ctx);
123718
- const raw = props.valuePath != null ? bound : props.value;
124214
+ const bound2 = useResolvedScalar(props.valuePath, ctx);
124215
+ const raw = props.valuePath != null ? bound2 : props.value;
123719
124216
  const cur = typeof raw === "string" ? raw : "#116DFF";
123720
124217
  const swatches = Array.isArray(props.swatches) ? props.swatches : ["#116DFF", "#23924D", "#E89F00", "#E62214", "#8B5CF6", "#111827"];
123721
124218
  const onPick = (hex2) => ctx.onAction && props.onChange ? () => ctx.onAction({ ...props.onChange, args: { ...props.onChange?.args ?? {}, value: hex2 } }) : void 0;
@@ -123783,23 +124280,23 @@ var init_renderNode = __esm({
123783
124280
  const hasEvents = !!(props.onMapTap || props.onMarkerTap || props.onRegionChange || props.onShapeTap);
123784
124281
  const boundShapes = useResolvedScalar(props.shapesPath, ctx);
123785
124282
  const shapesRaw = Array.isArray(boundShapes) ? boundShapes : Array.isArray(props.shapes) ? props.shapes : [];
123786
- const shapes = React11.useMemo(() => shapesRaw.map((sh) => {
124283
+ const shapes = React12.useMemo(() => shapesRaw.map((sh) => {
123787
124284
  const kind = parseShapeKind(sh?.kind);
123788
124285
  const pts = Array.isArray(sh?.points) ? sh.points.filter((p2) => p2 && typeof p2.latitude === "number" && typeof p2.longitude === "number") : [];
123789
124286
  const ring = kind === "circle" && pts.length ? circleRing(pts[0].latitude, pts[0].longitude, typeof sh.radiusM === "number" ? sh.radiusM : 0) : pts;
123790
124287
  return { ...sh, kind, points: ring };
123791
124288
  }), [JSON.stringify(shapesRaw)]);
123792
124289
  const boundCameraRaw = useResolvedScalar(props.cameraPath, ctx);
123793
- const commandedCamera = React11.useMemo(() => decodeCamera(boundCameraRaw), [boundCameraRaw]);
123794
- const [box, setBox] = React11.useState({ w: 400, h: h2 });
123795
- const [tileStatus, setTileStatus] = React11.useState({});
123796
- const [userCam, setUserCam] = React11.useState(null);
123797
- const dragRef = React11.useRef(null);
123798
- const dragMovedRef = React11.useRef(false);
123799
- const regionReportedRef = React11.useRef(false);
123800
- const [boxEl, setBoxEl] = React11.useState(null);
123801
- const attachBox = React11.useCallback((el2) => setBoxEl(el2), []);
123802
- React11.useEffect(() => {
124290
+ const commandedCamera = React12.useMemo(() => decodeCamera(boundCameraRaw), [boundCameraRaw]);
124291
+ const [box, setBox] = React12.useState({ w: 400, h: h2 });
124292
+ const [tileStatus, setTileStatus] = React12.useState({});
124293
+ const [userCam, setUserCam] = React12.useState(null);
124294
+ const dragRef = React12.useRef(null);
124295
+ const dragMovedRef = React12.useRef(false);
124296
+ const regionReportedRef = React12.useRef(false);
124297
+ const [boxEl, setBoxEl] = React12.useState(null);
124298
+ const attachBox = React12.useCallback((el2) => setBoxEl(el2), []);
124299
+ React12.useEffect(() => {
123803
124300
  const el2 = boxEl;
123804
124301
  if (!el2) return;
123805
124302
  const measure2 = () => {
@@ -123822,12 +124319,12 @@ var init_renderNode = __esm({
123822
124319
  const explicitSchematic = schematic && props.routeMode?.toLowerCase() === "schematic";
123823
124320
  const usesTileArm = !explicitSchematic && (otherTileReason || hasStaticMarkers) && (follow || !schematic);
123824
124321
  const pinsOnly = hasStaticMarkers && !otherTileReason;
123825
- const [userFix, setUserFix] = React11.useState(null);
123826
- const [followBroken, setFollowBroken] = React11.useState(false);
123827
- React11.useEffect(() => {
124322
+ const [userFix, setUserFix] = React12.useState(null);
124323
+ const [followBroken, setFollowBroken] = React12.useState(false);
124324
+ React12.useEffect(() => {
123828
124325
  if (follow) setFollowBroken(false);
123829
124326
  }, [follow]);
123830
- React11.useEffect(() => {
124327
+ React12.useEffect(() => {
123831
124328
  if (!observeUserLocation || !usesTileArm) return;
123832
124329
  const geo = typeof navigator !== "undefined" ? navigator.geolocation : void 0;
123833
124330
  if (!geo || typeof geo.watchPosition !== "function") return;
@@ -123854,7 +124351,7 @@ var init_renderNode = __esm({
123854
124351
  const z4 = userCam?.z ?? fitted;
123855
124352
  const cLat = followActive ? userFix.lat : userCam?.lat ?? baseLat;
123856
124353
  const cLng = followActive ? userFix.lng : userCam?.lng ?? baseLng;
123857
- React11.useEffect(() => {
124354
+ React12.useEffect(() => {
123858
124355
  const resolved2 = resolveCamera(commandedCamera, cLat, cLng, z4);
123859
124356
  if (!resolved2) return;
123860
124357
  setFollowBroken(true);
@@ -123936,7 +124433,7 @@ var init_renderNode = __esm({
123936
124433
  const endDrag = () => {
123937
124434
  dragRef.current = null;
123938
124435
  };
123939
- React11.useEffect(() => {
124436
+ React12.useEffect(() => {
123940
124437
  if (!boxEl || !usesTileArm || !interactive) return;
123941
124438
  const zoomOnWheel = (event) => {
123942
124439
  event.preventDefault();
@@ -123946,7 +124443,7 @@ var init_renderNode = __esm({
123946
124443
  boxEl.addEventListener("wheel", zoomOnWheel, { passive: false });
123947
124444
  return () => boxEl.removeEventListener("wheel", zoomOnWheel);
123948
124445
  }, [boxEl, usesTileArm, interactive, z4, cLat, cLng]);
123949
- React11.useEffect(() => {
124446
+ React12.useEffect(() => {
123950
124447
  const action = props.onRegionChange;
123951
124448
  const fire = ctx.onAction;
123952
124449
  if (!usesTileArm || !action || !fire) return;
@@ -124083,30 +124580,30 @@ var init_renderNode = __esm({
124083
124580
  const items = Array.isArray(props.items) ? props.items : [];
124084
124581
  const pages2 = items.filter((p2) => isNodeLike(p2) || p2?.type);
124085
124582
  const count2 = pages2.length;
124086
- const [index, setIndex] = React11.useState(typeof props.currentIndex === "number" ? props.currentIndex : 0);
124087
- const indexRef = React11.useRef(index);
124088
- const trackRef = React11.useRef(null);
124089
- const [hovered, setHovered] = React11.useState(false);
124090
- const [focused, setFocused] = React11.useState(false);
124583
+ const [index, setIndex] = React12.useState(typeof props.currentIndex === "number" ? props.currentIndex : 0);
124584
+ const indexRef = React12.useRef(index);
124585
+ const trackRef = React12.useRef(null);
124586
+ const [hovered, setHovered] = React12.useState(false);
124587
+ const [focused, setFocused] = React12.useState(false);
124091
124588
  const paused = hovered || focused;
124092
124589
  const interval = typeof props.autoplayIntervalMs === "number" && props.autoplayIntervalMs > 0 ? props.autoplayIntervalMs : 0;
124093
124590
  const autoplay = interval > 0 && count2 > 1 && !ctx.reduceMotion();
124094
124591
  const onChange = props.onChange;
124095
- const onChangeRef = React11.useRef(onChange);
124592
+ const onChangeRef = React12.useRef(onChange);
124096
124593
  onChangeRef.current = onChange;
124097
- const autoScrollRef = React11.useRef(null);
124098
- const endAutoScroll = React11.useCallback(() => {
124594
+ const autoScrollRef = React12.useRef(null);
124595
+ const endAutoScroll = React12.useCallback(() => {
124099
124596
  if (autoScrollRef.current) clearTimeout(autoScrollRef.current.timer);
124100
124597
  autoScrollRef.current = null;
124101
124598
  }, []);
124102
124599
  const requestedIndex = Math.max(0, Math.min(count2 - 1, typeof props.currentIndex === "number" ? props.currentIndex : 0));
124103
- React11.useEffect(() => {
124600
+ React12.useEffect(() => {
124104
124601
  endAutoScroll();
124105
124602
  indexRef.current = requestedIndex;
124106
124603
  setIndex(requestedIndex);
124107
124604
  if (trackRef.current) trackRef.current.scrollLeft = requestedIndex * trackRef.current.clientWidth;
124108
124605
  }, [requestedIndex, count2, endAutoScroll]);
124109
- React11.useEffect(() => {
124606
+ React12.useEffect(() => {
124110
124607
  const el2 = trackRef.current;
124111
124608
  el2?.addEventListener("scrollend", endAutoScroll);
124112
124609
  return () => {
@@ -124114,14 +124611,14 @@ var init_renderNode = __esm({
124114
124611
  endAutoScroll();
124115
124612
  };
124116
124613
  }, [endAutoScroll]);
124117
- const pageTo = React11.useCallback((page) => {
124614
+ const pageTo = React12.useCallback((page) => {
124118
124615
  if (page === indexRef.current) return;
124119
124616
  indexRef.current = page;
124120
124617
  setIndex(page);
124121
124618
  const action = onChangeRef.current;
124122
124619
  if (action && ctx.onAction) ctx.onAction({ ...action, args: { ...action.args ?? {}, index: page } });
124123
124620
  }, [ctx]);
124124
- React11.useEffect(() => {
124621
+ React12.useEffect(() => {
124125
124622
  if (!autoplay || paused) return;
124126
124623
  const id = setInterval(() => {
124127
124624
  const next = (indexRef.current + 1) % count2;
@@ -124186,7 +124683,7 @@ var init_renderNode = __esm({
124186
124683
  });
124187
124684
  BannerNode = withExtras("BannerNode", ({ props, ctx, wrap }) => {
124188
124685
  const C2 = ctx.color;
124189
- const [dismissed, setDismissed] = React11.useState(false);
124686
+ const [dismissed, setDismissed] = React12.useState(false);
124190
124687
  if (dismissed) return null;
124191
124688
  const accent = sevColor(ctx, props.severity ?? "info");
124192
124689
  return /* @__PURE__ */ jsxs8("div", { style: { display: "flex", gap: 11, width: "100%", boxSizing: "border-box", borderRadius: ctx.radius("md", 10), padding: 13, background: `color-mix(in srgb, ${accent} 12%, ${C2("surfacePrimary", "#fff")})`, border: `1px solid color-mix(in srgb, ${accent} 32%, transparent)`, ...wrap }, children: [
@@ -124219,15 +124716,15 @@ var init_renderNode = __esm({
124219
124716
  const rawImageUrl = props.imageUrl != null && isBinding(props.imageUrl) ? boundImageUrl : props.imageUrl;
124220
124717
  const heroSrc = typeof rawImageUrl === "string" && rawImageUrl !== "" ? rawImageUrl : typeof props.imageAsset === "string" && isWebAssetPath(props.imageAsset) ? props.imageAsset : void 0;
124221
124718
  const resolvedHero = heroSrc ? resolveAssetUrl(heroSrc, ctx.assetBaseUrl) : void 0;
124222
- const [failedHero, setFailedHero] = React11.useState(null);
124719
+ const [failedHero, setFailedHero] = React12.useState(null);
124223
124720
  const imageUrl = resolvedHero && resolvedHero !== failedHero ? resolvedHero : void 0;
124224
124721
  const expanded = Math.max(0, typeof props.expandedHeight === "number" && Number.isFinite(props.expandedHeight) ? props.expandedHeight : 280);
124225
124722
  const collapsed = Math.max(0, Math.min(expanded, typeof props.collapsedHeight === "number" && props.collapsedHeight > 0 ? props.collapsedHeight : 64));
124226
124723
  const parallax = typeof props.parallaxFactor === "number" && Number.isFinite(props.parallaxFactor) ? Math.max(0, Math.min(1, props.parallaxFactor)) : 0.5;
124227
124724
  const span = Math.max(1, expanded - collapsed);
124228
- const rootRef = React11.useRef(null);
124229
- const [offset, setOffset] = React11.useState(0);
124230
- React11.useEffect(() => {
124725
+ const rootRef = React12.useRef(null);
124726
+ const [offset, setOffset] = React12.useState(0);
124727
+ React12.useEffect(() => {
124231
124728
  const el2 = rootRef.current;
124232
124729
  const win = el2?.ownerDocument?.defaultView;
124233
124730
  if (!el2 || !win) return;
@@ -124329,22 +124826,22 @@ var init_renderNode = __esm({
124329
124826
  const boundEnd = useResolvedScalar(props.selectedEndDatePath, ctx);
124330
124827
  const seedStart = (props.selectedStartDatePath != null ? typeof boundStart === "string" ? boundStart : "" : typeof props.selectedStartDate === "string" ? props.selectedStartDate : "") || "";
124331
124828
  const seedEnd = (props.selectedEndDatePath != null ? typeof boundEnd === "string" ? boundEnd : "" : typeof props.selectedEndDate === "string" ? props.selectedEndDate : "") || "";
124332
- const [range, setRange] = React11.useState({ start: seedStart, end: seedEnd });
124333
- const lastRangeSeed = React11.useRef(`${seedStart}|${seedEnd}`);
124334
- React11.useEffect(() => {
124829
+ const [range, setRange] = React12.useState({ start: seedStart, end: seedEnd });
124830
+ const lastRangeSeed = React12.useRef(`${seedStart}|${seedEnd}`);
124831
+ React12.useEffect(() => {
124335
124832
  const key3 = `${seedStart}|${seedEnd}`;
124336
124833
  if (lastRangeSeed.current === key3) return;
124337
124834
  lastRangeSeed.current = key3;
124338
124835
  setRange({ start: seedStart, end: seedEnd });
124339
124836
  }, [seedStart, seedEnd]);
124340
- const seed2 = React11.useMemo(
124837
+ const seed2 = React12.useMemo(
124341
124838
  () => monthSeed(drivenYear ?? props.year, drivenMonth ?? props.month, selectedDate),
124342
124839
  [drivenYear, drivenMonth, props.year, props.month, selectedDate]
124343
124840
  );
124344
- const [view, setView] = React11.useState(seed2);
124841
+ const [view, setView] = React12.useState(seed2);
124345
124842
  const seedKey = `${seed2.year}-${seed2.month}`;
124346
- const lastSeed = React11.useRef(seedKey);
124347
- React11.useEffect(() => {
124843
+ const lastSeed = React12.useRef(seedKey);
124844
+ React12.useEffect(() => {
124348
124845
  if (lastSeed.current === seedKey) return;
124349
124846
  lastSeed.current = seedKey;
124350
124847
  setView(seed2);
@@ -124354,18 +124851,18 @@ var init_renderNode = __esm({
124354
124851
  const boundMode = useResolvedScalar(props.displayModePath, ctx);
124355
124852
  const drivenMode = props.displayModePath != null && (boundMode === "week" || boundMode === "month") ? boundMode : void 0;
124356
124853
  const modeSeed = drivenMode ?? (props.displayMode === "week" ? "week" : "month");
124357
- const [mode, setMode] = React11.useState(modeSeed);
124358
- const lastModeSeed = React11.useRef(modeSeed);
124359
- React11.useEffect(() => {
124854
+ const [mode, setMode] = React12.useState(modeSeed);
124855
+ const lastModeSeed = React12.useRef(modeSeed);
124856
+ React12.useEffect(() => {
124360
124857
  if (lastModeSeed.current === modeSeed) return;
124361
124858
  lastModeSeed.current = modeSeed;
124362
124859
  setMode(modeSeed);
124363
124860
  }, [modeSeed]);
124364
124861
  const isWeek = mode === "week";
124365
124862
  const weekSeed = calWeekStart(selectedDate ?? localDayKey(/* @__PURE__ */ new Date()), firstWeekday);
124366
- const [weekStart, setWeekStart] = React11.useState(weekSeed);
124367
- const lastWeekSeed = React11.useRef(weekSeed);
124368
- React11.useEffect(() => {
124863
+ const [weekStart, setWeekStart] = React12.useState(weekSeed);
124864
+ const lastWeekSeed = React12.useRef(weekSeed);
124865
+ React12.useEffect(() => {
124369
124866
  if (lastWeekSeed.current === weekSeed) return;
124370
124867
  lastWeekSeed.current = weekSeed;
124371
124868
  setWeekStart(weekSeed);
@@ -124378,7 +124875,7 @@ var init_renderNode = __esm({
124378
124875
  return { date, day: parseLocalDate(date)?.getDate() ?? 0, inMonth: true, isToday: date === todayKey };
124379
124876
  })] : monthMatrix(year, month, firstWeekday);
124380
124877
  const heads = weekdayLabels(firstWeekday);
124381
- const gridRef = React11.useRef(null);
124878
+ const gridRef = React12.useRef(null);
124382
124879
  const titleMonth = isWeek ? calWeekTitleMonth(weekStart) : { year, month };
124383
124880
  const monthLabel = new Date(titleMonth.year, titleMonth.month - 1, 1).toLocaleDateString(void 0, { month: "long", year: "numeric" });
124384
124881
  const expandable = props.expandable === true;
@@ -124553,7 +125050,7 @@ var init_renderNode = __esm({
124553
125050
  const events = Array.isArray(rawEvents) ? rawEvents : [];
124554
125051
  const boundAnchor = useResolvedScalar(props.anchorDatePath, ctx);
124555
125052
  const anchorRaw = props.anchorDatePath != null ? boundAnchor : props.anchorDate;
124556
- const [pagedAnchor, setPagedAnchor] = React11.useState(null);
125053
+ const [pagedAnchor, setPagedAnchor] = React12.useState(null);
124557
125054
  const localAnchor = pagedAnchor && Object.is(pagedAnchor.raw, anchorRaw) && pagedAnchor.path === props.anchorDatePath && pagedAnchor.mode === props.mode && pagedAnchor.provider === ctx.provider ? pagedAnchor.date : null;
124558
125055
  if (pagedAnchor && !localAnchor) setPagedAnchor(null);
124559
125056
  const anchor = localAnchor ?? (typeof anchorRaw === "string" ? parseLocalDate(anchorRaw) : null) ?? /* @__PURE__ */ new Date();
@@ -124793,7 +125290,7 @@ var init_renderNode = __esm({
124793
125290
  const boundEvents = useResolvedScalar(props.eventsPath, ctx);
124794
125291
  const rawEvents = props.eventsPath != null ? boundEvents : props.events;
124795
125292
  const events = Array.isArray(rawEvents) ? rawEvents : [];
124796
- const groups = React11.useMemo(() => {
125293
+ const groups = React12.useMemo(() => {
124797
125294
  const buckets = /* @__PURE__ */ new Map();
124798
125295
  for (const ev of events) {
124799
125296
  if (!ev) continue;
@@ -124813,19 +125310,19 @@ var init_renderNode = __esm({
124813
125310
  const onSelect = (ev) => dispatchCalendarAction(ctx, ev?.onTap ?? props.onSelectEvent, { eventId: ev?.id });
124814
125311
  const boundScrollTo = useResolvedScalar(props.scrollToDatePath, ctx);
124815
125312
  const scrollTarget = props.scrollToDatePath != null ? typeof boundScrollTo === "string" ? boundScrollTo : void 0 : typeof props.scrollToDate === "string" ? props.scrollToDate : void 0;
124816
- const containerRef = React11.useRef(null);
124817
- const [visibleDays, setVisibleDays] = React11.useState(CAL_AGENDA_INITIAL_DAYS);
125313
+ const containerRef = React12.useRef(null);
125314
+ const [visibleDays, setVisibleDays] = React12.useState(CAL_AGENDA_INITIAL_DAYS);
124818
125315
  const targetIndex = scrollTarget ? groups.findIndex((g2) => g2.key === scrollTarget) : -1;
124819
125316
  const windowEnd = Math.max(visibleDays, targetIndex >= 0 ? targetIndex + 1 : 0);
124820
125317
  const shown2 = groups.length > windowEnd ? groups.slice(0, windowEnd) : groups;
124821
125318
  const hasMore = groups.length > shown2.length;
124822
- React11.useEffect(() => {
125319
+ React12.useEffect(() => {
124823
125320
  if (!scrollTarget) return;
124824
125321
  const block = groups[0]?.key === scrollTarget ? "nearest" : "start";
124825
125322
  containerRef.current?.querySelector(`[data-daygroup="${scrollTarget}"]`)?.scrollIntoView({ block });
124826
125323
  }, [scrollTarget, windowEnd]);
124827
- const sentinelRef = React11.useRef(null);
124828
- React11.useEffect(() => {
125324
+ const sentinelRef = React12.useRef(null);
125325
+ React12.useEffect(() => {
124829
125326
  if (!hasMore) return;
124830
125327
  const el2 = sentinelRef.current;
124831
125328
  if (!el2 || typeof IntersectionObserver === "undefined") return;
@@ -124942,26 +125439,26 @@ var init_renderNode = __esm({
124942
125439
  PRESENTED_SCOPE = '[aria-modal="true"], [role="dialog"], [role="alertdialog"], [role="menu"]';
124943
125440
  focusRoots = /* @__PURE__ */ new WeakMap();
124944
125441
  A11yHintDescription = ({ hint, idBase, children, ...forwarded }) => {
124945
- const descId = `${idBase ?? "hm"}__hint${React11.useId()}`;
125442
+ const descId = `${idBase ?? "hm"}__hint${React12.useId()}`;
124946
125443
  const own6 = children.props;
124947
125444
  const next = { ...forwarded };
124948
125445
  if (forwarded.style) next.style = { ...own6.style ?? {}, ...forwarded.style };
124949
125446
  const ids = [own6["aria-describedby"], forwarded["aria-describedby"], descId].flatMap((v2) => v2 ? String(v2).split(/\s+/) : []).filter(Boolean);
124950
125447
  next["aria-describedby"] = Array.from(new Set(ids)).join(" ");
124951
125448
  return /* @__PURE__ */ jsxs8(Fragment4, { children: [
124952
- React11.cloneElement(children, next),
125449
+ React12.cloneElement(children, next),
124953
125450
  /* @__PURE__ */ jsx11("span", { id: descId, hidden: true, "data-hm-a11y-hint": "", children: hint })
124954
125451
  ] });
124955
125452
  };
124956
125453
  reportedUnknownComponents = /* @__PURE__ */ new Set();
124957
125454
  UnknownComponentNode = ({ pkg, type, props, ctx, wrap, ...extras }) => {
124958
125455
  const hasTelemetry = !!ctx.emitTelemetry;
124959
- React11.useEffect(() => {
125456
+ React12.useEffect(() => {
124960
125457
  reportUnknownComponent(ctx, pkg, type);
124961
125458
  }, [ctx.appId, ctx.screenId, hasTelemetry, pkg, type]);
124962
125459
  const { style: extraStyle, children: extraChildren, ...attrs } = extras;
124963
125460
  const nodeProps = (entries) => entries.filter(([, v2]) => isNodeLike(v2) || Array.isArray(v2) && v2.some(isNodeLike));
124964
- const renderProps = (entries) => entries.map(([k2, v2]) => /* @__PURE__ */ jsx11(React11.Fragment, { children: Array.isArray(v2) ? kids2(v2.filter(isNodeLike), ctx) : renderNode(v2, ctx) }, k2));
125461
+ const renderProps = (entries) => entries.map(([k2, v2]) => /* @__PURE__ */ jsx11(React12.Fragment, { children: Array.isArray(v2) ? kids2(v2.filter(isNodeLike), ctx) : renderNode(v2, ctx) }, k2));
124965
125462
  const childKeys = nodeProps(Object.entries(props ?? {}));
124966
125463
  if (!unknownComponentShowsDeveloperLabel(ctx)) {
124967
125464
  const contentKeys = childKeys.filter(([k2]) => k2 === "child" || k2 === "children");
@@ -124985,7 +125482,7 @@ var init_renderNode = __esm({
124985
125482
  });
124986
125483
 
124987
125484
  // ../../core/web-renderer/src/renderToHtml.tsx
124988
- import React12 from "react";
125485
+ import React13 from "react";
124989
125486
  import { renderToStaticMarkup } from "react-dom/server";
124990
125487
  function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = null, width, chrome, opts) {
124991
125488
  const rtl = opts?.isRTL === true;
@@ -125005,7 +125502,7 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
125005
125502
  const withRenderStyles = (markup) => {
125006
125503
  if (!markup) return markup;
125007
125504
  if (!glassPreview) return FOCUS_STYLE_MARKUP + markup;
125008
- const scoped = renderToStaticMarkup(React12.createElement(
125505
+ const scoped = renderToStaticMarkup(React13.createElement(
125009
125506
  "div",
125010
125507
  {
125011
125508
  className: "himi-ios-glass-preview",
@@ -125022,18 +125519,18 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
125022
125519
  const dir = rtl ? { dir: "rtl" } : {};
125023
125520
  if (header || footer) {
125024
125521
  return withRenderStyles(renderToStaticMarkup(
125025
- React12.createElement(
125522
+ React13.createElement(
125026
125523
  "div",
125027
125524
  // F-22 — same footer pin as ScreenHost: a full-height flex column + margin-top:auto
125028
125525
  // keeps the footer at the bottom edge even when the payload is short.
125029
125526
  { "data-testid": "screen-host", ...dir, ...footer ? { style: { display: "flex", flexDirection: "column", minHeight: "100%", flexGrow: 1 } } : {} },
125030
- header ? React12.createElement(
125527
+ header ? React13.createElement(
125031
125528
  "div",
125032
125529
  { "data-testid": "sticky-header", style: { position: "sticky", top: 0, zIndex: 10 } },
125033
125530
  renderNode(header, ctx)
125034
125531
  ) : null,
125035
125532
  renderNode(payload, ctx),
125036
- footer ? React12.createElement(
125533
+ footer ? React13.createElement(
125037
125534
  "div",
125038
125535
  { "data-testid": "sticky-footer", style: { position: "sticky", bottom: 0, zIndex: 10, marginTop: "auto" } },
125039
125536
  renderNode(footer, ctx)
@@ -125043,11 +125540,11 @@ function renderDescriptorToHtml(payload, tokens2, scheme = "light", provider = n
125043
125540
  }
125044
125541
  if (rtl) {
125045
125542
  return withRenderStyles(renderToStaticMarkup(
125046
- React12.createElement("div", dir, renderNode(payload, ctx))
125543
+ React13.createElement("div", dir, renderNode(payload, ctx))
125047
125544
  ));
125048
125545
  }
125049
125546
  return withRenderStyles(renderToStaticMarkup(
125050
- React12.createElement(React12.Fragment, null, renderNode(payload, ctx))
125547
+ React13.createElement(React13.Fragment, null, renderNode(payload, ctx))
125051
125548
  ));
125052
125549
  }
125053
125550
  var init_renderToHtml = __esm({
@@ -132508,8 +133005,8 @@ function hasRowBinding(props) {
132508
133005
  }
132509
133006
  function declaredOptionIds(props, resolve81) {
132510
133007
  const literal = props.options ?? props.tabs ?? props.chips;
132511
- const bound = props.optionsPath !== void 0 ? resolved(props.optionsPath, resolve81) : void 0;
132512
- const raw = Array.isArray(bound) ? bound : literal;
133008
+ const bound2 = props.optionsPath !== void 0 ? resolved(props.optionsPath, resolve81) : void 0;
133009
+ const raw = Array.isArray(bound2) ? bound2 : literal;
132513
133010
  if (!Array.isArray(raw)) return [];
132514
133011
  const out2 = [];
132515
133012
  for (const o2 of raw) {
@@ -132576,9 +133073,9 @@ function synthesizeInput(control, resolve81, tokens2) {
132576
133073
  }
132577
133074
  if (!acceptsWords(props) || !acceptsWords(control.wrapper ?? {})) return null;
132578
133075
  const binding2 = typeof props.valuePath === "string" ? props.valuePath : typeof props.value === "string" && props.value.startsWith("$service:") ? props.value : void 0;
132579
- const bound = binding2 === void 0 ? void 0 : resolve81(binding2);
133076
+ const bound2 = binding2 === void 0 ? void 0 : resolve81(binding2);
132580
133077
  const literal = typeof props.value === "string" && !props.value.startsWith("$") ? props.value : void 0;
132581
- const current = typeof bound === "string" ? bound : typeof bound === "number" ? String(bound) : literal ?? "";
133078
+ const current = typeof bound2 === "string" ? bound2 : typeof bound2 === "number" ? String(bound2) : literal ?? "";
132582
133079
  const max = typeof props.maxLength === "number" && props.maxLength > 0 ? props.maxLength : void 0;
132583
133080
  const pick3 = tokens2().find((t2) => t2 !== current && (max === void 0 || t2.length <= max));
132584
133081
  if (pick3 === void 0) return null;
@@ -133239,12 +133736,12 @@ function collapsesWhenEmpty(n2, path2, ctx) {
133239
133736
  const props = body.props;
133240
133737
  if (!props || props.collapseWhenEmpty !== true) return false;
133241
133738
  const raw = props.text;
133242
- const bound = typeof raw === "string" && (raw.startsWith("$service:") || raw.startsWith("$item"));
133243
- if (bound && raw.startsWith("$item") && !ctx.scope) return false;
133244
- const eff = bound ? resolveNameBinding(raw, ctx) : raw;
133739
+ const bound2 = typeof raw === "string" && (raw.startsWith("$service:") || raw.startsWith("$item"));
133740
+ if (bound2 && raw.startsWith("$item") && !ctx.scope) return false;
133741
+ const eff = bound2 ? resolveNameBinding(raw, ctx) : raw;
133245
133742
  const s2 = eff == null ? "" : String(eff).trim();
133246
133743
  if (s2 !== "" && s2 !== "\u2014") return false;
133247
- if (bound && typeof eff === "string" && s2 === "") {
133744
+ if (bound2 && typeof eff === "string" && s2 === "") {
133248
133745
  ctx.emptied.push({ at: joinPath(path2, wire ? "body.props" : "props"), field: "text", binding: raw });
133249
133746
  }
133250
133747
  return true;
@@ -134015,11 +134512,11 @@ async function crawlScreenInner(opts) {
134015
134512
  for (const site of sites) {
134016
134513
  if (parseWorkerAction(site.actionId)) continue;
134017
134514
  const before = { ...site.params ?? {}, ...site.args ?? {} };
134018
- const bound = Object.entries(before).filter(([, v2]) => typeof v2 === "string" && v2.startsWith("$service:"));
134019
- if (!bound.length) continue;
134515
+ const bound2 = Object.entries(before).filter(([, v2]) => typeof v2 === "string" && v2.startsWith("$service:"));
134516
+ if (!bound2.length) continue;
134020
134517
  const resolved2 = resolveActionServiceParams({ actionId: site.actionId, params: site.params, args: site.args }, provider);
134021
134518
  const after = { ...resolved2.params ?? {}, ...resolved2.args ?? {} };
134022
- for (const [k2, v2] of bound) {
134519
+ for (const [k2, v2] of bound2) {
134023
134520
  if (!(k2 in after)) {
134024
134521
  findings.push({
134025
134522
  screen: screenId,
@@ -134398,11 +134895,11 @@ function unverifiableNodes(screenId, payload) {
134398
134895
  const type = typeof body?.type === "string" ? body.type : void 0;
134399
134896
  if (type && BLANK_WHEN_BOUND[type]) {
134400
134897
  const props = body?.props ?? {};
134401
- const bound = BLANK_WHEN_BOUND[type].some((p2) => {
134898
+ const bound2 = BLANK_WHEN_BOUND[type].some((p2) => {
134402
134899
  const v2 = props[p2];
134403
134900
  return typeof v2 === "string" && (v2.startsWith("$service:") || v2.startsWith("$item"));
134404
134901
  });
134405
- if (bound) {
134902
+ if (bound2) {
134406
134903
  out2.push({
134407
134904
  screen: screenId,
134408
134905
  node: typeof rec.id === "string" ? `${type}#${rec.id}` : type,
@@ -146960,8 +147457,8 @@ function planTrim(src, keepIds, links) {
146960
147457
  validIds: sorted(app.routes.map((r3) => r3.label))
146961
147458
  });
146962
147459
  }
146963
- const explicit = new Set([...kept].filter((r3) => r3 !== app.home || keepIds.includes(app.home.label)));
146964
- const implicit = explicit.has(app.home) ? [] : [app.home];
147460
+ const explicit2 = new Set([...kept].filter((r3) => r3 !== app.home || keepIds.includes(app.home.label)));
147461
+ const implicit = explicit2.has(app.home) ? [] : [app.home];
146965
147462
  for (const id of navPinnedScreens(app.nav.value)) {
146966
147463
  const route = resolveIn(app, id);
146967
147464
  if (!route || kept.has(route)) continue;
@@ -158825,7 +159322,7 @@ function createLocalTestSandbox() {
158825
159322
  if (jsonBytes(input) > limits.maxRequestBytes) {
158826
159323
  throw new SandboxError("execution_failed", "request exceeds maxRequestBytes");
158827
159324
  }
158828
- const { MessageChannel, Worker: Worker2 } = await import("node:worker_threads");
159325
+ const { MessageChannel: MessageChannel2, Worker: Worker2 } = await import("node:worker_threads");
158829
159326
  const started = Date.now();
158830
159327
  const workerSource = `
158831
159328
  import { parentPort, workerData } from "node:worker_threads";
@@ -158900,7 +159397,7 @@ function createLocalTestSandbox() {
158900
159397
  })();
158901
159398
  `;
158902
159399
  return await new Promise((resolve81, reject) => {
158903
- const { port1, port2 } = new MessageChannel();
159400
+ const { port1, port2 } = new MessageChannel2();
158904
159401
  const serializableContext = {
158905
159402
  auth: context.auth,
158906
159403
  identity: context.identity,
@@ -165785,36 +166282,37 @@ var init_preview_assets_generated = __esm({
165785
166282
  "../../packages/serve/src/preview-assets.generated.ts"() {
165786
166283
  init_preview_assets_format();
165787
166284
  PREVIEW_ASSET_MANIFEST = [
165788
- { key: "assets/DashboardHost-pt94_sJ0.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "9ec016c8dd859201dddcd5c4bb9512141dcad5f5779b2e8595ec227dfc3c9928" },
165789
- { key: "assets/DevDrawer-Dru5uwQ1.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "fedcb935aa289bc16141962ca59a9addda9b2182d6cda06f7f293b638abfcd8e" },
165790
- { key: "assets/IdiomCompare-BHh8tYPn.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "4c79da854b06c53b397a34cb96eaa6c5fc9dddd2bd25e6408ac60c9fb756547f" },
165791
- { key: "assets/LightboxViewer-BSqDn-zJ.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "f093543511ed4215ff0396614b4445fd14acf2eeb3fc87a6512c67144dc5f791" },
165792
- { key: "assets/PhonePreviewControl-Bmm8NkvS.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "2ef06e297920432eb2f9132cc6f300c344c9b4d3dd7195fc7d86108b7745dde3" },
165793
- { key: "assets/SchemeCompare-C7y8epkX.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "ef6af36144d34f5b6ef1004987aa80ffb5aad5ef55a9b27e7347b68dd88417ee" },
166285
+ { key: "assets/DashboardHost-ccb_e_DP.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 2916, sha256: "9183bc77ce886be410e1a6a3d8b811365ba60c82c656f9ed8249c4ba12696620" },
166286
+ { key: "assets/DevDrawer-_P2xA5Uo.js", contentType: "application/javascript; charset=utf-8", offset: 2924, length: 16744, sha256: "52a51a9937ae5736e37a2c6b383612dafe49ac82dd49817cecf2b87675470733" },
166287
+ { key: "assets/IdiomCompare-B5rjJbc6.js", contentType: "application/javascript; charset=utf-8", offset: 19668, length: 1892, sha256: "c90292bfc15a84b60d4ad1820d79f51647feb45eaf6c5f7020efd5995edca0c2" },
166288
+ { key: "assets/LightboxViewer-B9bXYaNa.js", contentType: "application/javascript; charset=utf-8", offset: 21560, length: 8132, sha256: "7dc5209784b7339538bf2e5af88099d94cd4fa4dada0a537025d8ab14b1782f0" },
166289
+ { key: "assets/PhonePreviewControl-BbU25q3T.js", contentType: "application/javascript; charset=utf-8", offset: 29692, length: 37729, sha256: "7b5bf7361e18d9fab03c8195337dd7d7dbab40aceb81876363115dfd5b3506ca" },
166290
+ { key: "assets/SchemeCompare-AdWcP5Op.js", contentType: "application/javascript; charset=utf-8", offset: 67421, length: 1824, sha256: "eaac412de580143ae5e2e3c75ffb2af3f507d8f39487681f56cdd51a61a3cd2a" },
165794
166291
  { key: "assets/glassPreviewBrowser-Bt5ZFmG4.js", contentType: "application/javascript; charset=utf-8", offset: 69245, length: 342, sha256: "20d73f97d38f6d9a0b79e68e24954cd6bbfe66833a6e6aecae00a9102e64cab3" },
165795
- { key: "assets/index-BBNqc5c4.js", contentType: "application/javascript; charset=utf-8", offset: 69587, length: 1325028, sha256: "f690d573405bb2463d7016a5ec27b573850793a3ccf84ee404c9a63876b16018" },
165796
- { key: "assets/pdf-D2NCB8kl.js", contentType: "application/javascript; charset=utf-8", offset: 1394615, length: 488199, sha256: "a7c9cf8b012ef43073746ec951644d51abad5427e442e6d14de5ec3f8f4b2409" },
165797
- { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1882814, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
165798
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1882887, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
165799
- { key: "assets/pdfDocument--Lyea2Vc.js", contentType: "application/javascript; charset=utf-8", offset: 3199921, length: 3379, sha256: "1caa5dde639cdfa8164a2d5d6fc0d7016368568de98b3b9f0c3bdeee8a7206f7" },
165800
- { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3203300, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
165801
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3205566, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
165802
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3210176, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
165803
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3698760, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
165804
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3789684, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
165805
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3880668, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
165806
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3971648, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
165807
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4062520, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
165808
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4153500, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
165809
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4262136, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
165810
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4371220, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
165811
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4480268, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
165812
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4587968, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
165813
- { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4676076, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
165814
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4682824, length: 4947, sha256: "c785a07e7efeec0f1cb1a22975db48cde368e37a64eacb76a9821f2c8d62928b" },
165815
- { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 4687771, length: 7193, sha256: "a482f4796147c2a3893942e10ab225bd3b6f749f7125fe0330680d4c20ea0212" },
165816
- { key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset: 4694964, length: 423, sha256: "b9cd5989d31464a0422f260a332af6be5add0b04de2148944de35158f3b75efc" },
165817
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4695387, length: 18080, sha256: "937286e50af2fc4e44f7fb35b277f35254e5eb24a3d364a70cfa914d4286d0d9" }
166292
+ { key: "assets/index-vy60YTYP.js", contentType: "application/javascript; charset=utf-8", offset: 69587, length: 1332702, sha256: "8602e03a2d1f869963c76b634787d06e2a4f9ff8449f880a03079f2a98d42881" },
166293
+ { key: "assets/pdf-6zNQxbtC.js", contentType: "application/javascript; charset=utf-8", offset: 1402289, length: 488199, sha256: "c32a381ff3c8da40d4ecc3653dd01e6aa2d2a7273486909aa66d4aa221915ff6" },
166294
+ { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1890488, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
166295
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1890561, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
166296
+ { key: "assets/pdfDocument-CFatnBSm.js", contentType: "application/javascript; charset=utf-8", offset: 3207595, length: 3379, sha256: "50e909061e6bbd49c76392215686898570949f168a40cfc0cf30db5a49560939" },
166297
+ { key: "assets/pdfFetch-Cc8i1I1h.js", contentType: "application/javascript; charset=utf-8", offset: 3210974, length: 2266, sha256: "1d21ad008921942217c9eac0c35b1713773b9d89c71e3ab4412781f7bb88f463" },
166298
+ { key: "assets/webviewBridgeHost-BB3fp3uP.js", contentType: "application/javascript; charset=utf-8", offset: 3213240, length: 9781, sha256: "2f5f3427dffef435ba58ee1b7a47eed601d3aabc66648eda053081eaf99e456a" },
166299
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3223021, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
166300
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3227631, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
166301
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3716215, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
166302
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3807139, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
166303
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3898123, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
166304
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3989103, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
166305
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 4079975, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
166306
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 4170955, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
166307
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4279591, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
166308
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4388675, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
166309
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4497723, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
166310
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4605423, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
166311
+ { key: "himi-sw.js", contentType: "application/javascript; charset=utf-8", offset: 4693531, length: 6748, sha256: "4a92459977d7cefa1a6a7e020c3a63509737f083b3f2773557c1a5771665811a" },
166312
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4700279, length: 4947, sha256: "dcada8e4b42e9583f4c6ebf2ea3898a3b9b13b53d0174305ca447aaabe18bdb3" },
166313
+ { key: "ios-glass-preview.css", contentType: "text/css; charset=utf-8", offset: 4705226, length: 7193, sha256: "a482f4796147c2a3893942e10ab225bd3b6f749f7125fe0330680d4c20ea0212" },
166314
+ { key: "ios-glass-preview.svg", contentType: "image/svg+xml", offset: 4712419, length: 423, sha256: "b9cd5989d31464a0422f260a332af6be5add0b04de2148944de35158f3b75efc" },
166315
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4712842, length: 18778, sha256: "ba734d58c88281c71c01d9a2842a991d06f3ed91bf03449427ef11c7f6d1605d" }
165818
166316
  ];
165819
166317
  }
165820
166318
  });
@@ -166001,7 +166499,7 @@ async function runPackage(source, opts = {}) {
166001
166499
  const server = nodeAdapter(handler);
166002
166500
  const first = await listen(server, opts.port ?? 0, host);
166003
166501
  const port = first.port;
166004
- const bound = [first.address];
166502
+ const bound2 = [first.address];
166005
166503
  const servers = [server];
166006
166504
  if (lanHost) {
166007
166505
  const lanServer = nodeAdapter(handler);
@@ -166013,7 +166511,7 @@ async function runPackage(source, opts = {}) {
166013
166511
  if (resolved2.temp) rmSync23(resolved2.temp, { recursive: true, force: true });
166014
166512
  throw new Error(`himi run --lan could not listen on ${lanHost}:${port} (${e2.message}); drop --lan, or pass --port for a free one`);
166015
166513
  }
166016
- bound.push(lanBound);
166514
+ bound2.push(lanBound);
166017
166515
  servers.push(lanServer);
166018
166516
  }
166019
166517
  const origin = `http://${host}:${port}`;
@@ -166027,7 +166525,7 @@ async function runPackage(source, opts = {}) {
166027
166525
  url,
166028
166526
  releaseRoot: resolved2.releaseRoot,
166029
166527
  origin,
166030
- bound,
166528
+ bound: bound2,
166031
166529
  ...lanUrl ? { lanUrl } : {},
166032
166530
  warnings: resolved2.warnings,
166033
166531
  close: async () => {
@@ -167519,11 +168017,11 @@ function sortKeys(value) {
167519
168017
  const obj5 = value;
167520
168018
  return Object.fromEntries(Object.keys(obj5).sort().map((key3) => [key3, sortKeys(obj5[key3])]));
167521
168019
  }
167522
- function canonicalJson2(value) {
168020
+ function canonicalJson3(value) {
167523
168021
  return JSON.stringify(sortKeys(value));
167524
168022
  }
167525
168023
  function sha256Digest(value) {
167526
- return `sha256:${createHash43("sha256").update(canonicalJson2(value)).digest("hex")}`;
168024
+ return `sha256:${createHash43("sha256").update(canonicalJson3(value)).digest("hex")}`;
167527
168025
  }
167528
168026
  function manifestDigest(manifest) {
167529
168027
  return sha256Digest(manifest);
@@ -177120,8 +177618,8 @@ function buildVeloChapter(input) {
177120
177618
  if (owner?.git) source.push("git");
177121
177619
  const httpFunctions = dedupeHttp(httpFromFiles);
177122
177620
  const pages2 = veloPagesForBind(input.look);
177123
- const bound = bindVeloFiles(files.slice(0, 80), pages2);
177124
- const coded = new Set(bound.filter((f2) => f2.pageUrl).map((f2) => f2.pageId).filter(Boolean));
177621
+ const bound2 = bindVeloFiles(files.slice(0, 80), pages2);
177622
+ const coded = new Set(bound2.filter((f2) => f2.pageUrl).map((f2) => f2.pageId).filter(Boolean));
177125
177623
  const pagesOut = pages2.map((p2) => ({ ...p2, hasCode: p2.hasCode || !!p2.pageId && coded.has(p2.pageId) }));
177126
177624
  const gridAppId = owner?.gridAppId || hint?.gridAppId;
177127
177625
  const enabled = source.length > 0 || httpFunctions.length > 0;
@@ -177130,7 +177628,7 @@ function buildVeloChapter(input) {
177130
177628
  source,
177131
177629
  httpFunctions,
177132
177630
  pages: pagesOut,
177133
- files: bound
177631
+ files: bound2
177134
177632
  };
177135
177633
  if (gridAppId) chapter.gridAppId = gridAppId;
177136
177634
  if (hint?.wixCodeFeatures.length) chapter.wixCodeFeatures = hint.wixCodeFeatures;
@@ -184968,8 +185466,8 @@ function buildMergedContract(options) {
184968
185466
  if (fonts.length) {
184969
185467
  branding.fonts = fonts;
184970
185468
  const chosen = overlayFontFamily;
184971
- const explicit = typeof chosen === "string" && chosen.trim() !== "";
184972
- if (!explicit) branding.fontFamily = fonts[0].family;
185469
+ const explicit2 = typeof chosen === "string" && chosen.trim() !== "";
185470
+ if (!explicit2) branding.fontFamily = fonts[0].family;
184973
185471
  }
184974
185472
  }
184975
185473
  merged.branding = branding;