haori 0.69.0 → 0.70.1

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/haori.es.js CHANGED
@@ -60,11 +60,11 @@ class m {
60
60
  }
61
61
  }
62
62
  const rt = "embedded", dt = "data-";
63
- function Ct(p) {
63
+ function Ft(p) {
64
64
  return p === "embedded" || p === "demo";
65
65
  }
66
66
  function ir(p) {
67
- return p === null ? null : Ct(p) ? p : rt;
67
+ return p === null ? null : Ft(p) ? p : rt;
68
68
  }
69
69
  function ht(p) {
70
70
  const e = p.trim().toLowerCase();
@@ -127,7 +127,7 @@ const te = class te {
127
127
  * @return 戻り値はありません。
128
128
  */
129
129
  static setRuntime(e) {
130
- te._runtime = Ct(e) ? e : rt;
130
+ te._runtime = Ft(e) ? e : rt;
131
131
  }
132
132
  /**
133
133
  * 実行環境からプレフィックスと開発モードかどうかを自動検出します。
@@ -469,7 +469,7 @@ const sr = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ft = "new:
469
469
  };
470
470
  I.enhancers = /* @__PURE__ */ new Map(), I.instances = /* @__PURE__ */ new WeakMap(), I.warnedUnknownNames = /* @__PURE__ */ new Set(), I.warnedMissingGlobals = /* @__PURE__ */ new Set(), I.visited = /* @__PURE__ */ new WeakSet(), I.mutationCapture = null;
471
471
  let le = I;
472
- const Ft = "yyyy/MM/dd HH:mm", nr = "en-US", pt = 1e4;
472
+ const Ct = "yyyy/MM/dd HH:mm", nr = "en-US", pt = 1e4;
473
473
  function me(p) {
474
474
  return String(p).padStart(2, "0");
475
475
  }
@@ -509,7 +509,7 @@ function $t(p, e) {
509
509
  const i = Number(r.year), s = Number(r.month), n = Number(r.day), a = Number(r.hour), o = Number(r.minute), l = Number(r.second);
510
510
  return !Number.isFinite(i) || !Number.isFinite(s) || !Number.isFinite(n) || !Number.isFinite(a) || !Number.isFinite(o) || !Number.isFinite(l) ? null : Mt(i, s, n, a, o, l);
511
511
  }
512
- function Ze(p, e = Ft, t) {
512
+ function Ze(p, e = Ct, t) {
513
513
  if (p == null || p === "")
514
514
  return "";
515
515
  const r = p instanceof Date ? p : new Date(p);
@@ -535,7 +535,7 @@ function Ze(p, e = Ft, t) {
535
535
  );
536
536
  }
537
537
  const ar = "yyyy-MM-dd";
538
- function Pt(p = Ft, e) {
538
+ function Pt(p = Ct, e) {
539
539
  return Ze(/* @__PURE__ */ new Date(), p, e);
540
540
  }
541
541
  function Lt(p = 0, e = ar, t) {
@@ -596,17 +596,17 @@ function Ut(p, e, t = {}) {
596
596
  Math.max(Math.trunc(Number(e)) || 0, 0),
597
597
  r - 1
598
598
  ), s = Math.max(0, Math.trunc(t.window ?? 2)), n = Math.max(0, Math.trunc(t.boundary ?? 1)), a = /* @__PURE__ */ new Set();
599
- for (let d = 0; d < n && d < r; d += 1)
600
- a.add(d);
601
- for (let d = Math.max(0, r - n); d < r; d += 1)
602
- a.add(d);
603
- for (let d = Math.max(0, i - s); d <= Math.min(r - 1, i + s); d += 1)
604
- a.add(d);
605
- const o = Array.from(a).sort((d, y) => d - y), l = [];
599
+ for (let h = 0; h < n && h < r; h += 1)
600
+ a.add(h);
601
+ for (let h = Math.max(0, r - n); h < r; h += 1)
602
+ a.add(h);
603
+ for (let h = Math.max(0, i - s); h <= Math.min(r - 1, i + s); h += 1)
604
+ a.add(h);
605
+ const o = Array.from(a).sort((h, y) => h - y), l = [];
606
606
  let u = null;
607
- for (const d of o) {
608
- if (u !== null && d - u > 1)
609
- if (d - u === 2) {
607
+ for (const h of o) {
608
+ if (u !== null && h - u > 1)
609
+ if (h - u === 2) {
610
610
  const y = u + 1;
611
611
  l.push({
612
612
  page: y,
@@ -617,11 +617,11 @@ function Ut(p, e, t = {}) {
617
617
  } else
618
618
  l.push({ page: null, label: "…", active: !1, ellipsis: !0 });
619
619
  l.push({
620
- page: d,
621
- label: d + 1,
622
- active: d === i,
620
+ page: h,
621
+ label: h + 1,
622
+ active: h === i,
623
623
  ellipsis: !1
624
- }), u = d;
624
+ }), u = h;
625
625
  }
626
626
  return l;
627
627
  }
@@ -674,8 +674,8 @@ function Vt(p, e) {
674
674
  if (e !== void 0 && Number.isFinite(e))
675
675
  l = Math.max(0, Math.trunc(e));
676
676
  else {
677
- const d = qe(r.numberOfElements, NaN);
678
- l = Number.isFinite(d) ? d : Math.min(n, i - a);
677
+ const h = qe(r.numberOfElements, NaN);
678
+ l = Number.isFinite(h) ? h : Math.min(n, i - a);
679
679
  }
680
680
  const u = Math.min(a + l, i);
681
681
  return { start: o, end: Math.max(u, o), total: i, empty: !1 };
@@ -1388,10 +1388,10 @@ class gr {
1388
1388
  }
1389
1389
  case "u": {
1390
1390
  if (r[s] === "{") {
1391
- const d = r.indexOf("}", s), y = d < 0 ? s : d, b = r.slice(s + 1, y), E = /^[0-9a-fA-F]+$/.test(b) ? parseInt(b, 16) : NaN;
1391
+ const h = r.indexOf("}", s), y = h < 0 ? s : h, b = r.slice(s + 1, y), E = /^[0-9a-fA-F]+$/.test(b) ? parseInt(b, 16) : NaN;
1392
1392
  if (!(E <= 1114111))
1393
1393
  throw Y(X.invalidUnicode, l);
1394
- n += String.fromCodePoint(E), s = d + 1;
1394
+ n += String.fromCodePoint(E), s = h + 1;
1395
1395
  break;
1396
1396
  }
1397
1397
  const u = this.readHex(s, 4);
@@ -2411,23 +2411,23 @@ const ct = class ct {
2411
2411
  */
2412
2412
  static compileUpdate(e, t) {
2413
2413
  const r = e.argument.name, i = e.operator === "++" ? 1 : -1, s = e.prefix, n = (u) => {
2414
- const d = br(u), y = typeof d == "bigint" ? d + BigInt(i) : d + i;
2415
- return [d, y];
2414
+ const h = br(u), y = typeof h == "bigint" ? h + BigInt(i) : h + i;
2415
+ return [h, y];
2416
2416
  }, a = this.findSlot(r, t);
2417
2417
  if (a !== null) {
2418
- const { depth: u, slot: d } = a;
2418
+ const { depth: u, slot: h } = a;
2419
2419
  return (y) => {
2420
- const b = this.outerFrame(y, u), [E, A] = n(b.slots[d]);
2421
- return b.slots[d] = A, s ? A : E;
2420
+ const b = this.outerFrame(y, u), [E, A] = n(b.slots[h]);
2421
+ return b.slots[h] = A, s ? A : E;
2422
2422
  };
2423
2423
  }
2424
2424
  const o = this.classify(r), l = this.compileIdentifier(r, null);
2425
2425
  return (u) => {
2426
- const d = u.run;
2427
- if (!(o !== "forbidden" && yt(d.bindings, r)) && o !== "free")
2426
+ const h = u.run;
2427
+ if (!(o !== "forbidden" && yt(h.bindings, r)) && o !== "free")
2428
2428
  throw new TypeError(`Assignment to constant variable '${r}'.`);
2429
2429
  const [b, E] = n(l(u));
2430
- return d.overlay === null && (d.overlay = /* @__PURE__ */ new Map()), d.overlay.set(r, E), s ? E : b;
2430
+ return h.overlay === null && (h.overlay = /* @__PURE__ */ new Map()), h.overlay.set(r, E), s ? E : b;
2431
2431
  };
2432
2432
  }
2433
2433
  /**
@@ -2594,12 +2594,12 @@ const ct = class ct {
2594
2594
  }, n = e.callee;
2595
2595
  if (n.type === "Member") {
2596
2596
  const o = this.compileNode(n.object, t), l = n.computed ? null : n.property, u = n.computed ? this.compileNode(n.property, t) : null;
2597
- return (d) => {
2598
- const y = o(d);
2597
+ return (h) => {
2598
+ const y = o(h);
2599
2599
  if (y == null)
2600
2600
  return;
2601
- const b = u === null ? l : bt(u(d));
2602
- return s(y[b], y, d);
2601
+ const b = u === null ? l : bt(u(h));
2602
+ return s(y[b], y, h);
2603
2603
  };
2604
2604
  }
2605
2605
  const a = this.compileNode(n, t);
@@ -2658,8 +2658,8 @@ const ct = class ct {
2658
2658
  for (const l of r) {
2659
2659
  let u;
2660
2660
  if (!o) {
2661
- const d = a.next();
2662
- o = d.done === !0, u = o ? void 0 : d.value;
2661
+ const h = a.next();
2662
+ o = h.done === !0, u = o ? void 0 : h.value;
2663
2663
  }
2664
2664
  l?.(s, u);
2665
2665
  }
@@ -2722,8 +2722,8 @@ const ct = class ct {
2722
2722
  for (let E = 0; E < a; E += 1)
2723
2723
  i[E](b, y[E]);
2724
2724
  return s !== null && s(b, y.slice(a)), n(b);
2725
- }, d = o ? async (...y) => u(y) : (...y) => u(y);
2726
- return Object.defineProperty(d, "length", { value: a }), d;
2725
+ }, h = o ? async (...y) => u(y) : (...y) => u(y);
2726
+ return Object.defineProperty(h, "length", { value: a }), h;
2727
2727
  };
2728
2728
  }
2729
2729
  };
@@ -2997,13 +2997,13 @@ const T = class T {
2997
2997
  continue;
2998
2998
  let o = 0, l = 0;
2999
2999
  for (let u = n - 1; u >= 0; u -= 1) {
3000
- const d = i[u].value;
3001
- if (d === ")" || d === "]" || d === "}") {
3002
- o += 1, d === ")" && (l += 1);
3000
+ const h = i[u].value;
3001
+ if (h === ")" || h === "]" || h === "}") {
3002
+ o += 1, h === ")" && (l += 1);
3003
3003
  continue;
3004
3004
  }
3005
- if (d === "(" || d === "[" || d === "{") {
3006
- if (o -= 1, d === "(" && (l -= 1), o === 0)
3005
+ if (h === "(" || h === "[" || h === "{") {
3006
+ if (o -= 1, h === "(" && (l -= 1), o === 0)
3007
3007
  break;
3008
3008
  continue;
3009
3009
  }
@@ -3472,10 +3472,10 @@ ${t}`;
3472
3472
  !this.FORBIDDEN_NAMES.includes(b) && // 標準組み込み(`Math` など)は式から参照できる仕様のため遮蔽しない。
3473
3473
  !this.ALLOWED_GLOBAL_IDENTIFIERS.has(b)
3474
3474
  );
3475
- let d = null;
3475
+ let h = null;
3476
3476
  if (V.isEnabled()) {
3477
3477
  const b = this.extractBoundIdentifiers(e);
3478
- d = b.size === 0 ? u : u.filter((E) => !b.has(E));
3478
+ h = b.size === 0 ? u : u.filter((E) => !b.has(E));
3479
3479
  }
3480
3480
  const y = this.evaluateWithShadowing(
3481
3481
  e,
@@ -3483,12 +3483,12 @@ ${t}`;
3483
3483
  u,
3484
3484
  l
3485
3485
  );
3486
- return d !== null && this.recordScopeMissingIdentifiers(
3486
+ return h !== null && this.recordScopeMissingIdentifiers(
3487
3487
  typeof y.value == "boolean" ? (
3488
3488
  // 判定する式として結論が出た評価では、予約キーが無いのは正常
3489
3489
  // (注入より前の状態)なので報告しない(仕様「未解決参照の診断」)。
3490
- d.filter((b) => !this.isReservedBindingKey(b))
3491
- ) : d,
3490
+ h.filter((b) => !this.isReservedBindingKey(b))
3491
+ ) : h,
3492
3492
  e
3493
3493
  ), y;
3494
3494
  }
@@ -3662,11 +3662,11 @@ ${t}`;
3662
3662
  evaluator: o,
3663
3663
  compileFailed: !1
3664
3664
  };
3665
- const l = this.buildAssignments(i), u = this.buildBuiltinConstants(e, s), d = this.buildShadowDeclarations(n), y = this.toGuardedMemberExpression(
3665
+ const l = this.buildAssignments(i), u = this.buildBuiltinConstants(e, s), h = this.buildShadowDeclarations(n), y = this.toGuardedMemberExpression(
3666
3666
  this.toOptionalChainExpression(e)
3667
3667
  ), b = `"use strict";
3668
3668
  ${l};
3669
- ${u}return (${y});` + d;
3669
+ ${u}return (${y});` + h;
3670
3670
  try {
3671
3671
  return o = new Function(...i, b), this.EXPRESSION_CACHE.set(a, o), this.compileFailedExpressions.delete(e), {
3672
3672
  bindKeys: i,
@@ -3829,8 +3829,8 @@ ${u}return (${y});` + d;
3829
3829
  break;
3830
3830
  }
3831
3831
  case "[": {
3832
- const d = this.startsMemberAccess(i) ? "member" : "array";
3833
- r.push(d);
3832
+ const h = this.startsMemberAccess(i) ? "member" : "array";
3833
+ r.push(h);
3834
3834
  break;
3835
3835
  }
3836
3836
  case "{":
@@ -4718,26 +4718,26 @@ const ve = "data-haori-if-disabled", vt = "input, select, textarea, button, fiel
4718
4718
  static report(e = P.DEFAULT_REPORT_LIMIT) {
4719
4719
  const t = /* @__PURE__ */ new Map();
4720
4720
  let r = 0, i = 0;
4721
- const s = (l, u, d) => {
4722
- r += d.totalDurationMs, i += d.calls;
4721
+ const s = (l, u, h) => {
4722
+ r += h.totalDurationMs, i += h.calls;
4723
4723
  const y = t.get(l);
4724
4724
  if (y === void 0) {
4725
4725
  t.set(l, {
4726
4726
  where: u,
4727
- template: d.template,
4727
+ template: h.template,
4728
4728
  elements: 1,
4729
- calls: d.calls,
4730
- totalDurationMs: d.totalDurationMs,
4731
- maxDurationMs: d.maxDurationMs,
4729
+ calls: h.calls,
4730
+ totalDurationMs: h.totalDurationMs,
4731
+ maxDurationMs: h.maxDurationMs,
4732
4732
  sharePercent: 0,
4733
- representativeDurationMs: d.totalDurationMs
4733
+ representativeDurationMs: h.totalDurationMs
4734
4734
  });
4735
4735
  return;
4736
4736
  }
4737
- y.elements += 1, y.calls += d.calls, y.totalDurationMs += d.totalDurationMs, y.maxDurationMs = Math.max(
4737
+ y.elements += 1, y.calls += h.calls, y.totalDurationMs += h.totalDurationMs, y.maxDurationMs = Math.max(
4738
4738
  y.maxDurationMs,
4739
- d.maxDurationMs
4740
- ), d.totalDurationMs > y.representativeDurationMs && (y.where = u, y.representativeDurationMs = d.totalDurationMs);
4739
+ h.maxDurationMs
4740
+ ), h.totalDurationMs > y.representativeDurationMs && (y.where = u, y.representativeDurationMs = h.totalDurationMs);
4741
4741
  };
4742
4742
  P.snapshot().forEach((l) => {
4743
4743
  l.attributes.forEach((u) => {
@@ -6787,8 +6787,8 @@ const v = class v extends N {
6787
6787
  element: l,
6788
6788
  rawName: e,
6789
6789
  template: r
6790
- }), d = v.isLateActionAttribute(e) ? re.withoutDiagnosis(u) : u(), y = o.isEvaluate || o.isRawEvaluate, b = e === t && v.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), E = o.isSingleExpression(), A = Ee.joinEvaluateResults(d.results), w = d.results.length === 1 ? d.results[0] : A, M = t === "value" && v.resolveDeclaredValueType(l) === "boolean", F = w === !1 && !M, se = !o.isForceEvaluation() && (t !== e ? d.hasUnresolvedReference || w === null || w === void 0 || F : b ? d.hasUnresolvedReference || w === null || w === void 0 || w === !1 : E ? d.hasUnresolvedReference || w === null || w === void 0 || F : y && A === "");
6791
- if (se && d.hasUnresolvedReference && v.warnUnresolvedAttribute(
6790
+ }), h = v.isLateActionAttribute(e) ? re.withoutDiagnosis(u) : u(), y = o.isEvaluate || o.isRawEvaluate, b = e === t && v.BOOLEAN_ATTRIBUTES.has(t.toLowerCase()), E = o.isSingleExpression(), A = Ee.joinEvaluateResults(h.results), w = h.results.length === 1 ? h.results[0] : A, $ = t === "value" && v.resolveDeclaredValueType(l) === "boolean", M = w === !1 && !$, se = !o.isForceEvaluation() && (t !== e ? h.hasUnresolvedReference || w === null || w === void 0 || M : b ? h.hasUnresolvedReference || w === null || w === void 0 || w === !1 : E ? h.hasUnresolvedReference || w === null || w === void 0 || M : y && A === "");
6791
+ if (se && h.hasUnresolvedReference && v.warnUnresolvedAttribute(
6792
6792
  e,
6793
6793
  t,
6794
6794
  r,
@@ -6805,7 +6805,7 @@ const v = class v extends N {
6805
6805
  l
6806
6806
  );
6807
6807
  }
6808
- const C = o.isForceEvaluation() ? r : E ? w : A, Z = i && o.isEvaluate && t === "value" && v.isValuePropertyTarget(l), ee = l.getRootNode(), ne = this.userEditSequence, K = Z && v.isUserEditableValue(l) && (l === ee.activeElement || this.hasPendingUserEdit()), ae = se || C === null || C === !1 && !M ? null : String(C), j = o.isEvaluate && ae !== null && v.URL_ATTRIBUTES.has(t) && Oe.hasScriptScheme(ae);
6808
+ const F = o.isForceEvaluation() ? r : E ? w : A, Z = i && o.isEvaluate && t === "value" && v.isValuePropertyTarget(l), ee = l.getRootNode(), ne = this.userEditSequence, K = Z && v.isUserEditableValue(l) && (l === ee.activeElement || this.hasPendingUserEdit()), ae = se || F === null || F === !1 && !$ ? null : String(F), j = o.isEvaluate && ae !== null && v.URL_ATTRIBUTES.has(t) && Oe.hasScriptScheme(ae);
6809
6809
  j && m.warn(
6810
6810
  "[Haori]",
6811
6811
  `Attribute "${t}" was removed because the evaluated URL uses a script scheme: ${e}="${r}" -> ${ae}`,
@@ -7579,11 +7579,11 @@ const Je = class Je {
7579
7579
  if (r(l)) {
7580
7580
  const u = Ye.measure(
7581
7581
  () => re.evaluateDetailed(l.text, e)
7582
- ), d = u.value;
7582
+ ), h = u.value;
7583
7583
  a += u.durationMs, n.push({
7584
7584
  expression: l.text,
7585
7585
  durationMs: u.durationMs
7586
- }), o = o || d.unresolvedReference, s.push(d.value);
7586
+ }), o = o || h.unresolvedReference, s.push(h.value);
7587
7587
  } else
7588
7588
  s.push(l.text);
7589
7589
  } catch (u) {
@@ -8757,15 +8757,15 @@ const g = class g {
8757
8757
  );
8758
8758
  u.edited && (t[String(s)] = u.value);
8759
8759
  } else if (o && g.isGroupedCheckable(e)) {
8760
- const u = String(s), d = e.getTarget();
8761
- r === null && !Array.isArray(t[u]) && (t[u] = []), !l && d.checked && (Array.isArray(t[u]) || (t[u] = []), t[u].push(d.value));
8760
+ const u = String(s), h = e.getTarget();
8761
+ r === null && !Array.isArray(t[u]) && (t[u] = []), !l && h.checked && (Array.isArray(t[u]) || (t[u] = []), t[u].push(h.value));
8762
8762
  } else if (o && l)
8763
8763
  Array.isArray(t[String(s)]) ? t[String(s)].push(null) : t[String(s)] = [null];
8764
8764
  else if (!l) if (o) {
8765
- const u = g.resolveCollectedValue(e), d = g.isFileInput(e) && Array.isArray(u) ? u : [u];
8766
- Array.isArray(t[String(s)]) ? t[String(s)].push(...d) : t[String(s)] = d;
8765
+ const u = g.resolveCollectedValue(e), h = g.isFileInput(e) && Array.isArray(u) ? u : [u];
8766
+ Array.isArray(t[String(s)]) ? t[String(s)].push(...h) : t[String(s)] = h;
8767
8767
  } else if (g.isGroupedCheckable(e)) {
8768
- const u = e.getTarget(), d = u instanceof HTMLInputElement ? u.checked : !0, y = u instanceof HTMLInputElement ? u.value : e.getValue(), b = d ? y : null, E = String(s);
8768
+ const u = e.getTarget(), h = u instanceof HTMLInputElement ? u.checked : !0, y = u instanceof HTMLInputElement ? u.value : e.getValue(), b = h ? y : null, E = String(s);
8769
8769
  b === null ? E in t || (t[E] = null) : t[E] === null || t[E] === void 0 ? t[E] = b : Array.isArray(t[E]) ? t[E].push(b) : t[E] = [t[E], b];
8770
8770
  } else
8771
8771
  t[String(s)] = g.resolveCollectedValue(e);
@@ -8776,20 +8776,20 @@ const g = class g {
8776
8776
  for (const u of e.getChildElementFragments())
8777
8777
  g.getPartValues(u, t, r, i);
8778
8778
  } else if (n) {
8779
- const u = {}, d = i === null ? null : /* @__PURE__ */ new Set();
8779
+ const u = {}, h = i === null ? null : /* @__PURE__ */ new Set();
8780
8780
  for (const y of e.getChildElementFragments())
8781
8781
  g.getPartValues(
8782
8782
  y,
8783
8783
  u,
8784
8784
  r,
8785
- d
8785
+ h
8786
8786
  );
8787
- d !== null && g.registerCollectedExcludedKeys(u, d), Object.keys(u).length > 0 ? t[String(n)] = u : i !== null && (d?.size ?? 0) > 0 && i.add(String(n)), a && m.warn(
8787
+ h !== null && g.registerCollectedExcludedKeys(u, h), Object.keys(u).length > 0 ? t[String(n)] = u : i !== null && (h?.size ?? 0) > 0 && i.add(String(n)), a && m.warn(
8788
8788
  "Haori",
8789
8789
  `Element cannot have both ${c.prefix}form-list and ${c.prefix}form-object attributes.`
8790
8790
  );
8791
8791
  } else if (a) {
8792
- const u = [], d = [];
8792
+ const u = [], h = [];
8793
8793
  let y = !1;
8794
8794
  for (const b of e.getChildElementFragments()) {
8795
8795
  const E = {}, A = i === null ? null : /* @__PURE__ */ new Set();
@@ -8798,14 +8798,14 @@ const g = class g {
8798
8798
  E,
8799
8799
  r,
8800
8800
  A
8801
- ), A !== null && g.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (y = !0, u.push(E), d.push(b.getListKey())) : r !== null && (u.push({}), d.push(b.getListKey()));
8801
+ ), A !== null && g.registerCollectedExcludedKeys(E, A), Object.keys(E).length > 0 ? (y = !0, u.push(E), h.push(b.getListKey())) : r !== null && (u.push({}), h.push(b.getListKey()));
8802
8802
  }
8803
8803
  if (r === null) {
8804
8804
  const b = e.getAttribute(`${c.prefix}each-key`);
8805
8805
  g.registerCollectedRowIdentity(
8806
8806
  u,
8807
8807
  b == null ? null : String(b),
8808
- d,
8808
+ h,
8809
8809
  g.isCollectedListFromEachSource(e)
8810
8810
  ), g.warnDerivedRowsWithoutKey(e), t[String(a)] = u;
8811
8811
  } else y && (t[String(a)] = u);
@@ -9084,10 +9084,10 @@ const g = class g {
9084
9084
  return r.querySelectorAll(o).forEach((l) => {
9085
9085
  if (!(l instanceof HTMLElement))
9086
9086
  return;
9087
- let u = null, d = !1, y = l;
9087
+ let u = null, h = !1, y = l;
9088
9088
  for (; y && y !== r; )
9089
- y.hasAttribute(`${c.prefix}form-detach`) && (d = !0), (y.hasAttribute(s) || y.hasAttribute(n)) && (u = y), y = y.parentElement;
9090
- if (d)
9089
+ y.hasAttribute(`${c.prefix}form-detach`) && (h = !0), (y.hasAttribute(s) || y.hasAttribute(n)) && (u = y), y = y.parentElement;
9090
+ if (h)
9091
9091
  return;
9092
9092
  const b = u ?? l, E = b.getAttribute(s) || b.getAttribute(n) || b.getAttribute(`${c.prefix}form-name`) || b.getAttribute("name");
9093
9093
  E && t.add(E);
@@ -9418,7 +9418,7 @@ const g = class g {
9418
9418
  static createRowKeyIndexes(e, t) {
9419
9419
  const r = /* @__PURE__ */ new Map();
9420
9420
  return e.forEach((i, s) => {
9421
- const n = $.createListKey(
9421
+ const n = C.createListKey(
9422
9422
  i,
9423
9423
  t,
9424
9424
  s
@@ -9598,7 +9598,7 @@ const g = class g {
9598
9598
  const s = { ...i };
9599
9599
  for (const n of t)
9600
9600
  delete s[n];
9601
- return $.setBindingData(e.getTarget(), s, {
9601
+ return C.setBindingData(e.getTarget(), s, {
9602
9602
  kind: r?.kind ?? "supply",
9603
9603
  sequence: r?.sequence ?? R.nextSequence()
9604
9604
  });
@@ -9902,7 +9902,7 @@ const g = class g {
9902
9902
  const o = [];
9903
9903
  if (e.hasAttribute(`${c.prefix}form-detach`) && !r)
9904
9904
  return Promise.resolve();
9905
- const l = g.resolveFieldName(e), u = e.getAttribute(`${c.prefix}form-object`), d = e.getAttribute(`${c.prefix}form-list`), y = e.hasAttribute(`${c.prefix}form-list`);
9905
+ const l = g.resolveFieldName(e), u = e.getAttribute(`${c.prefix}form-object`), h = e.getAttribute(`${c.prefix}form-list`), y = e.hasAttribute(`${c.prefix}form-list`);
9906
9906
  if (l) {
9907
9907
  const b = t[String(l)], E = s && re.withoutDiagnosis(
9908
9908
  () => g.hasResolvedDeclarativeState(e)
@@ -9917,11 +9917,11 @@ const g = class g {
9917
9917
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
9918
9918
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
9919
9919
  !g.isGroupedCheckable(e) && !g.isMultipleSelect(e)) {
9920
- const M = String(l), F = n.get(M) ?? 0;
9921
- n.set(M, F + 1), o.push(
9920
+ const $ = String(l), M = n.get($) ?? 0;
9921
+ n.set($, M + 1), o.push(
9922
9922
  g.applyFragmentValue(
9923
9923
  e,
9924
- w[F] ?? null,
9924
+ w[M] ?? null,
9925
9925
  i,
9926
9926
  a
9927
9927
  )
@@ -9950,19 +9950,19 @@ const g = class g {
9950
9950
  a
9951
9951
  )
9952
9952
  );
9953
- } else if (d) {
9954
- const b = t[String(d)], E = Array.isArray(b) ? b : [], A = e.getChildElementFragments(), w = e.getAttribute(`${c.prefix}each-key`), M = g.isCollectedListFromEachSource(e) ? g.pairRowsWithItems(
9953
+ } else if (h) {
9954
+ const b = t[String(h)], E = Array.isArray(b) ? b : [], A = e.getChildElementFragments(), w = e.getAttribute(`${c.prefix}each-key`), $ = g.isCollectedListFromEachSource(e) ? g.pairRowsWithItems(
9955
9955
  A,
9956
9956
  E,
9957
9957
  w == null ? null : String(w)
9958
9958
  ) : null;
9959
- for (let F = 0; F < A.length; F++) {
9960
- const se = A[F], C = M ? M[F] : E.length > F ? E[F] : null;
9959
+ for (let M = 0; M < A.length; M++) {
9960
+ const se = A[M], F = $ ? $[M] : E.length > M ? E[M] : null;
9961
9961
  o.push(
9962
9962
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
9963
9963
  g.setPartValues(
9964
9964
  se,
9965
- g.asPlainRecord(C) ?? {},
9965
+ g.asPlainRecord(F) ?? {},
9966
9966
  r,
9967
9967
  i,
9968
9968
  s,
@@ -10006,7 +10006,7 @@ const g = class g {
10006
10006
  const r = g.collectBindingTargetForms(e);
10007
10007
  if (r.length > 0 && r.every((s) => s.isSupplyStale(t)))
10008
10008
  return;
10009
- g.markResetSubtree(e, t), $.clearUserEditMarks(e, t), g.clearValues(e), await Promise.all([
10009
+ g.markResetSubtree(e, t), C.clearUserEditMarks(e, t), g.clearValues(e), await Promise.all([
10010
10010
  g.clearMessages(e),
10011
10011
  g.clearEachClones(e)
10012
10012
  ]), await J.enqueue(() => {
@@ -10020,16 +10020,16 @@ const g = class g {
10020
10020
  } finally {
10021
10021
  g.internalResetDepth -= 1;
10022
10022
  }
10023
- g.clearDeclarativeStateFromDom(e), $.invalidateDerivedSubtreeSignatures(e), g.restoreEdits(s);
10023
+ g.clearDeclarativeStateFromDom(e), C.invalidateDerivedSubtreeSignatures(e), g.restoreEdits(s);
10024
10024
  });
10025
10025
  const i = r;
10026
10026
  for (const s of i) {
10027
10027
  const n = g.getInitialBindingData(s);
10028
- n === null && s.getRawBindingData() === null || await $.setBindingData(s.getTarget(), n ?? {}, {
10028
+ n === null && s.getRawBindingData() === null || await C.setBindingData(s.getTarget(), n ?? {}, {
10029
10029
  sequence: t
10030
10030
  });
10031
10031
  }
10032
- g.syncValuesFromDom(e), await $.evaluateAll(e);
10032
+ g.syncValuesFromDom(e), await C.evaluateAll(e);
10033
10033
  for (const s of i)
10034
10034
  g.getInitialBindingData(s) !== null || s.getRawBindingData() !== null || await g.restoreAncestorArgValues(s, {
10035
10035
  sequence: t,
@@ -10049,7 +10049,7 @@ const g = class g {
10049
10049
  ));
10050
10050
  } else
10051
10051
  l = g.mergeCollectedValues(l, a), g.deleteAncestorOwnedKeys(s, n, l);
10052
- await $.setBindingData(s.getTarget(), l, {
10052
+ await C.setBindingData(s.getTarget(), l, {
10053
10053
  sequence: t
10054
10054
  });
10055
10055
  }
@@ -10077,7 +10077,7 @@ const g = class g {
10077
10077
  */
10078
10078
  static getInitialBindingData(e) {
10079
10079
  const t = e.getInitialBindAttribute();
10080
- return t === null ? null : $.parseDataBind(t);
10080
+ return t === null ? null : C.parseDataBind(t);
10081
10081
  }
10082
10082
  /**
10083
10083
  * フラグメント配下の入力要素について、内部値を現在の DOM 値と再同期します。
@@ -10321,9 +10321,9 @@ const g = class g {
10321
10321
  if (isNaN(u))
10322
10322
  m.error("Haori", `Invalid index: ${i}`);
10323
10323
  else {
10324
- const d = e.getChildElementFragments().filter((y) => y.hasAttribute(`${c.prefix}row`));
10325
- u < d.length && r.push(
10326
- ...g.findFragmentByKeyParts(d[u], t.slice(1))
10324
+ const h = e.getChildElementFragments().filter((y) => y.hasAttribute(`${c.prefix}row`));
10325
+ u < h.length && r.push(
10326
+ ...g.findFragmentByKeyParts(h[u], t.slice(1))
10327
10327
  );
10328
10328
  }
10329
10329
  }
@@ -10434,8 +10434,8 @@ class O {
10434
10434
  static bindChange(e, t, r, i = "other") {
10435
10435
  const s = [], n = new Set(Object.keys(t || {})), a = new Set(Object.keys(r)), o = /* @__PURE__ */ new Set([...n, ...a]);
10436
10436
  for (const l of o) {
10437
- const u = t?.[l], d = r[l];
10438
- u !== d && s.push(l);
10437
+ const u = t?.[l], h = r[l];
10438
+ u !== h && s.push(l);
10439
10439
  }
10440
10440
  O.dispatch(e, "bindchange", {
10441
10441
  previous: t || {},
@@ -10872,18 +10872,18 @@ const x = class x {
10872
10872
  const s = e.getRawAttribute(`${c.prefix}store-type`);
10873
10873
  let n = "session";
10874
10874
  if (s !== null) {
10875
- const d = s.trim();
10876
- d === "local" || d === "session" ? n = d : x.warnOnce(
10875
+ const h = s.trim();
10876
+ h === "local" || h === "session" ? n = h : x.warnOnce(
10877
10877
  t,
10878
10878
  "type",
10879
- `${c.prefix}store-type は session または local を指定してください(session として扱います): ${d}`
10879
+ `${c.prefix}store-type は session または local を指定してください(session として扱います): ${h}`
10880
10880
  );
10881
10881
  }
10882
10882
  const a = e.getRawAttribute(`${c.prefix}store-arg`), o = a === null || a.trim() === "" ? null : a.trim(), l = e.getRawAttribute(`${c.prefix}store-params`);
10883
10883
  let u = null;
10884
10884
  if (l !== null) {
10885
- const d = l.split("&").map((b) => b.trim()).filter((b) => b !== ""), y = d.filter((b) => !x.isReservedKey(b));
10886
- y.length !== d.length && x.warnOnce(
10885
+ const h = l.split("&").map((b) => b.trim()).filter((b) => b !== ""), y = h.filter((b) => !x.isReservedKey(b));
10886
+ y.length !== h.length && x.warnOnce(
10887
10887
  t,
10888
10888
  "reserved",
10889
10889
  `${c.prefix}store-params の予約キー(先頭が _ のキー)は対象外です。`
@@ -11095,7 +11095,7 @@ const x = class x {
11095
11095
  ), Promise.resolve();
11096
11096
  x.RESTORED_ELEMENTS.add(r);
11097
11097
  const i = x.readRecord(t), s = i ? x.extractFromRecord(t, i) : {}, n = { ...e.getRawBindingData() ?? {}, ...s };
11098
- return x.seedSignature(r, x.selectFromData(t, n)), Object.keys(s).length === 0 ? Promise.resolve() : $.setBindingData(r, n, {
11098
+ return x.seedSignature(r, x.selectFromData(t, n)), Object.keys(s).length === 0 ? Promise.resolve() : C.setBindingData(r, n, {
11099
11099
  reentrant: !0,
11100
11100
  kind: "nonSupply",
11101
11101
  sequence: R.nextSequence()
@@ -11191,7 +11191,7 @@ const x = class x {
11191
11191
  };
11192
11192
  x.SIGNATURES = /* @__PURE__ */ new WeakMap(), x.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), x.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), x.WARNED_KINDS = /* @__PURE__ */ new Set();
11193
11193
  let Be = x;
11194
- const Ie = "[Haori]", Ce = {
11194
+ const Ie = "[Haori]", Fe = {
11195
11195
  bodyIgnored: (p) => `${p} is ignored because ${p}-handler is also declared.`,
11196
11196
  notRegistered: (p, e) => `Handler "${p}" is not registered (${e}-handler). Register it with Haori.handlers.register().`,
11197
11197
  argsNotArray: (p) => `${p}-args must evaluate to an array without unresolved references; the handler is not called.`,
@@ -11231,7 +11231,7 @@ class oe {
11231
11231
  */
11232
11232
  static compile(e, t, r) {
11233
11233
  const i = `${t}-handler`;
11234
- return e.hasAttribute(i) ? (V.isEnabled() && e.hasAttribute(t) && m.warn(Ie, Ce.bodyIgnored(t), e.getTarget()), oe.compileHandler(e, t)) : oe.compileExpression(e, t, r);
11234
+ return e.hasAttribute(i) ? (V.isEnabled() && e.hasAttribute(t) && m.warn(Ie, Fe.bodyIgnored(t), e.getTarget()), oe.compileHandler(e, t)) : oe.compileExpression(e, t, r);
11235
11235
  }
11236
11236
  /**
11237
11237
  * 登録した関数を呼ぶ呼び出しを組み立てます(`-handler` / `-args`)。
@@ -11249,7 +11249,7 @@ class oe {
11249
11249
  if (n === void 0) {
11250
11250
  m.warn(
11251
11251
  Ie,
11252
- Ce.notRegistered(r, t),
11252
+ Fe.notRegistered(r, t),
11253
11253
  e.getTarget()
11254
11254
  );
11255
11255
  return;
@@ -11261,7 +11261,7 @@ class oe {
11261
11261
  e.getBindingData()
11262
11262
  );
11263
11263
  if (!Array.isArray(o.value)) {
11264
- m.warn(Ie, Ce.argsNotArray(t), i);
11264
+ m.warn(Ie, Fe.argsNotArray(t), i);
11265
11265
  return;
11266
11266
  }
11267
11267
  a = o.value;
@@ -11283,11 +11283,11 @@ class oe {
11283
11283
  static compileExpression(e, t, r) {
11284
11284
  const i = e.getRawAttribute(t);
11285
11285
  if (i.includes("{{"))
11286
- return m.warn(Ie, Ce.templateInBody(t), e.getTarget()), null;
11286
+ return m.warn(Ie, Fe.templateInBody(t), e.getTarget()), null;
11287
11287
  try {
11288
11288
  Le.compile(i);
11289
11289
  } catch {
11290
- return m.warn(Ie, Ce.notExpression(t), e.getTarget()), null;
11290
+ return m.warn(Ie, Fe.notExpression(t), e.getTarget()), null;
11291
11291
  }
11292
11292
  return (s) => {
11293
11293
  const n = e.getBindingData();
@@ -11310,7 +11310,7 @@ class oe {
11310
11310
  */
11311
11311
  static reportShadowedHandlers(e, t) {
11312
11312
  const r = Object.keys(e).filter((i) => Ne.has(i));
11313
- r.length > 0 && m.warn(Ie, Ce.shadowed(r, t));
11313
+ r.length > 0 && m.warn(Ie, Fe.shadowed(r, t));
11314
11314
  }
11315
11315
  }
11316
11316
  const Rr = [
@@ -11337,10 +11337,10 @@ function je(p) {
11337
11337
  function xr(p, e) {
11338
11338
  for (const [t, r] of Object.entries(e))
11339
11339
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
11340
- p.append(t, Fe(i));
11341
- }) : p.append(t, Fe(r)));
11340
+ p.append(t, Ce(i));
11341
+ }) : p.append(t, Ce(r)));
11342
11342
  }
11343
- function Fe(p) {
11343
+ function Ce(p) {
11344
11344
  if (p == null)
11345
11345
  return "";
11346
11346
  if (typeof p == "object" || typeof p == "function")
@@ -11422,11 +11422,11 @@ function we(p, e) {
11422
11422
  }
11423
11423
  return e;
11424
11424
  }
11425
- function Cr(p) {
11425
+ function Fr(p) {
11426
11426
  const e = p?.body;
11427
11427
  return e == null ? !1 : typeof e == "string" ? e !== "" : !0;
11428
11428
  }
11429
- function Fr(p, e) {
11429
+ function Cr(p, e) {
11430
11430
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
11431
11431
  if (c.runtime !== "demo" || je(r))
11432
11432
  return {
@@ -11526,7 +11526,7 @@ const f = class f {
11526
11526
  * @param domEvent 起点となった DOM イベント
11527
11527
  */
11528
11528
  constructor(e, t = null, r = null) {
11529
- this.reentrantBind = !1, this.suppressEmptyReplaceBind = !1, this.requestUserEditSequence = null, this.downloadReceivedBytes = 0, this.downloadTotalBytes = null, this.downloadFolder = null, this.twoWayCommitBind = !1, this.skipped = !1, this.operationSequence = r != null ? R.nextOperationSequence() : R.nextSequence(), f.isElementFragment(e) ? (this.options = f.buildOptions(e, t), this.eventType = t) : (this.options = e, this.eventType = null), this.domEvent = r;
11529
+ this.reentrantBind = !1, this.suppressEmptyReplaceBind = !1, this.requestUserEditSequence = null, this.downloadReceivedBytes = 0, this.downloadTotalBytes = null, this.downloadFolder = null, this.twoWayCommitBind = !1, this.skipped = !1, this.bindStartSequence = 0, this.operationSequence = r != null ? R.nextOperationSequence() : R.nextSequence(), f.isElementFragment(e) ? (this.options = f.buildOptions(e, t), this.eventType = t) : (this.options = e, this.eventType = null), this.domEvent = r;
11530
11530
  }
11531
11531
  /**
11532
11532
  * クリックで起動した手続きの結果を控えます。
@@ -11827,7 +11827,7 @@ const f = class f {
11827
11827
  const r = e.getRawAttribute(t);
11828
11828
  let i;
11829
11829
  try {
11830
- i = $.parseDataBind(r);
11830
+ i = C.parseDataBind(r);
11831
11831
  } catch (s) {
11832
11832
  return m.error("Haori", `Invalid fetch headers: ${s}`), null;
11833
11833
  }
@@ -12025,7 +12025,7 @@ const f = class f {
12025
12025
  const a = r.trim();
12026
12026
  if (f.SINGLE_PLACEHOLDER_REGEX.test(a))
12027
12027
  return {
12028
- value: $.parseDataBind(s),
12028
+ value: C.parseDataBind(s),
12029
12029
  hasUnresolvedReference: n
12030
12030
  };
12031
12031
  if (a.startsWith("{") || a.startsWith("[")) {
@@ -12034,7 +12034,7 @@ const f = class f {
12034
12034
  e.getBindingData()
12035
12035
  );
12036
12036
  return {
12037
- value: $.parseDataBind(l.value),
12037
+ value: C.parseDataBind(l.value),
12038
12038
  hasUnresolvedReference: n || l.hasUnresolvedReference
12039
12039
  };
12040
12040
  }
@@ -12043,7 +12043,7 @@ const f = class f {
12043
12043
  e.getBindingData()
12044
12044
  );
12045
12045
  return {
12046
- value: $.parseDataBind(o.value),
12046
+ value: C.parseDataBind(o.value),
12047
12047
  hasUnresolvedReference: n || o.hasUnresolvedReference
12048
12048
  };
12049
12049
  }
@@ -12169,10 +12169,10 @@ ${U}
12169
12169
  l
12170
12170
  );
12171
12171
  u !== null && (a.headers = u);
12172
- const d = t ? f.attrName(t, "fetch-content-type") : f.attrName(null, "content-type", !0);
12172
+ const h = t ? f.attrName(t, "fetch-content-type") : f.attrName(null, "content-type", !0);
12173
12173
  let y = null;
12174
- if (e.hasAttribute(d)) {
12175
- const k = e.getAttributeEvaluation(d);
12174
+ if (e.hasAttribute(h)) {
12175
+ const k = e.getAttributeEvaluation(h);
12176
12176
  k?.hasUnresolvedReference && (r.fetchHasUnresolvedReference = !0), y = f.normalizeAttributeText(
12177
12177
  k?.value
12178
12178
  );
@@ -12220,18 +12220,18 @@ ${U}
12220
12220
  );
12221
12221
  }
12222
12222
  }
12223
- const w = f.attrName(t, "bind-arg"), M = f.attrName(null, "arg", !0), F = f.attrName(null, "bind-arg", !0);
12224
- t ? e.hasAttribute(w) && (r.bindArg = e.getRawAttribute(w)) : e.hasAttribute(M) ? r.bindArg = e.getRawAttribute(
12225
- M
12226
- ) : e.hasAttribute(F) && (r.bindArg = e.getRawAttribute(F));
12223
+ const w = f.attrName(t, "bind-arg"), $ = f.attrName(null, "arg", !0), M = f.attrName(null, "bind-arg", !0);
12224
+ t ? e.hasAttribute(w) && (r.bindArg = e.getRawAttribute(w)) : e.hasAttribute($) ? r.bindArg = e.getRawAttribute(
12225
+ $
12226
+ ) : e.hasAttribute(M) && (r.bindArg = e.getRawAttribute(M));
12227
12227
  const se = t ? f.attrName(t, "bind-params") : f.attrName(null, "bind-params", !0);
12228
12228
  if (e.hasAttribute(se)) {
12229
12229
  const k = e.getRawAttribute(se);
12230
12230
  r.bindParams = k.split("&").map((B) => B.trim());
12231
12231
  }
12232
- const C = t ? f.attrName(t, "bind-append") : f.attrName(null, "bind-append", !0);
12233
- if (e.hasAttribute(C)) {
12234
- const k = e.getRawAttribute(C);
12232
+ const F = t ? f.attrName(t, "bind-append") : f.attrName(null, "bind-append", !0);
12233
+ if (e.hasAttribute(F)) {
12234
+ const k = e.getRawAttribute(F);
12235
12235
  r.bindAppendParams = k.split("&").map((B) => B.trim()).filter(Boolean);
12236
12236
  }
12237
12237
  const Z = t ? f.attrName(t, "bind-merge") : f.attrName(null, "bind-merge", !0);
@@ -12577,6 +12577,36 @@ ${W}
12577
12577
  static resolveAutoFetchSignature(e) {
12578
12578
  return new f(e, null).resolveFetchSignature();
12579
12579
  }
12580
+ /**
12581
+ * `data-{event}-refetch` の対象の `data-fetch` を取り直します。
12582
+ *
12583
+ * 仕様「`data-{event}-refetch`」の「手続きがバインド(処理順序の 9)へ進んだ後に、
12584
+ * 対象の要素で、今の実行シグネチャの自動の取得が始まった場合は、取り直しません」。
12585
+ * 待つ必要が無い場合は、呼んだ時点で取り直しを始めます(後続の
12586
+ * `data-{event}-click` より先に始める順序を保つ)。
12587
+ *
12588
+ * @param fragment 取り直す対象の要素
12589
+ * @returns 取り直し(または省いた判断)の完了
12590
+ */
12591
+ refetch(e) {
12592
+ const t = C.coveredByManagedFetch(
12593
+ e,
12594
+ this.bindStartSequence
12595
+ );
12596
+ return t === !0 ? Promise.resolve() : t === !1 ? f.startRefetch(e) : t.then(
12597
+ (r) => r ? void 0 : f.startRefetch(e)
12598
+ );
12599
+ }
12600
+ /**
12601
+ * 対象の `data-fetch` を取り直します。取り直す実行シグネチャは、自動の取得の
12602
+ * 比較用に記録します(`Core.recordRefetchSignature()`)。
12603
+ *
12604
+ * @param fragment 取り直す対象の要素
12605
+ * @returns 取り直しの完了
12606
+ */
12607
+ static startRefetch(e) {
12608
+ return C.recordRefetchSignature(e), new f(e, null).run();
12609
+ }
12580
12610
  /**
12581
12611
  * 一連の処理を実行します。オプションが空の場合は即座にresolveされます。
12582
12612
  *
@@ -12586,6 +12616,10 @@ ${W}
12586
12616
  return this.runWithResult().then(() => {
12587
12617
  });
12588
12618
  }
12619
+ /**
12620
+ * bind 結果の反映を reentrant(即時実行)で行うよう指定します。マネージド
12621
+ * `data-fetch` の自動再評価から生成した Procedure に対して使います。
12622
+ */
12589
12623
  markReentrantBind() {
12590
12624
  this.reentrantBind = !0;
12591
12625
  }
@@ -12717,7 +12751,7 @@ ${W}
12717
12751
  return await this.commitEditOnStop(), !1;
12718
12752
  this.requestUserEditSequence = R.currentSequence();
12719
12753
  const n = s.payload, a = Object.keys(s.sentPayload).length > 0 ? s.sentPayload : void 0;
12720
- let o = s.url, l = s.options, u = !1, d = !1;
12754
+ let o = s.url, l = s.options, u = !1, h = !1;
12721
12755
  if (this.options.beforeCallback) {
12722
12756
  const A = this.options.beforeCallback(
12723
12757
  o || null,
@@ -12726,7 +12760,7 @@ ${W}
12726
12760
  if (A != null) {
12727
12761
  if (A === !1 || typeof A == "object" && A.stop)
12728
12762
  return !1;
12729
- typeof A == "object" && (u = "fetchUrl" in A, d = "fetchOptions" in A, o = u ? A.fetchUrl : o, l = d ? A.fetchOptions : l);
12763
+ typeof A == "object" && (u = "fetchUrl" in A, h = "fetchOptions" in A, o = u ? A.fetchUrl : o, l = h ? A.fetchOptions : l);
12730
12764
  }
12731
12765
  }
12732
12766
  const y = Object.keys(n).length > 0;
@@ -12736,15 +12770,15 @@ ${W}
12736
12770
  n,
12737
12771
  e
12738
12772
  );
12739
- const A = (l?.method || "GET").toUpperCase(), M = !u && d && s.transportMode === "query-get" && Cr(l) && !je(A) ? s.baseUrl ?? o : o, F = Fr(
12740
- M,
12773
+ const A = (l?.method || "GET").toUpperCase(), $ = !u && h && s.transportMode === "query-get" && Fr(l) && !je(A) ? s.baseUrl ?? o : o, M = Cr(
12774
+ $,
12741
12775
  l
12742
12776
  );
12743
- o = F.url;
12744
- const se = { ...F.options }, C = F.normalized ? F.requestedMethod : s.requestedMethod, Z = F.effectiveMethod, ee = s.transportMode === "query-get" || F.normalized, ne = F.queryString ?? s.queryString;
12777
+ o = M.url;
12778
+ const se = { ...M.options }, F = M.normalized ? M.requestedMethod : s.requestedMethod, Z = M.effectiveMethod, ee = s.transportMode === "query-get" || M.normalized, ne = M.queryString ?? s.queryString;
12745
12779
  if (ee && m.info("Haori demo fetch normalization", {
12746
12780
  runtime: c.runtime,
12747
- requestedMethod: C,
12781
+ requestedMethod: F,
12748
12782
  effectiveMethod: Z,
12749
12783
  transportMode: "query-get",
12750
12784
  url: o,
@@ -12753,7 +12787,7 @@ ${W}
12753
12787
  }), this.options.targetFragment && o) {
12754
12788
  const K = performance.now(), ae = {
12755
12789
  runtime: c.runtime,
12756
- requestedMethod: C,
12790
+ requestedMethod: F,
12757
12791
  effectiveMethod: Z,
12758
12792
  transportMode: ee ? "query-get" : "http",
12759
12793
  ...ee ? { queryString: ne } : {}
@@ -12844,9 +12878,9 @@ ${W}
12844
12878
  let l;
12845
12879
  if (o) {
12846
12880
  l = { ...n ?? {} };
12847
- const u = String(o), d = D.resolveAncestorArgOwner(e, u);
12881
+ const u = String(o), h = D.resolveAncestorArgOwner(e, u);
12848
12882
  l[u] = D.mergeCollectedValues(
12849
- (d ? d.value : l[u]) ?? null,
12883
+ (h ? h.value : l[u]) ?? null,
12850
12884
  a
12851
12885
  );
12852
12886
  } else
@@ -12855,7 +12889,7 @@ ${W}
12855
12889
  a,
12856
12890
  D.ancestorBaseResolver(e)
12857
12891
  );
12858
- await $.setBindingData(i, l, {
12892
+ await C.setBindingData(i, l, {
12859
12893
  skipFragments: s,
12860
12894
  kind: "nonSupply",
12861
12895
  sequence: this.operationSequence,
@@ -12954,7 +12988,7 @@ ${W}
12954
12988
  t.removeAttribute("disabled");
12955
12989
  return;
12956
12990
  }
12957
- $.setAttribute(t, r.name, r.value).catch(
12991
+ C.setAttribute(t, r.name, r.value).catch(
12958
12992
  (i) => {
12959
12993
  m.error(
12960
12994
  "Haori",
@@ -13310,8 +13344,8 @@ ${W}
13310
13344
  A ? e.clone() : e,
13311
13345
  E?.noMessage !== !0 && !A
13312
13346
  );
13313
- return A && await this.bindResult(e).catch((M) => {
13314
- m.error("Haori", "Failed to bind the error response:", M);
13347
+ return A && await this.bindResult(e).catch(($) => {
13348
+ m.error("Haori", "Failed to bind the error response:", $);
13315
13349
  }), await this.injectFetchState(
13316
13350
  "error",
13317
13351
  e.status,
@@ -13345,7 +13379,7 @@ ${W}
13345
13379
  ), await this.runErrorActions(null), !1;
13346
13380
  }
13347
13381
  }
13348
- this.options.clearMessagesOnSuccess && await i.clearMessages(this.resolveMessageScope());
13382
+ this.options.clearMessagesOnSuccess && await i.clearMessages(this.resolveMessageScope()), this.bindStartSequence = C.getManagedFetchSequence();
13349
13383
  const s = [];
13350
13384
  s.push(this.bindResult(e)), s.push(this.adjust()), s.push(this.addRow()), s.push(this.removeRow()), s.push(this.movePrevRow()), s.push(this.moveNextRow()), await Promise.all(s), await this.injectFetchState("success", e.status, null), this.options.resetFragments && this.options.resetFragments.length > 0 && await Promise.all(
13351
13385
  this.options.resetFragments.map(
@@ -13354,7 +13388,7 @@ ${W}
13354
13388
  ), await this.copy();
13355
13389
  const n = [];
13356
13390
  this.options.refetchFragments && this.options.refetchFragments.length > 0 && this.options.refetchFragments.forEach((E) => {
13357
- n.push(new f(E, null).run());
13391
+ n.push(this.refetch(E));
13358
13392
  });
13359
13393
  const a = await this.clickTargets(
13360
13394
  this.options.clickFragments,
@@ -13394,18 +13428,18 @@ ${W}
13394
13428
  f.attrName(this.eventType, "scroll"),
13395
13429
  document
13396
13430
  )?.scrollIntoView({ behavior: "smooth", block: "nearest" });
13397
- const d = this.resolveLateAttribute(
13431
+ const h = this.resolveLateAttribute(
13398
13432
  "redirect",
13399
13433
  this.options.redirectUrl
13400
13434
  ), y = this.resolveLateAttribute(
13401
13435
  "redirect-replace",
13402
13436
  this.options.redirectReplaceUrl
13403
13437
  );
13404
- d && y && m.warn(
13438
+ h && y && m.warn(
13405
13439
  "Haori",
13406
13440
  `${f.attrName(this.eventType, "redirect")} と ${f.attrName(this.eventType, "redirect-replace")} の両方が指定されています。履歴を置き換える方を採用します。`
13407
13441
  );
13408
- const b = y || d;
13442
+ const b = y || h;
13409
13443
  if (b) {
13410
13444
  let E = b;
13411
13445
  const A = this.resolveLateAttribute(
@@ -13413,12 +13447,12 @@ ${W}
13413
13447
  this.options.redirectReturnParam
13414
13448
  );
13415
13449
  if (A) {
13416
- const M = new URLSearchParams(window.location.search).get(A);
13417
- if (M !== null) {
13418
- const F = M.trim();
13419
- Oe.isSafeLocalPath(F) ? E = F : m.warn(
13450
+ const $ = new URLSearchParams(window.location.search).get(A);
13451
+ if ($ !== null) {
13452
+ const M = $.trim();
13453
+ Oe.isSafeLocalPath(M) ? E = M : m.warn(
13420
13454
  "Haori",
13421
- `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${M}`
13455
+ `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${$}`
13422
13456
  );
13423
13457
  }
13424
13458
  }
@@ -13455,7 +13489,7 @@ ${W}
13455
13489
  if (!e || e.length === 0)
13456
13490
  return !1;
13457
13491
  for (const i of e) {
13458
- await $.evaluateAll(i);
13492
+ await C.evaluateAll(i);
13459
13493
  const s = i.getTarget();
13460
13494
  if (t && f.takeClickOutcome(s), typeof s.click == "function" ? s.click() : s.dispatchEvent(
13461
13495
  new MouseEvent("click", { bubbles: !0, cancelable: !0 })
@@ -13585,14 +13619,14 @@ ${W}
13585
13619
  return;
13586
13620
  }
13587
13621
  const l = (u) => {
13588
- for (const [d, y] of Object.entries(u))
13589
- y != null && (Array.isArray(y) ? (o.searchParams.delete(d), y.forEach((b) => o.searchParams.append(d, String(b)))) : typeof y == "object" ? o.searchParams.set(d, JSON.stringify(y)) : o.searchParams.set(d, String(y)));
13622
+ for (const [h, y] of Object.entries(u))
13623
+ y != null && (Array.isArray(y) ? (o.searchParams.delete(h), y.forEach((b) => o.searchParams.append(h, String(b)))) : typeof y == "object" ? o.searchParams.set(h, JSON.stringify(y)) : o.searchParams.set(h, String(y)));
13590
13624
  };
13591
13625
  s && l(r), n && l(i), history.pushState(
13592
13626
  { [Tr]: !0 },
13593
13627
  "",
13594
13628
  o.toString()
13595
- ), $.refreshUrlParams();
13629
+ ), C.refreshUrlParams();
13596
13630
  } catch (a) {
13597
13631
  m.error("Haori", `history.pushState failed: ${a}`);
13598
13632
  }
@@ -13625,60 +13659,60 @@ ${W}
13625
13659
  const i = r ? r.getTarget() : document.body;
13626
13660
  await ge().clearMessages(i);
13627
13661
  const s = async (u) => {
13628
- const d = r ? r.getTarget() : document.body;
13629
- await ge().addErrorMessage(d, u);
13662
+ const h = r ? r.getTarget() : document.body;
13663
+ await ge().addErrorMessage(h, u);
13630
13664
  }, n = () => {
13631
13665
  if (!this.options.scrollOnError)
13632
13666
  return;
13633
- const u = r ? r.getTarget() : document.body, d = u.nextElementSibling;
13667
+ const u = r ? r.getTarget() : document.body, h = u.nextElementSibling;
13634
13668
  (u.getAttribute("data-message-level") === "error" ? u : u.parentElement?.getAttribute("data-message-level") === "error" ? u.parentElement : u.querySelector(
13635
13669
  '[data-message-level="error"]'
13636
- ) ?? (d?.getAttribute("data-message-level") === "error" ? d : null))?.scrollIntoView({ behavior: "smooth", block: "nearest" });
13670
+ ) ?? (h?.getAttribute("data-message-level") === "error" ? h : null))?.scrollIntoView({ behavior: "smooth", block: "nearest" });
13637
13671
  }, a = async (u) => {
13638
13672
  if (t) {
13639
13673
  u.length === 0 && await s(`${e.status} ${e.statusText}`);
13640
- for (const d of u)
13641
- d.key && r ? await D.addErrorMessage(r, d.key, d.message) : await s(d.message);
13674
+ for (const h of u)
13675
+ h.key && r ? await D.addErrorMessage(r, h.key, h.message) : await s(h.message);
13642
13676
  n();
13643
13677
  }
13644
- return u.length === 0 ? null : u.map((d) => d.message).join(`
13678
+ return u.length === 0 ? null : u.map((h) => h.message).join(`
13645
13679
  `);
13646
13680
  };
13647
13681
  if ((e.headers.get("Content-Type") || "").includes("application/json"))
13648
13682
  try {
13649
- const u = await e.json(), d = [];
13683
+ const u = await e.json(), h = [];
13650
13684
  if (Array.isArray(u)) {
13651
13685
  const y = /* @__PURE__ */ new Map(), b = [];
13652
13686
  for (const E of u)
13653
13687
  if (E && typeof E == "object" && !Array.isArray(E)) {
13654
- const A = E.key, w = E.message, M = typeof A == "string" && A.length > 0 ? A : null, F = typeof w == "string" ? w : w != null ? String(w) : "";
13655
- if (F.length === 0)
13688
+ const A = E.key, w = E.message, $ = typeof A == "string" && A.length > 0 ? A : null, M = typeof w == "string" ? w : w != null ? String(w) : "";
13689
+ if (M.length === 0)
13656
13690
  continue;
13657
- if (M !== null) {
13658
- const se = y.get(M) ?? [];
13659
- se.push(F), y.set(M, se);
13691
+ if ($ !== null) {
13692
+ const se = y.get($) ?? [];
13693
+ se.push(M), y.set($, se);
13660
13694
  } else
13661
- b.push(F);
13695
+ b.push(M);
13662
13696
  } else typeof E == "string" && E.length > 0 && b.push(E);
13663
13697
  for (const [E, A] of y)
13664
- d.push({ key: E, message: A.join(`
13698
+ h.push({ key: E, message: A.join(`
13665
13699
  `) });
13666
13700
  for (const E of b)
13667
- d.push({ message: E });
13701
+ h.push({ message: E });
13668
13702
  } else if (u && typeof u == "object") {
13669
- if (typeof u.message == "string" && d.push({ message: u.message }), Array.isArray(u.messages))
13703
+ if (typeof u.message == "string" && h.push({ message: u.message }), Array.isArray(u.messages))
13670
13704
  for (const y of u.messages)
13671
- typeof y == "string" && d.push({ message: y });
13705
+ typeof y == "string" && h.push({ message: y });
13672
13706
  if (u.errors && typeof u.errors == "object")
13673
13707
  for (const [y, b] of Object.entries(u.errors))
13674
- Array.isArray(b) ? d.push({ key: y, message: b.join(`
13675
- `) }) : typeof b == "string" ? d.push({ key: y, message: b }) : b != null && d.push({ key: y, message: String(b) });
13676
- if (d.length === 0)
13708
+ Array.isArray(b) ? h.push({ key: y, message: b.join(`
13709
+ `) }) : typeof b == "string" ? h.push({ key: y, message: b }) : b != null && h.push({ key: y, message: String(b) });
13710
+ if (h.length === 0)
13677
13711
  for (const [y, b] of Object.entries(u))
13678
- y === "message" || y === "messages" || y === "errors" || (Array.isArray(b) ? d.push({ key: y, message: b.join(`
13679
- `) }) : typeof b == "string" && d.push({ key: y, message: b }));
13712
+ y === "message" || y === "messages" || y === "errors" || (Array.isArray(b) ? h.push({ key: y, message: b.join(`
13713
+ `) }) : typeof b == "string" && h.push({ key: y, message: b }));
13680
13714
  }
13681
- return await a(d);
13715
+ return await a(h);
13682
13716
  } catch {
13683
13717
  }
13684
13718
  let l = "";
@@ -13892,11 +13926,11 @@ ${W}
13892
13926
  apply: (b) => {
13893
13927
  const E = this.resolveCurrentRowItem(o, b), A = { ...E };
13894
13928
  if (i && typeof i == "object" && !Array.isArray(i)) {
13895
- const w = E[y], M = w !== null && typeof w == "object" && !Array.isArray(w) ? w : {};
13929
+ const w = E[y], $ = w !== null && typeof w == "object" && !Array.isArray(w) ? w : {};
13896
13930
  A[y] = this.mergeAppendBindingData(
13897
13931
  o,
13898
13932
  i,
13899
- M
13933
+ $
13900
13934
  );
13901
13935
  } else
13902
13936
  A[y] = i;
@@ -13905,20 +13939,20 @@ ${W}
13905
13939
  });
13906
13940
  return;
13907
13941
  }
13908
- const u = { ...o.getRawBindingData() ?? {} }, d = this.options.bindArg;
13942
+ const u = { ...o.getRawBindingData() ?? {} }, h = this.options.bindArg;
13909
13943
  if (i && typeof i == "object" && !Array.isArray(i)) {
13910
- const y = u[d], b = y && typeof y == "object" && !Array.isArray(y) ? y : {};
13911
- u[d] = this.mergeAppendBindingData(
13944
+ const y = u[h], b = y && typeof y == "object" && !Array.isArray(y) ? y : {};
13945
+ u[h] = this.mergeAppendBindingData(
13912
13946
  o,
13913
13947
  i,
13914
13948
  b
13915
13949
  );
13916
13950
  } else
13917
- u[d] = i;
13951
+ u[h] = i;
13918
13952
  s.push(
13919
- $.setBindingData(
13953
+ C.setBindingData(
13920
13954
  o.getTarget(),
13921
- this.reconcileUserEditsForBind(o, u, [d]),
13955
+ this.reconcileUserEditsForBind(o, u, [h]),
13922
13956
  {
13923
13957
  // マネージド fetch の bind かつ、bind 先が実行中のバインドワークを
13924
13958
  // 持つ(= 自分自身を await している)ときだけ reentrant(即時実行)に
@@ -13972,13 +14006,13 @@ ${W}
13972
14006
  const u = this.mergeAppendBindingData(
13973
14007
  o,
13974
14008
  i
13975
- ), d = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
14009
+ ), h = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
13976
14010
  s.push(
13977
- $.setBindingData(
14011
+ C.setBindingData(
13978
14012
  o.getTarget(),
13979
14013
  this.reconcileUserEditsForBind(
13980
14014
  o,
13981
- d,
14015
+ h,
13982
14016
  Object.keys(u)
13983
14017
  ),
13984
14018
  {
@@ -14038,7 +14072,7 @@ ${W}
14038
14072
  if (i === null)
14039
14073
  return t;
14040
14074
  const s = this.eventType === "poll";
14041
- if (!s && !this.twoWayCommitBind && $.clearUserEditMarksSuppliedBy(e, r, i), !(e.getTarget() instanceof HTMLFormElement))
14075
+ if (!s && !this.twoWayCommitBind && C.clearUserEditMarksSuppliedBy(e, r, i), !(e.getTarget() instanceof HTMLFormElement))
14042
14076
  return this.reconcileAncestorArgFormEdits(
14043
14077
  e,
14044
14078
  t,
@@ -14078,7 +14112,7 @@ ${W}
14078
14112
  if (r === null)
14079
14113
  return t;
14080
14114
  const i = this.eventType === "poll";
14081
- !i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r);
14115
+ !i && !this.twoWayCommitBind && C.clearUserEditMarks(e, r);
14082
14116
  const s = D.getValuesEditedAfter(
14083
14117
  e,
14084
14118
  i ? 0 : r
@@ -14152,7 +14186,7 @@ ${W}
14152
14186
  ...t
14153
14187
  };
14154
14188
  s.push(
14155
- $.setBindingData(n.getTarget(), o, {
14189
+ C.setBindingData(n.getTarget(), o, {
14156
14190
  // 通番はコピーを起こした操作のもの(フェッチ応答の反映と同じ理由)。
14157
14191
  sequence: this.operationSequence
14158
14192
  })
@@ -14214,9 +14248,9 @@ ${W}
14214
14248
  * @returns コピー元のデータ
14215
14249
  */
14216
14250
  resolveCopySourceData() {
14217
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? We(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
14251
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? We(this.options.copySourceFragment) : C.withoutReservedBindingKeys(
14218
14252
  this.options.copySourceFragment.getRawBindingData() ?? {}
14219
- ) : this.options.formFragment ? We(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
14253
+ ) : this.options.formFragment ? We(this.options.formFragment) : this.options.targetFragment ? C.withoutReservedBindingKeys(
14220
14254
  this.options.targetFragment.getRawBindingData() ?? {}
14221
14255
  ) : {};
14222
14256
  }
@@ -14347,20 +14381,20 @@ ${W}
14347
14381
  const b = new FormData();
14348
14382
  for (const [E, A] of Object.entries(i))
14349
14383
  A == null ? b.append(E, "") : A instanceof Blob ? b.append(E, A) : Array.isArray(A) ? A.forEach((w) => {
14350
- w instanceof Blob ? b.append(E, w) : b.append(E, Fe(w));
14351
- }) : b.append(E, Fe(A));
14384
+ w instanceof Blob ? b.append(E, w) : b.append(E, Ce(w));
14385
+ }) : b.append(E, Ce(A));
14352
14386
  n.body = b;
14353
14387
  } else if (/application\/x-www-form-urlencoded/i.test(y)) {
14354
14388
  const b = new URLSearchParams();
14355
14389
  for (const [E, A] of Object.entries(i))
14356
- A !== void 0 && (Array.isArray(A) ? A.forEach((w) => b.append(E, Fe(w))) : b.append(E, Fe(A)));
14390
+ A !== void 0 && (Array.isArray(A) ? A.forEach((w) => b.append(E, Ce(w))) : b.append(E, Ce(A)));
14357
14391
  n.body = b;
14358
14392
  } else
14359
14393
  a.set("Content-Type", "application/json"), n.body = JSON.stringify(i);
14360
14394
  }
14361
14395
  n.headers = a;
14362
- let d;
14363
- return l && (d = new URL(s, window.location.href).search || void 0, a.delete("Content-Type")), {
14396
+ let h;
14397
+ return l && (h = new URL(s, window.location.href).search || void 0, a.delete("Content-Type")), {
14364
14398
  url: s,
14365
14399
  baseUrl: this.options.fetchUrl,
14366
14400
  options: n,
@@ -14369,7 +14403,7 @@ ${W}
14369
14403
  hasUnresolvedReference: !1,
14370
14404
  requestedMethod: o,
14371
14405
  effectiveMethod: u,
14372
- queryString: d,
14406
+ queryString: h,
14373
14407
  transportMode: l ? "query-get" : "http",
14374
14408
  signature: Pr(s, n)
14375
14409
  };
@@ -14529,27 +14563,27 @@ ${W}
14529
14563
  const u = f.resolveRowScopeBase(e, o[0]);
14530
14564
  if (u === "unresolvable")
14531
14565
  return null;
14532
- let d, y, b;
14566
+ let h, y, b;
14533
14567
  if (u)
14534
- d = u.owner, y = u.ownerData, b = [...u.path, ...o.slice(1)];
14568
+ h = u.owner, y = u.ownerData, b = [...u.path, ...o.slice(1)];
14535
14569
  else {
14536
- for (d = e, y = null; d; ) {
14537
- const A = d.getRawBindingData();
14538
- if (A && o[0] in A && !f.isRowScopeKey(d, o[0])) {
14570
+ for (h = e, y = null; h; ) {
14571
+ const A = h.getRawBindingData();
14572
+ if (A && o[0] in A && !f.isRowScopeKey(h, o[0])) {
14539
14573
  y = A;
14540
14574
  break;
14541
14575
  }
14542
- d = d.getParent();
14576
+ h = h.getParent();
14543
14577
  }
14544
14578
  b = o;
14545
14579
  }
14546
- if (!d || !y)
14580
+ if (!h || !y)
14547
14581
  return t || m.error(
14548
14582
  "Haori",
14549
14583
  `Binding data owner not found for ${n}="${a}".`
14550
14584
  ), null;
14551
14585
  const E = f.readPathValue(y, b);
14552
- return Array.isArray(E) ? { owner: d, ownerData: y, array: E, path: b, mapped: s } : (t || m.error(
14586
+ return Array.isArray(E) ? { owner: h, ownerData: y, array: E, path: b, mapped: s } : (t || m.error(
14553
14587
  "Haori",
14554
14588
  `${n}="${a}" does not resolve to an array.`
14555
14589
  ), null);
@@ -14726,10 +14760,10 @@ ${W}
14726
14760
  const a = n.array.slice();
14727
14761
  let o = !1;
14728
14762
  for (const u of i) {
14729
- const d = f.resolveRowArrayIndex(u, a);
14730
- if (d === null)
14763
+ const h = f.resolveRowArrayIndex(u, a);
14764
+ if (h === null)
14731
14765
  continue;
14732
- const y = a[d];
14766
+ const y = a[h];
14733
14767
  if (y === null || typeof y != "object" || Array.isArray(y)) {
14734
14768
  m.warn(
14735
14769
  "Haori",
@@ -14748,11 +14782,11 @@ ${W}
14748
14782
  );
14749
14783
  continue;
14750
14784
  }
14751
- a[d] = b, o = !0, u.syncWhenUnchanged === "supply" && D.clearRowUserEditMarksForChangedKeys(u.row, b);
14785
+ a[h] = b, o = !0, u.syncWhenUnchanged === "supply" && D.clearRowUserEditMarksForChangedKeys(u.row, b);
14752
14786
  }
14753
14787
  if (!o)
14754
14788
  return;
14755
- const l = $.setBindingData(
14789
+ const l = C.setBindingData(
14756
14790
  n.owner.getTarget(),
14757
14791
  f.withPathValue(n.ownerData, n.path, a),
14758
14792
  {
@@ -14768,7 +14802,7 @@ ${W}
14768
14802
  sequence: this.operationSequence
14769
14803
  }
14770
14804
  );
14771
- if ($.isEachUpdateRunning(s)) {
14805
+ if (C.isEachUpdateRunning(s)) {
14772
14806
  l.catch((u) => {
14773
14807
  m.error("Haori", "Failed to write row data.", u);
14774
14808
  });
@@ -14864,17 +14898,17 @@ ${W}
14864
14898
  if (a && o !== null) {
14865
14899
  const l = [];
14866
14900
  r.forEach((y, b) => {
14867
- $.createListKey(
14901
+ C.createListKey(
14868
14902
  y,
14869
14903
  String(a),
14870
14904
  b
14871
14905
  ) === o && l.push(b);
14872
14906
  });
14873
- const u = s.slice(0, n).filter((y) => y.getListKey() === o).length, d = l[u] ?? -1;
14874
- return d === -1 ? (m.warn(
14907
+ const u = s.slice(0, n).filter((y) => y.getListKey() === o).length, h = l[u] ?? -1;
14908
+ return h === -1 ? (m.warn(
14875
14909
  "Haori",
14876
14910
  `No array element corresponds to the target row (key "${o}"); the write was skipped (${i}).`
14877
- ), null) : d;
14911
+ ), null) : h;
14878
14912
  }
14879
14913
  return n >= r.length ? (m.warn(
14880
14914
  "Haori",
@@ -14967,9 +15001,9 @@ ${W}
14967
15001
  ) : b, u = o >= 0 ? l(o) : i.mapped ? i.array.length - 1 : o;
14968
15002
  if (u === null)
14969
15003
  return Promise.resolve();
14970
- const d = i.array.slice();
15004
+ const h = i.array.slice();
14971
15005
  if (!t(
14972
- d,
15006
+ h,
14973
15007
  u,
14974
15008
  () => l(o - 1),
14975
15009
  () => l(o + 1)
@@ -14979,20 +15013,20 @@ ${W}
14979
15013
  return a.forEach((b) => {
14980
15014
  const E = b.getListKey();
14981
15015
  E !== null && !y.has(String(E)) && y.set(String(E), b);
14982
- }), d.forEach((b, E) => {
15016
+ }), h.forEach((b, E) => {
14983
15017
  if (f.isSameRowItem(i.array[E], b))
14984
15018
  return;
14985
15019
  const A = y.get(
14986
- $.createListKey(
15020
+ C.createListKey(
14987
15021
  b,
14988
15022
  null,
14989
15023
  E
14990
15024
  )
14991
15025
  );
14992
- A && $.clearUserEditMarks(A);
14993
- }), $.setBindingData(
15026
+ A && C.clearUserEditMarks(A);
15027
+ }), C.setBindingData(
14994
15028
  i.owner.getTarget(),
14995
- f.withPathValue(i.ownerData, i.path, d),
15029
+ f.withPathValue(i.ownerData, i.path, h),
14996
15030
  {
14997
15031
  // 対象は配列の 1 要素だけなので、所有者の部分木を丸ごと供給の宛先にはしない
14998
15032
  // (行の書き戻し `applyRowWrites()` と同じ扱い)。
@@ -15035,7 +15069,7 @@ ${W}
15035
15069
  ...a.getRawBindingData() ?? {},
15036
15070
  _fetch: n
15037
15071
  };
15038
- return $.setBindingData(o, l, {
15072
+ return C.setBindingData(o, l, {
15039
15073
  reflectToAttribute: !1,
15040
15074
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
15041
15075
  // 解除しない)。
@@ -15088,7 +15122,7 @@ class Lr {
15088
15122
  }
15089
15123
  }
15090
15124
  }
15091
- const h = class h {
15125
+ const d = class d {
15092
15126
  /**
15093
15127
  * 遅延属性かどうか(完全名で判定)を判定します。
15094
15128
  *
@@ -15096,7 +15130,7 @@ const h = class h {
15096
15130
  * @returns 遅延属性かどうか
15097
15131
  */
15098
15132
  static isDeferredAttributeName(e) {
15099
- return h.DEFERRED_ATTRIBUTE_SUFFIXES.some(
15133
+ return d.DEFERRED_ATTRIBUTE_SUFFIXES.some(
15100
15134
  (t) => e === `${c.prefix}${t}`
15101
15135
  );
15102
15136
  }
@@ -15107,7 +15141,7 @@ const h = class h {
15107
15141
  * @returns 除外対象かどうか
15108
15142
  */
15109
15143
  static isEvaluateAllExcludedAttributeName(e) {
15110
- return h.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES.some(
15144
+ return d.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES.some(
15111
15145
  (t) => e === `${c.prefix}${t}`
15112
15146
  );
15113
15147
  }
@@ -15119,7 +15153,7 @@ const h = class h {
15119
15153
  * @returns 再評価する場合は true
15120
15154
  */
15121
15155
  static shouldReevaluateAttribute(e, t) {
15122
- return t !== null && !h.isEvaluateAllExcludedAttributeName(e) && h.ATTRIBUTE_PLACEHOLDER_REGEX.test(t);
15156
+ return t !== null && !d.isEvaluateAllExcludedAttributeName(e) && d.ATTRIBUTE_PLACEHOLDER_REGEX.test(t);
15123
15157
  }
15124
15158
  /**
15125
15159
  * data-attr-* 形式の属性名から実際に更新する属性名を取得します。
@@ -15128,7 +15162,7 @@ const h = class h {
15128
15162
  * @returns 実際の属性名。data-attr-* でない場合は null
15129
15163
  */
15130
15164
  static getAliasedAttributeName(e) {
15131
- const t = `${c.prefix}${h.ATTRIBUTE_ALIAS_SUFFIX}`;
15165
+ const t = `${c.prefix}${d.ATTRIBUTE_ALIAS_SUFFIX}`;
15132
15166
  return !e.startsWith(t) || e.length <= t.length ? null : e.slice(t.length);
15133
15167
  }
15134
15168
  /**
@@ -15141,7 +15175,7 @@ const h = class h {
15141
15175
  static isAliasedAttributeReflection(e, t) {
15142
15176
  const r = N.get(e);
15143
15177
  return r instanceof R ? r.hasAttribute(
15144
- `${c.prefix}${h.ATTRIBUTE_ALIAS_SUFFIX}${t}`
15178
+ `${c.prefix}${d.ATTRIBUTE_ALIAS_SUFFIX}${t}`
15145
15179
  ) : !1;
15146
15180
  }
15147
15181
  /**
@@ -15155,8 +15189,8 @@ const h = class h {
15155
15189
  let t = Promise.resolve();
15156
15190
  for (const r of e.getAttributeNames()) {
15157
15191
  const i = e.getRawAttribute(r);
15158
- h.shouldReevaluateAttribute(r, i) && (t = t.then(
15159
- () => h.setAttribute(e.getTarget(), r, i)
15192
+ d.shouldReevaluateAttribute(r, i) && (t = t.then(
15193
+ () => d.setAttribute(e.getTarget(), r, i)
15160
15194
  ));
15161
15195
  }
15162
15196
  return t.then(() => {
@@ -15171,7 +15205,7 @@ const h = class h {
15171
15205
  static reevaluateChildren(e) {
15172
15206
  const t = [];
15173
15207
  return e.getChildren().forEach((r) => {
15174
- r instanceof R ? t.push(h.evaluateAll(r)) : r instanceof de && t.push(h.evaluateText(r));
15208
+ r instanceof R ? t.push(d.evaluateAll(r)) : r instanceof de && t.push(d.evaluateText(r));
15175
15209
  }), Promise.all(t).then(() => {
15176
15210
  });
15177
15211
  }
@@ -15194,7 +15228,7 @@ const h = class h {
15194
15228
  */
15195
15229
  static clearUserEditMarks(e, t = R.currentSequence()) {
15196
15230
  e.clearUserEditMark(t), e.getChildren().forEach((r) => {
15197
- r instanceof R && h.clearUserEditMarks(r, t);
15231
+ r instanceof R && d.clearUserEditMarks(r, t);
15198
15232
  });
15199
15233
  }
15200
15234
  /**
@@ -15213,7 +15247,7 @@ const h = class h {
15213
15247
  * @return 戻り値はありません。
15214
15248
  */
15215
15249
  static clearUserEditMarksSuppliedBy(e, t, r) {
15216
- h.clearUserEditMarksReferencing(e, new Set(t), r);
15250
+ d.clearUserEditMarksReferencing(e, new Set(t), r);
15217
15251
  }
15218
15252
  /**
15219
15253
  * 指定した名前を参照する宣言バインドを持つ入力欄から、ユーザー編集の印を解除
@@ -15231,18 +15265,18 @@ const h = class h {
15231
15265
  */
15232
15266
  static clearUserEditMarksReferencing(e, t, r) {
15233
15267
  const i = e.getTarget(), s = i instanceof HTMLOptionElement;
15234
- if (h.declaresReferencing(
15268
+ if (d.declaresReferencing(
15235
15269
  e,
15236
- s ? h.OPTION_BINDING_ATTRIBUTES : h.VALUE_BINDING_ATTRIBUTES,
15270
+ s ? d.OPTION_BINDING_ATTRIBUTES : d.VALUE_BINDING_ATTRIBUTES,
15237
15271
  t
15238
15272
  )) {
15239
15273
  const n = s ? N.get(i.closest("select")) : e;
15240
15274
  n instanceof R && n.clearUserEditMark(r);
15241
15275
  }
15242
15276
  e.getChildren().forEach((n) => {
15243
- n instanceof R && h.clearUserEditMarksReferencing(
15277
+ n instanceof R && d.clearUserEditMarksReferencing(
15244
15278
  n,
15245
- h.resolveNamesInChild(e, n, t),
15279
+ d.resolveNamesInChild(e, n, t),
15246
15280
  r
15247
15281
  );
15248
15282
  });
@@ -15261,7 +15295,7 @@ const h = class h {
15261
15295
  * @returns 子から見て応答の値に解決される名前
15262
15296
  */
15263
15297
  static resolveNamesInChild(e, t, r) {
15264
- const i = Object.keys(t.getRawBindingData() ?? {}), s = e.getRawAttribute(`${c.prefix}each`), n = t.getListKey() !== null && typeof s == "string" && h.referencesAny([s], r), a = new Set(r);
15298
+ const i = Object.keys(t.getRawBindingData() ?? {}), s = e.getRawAttribute(`${c.prefix}each`), n = t.getListKey() !== null && typeof s == "string" && d.referencesAny([s], r), a = new Set(r);
15265
15299
  return i.forEach((o) => {
15266
15300
  n ? a.add(o) : a.delete(o);
15267
15301
  }), a;
@@ -15279,7 +15313,7 @@ const h = class h {
15279
15313
  return t.some(
15280
15314
  (i) => [i, `${c.prefix}attr-${i}`].some((s) => {
15281
15315
  const n = e.getRawAttribute(s);
15282
- return typeof n == "string" && h.referencesAny(h.extractInterpolations(n), r);
15316
+ return typeof n == "string" && d.referencesAny(d.extractInterpolations(n), r);
15283
15317
  })
15284
15318
  );
15285
15319
  }
@@ -15307,15 +15341,17 @@ const h = class h {
15307
15341
  * @returns 再評価状態
15308
15342
  */
15309
15343
  static getReactiveFetchState(e) {
15310
- const t = h.REACTIVE_FETCH_STATES.get(e);
15344
+ const t = d.REACTIVE_FETCH_STATES.get(e);
15311
15345
  if (t)
15312
15346
  return t;
15313
15347
  const r = {
15314
15348
  lastSignature: null,
15315
15349
  running: !1,
15316
- rerunRequested: !1
15350
+ rerunRequested: !1,
15351
+ startedSequence: 0,
15352
+ settled: null
15317
15353
  };
15318
- return h.REACTIVE_FETCH_STATES.set(e, r), r;
15354
+ return d.REACTIVE_FETCH_STATES.set(e, r), r;
15319
15355
  }
15320
15356
  /**
15321
15357
  * data-import の再評価状態を取得します。
@@ -15324,7 +15360,7 @@ const h = class h {
15324
15360
  * @returns 再評価状態
15325
15361
  */
15326
15362
  static getReactiveImportState(e) {
15327
- const t = h.REACTIVE_IMPORT_STATES.get(e);
15363
+ const t = d.REACTIVE_IMPORT_STATES.get(e);
15328
15364
  if (t)
15329
15365
  return t;
15330
15366
  const r = {
@@ -15332,7 +15368,7 @@ const h = class h {
15332
15368
  running: !1,
15333
15369
  rerunRequested: !1
15334
15370
  };
15335
- return h.REACTIVE_IMPORT_STATES.set(e, r), r;
15371
+ return d.REACTIVE_IMPORT_STATES.set(e, r), r;
15336
15372
  }
15337
15373
  /**
15338
15374
  * bind 更新時に data-fetch / data-import を専用ルートで再評価します。
@@ -15345,9 +15381,9 @@ const h = class h {
15345
15381
  if (t.has(e) || !e.isInitialized())
15346
15382
  return Promise.resolve();
15347
15383
  const r = [];
15348
- return e.hasAttribute(`${c.prefix}validity`) && D.applyCustomValidity(e), e.hasAttribute(`${c.prefix}fetch`) && r.push(h.executeManagedFetch(e)), e.hasAttribute(`${c.prefix}import`) && r.push(h.executeManagedImport(e)), e.isVisible() ? (e.getChildren().forEach((i) => {
15384
+ return e.hasAttribute(`${c.prefix}validity`) && D.applyCustomValidity(e), e.hasAttribute(`${c.prefix}fetch`) && r.push(d.executeManagedFetch(e)), e.hasAttribute(`${c.prefix}import`) && r.push(d.executeManagedImport(e)), e.isVisible() ? (e.getChildren().forEach((i) => {
15349
15385
  i instanceof R && r.push(
15350
- h.reevaluateReactiveSpecialAttributes(i, t)
15386
+ d.reevaluateReactiveSpecialAttributes(i, t)
15351
15387
  );
15352
15388
  }), Promise.all(r).then(() => {
15353
15389
  })) : Promise.all(r).then(() => {
@@ -15361,25 +15397,70 @@ const h = class h {
15361
15397
  */
15362
15398
  static executeManagedFetch(e, t = !1) {
15363
15399
  const r = e.getTarget();
15364
- if (!t && h.initialValueRestores.size > 0 && e.hasAttribute(`${c.prefix}fetch-form`))
15365
- return Promise.all(h.initialValueRestores).then(() => h.executeManagedFetch(e, !0)).catch((a) => {
15366
- m.error("Haori", `初期表示の取得に失敗しました: ${a}`);
15400
+ if (!t && d.initialValueRestores.size > 0 && e.hasAttribute(`${c.prefix}fetch-form`))
15401
+ return Promise.all(d.initialValueRestores).then(() => d.executeManagedFetch(e, !0)).catch((o) => {
15402
+ m.error("Haori", `初期表示の取得に失敗しました: ${o}`);
15367
15403
  }), Promise.resolve();
15368
- const i = h.getReactiveFetchState(r), s = he.resolveAutoFetchSignature(e);
15404
+ const i = d.getReactiveFetchState(r), s = he.resolveAutoFetchSignature(e);
15369
15405
  if (i.running)
15370
15406
  return (s.hasUnresolvedReference || s.signature !== i.lastSignature) && (i.rerunRequested = !0), Promise.resolve();
15371
15407
  if (s.hasUnresolvedReference || s.signature === null)
15372
15408
  return i.lastSignature = null, Promise.resolve();
15373
15409
  if (i.lastSignature === s.signature)
15374
15410
  return Promise.resolve();
15375
- i.lastSignature = s.signature, i.running = !0;
15411
+ i.lastSignature = s.signature, i.running = !0, d.managedFetchSequence += 1, i.startedSequence = d.managedFetchSequence;
15376
15412
  const n = new he(e, null);
15377
- return n.markReentrantBind(), n.runWithResult().then(() => {
15413
+ n.markReentrantBind();
15414
+ const a = n.runWithResult().then(() => {
15378
15415
  }).catch(() => {
15379
15416
  }).finally(() => {
15380
15417
  if (i.running = !1, i.rerunRequested)
15381
- return i.rerunRequested = !1, h.executeManagedFetch(e);
15418
+ return i.rerunRequested = !1, d.executeManagedFetch(e);
15382
15419
  });
15420
+ return i.settled = a, a;
15421
+ }
15422
+ /**
15423
+ * `data-{event}-refetch` で取り直す実行シグネチャを、自動の取得の比較用に記録します。
15424
+ *
15425
+ * 仕様「`data-{event}-refetch`」の「取り直した実行シグネチャは、自動の取得の比較にも
15426
+ * 使います」。記録しないと、取り直しの結果をバインドした後の再評価で、同じ条件の
15427
+ * 取得をもう 1 回行います(前回の自動の取得の条件と比べるため)。
15428
+ *
15429
+ * @param fragment 取り直す対象の要素
15430
+ * @returns 戻り値はありません。
15431
+ */
15432
+ static recordRefetchSignature(e) {
15433
+ d.getReactiveFetchState(e.getTarget()).lastSignature = he.resolveAutoFetchSignature(e).signature;
15434
+ }
15435
+ /**
15436
+ * 自動の取得を始めた回数を返します。
15437
+ *
15438
+ * 手続きはバインドの直前にこの値を控え、`data-{event}-refetch` の判定
15439
+ * (`coveredByManagedFetch()`)へ渡します。
15440
+ *
15441
+ * @returns これまでに始めた自動の取得の数
15442
+ */
15443
+ static getManagedFetchSequence() {
15444
+ return d.managedFetchSequence;
15445
+ }
15446
+ /**
15447
+ * 指定の番号より後に、対象の要素で今の実行シグネチャの自動の取得が始まったかを
15448
+ * 返します。
15449
+ *
15450
+ * 仕様「`data-{event}-refetch`」の「手続きがバインド(処理順序の 9)へ進んだ後に、
15451
+ * 対象の要素で、今の実行シグネチャの自動の取得が始まった場合は、取り直しません。
15452
+ * 自動の取得が実行中なら、その完了を待ってから判断します」。
15453
+ *
15454
+ * @param fragment 取り直す対象の要素
15455
+ * @param since 手続きがバインドの直前に控えた番号(`getManagedFetchSequence()`)
15456
+ * @returns 取り直しを省けるなら true。実行中の取得を待つ場合は、その完了後に
15457
+ * 判断した結果の Promise
15458
+ */
15459
+ static coveredByManagedFetch(e, t) {
15460
+ const r = d.REACTIVE_FETCH_STATES.get(e.getTarget());
15461
+ return r?.running && r.settled ? r.settled.then(
15462
+ () => d.coveredByManagedFetch(e, t)
15463
+ ) : !r || r.startedSequence <= t ? !1 : he.resolveAutoFetchSignature(e).signature === r.lastSignature;
15383
15464
  }
15384
15465
  /**
15385
15466
  * data-import を URL 比較付きで実行します。
@@ -15388,7 +15469,7 @@ const h = class h {
15388
15469
  * @returns 実行完了の Promise
15389
15470
  */
15390
15471
  static executeManagedImport(e) {
15391
- const t = e.getTarget(), r = h.getReactiveImportState(t), i = e.getAttributeEvaluation(
15472
+ const t = e.getTarget(), r = d.getReactiveImportState(t), i = e.getAttributeEvaluation(
15392
15473
  `${c.prefix}import`
15393
15474
  ), s = i && !i.hasUnresolvedReference && typeof i.value == "string" && i.value !== "" ? i.value : null;
15394
15475
  if (r.running)
@@ -15407,10 +15488,10 @@ const h = class h {
15407
15488
  return J.enqueue(() => {
15408
15489
  t.innerHTML = a;
15409
15490
  }).then(() => {
15410
- t.removeAttribute(`${c.prefix}importing`), O.importEnd(t, s, o, n), h.adoptImportedChildren(e);
15491
+ t.removeAttribute(`${c.prefix}importing`), O.importEnd(t, s, o, n), d.adoptImportedChildren(e);
15411
15492
  const l = [];
15412
15493
  return e.getChildren().forEach((u) => {
15413
- u instanceof R ? l.push(h.scan(u.getTarget())) : u instanceof de && l.push(h.evaluateText(u));
15494
+ u instanceof R ? l.push(d.scan(u.getTarget())) : u instanceof de && l.push(d.evaluateText(u));
15414
15495
  }), Promise.all(l).then(() => {
15415
15496
  });
15416
15497
  });
@@ -15418,7 +15499,7 @@ const h = class h {
15418
15499
  t.removeAttribute(`${c.prefix}importing`), O.importError(t, s, a), m.error("[Haori]", "Failed to import HTML:", s, a);
15419
15500
  }).finally(() => {
15420
15501
  if (r.running = !1, r.rerunRequested)
15421
- return r.rerunRequested = !1, h.executeManagedImport(e);
15502
+ return r.rerunRequested = !1, d.executeManagedImport(e);
15422
15503
  });
15423
15504
  }
15424
15505
  /**
@@ -15449,7 +15530,7 @@ const h = class h {
15449
15530
  * @returns Promise (スキャンが完了したときに解決される)
15450
15531
  */
15451
15532
  static scan(e) {
15452
- return h.scanElement(e, !0);
15533
+ return d.scanElement(e, !0);
15453
15534
  }
15454
15535
  /**
15455
15536
  * 指定された要素と、その子要素をスキャンします。
@@ -15466,11 +15547,11 @@ const h = class h {
15466
15547
  const r = N.get(e);
15467
15548
  if (!r)
15468
15549
  return Promise.resolve();
15469
- const i = h.initializeElementFragment(r, !1).then(
15550
+ const i = d.initializeElementFragment(r, !1).then(
15470
15551
  () => D.restoreInitialValues(e)
15471
15552
  );
15472
- return h.initialValueRestores.add(i), i.then(() => {
15473
- h.initialValueRestores.delete(i), t && le.applySubtree(e);
15553
+ return d.initialValueRestores.add(i), i.then(() => {
15554
+ d.initialValueRestores.delete(i), t && le.applySubtree(e);
15474
15555
  });
15475
15556
  }
15476
15557
  /**
@@ -15503,8 +15584,8 @@ const h = class h {
15503
15584
  * @returns 初期化完了の Promise
15504
15585
  */
15505
15586
  static initializeFreshEachRow(e) {
15506
- return h.initializeElementFragment(e, !0).then(() => {
15507
- h.needsScheduledEvaluateAll(e) && h.scheduleEvaluateAll(e), le.applySubtree(e.getTarget());
15587
+ return d.initializeElementFragment(e, !0).then(() => {
15588
+ d.needsScheduledEvaluateAll(e) && d.scheduleEvaluateAll(e), le.applySubtree(e.getTarget());
15508
15589
  });
15509
15590
  }
15510
15591
  /**
@@ -15516,18 +15597,18 @@ const h = class h {
15516
15597
  * @returns 初期化完了の Promise
15517
15598
  */
15518
15599
  static initializeElementFragment(e, t) {
15519
- return h.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : h.initializeElementAttributes(e).then(() => {
15520
- if (h.shouldSkipChildInitialization(e)) {
15521
- h.refreshDerivedSubtreeSignature(e);
15600
+ return d.syncMountedState(e), t && e.isFreshInitializationSkippable() ? Promise.resolve() : d.initializeElementAttributes(e).then(() => {
15601
+ if (d.shouldSkipChildInitialization(e)) {
15602
+ d.refreshDerivedSubtreeSignature(e);
15522
15603
  return;
15523
15604
  }
15524
15605
  const r = t && e.hasAttribute(`${c.prefix}each`), i = [];
15525
15606
  return e.getChildren().forEach((s) => {
15526
- s instanceof R ? (!r || h.isEachFixedChild(s)) && i.push(
15527
- h.initializeElementFragment(s, t)
15528
- ) : s instanceof de && i.push(h.evaluateText(s));
15607
+ s instanceof R ? (!r || d.isEachFixedChild(s)) && i.push(
15608
+ d.initializeElementFragment(s, t)
15609
+ ) : s instanceof de && i.push(d.evaluateText(s));
15529
15610
  }), Promise.all(i).then(() => {
15530
- h.refreshDerivedSubtreeSignature(e);
15611
+ d.refreshDerivedSubtreeSignature(e);
15531
15612
  });
15532
15613
  });
15533
15614
  }
@@ -15557,10 +15638,10 @@ const h = class h {
15557
15638
  static initializeElementAttributes(e) {
15558
15639
  let t = Promise.resolve();
15559
15640
  const r = /* @__PURE__ */ new Set();
15560
- for (const i of h.PRIORITY_ATTRIBUTE_SUFFIXES) {
15641
+ for (const i of d.PRIORITY_ATTRIBUTE_SUFFIXES) {
15561
15642
  const s = c.prefix + i;
15562
15643
  e.hasAttribute(s) && (t = t.then(
15563
- () => h.setAttribute(
15644
+ () => d.setAttribute(
15564
15645
  e.getTarget(),
15565
15646
  s,
15566
15647
  e.getRawAttribute(s)
@@ -15568,14 +15649,14 @@ const h = class h {
15568
15649
  ), r.add(s));
15569
15650
  }
15570
15651
  for (const i of e.getAttributeNames()) {
15571
- if (r.has(i) || h.isDeferredAttributeName(i))
15652
+ if (r.has(i) || d.isDeferredAttributeName(i))
15572
15653
  continue;
15573
15654
  const s = e.getRawAttribute(i);
15574
- s !== null && (t = t.then(() => (e.markInitialized(), h.setAttribute(e.getTarget(), i, s))));
15655
+ s !== null && (t = t.then(() => (e.markInitialized(), d.setAttribute(e.getTarget(), i, s))));
15575
15656
  }
15576
- for (const i of h.DEFERRED_ATTRIBUTE_SUFFIXES) {
15657
+ for (const i of d.DEFERRED_ATTRIBUTE_SUFFIXES) {
15577
15658
  const s = c.prefix + i;
15578
- e.hasAttribute(s) && (t = t.then(() => (e.markInitialized(), h.setAttribute(
15659
+ e.hasAttribute(s) && (t = t.then(() => (e.markInitialized(), d.setAttribute(
15579
15660
  e.getTarget(),
15580
15661
  s,
15581
15662
  e.getRawAttribute(s)
@@ -15595,7 +15676,7 @@ const h = class h {
15595
15676
  */
15596
15677
  static shouldSkipChildInitialization(e) {
15597
15678
  const t = e.getAttribute(`${c.prefix}if`);
15598
- return e.hasAttribute(`${c.prefix}if`) && h.isHiddenIfCondition(t);
15679
+ return e.hasAttribute(`${c.prefix}if`) && d.isHiddenIfCondition(t);
15599
15680
  }
15600
15681
  /**
15601
15682
  * エレメントに属性を設定します。
@@ -15611,7 +15692,7 @@ const h = class h {
15611
15692
  * @returns Promise (DOM操作が完了したときに解決される)
15612
15693
  */
15613
15694
  static setAttribute(e, t, r, i = !1, s) {
15614
- const n = N.get(e), a = h.getAliasedAttributeName(t);
15695
+ const n = N.get(e), a = d.getAliasedAttributeName(t);
15615
15696
  if (a !== null)
15616
15697
  return r === null ? n.removeAliasedAttribute(t, a) : n.setAliasedAttribute(
15617
15698
  t,
@@ -15620,21 +15701,21 @@ const h = class h {
15620
15701
  i
15621
15702
  );
15622
15703
  const o = [];
15623
- let l = null, u = null, d = null;
15704
+ let l = null, u = null, h = null;
15624
15705
  switch (t) {
15625
15706
  case `${c.prefix}bind`: {
15626
15707
  if (r !== null && i && n instanceof R && n.consumeSelfWrittenBind(r))
15627
15708
  break;
15628
- const y = r === null ? {} : h.parseDataBind(r);
15709
+ const y = r === null ? {} : d.parseDataBind(r);
15629
15710
  if (i) {
15630
15711
  const b = s ?? R.nextSequence();
15631
15712
  return r === null ? (o.push(
15632
- h.setBindingData(e, y, {
15713
+ d.setBindingData(e, y, {
15633
15714
  reflectToAttribute: !1,
15634
15715
  sequence: b
15635
15716
  })
15636
15717
  ), o.push(n.removeAttribute(t))) : o.push(
15637
- h.setBindingData(e, y, {
15718
+ d.setBindingData(e, y, {
15638
15719
  sequence: b
15639
15720
  })
15640
15721
  ), Promise.all(o).then(() => {
@@ -15644,11 +15725,11 @@ const h = class h {
15644
15725
  break;
15645
15726
  }
15646
15727
  case `${c.prefix}derive`:
15647
- u = h.createDeriveInputSignature(
15728
+ u = d.createDeriveInputSignature(
15648
15729
  n,
15649
15730
  r,
15650
15731
  n.getRawAttribute(`${c.prefix}derive-name`)
15651
- ), l = h.evaluateDerive(
15732
+ ), l = d.evaluateDerive(
15652
15733
  n,
15653
15734
  r,
15654
15735
  n.getRawAttribute(`${c.prefix}derive-name`)
@@ -15656,11 +15737,11 @@ const h = class h {
15656
15737
  }));
15657
15738
  break;
15658
15739
  case `${c.prefix}derive-name`:
15659
- u = h.createDeriveInputSignature(
15740
+ u = d.createDeriveInputSignature(
15660
15741
  n,
15661
15742
  n.getRawAttribute(`${c.prefix}derive`),
15662
15743
  r
15663
- ), l = h.evaluateDerive(
15744
+ ), l = d.evaluateDerive(
15664
15745
  n,
15665
15746
  n.getRawAttribute(`${c.prefix}derive`),
15666
15747
  r
@@ -15668,16 +15749,16 @@ const h = class h {
15668
15749
  }));
15669
15750
  break;
15670
15751
  case `${c.prefix}if`:
15671
- d = () => h.evaluateIfOnAttributeWrite(n);
15752
+ h = () => d.evaluateIfOnAttributeWrite(n);
15672
15753
  break;
15673
15754
  case `${c.prefix}each`:
15674
- d = () => h.evaluateEach(n);
15755
+ h = () => d.evaluateEach(n);
15675
15756
  break;
15676
15757
  case `${c.prefix}fetch`:
15677
- d = () => h.executeManagedFetch(n);
15758
+ h = () => d.executeManagedFetch(n);
15678
15759
  break;
15679
15760
  case `${c.prefix}import`:
15680
- typeof r == "string" && (d = () => h.executeManagedImport(n));
15761
+ typeof r == "string" && (h = () => d.executeManagedImport(n));
15681
15762
  break;
15682
15763
  case `${c.prefix}store`:
15683
15764
  r !== null && o.push(Be.restore(n));
@@ -15698,21 +15779,21 @@ const h = class h {
15698
15779
  sequence: R.nextSequence()
15699
15780
  };
15700
15781
  if (y === null)
15701
- o.push(h.setBindingData(e, b, E));
15782
+ o.push(d.setBindingData(e, b, E));
15702
15783
  else {
15703
15784
  const A = n.getRawBindingData() || {};
15704
- A[String(y)] = b, o.push(h.setBindingData(e, A, E));
15785
+ A[String(y)] = b, o.push(d.setBindingData(e, A, E));
15705
15786
  }
15706
15787
  break;
15707
15788
  }
15708
15789
  }
15709
15790
  return r === null ? o.push(n.removeAttribute(t)) : o.push(n.setAttribute(t, r, i)), Promise.all(o).then(
15710
- () => d === null ? void 0 : d()
15791
+ () => h === null ? void 0 : h()
15711
15792
  ).then(() => {
15712
15793
  if (l !== null)
15713
15794
  return n.setDeriveInputSignature(u), l.then((y) => {
15714
15795
  if (y)
15715
- return h.reevaluateChildren(n);
15796
+ return d.reevaluateChildren(n);
15716
15797
  });
15717
15798
  }).then(() => {
15718
15799
  });
@@ -15748,39 +15829,39 @@ const h = class h {
15748
15829
  sequence: l,
15749
15830
  kind: o,
15750
15831
  ...r.editedPaths === void 0 ? {} : { editedPaths: r.editedPaths }
15751
- }, d = o === "supply";
15752
- d && i.markSupplyApplied(l);
15832
+ }, h = o === "supply";
15833
+ h && i.markSupplyApplied(l);
15753
15834
  const y = R.currentSequence(), b = i.getRawBindingData();
15754
- d && (r.clearUserEdits ?? !0) && h.clearUserEditMarks(i, l);
15755
- const E = a ? h.resolveByPathAuthority(i, b, t, u) : t;
15835
+ h && (r.clearUserEdits ?? !0) && d.clearUserEditMarks(i, l);
15836
+ const E = a ? d.resolveByPathAuthority(i, b, t, u) : t;
15756
15837
  i.setBindingData(E), a && (O.bindChange(e, b, E, "manual"), Be.mirror(i));
15757
15838
  const A = () => {
15758
15839
  i.markBindingWorkStart();
15759
15840
  const w = i.getRawBindingData() ?? E;
15760
- let M = a ? i.setAttribute(
15841
+ let $ = a ? i.setAttribute(
15761
15842
  `${c.prefix}bind`,
15762
- JSON.stringify(h.withoutReservedBindingKeys(w))
15843
+ JSON.stringify(d.withoutReservedBindingKeys(w))
15763
15844
  ) : Promise.resolve();
15764
- return e.tagName === "FORM" && (M = M.then(() => {
15845
+ return e.tagName === "FORM" && ($ = $.then(() => {
15765
15846
  if (i.wasResetAfter(y))
15766
15847
  return;
15767
- const F = i.getRawBindingData() ?? E;
15848
+ const M = i.getRawBindingData() ?? E;
15768
15849
  return D.syncValues(
15769
15850
  i,
15770
- D.resolveSyncValues(i, F),
15851
+ D.resolveSyncValues(i, M),
15771
15852
  !1,
15772
15853
  u
15773
15854
  );
15774
- })), M = M.then(
15855
+ })), $ = $.then(
15775
15856
  () => D.syncAncestorArgForms(i, y, u, b)
15776
- ), M = M.then(() => h.evaluateAll(i, s)), M = M.then(
15857
+ ), $ = $.then(() => d.evaluateAll(i, s)), $ = $.then(
15777
15858
  () => R.retryUnappliedValueWrites(e, y)
15778
- ), M = M.then(
15779
- () => h.reevaluateReactiveSpecialAttributes(i, s)
15780
- ), M.then(
15859
+ ), $ = $.then(
15860
+ () => d.reevaluateReactiveSpecialAttributes(i, s)
15861
+ ), $.then(
15781
15862
  () => i.markBindingWorkEnd(),
15782
- (F) => {
15783
- throw i.markBindingWorkEnd(), F;
15863
+ (M) => {
15864
+ throw i.markBindingWorkEnd(), M;
15784
15865
  }
15785
15866
  );
15786
15867
  };
@@ -15820,7 +15901,7 @@ const h = class h {
15820
15901
  * @returns 適用を許した経路だけが `next` の値になったバインドデータ
15821
15902
  */
15822
15903
  static resolveByPathAuthority(e, t, r, i) {
15823
- const s = h.mergePathAuthority(
15904
+ const s = d.mergePathAuthority(
15824
15905
  e,
15825
15906
  t ?? {},
15826
15907
  r,
@@ -15828,7 +15909,7 @@ const h = class h {
15828
15909
  "",
15829
15910
  /* @__PURE__ */ new Map()
15830
15911
  );
15831
- return s === h.ABSENT_PATH ? r : s;
15912
+ return s === d.ABSENT_PATH ? r : s;
15832
15913
  }
15833
15914
  /**
15834
15915
  * 経路をたどりながら、変化した葉ごとに適用可否を判定します。
@@ -15843,29 +15924,29 @@ const h = class h {
15843
15924
  * @returns 採用した値。その経路を持たせない場合は `ABSENT_PATH`
15844
15925
  */
15845
15926
  static mergePathAuthority(e, t, r, i, s, n) {
15846
- if (h.isPlainRecord(t) && h.isPlainRecord(r)) {
15847
- const d = t, y = r, b = {};
15848
- let E = Object.keys(d).some(
15927
+ if (d.isPlainRecord(t) && d.isPlainRecord(r)) {
15928
+ const h = t, y = r, b = {};
15929
+ let E = Object.keys(h).some(
15849
15930
  (w) => !Object.prototype.hasOwnProperty.call(y, w)
15850
15931
  );
15851
15932
  const A = /* @__PURE__ */ new Set([
15852
- ...Object.keys(d),
15933
+ ...Object.keys(h),
15853
15934
  ...Object.keys(y)
15854
15935
  ]);
15855
15936
  for (const w of A) {
15856
- const M = s === "" ? w : `${s}.${w}`, F = h.mergePathAuthority(
15937
+ const $ = s === "" ? w : `${s}.${w}`, M = d.mergePathAuthority(
15857
15938
  e,
15858
- Object.prototype.hasOwnProperty.call(d, w) ? d[w] : h.ABSENT_PATH,
15859
- Object.prototype.hasOwnProperty.call(y, w) ? y[w] : h.ABSENT_PATH,
15939
+ Object.prototype.hasOwnProperty.call(h, w) ? h[w] : d.ABSENT_PATH,
15940
+ Object.prototype.hasOwnProperty.call(y, w) ? y[w] : d.ABSENT_PATH,
15860
15941
  i,
15861
- M,
15942
+ $,
15862
15943
  n
15863
15944
  );
15864
- F !== h.ABSENT_PATH && (b[w] = F), F !== (Object.prototype.hasOwnProperty.call(y, w) ? y[w] : h.ABSENT_PATH) && (E = !0);
15945
+ M !== d.ABSENT_PATH && (b[w] = M), M !== (Object.prototype.hasOwnProperty.call(y, w) ? y[w] : d.ABSENT_PATH) && (E = !0);
15865
15946
  }
15866
15947
  return E ? b : y;
15867
15948
  }
15868
- const a = h.resolveArrayPairing(
15949
+ const a = d.resolveArrayPairing(
15869
15950
  e,
15870
15951
  t,
15871
15952
  r,
@@ -15873,10 +15954,10 @@ const h = class h {
15873
15954
  n
15874
15955
  );
15875
15956
  if (a !== null) {
15876
- const d = t, y = r, b = y.map(
15877
- (E, A) => h.mergePathAuthority(
15957
+ const h = t, y = r, b = y.map(
15958
+ (E, A) => d.mergePathAuthority(
15878
15959
  e,
15879
- d[A],
15960
+ h[A],
15880
15961
  E,
15881
15962
  i,
15882
15963
  `${s}[${a[A]}]`,
@@ -15885,7 +15966,7 @@ const h = class h {
15885
15966
  );
15886
15967
  return b.some((E, A) => E !== y[A]) ? b : y;
15887
15968
  }
15888
- if (h.isSameBindingValue(t, r))
15969
+ if (d.isSameBindingValue(t, r))
15889
15970
  return r;
15890
15971
  const o = i.editedPaths?.get(s), l = o === void 0 ? i.kind : "edit", u = {
15891
15972
  sequence: o ?? i.sequence,
@@ -15912,14 +15993,14 @@ const h = class h {
15912
15993
  static resolveArrayPairing(e, t, r, i, s) {
15913
15994
  if (!Array.isArray(t) || !Array.isArray(r) || t.length !== r.length || r.length === 0)
15914
15995
  return null;
15915
- const n = r.some((l) => h.isPlainRecord(l)) ? h.resolveEachKeyArg(e, i, s) : null, a = t.map(
15916
- (l, u) => h.createListKey(
15996
+ const n = r.some((l) => d.isPlainRecord(l)) ? d.resolveEachKeyArg(e, i, s) : null, a = t.map(
15997
+ (l, u) => d.createListKey(
15917
15998
  l,
15918
15999
  n,
15919
16000
  u
15920
16001
  )
15921
16002
  ), o = r.map(
15922
- (l, u) => h.createListKey(
16003
+ (l, u) => d.createListKey(
15923
16004
  l,
15924
16005
  n,
15925
16006
  u
@@ -15951,7 +16032,7 @@ const h = class h {
15951
16032
  const i = t.replace(/\[[^\]]*\]/g, ""), s = r.get(i);
15952
16033
  if (s !== void 0)
15953
16034
  return s;
15954
- const n = h.findEachKeyArg(e.getTarget(), i);
16035
+ const n = d.findEachKeyArg(e.getTarget(), i);
15955
16036
  return r.set(i, n), n;
15956
16037
  }
15957
16038
  /**
@@ -15964,7 +16045,7 @@ const h = class h {
15964
16045
  static findEachKeyArg(e, t) {
15965
16046
  const r = `${c.prefix}each`, i = e.querySelectorAll(`[${r}]`);
15966
16047
  for (const s of Array.from(i)) {
15967
- const n = h.resolveEachDeclarationPath(s, e);
16048
+ const n = d.resolveEachDeclarationPath(s, e);
15968
16049
  if (n === null || n !== t)
15969
16050
  continue;
15970
16051
  const a = s.getAttribute(`${r}-key`);
@@ -16033,7 +16114,7 @@ const h = class h {
16033
16114
  static isSameBindingValue(e, t) {
16034
16115
  if (e === t)
16035
16116
  return !0;
16036
- if (e === h.ABSENT_PATH || t === h.ABSENT_PATH)
16117
+ if (e === d.ABSENT_PATH || t === d.ABSENT_PATH)
16037
16118
  return !1;
16038
16119
  try {
16039
16120
  return JSON.stringify(e) === JSON.stringify(t);
@@ -16078,7 +16159,7 @@ const h = class h {
16078
16159
  * @return 解決済みスコープと各キーの由来情報
16079
16160
  */
16080
16161
  static dumpScope(e) {
16081
- const t = h.collectScope(e);
16162
+ const t = d.collectScope(e);
16082
16163
  return V.isEnabled() && m.info("[Haori]", "scope dump for", e, t), t;
16083
16164
  }
16084
16165
  /**
@@ -16096,15 +16177,15 @@ const h = class h {
16096
16177
  if (!t)
16097
16178
  return { resolved: {}, sources: {} };
16098
16179
  const r = t.getBindingData(), i = {}, s = (l) => {
16099
- const u = l.getTarget(), d = h.resolveElementId(u);
16100
- return d !== "" ? `#${d}` : u.tagName.toLowerCase();
16101
- }, n = (l, u, d, y) => {
16180
+ const u = l.getTarget(), h = d.resolveElementId(u);
16181
+ return h !== "" ? `#${h}` : u.tagName.toLowerCase();
16182
+ }, n = (l, u, h, y) => {
16102
16183
  if (l)
16103
16184
  for (const b of Object.keys(l))
16104
16185
  b in i || (i[b] = {
16105
16186
  value: l[b],
16106
16187
  source: s(u),
16107
- kind: d,
16188
+ kind: h,
16108
16189
  depth: y
16109
16190
  });
16110
16191
  };
@@ -16149,9 +16230,9 @@ const h = class h {
16149
16230
  if (s.getParent() === r)
16150
16231
  return Promise.resolve();
16151
16232
  if (r.attachObserved(s, i), s instanceof R)
16152
- return h.scan(s.getTarget());
16233
+ return d.scan(s.getTarget());
16153
16234
  if (s instanceof de)
16154
- return h.evaluateText(s);
16235
+ return d.evaluateText(s);
16155
16236
  }
16156
16237
  return Promise.resolve();
16157
16238
  }
@@ -16197,15 +16278,15 @@ const h = class h {
16197
16278
  return Promise.resolve();
16198
16279
  const i = [];
16199
16280
  i.push(r.setValue(t));
16200
- const s = h.getFormFragment(r);
16281
+ const s = d.getFormFragment(r);
16201
16282
  if (s) {
16202
16283
  const n = D.getValues(s), a = s.getAttribute(`${c.prefix}form-arg`), o = s.getRawBindingData();
16203
16284
  let l;
16204
16285
  if (a) {
16205
16286
  l = { ...o ?? {} };
16206
- const u = String(a), d = D.resolveAncestorArgOwner(s, u);
16287
+ const u = String(a), h = D.resolveAncestorArgOwner(s, u);
16207
16288
  l[u] = D.mergeCollectedValues(
16208
- (d ? d.value : l[u]) ?? null,
16289
+ (h ? h.value : l[u]) ?? null,
16209
16290
  n
16210
16291
  );
16211
16292
  } else
@@ -16217,7 +16298,7 @@ const h = class h {
16217
16298
  i.push(
16218
16299
  // 値の設定に伴うコミットなので、値の供給ではない更新として扱う(権威を
16219
16300
  // 持たず、ユーザー編集の印も解除しない)。
16220
- h.setBindingData(s.getTarget(), l, {
16301
+ d.setBindingData(s.getTarget(), l, {
16221
16302
  kind: "nonSupply",
16222
16303
  sequence: R.nextSequence()
16223
16304
  })
@@ -16236,7 +16317,7 @@ const h = class h {
16236
16317
  if (e.getTarget() instanceof HTMLFormElement)
16237
16318
  return e;
16238
16319
  const t = e.getParent();
16239
- return t ? h.getFormFragment(t) : null;
16320
+ return t ? d.getFormFragment(t) : null;
16240
16321
  }
16241
16322
  /**
16242
16323
  * フラグメントとその子要素を評価します。
@@ -16248,21 +16329,21 @@ const h = class h {
16248
16329
  static evaluateAll(e, t = /* @__PURE__ */ new Set()) {
16249
16330
  if (t.has(e))
16250
16331
  return Promise.resolve();
16251
- let r = h.reevaluateInterpolatedAttributes(e);
16332
+ let r = d.reevaluateInterpolatedAttributes(e);
16252
16333
  const i = e.hasAttribute(`${c.prefix}derive`), s = e.hasAttribute(`${c.prefix}if`), n = e.hasAttribute(`${c.prefix}each`), a = e.getRawAttribute(`${c.prefix}derive`), o = e.getRawAttribute(`${c.prefix}derive-name`);
16253
- let l = !1, u = !1, d = null;
16334
+ let l = !1, u = !1, h = null;
16254
16335
  if (!i && e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), !i && e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), i) {
16255
- const E = h.createDeriveInputSignature(
16336
+ const E = d.createDeriveInputSignature(
16256
16337
  e,
16257
16338
  a,
16258
16339
  o
16259
16340
  );
16260
16341
  E === null ? (e.getDeriveInputSignature() !== null && e.setDeriveInputSignature(null), r = r.then(
16261
- () => h.evaluateDerive(e, a, o).then(
16342
+ () => d.evaluateDerive(e, a, o).then(
16262
16343
  () => {
16263
16344
  }
16264
16345
  )
16265
- )) : e.getDeriveInputSignature() !== E && (r = r.then(() => h.evaluateDerive(
16346
+ )) : e.getDeriveInputSignature() !== E && (r = r.then(() => d.evaluateDerive(
16266
16347
  e,
16267
16348
  a,
16268
16349
  o
@@ -16273,22 +16354,22 @@ const h = class h {
16273
16354
  let y = !1, b = 0;
16274
16355
  return s && (r = r.then(() => {
16275
16356
  const E = e.isVisible();
16276
- return b = R.currentSequence(), h.evaluateIf(e, t).then(() => {
16357
+ return b = R.currentSequence(), d.evaluateIf(e, t).then(() => {
16277
16358
  y = !E && e.isVisible();
16278
16359
  });
16279
- })), n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => h.evaluateEachFixedChildren(e)).then(() => h.evaluateEach(e)).then(() => {
16360
+ })), n ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => d.evaluateEachFixedChildren(e)).then(() => d.evaluateEach(e)).then(() => {
16280
16361
  if (y)
16281
- return h.applyEnhancersOnShow(e, b);
16362
+ return d.applyEnhancersOnShow(e, b);
16282
16363
  })) : s ? (e.getDeriveSubtreeSignature() !== null && e.setDeriveSubtreeSignature(null), r.then(() => {
16283
16364
  })) : (i && (r = r.then(() => {
16284
- if (!h.canSkipStableDerivedSubtree(e)) {
16285
- e.setDeriveSubtreeSignature(null), h.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
16365
+ if (!d.canSkipStableDerivedSubtree(e)) {
16366
+ e.setDeriveSubtreeSignature(null), d.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
16286
16367
  return;
16287
16368
  }
16288
- d = h.createDescendantBindingSignature(
16369
+ h = d.createDescendantBindingSignature(
16289
16370
  e,
16290
16371
  "evaluateAll"
16291
- ), u = !0, l = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === d, h.logDerivedSubtreeProfileSnapshot(
16372
+ ), u = !0, l = e.getDeriveSubtreeSignature() !== null && e.getDeriveSubtreeSignature() === h, d.logDerivedSubtreeProfileSnapshot(
16292
16373
  e,
16293
16374
  l ? "skip-hit" : "skip-miss"
16294
16375
  );
@@ -16298,14 +16379,14 @@ const h = class h {
16298
16379
  const E = [];
16299
16380
  return e.getChildren().forEach((A) => {
16300
16381
  if (A instanceof R) {
16301
- if (h.canSkipUnchangedNestedEach(A))
16382
+ if (d.canSkipUnchangedNestedEach(A))
16302
16383
  return;
16303
- E.push(h.evaluateAll(A, t));
16304
- } else A instanceof de && !t.has(A) && E.push(h.evaluateText(A));
16384
+ E.push(d.evaluateAll(A, t));
16385
+ } else A instanceof de && !t.has(A) && E.push(d.evaluateText(A));
16305
16386
  }), Promise.all(E).then(() => {
16306
16387
  });
16307
16388
  }).then(() => {
16308
- u && d !== null && e.setDeriveSubtreeSignature(d);
16389
+ u && h !== null && e.setDeriveSubtreeSignature(h);
16309
16390
  }));
16310
16391
  }
16311
16392
  /**
@@ -16333,7 +16414,7 @@ const h = class h {
16333
16414
  const a = {
16334
16415
  [s]: n.value
16335
16416
  };
16336
- return h.createBindingSignature(i) === h.createBindingSignature(a) ? Promise.resolve(!1) : (e.setDerivedBindingData(a), Promise.resolve(!0));
16417
+ return d.createBindingSignature(i) === d.createBindingSignature(a) ? Promise.resolve(!1) : (e.setDerivedBindingData(a), Promise.resolve(!0));
16337
16418
  }
16338
16419
  /**
16339
16420
  * テキストフラグメントを評価します。
@@ -16379,7 +16460,7 @@ const h = class h {
16379
16460
  );
16380
16461
  return;
16381
16462
  }
16382
- const { sources: r } = h.collectScope(e.getTarget()), i = /* @__PURE__ */ new Set(), s = t.match(/[A-Za-z_$][\w$]*/g) ?? [];
16463
+ const { sources: r } = d.collectScope(e.getTarget()), i = /* @__PURE__ */ new Set(), s = t.match(/[A-Za-z_$][\w$]*/g) ?? [];
16383
16464
  let n = 0;
16384
16465
  s.forEach((o) => {
16385
16466
  const l = t.indexOf(o, n);
@@ -16425,7 +16506,7 @@ const h = class h {
16425
16506
  */
16426
16507
  static hasEachFixedChildren(e) {
16427
16508
  return e.getChildren().some(
16428
- (t) => t instanceof R && h.isEachFixedChild(t)
16509
+ (t) => t instanceof R && d.isEachFixedChild(t)
16429
16510
  );
16430
16511
  }
16431
16512
  /**
@@ -16447,7 +16528,7 @@ const h = class h {
16447
16528
  static evaluateEachFixedChildren(e) {
16448
16529
  const t = [];
16449
16530
  return e.getChildren().forEach((r) => {
16450
- r instanceof R ? h.isEachFixedChild(r) && t.push(h.evaluateAll(r)) : r instanceof de && t.push(h.evaluateText(r));
16531
+ r instanceof R ? d.isEachFixedChild(r) && t.push(d.evaluateAll(r)) : r instanceof de && t.push(d.evaluateText(r));
16451
16532
  }), Promise.all(t).then(() => {
16452
16533
  });
16453
16534
  }
@@ -16465,11 +16546,11 @@ const h = class h {
16465
16546
  */
16466
16547
  static evaluateIfOnAttributeWrite(e) {
16467
16548
  if (!e.hasAttribute(`${c.prefix}each`))
16468
- return h.evaluateIf(e);
16549
+ return d.evaluateIf(e);
16469
16550
  const t = e.isVisible(), r = R.currentSequence();
16470
- return h.evaluateIf(e).then(() => {
16551
+ return d.evaluateIf(e).then(() => {
16471
16552
  if (!t)
16472
- return h.evaluateEach(e).then(() => h.reevaluateReactiveSpecialAttributes(e)).then(() => h.applyEnhancersOnShow(e, r));
16553
+ return d.evaluateEach(e).then(() => d.reevaluateReactiveSpecialAttributes(e)).then(() => d.applyEnhancersOnShow(e, r));
16473
16554
  });
16474
16555
  }
16475
16556
  /**
@@ -16484,8 +16565,8 @@ const h = class h {
16484
16565
  */
16485
16566
  static evaluateIf(e, t = /* @__PURE__ */ new Set()) {
16486
16567
  const r = [], i = e.getAttribute(`${c.prefix}if`);
16487
- if (h.isHiddenIfCondition(i))
16488
- V.isEnabled() && e.isVisible() && h.logFalsyIfDiagnostics(e), r.push(
16568
+ if (d.isHiddenIfCondition(i))
16569
+ V.isEnabled() && e.isVisible() && d.logFalsyIfDiagnostics(e), r.push(
16489
16570
  e.hide().then(() => {
16490
16571
  O.hide(e.getTarget());
16491
16572
  })
@@ -16495,22 +16576,22 @@ const h = class h {
16495
16576
  const s = e.isVisible(), n = R.currentSequence(), a = [], o = e.hasAttribute(`${c.prefix}each`);
16496
16577
  e.getChildren().forEach((l) => {
16497
16578
  if (l instanceof R) {
16498
- if (o && !h.isEachFixedChild(l))
16579
+ if (o && !d.isEachFixedChild(l))
16499
16580
  return;
16500
- l.isMounted() ? s ? a.push(h.evaluateAll(l, t)) : a.push(
16501
- h.evaluateAll(l).then(
16502
- () => h.reevaluateReactiveSpecialAttributes(l)
16581
+ l.isMounted() ? s ? a.push(d.evaluateAll(l, t)) : a.push(
16582
+ d.evaluateAll(l).then(
16583
+ () => d.reevaluateReactiveSpecialAttributes(l)
16503
16584
  )
16504
- ) : a.push(h.scanElement(l.getTarget(), !1));
16505
- } else l instanceof de && !(s && t.has(l)) && a.push(h.evaluateText(l));
16585
+ ) : a.push(d.scanElement(l.getTarget(), !1));
16586
+ } else l instanceof de && !(s && t.has(l)) && a.push(d.evaluateText(l));
16506
16587
  }), r.push(
16507
16588
  e.show().then(() => {
16508
- O.show(e.getTarget()), s || (h.triggerLoadOnShow(e), le.refreshSubtree(e.getTarget(), !1));
16589
+ O.show(e.getTarget()), s || (d.triggerLoadOnShow(e), le.refreshSubtree(e.getTarget(), !1));
16509
16590
  })
16510
16591
  ), r.push(
16511
16592
  Promise.all(a).then(() => {
16512
16593
  if (!(s || o))
16513
- return h.applyEnhancersOnShow(e, n);
16594
+ return d.applyEnhancersOnShow(e, n);
16514
16595
  })
16515
16596
  );
16516
16597
  }
@@ -16539,8 +16620,8 @@ const h = class h {
16539
16620
  * @return 再入制御状態
16540
16621
  */
16541
16622
  static getEachUpdateState(e) {
16542
- let t = h.EACH_UPDATE_STATES.get(e);
16543
- return t || (t = { running: !1, rerunRequested: !1, settled: null }, h.EACH_UPDATE_STATES.set(e, t)), t;
16623
+ let t = d.EACH_UPDATE_STATES.get(e);
16624
+ return t || (t = { running: !1, rerunRequested: !1, settled: null }, d.EACH_UPDATE_STATES.set(e, t)), t;
16544
16625
  }
16545
16626
  /**
16546
16627
  * each要素を評価します。
@@ -16557,12 +16638,12 @@ const h = class h {
16557
16638
  */
16558
16639
  static evaluateEach(e) {
16559
16640
  if (V.isEnabled() && re.recordRowScopeIdentifiers([
16560
- h.getRowScopeName(e, "each-arg"),
16561
- h.getRowScopeName(e, "each-index")
16562
- ]), e.isMounted() || h.syncMountedState(e), !e.isVisible() || !e.isMounted())
16641
+ d.getRowScopeName(e, "each-arg"),
16642
+ d.getRowScopeName(e, "each-index")
16643
+ ]), e.isMounted() || d.syncMountedState(e), !e.isVisible() || !e.isMounted())
16563
16644
  return e.getTarget().removeAttribute(`${c.prefix}each-done`), Promise.resolve();
16564
- const t = h.getEachUpdateState(e);
16565
- return t.running ? (t.rerunRequested = !0, t.settled ?? Promise.resolve()) : h.runEachUpdateLoop(e, t);
16645
+ const t = d.getEachUpdateState(e);
16646
+ return t.running ? (t.rerunRequested = !0, t.settled ?? Promise.resolve()) : d.runEachUpdateLoop(e, t);
16566
16647
  }
16567
16648
  /**
16568
16649
  * `data-each` が行スコープへ公開する名前を返します。
@@ -16587,7 +16668,7 @@ const h = class h {
16587
16668
  * @returns 差分更新が実行中なら true
16588
16669
  */
16589
16670
  static isEachUpdateRunning(e) {
16590
- return h.getEachUpdateState(e).running;
16671
+ return d.getEachUpdateState(e).running;
16591
16672
  }
16592
16673
  /**
16593
16674
  * data-each の差分更新を、再評価要求が無くなるまで直列に繰り返し実行します。
@@ -16603,14 +16684,14 @@ const h = class h {
16603
16684
  const r = (async () => {
16604
16685
  try {
16605
16686
  do
16606
- t.rerunRequested = !1, await h.performEachUpdate(e);
16687
+ t.rerunRequested = !1, await d.performEachUpdate(e);
16607
16688
  while (t.rerunRequested);
16608
16689
  const i = e.getTarget();
16609
- i.setAttribute(`${c.prefix}each-done`, ""), le.refreshSubtree(i, !1), h.runEachRenderedScript(i);
16690
+ i.setAttribute(`${c.prefix}each-done`, ""), le.refreshSubtree(i, !1), d.runEachRenderedScript(i);
16610
16691
  } finally {
16611
16692
  t.running = !1, t.settled = null;
16612
16693
  }
16613
- h.runEachRenderedChange(e);
16694
+ d.runEachRenderedChange(e);
16614
16695
  })();
16615
16696
  return t.settled = r, r;
16616
16697
  }
@@ -16689,14 +16770,14 @@ ${i}
16689
16770
  return;
16690
16771
  const i = String(r.getAttribute(t) ?? "").trim().toLowerCase();
16691
16772
  let s = !1;
16692
- if (i === "always" ? s = !0 : i !== "" && i !== "once" && (h.EACH_RENDERED_CHANGE_WARNED.has(r) || (h.EACH_RENDERED_CHANGE_WARNED.add(r), m.warn(
16773
+ if (i === "always" ? s = !0 : i !== "" && i !== "once" && (d.EACH_RENDERED_CHANGE_WARNED.has(r) || (d.EACH_RENDERED_CHANGE_WARNED.add(r), m.warn(
16693
16774
  "[Haori]",
16694
16775
  `Invalid ${t} value: "${i}". Use "once" (default) or "always".`
16695
- ))), h.countEachRenderedRows(e) !== 0) {
16776
+ ))), d.countEachRenderedRows(e) !== 0) {
16696
16777
  if (!s) {
16697
- if (h.EACH_RENDERED_CHANGE_FIRED.has(r))
16778
+ if (d.EACH_RENDERED_CHANGE_FIRED.has(r))
16698
16779
  return;
16699
- h.EACH_RENDERED_CHANGE_FIRED.add(r);
16780
+ d.EACH_RENDERED_CHANGE_FIRED.add(r);
16700
16781
  }
16701
16782
  try {
16702
16783
  r.dispatchEvent(new Event("change", { bubbles: !0 }));
@@ -16728,11 +16809,11 @@ ${i}
16728
16809
  * @return 差分更新完了の Promise
16729
16810
  */
16730
16811
  static performEachUpdate(e) {
16731
- const t = h.resolveEachItems(e);
16812
+ const t = d.resolveEachItems(e);
16732
16813
  if (t === null)
16733
16814
  return Promise.reject(new Error("Invalid each attribute."));
16734
16815
  let r = e.getTemplate();
16735
- const i = e.getAttribute(`${c.prefix}each-key`), s = h.createBindingSignature({
16816
+ const i = e.getAttribute(`${c.prefix}each-key`), s = d.createBindingSignature({
16736
16817
  key: i ? String(i) : null,
16737
16818
  items: t
16738
16819
  });
@@ -16742,18 +16823,18 @@ ${i}
16742
16823
  if (!n && a instanceof R) {
16743
16824
  if (a.hasAttribute(`${c.prefix}each-before`) || a.hasAttribute(`${c.prefix}each-after`))
16744
16825
  return;
16745
- r = a.clone(), h.markFreshInitializationSkippable(r), e.setTemplate(r), n = !0, e.removeChild(a);
16826
+ r = a.clone(), d.markFreshInitializationSkippable(r), e.setTemplate(r), n = !0, e.removeChild(a);
16746
16827
  const o = a.getTarget();
16747
16828
  o.parentNode && o.parentNode.removeChild(o), a.setMounted(!1);
16748
16829
  }
16749
- }), n && h.warnExtraEachChildren(e), !n) {
16830
+ }), n && d.warnExtraEachChildren(e), !n) {
16750
16831
  const a = e.getTarget();
16751
16832
  Array.from(a.children).filter(
16752
16833
  (l) => !l.hasAttribute(`${c.prefix}each-before`) && !l.hasAttribute(`${c.prefix}each-after`)
16753
16834
  ).forEach((l) => {
16754
16835
  if (!n) {
16755
- const d = N.get(l);
16756
- d instanceof R && (r = d.clone(), h.markFreshInitializationSkippable(r), e.setTemplate(r), n = !0);
16836
+ const h = N.get(l);
16837
+ h instanceof R && (r = h.clone(), d.markFreshInitializationSkippable(r), e.setTemplate(r), n = !0);
16757
16838
  }
16758
16839
  const u = N.get(l);
16759
16840
  u instanceof R && e.getChildren().includes(u) && (e.removeChild(u), u.setMounted(!1)), l.parentNode && l.parentNode.removeChild(l);
@@ -16763,7 +16844,7 @@ ${i}
16763
16844
  e.setEachInputSignature(s);
16764
16845
  });
16765
16846
  }
16766
- return e.getEachInputSignature() === s ? h.reevaluateEachRows(e) : this.updateDiff(e, t).then(() => {
16847
+ return e.getEachInputSignature() === s ? d.reevaluateEachRows(e) : this.updateDiff(e, t).then(() => {
16767
16848
  e.setEachInputSignature(s);
16768
16849
  });
16769
16850
  }
@@ -16778,14 +16859,14 @@ ${i}
16778
16859
  * @returns 再評価完了の Promise
16779
16860
  */
16780
16861
  static reevaluateEachRows(e) {
16781
- if (h.isRowLocalEachTemplate(e))
16862
+ if (d.isRowLocalEachTemplate(e))
16782
16863
  return Promise.resolve();
16783
16864
  const t = e.getChildElementFragments().filter(
16784
16865
  (r) => !r.hasAttribute(`${c.prefix}each-before`) && !r.hasAttribute(`${c.prefix}each-after`)
16785
16866
  );
16786
16867
  return t.length === 0 ? Promise.resolve() : Promise.all(
16787
16868
  t.map(
16788
- (r) => h.evaluateAll(r, h.collectRowLocalFragments(e, r))
16869
+ (r) => d.evaluateAll(r, d.collectRowLocalFragments(e, r))
16789
16870
  )
16790
16871
  ).then(() => {
16791
16872
  });
@@ -16807,16 +16888,16 @@ ${i}
16807
16888
  * @returns 評価を省ける要素とテキストの集合
16808
16889
  */
16809
16890
  static collectRowLocalFragments(e, t) {
16810
- const r = /* @__PURE__ */ new Set(), i = h.getEachScopeNames(e);
16891
+ const r = /* @__PURE__ */ new Set(), i = d.getEachScopeNames(e);
16811
16892
  if (i === null)
16812
16893
  return r;
16813
16894
  const s = (n) => {
16814
- if (h.keepsRowScopeNames(n))
16895
+ if (d.keepsRowScopeNames(n))
16815
16896
  for (const a of n.getChildren())
16816
- a instanceof de ? h.areExpressionsRowLocal(
16817
- h.extractInterpolations(a.getRawText()),
16897
+ a instanceof de ? d.areExpressionsRowLocal(
16898
+ d.extractInterpolations(a.getRawText()),
16818
16899
  i
16819
- ) && r.add(a) : a instanceof R && (h.isRowLocalSubtree(a, i) ? r.add(a) : s(a));
16900
+ ) && r.add(a) : a instanceof R && (d.isRowLocalSubtree(a, i) ? r.add(a) : s(a));
16820
16901
  };
16821
16902
  return s(t), r;
16822
16903
  }
@@ -16869,12 +16950,12 @@ ${i}
16869
16950
  if (!e.hasAttribute(`${c.prefix}each`) || e.getEachInputSignature() === null)
16870
16951
  return !1;
16871
16952
  const t = e.getParent();
16872
- if (t?.closestByAttribute(`${c.prefix}derive`) || t?.closestByAttribute(`${c.prefix}derive-name`) || t?.closestByAttribute(`${c.prefix}if`) || t?.closestByAttribute(`${c.prefix}fetch`) || t?.closestByAttribute(`${c.prefix}import`) || h.hasNonEachDynamicElementState(e) || !h.isRowLocalEachTemplate(e) || h.hasEachFixedChildren(e))
16953
+ if (t?.closestByAttribute(`${c.prefix}derive`) || t?.closestByAttribute(`${c.prefix}derive-name`) || t?.closestByAttribute(`${c.prefix}if`) || t?.closestByAttribute(`${c.prefix}fetch`) || t?.closestByAttribute(`${c.prefix}import`) || d.hasNonEachDynamicElementState(e) || !d.isRowLocalEachTemplate(e) || d.hasEachFixedChildren(e))
16873
16954
  return !1;
16874
- const r = h.resolveEachItems(e);
16955
+ const r = d.resolveEachItems(e);
16875
16956
  if (r === null)
16876
16957
  return !1;
16877
- const i = e.getAttribute(`${c.prefix}each-key`), s = h.createBindingSignature({
16958
+ const i = e.getAttribute(`${c.prefix}each-key`), s = d.createBindingSignature({
16878
16959
  key: i ? String(i) : null,
16879
16960
  items: r
16880
16961
  });
@@ -16903,10 +16984,10 @@ ${i}
16903
16984
  const t = e.getRowLocalTemplate();
16904
16985
  if (t !== null)
16905
16986
  return t;
16906
- const r = e.getTemplate(), i = h.getEachScopeNames(e);
16987
+ const r = e.getTemplate(), i = d.getEachScopeNames(e);
16907
16988
  if (r === null || i === null)
16908
16989
  return e.setRowLocalTemplate(!1), !1;
16909
- const s = h.isRowLocalSubtree(r, i);
16990
+ const s = d.isRowLocalSubtree(r, i);
16910
16991
  return e.setRowLocalTemplate(s), s;
16911
16992
  }
16912
16993
  /**
@@ -16920,8 +17001,8 @@ ${i}
16920
17001
  for (const i of e.getAttributeNames()) {
16921
17002
  const s = e.getRawAttribute(i), n = typeof s == "string" ? s : "";
16922
17003
  if (n.includes("{{")) {
16923
- if (!h.areExpressionsRowLocal(
16924
- h.extractInterpolations(n),
17004
+ if (!d.areExpressionsRowLocal(
17005
+ d.extractInterpolations(n),
16925
17006
  t
16926
17007
  ))
16927
17008
  return !1;
@@ -16930,15 +17011,15 @@ ${i}
16930
17011
  if (!i.startsWith(c.prefix))
16931
17012
  continue;
16932
17013
  const a = i.slice(c.prefix.length);
16933
- if (h.ROW_LOCAL_EXPRESSION_ATTRIBUTES.has(a)) {
16934
- if (!h.areExpressionsRowLocal([n], t))
17014
+ if (d.ROW_LOCAL_EXPRESSION_ATTRIBUTES.has(a)) {
17015
+ if (!d.areExpressionsRowLocal([n], t))
16935
17016
  return !1;
16936
17017
  continue;
16937
17018
  }
16938
- if (h.ROW_LOCAL_STATIC_ATTRIBUTES.has(a))
17019
+ if (d.ROW_LOCAL_STATIC_ATTRIBUTES.has(a))
16939
17020
  continue;
16940
17021
  const o = a.indexOf("-");
16941
- if (!(o !== -1 && h.ROW_LOCAL_ROW_OPERATIONS.has(a.slice(o + 1))))
17022
+ if (!(o !== -1 && d.ROW_LOCAL_ROW_OPERATIONS.has(a.slice(o + 1))))
16942
17023
  return !1;
16943
17024
  }
16944
17025
  let r = t;
@@ -16953,12 +17034,12 @@ ${i}
16953
17034
  }
16954
17035
  for (const i of e.getChildren())
16955
17036
  if (i instanceof R) {
16956
- if (!h.isRowLocalSubtree(i, r))
17037
+ if (!d.isRowLocalSubtree(i, r))
16957
17038
  return !1;
16958
17039
  } else if (i instanceof de) {
16959
17040
  const s = i.getRawText();
16960
- if (s.includes("{{") && !h.areExpressionsRowLocal(
16961
- h.extractInterpolations(s),
17041
+ if (s.includes("{{") && !d.areExpressionsRowLocal(
17042
+ d.extractInterpolations(s),
16962
17043
  t
16963
17044
  ))
16964
17045
  return !1;
@@ -17006,7 +17087,7 @@ ${i}
17006
17087
  * @returns 省略可能なら true
17007
17088
  */
17008
17089
  static canSkipStableDerivedSubtree(e) {
17009
- return !e.hasAttribute(`${c.prefix}derive`) || e.hasAttribute(`${c.prefix}if`) || e.hasAttribute(`${c.prefix}each`) || e.hasAttribute(`${c.prefix}fetch`) || e.hasAttribute(`${c.prefix}import`) ? !1 : !h.hasDisallowedDerivedSubtreeDescendant(e);
17090
+ return !e.hasAttribute(`${c.prefix}derive`) || e.hasAttribute(`${c.prefix}if`) || e.hasAttribute(`${c.prefix}each`) || e.hasAttribute(`${c.prefix}fetch`) || e.hasAttribute(`${c.prefix}import`) ? !1 : !d.hasDisallowedDerivedSubtreeDescendant(e);
17010
17091
  }
17011
17092
  /**
17012
17093
  * data-derive subtree skip の初期 PoC で扱わない子孫要素を含むかを返します。
@@ -17015,7 +17096,7 @@ ${i}
17015
17096
  * @returns 含むなら true
17016
17097
  */
17017
17098
  static hasDisallowedDerivedSubtreeDescendant(e) {
17018
- return e.getChildren().some((t) => t instanceof R ? t.hasAttribute(`${c.prefix}derive`) || t.hasAttribute(`${c.prefix}derive-name`) || t.hasAttribute(`${c.prefix}fetch`) || t.hasAttribute(`${c.prefix}import`) ? !0 : h.hasDisallowedDerivedSubtreeDescendant(t) : !1);
17099
+ return e.getChildren().some((t) => t instanceof R ? t.hasAttribute(`${c.prefix}derive`) || t.hasAttribute(`${c.prefix}derive-name`) || t.hasAttribute(`${c.prefix}fetch`) || t.hasAttribute(`${c.prefix}import`) ? !0 : d.hasDisallowedDerivedSubtreeDescendant(t) : !1);
17019
17100
  }
17020
17101
  /**
17021
17102
  * data-derive host が子孫要素へ公開している binding の署名を返します。
@@ -17024,7 +17105,7 @@ ${i}
17024
17105
  * @returns binding 署名
17025
17106
  */
17026
17107
  static createDescendantBindingSignature(e, t) {
17027
- return h.recordDerivedSubtreeSignatureComputation(e, t), h.createBindingSignature(e.getDescendantBindingData());
17108
+ return d.recordDerivedSubtreeSignatureComputation(e, t), d.createBindingSignature(e.getDescendantBindingData());
17028
17109
  }
17029
17110
  /**
17030
17111
  * data-derive 実行前の入力署名を返します。
@@ -17036,7 +17117,7 @@ ${i}
17036
17117
  */
17037
17118
  static createDeriveInputSignature(e, t, r) {
17038
17119
  const i = typeof r == "string" ? r.trim() : "";
17039
- return !t || i === "" ? null : h.createBindingSignature({
17120
+ return !t || i === "" ? null : d.createBindingSignature({
17040
17121
  expression: t,
17041
17122
  name: i,
17042
17123
  scope: e.getBindingData()
@@ -17056,7 +17137,7 @@ ${i}
17056
17137
  document.querySelectorAll(`[${e}]`)
17057
17138
  ).map((i) => {
17058
17139
  const s = N.peek(i);
17059
- return s instanceof R ? h.setAttribute(
17140
+ return s instanceof R ? d.setAttribute(
17060
17141
  i,
17061
17142
  e,
17062
17143
  s.getRawAttribute(e) ?? ""
@@ -17096,13 +17177,13 @@ ${i}
17096
17177
  * @param fragment 対象フラグメント
17097
17178
  */
17098
17179
  static refreshDerivedSubtreeSignature(e) {
17099
- if (!h.canSkipStableDerivedSubtree(e)) {
17100
- e.setDeriveSubtreeSignature(null), h.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
17180
+ if (!d.canSkipStableDerivedSubtree(e)) {
17181
+ e.setDeriveSubtreeSignature(null), d.logDerivedSubtreeProfileSnapshot(e, "skip-ineligible");
17101
17182
  return;
17102
17183
  }
17103
17184
  e.setDeriveSubtreeSignature(
17104
- h.createDescendantBindingSignature(e, "refresh")
17105
- ), h.logDerivedSubtreeProfileSnapshot(e, "refresh");
17185
+ d.createDescendantBindingSignature(e, "refresh")
17186
+ ), d.logDerivedSubtreeProfileSnapshot(e, "refresh");
17106
17187
  }
17107
17188
  /**
17108
17189
  * data-derive subtree skip のプロファイルを取得または初期化します。
@@ -17113,11 +17194,11 @@ ${i}
17113
17194
  static getOrCreateDerivedSubtreeProfile(e) {
17114
17195
  if (!V.isEnabled() || !e.hasAttribute(`${c.prefix}derive`))
17115
17196
  return null;
17116
- const t = h.DERIVE_SUBTREE_PROFILES.get(e);
17197
+ const t = d.DERIVE_SUBTREE_PROFILES.get(e);
17117
17198
  if (t)
17118
17199
  return t;
17119
17200
  const r = {
17120
- hostId: h.createDerivedSubtreeHostId(e),
17201
+ hostId: d.createDerivedSubtreeHostId(e),
17121
17202
  signatureComputeTotal: 0,
17122
17203
  signatureComputeFromEvaluateAll: 0,
17123
17204
  signatureComputeFromRefresh: 0,
@@ -17125,7 +17206,7 @@ ${i}
17125
17206
  skipMissCount: 0,
17126
17207
  skipIneligibleCount: 0
17127
17208
  };
17128
- return h.DERIVE_SUBTREE_PROFILES.set(e, r), r;
17209
+ return d.DERIVE_SUBTREE_PROFILES.set(e, r), r;
17129
17210
  }
17130
17211
  /**
17131
17212
  * 要素の `id` 属性を安全に取得します。
@@ -17156,7 +17237,7 @@ ${i}
17156
17237
  if (!(i instanceof HTMLElement))
17157
17238
  break;
17158
17239
  let s = i.tagName.toLowerCase();
17159
- const n = h.resolveElementId(i).trim();
17240
+ const n = d.resolveElementId(i).trim();
17160
17241
  if (n !== "") {
17161
17242
  s += `#${n}`, t.unshift(s);
17162
17243
  break;
@@ -17179,7 +17260,7 @@ ${i}
17179
17260
  * @param source 計算元
17180
17261
  */
17181
17262
  static recordDerivedSubtreeSignatureComputation(e, t) {
17182
- const r = h.getOrCreateDerivedSubtreeProfile(e);
17263
+ const r = d.getOrCreateDerivedSubtreeProfile(e);
17183
17264
  if (r !== null) {
17184
17265
  if (r.signatureComputeTotal += 1, t === "refresh") {
17185
17266
  r.signatureComputeFromRefresh += 1;
@@ -17195,7 +17276,7 @@ ${i}
17195
17276
  * @param reason ログ理由
17196
17277
  */
17197
17278
  static logDerivedSubtreeProfileSnapshot(e, t) {
17198
- const r = h.getOrCreateDerivedSubtreeProfile(e);
17279
+ const r = d.getOrCreateDerivedSubtreeProfile(e);
17199
17280
  r !== null && (t === "skip-hit" ? r.skipHitCount += 1 : t === "skip-miss" ? r.skipMissCount += 1 : t === "skip-ineligible" && (r.skipIneligibleCount += 1), m.info("[Haori][derive-profile]", {
17200
17281
  reason: t,
17201
17282
  hostId: r.hostId,
@@ -17238,7 +17319,7 @@ ${i}
17238
17319
  * @returns subtree 全体を省略可能なら true
17239
17320
  */
17240
17321
  static markFreshInitializationSkippable(e) {
17241
- const t = e.getAttributeNames().some((s) => h.isFreshInitializationDynamicAttribute(e, s)), r = e.getChildren().some((s) => s instanceof R ? !h.markFreshInitializationSkippable(s) : s instanceof de ? s.hasDynamicContent() : !1), i = !t && !r;
17322
+ const t = e.getAttributeNames().some((s) => d.isFreshInitializationDynamicAttribute(e, s)), r = e.getChildren().some((s) => s instanceof R ? !d.markFreshInitializationSkippable(s) : s instanceof de ? s.hasDynamicContent() : !1), i = !t && !r;
17242
17323
  return e.setFreshInitializationSkippable(i), i;
17243
17324
  }
17244
17325
  /**
@@ -17271,59 +17352,59 @@ ${i}
17271
17352
  let i = e.getAttribute(`${c.prefix}each-index`);
17272
17353
  i && (i = String(i));
17273
17354
  const s = e.getAttribute(`${c.prefix}each-key`), n = e.getAttribute(`${c.prefix}each-arg`), a = t.map(
17274
- (C, Z) => h.createListKey(C, s ? String(s) : null, Z)
17355
+ (F, Z) => d.createListKey(F, s ? String(s) : null, Z)
17275
17356
  ), o = new Set(a), l = /* @__PURE__ */ new Map();
17276
- a.forEach((C) => {
17277
- l.set(C, (l.get(C) ?? 0) + 1);
17278
- }), s && o.size !== a.length && h.warnDuplicateEachKey(String(s));
17357
+ a.forEach((F) => {
17358
+ l.set(F, (l.get(F) ?? 0) + 1);
17359
+ }), s && o.size !== a.length && d.warnDuplicateEachKey(String(s));
17279
17360
  const u = [];
17280
- let d = e.getChildren().filter((C) => C instanceof R).filter(
17281
- (C) => !C.hasAttribute(`${c.prefix}each-before`) && !C.hasAttribute(`${c.prefix}each-after`)
17361
+ let h = e.getChildren().filter((F) => F instanceof R).filter(
17362
+ (F) => !F.hasAttribute(`${c.prefix}each-before`) && !F.hasAttribute(`${c.prefix}each-after`)
17282
17363
  );
17283
- const y = d.map((C) => C.getListKey()), b = /* @__PURE__ */ new Set();
17284
- d = d.filter((C, Z) => {
17285
- const ee = String(C.getListKey()), ne = l.get(ee) ?? 0;
17364
+ const y = h.map((F) => F.getListKey()), b = /* @__PURE__ */ new Set();
17365
+ h = h.filter((F, Z) => {
17366
+ const ee = String(F.getListKey()), ne = l.get(ee) ?? 0;
17286
17367
  if (ne === 0) {
17287
- b.add(C);
17288
- const K = C.getListKey();
17289
- return K !== null && O.rowRemove(C.getTarget(), K, Z), u.push(C.remove()), !1;
17368
+ b.add(F);
17369
+ const K = F.getListKey();
17370
+ return K !== null && O.rowRemove(F.getTarget(), K, Z), u.push(F.remove()), !1;
17290
17371
  }
17291
17372
  return l.set(ee, ne - 1), !0;
17292
17373
  });
17293
- const E = d.map((C) => C.getListKey()), A = /* @__PURE__ */ new Map();
17294
- d.forEach((C) => {
17295
- const Z = C.getListKey();
17374
+ const E = h.map((F) => F.getListKey()), A = /* @__PURE__ */ new Map();
17375
+ h.forEach((F) => {
17376
+ const Z = F.getListKey();
17296
17377
  if (Z === null)
17297
17378
  return;
17298
17379
  const ee = A.get(Z);
17299
- ee ? ee.push(C) : A.set(Z, [C]);
17380
+ ee ? ee.push(F) : A.set(Z, [F]);
17300
17381
  });
17301
- const w = e.getChildElementFragments().filter((C) => !b.has(C)), M = w.filter(
17302
- (C) => C.hasAttribute(`${c.prefix}each-before`)
17382
+ const w = e.getChildElementFragments().filter((F) => !b.has(F)), $ = w.filter(
17383
+ (F) => F.hasAttribute(`${c.prefix}each-before`)
17303
17384
  ).length;
17304
- let F = Promise.resolve();
17385
+ let M = Promise.resolve();
17305
17386
  const se = [];
17306
- return a.forEach((C, Z) => {
17387
+ return a.forEach((F, Z) => {
17307
17388
  const ee = t[Z], ne = Z;
17308
17389
  let K;
17309
- const ae = A.get(C)?.shift();
17390
+ const ae = A.get(F)?.shift();
17310
17391
  if (ae) {
17311
17392
  K = ae;
17312
- const j = M + Z;
17313
- F = F.then(
17314
- () => h.updateRowFragment(
17393
+ const j = $ + Z;
17394
+ M = M.then(
17395
+ () => d.updateRowFragment(
17315
17396
  K,
17316
17397
  ee,
17317
17398
  i,
17318
17399
  ne,
17319
17400
  n ? String(n) : null,
17320
- C
17401
+ F
17321
17402
  ).then(
17322
17403
  (k) => (
17323
17404
  // 再利用行も新しい並び順の位置へ移動する。移動しないと、配列を並べ替え
17324
17405
  // ただけの更新(data-each-key 指定時はキーが変わらないため全行が再利用
17325
17406
  // される)で DOM の順序が古いまま残る。
17326
- h.repositionEachRow(
17407
+ d.repositionEachRow(
17327
17408
  e,
17328
17409
  K,
17329
17410
  w,
@@ -17331,14 +17412,14 @@ ${i}
17331
17412
  ).then((B) => {
17332
17413
  B !== null && O.rowMove(
17333
17414
  K.getTarget(),
17334
- C,
17335
- B - M,
17415
+ F,
17416
+ B - $,
17336
17417
  Z
17337
- ), !(!k && h.isRowLocalEachTemplate(e)) && se.push(
17338
- h.evaluateAll(
17418
+ ), !(!k && d.isRowLocalEachTemplate(e)) && se.push(
17419
+ d.evaluateAll(
17339
17420
  K,
17340
- k ? /* @__PURE__ */ new Set() : h.collectRowLocalFragments(e, K)
17341
- ).then(() => h.applyRowFormValues(e, K, ee))
17421
+ k ? /* @__PURE__ */ new Set() : d.collectRowLocalFragments(e, K)
17422
+ ).then(() => d.applyRowFormValues(e, K, ee))
17342
17423
  );
17343
17424
  })
17344
17425
  )
@@ -17346,31 +17427,31 @@ ${i}
17346
17427
  );
17347
17428
  } else {
17348
17429
  K = r.clone();
17349
- const j = M + Z;
17350
- F = F.then(
17351
- () => h.updateRowFragment(
17430
+ const j = $ + Z;
17431
+ M = M.then(
17432
+ () => d.updateRowFragment(
17352
17433
  K,
17353
17434
  ee,
17354
17435
  i,
17355
17436
  ne,
17356
17437
  n ? String(n) : null,
17357
- C
17438
+ F
17358
17439
  ).then(() => {
17359
17440
  const k = w[j] ?? null;
17360
17441
  return e.insertBefore(K, k).then(() => {
17361
17442
  w.splice(j, 0, K);
17362
- }).then(() => h.initializeFreshEachRow(K)).then(() => h.applyRowFormValues(e, K, ee)).then(() => {
17363
- O.rowAdd(K.getTarget(), C, ne, ee);
17443
+ }).then(() => d.initializeFreshEachRow(K)).then(() => d.applyRowFormValues(e, K, ee)).then(() => {
17444
+ O.rowAdd(K.getTarget(), F, ne, ee);
17364
17445
  });
17365
17446
  })
17366
17447
  );
17367
17448
  }
17368
- }), Promise.all(u).then(() => F).then(() => Promise.all(se)).then(() => {
17369
- const C = a.filter(
17449
+ }), Promise.all(u).then(() => M).then(() => Promise.all(se)).then(() => {
17450
+ const F = a.filter(
17370
17451
  (j) => j !== null
17371
17452
  ), Z = E.filter(
17372
17453
  (j) => j !== null
17373
- ), ee = new Set(Z), ne = C.filter((j) => !ee.has(j)), ae = y.filter(
17454
+ ), ee = new Set(Z), ne = F.filter((j) => !ee.has(j)), ae = y.filter(
17374
17455
  (j) => j !== null
17375
17456
  ).filter(
17376
17457
  (j) => !o.has(j)
@@ -17379,7 +17460,7 @@ ${i}
17379
17460
  e.getTarget(),
17380
17461
  ne,
17381
17462
  ae,
17382
- C
17463
+ F
17383
17464
  );
17384
17465
  });
17385
17466
  }
@@ -17430,7 +17511,7 @@ ${i}
17430
17511
  * @returns 戻り値はありません。
17431
17512
  */
17432
17513
  static warnDuplicateEachKey(e) {
17433
- !V.isEnabled() || h.WARNED_DUPLICATE_EACH_KEYS.has(e) || (h.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
17514
+ !V.isEnabled() || d.WARNED_DUPLICATE_EACH_KEYS.has(e) || (d.WARNED_DUPLICATE_EACH_KEYS.add(e), m.warn(
17434
17515
  "[Haori]",
17435
17516
  `${c.prefix}each-key="${e}" の値が配列の中で重複しています。行は出現順で対応付けますが、キーによる行の識別はできません。`
17436
17517
  ));
@@ -17532,7 +17613,7 @@ ${i}
17532
17613
  `Primitive value requires '${c.prefix}each-arg' attribute: ${t}`
17533
17614
  ), Promise.resolve(!1);
17534
17615
  r && (a[r] = i);
17535
- const o = a, l = h.createBindingSignature({
17616
+ const o = a, l = d.createBindingSignature({
17536
17617
  listKey: n,
17537
17618
  bindingData: o
17538
17619
  });
@@ -17550,7 +17631,7 @@ ${i}
17550
17631
  const r = t.pop();
17551
17632
  if (r.getChildElementFragments().forEach((i) => {
17552
17633
  t.push(i);
17553
- }), r !== e && !r.isMounted() && h.hasMountSensitiveAttribute(r))
17634
+ }), r !== e && !r.isMounted() && d.hasMountSensitiveAttribute(r))
17554
17635
  return !0;
17555
17636
  }
17556
17637
  return !1;
@@ -17597,7 +17678,7 @@ ${i}
17597
17678
  if (t.has(e))
17598
17679
  return `[Circular:${t.get(e)}]`;
17599
17680
  const i = `array-${r.value}`;
17600
- return r.value += 1, t.set(e, i), `[${e.map((s) => h.createBindingSignature(s, t, r)).join(",")}]`;
17681
+ return r.value += 1, t.set(e, i), `[${e.map((s) => d.createBindingSignature(s, t, r)).join(",")}]`;
17601
17682
  }
17602
17683
  if (typeof e == "object") {
17603
17684
  if (t.has(e))
@@ -17606,7 +17687,7 @@ ${i}
17606
17687
  r.value += 1, t.set(e, i);
17607
17688
  const s = e;
17608
17689
  return `{${Object.keys(s).sort().map(
17609
- (n) => `${JSON.stringify(n)}:${h.createBindingSignature(
17690
+ (n) => `${JSON.stringify(n)}:${d.createBindingSignature(
17610
17691
  s[n],
17611
17692
  t,
17612
17693
  r
@@ -17622,11 +17703,11 @@ ${i}
17622
17703
  */
17623
17704
  static scheduleEvaluateAll(e) {
17624
17705
  setTimeout(() => {
17625
- h.evaluateAll(e);
17706
+ d.evaluateAll(e);
17626
17707
  }, 100);
17627
17708
  }
17628
17709
  };
17629
- h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
17710
+ d.ATTRIBUTE_ALIAS_SUFFIX = "attr-", d.PRIORITY_ATTRIBUTE_SUFFIXES = [
17630
17711
  "bind",
17631
17712
  // `store` は `bind`(既定値)の後、`url-param` の前に置く。URL クエリで明示
17632
17713
  // された値を保存済みの値より優先するため。
@@ -17636,7 +17717,7 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
17636
17717
  "derive",
17637
17718
  "if",
17638
17719
  "each"
17639
- ], h.DEFERRED_ATTRIBUTE_SUFFIXES = ["fetch"], h.initialValueRestores = /* @__PURE__ */ new Set(), h.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES = [
17720
+ ], d.DEFERRED_ATTRIBUTE_SUFFIXES = ["fetch"], d.initialValueRestores = /* @__PURE__ */ new Set(), d.EVALUATE_ALL_EXCLUDED_ATTRIBUTE_SUFFIXES = [
17640
17721
  "bind",
17641
17722
  "derive",
17642
17723
  "derive-name",
@@ -17649,7 +17730,7 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
17649
17730
  // 条件は評価結果を DOM 属性へ書かない(式は実行時に生値から評価する)。
17650
17731
  "validity",
17651
17732
  "validity-message"
17652
- ], h.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, h.ROW_LOCAL_EXPRESSION_ATTRIBUTES = /* @__PURE__ */ new Set(["each", "if", "derive"]), h.ROW_LOCAL_STATIC_ATTRIBUTES = /* @__PURE__ */ new Set([
17733
+ ], d.ATTRIBUTE_PLACEHOLDER_REGEX = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/, d.ROW_LOCAL_EXPRESSION_ATTRIBUTES = /* @__PURE__ */ new Set(["each", "if", "derive"]), d.ROW_LOCAL_STATIC_ATTRIBUTES = /* @__PURE__ */ new Set([
17653
17734
  "each-arg",
17654
17735
  "each-key",
17655
17736
  "each-index",
@@ -17669,8 +17750,8 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
17669
17750
  "store-type",
17670
17751
  "enhance",
17671
17752
  "enhance-new"
17672
- ]), h.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), h.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), h.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), h.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), h.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), h.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), h.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), h.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), h.VALUE_BINDING_ATTRIBUTES = ["value", "checked"], h.OPTION_BINDING_ATTRIBUTES = ["selected"], h.ABSENT_PATH = Symbol("absent");
17673
- let $ = h;
17753
+ ]), d.ROW_LOCAL_ROW_OPERATIONS = /* @__PURE__ */ new Set(["row-add", "row-remove", "row-prev", "row-next"]), d.managedFetchSequence = 0, d.REACTIVE_FETCH_STATES = /* @__PURE__ */ new WeakMap(), d.REACTIVE_IMPORT_STATES = /* @__PURE__ */ new WeakMap(), d.DERIVE_SUBTREE_PROFILES = /* @__PURE__ */ new WeakMap(), d.EACH_UPDATE_STATES = /* @__PURE__ */ new WeakMap(), d.EACH_RENDERED_CHANGE_FIRED = /* @__PURE__ */ new WeakSet(), d.EACH_RENDERED_CHANGE_WARNED = /* @__PURE__ */ new WeakSet(), d.WARNED_DUPLICATE_EACH_KEYS = /* @__PURE__ */ new Set(), d.VALUE_BINDING_ATTRIBUTES = ["value", "checked"], d.OPTION_BINDING_ATTRIBUTES = ["selected"], d.ABSENT_PATH = Symbol("absent");
17754
+ let C = d;
17674
17755
  const be = class be {
17675
17756
  /**
17676
17757
  * コンストラクタ。
@@ -17692,7 +17773,7 @@ const be = class be {
17692
17773
  }, this.onPopstate = (t) => {
17693
17774
  const r = t.state;
17694
17775
  if (!r || r[be.HISTORY_STATE_KEY] !== !0) {
17695
- $.refreshUrlParams();
17776
+ C.refreshUrlParams();
17696
17777
  return;
17697
17778
  }
17698
17779
  location.reload();
@@ -18149,8 +18230,8 @@ const q = class q {
18149
18230
  const o = new IntersectionObserver(
18150
18231
  (l) => {
18151
18232
  const u = q.registrations.get(e);
18152
- u && l.forEach((d) => {
18153
- if (u.intersecting = d.isIntersecting, !!d.isIntersecting) {
18233
+ u && l.forEach((h) => {
18234
+ if (u.intersecting = h.isIntersecting, !!h.isIntersecting) {
18154
18235
  if (u.running || q.isDisabled(u.fragment)) {
18155
18236
  u.pending = !0;
18156
18237
  return;
@@ -18633,7 +18714,7 @@ const S = class S {
18633
18714
  ...i.getRawBindingData() ?? {},
18634
18715
  _poll: r
18635
18716
  };
18636
- return $.setBindingData(s, n, {
18717
+ return C.setBindingData(s, n, {
18637
18718
  reflectToAttribute: !1,
18638
18719
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
18639
18720
  // 解除しない)。
@@ -18820,7 +18901,7 @@ S.CONFIG_KEYS = /* @__PURE__ */ new Set([
18820
18901
  "state"
18821
18902
  ]), S.DEFAULT_INTERVAL_MS = 5e3, S.MIN_INTERVAL_MS = 100, S.registrations = /* @__PURE__ */ new Map(), S.visibilityListener = null;
18822
18903
  let $e = S;
18823
- const Or = "0.69.0";
18904
+ const Or = "0.70.1";
18824
18905
  function Br(p) {
18825
18906
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => p()) : Promise.resolve().then(p);
18826
18907
  }
@@ -18880,11 +18961,11 @@ const L = class L {
18880
18961
  const u = L.registrations.get(e);
18881
18962
  if (!u)
18882
18963
  return;
18883
- let d = !1;
18964
+ let h = !1;
18884
18965
  l.forEach((y) => {
18885
18966
  const b = y.target;
18886
- u.observedRows.has(b) && (y.isIntersecting ? u.visibleRows.has(b) || (u.visibleRows.add(b), d = !0) : u.visibleRows.delete(b) && (d = !0));
18887
- }), d && L.scheduleCompute(u);
18967
+ u.observedRows.has(b) && (y.isIntersecting ? u.visibleRows.has(b) || (u.visibleRows.add(b), h = !0) : u.visibleRows.delete(b) && (h = !0));
18968
+ }), h && L.scheduleCompute(u);
18888
18969
  },
18889
18970
  {
18890
18971
  root: s,
@@ -19070,7 +19151,7 @@ const L = class L {
19070
19151
  };
19071
19152
  s[e.varName] = { ...t };
19072
19153
  const n = e.fragment.getTarget(), a = i === n ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([e.fragment]);
19073
- $.setBindingData(i, s, {
19154
+ C.setBindingData(i, s, {
19074
19155
  skipFragments: a,
19075
19156
  reflectToAttribute: !1,
19076
19157
  // 可視範囲の公開は値の供給ではない(権威を持たず、ユーザー編集の印も
@@ -19124,8 +19205,8 @@ const H = class H {
19124
19205
  H._dispatcher = e, e.startDeferred(), H._initialIntakes = [];
19125
19206
  try {
19126
19207
  const t = await Promise.allSettled([
19127
- $.scan(document.head),
19128
- $.scan(document.body)
19208
+ C.scan(document.head),
19209
+ C.scan(document.body)
19129
19210
  ]), [r, i] = t;
19130
19211
  r.status !== "fulfilled" && m.error(
19131
19212
  "[Haori]",
@@ -19359,9 +19440,9 @@ const H = class H {
19359
19440
  r.attributeName === "style" && R.reassertHiddenDisplay(i);
19360
19441
  break;
19361
19442
  }
19362
- if (r.attributeName && $.isAliasedAttributeReflection(i, r.attributeName))
19443
+ if (r.attributeName && C.isAliasedAttributeReflection(i, r.attributeName))
19363
19444
  break;
19364
- const s = $.setAttribute(
19445
+ const s = C.setAttribute(
19365
19446
  i,
19366
19447
  r.attributeName,
19367
19448
  i.getAttribute(r.attributeName),
@@ -19373,17 +19454,17 @@ const H = class H {
19373
19454
  }
19374
19455
  case "childList": {
19375
19456
  Array.from(r.removedNodes).forEach((i) => {
19376
- H.isStaleExternalRemoval(r, i) || (Me.cleanupTree(i), $e.cleanupTree(i), Se.cleanupTree(i), $.removeNode(i));
19457
+ H.isStaleExternalRemoval(r, i) || (Me.cleanupTree(i), $e.cleanupTree(i), Se.cleanupTree(i), C.removeNode(i));
19377
19458
  }), Array.from(r.addedNodes).forEach((i) => {
19378
19459
  if (!(i.parentElement instanceof Element))
19379
19460
  return;
19380
- const s = $.addNode(i.parentElement, i);
19461
+ const s = C.addNode(i.parentElement, i);
19381
19462
  H._initialIntakes?.push(s), Me.syncTree(i), $e.syncTree(i), Se.syncTree(i);
19382
19463
  }), r.target instanceof Element && Se.syncElement(r.target);
19383
19464
  break;
19384
19465
  }
19385
19466
  case "characterData": {
19386
- r.target instanceof Text || r.target instanceof Comment ? $.changeText(r.target, r.target.textContent) : m.warn(
19467
+ r.target instanceof Text || r.target instanceof Comment ? C.changeText(r.target, r.target.textContent) : m.warn(
19387
19468
  "[Haori]",
19388
19469
  "Unsupported character data type:",
19389
19470
  r.target
@@ -19405,7 +19486,7 @@ le.setMutationCapture((p) => He.captureMutations(p));
19405
19486
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", He.init) : He.init();
19406
19487
  const Ur = () => De.waitForRenders(), Hr = De.enhancers, Vr = De.handlers;
19407
19488
  export {
19408
- $ as Core,
19489
+ C as Core,
19409
19490
  le as Enhance,
19410
19491
  c as Env,
19411
19492
  D as Form,