haori 0.67.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/haori.es.js CHANGED
@@ -34,7 +34,7 @@ const rt = "embedded";
34
34
  function It(f) {
35
35
  return f === "embedded" || f === "demo";
36
36
  }
37
- function tr(f) {
37
+ function rr(f) {
38
38
  return f === null ? null : It(f) ? f : rt;
39
39
  }
40
40
  function dt(f) {
@@ -112,7 +112,7 @@ const te = class te {
112
112
  if (e instanceof HTMLScriptElement) {
113
113
  const r = e.getAttribute("data-prefix") || te._prefix;
114
114
  te._prefix = r.endsWith("-") ? r : r + "-";
115
- const i = tr(
115
+ const i = rr(
116
116
  e.getAttribute("data-runtime")
117
117
  );
118
118
  i !== null && (te._runtime = i), te._strictBind = e.hasAttribute(
@@ -179,7 +179,7 @@ class m {
179
179
  console.error(e, ...t);
180
180
  }
181
181
  }
182
- const rr = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ht = "new:", I = class I {
182
+ const ir = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ht = "new:", I = class I {
183
183
  /**
184
184
  * 外部ライブラリ連携を登録します。
185
185
  *
@@ -398,7 +398,7 @@ const rr = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ht = "new:
398
398
  * @returns 解決した値。解決できない場合は null
399
399
  */
400
400
  static resolveGlobal(e) {
401
- if (!rr.test(e))
401
+ if (!ir.test(e))
402
402
  return m.error(
403
403
  "[Haori]",
404
404
  `${c.prefix}enhance-new accepts a dot-separated global reference only: ${e}`
@@ -452,7 +452,7 @@ const rr = /^[A-Za-z_$][A-Za-z0-9_$]*(\.[A-Za-z_$][A-Za-z0-9_$]*)*$/, ht = "new:
452
452
  };
453
453
  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;
454
454
  let le = I;
455
- const Ft = "yyyy/MM/dd HH:mm", ir = "en-US", ft = 1e4;
455
+ const Ft = "yyyy/MM/dd HH:mm", sr = "en-US", ft = 1e4;
456
456
  function me(f) {
457
457
  return String(f).padStart(2, "0");
458
458
  }
@@ -470,7 +470,7 @@ function Ct(f, e, t, r, i, s) {
470
470
  ss: me(s)
471
471
  };
472
472
  }
473
- function $t(f, e) {
473
+ function Mt(f, e) {
474
474
  let t;
475
475
  try {
476
476
  t = new Intl.DateTimeFormat("en-US", {
@@ -500,7 +500,7 @@ function Ze(f, e = Ft, t) {
500
500
  return "";
501
501
  let i;
502
502
  if (typeof t == "string" && t.trim() !== "") {
503
- if (i = $t(r, t.trim()), i === null)
503
+ if (i = Mt(r, t.trim()), i === null)
504
504
  return "";
505
505
  } else
506
506
  i = Ct(
@@ -517,15 +517,15 @@ function Ze(f, e = Ft, t) {
517
517
  (n, a) => a !== void 0 ? a === "" ? "'" : a : s[n]
518
518
  );
519
519
  }
520
- const sr = "yyyy-MM-dd";
521
- function Mt(f = Ft, e) {
520
+ const nr = "yyyy-MM-dd";
521
+ function $t(f = Ft, e) {
522
522
  return Ze(/* @__PURE__ */ new Date(), f, e);
523
523
  }
524
- function Pt(f = 0, e = sr, t) {
524
+ function Pt(f = 0, e = nr, t) {
525
525
  const r = Number.isFinite(f) ? Math.trunc(f) : 0, i = typeof t == "string" && t.trim() !== "" ? t.trim() : "";
526
526
  let s, n, a;
527
527
  if (i !== "") {
528
- const l = $t(/* @__PURE__ */ new Date(), i);
528
+ const l = Mt(/* @__PURE__ */ new Date(), i);
529
529
  if (l === null)
530
530
  return "";
531
531
  s = Number(l.yyyy), n = Number(l.MM), a = Number(l.dd);
@@ -555,7 +555,7 @@ function Lt(f, e) {
555
555
  const i = Math.max(0, Math.trunc(e));
556
556
  r.minimumFractionDigits = i, r.maximumFractionDigits = i;
557
557
  }
558
- return new Intl.NumberFormat(ir, r).format(t);
558
+ return new Intl.NumberFormat(sr, r).format(t);
559
559
  }
560
560
  function Ot(f, e, t) {
561
561
  let r, i, s;
@@ -608,7 +608,7 @@ function Bt(f, e, t = {}) {
608
608
  }
609
609
  return l;
610
610
  }
611
- const nr = /^(\d{4})-(\d{1,2})$/, ar = 1200;
611
+ const ar = /^(\d{4})-(\d{1,2})$/, or = 1200;
612
612
  function qe(f, e) {
613
613
  const t = Number(f);
614
614
  return Number.isFinite(t) ? Math.trunc(t) : e;
@@ -616,7 +616,7 @@ function qe(f, e) {
616
616
  function Qe(f, e) {
617
617
  if (typeof f != "string")
618
618
  return "";
619
- const t = nr.exec(f.trim());
619
+ const t = ar.exec(f.trim());
620
620
  if (!t)
621
621
  return "";
622
622
  const r = Number(t[1]), i = Number(t[2]);
@@ -625,7 +625,7 @@ function Qe(f, e) {
625
625
  const s = Number.isFinite(e) ? Math.trunc(e) : 0, n = r * 12 + (i - 1) + s, a = Math.floor(n / 12), o = n - a * 12 + 1;
626
626
  return `${String(a).padStart(4, "0")}-${me(o)}`;
627
627
  }
628
- function or(f) {
628
+ function lr(f) {
629
629
  if (typeof f == "string" && f.trim() !== "")
630
630
  return Qe(f, 0);
631
631
  const e = /* @__PURE__ */ new Date();
@@ -635,10 +635,10 @@ function Ut(f, e) {
635
635
  const t = Math.trunc(Number(f));
636
636
  if (!Number.isFinite(t) || t < 0)
637
637
  return [];
638
- const r = or(e);
638
+ const r = lr(e);
639
639
  if (r === "")
640
640
  return [];
641
- const i = Math.min(t, ar), s = [];
641
+ const i = Math.min(t, or), s = [];
642
642
  for (let n = 0; n <= i; n += 1) {
643
643
  const a = Qe(r, -n);
644
644
  s.push({ targetMonth: a, label: a.replace(/-/g, "/") });
@@ -711,9 +711,9 @@ function Kt(f, e) {
711
711
  }
712
712
  return r;
713
713
  }
714
- const lr = Object.freeze({
714
+ const cr = Object.freeze({
715
715
  date: Ze,
716
- now: Mt,
716
+ now: $t,
717
717
  today: Pt,
718
718
  number: Lt,
719
719
  pages: Bt,
@@ -1018,7 +1018,7 @@ const zt = /* @__PURE__ */ new Set([
1018
1018
  "encodeURIComponent",
1019
1019
  "decodeURI",
1020
1020
  "decodeURIComponent"
1021
- ]), cr = [
1021
+ ]), ur = [
1022
1022
  ">>>",
1023
1023
  "===",
1024
1024
  "!==",
@@ -1055,7 +1055,7 @@ const zt = /* @__PURE__ */ new Set([
1055
1055
  "!",
1056
1056
  "<",
1057
1057
  ">"
1058
- ], ur = {
1058
+ ], dr = {
1059
1059
  "==": 1,
1060
1060
  "!=": 1,
1061
1061
  "===": 1,
@@ -1072,7 +1072,7 @@ const zt = /* @__PURE__ */ new Set([
1072
1072
  "*": 5,
1073
1073
  "/": 5,
1074
1074
  "%": 5
1075
- }, dr = /* @__PURE__ */ new Set([
1075
+ }, hr = /* @__PURE__ */ new Set([
1076
1076
  "undefined",
1077
1077
  "NaN",
1078
1078
  "Infinity"
@@ -1081,7 +1081,7 @@ function et(f) {
1081
1081
  return f === `
1082
1082
  ` || f === "\r" || f === "\u2028" || f === "\u2029";
1083
1083
  }
1084
- function hr(f) {
1084
+ function fr(f) {
1085
1085
  return /[A-Za-z_$]/.test(f);
1086
1086
  }
1087
1087
  function pt(f) {
@@ -1113,7 +1113,7 @@ const X = {
1113
1113
  unaryExponent: "Unary operator used immediately before exponentiation expression",
1114
1114
  invalidUpdate: "Invalid left-hand side expression in update operation"
1115
1115
  };
1116
- class fr {
1116
+ class pr {
1117
1117
  /**
1118
1118
  * @param source 式の文字列
1119
1119
  */
@@ -1144,7 +1144,7 @@ class fr {
1144
1144
  return this.readNumber(r, t);
1145
1145
  if (i === '"' || i === "'")
1146
1146
  return this.readString(r, t);
1147
- if (hr(i)) {
1147
+ if (fr(i)) {
1148
1148
  let n = r + 1;
1149
1149
  for (; pt(e[n]); )
1150
1150
  n += 1;
@@ -1158,7 +1158,7 @@ class fr {
1158
1158
  }
1159
1159
  if (i === "/" && (s === "/" || s === "*"))
1160
1160
  throw Y(X.comment, r);
1161
- for (const n of cr)
1161
+ for (const n of ur)
1162
1162
  if (e.startsWith(n, r))
1163
1163
  return this.position = r + n.length, {
1164
1164
  type: "punct",
@@ -1409,12 +1409,12 @@ class fr {
1409
1409
  };
1410
1410
  }
1411
1411
  }
1412
- class pr {
1412
+ class gr {
1413
1413
  /**
1414
1414
  * @param source 式の文字列
1415
1415
  */
1416
1416
  constructor(e) {
1417
- this.lastEnd = 0, this.lexer = new fr(e), this.token = this.lexer.lex();
1417
+ this.lastEnd = 0, this.lexer = new pr(e), this.token = this.lexer.lex();
1418
1418
  }
1419
1419
  /**
1420
1420
  * 式全体を解析します。
@@ -1795,7 +1795,7 @@ class pr {
1795
1795
  const t = this.token.start;
1796
1796
  let r = this.parseExponent();
1797
1797
  for (; ; ) {
1798
- const i = this.token, s = i.type === "punct" ? ur[i.value] : void 0;
1798
+ const i = this.token, s = i.type === "punct" ? dr[i.value] : void 0;
1799
1799
  if (s === void 0 || s < e)
1800
1800
  return r;
1801
1801
  this.advance();
@@ -1891,7 +1891,7 @@ class pr {
1891
1891
  return !0;
1892
1892
  switch (e.type) {
1893
1893
  case "Identifier":
1894
- return !dr.has(e.name);
1894
+ return !hr.has(e.name);
1895
1895
  case "Member":
1896
1896
  case "Call":
1897
1897
  return !0;
@@ -2108,8 +2108,8 @@ class pr {
2108
2108
  throw this.unexpected();
2109
2109
  }
2110
2110
  }
2111
- function gr(f) {
2112
- return new pr(f).parseProgram();
2111
+ function mr(f) {
2112
+ return new gr(f).parseProgram();
2113
2113
  }
2114
2114
  class Xt extends ReferenceError {
2115
2115
  /**
@@ -2131,7 +2131,7 @@ function yt(f) {
2131
2131
  const e = typeof f == "symbol" ? f : String(f);
2132
2132
  return ze.has(e) ? "undefined" : e;
2133
2133
  }
2134
- function mr(f) {
2134
+ function yr(f) {
2135
2135
  return typeof f == "bigint" ? f : Number(f);
2136
2136
  }
2137
2137
  function bt(f) {
@@ -2166,7 +2166,7 @@ const ct = class ct {
2166
2166
  return t;
2167
2167
  let r;
2168
2168
  try {
2169
- const i = gr(e);
2169
+ const i = mr(e);
2170
2170
  r = {
2171
2171
  expression: e,
2172
2172
  evaluator: this.compileNode(i, null)
@@ -2394,7 +2394,7 @@ const ct = class ct {
2394
2394
  */
2395
2395
  static compileUpdate(e, t) {
2396
2396
  const r = e.argument.name, i = e.operator === "++" ? 1 : -1, s = e.prefix, n = (u) => {
2397
- const d = mr(u), y = typeof d == "bigint" ? d + BigInt(i) : d + i;
2397
+ const d = yr(u), y = typeof d == "bigint" ? d + BigInt(i) : d + i;
2398
2398
  return [d, y];
2399
2399
  }, a = this.findSlot(r, t);
2400
2400
  if (a !== null) {
@@ -4465,7 +4465,7 @@ ${u}return (${y});` + d;
4465
4465
  }
4466
4466
  };
4467
4467
  T.MAX_IDENTIFIER_RECOVERY_COUNT = 8, T.BUILTIN_NAMESPACE = "haori", T.BUILTIN_HELPERS = {
4468
- ...lr
4468
+ ...cr
4469
4469
  }, T.BUILTIN_REFERENCE_PATTERN = /(^|[^\w$.])haori(?![\w$])/, T.BUILTIN_DATA_PROPERTY = "data", T.BUILTIN_DATA_REFERENCE_PATTERN = /(^|[^\w$.])haori\s*(\.\s*data(?![\w$])|\[)/, T.IDENTIFIER_NAME_PATTERN = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200C\u200D]*$/u, T.STRICT_PARAMETER_RESERVED_WORDS = /* @__PURE__ */ new Set([
4470
4470
  ...[...Ge].filter((e) => e !== "await"),
4471
4471
  ...it,
@@ -6175,6 +6175,23 @@ const v = class v extends D {
6175
6175
  const t = this.userEditSequence > this.lastChangeSequence ? this.userEditSequence : this.markUserEdit();
6176
6176
  return this.lastChangeSequence = t, t;
6177
6177
  }
6178
+ /**
6179
+ * 初期化中に受けた `change` によるユーザー編集を、受けた時点で記録します。
6180
+ *
6181
+ * 初期化中は `change` の手続きを `release()` まで保留しますが、編集の印まで保留
6182
+ * すると、初回の取得の応答を反映する再評価が宣言バインドの評価結果で入力した値を
6183
+ * 上書きします。そこで印だけを先に付けます。
6184
+ *
6185
+ * 時点の決め方は `markUserEditOnChange()` と同じで、直前の `change` より後に打鍵が
6186
+ * あれば何もしません(打鍵の時点が記録済み)。**直前の `change` の記録は進めません。**
6187
+ * 再生した手続きの `markUserEditOnChange()` がここで付けた印を「直前の `change` より
6188
+ * 後の編集」として引き継ぎ、時点を再生の時点へ打ち直さないようにするためです。
6189
+ *
6190
+ * @returns 戻り値はありません。
6191
+ */
6192
+ markUserEditOnDeferredChange() {
6193
+ this.userEditSequence <= this.lastChangeSequence && this.markUserEdit();
6194
+ }
6178
6195
  /**
6179
6196
  * この入力欄を最後にユーザーが編集したときの通し番号を返します。
6180
6197
  *
@@ -6290,6 +6307,27 @@ const v = class v extends D {
6290
6307
  });
6291
6308
  };
6292
6309
  }
6310
+ /**
6311
+ * ラジオボタンの群の今の選択を控え、その状態へ戻す関数を返します。
6312
+ *
6313
+ * 控えるのは同名のラジオボタンです。フォームでは絞りません。`checked` 属性の
6314
+ * 書き込みで選択が変わるのは同じ群(同じフォームの同名の欄)だけで、ほかの欄は
6315
+ * 控えた状態のまま戻すことになり、結果が変わらないためです。名前で絞るのは
6316
+ * 走査する欄を減らすためです。
6317
+ *
6318
+ * @param radio 群に属するラジオボタン
6319
+ * @returns 控えた選択へ戻す関数
6320
+ */
6321
+ static captureRadioGroup(e) {
6322
+ const t = e.getRootNode(), r = Array.from(
6323
+ t.querySelectorAll('input[type="radio"]')
6324
+ ).filter((s) => s.name === e.name), i = r.map((s) => s.checked);
6325
+ return () => {
6326
+ r.forEach((s, n) => {
6327
+ s.checked = i[n];
6328
+ });
6329
+ };
6330
+ }
6293
6331
  /**
6294
6332
  * チェック状態の宣言バインドについて、利用者の操作を記録する入力欄の編集の
6295
6333
  * 通し番号を返します。
@@ -6717,13 +6755,13 @@ const v = class v extends D {
6717
6755
  return e === t ? this.removeAttribute(e) : this.removeAliasedAttribute(e, t);
6718
6756
  const o = new Xe(e, r);
6719
6757
  if (s) {
6720
- const fe = this.attributeMap.get(e);
6721
- if (fe && (fe.isEvaluate || fe.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
6722
- const Ae = J.enqueue(() => {
6758
+ const pe = this.attributeMap.get(e);
6759
+ if (pe && (pe.isEvaluate || pe.isForceEvaluation()) && !o.isEvaluate && !o.isForceEvaluation()) {
6760
+ const xe = J.enqueue(() => {
6723
6761
  }).finally(() => {
6724
6762
  this.releaseSelfWritingAttributes(n);
6725
6763
  });
6726
- return this.holdSelfWritingAttributes(n, Ae), Ae;
6764
+ return this.holdSelfWritingAttributes(n, xe), xe;
6727
6765
  }
6728
6766
  }
6729
6767
  this.attributeMap.set(e, o);
@@ -6732,49 +6770,49 @@ const v = class v extends D {
6732
6770
  element: l,
6733
6771
  rawName: e,
6734
6772
  template: r
6735
- }), 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 = be.joinEvaluateResults(d.results), w = d.results.length === 1 ? d.results[0] : A, $ = t === "value" && v.resolveDeclaredValueType(l) === "boolean", C = w === !1 && !$, se = !o.isForceEvaluation() && (t !== e ? d.hasUnresolvedReference || w === null || w === void 0 || C : b ? d.hasUnresolvedReference || w === null || w === void 0 || w === !1 : E ? d.hasUnresolvedReference || w === null || w === void 0 || C : y && A === "");
6773
+ }), 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", C = w === !1 && !M, se = !o.isForceEvaluation() && (t !== e ? d.hasUnresolvedReference || w === null || w === void 0 || C : b ? d.hasUnresolvedReference || w === null || w === void 0 || w === !1 : E ? d.hasUnresolvedReference || w === null || w === void 0 || C : y && A === "");
6736
6774
  if (se && d.hasUnresolvedReference && v.warnUnresolvedAttribute(
6737
6775
  e,
6738
6776
  t,
6739
6777
  r,
6740
6778
  l
6741
6779
  ), V.isEnabled() && w === !1 && E) {
6742
- const fe = o.getSingleExpression(), Ae = fe === null ? null : re.diagnoseStrictComparison(
6743
- fe,
6780
+ const pe = o.getSingleExpression(), xe = pe === null ? null : re.diagnoseStrictComparison(
6781
+ pe,
6744
6782
  this.getBindingData()
6745
6783
  );
6746
- Ae !== null && v.warnTypeMismatchedComparison(
6784
+ xe !== null && v.warnTypeMismatchedComparison(
6747
6785
  e,
6748
6786
  r,
6749
- Ae,
6787
+ xe,
6750
6788
  l
6751
6789
  );
6752
6790
  }
6753
- 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);
6791
+ 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 && !M ? null : String(F), j = o.isEvaluate && ae !== null && v.URL_ATTRIBUTES.has(t) && Oe.hasScriptScheme(ae);
6754
6792
  j && m.warn(
6755
6793
  "[Haori]",
6756
6794
  `Attribute "${t}" was removed because the evaluated URL uses a script scheme: ${e}="${r}" -> ${ae}`,
6757
6795
  l
6758
6796
  );
6759
- const k = j ? null : ae, B = e !== t && l.getAttribute(e) !== r, ue = k === null ? l.hasAttribute(t) : l.getAttribute(t) !== k, U = k === null ? "" : k, Q = Z && !K && l.value !== U, pe = t === "checked" && l instanceof HTMLInputElement && (l.type === "checkbox" || l.type === "radio"), ce = t === "selected" && l instanceof HTMLOptionElement, W = ee.activeElement, G = W !== null && (pe && l === W || ce && l.closest("select") === W) || (pe || ce) && this.hasPendingCheckableUserEdit(ce), ie = this.getCheckableUserEditSequence(ce), Ee = k !== null, _e = pe && o.isEvaluate && !G && l.checked !== Ee, Ve = ce && o.isEvaluate && !G && l.selected !== Ee;
6797
+ const k = j ? null : ae, B = e !== t && l.getAttribute(e) !== r, ue = k === null ? l.hasAttribute(t) : l.getAttribute(t) !== k, U = k === null ? "" : k, Q = Z && !K && l.value !== U, fe = t === "checked" && l instanceof HTMLInputElement && (l.type === "checkbox" || l.type === "radio"), ce = t === "selected" && l instanceof HTMLOptionElement, W = ee.activeElement, G = W !== null && (fe && l === W || ce && l.closest("select") === W) || (fe || ce) && this.hasPendingCheckableUserEdit(ce), ie = this.getCheckableUserEditSequence(ce), Ae = k !== null, _e = fe && o.isEvaluate && !G && l.checked !== Ae, Ve = ce && o.isEvaluate && !G && l.selected !== Ae;
6760
6798
  if (!B && !ue && !Q && !_e && !Ve)
6761
6799
  return Z && !K && (this.value = this.normalizeValueForElement(
6762
6800
  l,
6763
6801
  U
6764
- ), this.clearUnappliedValueWrite()), (pe || ce) && !G && this.syncCheckableValueFromDom(ce), Promise.resolve();
6802
+ ), this.clearUnappliedValueWrite()), (fe || ce) && !G && this.syncCheckableValueFromDom(ce), Promise.resolve();
6765
6803
  const ut = J.enqueue(() => {
6766
- const fe = this.getCheckableUserEditSequence(ce) !== ie, Ae = ce && (G || fe) ? v.captureSelection(
6804
+ const pe = this.getCheckableUserEditSequence(ce) !== ie, _t = G || pe ? ce ? v.captureSelection(
6767
6805
  // 守るべき選択があるのは所属する `<select>` があるときだけ。
6768
6806
  l.closest(
6769
6807
  "select"
6770
6808
  )
6771
- ) : null;
6772
- B && l.setAttribute(e, r), k === null ? l.removeAttribute(t) : ue && (l.setAttribute(t, k), t === `${c.prefix}bind` && this.recordSelfWrittenBind(k)), t === "style" && this.captureAndHideDisplay(), Ae?.(), Z && !K && !(v.isUserEditableValue(l) && this.isSupersededByUserEdit(ne)) && (this.value = this.normalizeValueForElement(
6809
+ ) : fe && l.type === "radio" ? v.captureRadioGroup(l) : null : null;
6810
+ B && l.setAttribute(e, r), k === null ? l.removeAttribute(t) : ue && (l.setAttribute(t, k), t === `${c.prefix}bind` && this.recordSelfWrittenBind(k)), t === "style" && this.captureAndHideDisplay(), _t?.(), Z && !K && !(v.isUserEditableValue(l) && this.isSupersededByUserEdit(ne)) && (this.value = this.normalizeValueForElement(
6773
6811
  l,
6774
6812
  U
6775
6813
  ), Q && (l.value = U), this.recordValueWriteResult(l.value === U));
6776
- const _t = _e && !fe, er = Ve && !fe;
6777
- _t && (l.checked = Ee), er && (l.selected = Ee), (_e || Ve) && this.syncCheckableValueFromDom(Ve);
6814
+ const er = _e && !pe, tr = Ve && !pe;
6815
+ er && (l.checked = Ae), tr && (l.selected = Ae), (_e || Ve) && this.syncCheckableValueFromDom(Ve);
6778
6816
  }).finally(() => {
6779
6817
  this.releaseSelfWritingAttributes(n);
6780
6818
  });
@@ -6834,7 +6872,7 @@ const v = class v extends D {
6834
6872
  value: r.results[0],
6835
6873
  hasUnresolvedReference: r.hasUnresolvedReference
6836
6874
  } : {
6837
- value: be.joinEvaluateResults(r.results),
6875
+ value: Ee.joinEvaluateResults(r.results),
6838
6876
  hasUnresolvedReference: r.hasUnresolvedReference
6839
6877
  };
6840
6878
  }
@@ -7284,7 +7322,7 @@ class de extends D {
7284
7322
  * @param target 対象テキストノード
7285
7323
  */
7286
7324
  constructor(e) {
7287
- super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new be(this.text);
7325
+ super(e), this.skipMutation = !1, this.renderedText = null, this.text = e.textContent || "", this.contents = new Ee(this.text);
7288
7326
  }
7289
7327
  /**
7290
7328
  * フラグメントをクローンします。
@@ -7329,7 +7367,7 @@ class de extends D {
7329
7367
  * @returns 更新のPromise
7330
7368
  */
7331
7369
  setContent(e) {
7332
- return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new be(e), this.evaluate());
7370
+ return this.skipMutation || this.text === e ? Promise.resolve() : (this.text = e, this.contents = new Ee(e), this.evaluate());
7333
7371
  }
7334
7372
  /**
7335
7373
  * フラグメントを評価します。
@@ -7345,7 +7383,7 @@ class de extends D {
7345
7383
  return J.enqueue(() => {
7346
7384
  this.skipMutation = !0;
7347
7385
  let t = this.text;
7348
- this.contents.isEvaluate && (t = be.joinEvaluateResults(
7386
+ this.contents.isEvaluate && (t = Ee.joinEvaluateResults(
7349
7387
  this.contents.evaluate(this.parent.getBindingData(), {
7350
7388
  kind: "text",
7351
7389
  element: this.parent.getTarget(),
@@ -7549,8 +7587,8 @@ const Je = class Je {
7549
7587
  }
7550
7588
  };
7551
7589
  Je.PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g;
7552
- let be = Je;
7553
- const _ = class _ extends be {
7590
+ let Ee = Je;
7591
+ const _ = class _ extends Ee {
7554
7592
  /**
7555
7593
  * コンストラクタ。
7556
7594
  *
@@ -7933,7 +7971,7 @@ const ke = class ke {
7933
7971
  * @returns 整形済みの現在日時文字列
7934
7972
  */
7935
7973
  static now(e, t) {
7936
- return Mt(e, t);
7974
+ return $t(e, t);
7937
7975
  }
7938
7976
  /**
7939
7977
  * 現在日付に日数を加減した日付を指定フォーマットの文字列へ整形します。
@@ -8118,13 +8156,13 @@ ke.handlers = {
8118
8156
  return le.has(e);
8119
8157
  }
8120
8158
  };
8121
- let xe = ke;
8122
- const yr = "入力内容を確認してください", br = ["addErrorMessage", "clearMessages"], St = "data-haori-group-name";
8159
+ let Ne = ke;
8160
+ const br = "入力内容を確認してください", Er = ["addErrorMessage", "clearMessages"], St = "data-haori-group-name";
8123
8161
  function Rt() {
8124
8162
  const e = globalThis.window?.Haori;
8125
- return br.every(
8163
+ return Er.every(
8126
8164
  (r) => typeof e?.[r] == "function"
8127
- ) ? e : xe;
8165
+ ) ? e : Ne;
8128
8166
  }
8129
8167
  const p = class p {
8130
8168
  /**
@@ -9098,7 +9136,7 @@ const p = class p {
9098
9136
  */
9099
9137
  static resolveValidityMessage(e) {
9100
9138
  const t = e.getAttribute(`${c.prefix}validity-message`);
9101
- return typeof t == "string" && t.trim() !== "" ? t : yr;
9139
+ return typeof t == "string" && t.trim() !== "" ? t : br;
9102
9140
  }
9103
9141
  /**
9104
9142
  * 条件属性の値から式を取り出します。
@@ -9363,7 +9401,7 @@ const p = class p {
9363
9401
  static createRowKeyIndexes(e, t) {
9364
9402
  const r = /* @__PURE__ */ new Map();
9365
9403
  return e.forEach((i, s) => {
9366
- const n = M.createListKey(
9404
+ const n = $.createListKey(
9367
9405
  i,
9368
9406
  t,
9369
9407
  s
@@ -9543,7 +9581,7 @@ const p = class p {
9543
9581
  const s = { ...i };
9544
9582
  for (const n of t)
9545
9583
  delete s[n];
9546
- return M.setBindingData(e.getTarget(), s, {
9584
+ return $.setBindingData(e.getTarget(), s, {
9547
9585
  kind: r?.kind ?? "supply",
9548
9586
  sequence: r?.sequence ?? R.nextSequence()
9549
9587
  });
@@ -9862,8 +9900,8 @@ const p = class p {
9862
9900
  // 解釈する(後続の分岐)。位置で配ると選択状態を決められないため、
9863
9901
  // `data-form-list` を併記していても従来どおりそちらへ渡す。
9864
9902
  !p.isGroupedCheckable(e) && !p.isMultipleSelect(e)) {
9865
- const $ = String(l), C = n.get($) ?? 0;
9866
- n.set($, C + 1), o.push(
9903
+ const M = String(l), C = n.get(M) ?? 0;
9904
+ n.set(M, C + 1), o.push(
9867
9905
  p.applyFragmentValue(
9868
9906
  e,
9869
9907
  w[C] ?? null,
@@ -9896,13 +9934,13 @@ const p = class p {
9896
9934
  )
9897
9935
  );
9898
9936
  } else if (d) {
9899
- const b = t[String(d)], E = Array.isArray(b) ? b : [], A = e.getChildElementFragments(), w = e.getAttribute(`${c.prefix}each-key`), $ = p.isCollectedListFromEachSource(e) ? p.pairRowsWithItems(
9937
+ const b = t[String(d)], E = Array.isArray(b) ? b : [], A = e.getChildElementFragments(), w = e.getAttribute(`${c.prefix}each-key`), M = p.isCollectedListFromEachSource(e) ? p.pairRowsWithItems(
9900
9938
  A,
9901
9939
  E,
9902
9940
  w == null ? null : String(w)
9903
9941
  ) : null;
9904
9942
  for (let C = 0; C < A.length; C++) {
9905
- const se = A[C], F = $ ? $[C] : E.length > C ? E[C] : null;
9943
+ const se = A[C], F = M ? M[C] : E.length > C ? E[C] : null;
9906
9944
  o.push(
9907
9945
  // 行ごとに values が切り替わるので出現位置も行単位で数える。
9908
9946
  p.setPartValues(
@@ -9951,7 +9989,7 @@ const p = class p {
9951
9989
  const r = p.collectBindingTargetForms(e);
9952
9990
  if (r.length > 0 && r.every((s) => s.isSupplyStale(t)))
9953
9991
  return;
9954
- p.markResetSubtree(e, t), M.clearUserEditMarks(e, t), p.clearValues(e), await Promise.all([
9992
+ p.markResetSubtree(e, t), $.clearUserEditMarks(e, t), p.clearValues(e), await Promise.all([
9955
9993
  p.clearMessages(e),
9956
9994
  p.clearEachClones(e)
9957
9995
  ]), await J.enqueue(() => {
@@ -9965,16 +10003,16 @@ const p = class p {
9965
10003
  } finally {
9966
10004
  p.internalResetDepth -= 1;
9967
10005
  }
9968
- p.clearDeclarativeStateFromDom(e), M.invalidateDerivedSubtreeSignatures(e), p.restoreEdits(s);
10006
+ p.clearDeclarativeStateFromDom(e), $.invalidateDerivedSubtreeSignatures(e), p.restoreEdits(s);
9969
10007
  });
9970
10008
  const i = r;
9971
10009
  for (const s of i) {
9972
10010
  const n = p.getInitialBindingData(s);
9973
- n === null && s.getRawBindingData() === null || await M.setBindingData(s.getTarget(), n ?? {}, {
10011
+ n === null && s.getRawBindingData() === null || await $.setBindingData(s.getTarget(), n ?? {}, {
9974
10012
  sequence: t
9975
10013
  });
9976
10014
  }
9977
- p.syncValuesFromDom(e), await M.evaluateAll(e);
10015
+ p.syncValuesFromDom(e), await $.evaluateAll(e);
9978
10016
  for (const s of i)
9979
10017
  p.getInitialBindingData(s) !== null || s.getRawBindingData() !== null || await p.restoreAncestorArgValues(s, {
9980
10018
  sequence: t,
@@ -9994,7 +10032,7 @@ const p = class p {
9994
10032
  ));
9995
10033
  } else
9996
10034
  l = p.mergeCollectedValues(l, a), p.deleteAncestorOwnedKeys(s, n, l);
9997
- await M.setBindingData(s.getTarget(), l, {
10035
+ await $.setBindingData(s.getTarget(), l, {
9998
10036
  sequence: t
9999
10037
  });
10000
10038
  }
@@ -10022,7 +10060,7 @@ const p = class p {
10022
10060
  */
10023
10061
  static getInitialBindingData(e) {
10024
10062
  const t = e.getInitialBindAttribute();
10025
- return t === null ? null : M.parseDataBind(t);
10063
+ return t === null ? null : $.parseDataBind(t);
10026
10064
  }
10027
10065
  /**
10028
10066
  * フラグメント配下の入力要素について、内部値を現在の DOM 値と再同期します。
@@ -10304,7 +10342,7 @@ p.INITIAL_RESTORED_FORMS = /* @__PURE__ */ new WeakSet(), p.LAST_ANCESTOR_ARG_VA
10304
10342
  "constructor",
10305
10343
  "prototype"
10306
10344
  ]), p.COLLECTED_ROW_IDENTITY = /* @__PURE__ */ new WeakMap(), p.COMPLETE_SET_VALUES = /* @__PURE__ */ new WeakSet(), p.COLLECTED_EXCLUDED_KEYS = /* @__PURE__ */ new WeakMap(), p.warnedPositionalRowFallbacks = /* @__PURE__ */ new Set(), p.warnedDerivedRowsWithoutKey = /* @__PURE__ */ new Set(), p.LEADING_PATH_PATTERN = /^\s*([A-Za-z_$][\w$]*(?:\s*\.\s*[A-Za-z_$][\w$]*)*)\s*([\s\S]*)$/;
10307
- let x = p;
10345
+ let N = p;
10308
10346
  class O {
10309
10347
  /**
10310
10348
  * カスタムイベントを発火します。
@@ -10544,11 +10582,11 @@ class O {
10544
10582
  O.dispatch(e, "pollstop", { reason: t, count: r, elapsedMs: i });
10545
10583
  }
10546
10584
  }
10547
- const Er = {
10585
+ const Ar = {
10548
10586
  401: "unauthorized-redirect",
10549
10587
  403: "forbidden-redirect"
10550
10588
  };
10551
- function Ar(f, e) {
10589
+ function vr(f, e) {
10552
10590
  return f.replace(/\{\{([\s\S]+?)\}\}/g, (t, r) => {
10553
10591
  try {
10554
10592
  const i = re.evaluate(String(r).trim(), e);
@@ -10564,10 +10602,10 @@ function Tt(f, e) {
10564
10602
  return null;
10565
10603
  if (!t.includes("{{"))
10566
10604
  return t;
10567
- const r = D.get(f), i = r instanceof R ? r.getBindingData() : {}, s = Ar(t, i);
10605
+ const r = D.get(f), i = r instanceof R ? r.getBindingData() : {}, s = vr(t, i);
10568
10606
  return s === "" ? null : s;
10569
10607
  }
10570
- function vr(f, e, t) {
10608
+ function wr(f, e, t) {
10571
10609
  const r = f.getAttribute(`${e}-return-param`);
10572
10610
  if (r === null || r === "")
10573
10611
  return t;
@@ -10581,7 +10619,7 @@ function vr(f, e, t) {
10581
10619
  return `${l}${u}${n}${o}`;
10582
10620
  }
10583
10621
  function kt(f, e, t) {
10584
- const r = vr(f, e, t);
10622
+ const r = wr(f, e, t);
10585
10623
  if (!Oe.isNavigableUrl(r))
10586
10624
  return m.error(
10587
10625
  "Haori",
@@ -10595,7 +10633,7 @@ function kt(f, e, t) {
10595
10633
  return window.location.href = r, !0;
10596
10634
  }
10597
10635
  function Jt(f, e = null) {
10598
- const t = Er[f];
10636
+ const t = Ar[f];
10599
10637
  if (t === void 0 || typeof document > "u")
10600
10638
  return !1;
10601
10639
  if (e !== null) {
@@ -10710,7 +10748,7 @@ class z {
10710
10748
  }
10711
10749
  }
10712
10750
  }
10713
- const N = class N {
10751
+ const x = class x {
10714
10752
  /**
10715
10753
  * ストレージ種別に対応する `Storage` を解決します。
10716
10754
  *
@@ -10728,7 +10766,7 @@ const N = class N {
10728
10766
  throw new Error("storage is not available");
10729
10767
  return t;
10730
10768
  } catch (t) {
10731
- return N.WARNED_KINDS.has(e) || (N.WARNED_KINDS.add(e), m.warn(
10769
+ return x.WARNED_KINDS.has(e) || (x.WARNED_KINDS.add(e), m.warn(
10732
10770
  "Haori",
10733
10771
  `${e}Storage が利用できないため ${c.prefix}store を無効にします:`,
10734
10772
  t
@@ -10765,8 +10803,8 @@ const N = class N {
10765
10803
  * @param message 警告メッセージ
10766
10804
  */
10767
10805
  static warnOnce(e, t, r) {
10768
- let i = N.WARNED_ELEMENTS.get(e);
10769
- i || (i = /* @__PURE__ */ new Set(), N.WARNED_ELEMENTS.set(e, i)), !i.has(t) && (i.add(t), m.warn("Haori", r));
10806
+ let i = x.WARNED_ELEMENTS.get(e);
10807
+ i || (i = /* @__PURE__ */ new Set(), x.WARNED_ELEMENTS.set(e, i)), !i.has(t) && (i.add(t), m.warn("Haori", r));
10770
10808
  }
10771
10809
  /**
10772
10810
  * `data-each` の行の内側かどうかを判定します。
@@ -10803,13 +10841,13 @@ const N = class N {
10803
10841
  return null;
10804
10842
  const i = r.trim();
10805
10843
  if (i === "")
10806
- return N.warnOnce(
10844
+ return x.warnOnce(
10807
10845
  t,
10808
10846
  "key",
10809
10847
  `${c.prefix}store にストレージキーが指定されていません。`
10810
10848
  ), null;
10811
10849
  if (i.includes("{{"))
10812
- return N.warnOnce(
10850
+ return x.warnOnce(
10813
10851
  t,
10814
10852
  "expression",
10815
10853
  `${c.prefix}store に式は使用できません(静的な文字列を指定してください): ${i}`
@@ -10818,7 +10856,7 @@ const N = class N {
10818
10856
  let n = "session";
10819
10857
  if (s !== null) {
10820
10858
  const d = s.trim();
10821
- d === "local" || d === "session" ? n = d : N.warnOnce(
10859
+ d === "local" || d === "session" ? n = d : x.warnOnce(
10822
10860
  t,
10823
10861
  "type",
10824
10862
  `${c.prefix}store-type は session または local を指定してください(session として扱います): ${d}`
@@ -10827,14 +10865,14 @@ const N = class N {
10827
10865
  const a = e.getRawAttribute(`${c.prefix}store-arg`), o = a === null || a.trim() === "" ? null : a.trim(), l = e.getRawAttribute(`${c.prefix}store-params`);
10828
10866
  let u = null;
10829
10867
  if (l !== null) {
10830
- const d = l.split("&").map((b) => b.trim()).filter((b) => b !== ""), y = d.filter((b) => !N.isReservedKey(b));
10831
- y.length !== d.length && N.warnOnce(
10868
+ const d = l.split("&").map((b) => b.trim()).filter((b) => b !== ""), y = d.filter((b) => !x.isReservedKey(b));
10869
+ y.length !== d.length && x.warnOnce(
10832
10870
  t,
10833
10871
  "reserved",
10834
10872
  `${c.prefix}store-params の予約キー(先頭が _ のキー)は対象外です。`
10835
10873
  ), u = y.length > 0 ? y : null;
10836
10874
  }
10837
- return u === null && o === null ? (N.warnOnce(
10875
+ return u === null && o === null ? (x.warnOnce(
10838
10876
  t,
10839
10877
  "target",
10840
10878
  `${c.prefix}store には ${c.prefix}store-params または ${c.prefix}store-arg のいずれかが必要です。`
@@ -10851,7 +10889,7 @@ const N = class N {
10851
10889
  * @returns レコード。読み取れない場合は null
10852
10890
  */
10853
10891
  static readRecord(e) {
10854
- const t = N.resolveStorage(e.kind);
10892
+ const t = x.resolveStorage(e.kind);
10855
10893
  if (!t)
10856
10894
  return null;
10857
10895
  let r;
@@ -10876,7 +10914,7 @@ const N = class N {
10876
10914
  s
10877
10915
  ), null;
10878
10916
  }
10879
- return N.isPlainRecord(i) ? i : (m.warn(
10917
+ return x.isPlainRecord(i) ? i : (m.warn(
10880
10918
  "Haori",
10881
10919
  `保存済みデータがオブジェクトではありません: ${e.key}`
10882
10920
  ), null);
@@ -10894,7 +10932,7 @@ const N = class N {
10894
10932
  const n = t[e.arg];
10895
10933
  if (n === void 0)
10896
10934
  return {};
10897
- if (!N.isPlainRecord(n))
10935
+ if (!x.isPlainRecord(n))
10898
10936
  return m.warn(
10899
10937
  "Haori",
10900
10938
  `保存済みデータの ${e.arg} がオブジェクトではありません: ` + e.key
@@ -10903,7 +10941,7 @@ const N = class N {
10903
10941
  }
10904
10942
  const i = e.params ?? Object.keys(r), s = {};
10905
10943
  for (const n of i)
10906
- N.isReservedKey(n) || Object.prototype.hasOwnProperty.call(r, n) && (s[n] = r[n]);
10944
+ x.isReservedKey(n) || Object.prototype.hasOwnProperty.call(r, n) && (s[n] = r[n]);
10907
10945
  return s;
10908
10946
  }
10909
10947
  /**
@@ -10920,7 +10958,7 @@ const N = class N {
10920
10958
  static selectFromData(e, t) {
10921
10959
  const r = e.params ?? Object.keys(t), i = {};
10922
10960
  for (const s of r) {
10923
- if (N.isReservedKey(s) || !Object.prototype.hasOwnProperty.call(t, s))
10961
+ if (x.isReservedKey(s) || !Object.prototype.hasOwnProperty.call(t, s))
10924
10962
  continue;
10925
10963
  const n = t[s];
10926
10964
  n !== void 0 && (i[s] = n);
@@ -10979,12 +11017,12 @@ const N = class N {
10979
11017
  * @param selected 基準にする選択内容
10980
11018
  */
10981
11019
  static seedSignature(e, t) {
10982
- const r = N.stringify(t);
11020
+ const r = x.stringify(t);
10983
11021
  if (r === null) {
10984
- N.SIGNATURES.delete(e);
11022
+ x.SIGNATURES.delete(e);
10985
11023
  return;
10986
11024
  }
10987
- N.SIGNATURES.set(e, { json: r, refs: N.createRefs(t) });
11025
+ x.SIGNATURES.set(e, { json: r, refs: x.createRefs(t) });
10988
11026
  }
10989
11027
  /**
10990
11028
  * レコードへ選択内容を書き込みます。
@@ -10998,12 +11036,12 @@ const N = class N {
10998
11036
  * @returns 書き込めたら true
10999
11037
  */
11000
11038
  static writeRecord(e, t) {
11001
- const r = N.resolveStorage(e.kind);
11039
+ const r = x.resolveStorage(e.kind);
11002
11040
  if (!r)
11003
11041
  return !1;
11004
- const i = N.readRecord(e) ?? {};
11042
+ const i = x.readRecord(e) ?? {};
11005
11043
  if (e.arg !== null) {
11006
- const s = i[e.arg], n = N.isPlainRecord(s) ? { ...s } : {};
11044
+ const s = i[e.arg], n = x.isPlainRecord(s) ? { ...s } : {};
11007
11045
  i[e.arg] = { ...n, ...t };
11008
11046
  } else
11009
11047
  Object.assign(i, t);
@@ -11028,19 +11066,19 @@ const N = class N {
11028
11066
  * @returns 復元完了の Promise
11029
11067
  */
11030
11068
  static restore(e) {
11031
- const t = N.readDeclaration(e);
11069
+ const t = x.readDeclaration(e);
11032
11070
  if (!t)
11033
11071
  return Promise.resolve();
11034
11072
  const r = e.getTarget();
11035
- if (N.isInsideEachRow(e))
11036
- return N.warnOnce(
11073
+ if (x.isInsideEachRow(e))
11074
+ return x.warnOnce(
11037
11075
  r,
11038
11076
  "each-row",
11039
11077
  `${c.prefix}each の行の内側では ${c.prefix}store を使用できません(行データは親要素側で配列キーを指定してください)。`
11040
11078
  ), Promise.resolve();
11041
- N.RESTORED_ELEMENTS.add(r);
11042
- const i = N.readRecord(t), s = i ? N.extractFromRecord(t, i) : {}, n = { ...e.getRawBindingData() ?? {}, ...s };
11043
- return N.seedSignature(r, N.selectFromData(t, n)), Object.keys(s).length === 0 ? Promise.resolve() : M.setBindingData(r, n, {
11079
+ x.RESTORED_ELEMENTS.add(r);
11080
+ const i = x.readRecord(t), s = i ? x.extractFromRecord(t, i) : {}, n = { ...e.getRawBindingData() ?? {}, ...s };
11081
+ return x.seedSignature(r, x.selectFromData(t, n)), Object.keys(s).length === 0 ? Promise.resolve() : $.setBindingData(r, n, {
11044
11082
  reentrant: !0,
11045
11083
  kind: "nonSupply",
11046
11084
  sequence: R.nextSequence()
@@ -11057,22 +11095,22 @@ const N = class N {
11057
11095
  * @param fragment 対象フラグメント
11058
11096
  */
11059
11097
  static mirror(e) {
11060
- const t = N.readDeclaration(e);
11061
- if (!t || N.isInsideEachRow(e))
11098
+ const t = x.readDeclaration(e);
11099
+ if (!t || x.isInsideEachRow(e))
11062
11100
  return;
11063
11101
  const r = e.getTarget();
11064
- if (!N.RESTORED_ELEMENTS.has(r))
11102
+ if (!x.RESTORED_ELEMENTS.has(r))
11065
11103
  return;
11066
11104
  const i = e.getRawBindingData();
11067
11105
  if (!i)
11068
11106
  return;
11069
- const s = N.selectFromData(t, i);
11107
+ const s = x.selectFromData(t, i);
11070
11108
  if (Object.keys(s).length === 0)
11071
11109
  return;
11072
- const n = N.SIGNATURES.get(r);
11073
- if (n && N.hasSameRefs(n, s))
11110
+ const n = x.SIGNATURES.get(r);
11111
+ if (n && x.hasSameRefs(n, s))
11074
11112
  return;
11075
- const a = N.stringify(s);
11113
+ const a = x.stringify(s);
11076
11114
  if (a === null) {
11077
11115
  m.warn(
11078
11116
  "Haori",
@@ -11081,10 +11119,10 @@ const N = class N {
11081
11119
  return;
11082
11120
  }
11083
11121
  if (n && n.json === a) {
11084
- n.refs = N.createRefs(s);
11122
+ n.refs = x.createRefs(s);
11085
11123
  return;
11086
11124
  }
11087
- N.writeRecord(t, s) && N.SIGNATURES.set(r, { json: a, refs: N.createRefs(s) });
11125
+ x.writeRecord(t, s) && x.SIGNATURES.set(r, { json: a, refs: x.createRefs(s) });
11088
11126
  }
11089
11127
  /**
11090
11128
  * レコードを破棄します。
@@ -11097,7 +11135,7 @@ const N = class N {
11097
11135
  * @param kind ストレージ種別
11098
11136
  */
11099
11137
  static clear(e, t) {
11100
- const r = N.resolveStorage(t);
11138
+ const r = x.resolveStorage(t);
11101
11139
  if (r) {
11102
11140
  try {
11103
11141
  r.removeItem(e);
@@ -11105,7 +11143,7 @@ const N = class N {
11105
11143
  m.warn("Haori", `ストレージの破棄に失敗しました: ${e}`, i);
11106
11144
  return;
11107
11145
  }
11108
- N.reseedDeclaringElements(e, t);
11146
+ x.reseedDeclaringElements(e, t);
11109
11147
  }
11110
11148
  }
11111
11149
  /**
@@ -11118,25 +11156,25 @@ const N = class N {
11118
11156
  document.querySelectorAll(
11119
11157
  `[${c.prefix}store]`
11120
11158
  ).forEach((i) => {
11121
- if (!N.RESTORED_ELEMENTS.has(i))
11159
+ if (!x.RESTORED_ELEMENTS.has(i))
11122
11160
  return;
11123
11161
  const s = D.get(i);
11124
11162
  if (!(s instanceof R))
11125
11163
  return;
11126
- const n = N.readDeclaration(s);
11164
+ const n = x.readDeclaration(s);
11127
11165
  if (!n || n.key !== e || n.kind !== t)
11128
11166
  return;
11129
11167
  const a = s.getRawBindingData();
11130
- N.seedSignature(
11168
+ x.seedSignature(
11131
11169
  i,
11132
- a ? N.selectFromData(n, a) : {}
11170
+ a ? x.selectFromData(n, a) : {}
11133
11171
  );
11134
11172
  });
11135
11173
  }
11136
11174
  };
11137
- N.SIGNATURES = /* @__PURE__ */ new WeakMap(), N.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), N.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), N.WARNED_KINDS = /* @__PURE__ */ new Set();
11138
- let Be = N;
11139
- const Ne = "[Haori]", Ie = {
11175
+ x.SIGNATURES = /* @__PURE__ */ new WeakMap(), x.RESTORED_ELEMENTS = /* @__PURE__ */ new WeakSet(), x.WARNED_ELEMENTS = /* @__PURE__ */ new WeakMap(), x.WARNED_KINDS = /* @__PURE__ */ new Set();
11176
+ let Be = x;
11177
+ const Ie = "[Haori]", Fe = {
11140
11178
  bodyIgnored: (f) => `${f} is ignored because ${f}-handler is also declared.`,
11141
11179
  notRegistered: (f, e) => `Handler "${f}" is not registered (${e}-handler). Register it with Haori.handlers.register().`,
11142
11180
  argsNotArray: (f) => `${f}-args must evaluate to an array without unresolved references; the handler is not called.`,
@@ -11176,7 +11214,7 @@ class oe {
11176
11214
  */
11177
11215
  static compile(e, t, r) {
11178
11216
  const i = `${t}-handler`;
11179
- return e.hasAttribute(i) ? (V.isEnabled() && e.hasAttribute(t) && m.warn(Ne, Ie.bodyIgnored(t), e.getTarget()), oe.compileHandler(e, t)) : oe.compileExpression(e, t, r);
11217
+ 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);
11180
11218
  }
11181
11219
  /**
11182
11220
  * 登録した関数を呼ぶ呼び出しを組み立てます(`-handler` / `-args`)。
@@ -11193,8 +11231,8 @@ class oe {
11193
11231
  const n = De.get(r);
11194
11232
  if (n === void 0) {
11195
11233
  m.warn(
11196
- Ne,
11197
- Ie.notRegistered(r, t),
11234
+ Ie,
11235
+ Fe.notRegistered(r, t),
11198
11236
  e.getTarget()
11199
11237
  );
11200
11238
  return;
@@ -11206,7 +11244,7 @@ class oe {
11206
11244
  e.getBindingData()
11207
11245
  );
11208
11246
  if (!Array.isArray(o.value)) {
11209
- m.warn(Ne, Ie.argsNotArray(t), i);
11247
+ m.warn(Ie, Fe.argsNotArray(t), i);
11210
11248
  return;
11211
11249
  }
11212
11250
  a = o.value;
@@ -11228,11 +11266,11 @@ class oe {
11228
11266
  static compileExpression(e, t, r) {
11229
11267
  const i = e.getRawAttribute(t);
11230
11268
  if (i.includes("{{"))
11231
- return m.warn(Ne, Ie.templateInBody(t), e.getTarget()), null;
11269
+ return m.warn(Ie, Fe.templateInBody(t), e.getTarget()), null;
11232
11270
  try {
11233
11271
  Le.compile(i);
11234
11272
  } catch {
11235
- return m.warn(Ne, Ie.notExpression(t), e.getTarget()), null;
11273
+ return m.warn(Ie, Fe.notExpression(t), e.getTarget()), null;
11236
11274
  }
11237
11275
  return (s) => {
11238
11276
  const n = e.getBindingData();
@@ -11255,10 +11293,10 @@ class oe {
11255
11293
  */
11256
11294
  static reportShadowedHandlers(e, t) {
11257
11295
  const r = Object.keys(e).filter((i) => De.has(i));
11258
- r.length > 0 && m.warn(Ne, Ie.shadowed(r, t));
11296
+ r.length > 0 && m.warn(Ie, Fe.shadowed(r, t));
11259
11297
  }
11260
11298
  }
11261
- const wr = [
11299
+ const Sr = [
11262
11300
  "addErrorMessage",
11263
11301
  "clearMessages",
11264
11302
  "closeDialog",
@@ -11266,26 +11304,26 @@ const wr = [
11266
11304
  "dialog",
11267
11305
  "openDialog",
11268
11306
  "toast"
11269
- ], Sr = "__haoriHistoryState__", tt = "data-haori-click-lock", Dt = "ファイルを保存できませんでした", Rr = 100;
11307
+ ], Rr = "__haoriHistoryState__", tt = "data-haori-click-lock", Dt = "ファイルを保存できませんでした", Tr = 100;
11270
11308
  let Pe = null;
11271
- const Tr = ["info", "warning", "error", "success"], xt = /^(\d{3})-(click|click-await|close|toast|toast-level|no-message|bind)$/;
11309
+ const kr = ["info", "warning", "error", "success"], Nt = /^(\d{3})-(click|click-await|close|toast|toast-level|no-message|bind)$/;
11272
11310
  function ge() {
11273
11311
  const e = globalThis.window?.Haori;
11274
- return wr.every(
11312
+ return Sr.every(
11275
11313
  (r) => typeof e?.[r] == "function"
11276
- ) ? e : xe;
11314
+ ) ? e : Ne;
11277
11315
  }
11278
- const kr = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
11316
+ const Dr = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
11279
11317
  function je(f) {
11280
- return kr.has(f.toUpperCase());
11318
+ return Dr.has(f.toUpperCase());
11281
11319
  }
11282
- function Dr(f, e) {
11320
+ function Nr(f, e) {
11283
11321
  for (const [t, r] of Object.entries(e))
11284
11322
  r !== void 0 && (Array.isArray(r) ? r.forEach((i) => {
11285
- f.append(t, Fe(i));
11286
- }) : f.append(t, Fe(r)));
11323
+ f.append(t, Ce(i));
11324
+ }) : f.append(t, Ce(r)));
11287
11325
  }
11288
- function Fe(f) {
11326
+ function Ce(f) {
11289
11327
  if (f == null)
11290
11328
  return "";
11291
11329
  if (typeof f == "object" || typeof f == "function")
@@ -11298,7 +11336,7 @@ function Fe(f) {
11298
11336
  }
11299
11337
  function Zt(f, e) {
11300
11338
  const t = new URL(f, window.location.href), r = new URLSearchParams(t.search);
11301
- return Dr(r, e), t.search = r.toString(), t.toString();
11339
+ return Nr(r, e), t.search = r.toString(), t.toString();
11302
11340
  }
11303
11341
  function xr(f) {
11304
11342
  if (f == null)
@@ -11317,12 +11355,12 @@ function xr(f) {
11317
11355
  return { payload: {}, dropped: !0 };
11318
11356
  }
11319
11357
  return e.includes("=") ? {
11320
- payload: Nt(new URLSearchParams(e)),
11358
+ payload: xt(new URLSearchParams(e)),
11321
11359
  dropped: !1
11322
11360
  } : { payload: {}, dropped: !0 };
11323
11361
  }
11324
11362
  if (f instanceof URLSearchParams)
11325
- return { payload: Nt(f), dropped: !1 };
11363
+ return { payload: xt(f), dropped: !1 };
11326
11364
  if (typeof FormData < "u" && f instanceof FormData) {
11327
11365
  const e = {};
11328
11366
  let t = !1;
@@ -11337,7 +11375,7 @@ function xr(f) {
11337
11375
  }
11338
11376
  return { payload: {}, dropped: !0 };
11339
11377
  }
11340
- function Nt(f) {
11378
+ function xt(f) {
11341
11379
  const e = {};
11342
11380
  for (const [t, r] of f.entries())
11343
11381
  Qt(e, t, r);
@@ -11348,7 +11386,7 @@ function Qt(f, e, t) {
11348
11386
  r === void 0 ? f[e] = t : Array.isArray(r) ? r.push(t) : f[e] = [r, t];
11349
11387
  }
11350
11388
  function we(f, e) {
11351
- if (x.isCompleteSetValue(e))
11389
+ if (N.isCompleteSetValue(e))
11352
11390
  return e;
11353
11391
  if (Array.isArray(e)) {
11354
11392
  const t = Array.isArray(f) ? f.slice() : [];
@@ -11367,11 +11405,11 @@ function we(f, e) {
11367
11405
  }
11368
11406
  return e;
11369
11407
  }
11370
- function Nr(f) {
11408
+ function Ir(f) {
11371
11409
  const e = f?.body;
11372
11410
  return e == null ? !1 : typeof e == "string" ? e !== "" : !0;
11373
11411
  }
11374
- function Ir(f, e) {
11412
+ function Fr(f, e) {
11375
11413
  const t = { ...e || {} }, r = (t.method || "GET").toUpperCase();
11376
11414
  if (c.runtime !== "demo" || je(r))
11377
11415
  return {
@@ -11401,7 +11439,7 @@ function Ir(f, e) {
11401
11439
  queryString: new URL(n, window.location.href).search || void 0
11402
11440
  };
11403
11441
  }
11404
- function Fr(f) {
11442
+ function Cr(f) {
11405
11443
  return f == null ? null : typeof f == "string" ? f : f instanceof URLSearchParams ? f.toString() : f instanceof FormData ? Array.from(f.entries()).map(([e, t]) => t instanceof File ? [
11406
11444
  e,
11407
11445
  {
@@ -11417,13 +11455,13 @@ function Ue(f) {
11417
11455
  Ue
11418
11456
  ) : !1;
11419
11457
  }
11420
- function Cr(f) {
11458
+ function Mr(f) {
11421
11459
  return Object.values(f).some((e) => e instanceof Blob ? !1 : Array.isArray(e) ? e.some(
11422
11460
  (t) => !(t instanceof Blob) && Ue(t)
11423
11461
  ) : Ue(e));
11424
11462
  }
11425
11463
  function We(f) {
11426
- return st(x.getValues(f));
11464
+ return st(N.getValues(f));
11427
11465
  }
11428
11466
  function st(f) {
11429
11467
  const e = (r) => {
@@ -11433,7 +11471,7 @@ function st(f) {
11433
11471
  return "";
11434
11472
  if (Array.isArray(r)) {
11435
11473
  const i = r.map(e);
11436
- return x.carryCollectedRowIdentity(r, i), i;
11474
+ return N.carryCollectedRowIdentity(r, i), i;
11437
11475
  }
11438
11476
  if (r !== null && typeof r == "object") {
11439
11477
  const i = {};
@@ -11441,13 +11479,13 @@ function st(f) {
11441
11479
  r
11442
11480
  ))
11443
11481
  i[s] = e(n);
11444
- return x.carryCollectedRowIdentity(r, i), i;
11482
+ return N.carryCollectedRowIdentity(r, i), i;
11445
11483
  }
11446
11484
  return r;
11447
11485
  }, t = {};
11448
11486
  for (const [r, i] of Object.entries(f))
11449
11487
  t[r] = e(i);
11450
- return x.carryCollectedRowIdentity(f, t), t;
11488
+ return N.carryCollectedRowIdentity(f, t), t;
11451
11489
  }
11452
11490
  function $r(f, e) {
11453
11491
  const t = new Headers(
@@ -11459,7 +11497,7 @@ function $r(f, e) {
11459
11497
  url: f,
11460
11498
  method: String(e.method || "GET").toUpperCase(),
11461
11499
  headers: r,
11462
- body: Fr(e.body || null)
11500
+ body: Cr(e.body || null)
11463
11501
  });
11464
11502
  }
11465
11503
  const g = class g {
@@ -11605,7 +11643,7 @@ const g = class g {
11605
11643
  );
11606
11644
  const s = g.attrName(r, "error-"), n = /* @__PURE__ */ new Map();
11607
11645
  for (const a of e.getAttributeNames()) {
11608
- const o = a.startsWith(s) ? xt.exec(a.slice(s.length)) : null;
11646
+ const o = a.startsWith(s) ? Nt.exec(a.slice(s.length)) : null;
11609
11647
  o && o[2] === "no-message" && n.set(Number(o[1]), {
11610
11648
  key: `error-${o[1]}`,
11611
11649
  clickFragments: null,
@@ -11637,7 +11675,7 @@ const g = class g {
11637
11675
  for (const a of e.getAttributeNames()) {
11638
11676
  if (!a.startsWith(i))
11639
11677
  continue;
11640
- const o = xt.exec(
11678
+ const o = Nt.exec(
11641
11679
  a.slice(i.length)
11642
11680
  );
11643
11681
  o && s.add(o[1]);
@@ -11683,7 +11721,7 @@ const g = class g {
11683
11721
  * @returns レベル。4 つの値のどれとも一致しない場合は null(`info` で表示する)
11684
11722
  */
11685
11723
  static toToastLevel(e) {
11686
- return Tr.includes(e) ? e : null;
11724
+ return kr.includes(e) ? e : null;
11687
11725
  }
11688
11726
  /**
11689
11727
  * `data-{event}-error-status` の値を、ステータスの一覧へ変換します。
@@ -11772,7 +11810,7 @@ const g = class g {
11772
11810
  const r = e.getRawAttribute(t);
11773
11811
  let i;
11774
11812
  try {
11775
- i = M.parseDataBind(r);
11813
+ i = $.parseDataBind(r);
11776
11814
  } catch (s) {
11777
11815
  return m.error("Haori", `Invalid fetch headers: ${s}`), null;
11778
11816
  }
@@ -11970,7 +12008,7 @@ const g = class g {
11970
12008
  const a = r.trim();
11971
12009
  if (g.SINGLE_PLACEHOLDER_REGEX.test(a))
11972
12010
  return {
11973
- value: M.parseDataBind(s),
12011
+ value: $.parseDataBind(s),
11974
12012
  hasUnresolvedReference: n
11975
12013
  };
11976
12014
  if (a.startsWith("{") || a.startsWith("[")) {
@@ -11979,7 +12017,7 @@ const g = class g {
11979
12017
  e.getBindingData()
11980
12018
  );
11981
12019
  return {
11982
- value: M.parseDataBind(l.value),
12020
+ value: $.parseDataBind(l.value),
11983
12021
  hasUnresolvedReference: n || l.hasUnresolvedReference
11984
12022
  };
11985
12023
  }
@@ -11988,7 +12026,7 @@ const g = class g {
11988
12026
  e.getBindingData()
11989
12027
  );
11990
12028
  return {
11991
- value: M.parseDataBind(o.value),
12029
+ value: $.parseDataBind(o.value),
11992
12030
  hasUnresolvedReference: n || o.hasUnresolvedReference
11993
12031
  };
11994
12032
  }
@@ -12005,7 +12043,7 @@ const g = class g {
12005
12043
  }, i = t ? g.attrName(t, "if") : g.attrName(null, "if", !0);
12006
12044
  if (e.hasAttribute(i)) {
12007
12045
  const k = e.getRawAttribute(i);
12008
- typeof k == "string" && k.trim() !== "" ? (r.conditionExpression = x.unwrapConditionExpression(k), r.conditionAttributeName = i) : m.warn(
12046
+ typeof k == "string" && k.trim() !== "" ? (r.conditionExpression = N.unwrapConditionExpression(k), r.conditionAttributeName = i) : m.warn(
12009
12047
  "Haori",
12010
12048
  `${i} に条件式が指定されていません。`
12011
12049
  );
@@ -12025,16 +12063,16 @@ const g = class g {
12025
12063
  U,
12026
12064
  g.attrName(t, "form")
12027
12065
  );
12028
- Q !== null ? r.formFragment = x.getFormFragment(
12066
+ Q !== null ? r.formFragment = N.getFormFragment(
12029
12067
  D.get(Q)
12030
12068
  ) : m.error(
12031
12069
  "Haori",
12032
12070
  `Form element not found: ${U} (${g.attrName(t, "form")})`
12033
12071
  );
12034
12072
  } else
12035
- r.formFragment = x.getFormFragment(e);
12073
+ r.formFragment = N.getFormFragment(e);
12036
12074
  } else if (t === "change" || t === "input") {
12037
- r.formFragment = x.getFormFragment(e);
12075
+ r.formFragment = N.getFormFragment(e);
12038
12076
  const U = `${c.prefix}${t}-`;
12039
12077
  r.implicitFormFragment = !e.getAttributeNames().some((Q) => Q.startsWith(U)), r.formFragment === null && g.isNamedInputFragment(e) && (r.selfValueFragment = e);
12040
12078
  }
@@ -12045,7 +12083,7 @@ const g = class g {
12045
12083
  "fetchUrl",
12046
12084
  "fetchOptions"
12047
12085
  ]);
12048
- U && (r.beforeCallback = (Q, pe) => U([Q, pe]));
12086
+ U && (r.beforeCallback = (Q, fe) => U([Q, fe]));
12049
12087
  } else if (e.hasAttribute(k)) {
12050
12088
  const U = e.getRawAttribute(k);
12051
12089
  try {
@@ -12080,8 +12118,8 @@ ${U}
12080
12118
  Q = new Function("event", `"use strict";
12081
12119
  ${U}
12082
12120
  `);
12083
- } catch (pe) {
12084
- m.error("Haori", `Invalid run script: ${pe}`);
12121
+ } catch (fe) {
12122
+ m.error("Haori", `Invalid run script: ${fe}`);
12085
12123
  }
12086
12124
  }
12087
12125
  Q && (r.runScript = Q);
@@ -12165,9 +12203,9 @@ ${U}
12165
12203
  );
12166
12204
  }
12167
12205
  }
12168
- const w = g.attrName(t, "bind-arg"), $ = g.attrName(null, "arg", !0), C = g.attrName(null, "bind-arg", !0);
12169
- t ? e.hasAttribute(w) && (r.bindArg = e.getRawAttribute(w)) : e.hasAttribute($) ? r.bindArg = e.getRawAttribute(
12170
- $
12206
+ const w = g.attrName(t, "bind-arg"), M = g.attrName(null, "arg", !0), C = g.attrName(null, "bind-arg", !0);
12207
+ t ? e.hasAttribute(w) && (r.bindArg = e.getRawAttribute(w)) : e.hasAttribute(M) ? r.bindArg = e.getRawAttribute(
12208
+ M
12171
12209
  ) : e.hasAttribute(C) && (r.bindArg = e.getRawAttribute(C));
12172
12210
  const se = t ? g.attrName(t, "bind-params") : g.attrName(null, "bind-params", !0);
12173
12211
  if (e.hasAttribute(se)) {
@@ -12202,8 +12240,8 @@ ${U}
12202
12240
  g.attrName(t, "adjust")
12203
12241
  );
12204
12242
  G.length > 0 ? (r.adjustFragments = [], G.forEach((ie) => {
12205
- const Ee = D.get(ie);
12206
- Ee && r.adjustFragments.push(Ee);
12243
+ const Ae = D.get(ie);
12244
+ Ae && r.adjustFragments.push(Ae);
12207
12245
  })) : m.error(
12208
12246
  "Haori",
12209
12247
  `Adjust element not found: ${W} (${g.attrName(t, "adjust")})`
@@ -12320,14 +12358,14 @@ ${W}
12320
12358
  W,
12321
12359
  g.attrName(t, "history-form")
12322
12360
  );
12323
- G !== null ? r.historyFormFragment = x.getFormFragment(
12361
+ G !== null ? r.historyFormFragment = N.getFormFragment(
12324
12362
  D.get(G)
12325
12363
  ) : m.error(
12326
12364
  "Haori",
12327
12365
  `Form element not found: ${W} (${g.attrName(t, "history-form")})`
12328
12366
  );
12329
12367
  } else
12330
- r.historyFormFragment = x.getFormFragment(e);
12368
+ r.historyFormFragment = N.getFormFragment(e);
12331
12369
  }
12332
12370
  [
12333
12371
  "reset-before",
@@ -12417,14 +12455,14 @@ ${W}
12417
12455
  k,
12418
12456
  g.attrName(null, "form", !0)
12419
12457
  );
12420
- B !== null ? r.formFragment = x.getFormFragment(
12458
+ B !== null ? r.formFragment = N.getFormFragment(
12421
12459
  D.get(B)
12422
12460
  ) : m.error(
12423
12461
  "Haori",
12424
12462
  `Form element not found: ${k} (${g.attrName(null, "fetch-form", !0)})`
12425
12463
  );
12426
12464
  } else
12427
- r.formFragment = x.getFormFragment(e);
12465
+ r.formFragment = N.getFormFragment(e);
12428
12466
  }
12429
12467
  (!t || t === "poll") && g.readNoMessageDeclarations(e, r, t ?? "fetch");
12430
12468
  const ae = t ? g.attrName(t, "fetch-state") : g.attrName(null, "state", !0);
@@ -12625,8 +12663,8 @@ ${W}
12625
12663
  return this.skipped = !0, !1;
12626
12664
  if (this.options.formFragment && this.validate(this.options.formFragment) === !1)
12627
12665
  return await this.commitEditOnStop(), !1;
12628
- if (!this.options.formFragment && this.options.targetFragment && x.warnUnvalidatedCustomValidity(
12629
- x.getFormFragment(this.options.targetFragment),
12666
+ if (!this.options.formFragment && this.options.targetFragment && N.warnUnvalidatedCustomValidity(
12667
+ N.getFormFragment(this.options.targetFragment),
12630
12668
  `${c.prefix}${this.eventType ?? "fetch"}-form が解決できません`
12631
12669
  ), !this.evaluateExecutionCondition())
12632
12670
  return this.skipped = !0, await this.commitEditOnStop(), !1;
@@ -12654,7 +12692,7 @@ ${W}
12654
12692
  return !1;
12655
12693
  this.options.resetBeforeFragments && this.options.resetBeforeFragments.length > 0 && (await Promise.all(
12656
12694
  this.options.resetBeforeFragments.map(
12657
- (A) => x.reset(A, this.operationSequence)
12695
+ (A) => N.reset(A, this.operationSequence)
12658
12696
  )
12659
12697
  ), this.captureHistorySnapshots());
12660
12698
  const s = this.prepareFetchRequest();
@@ -12681,8 +12719,8 @@ ${W}
12681
12719
  n,
12682
12720
  e
12683
12721
  );
12684
- const A = (l?.method || "GET").toUpperCase(), $ = !u && d && s.transportMode === "query-get" && Nr(l) && !je(A) ? s.baseUrl ?? o : o, C = Ir(
12685
- $,
12722
+ const A = (l?.method || "GET").toUpperCase(), M = !u && d && s.transportMode === "query-get" && Ir(l) && !je(A) ? s.baseUrl ?? o : o, C = Fr(
12723
+ M,
12686
12724
  l
12687
12725
  );
12688
12726
  o = C.url;
@@ -12789,22 +12827,22 @@ ${W}
12789
12827
  let l;
12790
12828
  if (o) {
12791
12829
  l = { ...n ?? {} };
12792
- const u = String(o), d = x.resolveAncestorArgOwner(e, u);
12793
- l[u] = x.mergeCollectedValues(
12830
+ const u = String(o), d = N.resolveAncestorArgOwner(e, u);
12831
+ l[u] = N.mergeCollectedValues(
12794
12832
  (d ? d.value : l[u]) ?? null,
12795
12833
  a
12796
12834
  );
12797
12835
  } else
12798
- l = x.mergeCollectedValues(
12836
+ l = N.mergeCollectedValues(
12799
12837
  n,
12800
12838
  a,
12801
- x.ancestorBaseResolver(e)
12839
+ N.ancestorBaseResolver(e)
12802
12840
  );
12803
- await M.setBindingData(i, l, {
12841
+ await $.setBindingData(i, l, {
12804
12842
  skipFragments: s,
12805
12843
  kind: "nonSupply",
12806
12844
  sequence: this.operationSequence,
12807
- editedPaths: x.collectEditedPaths(
12845
+ editedPaths: N.collectEditedPaths(
12808
12846
  e,
12809
12847
  this.operationSequence,
12810
12848
  o ? String(o) : "",
@@ -12875,7 +12913,7 @@ ${W}
12875
12913
  t.removeAttribute("disabled");
12876
12914
  return;
12877
12915
  }
12878
- M.setAttribute(t, r.name, r.value).catch(
12916
+ $.setAttribute(t, r.name, r.value).catch(
12879
12917
  (i) => {
12880
12918
  m.error(
12881
12919
  "Haori",
@@ -12969,7 +13007,7 @@ ${W}
12969
13007
  break;
12970
13008
  await t(n), this.downloadReceivedBytes += n.byteLength, this.dropTotalBytesIfExceeded();
12971
13009
  const a = Date.now();
12972
- a - r >= Rr && (r = a, await this.injectFetchState("loading"));
13010
+ a - r >= Tr && (r = a, await this.injectFetchState("loading"));
12973
13011
  }
12974
13012
  } catch (s) {
12975
13013
  return m.error("Haori", `応答をファイルとして読み取れませんでした: ${s}`), !1;
@@ -13231,8 +13269,8 @@ ${W}
13231
13269
  A ? e.clone() : e,
13232
13270
  E?.noMessage !== !0 && !A
13233
13271
  );
13234
- return A && await this.bindResult(e).catch(($) => {
13235
- m.error("Haori", "Failed to bind the error response:", $);
13272
+ return A && await this.bindResult(e).catch((M) => {
13273
+ m.error("Haori", "Failed to bind the error response:", M);
13236
13274
  }), await this.injectFetchState(
13237
13275
  "error",
13238
13276
  e.status,
@@ -13270,7 +13308,7 @@ ${W}
13270
13308
  const s = [];
13271
13309
  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(
13272
13310
  this.options.resetFragments.map(
13273
- (E) => x.reset(E, this.operationSequence)
13311
+ (E) => N.reset(E, this.operationSequence)
13274
13312
  )
13275
13313
  ), await this.copy();
13276
13314
  const n = [];
@@ -13334,12 +13372,12 @@ ${W}
13334
13372
  this.options.redirectReturnParam
13335
13373
  );
13336
13374
  if (A) {
13337
- const $ = new URLSearchParams(window.location.search).get(A);
13338
- if ($ !== null) {
13339
- const C = $.trim();
13375
+ const M = new URLSearchParams(window.location.search).get(A);
13376
+ if (M !== null) {
13377
+ const C = M.trim();
13340
13378
  Oe.isSafeLocalPath(C) ? E = C : m.warn(
13341
13379
  "Haori",
13342
- `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${$}`
13380
+ `戻り先パスが安全なローカルパスではないため、既定の遷移先へフォールバックします: ${M}`
13343
13381
  );
13344
13382
  }
13345
13383
  }
@@ -13376,7 +13414,7 @@ ${W}
13376
13414
  if (!e || e.length === 0)
13377
13415
  return !1;
13378
13416
  for (const i of e) {
13379
- await M.evaluateAll(i);
13417
+ await $.evaluateAll(i);
13380
13418
  const s = i.getTarget();
13381
13419
  if (t && g.takeClickOutcome(s), typeof s.click == "function" ? s.click() : s.dispatchEvent(
13382
13420
  new MouseEvent("click", { bubbles: !0, cancelable: !0 })
@@ -13510,10 +13548,10 @@ ${W}
13510
13548
  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)));
13511
13549
  };
13512
13550
  s && l(r), n && l(i), history.pushState(
13513
- { [Sr]: !0 },
13551
+ { [Rr]: !0 },
13514
13552
  "",
13515
13553
  o.toString()
13516
- ), M.refreshUrlParams();
13554
+ ), $.refreshUrlParams();
13517
13555
  } catch (a) {
13518
13556
  m.error("Haori", `history.pushState failed: ${a}`);
13519
13557
  }
@@ -13527,7 +13565,7 @@ ${W}
13527
13565
  * @returns 失敗の表示先の要素
13528
13566
  */
13529
13567
  resolveMessageScope() {
13530
- const e = this.options.formFragment ?? (this.options.targetFragment ? x.getFormFragment(this.options.targetFragment) || this.options.targetFragment : null);
13568
+ const e = this.options.formFragment ?? (this.options.targetFragment ? N.getFormFragment(this.options.targetFragment) || this.options.targetFragment : null);
13531
13569
  return e ? e.getTarget() : document.body;
13532
13570
  }
13533
13571
  /**
@@ -13542,7 +13580,7 @@ ${W}
13542
13580
  */
13543
13581
  async handleFetchError(e, t) {
13544
13582
  let r = null;
13545
- this.options.formFragment ? r = this.options.formFragment : this.options.targetFragment && (r = x.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
13583
+ this.options.formFragment ? r = this.options.formFragment : this.options.targetFragment && (r = N.getFormFragment(this.options.targetFragment) || this.options.targetFragment);
13546
13584
  const i = r ? r.getTarget() : document.body;
13547
13585
  await ge().clearMessages(i);
13548
13586
  const s = async (u) => {
@@ -13559,7 +13597,7 @@ ${W}
13559
13597
  if (t) {
13560
13598
  u.length === 0 && await s(`${e.status} ${e.statusText}`);
13561
13599
  for (const d of u)
13562
- d.key && r ? await x.addErrorMessage(r, d.key, d.message) : await s(d.message);
13600
+ d.key && r ? await N.addErrorMessage(r, d.key, d.message) : await s(d.message);
13563
13601
  n();
13564
13602
  }
13565
13603
  return u.length === 0 ? null : u.map((d) => d.message).join(`
@@ -13572,12 +13610,12 @@ ${W}
13572
13610
  const y = /* @__PURE__ */ new Map(), b = [];
13573
13611
  for (const E of u)
13574
13612
  if (E && typeof E == "object" && !Array.isArray(E)) {
13575
- const A = E.key, w = E.message, $ = typeof A == "string" && A.length > 0 ? A : null, C = typeof w == "string" ? w : w != null ? String(w) : "";
13613
+ const A = E.key, w = E.message, M = typeof A == "string" && A.length > 0 ? A : null, C = typeof w == "string" ? w : w != null ? String(w) : "";
13576
13614
  if (C.length === 0)
13577
13615
  continue;
13578
- if ($ !== null) {
13579
- const se = y.get($) ?? [];
13580
- se.push(C), y.set($, se);
13616
+ if (M !== null) {
13617
+ const se = y.get(M) ?? [];
13618
+ se.push(C), y.set(M, se);
13581
13619
  } else
13582
13620
  b.push(C);
13583
13621
  } else typeof E == "string" && E.length > 0 && b.push(E);
@@ -13618,11 +13656,11 @@ ${W}
13618
13656
  */
13619
13657
  validate(e) {
13620
13658
  if (this.options.valid !== !0)
13621
- return this.options.implicitFormFragment || x.warnUnvalidatedCustomValidity(
13659
+ return this.options.implicitFormFragment || N.warnUnvalidatedCustomValidity(
13622
13660
  e,
13623
13661
  `${c.prefix}${this.eventType ?? "fetch"}-validate の指定がありません`
13624
13662
  ), !0;
13625
- x.applyCustomValidity(e);
13663
+ N.applyCustomValidity(e);
13626
13664
  const t = this.findFirstInvalid(e);
13627
13665
  if (t === null)
13628
13666
  return !0;
@@ -13713,7 +13751,7 @@ ${W}
13713
13751
  const r = this.options.targetFragment;
13714
13752
  if (!r)
13715
13753
  return !0;
13716
- const i = this.options.conditionAttributeName ?? `${c.prefix}if`, s = x.buildConditionScope(
13754
+ const i = this.options.conditionAttributeName ?? `${c.prefix}if`, s = N.buildConditionScope(
13717
13755
  r,
13718
13756
  this.options.formFragment ?? null
13719
13757
  ), n = re.evaluateDetailed(t, s);
@@ -13813,11 +13851,11 @@ ${W}
13813
13851
  apply: (b) => {
13814
13852
  const E = this.resolveCurrentRowItem(o, b), A = { ...E };
13815
13853
  if (i && typeof i == "object" && !Array.isArray(i)) {
13816
- const w = E[y], $ = w !== null && typeof w == "object" && !Array.isArray(w) ? w : {};
13854
+ const w = E[y], M = w !== null && typeof w == "object" && !Array.isArray(w) ? w : {};
13817
13855
  A[y] = this.mergeAppendBindingData(
13818
13856
  o,
13819
13857
  i,
13820
- $
13858
+ M
13821
13859
  );
13822
13860
  } else
13823
13861
  A[y] = i;
@@ -13837,7 +13875,7 @@ ${W}
13837
13875
  } else
13838
13876
  u[d] = i;
13839
13877
  s.push(
13840
- M.setBindingData(
13878
+ $.setBindingData(
13841
13879
  o.getTarget(),
13842
13880
  this.reconcileUserEditsForBind(o, u, [d]),
13843
13881
  {
@@ -13895,7 +13933,7 @@ ${W}
13895
13933
  i
13896
13934
  ), d = this.options.bindMerge ? { ...o.getRawBindingData() ?? {}, ...u } : u;
13897
13935
  s.push(
13898
- M.setBindingData(
13936
+ $.setBindingData(
13899
13937
  o.getTarget(),
13900
13938
  this.reconcileUserEditsForBind(
13901
13939
  o,
@@ -13927,7 +13965,9 @@ ${W}
13927
13965
  * 1. **送信より前の編集の印を解除する**。バインドは明示的な値の供給なので、
13928
13966
  * リクエストを組み立てた時点までの編集は応答(またはバインド指定)に権威を
13929
13967
  * 譲ります。解除しないと、宣言バインドの再適用が抑止されたままになり
13930
- * 「再取得したのに古い入力が残る」状態になります。
13968
+ * 「再取得したのに古い入力が残る」状態になります。譲るのは応答で値が決まる欄
13969
+ * (宣言バインドが応答のキーを参照する欄)だけです
13970
+ * (`Core.clearUserEditMarksSuppliedBy()`)。
13931
13971
  * ただしフェッチを伴わない `change` / `input` のバインドは例外で、解除しません
13932
13972
  * (`twoWayCommitBind`)。供給されるデータが入力欄から収集した編集値そのもの
13933
13973
  * であり、権威を譲る相手がいないためです。解除すると、参照キーと書込キーが
@@ -13957,14 +13997,14 @@ ${W}
13957
13997
  if (i === null)
13958
13998
  return t;
13959
13999
  const s = this.eventType === "poll";
13960
- if (!s && !this.twoWayCommitBind && M.clearUserEditMarks(e, i), !(e.getTarget() instanceof HTMLFormElement))
14000
+ if (!s && !this.twoWayCommitBind && $.clearUserEditMarksSuppliedBy(e, r, i), !(e.getTarget() instanceof HTMLFormElement))
13961
14001
  return this.reconcileAncestorArgFormEdits(
13962
14002
  e,
13963
14003
  t,
13964
14004
  r,
13965
14005
  s ? 0 : i
13966
14006
  );
13967
- const n = x.getValuesEditedAfter(
14007
+ const n = N.getValuesEditedAfter(
13968
14008
  e,
13969
14009
  s ? 0 : i
13970
14010
  );
@@ -13997,8 +14037,8 @@ ${W}
13997
14037
  if (r === null)
13998
14038
  return t;
13999
14039
  const i = this.eventType === "poll";
14000
- !i && !this.twoWayCommitBind && M.clearUserEditMarks(e, r);
14001
- const s = x.getValuesEditedAfter(
14040
+ !i && !this.twoWayCommitBind && $.clearUserEditMarks(e, r);
14041
+ const s = N.getValuesEditedAfter(
14002
14042
  e,
14003
14043
  i ? 0 : r
14004
14044
  );
@@ -14021,10 +14061,10 @@ ${W}
14021
14061
  */
14022
14062
  reconcileAncestorArgFormEdits(e, t, r, i) {
14023
14063
  let s = t;
14024
- for (const { form: n, key: a } of x.collectArgForms(e)) {
14064
+ for (const { form: n, key: a } of N.collectArgForms(e)) {
14025
14065
  if (!r.includes(a))
14026
14066
  continue;
14027
- const o = x.getValuesEditedAfter(n, i);
14067
+ const o = N.getValuesEditedAfter(n, i);
14028
14068
  if (Object.keys(o).length === 0)
14029
14069
  continue;
14030
14070
  const l = s[a], u = l && typeof l == "object" && !Array.isArray(l) ? l : {};
@@ -14071,7 +14111,7 @@ ${W}
14071
14111
  ...t
14072
14112
  };
14073
14113
  s.push(
14074
- M.setBindingData(n.getTarget(), o, {
14114
+ $.setBindingData(n.getTarget(), o, {
14075
14115
  // 通番はコピーを起こした操作のもの(フェッチ応答の反映と同じ理由)。
14076
14116
  sequence: this.operationSequence
14077
14117
  })
@@ -14104,7 +14144,7 @@ ${W}
14104
14144
  * @returns 行の入力欄の状態を反映した要素データ
14105
14145
  */
14106
14146
  resolveCurrentRowItem(e, t) {
14107
- const r = x.getValuesEditedAfter(e, 0);
14147
+ const r = N.getValuesEditedAfter(e, 0);
14108
14148
  return Object.keys(r).length === 0 ? t : we(t, r);
14109
14149
  }
14110
14150
  /**
@@ -14133,9 +14173,9 @@ ${W}
14133
14173
  * @returns コピー元のデータ
14134
14174
  */
14135
14175
  resolveCopySourceData() {
14136
- return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? We(this.options.copySourceFragment) : M.withoutReservedBindingKeys(
14176
+ return this.options.copySourceFragment ? this.options.copySourceFragment.getTarget().tagName === "FORM" ? We(this.options.copySourceFragment) : $.withoutReservedBindingKeys(
14137
14177
  this.options.copySourceFragment.getRawBindingData() ?? {}
14138
- ) : this.options.formFragment ? We(this.options.formFragment) : this.options.targetFragment ? M.withoutReservedBindingKeys(
14178
+ ) : this.options.formFragment ? We(this.options.formFragment) : this.options.targetFragment ? $.withoutReservedBindingKeys(
14139
14179
  this.options.targetFragment.getRawBindingData() ?? {}
14140
14180
  ) : {};
14141
14181
  }
@@ -14149,8 +14189,8 @@ ${W}
14149
14189
  let t = !1;
14150
14190
  const r = this.options.formFragment ?? this.options.selfValueFragment;
14151
14191
  if (r) {
14152
- const i = x.getValues(r);
14153
- Object.assign(e, i), x.carryCollectedRowIdentity(i, e);
14192
+ const i = N.getValues(r);
14193
+ Object.assign(e, i), N.carryCollectedRowIdentity(i, e);
14154
14194
  }
14155
14195
  if (this.options.data && typeof this.options.data == "object" && Object.assign(e, this.options.data), this.options.targetFragment && this.options.dataAttrName) {
14156
14196
  const i = g.resolveDataAttributeDetailed(
@@ -14249,7 +14289,7 @@ ${W}
14249
14289
  ), o = (n.method || "GET").toUpperCase(), l = c.runtime === "demo" && !je(o), u = l ? "GET" : o;
14250
14290
  if (n.method = u, Object.keys(i).length > 0 && Ue(i)) {
14251
14291
  const y = a.get("Content-Type") || "";
14252
- !je(o) && /multipart\/form-data/i.test(y) ? Cr(i) && m.warn(
14292
+ !je(o) && /multipart\/form-data/i.test(y) ? Mr(i) && m.warn(
14253
14293
  "Haori",
14254
14294
  `A File value nested under ${c.prefix}form-object / ${c.prefix}form-list cannot be sent. Place file inputs at the top level of the collected form values.`
14255
14295
  ) : m.warn(
@@ -14266,13 +14306,13 @@ ${W}
14266
14306
  const b = new FormData();
14267
14307
  for (const [E, A] of Object.entries(i))
14268
14308
  A == null ? b.append(E, "") : A instanceof Blob ? b.append(E, A) : Array.isArray(A) ? A.forEach((w) => {
14269
- w instanceof Blob ? b.append(E, w) : b.append(E, Fe(w));
14270
- }) : b.append(E, Fe(A));
14309
+ w instanceof Blob ? b.append(E, w) : b.append(E, Ce(w));
14310
+ }) : b.append(E, Ce(A));
14271
14311
  n.body = b;
14272
14312
  } else if (/application\/x-www-form-urlencoded/i.test(y)) {
14273
14313
  const b = new URLSearchParams();
14274
14314
  for (const [E, A] of Object.entries(i))
14275
- A !== void 0 && (Array.isArray(A) ? A.forEach((w) => b.append(E, Fe(w))) : b.append(E, Fe(A)));
14315
+ A !== void 0 && (Array.isArray(A) ? A.forEach((w) => b.append(E, Ce(w))) : b.append(E, Ce(A)));
14276
14316
  n.body = b;
14277
14317
  } else
14278
14318
  a.set("Content-Type", "application/json"), n.body = JSON.stringify(i);
@@ -14667,11 +14707,11 @@ ${W}
14667
14707
  );
14668
14708
  continue;
14669
14709
  }
14670
- a[d] = b, o = !0, u.syncWhenUnchanged === "supply" && x.clearRowUserEditMarksForChangedKeys(u.row, b);
14710
+ a[d] = b, o = !0, u.syncWhenUnchanged === "supply" && N.clearRowUserEditMarksForChangedKeys(u.row, b);
14671
14711
  }
14672
14712
  if (!o)
14673
14713
  return;
14674
- const l = M.setBindingData(
14714
+ const l = $.setBindingData(
14675
14715
  n.owner.getTarget(),
14676
14716
  g.withPathValue(n.ownerData, n.path, a),
14677
14717
  {
@@ -14687,7 +14727,7 @@ ${W}
14687
14727
  sequence: this.operationSequence
14688
14728
  }
14689
14729
  );
14690
- if (M.isEachUpdateRunning(s)) {
14730
+ if ($.isEachUpdateRunning(s)) {
14691
14731
  l.catch((u) => {
14692
14732
  m.error("Haori", "Failed to write row data.", u);
14693
14733
  });
@@ -14717,7 +14757,7 @@ ${W}
14717
14757
  * @returns 反映完了の Promise
14718
14758
  */
14719
14759
  static syncUnchangedRowValues(e, t, r) {
14720
- return r === "supply" && x.clearRowUserEditMarksForChangedKeys(e, t), x.syncRowValues(e, t);
14760
+ return r === "supply" && N.clearRowUserEditMarksForChangedKeys(e, t), N.syncRowValues(e, t);
14721
14761
  }
14722
14762
  /**
14723
14763
  * 行の要素データが同じ内容かどうかを判定します。
@@ -14783,7 +14823,7 @@ ${W}
14783
14823
  if (a && o !== null) {
14784
14824
  const l = [];
14785
14825
  r.forEach((y, b) => {
14786
- M.createListKey(
14826
+ $.createListKey(
14787
14827
  y,
14788
14828
  String(a),
14789
14829
  b
@@ -14902,14 +14942,14 @@ ${W}
14902
14942
  if (g.isSameRowItem(i.array[E], b))
14903
14943
  return;
14904
14944
  const A = y.get(
14905
- M.createListKey(
14945
+ $.createListKey(
14906
14946
  b,
14907
14947
  null,
14908
14948
  E
14909
14949
  )
14910
14950
  );
14911
- A && M.clearUserEditMarks(A);
14912
- }), M.setBindingData(
14951
+ A && $.clearUserEditMarks(A);
14952
+ }), $.setBindingData(
14913
14953
  i.owner.getTarget(),
14914
14954
  g.withPathValue(i.ownerData, i.path, d),
14915
14955
  {
@@ -14954,7 +14994,7 @@ ${W}
14954
14994
  ...a.getRawBindingData() ?? {},
14955
14995
  _fetch: n
14956
14996
  };
14957
- return M.setBindingData(o, l, {
14997
+ return $.setBindingData(o, l, {
14958
14998
  reflectToAttribute: !1,
14959
14999
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
14960
15000
  // 解除しない)。
@@ -14967,7 +15007,7 @@ ${W}
14967
15007
  };
14968
15008
  g.DATA_PLACEHOLDER_REGEX = /\{\{\{([\s\S]+?)\}\}\}|\{\{([\s\S]+?)\}\}/g, g.SINGLE_PLACEHOLDER_REGEX = /^(\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\})$/, g.RUNNING_CLICK_TARGETS = /* @__PURE__ */ new WeakSet(), g.CLICK_OUTCOMES = /* @__PURE__ */ new WeakMap(), g.validationReportGeneration = 0, g.VALIDATION_SCROLL_TIMEOUT_MS = 1e3, g.VALIDATION_SCROLL_STABLE_FRAMES = 2;
14969
15009
  let he = g;
14970
- class Mr {
15010
+ class Pr {
14971
15011
  /**
14972
15012
  * 指定URLから HTML を取得し、body 内の HTML 文字列を返します。
14973
15013
  *
@@ -15116,6 +15156,109 @@ const h = class h {
15116
15156
  r instanceof R && h.clearUserEditMarks(r, t);
15117
15157
  });
15118
15158
  }
15159
+ /**
15160
+ * 取得の応答で値が決まる入力欄から、ユーザー編集の印を解除します。
15161
+ *
15162
+ * 印が抑止するのは宣言バインド(`value` / `checked` / `selected` と `data-attr-*`)
15163
+ * の再適用だけです。`name` で流し込まれる値は、印ではなく通番で適用の可否が
15164
+ * 決まります(`ElementFragment.canApplyValue()`)。そのため、解除するのは宣言
15165
+ * バインドが応答のキーを参照する欄に限ります。応答と関係のない宣言(定数や、
15166
+ * 別のデータを参照する式)の欄の印まで解除すると、その応答の反映で入力した値が
15167
+ * 既定値へ戻ります(仕様「ユーザー編集と宣言バインドの権威」)。
15168
+ *
15169
+ * @param fragment 応答を反映するフラグメント
15170
+ * @param keys 応答が持つキー
15171
+ * @param upTo この通し番号までの編集を解除対象とする
15172
+ * @return 戻り値はありません。
15173
+ */
15174
+ static clearUserEditMarksSuppliedBy(e, t, r) {
15175
+ h.clearUserEditMarksReferencing(e, new Set(t), r);
15176
+ }
15177
+ /**
15178
+ * 指定した名前を参照する宣言バインドを持つ入力欄から、ユーザー編集の印を解除
15179
+ * します。
15180
+ *
15181
+ * `option` の `selected` は所属する `<select>` の印で守られるため、`<select>` の
15182
+ * 印を解除します(`ElementFragment.hasPendingCheckableUserEdit()` と同じ対応)。
15183
+ * `option` の `value` など、選択を決めない宣言では解除しません。選択肢を取り直した
15184
+ * だけで、`<select>` で選んだ値が既定値へ戻らないようにするためです。
15185
+ *
15186
+ * @param fragment 走査中のフラグメント
15187
+ * @param names このフラグメントから見て応答の値に解決される名前
15188
+ * @param upTo この通し番号までの編集を解除対象とする
15189
+ * @return 戻り値はありません。
15190
+ */
15191
+ static clearUserEditMarksReferencing(e, t, r) {
15192
+ const i = e.getTarget(), s = i instanceof HTMLOptionElement;
15193
+ if (h.declaresReferencing(
15194
+ e,
15195
+ s ? h.OPTION_BINDING_ATTRIBUTES : h.VALUE_BINDING_ATTRIBUTES,
15196
+ t
15197
+ )) {
15198
+ const n = s ? D.get(i.closest("select")) : e;
15199
+ n instanceof R && n.clearUserEditMark(r);
15200
+ }
15201
+ e.getChildren().forEach((n) => {
15202
+ n instanceof R && h.clearUserEditMarksReferencing(
15203
+ n,
15204
+ h.resolveNamesInChild(e, n, t),
15205
+ r
15206
+ );
15207
+ });
15208
+ }
15209
+ /**
15210
+ * 子のフラグメントから見て、応答の値に解決される名前を返します。
15211
+ *
15212
+ * 子が自身のバインドデータで同じ名前を持つと、その名前は子の値に解決されます
15213
+ * (遮蔽)。`data-each` の行は例外で、行の名前(`data-each-arg` など)は要素データ
15214
+ * に解決されるため、`data-each` の式が応答の値を参照していれば応答の値に解決
15215
+ * されるとみなします。
15216
+ *
15217
+ * @param parent 親のフラグメント
15218
+ * @param child 子のフラグメント
15219
+ * @param names 親から見て応答の値に解決される名前
15220
+ * @returns 子から見て応答の値に解決される名前
15221
+ */
15222
+ static resolveNamesInChild(e, t, r) {
15223
+ 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);
15224
+ return i.forEach((o) => {
15225
+ n ? a.add(o) : a.delete(o);
15226
+ }), a;
15227
+ }
15228
+ /**
15229
+ * 指定した属性の宣言バインド(素の属性の式と `data-attr-*`)が、指定した名前を
15230
+ * 参照するかを判定します。
15231
+ *
15232
+ * @param fragment 判定対象のフラグメント
15233
+ * @param attributes 属性の名前(接頭辞なし)
15234
+ * @param names 名前の集合
15235
+ * @returns 参照する場合 true
15236
+ */
15237
+ static declaresReferencing(e, t, r) {
15238
+ return t.some(
15239
+ (i) => [i, `${c.prefix}attr-${i}`].some((s) => {
15240
+ const n = e.getRawAttribute(s);
15241
+ return typeof n == "string" && h.referencesAny(h.extractInterpolations(n), r);
15242
+ })
15243
+ );
15244
+ }
15245
+ /**
15246
+ * 式のいずれかが、指定した名前のいずれかを参照するかを判定します。
15247
+ *
15248
+ * 参照名を取り出せない式(解析できない式や定数)は、どの名前も参照しないものと
15249
+ * して扱います。
15250
+ *
15251
+ * @param expressions 式の一覧
15252
+ * @param names 名前の集合
15253
+ * @returns 参照する場合 true
15254
+ */
15255
+ static referencesAny(e, t) {
15256
+ return e.some(
15257
+ (r) => re.getFreeIdentifiers(r).some(
15258
+ (i) => t.has(i)
15259
+ )
15260
+ );
15261
+ }
15119
15262
  /**
15120
15263
  * data-fetch の再評価状態を取得します。
15121
15264
  *
@@ -15161,7 +15304,7 @@ const h = class h {
15161
15304
  if (t.has(e) || !e.isInitialized())
15162
15305
  return Promise.resolve();
15163
15306
  const r = [];
15164
- return e.hasAttribute(`${c.prefix}validity`) && x.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) => {
15307
+ return e.hasAttribute(`${c.prefix}validity`) && N.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) => {
15165
15308
  i instanceof R && r.push(
15166
15309
  h.reevaluateReactiveSpecialAttributes(i, t)
15167
15310
  );
@@ -15215,7 +15358,7 @@ const h = class h {
15215
15358
  return Promise.resolve();
15216
15359
  r.lastUrl = s, r.running = !0;
15217
15360
  const n = performance.now();
15218
- return t.setAttribute(`${c.prefix}importing`, ""), O.importStart(t, s), Mr.load(s, void 0, {
15361
+ return t.setAttribute(`${c.prefix}importing`, ""), O.importStart(t, s), Pr.load(s, void 0, {
15219
15362
  element: t,
15220
15363
  attrPrefix: `${c.prefix}import-`
15221
15364
  }).then((a) => {
@@ -15283,7 +15426,7 @@ const h = class h {
15283
15426
  if (!r)
15284
15427
  return Promise.resolve();
15285
15428
  const i = h.initializeElementFragment(r, !1).then(
15286
- () => x.restoreInitialValues(e)
15429
+ () => N.restoreInitialValues(e)
15287
15430
  );
15288
15431
  return h.initialValueRestores.add(i), i.then(() => {
15289
15432
  h.initialValueRestores.delete(i), t && le.applySubtree(e);
@@ -15397,7 +15540,7 @@ const h = class h {
15397
15540
  e.getRawAttribute(s)
15398
15541
  ))), r.add(s));
15399
15542
  }
15400
- return t.then(() => (e.markInitialized(), x.prepareFormName(e)));
15543
+ return t.then(() => (e.markInitialized(), N.prepareFormName(e)));
15401
15544
  }
15402
15545
  /**
15403
15546
  * 子孫初期化をスキップすべきかどうかを返します。
@@ -15500,7 +15643,7 @@ const h = class h {
15500
15643
  break;
15501
15644
  case `${c.prefix}validity`:
15502
15645
  case `${c.prefix}validity-message`:
15503
- return r !== null && x.applyCustomValidity(n), Promise.all(o).then(() => {
15646
+ return r !== null && N.applyCustomValidity(n), Promise.all(o).then(() => {
15504
15647
  });
15505
15648
  case `${c.prefix}url-param`: {
15506
15649
  const y = n.getAttribute(`${c.prefix}url-arg`), b = Oe.readParams();
@@ -15573,27 +15716,27 @@ const h = class h {
15573
15716
  const A = () => {
15574
15717
  i.markBindingWorkStart();
15575
15718
  const w = i.getRawBindingData() ?? E;
15576
- let $ = a ? i.setAttribute(
15719
+ let M = a ? i.setAttribute(
15577
15720
  `${c.prefix}bind`,
15578
15721
  JSON.stringify(h.withoutReservedBindingKeys(w))
15579
15722
  ) : Promise.resolve();
15580
- return e.tagName === "FORM" && ($ = $.then(() => {
15723
+ return e.tagName === "FORM" && (M = M.then(() => {
15581
15724
  if (i.wasResetAfter(y))
15582
15725
  return;
15583
15726
  const C = i.getRawBindingData() ?? E;
15584
- return x.syncValues(
15727
+ return N.syncValues(
15585
15728
  i,
15586
- x.resolveSyncValues(i, C),
15729
+ N.resolveSyncValues(i, C),
15587
15730
  !1,
15588
15731
  u
15589
15732
  );
15590
- })), $ = $.then(
15591
- () => x.syncAncestorArgForms(i, y, u, b)
15592
- ), $ = $.then(() => h.evaluateAll(i, s)), $ = $.then(
15733
+ })), M = M.then(
15734
+ () => N.syncAncestorArgForms(i, y, u, b)
15735
+ ), M = M.then(() => h.evaluateAll(i, s)), M = M.then(
15593
15736
  () => R.retryUnappliedValueWrites(e, y)
15594
- ), $ = $.then(
15737
+ ), M = M.then(
15595
15738
  () => h.reevaluateReactiveSpecialAttributes(i, s)
15596
- ), $.then(
15739
+ ), M.then(
15597
15740
  () => i.markBindingWorkEnd(),
15598
15741
  (C) => {
15599
15742
  throw i.markBindingWorkEnd(), C;
@@ -15669,12 +15812,12 @@ const h = class h {
15669
15812
  ...Object.keys(y)
15670
15813
  ]);
15671
15814
  for (const w of A) {
15672
- const $ = s === "" ? w : `${s}.${w}`, C = h.mergePathAuthority(
15815
+ const M = s === "" ? w : `${s}.${w}`, C = h.mergePathAuthority(
15673
15816
  e,
15674
15817
  Object.prototype.hasOwnProperty.call(d, w) ? d[w] : h.ABSENT_PATH,
15675
15818
  Object.prototype.hasOwnProperty.call(y, w) ? y[w] : h.ABSENT_PATH,
15676
15819
  i,
15677
- $,
15820
+ M,
15678
15821
  n
15679
15822
  );
15680
15823
  C !== h.ABSENT_PATH && (b[w] = C), C !== (Object.prototype.hasOwnProperty.call(y, w) ? y[w] : h.ABSENT_PATH) && (E = !0);
@@ -16015,20 +16158,20 @@ const h = class h {
16015
16158
  i.push(r.setValue(t));
16016
16159
  const s = h.getFormFragment(r);
16017
16160
  if (s) {
16018
- const n = x.getValues(s), a = s.getAttribute(`${c.prefix}form-arg`), o = s.getRawBindingData();
16161
+ const n = N.getValues(s), a = s.getAttribute(`${c.prefix}form-arg`), o = s.getRawBindingData();
16019
16162
  let l;
16020
16163
  if (a) {
16021
16164
  l = { ...o ?? {} };
16022
- const u = String(a), d = x.resolveAncestorArgOwner(s, u);
16023
- l[u] = x.mergeCollectedValues(
16165
+ const u = String(a), d = N.resolveAncestorArgOwner(s, u);
16166
+ l[u] = N.mergeCollectedValues(
16024
16167
  (d ? d.value : l[u]) ?? null,
16025
16168
  n
16026
16169
  );
16027
16170
  } else
16028
- l = x.mergeCollectedValues(
16171
+ l = N.mergeCollectedValues(
16029
16172
  o,
16030
16173
  n,
16031
- x.ancestorBaseResolver(s)
16174
+ N.ancestorBaseResolver(s)
16032
16175
  );
16033
16176
  i.push(
16034
16177
  // 値の設定に伴うコミットなので、値の供給ではない更新として扱う(権威を
@@ -17114,7 +17257,7 @@ ${i}
17114
17257
  const ee = A.get(Z);
17115
17258
  ee ? ee.push(F) : A.set(Z, [F]);
17116
17259
  });
17117
- const w = e.getChildElementFragments().filter((F) => !b.has(F)), $ = w.filter(
17260
+ const w = e.getChildElementFragments().filter((F) => !b.has(F)), M = w.filter(
17118
17261
  (F) => F.hasAttribute(`${c.prefix}each-before`)
17119
17262
  ).length;
17120
17263
  let C = Promise.resolve();
@@ -17125,7 +17268,7 @@ ${i}
17125
17268
  const ae = A.get(F)?.shift();
17126
17269
  if (ae) {
17127
17270
  K = ae;
17128
- const j = $ + Z;
17271
+ const j = M + Z;
17129
17272
  C = C.then(
17130
17273
  () => h.updateRowFragment(
17131
17274
  K,
@@ -17148,7 +17291,7 @@ ${i}
17148
17291
  B !== null && O.rowMove(
17149
17292
  K.getTarget(),
17150
17293
  F,
17151
- B - $,
17294
+ B - M,
17152
17295
  Z
17153
17296
  ), !(!k && h.isRowLocalEachTemplate(e)) && se.push(
17154
17297
  h.evaluateAll(
@@ -17162,7 +17305,7 @@ ${i}
17162
17305
  );
17163
17306
  } else {
17164
17307
  K = r.clone();
17165
- const j = $ + Z;
17308
+ const j = M + Z;
17166
17309
  C = C.then(
17167
17310
  () => h.updateRowFragment(
17168
17311
  K,
@@ -17298,7 +17441,7 @@ ${i}
17298
17441
  * @returns 反映完了の Promise
17299
17442
  */
17300
17443
  static applyRowFormValues(e, t, r) {
17301
- return !e.hasAttribute(`${c.prefix}form-list`) || !x.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : x.syncRowValues(t, r);
17444
+ return !e.hasAttribute(`${c.prefix}form-list`) || !N.isCollectedListFromEachSource(e) || typeof r != "object" || r === null || Array.isArray(r) ? Promise.resolve() : N.syncRowValues(t, r);
17302
17445
  }
17303
17446
  /**
17304
17447
  * リスト比較用のキーを生成します。
@@ -17485,9 +17628,9 @@ h.ATTRIBUTE_ALIAS_SUFFIX = "attr-", h.PRIORITY_ATTRIBUTE_SUFFIXES = [
17485
17628
  "store-type",
17486
17629
  "enhance",
17487
17630
  "enhance-new"
17488
- ]), 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.ABSENT_PATH = Symbol("absent");
17489
- let M = h;
17490
- const Me = class Me {
17631
+ ]), 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");
17632
+ let $ = h;
17633
+ const be = class be {
17491
17634
  /**
17492
17635
  * コンストラクタ。
17493
17636
  *
@@ -17495,7 +17638,7 @@ const Me = class Me {
17495
17638
  */
17496
17639
  constructor(e = document) {
17497
17640
  this.customEventHandlers = /* @__PURE__ */ new Map(), this.builtinListenersAdded = !1, this.deferred = !1, this.deferredProcedures = [], this.onClick = (t) => this.delegate(t, "click"), this.onReset = (t) => {
17498
- if (t.defaultPrevented || x.isResettingInternally())
17641
+ if (t.defaultPrevented || N.isResettingInternally())
17499
17642
  return;
17500
17643
  const r = t.target;
17501
17644
  r instanceof HTMLElement && setTimeout(() => le.refreshSubtree(r), 0);
@@ -17507,8 +17650,8 @@ const Me = class Me {
17507
17650
  this.runWindowLoadProcedure();
17508
17651
  }, this.onPopstate = (t) => {
17509
17652
  const r = t.state;
17510
- if (!r || r[Me.HISTORY_STATE_KEY] !== !0) {
17511
- M.refreshUrlParams();
17653
+ if (!r || r[be.HISTORY_STATE_KEY] !== !0) {
17654
+ $.refreshUrlParams();
17512
17655
  return;
17513
17656
  }
17514
17657
  location.reload();
@@ -17615,7 +17758,7 @@ const Me = class Me {
17615
17758
  subscribeCustomEvent(e) {
17616
17759
  if (e === null || e === "")
17617
17760
  return;
17618
- if (Me.BUILTIN_EVENT_NAMES.has(e)) {
17761
+ if (be.BUILTIN_EVENT_NAMES.has(e)) {
17619
17762
  m.warn(
17620
17763
  "[Haori]",
17621
17764
  `data-on="${e}" は組み込みイベントです。data-${e}-* を使用してください(data-on はカスタムイベント専用)。`
@@ -17711,7 +17854,7 @@ const Me = class Me {
17711
17854
  }
17712
17855
  }
17713
17856
  if (r.hasAttribute(`${c.prefix}${t}-prevent`) && e.preventDefault(), this.deferred) {
17714
- this.deferredProcedures.push(() => {
17857
+ (t === "change" || t === "input") && this.markUserEditDuringInit(r, t === "change"), this.deferredProcedures.push(() => {
17715
17858
  r.isConnected && this.runProcedureFor(r, t, e);
17716
17859
  });
17717
17860
  return;
@@ -17767,12 +17910,17 @@ const Me = class Me {
17767
17910
  * 対象は値を持つ入力要素だけです。`contenteditable` など値収集の対象でない要素で
17768
17911
  * `input` が発火しても、記録すべき編集はありません。
17769
17912
  *
17913
+ * 初期化中も受けた時点で記録します(`markUserEditDuringInit()`)。フラグメントが
17914
+ * まだ無い要素だけは、初期化完了後に記録します。
17915
+ *
17770
17916
  * @param element 編集された要素
17771
17917
  * @returns 戻り値はない。
17772
17918
  */
17773
17919
  recordUserEdit(e) {
17774
17920
  if (!(!(e instanceof HTMLInputElement) && !(e instanceof HTMLSelectElement) && !(e instanceof HTMLTextAreaElement))) {
17775
17921
  if (this.deferred) {
17922
+ if (this.markUserEditDuringInit(e, !1))
17923
+ return;
17776
17924
  this.deferredProcedures.push(() => {
17777
17925
  e.isConnected && this.markUserEditOnly(e);
17778
17926
  });
@@ -17791,6 +17939,51 @@ const Me = class Me {
17791
17939
  const t = D.get(e);
17792
17940
  t instanceof R && t.markUserEdit();
17793
17941
  }
17942
+ /**
17943
+ * 初期化中に受けた `input` / `change` について、ユーザー編集の印だけを付けます。
17944
+ *
17945
+ * 初期化中は手続きの実行を `release()` まで保留しますが、編集の印は手続きでは
17946
+ * ありません。印まで保留すると、初回の取得の応答を反映する再評価が、宣言バインドの
17947
+ * 評価結果で入力した値を上書きします(仕様「初期スキャン中に発火したイベントの
17948
+ * 扱い」)。内部値の同期は、今までどおり再生した手続きで行います。
17949
+ *
17950
+ * `change` の時点の決め方は `syncUserEdit()` と同じです。打鍵が先にあればその時点を
17951
+ * 保ち(`markUserEditOnDeferredChange()`)、ラジオボタンは排他で外れた同名の欄にも
17952
+ * 印を付けます。
17953
+ *
17954
+ * 編集された要素のフラグメントがまだ無い場合は作らず、今までどおり初期化完了後に
17955
+ * 記録します。走査より先にフラグメントを作ると、その要素を既知のノードとして扱って
17956
+ * しまうためです。
17957
+ *
17958
+ * @param element 編集された要素
17959
+ * @param isChange `change` による呼び出しかどうか
17960
+ * @returns 印を付けた場合 true。フラグメントがまだ無い場合 false
17961
+ */
17962
+ markUserEditDuringInit(e, t) {
17963
+ const r = D.peek(e);
17964
+ return r instanceof R ? t ? (r.markUserEditOnDeferredChange(), be.radioGroupMembers(e).forEach(
17965
+ (i) => i.markUserEdit()
17966
+ ), !0) : (r.markUserEdit(), !0) : !1;
17967
+ }
17968
+ /**
17969
+ * ラジオボタンについて、同一フォームスコープの同名のラジオボタン(自身を除く)の
17970
+ * フラグメントを返します。ラジオボタンでなければ空です。
17971
+ *
17972
+ * @param element 対象の要素
17973
+ * @returns 同名のラジオボタンのフラグメント
17974
+ */
17975
+ static radioGroupMembers(e) {
17976
+ if (!(e instanceof HTMLInputElement) || e.type !== "radio" || !e.name)
17977
+ return [];
17978
+ const t = [];
17979
+ for (const r of Array.from(document.getElementsByName(e.name))) {
17980
+ if (r === e || !(r instanceof HTMLInputElement) || r.type !== "radio" || r.form !== e.form)
17981
+ continue;
17982
+ const i = D.get(r);
17983
+ i instanceof R && t.push(i);
17984
+ }
17985
+ return t;
17986
+ }
17794
17987
  /**
17795
17988
  * `change` / `input` の対象要素について、内部値の同期とユーザー編集の記録を行います。
17796
17989
  *
@@ -17805,15 +17998,9 @@ const Me = class Me {
17805
17998
  */
17806
17999
  syncUserEdit(e, t) {
17807
18000
  const r = D.get(e);
17808
- if (r instanceof R && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), e instanceof HTMLInputElement && e.type === "radio" && e.name)) {
17809
- const i = document.getElementsByName(e.name);
17810
- for (const s of Array.from(i)) {
17811
- if (s === e || !(s instanceof HTMLInputElement) || s.type !== "radio" || s.form !== e.form)
17812
- continue;
17813
- const n = D.get(s);
17814
- n instanceof R && (n.syncValue(), n.markUserEdit());
17815
- }
17816
- }
18001
+ r instanceof R && (r.syncValue(), t ? r.markUserEditOnChange() : r.markUserEdit(), be.radioGroupMembers(e).forEach((i) => {
18002
+ i.syncValue(), i.markUserEdit();
18003
+ }));
17817
18004
  }
17818
18005
  /**
17819
18006
  * イベントのターゲットから HTMLElement を取得します。
@@ -17858,13 +18045,13 @@ const Me = class Me {
17858
18045
  return null;
17859
18046
  }
17860
18047
  };
17861
- Me.HISTORY_STATE_KEY = "__haoriHistoryState__", Me.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
18048
+ be.HISTORY_STATE_KEY = "__haoriHistoryState__", be.BUILTIN_EVENT_NAMES = /* @__PURE__ */ new Set([
17862
18049
  "click",
17863
18050
  "change",
17864
18051
  "input",
17865
18052
  "load"
17866
18053
  ]);
17867
- let nt = Me;
18054
+ let nt = be;
17868
18055
  const q = class q {
17869
18056
  /**
17870
18057
  * ノードが現在の Window に属する HTMLElement かどうかを判定します。
@@ -18062,7 +18249,7 @@ q.CONFIG_KEYS = /* @__PURE__ */ new Set([
18062
18249
  "disabled",
18063
18250
  "once"
18064
18251
  ]), q.registrations = /* @__PURE__ */ new Map();
18065
- let Ce = q;
18252
+ let Me = q;
18066
18253
  const S = class S {
18067
18254
  /**
18068
18255
  * 指定ノードとその子孫を走査し、`data-poll-*` の監視状態を同期します。
@@ -18403,7 +18590,7 @@ const S = class S {
18403
18590
  ...i.getRawBindingData() ?? {},
18404
18591
  _poll: r
18405
18592
  };
18406
- return M.setBindingData(s, n, {
18593
+ return $.setBindingData(s, n, {
18407
18594
  reflectToAttribute: !1,
18408
18595
  // 状態変数の注入は値の供給ではない(権威を持たず、ユーザー編集の印も
18409
18596
  // 解除しない)。
@@ -18590,8 +18777,8 @@ S.CONFIG_KEYS = /* @__PURE__ */ new Set([
18590
18777
  "state"
18591
18778
  ]), S.DEFAULT_INTERVAL_MS = 5e3, S.MIN_INTERVAL_MS = 100, S.registrations = /* @__PURE__ */ new Map(), S.visibilityListener = null;
18592
18779
  let $e = S;
18593
- const Pr = "0.67.0";
18594
- function Lr(f) {
18780
+ const Lr = "0.68.0";
18781
+ function Or(f) {
18595
18782
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => f()) : Promise.resolve().then(f);
18596
18783
  }
18597
18784
  const L = class L {
@@ -18773,7 +18960,7 @@ const L = class L {
18773
18960
  * @param registration 対象の登録
18774
18961
  */
18775
18962
  static scheduleCompute(e) {
18776
- e.scheduled || (e.scheduled = !0, Lr(() => {
18963
+ e.scheduled || (e.scheduled = !0, Or(() => {
18777
18964
  e.scheduled = !1;
18778
18965
  const t = e.fragment.getTarget();
18779
18966
  L.registrations.get(t) === e && L.computeAndPublish(e);
@@ -18840,7 +19027,7 @@ const L = class L {
18840
19027
  };
18841
19028
  s[e.varName] = { ...t };
18842
19029
  const n = e.fragment.getTarget(), a = i === n ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([e.fragment]);
18843
- M.setBindingData(i, s, {
19030
+ $.setBindingData(i, s, {
18844
19031
  skipFragments: a,
18845
19032
  reflectToAttribute: !1,
18846
19033
  // 可視範囲の公開は値の供給ではない(権威を持たず、ユーザー編集の印も
@@ -18894,8 +19081,8 @@ const H = class H {
18894
19081
  H._dispatcher = e, e.startDeferred(), H._initialIntakes = [];
18895
19082
  try {
18896
19083
  const t = await Promise.allSettled([
18897
- M.scan(document.head),
18898
- M.scan(document.body)
19084
+ $.scan(document.head),
19085
+ $.scan(document.body)
18899
19086
  ]), [r, i] = t;
18900
19087
  r.status !== "fulfilled" && m.error(
18901
19088
  "[Haori]",
@@ -18905,11 +19092,11 @@ const H = class H {
18905
19092
  "[Haori]",
18906
19093
  "Failed to build body fragment:",
18907
19094
  i.reason
18908
- ), await H.waitInitialIntakes(), await J.wait(), document.body.setAttribute("data-haori-ready", ""), H.observe(document.head), H.observe(document.body), Ce.syncTree(document.body), $e.syncTree(document.body), Se.syncTree(document.body);
19095
+ ), await H.waitInitialIntakes(), await J.wait(), document.body.setAttribute("data-haori-ready", ""), H.observe(document.head), H.observe(document.body), Me.syncTree(document.body), $e.syncTree(document.body), Se.syncTree(document.body);
18909
19096
  } finally {
18910
19097
  H._initialIntakes = null, e.release();
18911
19098
  }
18912
- O.ready(Pr);
19099
+ O.ready(Lr);
18913
19100
  }
18914
19101
  /**
18915
19102
  * 稼働中の EventDispatcher を返します。
@@ -19129,31 +19316,31 @@ const H = class H {
19129
19316
  r.attributeName === "style" && R.reassertHiddenDisplay(i);
19130
19317
  break;
19131
19318
  }
19132
- if (r.attributeName && M.isAliasedAttributeReflection(i, r.attributeName))
19319
+ if (r.attributeName && $.isAliasedAttributeReflection(i, r.attributeName))
19133
19320
  break;
19134
- const s = M.setAttribute(
19321
+ const s = $.setAttribute(
19135
19322
  i,
19136
19323
  r.attributeName,
19137
19324
  i.getAttribute(r.attributeName),
19138
19325
  !0,
19139
19326
  t
19140
19327
  );
19141
- H._initialIntakes?.push(s), Ce.syncElement(i), $e.syncElement(i), Se.syncElement(i);
19328
+ H._initialIntakes?.push(s), Me.syncElement(i), $e.syncElement(i), Se.syncElement(i);
19142
19329
  break;
19143
19330
  }
19144
19331
  case "childList": {
19145
19332
  Array.from(r.removedNodes).forEach((i) => {
19146
- H.isStaleExternalRemoval(r, i) || (Ce.cleanupTree(i), $e.cleanupTree(i), Se.cleanupTree(i), M.removeNode(i));
19333
+ H.isStaleExternalRemoval(r, i) || (Me.cleanupTree(i), $e.cleanupTree(i), Se.cleanupTree(i), $.removeNode(i));
19147
19334
  }), Array.from(r.addedNodes).forEach((i) => {
19148
19335
  if (!(i.parentElement instanceof Element))
19149
19336
  return;
19150
- const s = M.addNode(i.parentElement, i);
19151
- H._initialIntakes?.push(s), Ce.syncTree(i), $e.syncTree(i), Se.syncTree(i);
19337
+ const s = $.addNode(i.parentElement, i);
19338
+ H._initialIntakes?.push(s), Me.syncTree(i), $e.syncTree(i), Se.syncTree(i);
19152
19339
  }), r.target instanceof Element && Se.syncElement(r.target);
19153
19340
  break;
19154
19341
  }
19155
19342
  case "characterData": {
19156
- r.target instanceof Text || r.target instanceof Comment ? M.changeText(r.target, r.target.textContent) : m.warn(
19343
+ r.target instanceof Text || r.target instanceof Comment ? $.changeText(r.target, r.target.textContent) : m.warn(
19157
19344
  "[Haori]",
19158
19345
  "Unsupported character data type:",
19159
19346
  r.target
@@ -19173,20 +19360,20 @@ H._initialized = !1, H._mutationObservers = [], H._dispatcher = null, H._initial
19173
19360
  let He = H;
19174
19361
  le.setMutationCapture((f) => He.captureMutations(f));
19175
19362
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", He.init) : He.init();
19176
- const Or = () => xe.waitForRenders(), Br = xe.enhancers, Ur = xe.handlers;
19363
+ const Br = () => Ne.waitForRenders(), Ur = Ne.enhancers, Hr = Ne.handlers;
19177
19364
  export {
19178
- M as Core,
19365
+ $ as Core,
19179
19366
  le as Enhance,
19180
19367
  c as Env,
19181
- x as Form,
19368
+ N as Form,
19182
19369
  D as Fragment,
19183
- xe as Haori,
19370
+ Ne as Haori,
19184
19371
  m as Log,
19185
19372
  J as Queue,
19186
- xe as default,
19187
- Br as enhancers,
19188
- Ur as handlers,
19189
- Pr as version,
19190
- Or as waitForRenders
19373
+ Ne as default,
19374
+ Ur as enhancers,
19375
+ Hr as handlers,
19376
+ Lr as version,
19377
+ Br as waitForRenders
19191
19378
  };
19192
19379
  //# sourceMappingURL=haori.es.js.map