@yungu-fed/question-editor 0.5.1 → 0.5.2

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/index.mjs CHANGED
@@ -3641,17 +3641,18 @@ function mo(e, t) {
3641
3641
  return t !== void 0 && e.key === t.key && e.x1 === t.x1 && e.x2 === t.x2 && e.y1 === t.y1 && e.y2 === t.y2;
3642
3642
  }
3643
3643
  var V = {
3644
- board: "_board_1fmpc_1",
3645
- columns: "_columns_1fmpc_9",
3646
- "player-columns": "_player-columns_1fmpc_15",
3647
- column: "_column_1fmpc_9",
3648
- "column-title": "_column-title_1fmpc_26",
3649
- item: "_item_1fmpc_32",
3650
- button: "_button_1fmpc_45",
3651
- selected: "_selected_1fmpc_70",
3652
- marker: "_marker_1fmpc_75",
3653
- lines: "_lines_1fmpc_96",
3654
- line: "_line_1fmpc_96"
3644
+ board: "_board_l8qwk_1",
3645
+ hint: "_hint_l8qwk_9",
3646
+ columns: "_columns_l8qwk_16",
3647
+ "player-columns": "_player-columns_l8qwk_22",
3648
+ column: "_column_l8qwk_16",
3649
+ "column-title": "_column-title_l8qwk_33",
3650
+ item: "_item_l8qwk_39",
3651
+ button: "_button_l8qwk_52",
3652
+ selected: "_selected_l8qwk_77",
3653
+ marker: "_marker_l8qwk_82",
3654
+ lines: "_lines_l8qwk_103",
3655
+ line: "_line_l8qwk_103"
3655
3656
  }, H = {
3656
3657
  "connect-handle": "_connect-handle_1cqr2_1",
3657
3658
  marker: "_marker_1cqr2_19",
@@ -5954,6 +5955,8 @@ var zc = {
5954
5955
  selectBlank: "Select blank",
5955
5956
  sharedAnswerPool: "Shared answer pool",
5956
5957
  standardAnswer: "Standard answer",
5958
+ lineConnectHint: "Click the left and right options to connect them. Click the connected options again to remove the connection.",
5959
+ matchingHint: "Click the left and right options to pair them. Click the paired options again to remove the pair.",
5957
5960
  standardRenderer: "Standard",
5958
5961
  subquestionContent: "Subquestion content",
5959
5962
  subquestionStructure: "Subquestion structure",
@@ -6018,6 +6021,8 @@ var zc = {
6018
6021
  selectBlank: "\u9009\u62e9\u7a7a\u4f4d",
6019
6022
  sharedAnswerPool: "\u5171\u4eab\u7b54\u6848\u6c60",
6020
6023
  standardAnswer: "\u6807\u51c6\u7b54\u6848",
6024
+ lineConnectHint: "\u70b9\u51fb\u5de6\u53f3\u9009\u9879\u8fdb\u884c\u8fde\u7ebf\uff0c\u518d\u6b21\u70b9\u51fb\u5df2\u8fde\u7ebf\u7684\u9009\u9879\u53ef\u53d6\u6d88\u3002",
6025
+ matchingHint: "\u70b9\u51fb\u5de6\u53f3\u9009\u9879\u8fdb\u884c\u914d\u5bf9\uff0c\u518d\u6b21\u70b9\u51fb\u5df2\u914d\u5bf9\u7684\u9009\u9879\u53ef\u53d6\u6d88\u3002",
6021
6026
  standardRenderer: "\u6807\u51c6",
6022
6027
  subquestionContent: "\u5b50\u9898\u5185\u5bb9",
6023
6028
  subquestionStructure: "\u5b50\u9898\u7ed3\u6784",
@@ -7066,62 +7071,69 @@ function fu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i,
7066
7071
  }
7067
7072
  return /* @__PURE__ */ o("div", {
7068
7073
  className: G.element,
7069
- children: [/* @__PURE__ */ o("div", {
7070
- className: V.board,
7071
- "data-testid": "line-connect-player-board",
7072
- ref: y,
7073
- children: [_ ? /* @__PURE__ */ a("svg", {
7074
- "aria-hidden": "true",
7075
- className: V.lines,
7076
- "data-testid": "line-connect-player-lines",
7077
- style: {
7078
- height: `${_.height}px`,
7079
- width: `${_.width}px`
7080
- },
7081
- viewBox: `0 0 ${_.width} ${_.height}`,
7082
- children: _.lines.map((t) => {
7083
- var n;
7084
- let r = C.find((e) => e.key === t.key), i = e == null || (n = e.connectionResults.find((e) => e.fromItemId === (r == null ? void 0 : r.fromItemId) && e.toItemId === (r == null ? void 0 : r.toItemId))) == null ? void 0 : n.status;
7085
- return /* @__PURE__ */ a("line", {
7086
- className: U(V.line, Xc.line, Qc(i)),
7087
- "data-grading-status": i,
7088
- x1: t.x1,
7089
- x2: t.x2,
7090
- y1: t.y1,
7091
- y2: t.y2
7092
- }, t.key);
7093
- })
7094
- }) : null, /* @__PURE__ */ a("div", {
7095
- className: U(V.columns, V["player-columns"]),
7096
- style: S,
7097
- children: n.columns.map((n, r) => /* @__PURE__ */ a("section", {
7098
- className: V.column,
7099
- children: n.items.map((i, s) => {
7100
- let c = dn(n.labelStyle, s), l = !e && (d == null ? void 0 : d.itemId) === i.itemId;
7101
- return /* @__PURE__ */ a("div", {
7102
- className: U(V.item, l && V.selected),
7103
- "data-selected": l ? "true" : void 0,
7104
- "data-testid": `line-connect-player-item-${i.itemId}`,
7105
- ref: E(i.itemId),
7106
- children: /* @__PURE__ */ o("button", {
7107
- "aria-pressed": l,
7108
- className: V.button,
7109
- disabled: t,
7110
- onClick: () => D(r, i.itemId),
7111
- type: "button",
7112
- children: [c ? /* @__PURE__ */ a("span", {
7113
- className: V.marker,
7114
- children: c
7115
- }) : null, /* @__PURE__ */ a(J, { content: i.content })]
7116
- })
7117
- }, i.itemId);
7074
+ children: [
7075
+ /* @__PURE__ */ o("div", {
7076
+ className: V.board,
7077
+ "data-testid": "line-connect-player-board",
7078
+ ref: y,
7079
+ children: [_ ? /* @__PURE__ */ a("svg", {
7080
+ "aria-hidden": "true",
7081
+ className: V.lines,
7082
+ "data-testid": "line-connect-player-lines",
7083
+ style: {
7084
+ height: `${_.height}px`,
7085
+ width: `${_.width}px`
7086
+ },
7087
+ viewBox: `0 0 ${_.width} ${_.height}`,
7088
+ children: _.lines.map((t) => {
7089
+ var n;
7090
+ let r = C.find((e) => e.key === t.key), i = e == null || (n = e.connectionResults.find((e) => e.fromItemId === (r == null ? void 0 : r.fromItemId) && e.toItemId === (r == null ? void 0 : r.toItemId))) == null ? void 0 : n.status;
7091
+ return /* @__PURE__ */ a("line", {
7092
+ className: U(V.line, Xc.line, Qc(i)),
7093
+ "data-grading-status": i,
7094
+ x1: t.x1,
7095
+ x2: t.x2,
7096
+ y1: t.y1,
7097
+ y2: t.y2
7098
+ }, t.key);
7118
7099
  })
7119
- }, n.columnId))
7120
- })]
7121
- }), l ? /* @__PURE__ */ a(Y, {
7122
- groups: uu(n),
7123
- title: r.standardAnswer
7124
- }) : null]
7100
+ }) : null, /* @__PURE__ */ a("div", {
7101
+ className: U(V.columns, V["player-columns"]),
7102
+ style: S,
7103
+ children: n.columns.map((n, r) => /* @__PURE__ */ a("section", {
7104
+ className: V.column,
7105
+ children: n.items.map((i, s) => {
7106
+ let c = dn(n.labelStyle, s), l = !e && (d == null ? void 0 : d.itemId) === i.itemId;
7107
+ return /* @__PURE__ */ a("div", {
7108
+ className: U(V.item, l && V.selected),
7109
+ "data-selected": l ? "true" : void 0,
7110
+ "data-testid": `line-connect-player-item-${i.itemId}`,
7111
+ ref: E(i.itemId),
7112
+ children: /* @__PURE__ */ o("button", {
7113
+ "aria-pressed": l,
7114
+ className: V.button,
7115
+ disabled: t,
7116
+ onClick: () => D(r, i.itemId),
7117
+ type: "button",
7118
+ children: [c ? /* @__PURE__ */ a("span", {
7119
+ className: V.marker,
7120
+ children: c
7121
+ }) : null, /* @__PURE__ */ a(J, { content: i.content })]
7122
+ })
7123
+ }, i.itemId);
7124
+ })
7125
+ }, n.columnId))
7126
+ })]
7127
+ }),
7128
+ t ? null : /* @__PURE__ */ a("p", {
7129
+ className: V.hint,
7130
+ children: r.lineConnectHint
7131
+ }),
7132
+ l ? /* @__PURE__ */ a(Y, {
7133
+ groups: uu(n),
7134
+ title: r.standardAnswer
7135
+ }) : null
7136
+ ]
7125
7137
  });
7126
7138
  }
7127
7139
  var pu = {
@@ -7182,29 +7194,74 @@ function gu(e, t, n) {
7182
7194
  return fn(e.labelStyle, n) || /* @__PURE__ */ a(J, { content: t.content });
7183
7195
  }
7184
7196
  var _u = {
7185
- board: "_board_1j0zm_1",
7186
- "matched-rows": "_matched-rows_1j0zm_6",
7187
- "matched-row": "_matched-row_1j0zm_6",
7188
- columns: "_columns_1j0zm_24",
7189
- column: "_column_1j0zm_24",
7190
- item: "_item_1j0zm_36",
7191
- "unanswered-item": "_unanswered-item_1j0zm_59",
7192
- selected: "_selected_1j0zm_70",
7193
- matched: "_matched_1j0zm_6",
7194
- marker: "_marker_1j0zm_79"
7197
+ board: "_board_edy7p_1",
7198
+ hint: "_hint_edy7p_6",
7199
+ "matched-rows": "_matched-rows_edy7p_13",
7200
+ "matched-row": "_matched-row_edy7p_13",
7201
+ columns: "_columns_edy7p_62",
7202
+ column: "_column_edy7p_62",
7203
+ item: "_item_edy7p_74",
7204
+ "unanswered-item": "_unanswered-item_edy7p_98",
7205
+ selected: "_selected_edy7p_109",
7206
+ matched: "_matched_edy7p_13",
7207
+ marker: "_marker_edy7p_124"
7195
7208
  };
7196
7209
  //#endregion
7210
+ //#region src/question/player/useMatchingTransition.ts
7211
+ function vu(e) {
7212
+ let t = m(null), n = m(/* @__PURE__ */ new Map()), r = m([]);
7213
+ function i() {
7214
+ r.current.forEach((e) => e.cancel()), r.current = [];
7215
+ }
7216
+ function a() {
7217
+ var e, r, a;
7218
+ if (n.current.clear(), (e = (r = window).matchMedia) != null && e.call(r, "(prefers-reduced-motion: reduce)").matches) {
7219
+ i();
7220
+ return;
7221
+ }
7222
+ (a = t.current) == null || a.querySelectorAll("[data-matching-item-id]").forEach((e) => {
7223
+ n.current.set(e.dataset.matchingItemId, e.getBoundingClientRect());
7224
+ });
7225
+ }
7226
+ return f(() => {
7227
+ var e, a;
7228
+ if (i(), n.current.size === 0) return;
7229
+ let o = Array.from((e = (a = t.current) == null ? void 0 : a.querySelectorAll("[data-matching-item-id]")) == null ? [] : e).map((e) => ({
7230
+ button: e,
7231
+ before: n.current.get(e.dataset.matchingItemId),
7232
+ after: e.getBoundingClientRect()
7233
+ }));
7234
+ n.current.clear(), o.forEach(({ button: e, before: t, after: n }) => {
7235
+ if (!t || !e.animate) return;
7236
+ let i = t.left - n.left, a = t.top - n.top;
7237
+ i === 0 && a === 0 || r.current.push(e.animate([{
7238
+ transform: `translate(${i}px, ${a}px)`,
7239
+ zIndex: 1
7240
+ }, {
7241
+ transform: "translate(0, 0)",
7242
+ zIndex: 1
7243
+ }], {
7244
+ duration: 240,
7245
+ easing: "cubic-bezier(0.2, 0, 0, 1)"
7246
+ }));
7247
+ });
7248
+ }, [e]), f(() => i, []), {
7249
+ boardRef: t,
7250
+ capturePositions: a
7251
+ };
7252
+ }
7253
+ //#endregion
7197
7254
  //#region src/question/player/QuestionMatchingPlayer.tsx
7198
- function vu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7199
- let [u, d] = h(null), f = lc(s, c), p = yu(n, f.connections);
7200
- function m(e, n) {
7255
+ function yu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7256
+ let [u, d] = h(null), f = lc(s, c), p = bu(n, f.connections), { boardRef: m, capturePositions: g } = vu(f.connections);
7257
+ function _(e, n) {
7201
7258
  if (t) return;
7202
7259
  let r = u ? ht(u, {
7203
7260
  columnIndex: e,
7204
7261
  itemId: n
7205
7262
  }) : null;
7206
7263
  if (r) {
7207
- i(j(j({}, f), {}, { connections: vc(f.connections, r.fromItemId, r.toItemId) })), d(null);
7264
+ g(), i(j(j({}, f), {}, { connections: vc(f.connections, r.fromItemId, r.toItemId) })), d(null);
7208
7265
  return;
7209
7266
  }
7210
7267
  d((u == null ? void 0 : u.itemId) === n ? null : {
@@ -7212,15 +7269,16 @@ function vu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i,
7212
7269
  itemId: n
7213
7270
  });
7214
7271
  }
7215
- let g = new Map(e == null ? void 0 : e.itemResults.map((e) => [e.itemId, e.status]));
7216
- function _(e, n) {
7217
- let r = (u == null ? void 0 : u.itemId) === e.item.itemId, i = g.get(e.item.itemId);
7272
+ let v = new Map(e == null ? void 0 : e.itemResults.map((e) => [e.itemId, e.status]));
7273
+ function y(e, n) {
7274
+ let r = (u == null ? void 0 : u.itemId) === e.item.itemId, i = v.get(e.item.itemId);
7218
7275
  return /* @__PURE__ */ o("button", {
7219
7276
  "aria-pressed": r,
7220
7277
  className: U(_u.item, r && _u.selected, n && _u.matched, !n && Qc(i), !n && i === "unanswered" && _u["unanswered-item"]),
7221
7278
  "data-testid": `matching-player-item-${e.item.itemId}`,
7279
+ "data-matching-item-id": e.item.itemId,
7222
7280
  disabled: t,
7223
- onClick: () => m(e.columnIndex, e.item.itemId),
7281
+ onClick: () => _(e.columnIndex, e.item.itemId),
7224
7282
  type: "button",
7225
7283
  children: [e.marker ? /* @__PURE__ */ a("span", {
7226
7284
  className: _u.marker,
@@ -7230,43 +7288,53 @@ function vu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i,
7230
7288
  }
7231
7289
  return /* @__PURE__ */ o("div", {
7232
7290
  className: G.element,
7233
- children: [/* @__PURE__ */ o("div", {
7234
- className: _u.board,
7235
- children: [p.rows.length > 0 ? /* @__PURE__ */ a("div", {
7236
- className: _u["matched-rows"],
7237
- children: p.rows.map((t) => {
7238
- var n;
7239
- let r = e == null || (n = e.connectionResults.find((e) => e.fromItemId === t.from.item.itemId && e.toItemId === t.to.item.itemId)) == null ? void 0 : n.status;
7240
- return /* @__PURE__ */ o("div", {
7241
- className: U(_u["matched-row"], Qc(r)),
7242
- "data-testid": `matching-player-row-${t.from.item.itemId}-${t.to.item.itemId}`,
7243
- children: [
7244
- _(t.from, !0),
7245
- _(t.to, !0),
7246
- /* @__PURE__ */ a(Pl, { status: r })
7247
- ]
7248
- }, `${t.from.item.itemId}-${t.to.item.itemId}`);
7249
- })
7250
- }) : null, p.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
7251
- className: _u.columns,
7252
- children: p.unmatchedColumns.map((e, t) => {
7253
- var r, i;
7254
- return /* @__PURE__ */ a("section", {
7255
- className: _u.column,
7256
- children: e.map((e) => _(e, !1))
7257
- }, (r = (i = n.columns[t]) == null ? void 0 : i.columnId) == null ? t : r);
7258
- })
7259
- }) : null]
7260
- }), l ? /* @__PURE__ */ a(Y, {
7261
- groups: mu(n),
7262
- title: r.standardAnswer
7263
- }) : null]
7291
+ children: [
7292
+ /* @__PURE__ */ o("div", {
7293
+ className: _u.board,
7294
+ ref: m,
7295
+ children: [p.rows.length > 0 ? /* @__PURE__ */ a("div", {
7296
+ className: _u["matched-rows"],
7297
+ children: p.rows.map((t) => {
7298
+ var n;
7299
+ let r = e == null || (n = e.connectionResults.find((e) => e.fromItemId === t.from.item.itemId && e.toItemId === t.to.item.itemId)) == null ? void 0 : n.status;
7300
+ return /* @__PURE__ */ o("div", {
7301
+ className: U(_u["matched-row"], Qc(r)),
7302
+ "data-testid": `matching-player-row-${t.from.item.itemId}-${t.to.item.itemId}`,
7303
+ "data-pair-color": e ? void 0 : t.from.itemIndex % 6,
7304
+ children: [
7305
+ y(t.from, !0),
7306
+ y(t.to, !0),
7307
+ /* @__PURE__ */ a(Pl, { status: r })
7308
+ ]
7309
+ }, `${t.from.item.itemId}-${t.to.item.itemId}`);
7310
+ })
7311
+ }) : null, p.unmatchedColumns.some((e) => e.length > 0) ? /* @__PURE__ */ a("div", {
7312
+ className: _u.columns,
7313
+ children: p.unmatchedColumns.map((e, t) => {
7314
+ var r, i;
7315
+ return /* @__PURE__ */ a("section", {
7316
+ className: _u.column,
7317
+ children: e.map((e) => y(e, !1))
7318
+ }, (r = (i = n.columns[t]) == null ? void 0 : i.columnId) == null ? t : r);
7319
+ })
7320
+ }) : null]
7321
+ }),
7322
+ t ? null : /* @__PURE__ */ a("p", {
7323
+ className: _u.hint,
7324
+ children: r.matchingHint
7325
+ }),
7326
+ l ? /* @__PURE__ */ a(Y, {
7327
+ groups: mu(n),
7328
+ title: r.standardAnswer
7329
+ }) : null
7330
+ ]
7264
7331
  });
7265
7332
  }
7266
- function yu(e, t) {
7333
+ function bu(e, t) {
7267
7334
  var n;
7268
7335
  let r = e.columns.map((e, t) => e.items.map((n, r) => ({
7269
7336
  columnIndex: t,
7337
+ itemIndex: r,
7270
7338
  item: n,
7271
7339
  marker: fn(e.labelStyle, r)
7272
7340
  }))), i = r.reduce((e, t) => (t.forEach((t) => e.set(t.item.itemId, t)), e), /* @__PURE__ */ new Map()), a = /* @__PURE__ */ new Set(), o = ((n = r[0]) == null ? [] : n).reduce((e, n) => {
@@ -7284,7 +7352,7 @@ function yu(e, t) {
7284
7352
  }
7285
7353
  //#endregion
7286
7354
  //#region src/question/renderers/optionGroupAnswers.tsx
7287
- function bu(e, t) {
7355
+ function xu(e, t) {
7288
7356
  return _n(t, e.config.optionLabelStyle).map((e) => ({
7289
7357
  kind: "markerOnly",
7290
7358
  marker: e.marker
@@ -7292,22 +7360,22 @@ function bu(e, t) {
7292
7360
  }
7293
7361
  //#endregion
7294
7362
  //#region src/question/renderers/question-option-grid.ts
7295
- function xu({ availableWidth: e, columnGap: t, optionCount: n, widestOptionWidth: r }) {
7363
+ function Su({ availableWidth: e, columnGap: t, optionCount: n, widestOptionWidth: r }) {
7296
7364
  let i = Math.max(1, Math.trunc(n));
7297
7365
  if (e <= 0 || r <= 0) return 1;
7298
7366
  for (let n = i; n >= 2; --n) if (i % n === 0 && (e - Math.max(0, t) * (n - 1)) / n >= r) return n;
7299
7367
  return 1;
7300
7368
  }
7301
- var Su = { list: "_list_1xo1n_1" }, Cu = {
7369
+ var Cu = { list: "_list_1xo1n_1" }, wu = {
7302
7370
  table: "_table_p4zkf_1",
7303
7371
  cell: "_cell_p4zkf_7"
7304
7372
  };
7305
7373
  //#endregion
7306
7374
  //#region src/question/renderers/QuestionColumnLayout.tsx
7307
- function wu({ children: e, className: t, columnCount: n, dataAttributes: r, layoutRef: i, role: c, style: l }) {
7375
+ function Tu({ children: e, className: t, columnCount: n, dataAttributes: r, layoutRef: i, role: c, style: l }) {
7308
7376
  let { columnLayout: u, systemListMarkup: d } = W(), f = Math.max(1, Math.floor(n));
7309
7377
  if (u === "document-table") {
7310
- let n = Tu(s.toArray(e), f), l = `${100 / f}%`, u = t ? `${Cu.table} ${t}` : Cu.table;
7378
+ let n = Eu(s.toArray(e), f), l = `${100 / f}%`, u = t ? `${wu.table} ${t}` : wu.table;
7311
7379
  return /* @__PURE__ */ o("table", j(j({}, r), {}, {
7312
7380
  className: u,
7313
7381
  "data-column-count": f,
@@ -7318,7 +7386,7 @@ function wu({ children: e, className: t, columnCount: n, dataAttributes: r, layo
7318
7386
  let r = e.slice(n, n + 1)[0];
7319
7387
  return /* @__PURE__ */ a("td", {
7320
7388
  "aria-hidden": r ? void 0 : "true",
7321
- className: Cu.cell,
7389
+ className: wu.cell,
7322
7390
  children: r == null ? null : r
7323
7391
  }, `cell-${n}`);
7324
7392
  }) }, `row-${t}`)) })]
@@ -7339,18 +7407,18 @@ function wu({ children: e, className: t, columnCount: n, dataAttributes: r, layo
7339
7407
  children: e
7340
7408
  }));
7341
7409
  }
7342
- function Tu(e, t) {
7410
+ function Eu(e, t) {
7343
7411
  return Array.from({ length: Math.ceil(e.length / t) }, (n, r) => e.slice(r * t, (r + 1) * t));
7344
7412
  }
7345
7413
  //#endregion
7346
7414
  //#region src/question/renderers/QuestionAdaptiveOptionList.tsx
7347
- function Eu({ children: e }) {
7415
+ function Du({ children: e }) {
7348
7416
  let { renderer: t } = K(), n = m(null), [r, i] = h(1), o = { gridTemplateColumns: `repeat(${r}, minmax(0, 1fr))` };
7349
7417
  return f(() => {
7350
7418
  if (!n.current) return;
7351
7419
  let t = n.current, r = null;
7352
7420
  function a() {
7353
- let n = t.getBoundingClientRect().width, r = Number.parseFloat(getComputedStyle(t).columnGap) || 0, a = Du(t), o = xu({
7421
+ let n = t.getBoundingClientRect().width, r = Number.parseFloat(getComputedStyle(t).columnGap) || 0, a = Ou(t), o = Su({
7354
7422
  availableWidth: n,
7355
7423
  columnGap: r,
7356
7424
  optionCount: s.count(e),
@@ -7368,8 +7436,8 @@ function Eu({ children: e }) {
7368
7436
  return c.observe(t), () => {
7369
7437
  r !== null && cancelAnimationFrame(r), t.removeEventListener("load", o, !0), c.disconnect();
7370
7438
  };
7371
- }), /* @__PURE__ */ a(wu, {
7372
- className: `${t["option-list"]} ${Su.list}`,
7439
+ }), /* @__PURE__ */ a(Tu, {
7440
+ className: `${t["option-list"]} ${Cu.list}`,
7373
7441
  columnCount: r,
7374
7442
  dataAttributes: { "data-question-option-grid": "true" },
7375
7443
  layoutRef: (e) => {
@@ -7380,8 +7448,8 @@ function Eu({ children: e }) {
7380
7448
  children: e
7381
7449
  });
7382
7450
  }
7383
- function Du(e) {
7384
- let t = e.parentElement, n = Ou(e);
7451
+ function Ou(e) {
7452
+ let t = e.parentElement, n = ku(e);
7385
7453
  if (!t || n.length === 0) return 0;
7386
7454
  let r = e.ownerDocument.createElement("div");
7387
7455
  r.className = e.className, r.setAttribute("aria-hidden", "true"), r.setAttribute("data-question-option-measurement", "true"), Object.assign(r.style, {
@@ -7399,23 +7467,23 @@ function Du(e) {
7399
7467
  let i = r.getBoundingClientRect().width;
7400
7468
  return r.remove(), i;
7401
7469
  }
7402
- function Ou(e) {
7470
+ function ku(e) {
7403
7471
  return e instanceof HTMLTableElement ? Array.from(e.rows).reduce((e, t) => [...e, ...Array.from(t.cells).reduce((e, t) => t.firstElementChild ? [...e, t.firstElementChild] : e, [])], []) : Array.from(e.children);
7404
7472
  }
7405
7473
  //#endregion
7406
7474
  //#region src/question/player/QuestionOptionGroupPlayer.tsx
7407
- var ku = [
7475
+ var Au = [
7408
7476
  "selected",
7409
7477
  "status",
7410
7478
  "missed",
7411
7479
  "description"
7412
- ], Au = [
7480
+ ], ju = [
7413
7481
  "selected",
7414
7482
  "status",
7415
7483
  "missed",
7416
7484
  "description"
7417
7485
  ];
7418
- function ju({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7486
+ function Mu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7419
7487
  let d = nc(c, l), f = gn(r, n.config.optionLabelStyle).map((t) => {
7420
7488
  var r;
7421
7489
  let a = d.selectedOptionIds.includes(t.optionId), o = e == null || (r = e.optionResults.find((e) => e.optionId === t.optionId)) == null ? void 0 : r.status;
@@ -7430,7 +7498,7 @@ function ju({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7430
7498
  s(j(j({}, d), {}, { selectedOptionIds: hc(d.selectedOptionIds, e, n.config.selectionType) }));
7431
7499
  }
7432
7500
  if (n.config.renderer === "table") {
7433
- let s = bu(n, r);
7501
+ let s = xu(n, r);
7434
7502
  return /* @__PURE__ */ o("div", {
7435
7503
  className: G.element,
7436
7504
  children: [/* @__PURE__ */ a("div", {
@@ -7441,7 +7509,7 @@ function ju({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7441
7509
  /* @__PURE__ */ o("colgroup", { children: [/* @__PURE__ */ a("col", { className: Ol["table-option-column"] }), r.columns.map((e) => /* @__PURE__ */ a("col", {}, e.id))] }),
7442
7510
  /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [/* @__PURE__ */ a("th", { children: i.option }), r.columns.map((e) => /* @__PURE__ */ a("th", { children: /* @__PURE__ */ a(J, { content: e.content }) }, e.id))] }) }),
7443
7511
  /* @__PURE__ */ a("tbody", { children: f.map((n) => {
7444
- let { selected: r, status: i, missed: s, description: c } = n, l = Oa(n, ku);
7512
+ let { selected: r, status: i, missed: s, description: c } = n, l = Oa(n, Au);
7445
7513
  return /* @__PURE__ */ o("tr", {
7446
7514
  className: U(X["table-choice-row"], Qc(i), s && X["missed-answer"]),
7447
7515
  "data-graded": !!e,
@@ -7477,11 +7545,11 @@ function ju({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7477
7545
  }) : null]
7478
7546
  });
7479
7547
  }
7480
- let m = bu(n, r);
7548
+ let m = xu(n, r);
7481
7549
  return /* @__PURE__ */ o("div", {
7482
7550
  className: G.element,
7483
- children: [/* @__PURE__ */ a(Eu, { children: f.map((n) => {
7484
- let { selected: r, status: i, missed: s, description: c } = n, l = Oa(n, Au);
7551
+ children: [/* @__PURE__ */ a(Du, { children: f.map((n) => {
7552
+ let { selected: r, status: i, missed: s, description: c } = n, l = Oa(n, ju);
7485
7553
  return /* @__PURE__ */ a("li", {
7486
7554
  className: U(G["option-item"], X["choice-option"], Qc(i), s && X["missed-answer"]),
7487
7555
  "data-graded": !!e,
@@ -7512,7 +7580,7 @@ function ju({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7512
7580
  }
7513
7581
  //#endregion
7514
7582
  //#region src/question/renderers/orderingAnswerGroups.tsx
7515
- function Mu(e) {
7583
+ function Nu(e) {
7516
7584
  let t = Vr(e.sortOptions);
7517
7585
  return e.answers.map((e) => {
7518
7586
  let n = t.get(e);
@@ -7525,7 +7593,7 @@ function Mu(e) {
7525
7593
  }
7526
7594
  //#endregion
7527
7595
  //#region src/question/player/QuestionOrderingPlayer.tsx
7528
- function Nu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7596
+ function Pu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i, response: s, responseIndex: c, showAnswer: l }) {
7529
7597
  let u = uc(s, c, n), d = Vr(n.sortOptions), f = u.orderedOptionIds.map((e) => d.get(e)).filter((e) => !!e);
7530
7598
  function p(e, t) {
7531
7599
  i(j(j({}, u), {}, { orderedOptionIds: bc(u.orderedOptionIds, n, e, t) }));
@@ -7568,14 +7636,14 @@ function Nu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: i,
7568
7636
  }, i.id);
7569
7637
  })
7570
7638
  }), l ? /* @__PURE__ */ a(Y, {
7571
- groups: Mu(n),
7639
+ groups: Nu(n),
7572
7640
  title: r.standardAnswer
7573
7641
  }) : null]
7574
7642
  });
7575
7643
  }
7576
7644
  //#endregion
7577
7645
  //#region src/question/renderers/QuestionTextMarkerContent.tsx
7578
- function Pu({ renderMarker: e, answerMarkers: t = [], content: n, disabled: r = !1, onMarkerClick: i, selectedMarkers: o = [], showAnswer: s = !1 }) {
7646
+ function Fu({ renderMarker: e, answerMarkers: t = [], content: n, disabled: r = !1, onMarkerClick: i, selectedMarkers: o = [], showAnswer: s = !1 }) {
7579
7647
  let { textMarker: l } = K(), u = n.json.length ? n.json : [{
7580
7648
  children: [{ text: n.text }],
7581
7649
  type: "paragraph"
@@ -7585,8 +7653,8 @@ function Pu({ renderMarker: e, answerMarkers: t = [], content: n, disabled: r =
7585
7653
  children: u.map((e, t) => d(e, `node-${t}`))
7586
7654
  });
7587
7655
  function d(e, t) {
7588
- if (Iu(e)) return f(e, t);
7589
- if (!Fu(e)) return null;
7656
+ if (Lu(e)) return f(e, t);
7657
+ if (!Iu(e)) return null;
7590
7658
  let n = e.children.map((e, n) => d(e, `${t}-${n}`));
7591
7659
  return e.type === "paragraph" ? /* @__PURE__ */ a("p", {
7592
7660
  className: l.paragraph,
@@ -7629,17 +7697,17 @@ function Pu({ renderMarker: e, answerMarkers: t = [], content: n, disabled: r =
7629
7697
  }, n);
7630
7698
  }
7631
7699
  }
7632
- function Fu(e) {
7700
+ function Iu(e) {
7633
7701
  return !!(e && typeof e == "object" && "children" in e && Array.isArray(e.children));
7634
7702
  }
7635
- function Iu(e) {
7703
+ function Lu(e) {
7636
7704
  return !!(e && typeof e == "object" && "text" in e && typeof e.text == "string");
7637
7705
  }
7638
7706
  //#endregion
7639
7707
  //#region src/question/player/QuestionTextMarkerPlayer.tsx
7640
- function Lu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7708
+ function Ru({ gradingResult: e, disabled: t, item: n, messages: r, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7641
7709
  let d = dc(c, l);
7642
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Pu, {
7710
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Fu, {
7643
7711
  renderMarker: (t, n) => {
7644
7712
  var r;
7645
7713
  return /* @__PURE__ */ a(Pl, {
@@ -7664,7 +7732,7 @@ function Lu({ gradingResult: e, disabled: t, item: n, messages: r, onChange: s,
7664
7732
  }
7665
7733
  //#endregion
7666
7734
  //#region src/question/player/QuestionTextResponsePlayer.tsx
7667
- function Ru({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
7735
+ function zu({ disabled: e, locale: t, label: n, messages: r, onChange: i, response: o, responseIndex: s, uploadImage: c }) {
7668
7736
  let l = fc(o, s);
7669
7737
  return e ? F(l.content) ? null : /* @__PURE__ */ a(J, { content: l.content }) : /* @__PURE__ */ a(Ha, {
7670
7738
  ariaLabel: n,
@@ -7681,7 +7749,7 @@ function Ru({ disabled: e, locale: t, label: n, messages: r, onChange: i, respon
7681
7749
  }
7682
7750
  //#endregion
7683
7751
  //#region src/question/renderers/wordBuilderAnswers.tsx
7684
- function zu(e, t) {
7752
+ function Bu(e, t) {
7685
7753
  return e.blanks.reduce((n, r) => {
7686
7754
  var i;
7687
7755
  let o = (i = e.answers[r]) == null ? void 0 : i.trim();
@@ -7694,14 +7762,14 @@ function zu(e, t) {
7694
7762
  }
7695
7763
  //#endregion
7696
7764
  //#region src/question/player/QuestionPlayerWordBuilder.module.css
7697
- var Bu = {
7765
+ var Vu = {
7698
7766
  "word-builder-blank": "_word-builder-blank_1q28p_1",
7699
7767
  "word-builder-candidate-list": "_word-builder-candidate-list_1q28p_35"
7700
7768
  };
7701
7769
  //#endregion
7702
7770
  //#region src/question/player/QuestionWordBuilderPlayer.tsx
7703
- function Vu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7704
- let d = kn(r, !0, n), f = ac(c, l, d.blanks), p = zu(d, (e, t) => tl(e, t, i.blankLabel));
7771
+ function Hu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, onChange: s, response: c, responseIndex: l, showAnswer: u }) {
7772
+ let d = kn(r, !0, n), f = ac(c, l, d.blanks), p = Bu(d, (e, t) => tl(e, t, i.blankLabel));
7705
7773
  function m(e, t) {
7706
7774
  s(j(j({}, f), {}, { answers: j(j({}, f.answers), {}, { [e]: t }) }));
7707
7775
  }
@@ -7733,7 +7801,7 @@ function Vu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7733
7801
  content: d.content,
7734
7802
  renderBlank: ({ blankId: n, index: r, label: o }) => {
7735
7803
  var s, c, l;
7736
- let u = (s = f.answers[n]) == null ? "" : s, d = Hu({
7804
+ let u = (s = f.answers[n]) == null ? "" : s, d = Uu({
7737
7805
  answers: u,
7738
7806
  blankLabel: i.blankLabel,
7739
7807
  canClear: !t && !!u.trim(),
@@ -7745,7 +7813,7 @@ function Vu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7745
7813
  status: e == null || (c = e.blankResults.find((e) => e.blankId === n)) == null ? void 0 : c.status,
7746
7814
  children: /* @__PURE__ */ a("button", {
7747
7815
  "aria-label": d,
7748
- className: Bu["word-builder-blank"],
7816
+ className: Vu["word-builder-blank"],
7749
7817
  disabled: t,
7750
7818
  onClick: () => h(n),
7751
7819
  onDragOver: (e) => e.preventDefault(),
@@ -7758,7 +7826,7 @@ function Vu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7758
7826
  }
7759
7827
  }),
7760
7828
  /* @__PURE__ */ a("div", {
7761
- className: Bu["word-builder-candidate-list"],
7829
+ className: Vu["word-builder-candidate-list"],
7762
7830
  children: d.candidateOptions.map((e, n) => /* @__PURE__ */ a("button", {
7763
7831
  disabled: t,
7764
7832
  draggable: !t,
@@ -7777,15 +7845,15 @@ function Vu({ gradingResult: e, disabled: t, element: n, item: r, messages: i, o
7777
7845
  ]
7778
7846
  });
7779
7847
  }
7780
- function Hu({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
7848
+ function Uu({ answers: e, blankLabel: t, canClear: n, index: r, label: i }) {
7781
7849
  let a = i || `${t}${r + 1}`;
7782
7850
  return !n || !e.trim() ? a : t === "\u7a7a" ? `${a}\uff0c\u70b9\u51fb\u6e05\u7a7a` : `${a}, click to clear`;
7783
7851
  }
7784
7852
  //#endregion
7785
7853
  //#region src/question/player/QuestionPlayerElement.tsx
7786
- function Uu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, messages: o, onResponseItemChange: s, response: c, responseIndex: l, showAnswer: u, uploadImage: d }) {
7854
+ function Wu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, messages: o, onResponseItemChange: s, response: c, responseIndex: l, showAnswer: u, uploadImage: d }) {
7787
7855
  if (n.type !== r.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${n.type}\uff0cactual=${r.type}`);
7788
- return n.type === "richText" ? /* @__PURE__ */ a(J, { content: r.content }) : n.type === "textResponse" ? /* @__PURE__ */ a(Ru, {
7856
+ return n.type === "richText" ? /* @__PURE__ */ a(J, { content: r.content }) : n.type === "textResponse" ? /* @__PURE__ */ a(zu, {
7789
7857
  disabled: e,
7790
7858
  label: n.name,
7791
7859
  locale: i,
@@ -7794,7 +7862,7 @@ function Uu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, mes
7794
7862
  response: c,
7795
7863
  responseIndex: l,
7796
7864
  uploadImage: d
7797
- }) : n.type === "ordering" ? /* @__PURE__ */ a(Nu, {
7865
+ }) : n.type === "ordering" ? /* @__PURE__ */ a(Pu, {
7798
7866
  gradingResult: Yc(t, "ordering"),
7799
7867
  disabled: e,
7800
7868
  item: r,
@@ -7812,7 +7880,7 @@ function Uu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, mes
7812
7880
  response: c,
7813
7881
  responseIndex: l,
7814
7882
  showAnswer: u
7815
- }) : n.type === "textMarker" ? /* @__PURE__ */ a(Lu, {
7883
+ }) : n.type === "textMarker" ? /* @__PURE__ */ a(Ru, {
7816
7884
  gradingResult: Yc(t, "textMarker"),
7817
7885
  disabled: e,
7818
7886
  item: r,
@@ -7821,7 +7889,7 @@ function Uu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, mes
7821
7889
  response: c,
7822
7890
  responseIndex: l,
7823
7891
  showAnswer: u
7824
- }) : Wu({
7892
+ }) : Gu({
7825
7893
  disabled: e,
7826
7894
  gradingResult: t,
7827
7895
  element: n,
@@ -7835,9 +7903,9 @@ function Uu({ disabled: e, gradingResult: t, element: n, item: r, locale: i, mes
7835
7903
  uploadImage: d
7836
7904
  });
7837
7905
  }
7838
- function Wu({ disabled: e, gradingResult: t, element: n, item: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l }) {
7906
+ function Gu({ disabled: e, gradingResult: t, element: n, item: r, messages: i, onResponseItemChange: o, response: s, responseIndex: c, showAnswer: l }) {
7839
7907
  switch (n.type) {
7840
- case "choice": return /* @__PURE__ */ a(ju, {
7908
+ case "choice": return /* @__PURE__ */ a(Mu, {
7841
7909
  gradingResult: Yc(t, "choice"),
7842
7910
  disabled: e,
7843
7911
  element: n,
@@ -7869,7 +7937,7 @@ function Wu({ disabled: e, gradingResult: t, element: n, item: r, messages: i, o
7869
7937
  responseIndex: c,
7870
7938
  showAnswer: l
7871
7939
  });
7872
- case "wordBuilder": return /* @__PURE__ */ a(Vu, {
7940
+ case "wordBuilder": return /* @__PURE__ */ a(Hu, {
7873
7941
  gradingResult: Yc(t, "wordBuilder"),
7874
7942
  disabled: e,
7875
7943
  element: n,
@@ -7901,7 +7969,7 @@ function Wu({ disabled: e, gradingResult: t, element: n, item: r, messages: i, o
7901
7969
  responseIndex: c,
7902
7970
  showAnswer: l
7903
7971
  });
7904
- case "matching": return /* @__PURE__ */ a(vu, {
7972
+ case "matching": return /* @__PURE__ */ a(yu, {
7905
7973
  gradingResult: Yc(t, "matching"),
7906
7974
  disabled: e,
7907
7975
  item: r,
@@ -7915,7 +7983,7 @@ function Wu({ disabled: e, gradingResult: t, element: n, item: r, messages: i, o
7915
7983
  }
7916
7984
  //#endregion
7917
7985
  //#region src/question/player/QuestionPlayerInner.tsx
7918
- function Gu({ childIndexPath: e, className: t, disabled: n = !1, gradingResult: r, locale: i = "zh-CN", messages: o, onResponseChange: s, response: c, rootQuestionNumber: l, showAnswer: u = !1, showExtraAttributes: d = !1, questionTypeTemplates: f, uploadImage: p, value: m }) {
7986
+ function Ku({ childIndexPath: e, className: t, disabled: n = !1, gradingResult: r, locale: i = "zh-CN", messages: o, onResponseChange: s, response: c, rootQuestionNumber: l, showAnswer: u = !1, showExtraAttributes: d = !1, questionTypeTemplates: f, uploadImage: p, value: m }) {
7919
7987
  let h = da(f, m);
7920
7988
  if (!h) return /* @__PURE__ */ a("div", {
7921
7989
  className: U(q.root, t),
@@ -7924,7 +7992,7 @@ function Gu({ childIndexPath: e, className: t, disabled: n = !1, gradingResult:
7924
7992
  children: o.missingQuestionTypeTemplate
7925
7993
  })
7926
7994
  });
7927
- let g = Ku({
7995
+ let g = qu({
7928
7996
  gradingResult: r,
7929
7997
  childIndexPath: e,
7930
7998
  disabled: n,
@@ -7942,20 +8010,20 @@ function Gu({ childIndexPath: e, className: t, disabled: n = !1, gradingResult:
7942
8010
  });
7943
8011
  return /* @__PURE__ */ a("div", {
7944
8012
  className: U(q.root, t),
7945
- children: Xu(h, m) ? /* @__PURE__ */ a("div", {
8013
+ children: Zu(h, m) ? /* @__PURE__ */ a("div", {
7946
8014
  className: q.empty,
7947
8015
  children: o.previewEmpty
7948
8016
  }) : g
7949
8017
  });
7950
8018
  }
7951
- function Ku(e) {
8019
+ function qu(e) {
7952
8020
  return /* @__PURE__ */ o(i, { children: [
7953
- qu(e),
7954
- Yu(e),
7955
- Ju(e)
8021
+ Ju(e),
8022
+ Xu(e),
8023
+ Yu(e)
7956
8024
  ] });
7957
8025
  }
7958
- function qu({ gradingResult: e, disabled: t, locale: n, messages: r, onResponseChange: i, response: o, showAnswer: s, structure: c, uploadImage: l, value: u }) {
8026
+ function Ju({ gradingResult: e, disabled: t, locale: n, messages: r, onResponseChange: i, response: o, showAnswer: s, structure: c, uploadImage: l, value: u }) {
7959
8027
  return c.elements.length === 0 ? null : /* @__PURE__ */ a("div", {
7960
8028
  className: q["element-list"],
7961
8029
  children: c.elements.map((d, f) => {
@@ -7963,7 +8031,7 @@ function qu({ gradingResult: e, disabled: t, locale: n, messages: r, onResponseC
7963
8031
  let m = cn(u, f, d), h = c.elements.slice(0, f).filter((e) => e.type !== "richText").length;
7964
8032
  return /* @__PURE__ */ a("section", {
7965
8033
  className: q.element,
7966
- children: /* @__PURE__ */ a(Uu, {
8034
+ children: /* @__PURE__ */ a(Wu, {
7967
8035
  disabled: t,
7968
8036
  gradingResult: (p = e == null ? void 0 : e.elementResults[h]) == null ? void 0 : p,
7969
8037
  element: d,
@@ -7980,17 +8048,17 @@ function qu({ gradingResult: e, disabled: t, locale: n, messages: r, onResponseC
7980
8048
  })
7981
8049
  });
7982
8050
  }
7983
- function Ju({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
8051
+ function Yu({ disabled: e, locale: t, messages: n, response: r, showExtraAttributes: i, structure: s, uploadImage: c, value: l }) {
7984
8052
  return i ? /* @__PURE__ */ a("div", {
7985
8053
  className: q["element-list"],
7986
8054
  children: s.extras.map((i, s) => {
7987
8055
  let u = ln(l, s, i);
7988
8056
  return F(u.content) ? null : /* @__PURE__ */ o("section", {
7989
8057
  className: q.extra,
7990
- children: [/* @__PURE__ */ a(Al, { children: i.name }), /* @__PURE__ */ a(Uu, {
8058
+ children: [/* @__PURE__ */ a(Al, { children: i.name }), /* @__PURE__ */ a(Wu, {
7991
8059
  disabled: e,
7992
- element: Zu(i),
7993
- item: Qu(u),
8060
+ element: Qu(i),
8061
+ item: $u(u),
7994
8062
  locale: t,
7995
8063
  messages: n,
7996
8064
  onResponseItemChange: () => void 0,
@@ -8003,14 +8071,14 @@ function Ju({ disabled: e, locale: t, messages: n, response: r, showExtraAttribu
8003
8071
  })
8004
8072
  }) : null;
8005
8073
  }
8006
- function Yu({ gradingResult: e, childIndexPath: t, disabled: n, locale: r, messages: i, onResponseChange: o, response: s, rootQuestionNumber: c, showAnswer: l, showExtraAttributes: u, questionTypeTemplates: d, uploadImage: f, value: p }) {
8074
+ function Xu({ gradingResult: e, childIndexPath: t, disabled: n, locale: r, messages: i, onResponseChange: o, response: s, rootQuestionNumber: c, showAnswer: l, showExtraAttributes: u, questionTypeTemplates: d, uploadImage: f, value: p }) {
8007
8075
  return p.children.length === 0 ? null : /* @__PURE__ */ a(jl, {
8008
8076
  childIndexPath: t,
8009
8077
  disabled: n,
8010
8078
  messages: i,
8011
8079
  onChildResponseChange: (e, t) => o(mc(s, e, t)),
8012
8080
  response: s,
8013
- renderChild: (t, o, s, p) => /* @__PURE__ */ a(Gu, {
8081
+ renderChild: (t, o, s, p) => /* @__PURE__ */ a(Ku, {
8014
8082
  gradingResult: e == null ? void 0 : e.children[p[p.length - 1]],
8015
8083
  childIndexPath: p,
8016
8084
  disabled: n,
@@ -8029,17 +8097,17 @@ function Yu({ gradingResult: e, childIndexPath: t, disabled: n, locale: r, messa
8029
8097
  value: p
8030
8098
  });
8031
8099
  }
8032
- function Xu(e, t) {
8100
+ function Zu(e, t) {
8033
8101
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
8034
8102
  }
8035
- function Zu(e) {
8103
+ function Qu(e) {
8036
8104
  return {
8037
8105
  config: {},
8038
8106
  name: e.name,
8039
8107
  type: "richText"
8040
8108
  };
8041
8109
  }
8042
- function Qu(e) {
8110
+ function $u(e) {
8043
8111
  return {
8044
8112
  content: e.content,
8045
8113
  type: "richText"
@@ -8047,12 +8115,12 @@ function Qu(e) {
8047
8115
  }
8048
8116
  //#endregion
8049
8117
  //#region src/question/player/QuestionPlayer.tsx
8050
- var $u = ["locale"];
8051
- function ed(e) {
8052
- let { locale: t = "zh-CN" } = e, n = Oa(e, $u), r = ks(n.value, n.questionTypeTemplates), i = Ps(n.response, r);
8118
+ var ed = ["locale"];
8119
+ function td(e) {
8120
+ let { locale: t = "zh-CN" } = e, n = Oa(e, ed), r = ks(n.value, n.questionTypeTemplates), i = Ps(n.response, r);
8053
8121
  return n.gradingResult && Uc(n.gradingResult, r), /* @__PURE__ */ a(Zc.Provider, {
8054
8122
  value: t,
8055
- children: /* @__PURE__ */ a(Gu, j(j({}, n), {}, {
8123
+ children: /* @__PURE__ */ a(Ku, j(j({}, n), {}, {
8056
8124
  disabled: !!(n.disabled || n.gradingResult),
8057
8125
  childIndexPath: [],
8058
8126
  locale: t,
@@ -8065,7 +8133,7 @@ function ed(e) {
8065
8133
  }
8066
8134
  //#endregion
8067
8135
  //#region src/question/shared/QuestionTextResponsePlaceholder.tsx
8068
- function td({ className: e = wl.placeholder, label: t }) {
8136
+ function nd({ className: e = wl.placeholder, label: t }) {
8069
8137
  return /* @__PURE__ */ a("div", {
8070
8138
  "aria-label": t,
8071
8139
  className: e
@@ -8073,17 +8141,17 @@ function td({ className: e = wl.placeholder, label: t }) {
8073
8141
  }
8074
8142
  //#endregion
8075
8143
  //#region src/question/renderers/blankStandardAnswerGroups.tsx
8076
- function nd(e, t, n) {
8077
- return [...e].sort((e, n) => rd(e.blankIds, t) - rd(n.blankIds, t)).map((e, r) => ({
8144
+ function rd(e, t, n) {
8145
+ return [...e].sort((e, n) => id(e.blankIds, t) - id(n.blankIds, t)).map((e, r) => ({
8078
8146
  kind: "detailed",
8079
- contents: id(e.contents.filter((e) => !F(e)), n, r),
8147
+ contents: ad(e.contents.filter((e) => !F(e)), n, r),
8080
8148
  marker: hl(e.blankIds, t, n)
8081
8149
  }));
8082
8150
  }
8083
- function rd(e, t) {
8151
+ function id(e, t) {
8084
8152
  return Math.min(...e.map((e) => t.indexOf(e)));
8085
8153
  }
8086
- function id(e, t, n) {
8154
+ function ad(e, t, n) {
8087
8155
  let r = t === "zh-CN" ? "\uff1b" : "; ";
8088
8156
  return e.reduce((t, i, o) => [
8089
8157
  ...t,
@@ -8093,8 +8161,8 @@ function id(e, t, n) {
8093
8161
  }
8094
8162
  //#endregion
8095
8163
  //#region src/question/renderers/QuestionBlankGroupView.tsx
8096
- function ad({ item: e, locale: t, messages: n, showAnswer: r }) {
8097
- let i = W(), { blankGroup: s, renderer: c } = K(), l = Yn(e.answers, e.blanks), u = i.answerGroupLayout === "rows" ? nd(l.map((e) => ({
8164
+ function od({ item: e, locale: t, messages: n, showAnswer: r }) {
8165
+ let i = W(), { blankGroup: s, renderer: c } = K(), l = Yn(e.answers, e.blanks), u = i.answerGroupLayout === "rows" ? rd(l.map((e) => ({
8098
8166
  blankIds: e.blankIds,
8099
8167
  contents: e.answerPools
8100
8168
  })), e.blanks, t) : l.map((r, o) => ({
@@ -8104,7 +8172,7 @@ function ad({ item: e, locale: t, messages: n, showAnswer: r }) {
8104
8172
  }));
8105
8173
  return /* @__PURE__ */ o("div", {
8106
8174
  className: c.element,
8107
- children: [/* @__PURE__ */ a(wu, {
8175
+ children: [/* @__PURE__ */ a(Tu, {
8108
8176
  className: s["blank-list"],
8109
8177
  columnCount: Math.min(e.blanks.length, 4),
8110
8178
  role: "list",
@@ -8115,25 +8183,25 @@ function ad({ item: e, locale: t, messages: n, showAnswer: r }) {
8115
8183
  className: s["blank-field"],
8116
8184
  children: i.blankPlaceholder === "answer-line" ? null : `${n.blankLabel} ${r + 1}`
8117
8185
  })
8118
- }, od(e, r)))
8186
+ }, sd(e, r)))
8119
8187
  }), r ? /* @__PURE__ */ a(Y, {
8120
8188
  groups: u,
8121
8189
  title: n.standardAnswer
8122
8190
  }) : null]
8123
8191
  });
8124
8192
  }
8125
- function od(e, t) {
8193
+ function sd(e, t) {
8126
8194
  return e || `blank-${t + 1}`;
8127
8195
  }
8128
8196
  //#endregion
8129
8197
  //#region src/question/renderers/QuestionClassificationView.tsx
8130
- function sd({ item: e, messages: t, showAnswer: n }) {
8198
+ function cd({ item: e, messages: t, showAnswer: n }) {
8131
8199
  let { classification: r, renderer: i } = K();
8132
8200
  return /* @__PURE__ */ o("div", {
8133
8201
  className: i.element,
8134
8202
  children: [/* @__PURE__ */ o("div", {
8135
8203
  className: r.board,
8136
- children: [/* @__PURE__ */ a(wu, {
8204
+ children: [/* @__PURE__ */ a(Tu, {
8137
8205
  className: r.zones,
8138
8206
  columnCount: 2,
8139
8207
  children: e.categories.map((e) => /* @__PURE__ */ o("section", {
@@ -8146,7 +8214,7 @@ function sd({ item: e, messages: t, showAnswer: n }) {
8146
8214
  children: t.unassigned
8147
8215
  })]
8148
8216
  }, e.id))
8149
- }), /* @__PURE__ */ a(wu, {
8217
+ }), /* @__PURE__ */ a(Tu, {
8150
8218
  className: r.pool,
8151
8219
  columnCount: Math.min(e.items.length, 4),
8152
8220
  children: e.items.map((e) => /* @__PURE__ */ a("div", {
@@ -8162,8 +8230,8 @@ function sd({ item: e, messages: t, showAnswer: n }) {
8162
8230
  }
8163
8231
  //#endregion
8164
8232
  //#region src/question/renderers/QuestionFillTextView.tsx
8165
- function cd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8166
- let s = W(), { renderer: c } = K(), l = An(t, e, !0), u = sl(l), d = s.answerGroupLayout === "rows" ? nd(u, l.blanks, n) : u.map((e, t) => ({
8233
+ function ld({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8234
+ let s = W(), { renderer: c } = K(), l = An(t, e, !0), u = sl(l), d = s.answerGroupLayout === "rows" ? rd(u, l.blanks, n) : u.map((e, t) => ({
8167
8235
  kind: "detailed",
8168
8236
  contents: e.contents.map((e, n) => /* @__PURE__ */ a(J, { content: e }, `group-${t}-answer-${n}`)),
8169
8237
  marker: s.blankAnswerMarker(e.blankIds, l.blanks, n, r.blankLabel)
@@ -8172,7 +8240,7 @@ function cd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8172
8240
  className: c.element,
8173
8241
  children: [
8174
8242
  /* @__PURE__ */ a(J, { content: l.content }),
8175
- ld(l, s.candidateLayout === "labeled-groups" ? /* @__PURE__ */ a("span", {
8243
+ ud(l, s.candidateLayout === "labeled-groups" ? /* @__PURE__ */ a("span", {
8176
8244
  className: c["section-title"],
8177
8245
  children: r.candidateOptions
8178
8246
  }) : null, c, s.candidateLayout, s.markerSuffix),
@@ -8183,7 +8251,7 @@ function cd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8183
8251
  ]
8184
8252
  });
8185
8253
  }
8186
- function ld(e, t, n, r, i) {
8254
+ function ud(e, t, n, r, i) {
8187
8255
  var s, c;
8188
8256
  let l = (s = e.candidateOptions) == null ? [] : s, u = (c = e.blankOptionGroups) == null ? [] : c;
8189
8257
  return !l.length && !u.length ? null : r === "plain-list" && l.length > 0 ? /* @__PURE__ */ a("div", {
@@ -8200,7 +8268,7 @@ function ld(e, t, n, r, i) {
8200
8268
  })
8201
8269
  }) : /* @__PURE__ */ o("div", {
8202
8270
  className: n["candidate-section"],
8203
- children: [t, l.length > 0 ? /* @__PURE__ */ a(Eu, { children: l.map((e, t) => /* @__PURE__ */ o(Nl, {
8271
+ children: [t, l.length > 0 ? /* @__PURE__ */ a(Du, { children: l.map((e, t) => /* @__PURE__ */ o(Nl, {
8204
8272
  className: n["candidate-item"],
8205
8273
  children: [/* @__PURE__ */ o("span", {
8206
8274
  className: n.marker,
@@ -8214,7 +8282,7 @@ function ld(e, t, n, r, i) {
8214
8282
  children: [/* @__PURE__ */ o("span", {
8215
8283
  className: r === "plain-list" ? n["section-title"] : n.marker,
8216
8284
  children: [t + 1, "."]
8217
- }), /* @__PURE__ */ a(Eu, { children: e.options.map((e, t) => /* @__PURE__ */ o(Nl, {
8285
+ }), /* @__PURE__ */ a(Du, { children: e.options.map((e, t) => /* @__PURE__ */ o(Nl, {
8218
8286
  className: n["candidate-item"],
8219
8287
  children: [r === "plain-list" ? /* @__PURE__ */ a("span", {
8220
8288
  className: n.marker,
@@ -8227,7 +8295,7 @@ function ld(e, t, n, r, i) {
8227
8295
  }
8228
8296
  //#endregion
8229
8297
  //#region src/question/renderers/QuestionJudgementGroupView.tsx
8230
- function ud({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8298
+ function dd({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8231
8299
  let { renderer: s } = K(), c = mn(e.config.judgeAnswerMode), l = [{
8232
8300
  kind: "detailed",
8233
8301
  contents: hn(e.config.judgeAnswerMode, t.answers),
@@ -8244,7 +8312,7 @@ function ud({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8244
8312
  className: s["judgement-placeholder"],
8245
8313
  children: "\uff08\u3000\uff09"
8246
8314
  })]
8247
- }) : /* @__PURE__ */ a(wu, {
8315
+ }) : /* @__PURE__ */ a(Tu, {
8248
8316
  className: s["judgement-list"],
8249
8317
  columnCount: 2,
8250
8318
  role: "list",
@@ -8260,13 +8328,13 @@ function ud({ element: e, item: t, messages: n, showAnswer: r, stem: i }) {
8260
8328
  }
8261
8329
  //#endregion
8262
8330
  //#region src/question/renderers/QuestionLineConnectView.tsx
8263
- function dd({ item: e, messages: t, showAnswer: n }) {
8331
+ function fd({ item: e, messages: t, showAnswer: n }) {
8264
8332
  let { lineConnectColumnTitleVisibility: r, markerSuffix: i } = W(), { lineConnect: s, renderer: c } = K();
8265
8333
  return /* @__PURE__ */ o("div", {
8266
8334
  className: c.element,
8267
8335
  children: [/* @__PURE__ */ a("div", {
8268
8336
  className: s.board,
8269
- children: /* @__PURE__ */ a(wu, {
8337
+ children: /* @__PURE__ */ a(Tu, {
8270
8338
  className: s.columns,
8271
8339
  columnCount: e.columns.length,
8272
8340
  style: { gridTemplateColumns: `repeat(${e.columns.length}, minmax(12rem, 1fr))` },
@@ -8299,13 +8367,13 @@ function dd({ item: e, messages: t, showAnswer: n }) {
8299
8367
  }
8300
8368
  //#endregion
8301
8369
  //#region src/question/renderers/QuestionMatchingView.tsx
8302
- function fd({ item: e, messages: t, showAnswer: n }) {
8370
+ function pd({ item: e, messages: t, showAnswer: n }) {
8303
8371
  let { markerSuffix: r, matchingAnswerLayout: i } = W(), { matching: s, renderer: c } = K();
8304
8372
  return /* @__PURE__ */ o("div", {
8305
8373
  className: c.element,
8306
8374
  children: [/* @__PURE__ */ a("div", {
8307
8375
  className: s.board,
8308
- children: /* @__PURE__ */ a(wu, {
8376
+ children: /* @__PURE__ */ a(Tu, {
8309
8377
  className: s.columns,
8310
8378
  columnCount: e.columns.length,
8311
8379
  children: e.columns.map((e) => /* @__PURE__ */ a("section", {
@@ -8330,8 +8398,8 @@ function fd({ item: e, messages: t, showAnswer: n }) {
8330
8398
  }
8331
8399
  //#endregion
8332
8400
  //#region src/question/renderers/QuestionOptionGroupView.tsx
8333
- function pd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8334
- let { markerSuffix: s, optionStandardAnswer: c } = W(), { renderer: l, table: u } = K(), d = gn(t, e.config.optionLabelStyle), f = bu(e, t), p = c === "value-only" ? md(f.map((e) => e.marker), n) : f;
8401
+ function md({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8402
+ let { markerSuffix: s, optionStandardAnswer: c } = W(), { renderer: l, table: u } = K(), d = gn(t, e.config.optionLabelStyle), f = xu(e, t), p = c === "value-only" ? hd(f.map((e) => e.marker), n) : f;
8335
8403
  return e.config.renderer === "table" ? /* @__PURE__ */ o("div", {
8336
8404
  className: l.element,
8337
8405
  children: [/* @__PURE__ */ a("div", {
@@ -8353,7 +8421,7 @@ function pd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8353
8421
  }) : null]
8354
8422
  }) : /* @__PURE__ */ o("div", {
8355
8423
  className: l.element,
8356
- children: [/* @__PURE__ */ a(Eu, { children: d.map((e) => /* @__PURE__ */ o(Nl, {
8424
+ children: [/* @__PURE__ */ a(Du, { children: d.map((e) => /* @__PURE__ */ o(Nl, {
8357
8425
  className: l["option-item"],
8358
8426
  children: [/* @__PURE__ */ o("span", {
8359
8427
  className: l.marker,
@@ -8365,7 +8433,7 @@ function pd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8365
8433
  }) : null]
8366
8434
  });
8367
8435
  }
8368
- function md(e, t) {
8436
+ function hd(e, t) {
8369
8437
  let n = e.filter(Boolean).join(t === "zh-CN" ? "\uff1b" : "; ");
8370
8438
  return n ? [{
8371
8439
  contents: [n],
@@ -8375,7 +8443,7 @@ function md(e, t) {
8375
8443
  }
8376
8444
  //#endregion
8377
8445
  //#region src/question/renderers/QuestionOrderingView.tsx
8378
- function hd({ item: e, messages: t, showAnswer: n }) {
8446
+ function gd({ item: e, messages: t, showAnswer: n }) {
8379
8447
  let { markerSuffix: r } = W(), { renderer: i } = K();
8380
8448
  return /* @__PURE__ */ o("div", {
8381
8449
  className: i.element,
@@ -8389,16 +8457,16 @@ function hd({ item: e, messages: t, showAnswer: n }) {
8389
8457
  }), /* @__PURE__ */ a(J, { content: e.content })]
8390
8458
  }, e.id))
8391
8459
  }), n ? /* @__PURE__ */ a(Y, {
8392
- groups: Mu(e),
8460
+ groups: Nu(e),
8393
8461
  title: t.standardAnswer
8394
8462
  }) : null]
8395
8463
  });
8396
8464
  }
8397
8465
  //#endregion
8398
8466
  //#region src/question/renderers/QuestionTextMarkerView.tsx
8399
- function gd({ item: e, messages: t, showAnswer: n }) {
8467
+ function _d({ item: e, messages: t, showAnswer: n }) {
8400
8468
  let r = Et(e.content.json).filter((t) => e.answers.includes(t.markerId)).map((e) => e.text);
8401
- return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Pu, {
8469
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(Fu, {
8402
8470
  answerMarkers: e.answers,
8403
8471
  content: e.content,
8404
8472
  showAnswer: n
@@ -8413,8 +8481,8 @@ function gd({ item: e, messages: t, showAnswer: n }) {
8413
8481
  }
8414
8482
  //#endregion
8415
8483
  //#region src/question/renderers/QuestionWordBuilderView.tsx
8416
- function _d({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8417
- let s = W(), { renderer: c } = K(), l = kn(t, !0, e), u = zu(l, (e, t) => s.blankAnswerMarker(e, t, n, r.blankLabel));
8484
+ function vd({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8485
+ let s = W(), { renderer: c } = K(), l = kn(t, !0, e), u = Bu(l, (e, t) => s.blankAnswerMarker(e, t, n, r.blankLabel));
8418
8486
  return /* @__PURE__ */ o("div", {
8419
8487
  className: c.element,
8420
8488
  children: [
@@ -8431,7 +8499,7 @@ function _d({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8431
8499
  children: [/* @__PURE__ */ a("span", {
8432
8500
  className: c["section-title"],
8433
8501
  children: r.candidateOptions
8434
- }), /* @__PURE__ */ a(wu, {
8502
+ }), /* @__PURE__ */ a(Tu, {
8435
8503
  className: c["word-builder-candidate-list"],
8436
8504
  columnCount: Math.min(l.candidateOptions.length, 4),
8437
8505
  role: "list",
@@ -8450,25 +8518,25 @@ function _d({ element: e, item: t, locale: n, messages: r, showAnswer: i }) {
8450
8518
  }
8451
8519
  //#endregion
8452
8520
  //#region src/question/renderers/QuestionContentElementView.tsx
8453
- function vd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8521
+ function yd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8454
8522
  let { textResponseVisibility: s } = W(), { textResponse: c } = K();
8455
8523
  if (e.type !== t.type) throw Error(`\u9898\u76ee\u5143\u7d20\u7ed3\u6784\u4e0d\u5339\u914d\uff0cexpected=${e.type}\uff0cactual=${t.type}`);
8456
- return e.type === "richText" ? /* @__PURE__ */ a(J, { content: t.content }) : e.type === "textResponse" ? s === "hidden" ? null : /* @__PURE__ */ a(td, {
8524
+ return e.type === "richText" ? /* @__PURE__ */ a(J, { content: t.content }) : e.type === "textResponse" ? s === "hidden" ? null : /* @__PURE__ */ a(nd, {
8457
8525
  className: c.placeholder,
8458
8526
  label: i.textResponsePlaceholder
8459
- }) : e.type === "ordering" ? /* @__PURE__ */ a(hd, {
8527
+ }) : e.type === "ordering" ? /* @__PURE__ */ a(gd, {
8460
8528
  item: t,
8461
8529
  messages: i,
8462
8530
  showAnswer: o
8463
- }) : e.type === "classification" ? /* @__PURE__ */ a(sd, {
8531
+ }) : e.type === "classification" ? /* @__PURE__ */ a(cd, {
8464
8532
  item: t,
8465
8533
  messages: i,
8466
8534
  showAnswer: o
8467
- }) : e.type === "textMarker" ? /* @__PURE__ */ a(gd, {
8535
+ }) : e.type === "textMarker" ? /* @__PURE__ */ a(_d, {
8468
8536
  item: t,
8469
8537
  messages: i,
8470
8538
  showAnswer: o
8471
- }) : yd({
8539
+ }) : bd({
8472
8540
  element: e,
8473
8541
  item: t,
8474
8542
  judgementStem: n,
@@ -8477,48 +8545,48 @@ function vd({ element: e, item: t, judgementStem: n, locale: r, messages: i, sho
8477
8545
  showAnswer: o
8478
8546
  });
8479
8547
  }
8480
- function yd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8548
+ function bd({ element: e, item: t, judgementStem: n, locale: r, messages: i, showAnswer: o }) {
8481
8549
  switch (e.type) {
8482
- case "choice": return /* @__PURE__ */ a(pd, {
8550
+ case "choice": return /* @__PURE__ */ a(md, {
8483
8551
  element: e,
8484
8552
  item: t,
8485
8553
  locale: r,
8486
8554
  messages: i,
8487
8555
  showAnswer: o
8488
8556
  });
8489
- case "fill": return /* @__PURE__ */ a(ad, {
8557
+ case "fill": return /* @__PURE__ */ a(od, {
8490
8558
  item: t,
8491
8559
  locale: r,
8492
8560
  messages: i,
8493
8561
  showAnswer: o
8494
8562
  });
8495
- case "inlineFill": return /* @__PURE__ */ a(cd, {
8563
+ case "inlineFill": return /* @__PURE__ */ a(ld, {
8496
8564
  element: e,
8497
8565
  item: t,
8498
8566
  locale: r,
8499
8567
  messages: i,
8500
8568
  showAnswer: o
8501
8569
  });
8502
- case "wordBuilder": return /* @__PURE__ */ a(_d, {
8570
+ case "wordBuilder": return /* @__PURE__ */ a(vd, {
8503
8571
  element: e,
8504
8572
  item: t,
8505
8573
  locale: r,
8506
8574
  messages: i,
8507
8575
  showAnswer: o
8508
8576
  });
8509
- case "judgement": return /* @__PURE__ */ a(ud, {
8577
+ case "judgement": return /* @__PURE__ */ a(dd, {
8510
8578
  element: e,
8511
8579
  item: t,
8512
8580
  stem: n,
8513
8581
  messages: i,
8514
8582
  showAnswer: o
8515
8583
  });
8516
- case "lineConnect": return /* @__PURE__ */ a(dd, {
8584
+ case "lineConnect": return /* @__PURE__ */ a(fd, {
8517
8585
  item: t,
8518
8586
  messages: i,
8519
8587
  showAnswer: o
8520
8588
  });
8521
- case "matching": return /* @__PURE__ */ a(fd, {
8589
+ case "matching": return /* @__PURE__ */ a(pd, {
8522
8590
  item: t,
8523
8591
  messages: i,
8524
8592
  showAnswer: o
@@ -8527,7 +8595,7 @@ function yd({ element: e, item: t, judgementStem: n, locale: r, messages: i, sho
8527
8595
  }
8528
8596
  //#endregion
8529
8597
  //#region src/question/preview/question-preview-layout.ts
8530
- var bd = l({
8598
+ var xd = l({
8531
8599
  root: "_root_13x11_1",
8532
8600
  empty: "_empty_13x11_17",
8533
8601
  "element-list": "_element-list_13x11_29",
@@ -8536,13 +8604,13 @@ var bd = l({
8536
8604
  extra: "_extra_13x11_40",
8537
8605
  child: "_child_13x11_30"
8538
8606
  });
8539
- function xd() {
8540
- return d(bd);
8607
+ function Sd() {
8608
+ return d(xd);
8541
8609
  }
8542
8610
  //#endregion
8543
8611
  //#region src/question/preview/QuestionCompositePreview.tsx
8544
- function Sd({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionNumber: r, value: i }) {
8545
- let o = xd();
8612
+ function Cd({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionNumber: r, value: i }) {
8613
+ let o = Sd();
8546
8614
  return i.children.length === 0 ? /* @__PURE__ */ a("div", {
8547
8615
  className: o.empty,
8548
8616
  children: t.previewEmpty
@@ -8563,12 +8631,12 @@ function Sd({ childIndexPath: e = [], messages: t, renderChild: n, rootQuestionN
8563
8631
  }
8564
8632
  //#endregion
8565
8633
  //#region src/question/preview/QuestionPreviewContent.tsx
8566
- var Cd = ["locale"];
8567
- function wd(e) {
8568
- let { locale: t = "zh-CN" } = e, n = Oa(e, Cd), r = ks(n.value, n.questionTypeTemplates);
8634
+ var wd = ["locale"];
8635
+ function Td(e) {
8636
+ let { locale: t = "zh-CN" } = e, n = Oa(e, wd), r = ks(n.value, n.questionTypeTemplates);
8569
8637
  return /* @__PURE__ */ a(Sl.Provider, {
8570
8638
  value: t,
8571
- children: /* @__PURE__ */ a(Td, j(j({}, n), {}, {
8639
+ children: /* @__PURE__ */ a(Ed, j(j({}, n), {}, {
8572
8640
  childIndexPath: [],
8573
8641
  locale: t,
8574
8642
  messages: Bc(t),
@@ -8576,8 +8644,8 @@ function wd(e) {
8576
8644
  }))
8577
8645
  });
8578
8646
  }
8579
- function Td({ childIndexPath: e, className: t, locale: n, messages: r, presentation: s, rootQuestionNumber: c, showAnswer: l = !1, showExtraAttributes: u = !1, questionTypeTemplates: d, value: f }) {
8580
- let p = xd(), m = da(d, f);
8647
+ function Ed({ childIndexPath: e, className: t, locale: n, messages: r, presentation: s, rootQuestionNumber: c, showAnswer: l = !1, showExtraAttributes: u = !1, questionTypeTemplates: d, value: f }) {
8648
+ let p = Sd(), m = da(d, f);
8581
8649
  if (!m) return /* @__PURE__ */ a("div", {
8582
8650
  className: U(p.root, t),
8583
8651
  "data-locale": n,
@@ -8591,11 +8659,11 @@ function Td({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8591
8659
  className: p["element-list"],
8592
8660
  children: m.elements.map((e, t) => {
8593
8661
  var i;
8594
- if (s === "print" && e.type === "richText" && ((i = Dd(m.elements, t + 1)) == null ? void 0 : i.type) === "judgement") return null;
8595
- let o = cn(f, t, e), c = s === "print" ? Ed(m, f, t) : void 0;
8662
+ if (s === "print" && e.type === "richText" && ((i = Od(m.elements, t + 1)) == null ? void 0 : i.type) === "judgement") return null;
8663
+ let o = cn(f, t, e), c = s === "print" ? Dd(m, f, t) : void 0;
8596
8664
  return /* @__PURE__ */ a("section", {
8597
8665
  className: p.element,
8598
- children: /* @__PURE__ */ a(vd, {
8666
+ children: /* @__PURE__ */ a(yd, {
8599
8667
  element: e,
8600
8668
  item: o,
8601
8669
  judgementStem: c,
@@ -8611,19 +8679,19 @@ function Td({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8611
8679
  let i = ln(f, t, e);
8612
8680
  return F(i.content) ? null : /* @__PURE__ */ o("section", {
8613
8681
  className: p.extra,
8614
- children: [/* @__PURE__ */ a(Al, { children: e.name }), /* @__PURE__ */ a(vd, {
8615
- element: kd(e),
8616
- item: Ad(i),
8682
+ children: [/* @__PURE__ */ a(Al, { children: e.name }), /* @__PURE__ */ a(yd, {
8683
+ element: Ad(e),
8684
+ item: jd(i),
8617
8685
  locale: n,
8618
8686
  messages: r,
8619
8687
  showAnswer: !1
8620
8688
  })]
8621
8689
  }, `${e.type}-${t}`);
8622
8690
  })
8623
- }) : null, _ = f.children.length === 0 ? null : /* @__PURE__ */ a(Sd, {
8691
+ }) : null, _ = f.children.length === 0 ? null : /* @__PURE__ */ a(Cd, {
8624
8692
  childIndexPath: e,
8625
8693
  messages: r,
8626
- renderChild: (e, t) => /* @__PURE__ */ a(Td, {
8694
+ renderChild: (e, t) => /* @__PURE__ */ a(Ed, {
8627
8695
  childIndexPath: t,
8628
8696
  locale: n,
8629
8697
  messages: r,
@@ -8641,7 +8709,7 @@ function Td({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8641
8709
  className: U(p.root, t),
8642
8710
  "data-locale": n,
8643
8711
  "data-question-presentation": s,
8644
- children: Od(m, f) ? /* @__PURE__ */ a("div", {
8712
+ children: kd(m, f) ? /* @__PURE__ */ a("div", {
8645
8713
  className: p.empty,
8646
8714
  children: r.previewEmpty
8647
8715
  }) : /* @__PURE__ */ o(i, { children: [
@@ -8651,24 +8719,24 @@ function Td({ childIndexPath: e, className: t, locale: n, messages: r, presentat
8651
8719
  ] })
8652
8720
  });
8653
8721
  }
8654
- function Ed(e, t, n) {
8655
- let r = Dd(e.elements, n), i = Dd(e.elements, n - 1);
8722
+ function Dd(e, t, n) {
8723
+ let r = Od(e.elements, n), i = Od(e.elements, n - 1);
8656
8724
  if (!((r == null ? void 0 : r.type) !== "judgement" || (i == null ? void 0 : i.type) !== "richText")) return cn(t, n - 1, i).content;
8657
8725
  }
8658
- function Dd(e, t) {
8726
+ function Od(e, t) {
8659
8727
  return t >= 0 ? e.slice(t, t + 1)[0] : void 0;
8660
8728
  }
8661
- function Od(e, t) {
8729
+ function kd(e, t) {
8662
8730
  return t.elements.length === 0 && t.extras.length === 0 && t.children.length === 0;
8663
8731
  }
8664
- function kd(e) {
8732
+ function Ad(e) {
8665
8733
  return {
8666
8734
  config: {},
8667
8735
  name: e.name,
8668
8736
  type: "richText"
8669
8737
  };
8670
8738
  }
8671
- function Ad(e) {
8739
+ function jd(e) {
8672
8740
  return {
8673
8741
  content: e.content,
8674
8742
  type: "richText"
@@ -8676,12 +8744,12 @@ function Ad(e) {
8676
8744
  }
8677
8745
  //#endregion
8678
8746
  //#region src/question/preview/QuestionPreview.tsx
8679
- function jd(e) {
8680
- return /* @__PURE__ */ a(wd, j(j({}, e), {}, { presentation: "preview" }));
8747
+ function Md(e) {
8748
+ return /* @__PURE__ */ a(Td, j(j({}, e), {}, { presentation: "preview" }));
8681
8749
  }
8682
8750
  //#endregion
8683
8751
  //#region src/question/preview/QuestionPrintAnswer.module.css
8684
- var Md = {
8752
+ var Nd = {
8685
8753
  "answer-panel": "_answer-panel_1yaiz_1",
8686
8754
  "answer-list": "_answer-list_1yaiz_8",
8687
8755
  "answer-row": "_answer-row_1yaiz_20",
@@ -8689,11 +8757,11 @@ var Md = {
8689
8757
  "answer-marker-only": "_answer-marker-only_1yaiz_39",
8690
8758
  "answer-content-list": "_answer-content-list_1yaiz_43",
8691
8759
  "answer-value": "_answer-value_1yaiz_49"
8692
- }, Nd = {
8760
+ }, Pd = {
8693
8761
  "blank-list": "_blank-list_14bj2_1",
8694
8762
  "blank-item": "_blank-item_14bj2_9",
8695
8763
  "blank-field": "_blank-field_14bj2_15"
8696
- }, Pd = {
8764
+ }, Fd = {
8697
8765
  board: "_board_fqylx_1",
8698
8766
  pool: "_pool_fqylx_5",
8699
8767
  zones: "_zones_fqylx_11",
@@ -8701,17 +8769,17 @@ var Md = {
8701
8769
  "zone-title": "_zone-title_fqylx_22",
8702
8770
  item: "_item_fqylx_28",
8703
8771
  empty: "_empty_fqylx_34"
8704
- }, Fd = {
8772
+ }, Id = {
8705
8773
  board: "_board_1qh77_1",
8706
8774
  columns: "_columns_1qh77_6",
8707
8775
  "column-title": "_column-title_1qh77_11"
8708
- }, Id = {
8776
+ }, Ld = {
8709
8777
  board: "_board_rmc9z_1",
8710
8778
  columns: "_columns_rmc9z_5"
8711
- }, Ld = {
8779
+ }, Rd = {
8712
8780
  media: "_media_a9b7d_1",
8713
8781
  "math-inline": "_math-inline_a9b7d_9"
8714
- }, Rd = {
8782
+ }, zd = {
8715
8783
  "rich-content": "_rich-content_6llgo_1",
8716
8784
  element: "_element_6llgo_61",
8717
8785
  "option-list": "_option-list_6llgo_63",
@@ -8730,34 +8798,34 @@ var Md = {
8730
8798
  "section-title": "_section-title_6llgo_142",
8731
8799
  "word-builder-blank": "_word-builder-blank_6llgo_148",
8732
8800
  "word-builder-candidate-list": "_word-builder-candidate-list_6llgo_162"
8733
- }, zd = { title: "_title_1csak_1" }, Bd = {
8801
+ }, Bd = { title: "_title_1csak_1" }, Vd = {
8734
8802
  "table-wrap": "_table-wrap_1epdp_1",
8735
8803
  table: "_table_1epdp_1",
8736
8804
  "table-option-column": "_table-option-column_1epdp_13",
8737
8805
  "table-option-marker": "_table-option-marker_1epdp_31"
8738
- }, Vd = {
8806
+ }, Hd = {
8739
8807
  content: "_content_1gnvb_1",
8740
8808
  paragraph: "_paragraph_1gnvb_10",
8741
8809
  marker: "_marker_1gnvb_14",
8742
8810
  "marker-button": "_marker-button_1gnvb_21",
8743
8811
  "marker-selected": "_marker-selected_1gnvb_30",
8744
8812
  "marker-answer": "_marker-answer_1gnvb_31"
8745
- }, Hd = { placeholder: "_placeholder_np8ps_1" }, Ud = {
8746
- column: Rd["labeled-column"],
8747
- item: Rd["labeled-item"],
8748
- marker: Rd["labeled-marker"]
8749
- }, Wd = {
8750
- answer: Md,
8751
- blankGroup: Nd,
8752
- classification: Pd,
8753
- lineConnect: j(j({}, Fd), Ud),
8754
- matching: j(j({}, Id), Ud),
8755
- renderer: j(j({}, Rd), {}, { "rich-content": `${Rd["rich-content"]} ${Ld.media}` }),
8756
- sectionTitle: zd,
8757
- table: Bd,
8758
- textMarker: Vd,
8759
- textResponse: Hd
8813
+ }, Ud = { placeholder: "_placeholder_np8ps_1" }, Wd = {
8814
+ column: zd["labeled-column"],
8815
+ item: zd["labeled-item"],
8816
+ marker: zd["labeled-marker"]
8760
8817
  }, Gd = {
8818
+ answer: Nd,
8819
+ blankGroup: Pd,
8820
+ classification: Fd,
8821
+ lineConnect: j(j({}, Id), Wd),
8822
+ matching: j(j({}, Ld), Wd),
8823
+ renderer: j(j({}, zd), {}, { "rich-content": `${zd["rich-content"]} ${Rd.media}` }),
8824
+ sectionTitle: Bd,
8825
+ table: Vd,
8826
+ textMarker: Hd,
8827
+ textResponse: Ud
8828
+ }, Kd = {
8761
8829
  root: "_root_1mvma_1",
8762
8830
  empty: "_empty_1mvma_21",
8763
8831
  "element-list": "_element-list_1mvma_29",
@@ -8768,19 +8836,19 @@ var Md = {
8768
8836
  };
8769
8837
  //#endregion
8770
8838
  //#region src/question/preview/QuestionPrintPreview.tsx
8771
- function Kd(e) {
8839
+ function qd(e) {
8772
8840
  return /* @__PURE__ */ a(xl.Provider, {
8773
8841
  value: bl,
8774
8842
  children: /* @__PURE__ */ a(kl.Provider, {
8775
- value: Wd,
8776
- children: /* @__PURE__ */ a(bd.Provider, {
8777
- value: Gd,
8778
- children: /* @__PURE__ */ a(wd, j(j({}, e), {}, { presentation: "print" }))
8843
+ value: Gd,
8844
+ children: /* @__PURE__ */ a(xd.Provider, {
8845
+ value: Kd,
8846
+ children: /* @__PURE__ */ a(Td, j(j({}, e), {}, { presentation: "print" }))
8779
8847
  })
8780
8848
  })
8781
8849
  });
8782
8850
  }
8783
- var qd = {
8851
+ var Jd = {
8784
8852
  root: "_root_17bqr_1",
8785
8853
  toolbar: "_toolbar_17bqr_26",
8786
8854
  "toolbar-title": "_toolbar-title_17bqr_36",
@@ -8832,7 +8900,7 @@ var qd = {
8832
8900
  "palette-section": "_palette-section_vhj2r_56",
8833
8901
  "palette-section-title": "_palette-section-title_vhj2r_62",
8834
8902
  "palette-button": "_palette-button_vhj2r_70"
8835
- }, Jd = {
8903
+ }, Yd = {
8836
8904
  "en-US": {
8837
8905
  addElement: "Add element",
8838
8906
  addExtra: "Add extra attribute",
@@ -9054,24 +9122,24 @@ var qd = {
9054
9122
  wordBuilderLabel: "\u7ec4\u8bcd\u62fc\u5199"
9055
9123
  }
9056
9124
  };
9057
- function Yd(e, t) {
9125
+ function Xd(e, t) {
9058
9126
  var n;
9059
9127
  return (n = e.extraDescriptions.get(t)) == null ? t : n;
9060
9128
  }
9061
- function Xd(e, t) {
9129
+ function Zd(e, t) {
9062
9130
  var n;
9063
9131
  return (n = e.extraLabels.get(t)) == null ? t : n;
9064
9132
  }
9065
- function Zd(e) {
9133
+ function Qd(e) {
9066
9134
  switch (e) {
9067
- case "en-US": return Jd["en-US"];
9068
- case "zh-CN": return Jd["zh-CN"];
9135
+ case "en-US": return Yd["en-US"];
9136
+ case "zh-CN": return Yd["zh-CN"];
9069
9137
  }
9070
9138
  }
9071
- function Qd(e, t) {
9072
- return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : tf(e, t);
9139
+ function $d(e, t) {
9140
+ return t === "richText" ? e.richTextDescription : t === "ordering" ? e.orderingDescription : nf(e, t);
9073
9141
  }
9074
- var $d = {
9142
+ var ef = {
9075
9143
  choice: (e) => e.optionGroupDescription,
9076
9144
  classification: (e) => e.classificationDescription,
9077
9145
  fill: (e) => e.blankGroupDescription,
@@ -9082,7 +9150,7 @@ var $d = {
9082
9150
  textMarker: (e) => e.textMarkerDescription,
9083
9151
  textResponse: (e) => e.textResponseDescription,
9084
9152
  wordBuilder: (e) => e.wordBuilderDescription
9085
- }, ef = {
9153
+ }, tf = {
9086
9154
  choice: (e) => e.optionGroupLabel,
9087
9155
  classification: (e) => e.classificationLabel,
9088
9156
  fill: (e) => e.blankGroupLabel,
@@ -9094,30 +9162,30 @@ var $d = {
9094
9162
  textResponse: (e) => e.textResponseLabel,
9095
9163
  wordBuilder: (e) => e.wordBuilderLabel
9096
9164
  };
9097
- function tf(e, t) {
9098
- return $d[t](e);
9099
- }
9100
9165
  function nf(e, t) {
9101
- return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : rf(e, t);
9166
+ return ef[t](e);
9102
9167
  }
9103
9168
  function rf(e, t) {
9104
- return ef[t](e);
9169
+ return t === "richText" ? e.richTextLabel : t === "ordering" ? e.orderingLabel : af(e, t);
9105
9170
  }
9106
9171
  function af(e, t) {
9172
+ return tf[t](e);
9173
+ }
9174
+ function of(e, t) {
9107
9175
  var n;
9108
9176
  return (n = e.optionValueLabels.get(t)) == null ? t : n;
9109
9177
  }
9110
- function of(e, t) {
9178
+ function sf(e, t) {
9111
9179
  var n;
9112
9180
  return (n = e.candidateModeValueLabels.get(t)) == null ? t : n;
9113
9181
  }
9114
- function sf(e, t) {
9182
+ function cf(e, t) {
9115
9183
  var n;
9116
9184
  return (n = e.lineConnectLabelStyleLabels.get(t)) == null ? t : n;
9117
9185
  }
9118
9186
  //#endregion
9119
9187
  //#region src/question/structure-editor/QuestionStructureCanvas.tsx
9120
- function cf({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
9188
+ function lf({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExtra: i, onMoveElement: s, onSelectElement: c, selectedElementClientId: l }) {
9121
9189
  let [u, d] = h(null);
9122
9190
  return /* @__PURE__ */ o("section", {
9123
9191
  className: Q.panel,
@@ -9137,7 +9205,7 @@ function cf({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
9137
9205
  className: Z["element-list"],
9138
9206
  children: [
9139
9207
  e.map((t, i) => {
9140
- let f = t.clientId === l, p = nf(n, t.type);
9208
+ let f = t.clientId === l, p = rf(n, t.type);
9141
9209
  return /* @__PURE__ */ o("div", {
9142
9210
  className: `${Z["element-card"]} ${f ? Z.active : ""}`,
9143
9211
  onClick: () => c(t.clientId),
@@ -9201,7 +9269,7 @@ function cf({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
9201
9269
  children: n.extraTitle
9202
9270
  }) : null,
9203
9271
  t.map((t, r) => {
9204
- let s = t.clientId === l, f = Xd(n, t.type);
9272
+ let s = t.clientId === l, f = Zd(n, t.type);
9205
9273
  return /* @__PURE__ */ o("div", {
9206
9274
  className: `${Z["element-card"]} ${s ? Z.active : ""}`,
9207
9275
  onClick: () => c(t.clientId),
@@ -9250,7 +9318,7 @@ function cf({ elements: e, extras: t, labels: n, onDeleteElement: r, onDeleteExt
9250
9318
  }
9251
9319
  //#endregion
9252
9320
  //#region src/question/structure-editor/QuestionStructurePalette.tsx
9253
- function lf({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9321
+ function uf({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9254
9322
  let i = new Set(e);
9255
9323
  return /* @__PURE__ */ o("aside", {
9256
9324
  className: Q.panel,
@@ -9265,11 +9333,11 @@ function lf({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9265
9333
  /* @__PURE__ */ a("div", {
9266
9334
  className: Q.palette,
9267
9335
  children: ae.map((e) => /* @__PURE__ */ o("button", {
9268
- "aria-label": `${t.addElement}: ${nf(t, e)}`,
9336
+ "aria-label": `${t.addElement}: ${rf(t, e)}`,
9269
9337
  className: Q["palette-button"],
9270
9338
  onClick: () => n(e),
9271
9339
  type: "button",
9272
- children: [/* @__PURE__ */ a("strong", { children: nf(t, e) }), /* @__PURE__ */ a("small", { children: Qd(t, e) })]
9340
+ children: [/* @__PURE__ */ a("strong", { children: rf(t, e) }), /* @__PURE__ */ a("small", { children: $d(t, e) })]
9273
9341
  }, e))
9274
9342
  }),
9275
9343
  /* @__PURE__ */ o("div", {
@@ -9282,12 +9350,12 @@ function lf({ addedExtraTypes: e, labels: t, onAddElement: n, onAddExtra: r }) {
9282
9350
  children: oe.map((e) => {
9283
9351
  let n = i.has(e);
9284
9352
  return /* @__PURE__ */ o("button", {
9285
- "aria-label": `${t.addExtra}: ${Xd(t, e)}`,
9353
+ "aria-label": `${t.addExtra}: ${Zd(t, e)}`,
9286
9354
  className: Q["palette-button"],
9287
9355
  disabled: n,
9288
9356
  onClick: () => r(e),
9289
9357
  type: "button",
9290
- children: [/* @__PURE__ */ a("strong", { children: Xd(t, e) }), /* @__PURE__ */ a("small", { children: Yd(t, e) })]
9358
+ children: [/* @__PURE__ */ a("strong", { children: Zd(t, e) }), /* @__PURE__ */ a("small", { children: Xd(t, e) })]
9291
9359
  }, e);
9292
9360
  })
9293
9361
  })]
@@ -9304,27 +9372,27 @@ var $ = {
9304
9372
  select: "_select_tgswd_27",
9305
9373
  textarea: "_textarea_tgswd_28",
9306
9374
  empty: "_empty_tgswd_61"
9307
- }, uf = [
9375
+ }, df = [
9308
9376
  "none",
9309
9377
  "sharedPool",
9310
9378
  "perBlankOptions"
9311
- ], df = [
9379
+ ], ff = [
9312
9380
  "upperAlpha",
9313
9381
  "lowerAlpha",
9314
9382
  "number"
9315
- ], ff = [
9383
+ ], pf = [
9316
9384
  "number",
9317
9385
  "upperAlpha",
9318
9386
  "lowerAlpha",
9319
9387
  "lowerRoman",
9320
9388
  "chineseNumber",
9321
9389
  "none"
9322
- ], pf = [
9390
+ ], mf = [
9323
9391
  2,
9324
9392
  3,
9325
9393
  4,
9326
9394
  5
9327
- ], mf = ["standard", "table"], hf = ["single", "multiple"], gf = ["spelling", "sentence"], _f = [
9395
+ ], hf = ["standard", "table"], gf = ["single", "multiple"], _f = ["spelling", "sentence"], vf = [
9328
9396
  "correctWrong",
9329
9397
  "yesNo",
9330
9398
  "validInvalid",
@@ -9332,8 +9400,8 @@ var $ = {
9332
9400
  "rightWrong",
9333
9401
  "checkCross"
9334
9402
  ];
9335
- function vf({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
9336
- let f = yf({
9403
+ function yf({ description: e, globalConfig: t, isSubjective: n, labels: r, onElementChange: i, onExtraChange: s, onGlobalConfigChange: c, onMetadataChange: l, selectedExtra: u, selectedElement: d }) {
9404
+ let f = bf({
9337
9405
  labels: r,
9338
9406
  onElementChange: i,
9339
9407
  onExtraChange: s,
@@ -9415,7 +9483,7 @@ function vf({ description: e, globalConfig: t, isSubjective: n, labels: r, onEle
9415
9483
  })]
9416
9484
  });
9417
9485
  }
9418
- function yf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
9486
+ function bf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement: r, selectedExtra: i }) {
9419
9487
  return r ? /* @__PURE__ */ o("div", {
9420
9488
  className: $["form-stack"],
9421
9489
  children: [
@@ -9435,7 +9503,7 @@ function yf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
9435
9503
  value: r.enName
9436
9504
  })]
9437
9505
  }),
9438
- bf(r, e, t)
9506
+ xf(r, e, t)
9439
9507
  ]
9440
9508
  }) : i ? /* @__PURE__ */ o("div", {
9441
9509
  className: $["form-stack"],
@@ -9459,10 +9527,10 @@ function yf({ labels: e, onElementChange: t, onExtraChange: n, selectedElement:
9459
9527
  children: e.noElement
9460
9528
  });
9461
9529
  }
9462
- function bf(e, t, n) {
9463
- return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : xf(e, t, n);
9464
- }
9465
9530
  function xf(e, t, n) {
9531
+ return e.type === "fill" || e.type === "classification" || e.type === "ordering" || e.type === "richText" || e.type === "textMarker" || e.type === "textResponse" ? null : Sf(e, t, n);
9532
+ }
9533
+ function Sf(e, t, n) {
9466
9534
  switch (e.type) {
9467
9535
  case "inlineFill": return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
9468
9536
  className: $["form-row"],
@@ -9470,9 +9538,9 @@ function xf(e, t, n) {
9470
9538
  className: $.select,
9471
9539
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { candidateMode: t.target.value }) })),
9472
9540
  value: e.config.candidateMode,
9473
- children: uf.map((e) => /* @__PURE__ */ a("option", {
9541
+ children: df.map((e) => /* @__PURE__ */ a("option", {
9474
9542
  value: e,
9475
- children: of(t, e)
9543
+ children: sf(t, e)
9476
9544
  }, e))
9477
9545
  })]
9478
9546
  }), /* @__PURE__ */ o("label", {
@@ -9489,9 +9557,9 @@ function xf(e, t, n) {
9489
9557
  className: $.select,
9490
9558
  onChange: (t) => n(j(j({}, e), {}, { config: { builderMode: t.target.value } })),
9491
9559
  value: e.config.builderMode,
9492
- children: gf.map((e) => /* @__PURE__ */ a("option", {
9560
+ children: _f.map((e) => /* @__PURE__ */ a("option", {
9493
9561
  value: e,
9494
- children: af(t, e)
9562
+ children: of(t, e)
9495
9563
  }, e))
9496
9564
  })]
9497
9565
  });
@@ -9501,18 +9569,18 @@ function xf(e, t, n) {
9501
9569
  className: $.select,
9502
9570
  onChange: (t) => n(j(j({}, e), {}, { config: { judgeAnswerMode: t.target.value } })),
9503
9571
  value: e.config.judgeAnswerMode,
9504
- children: _f.map((e) => /* @__PURE__ */ a("option", {
9572
+ children: vf.map((e) => /* @__PURE__ */ a("option", {
9505
9573
  value: e,
9506
- children: af(t, e)
9574
+ children: of(t, e)
9507
9575
  }, e))
9508
9576
  })]
9509
9577
  });
9510
- case "choice": return Sf(e, t, n);
9511
- case "lineConnect": return Cf(e, t, n);
9512
- case "matching": return wf(e, t, n);
9578
+ case "choice": return Cf(e, t, n);
9579
+ case "lineConnect": return wf(e, t, n);
9580
+ case "matching": return Tf(e, t, n);
9513
9581
  }
9514
9582
  }
9515
- function Sf(e, t, n) {
9583
+ function Cf(e, t, n) {
9516
9584
  return /* @__PURE__ */ o(i, { children: [
9517
9585
  /* @__PURE__ */ o("label", {
9518
9586
  className: $["form-row"],
@@ -9520,9 +9588,9 @@ function Sf(e, t, n) {
9520
9588
  className: $.select,
9521
9589
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { selectionType: t.target.value }) })),
9522
9590
  value: e.config.selectionType,
9523
- children: hf.map((e) => /* @__PURE__ */ a("option", {
9591
+ children: gf.map((e) => /* @__PURE__ */ a("option", {
9524
9592
  value: e,
9525
- children: af(t, e)
9593
+ children: of(t, e)
9526
9594
  }, e))
9527
9595
  })]
9528
9596
  }),
@@ -9532,9 +9600,9 @@ function Sf(e, t, n) {
9532
9600
  className: $.select,
9533
9601
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { optionLabelStyle: t.target.value }) })),
9534
9602
  value: e.config.optionLabelStyle,
9535
- children: df.map((e) => /* @__PURE__ */ a("option", {
9603
+ children: ff.map((e) => /* @__PURE__ */ a("option", {
9536
9604
  value: e,
9537
- children: af(t, e)
9605
+ children: of(t, e)
9538
9606
  }, e))
9539
9607
  })]
9540
9608
  }),
@@ -9544,23 +9612,23 @@ function Sf(e, t, n) {
9544
9612
  className: $.select,
9545
9613
  onChange: (t) => n(j(j({}, e), {}, { config: j(j({}, e.config), {}, { renderer: t.target.value }) })),
9546
9614
  value: e.config.renderer,
9547
- children: mf.map((e) => /* @__PURE__ */ a("option", {
9615
+ children: hf.map((e) => /* @__PURE__ */ a("option", {
9548
9616
  value: e,
9549
- children: af(t, e)
9617
+ children: of(t, e)
9550
9618
  }, e))
9551
9619
  })]
9552
9620
  })
9553
9621
  ] });
9554
9622
  }
9555
- function Cf(e, t, n) {
9556
- let r = Tf(e.config.columns);
9623
+ function wf(e, t, n) {
9624
+ let r = Ef(e.config.columns);
9557
9625
  return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("label", {
9558
9626
  className: $["form-row"],
9559
9627
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnCount }), /* @__PURE__ */ a("select", {
9560
9628
  className: $.select,
9561
- onChange: (t) => n(j(j({}, e), {}, { config: { columns: Df(r, Number(t.target.value)) } })),
9629
+ onChange: (t) => n(j(j({}, e), {}, { config: { columns: Of(r, Number(t.target.value)) } })),
9562
9630
  value: r.length,
9563
- children: pf.map((e) => /* @__PURE__ */ a("option", {
9631
+ children: mf.map((e) => /* @__PURE__ */ a("option", {
9564
9632
  value: e,
9565
9633
  children: e
9566
9634
  }, e))
@@ -9571,47 +9639,47 @@ function Cf(e, t, n) {
9571
9639
  className: $.select,
9572
9640
  onChange: (t) => n(j(j({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
9573
9641
  value: i.labelStyle,
9574
- children: ff.map((e) => /* @__PURE__ */ a("option", {
9642
+ children: pf.map((e) => /* @__PURE__ */ a("option", {
9575
9643
  value: e,
9576
- children: sf(t, e)
9644
+ children: cf(t, e)
9577
9645
  }, e))
9578
9646
  })]
9579
9647
  }, `line-column-${s}`))] });
9580
9648
  }
9581
- function wf(e, t, n) {
9582
- let r = Ef(e.config.columns);
9649
+ function Tf(e, t, n) {
9650
+ let r = Df(e.config.columns);
9583
9651
  return /* @__PURE__ */ a(i, { children: r.map((i, s) => /* @__PURE__ */ o("label", {
9584
9652
  className: $["form-row"],
9585
9653
  children: [/* @__PURE__ */ a("span", { children: t.lineConnectColumnLabel(s + 1) }), /* @__PURE__ */ a("select", {
9586
9654
  className: $.select,
9587
9655
  onChange: (t) => n(j(j({}, e), {}, { config: { columns: r.map((e, n) => n === s ? { labelStyle: t.target.value } : e) } })),
9588
9656
  value: i.labelStyle,
9589
- children: ff.map((e) => /* @__PURE__ */ a("option", {
9657
+ children: pf.map((e) => /* @__PURE__ */ a("option", {
9590
9658
  value: e,
9591
- children: sf(t, e)
9659
+ children: cf(t, e)
9592
9660
  }, e))
9593
9661
  })]
9594
9662
  }, `matching-column-${s}`)) });
9595
9663
  }
9596
- function Tf(e) {
9664
+ function Ef(e) {
9597
9665
  let t = e.slice(0, 5);
9598
- return t.length >= 2 ? t : [...t, ...ff.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9666
+ return t.length >= 2 ? t : [...t, ...pf.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9599
9667
  }
9600
- function Ef(e) {
9668
+ function Df(e) {
9601
9669
  let t = e.slice(0, 2);
9602
- return t.length >= 2 ? t : [...t, ...ff.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9670
+ return t.length >= 2 ? t : [...t, ...pf.slice(t.length, 2).map((e) => ({ labelStyle: e }))];
9603
9671
  }
9604
- function Df(e, t) {
9672
+ function Of(e, t) {
9605
9673
  return Array.from({ length: Math.min(5, Math.max(2, t)) }, (t, n) => {
9606
9674
  var r, i;
9607
- return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = ff[n]) == null ? "number" : i } : r;
9675
+ return (r = e.slice(n, n + 1)[0]) == null ? { labelStyle: (i = pf[n]) == null ? "number" : i } : r;
9608
9676
  });
9609
9677
  }
9610
9678
  //#endregion
9611
9679
  //#region src/question/structure-editor/QuestionStructureEditor.tsx
9612
- function Of({ locale: e = "zh-CN", onChange: t, value: n }) {
9680
+ function kf({ locale: e = "zh-CN", onChange: t, value: n }) {
9613
9681
  var r, i, s, c;
9614
- let l = Zd(e), [u, d] = h((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = kf(n, u);
9682
+ let l = Qd(e), [u, d] = h((r = (i = n.elements[0]) == null ? void 0 : i.clientId) == null ? null : r), { selectedElement: f, selectedExtra: p } = Af(n, u);
9615
9683
  function m(e) {
9616
9684
  let r = pe(e, n.elements);
9617
9685
  t(j(j({}, n), {}, { elements: [...n.elements, r] })), d(r.clientId);
@@ -9623,11 +9691,11 @@ function Of({ locale: e = "zh-CN", onChange: t, value: n }) {
9623
9691
  }
9624
9692
  function _(e) {
9625
9693
  let r = _e(n, e);
9626
- t(r), d(Af(r));
9694
+ t(r), d(jf(r));
9627
9695
  }
9628
9696
  function v(e) {
9629
9697
  let r = ge(n, e);
9630
- t(r), d(Af(r));
9698
+ t(r), d(jf(r));
9631
9699
  }
9632
9700
  function y(e) {
9633
9701
  t(be(n, e.clientId, e));
@@ -9642,19 +9710,19 @@ function Of({ locale: e = "zh-CN", onChange: t, value: n }) {
9642
9710
  t(Se(n, e));
9643
9711
  }
9644
9712
  return /* @__PURE__ */ a("section", {
9645
- className: qd.root,
9713
+ className: Jd.root,
9646
9714
  children: /* @__PURE__ */ a("div", {
9647
9715
  className: Q.shell,
9648
9716
  children: /* @__PURE__ */ o("div", {
9649
9717
  className: Q.grid,
9650
9718
  children: [
9651
- /* @__PURE__ */ a(lf, {
9719
+ /* @__PURE__ */ a(uf, {
9652
9720
  addedExtraTypes: n.extras.map((e) => e.type),
9653
9721
  labels: l,
9654
9722
  onAddElement: m,
9655
9723
  onAddExtra: g
9656
9724
  }),
9657
- /* @__PURE__ */ a(cf, {
9725
+ /* @__PURE__ */ a(lf, {
9658
9726
  elements: n.elements,
9659
9727
  extras: n.extras,
9660
9728
  labels: l,
@@ -9664,7 +9732,7 @@ function Of({ locale: e = "zh-CN", onChange: t, value: n }) {
9664
9732
  onSelectElement: d,
9665
9733
  selectedElementClientId: (s = (c = f == null ? void 0 : f.clientId) == null ? p == null ? void 0 : p.clientId : c) == null ? null : s
9666
9734
  }),
9667
- /* @__PURE__ */ a(vf, {
9735
+ /* @__PURE__ */ a(yf, {
9668
9736
  description: n.description,
9669
9737
  globalConfig: n.globalConfig,
9670
9738
  isSubjective: n.isSubjective,
@@ -9681,7 +9749,7 @@ function Of({ locale: e = "zh-CN", onChange: t, value: n }) {
9681
9749
  })
9682
9750
  });
9683
9751
  }
9684
- function kf(e, t) {
9752
+ function Af(e, t) {
9685
9753
  var n, r, i, a;
9686
9754
  let o = (n = e.elements.find((e) => e.clientId === t)) == null ? null : n, s = (r = e.extras.find((e) => e.clientId === t)) == null ? null : r;
9687
9755
  return o || s ? {
@@ -9692,9 +9760,9 @@ function kf(e, t) {
9692
9760
  selectedExtra: e.elements[0] || (a = e.extras[0]) == null ? null : a
9693
9761
  };
9694
9762
  }
9695
- function Af(e) {
9763
+ function jf(e) {
9696
9764
  var t, n, r, i;
9697
9765
  return (t = (n = (r = e.elements[0]) == null ? void 0 : r.clientId) == null ? (i = e.extras[0]) == null ? void 0 : i.clientId : n) == null ? null : t;
9698
9766
  }
9699
9767
  //#endregion
9700
- export { fs as QuestionContentEditor, ed as QuestionPlayer, jd as QuestionPreview, Kd as QuestionPrintPreview, J as QuestionRichContentView, Of as QuestionStructureEditor, qn as addBlankToGroup, xn as alignQuestionContentDraftWithStructure, Zn as assignBlankToAnswerGroup, ro as cn, Qn as createBlankAnswerGroupWithBlank, Qt as createEmptyQuestionContentDraft, ec as createEmptyQuestionPlayerResponse, de as createEmptyQuestionStructureDraft, bn as createQuestionContentDraftFromSerialized, k as createQuestionContentId, hs as createQuestionContentStructureFromDraft, gs as createQuestionPreviewDraft, pe as createQuestionStructureElement, fe as createQuestionStructureExtra, P as createRichContentValue, rn as createRichContentValueFromDocument, Me as createRichTextContent, Jn as deleteBlankFromGroup, _e as deleteQuestionStructureElement, ge as deleteQuestionStructureExtra, $n as detachBlankFromAnswerGroup, la as findQuestionContentQuestionTypeStructure, pa as findQuestionContentQuestionTypeTemplate, pn as getQuestionContentJudgementOptions, un as getQuestionContentOptionMarker, on as getQuestionContentTextMarkerAnswerText, vs as getQuestionStructureDraftChangeKind, N as getQuestionStructureElementDefaultEnName, M as getQuestionStructureElementDefaultName, we as getQuestionStructureExtraDefaultEnName, Ce as getQuestionStructureExtraDefaultName, sn as getRichContentDocument, Xn as getSharedBlankAnswerGroups, Zt as isCompositeQuestionContentStructure, vn as isQuestionContentDraftEmpty, ve as moveQuestionStructureElement, An as normalizeFillTextCandidateState, Ne as normalizeRichTextContent, ae as questionStructureElementTypes, oe as questionStructureExtraTypes, ma as reconcileQuestionContentDraftWithTemplates, yn as serializeQuestionContentDraft, _s as serializeQuestionStructureDraft, be as updateQuestionStructureElement, ye as updateQuestionStructureExtra, xe as updateQuestionStructureGlobalConfig, Se as updateQuestionStructureMetadata };
9768
+ export { fs as QuestionContentEditor, td as QuestionPlayer, Md as QuestionPreview, qd as QuestionPrintPreview, J as QuestionRichContentView, kf as QuestionStructureEditor, qn as addBlankToGroup, xn as alignQuestionContentDraftWithStructure, Zn as assignBlankToAnswerGroup, ro as cn, Qn as createBlankAnswerGroupWithBlank, Qt as createEmptyQuestionContentDraft, ec as createEmptyQuestionPlayerResponse, de as createEmptyQuestionStructureDraft, bn as createQuestionContentDraftFromSerialized, k as createQuestionContentId, hs as createQuestionContentStructureFromDraft, gs as createQuestionPreviewDraft, pe as createQuestionStructureElement, fe as createQuestionStructureExtra, P as createRichContentValue, rn as createRichContentValueFromDocument, Me as createRichTextContent, Jn as deleteBlankFromGroup, _e as deleteQuestionStructureElement, ge as deleteQuestionStructureExtra, $n as detachBlankFromAnswerGroup, la as findQuestionContentQuestionTypeStructure, pa as findQuestionContentQuestionTypeTemplate, pn as getQuestionContentJudgementOptions, un as getQuestionContentOptionMarker, on as getQuestionContentTextMarkerAnswerText, vs as getQuestionStructureDraftChangeKind, N as getQuestionStructureElementDefaultEnName, M as getQuestionStructureElementDefaultName, we as getQuestionStructureExtraDefaultEnName, Ce as getQuestionStructureExtraDefaultName, sn as getRichContentDocument, Xn as getSharedBlankAnswerGroups, Zt as isCompositeQuestionContentStructure, vn as isQuestionContentDraftEmpty, ve as moveQuestionStructureElement, An as normalizeFillTextCandidateState, Ne as normalizeRichTextContent, ae as questionStructureElementTypes, oe as questionStructureExtraTypes, ma as reconcileQuestionContentDraftWithTemplates, yn as serializeQuestionContentDraft, _s as serializeQuestionStructureDraft, be as updateQuestionStructureElement, ye as updateQuestionStructureExtra, xe as updateQuestionStructureGlobalConfig, Se as updateQuestionStructureMetadata };