@yungu-fed/question-editor 0.8.1 → 0.8.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.js CHANGED
@@ -2921,6 +2921,7 @@ var za = {
2921
2921
  audio: "\u97F3\u9891",
2922
2922
  video: "\u89C6\u9891",
2923
2923
  playVideo: "\u64AD\u653E\u89C6\u9891",
2924
+ playAudio: "\u64AD\u653E\u97F3\u9891",
2924
2925
  close: "\u5173\u95ED",
2925
2926
  add: "\u4E0A\u4F20\u97F3\u89C6\u9891",
2926
2927
  uploadHint: "\u70B9\u51FB\u9009\u62E9\u6587\u4EF6\uFF0C\u652F\u6301\u540C\u65F6\u4E0A\u4F20\u591A\u4E2A\u97F3\u9891\u6216\u89C6\u9891",
@@ -2936,6 +2937,7 @@ var za = {
2936
2937
  audio: "Audio",
2937
2938
  video: "Video",
2938
2939
  playVideo: "Play video",
2940
+ playAudio: "Play audio",
2939
2941
  close: "Close",
2940
2942
  add: "Upload audio/video",
2941
2943
  uploadHint: "Click to select files \xB7 Multiple audio and video files supported",
@@ -3698,7 +3700,7 @@ function ao(e, t) {
3698
3700
  });
3699
3701
  }, n.click();
3700
3702
  }
3701
- var F = {
3703
+ var oo = {
3702
3704
  field: "_field_1e4cl_1",
3703
3705
  toolbar: "_toolbar_1e4cl_6",
3704
3706
  "toolbar-button": "_toolbar-button_1e4cl_10",
@@ -3706,31 +3708,31 @@ var F = {
3706
3708
  compact: "_compact_1e4cl_45",
3707
3709
  textarea: "_textarea_1e4cl_61"
3708
3710
  };
3709
- function oo(_ref51) {
3711
+ function so(_ref51) {
3710
3712
  var e = _ref51.toolbarExtra;
3711
3713
  return (0, t.jsxs)("div", {
3712
- className: F.toolbar,
3714
+ className: oo.toolbar,
3713
3715
  role: "toolbar",
3714
3716
  children: [(0, t.jsx)("button", {
3715
- className: F["toolbar-button"],
3717
+ className: oo["toolbar-button"],
3716
3718
  type: "button",
3717
3719
  children: "B"
3718
3720
  }), (0, t.jsx)("button", {
3719
- className: F["toolbar-button"],
3721
+ className: oo["toolbar-button"],
3720
3722
  type: "button",
3721
3723
  children: "I"
3722
3724
  }), (0, t.jsx)("button", {
3723
- className: F["toolbar-button"],
3725
+ className: oo["toolbar-button"],
3724
3726
  type: "button",
3725
3727
  children: "U"
3726
3728
  }), (0, t.jsx)("button", {
3727
- className: F["toolbar-button"],
3729
+ className: oo["toolbar-button"],
3728
3730
  type: "button",
3729
3731
  children: "Table"
3730
3732
  }), e]
3731
3733
  });
3732
3734
  }
3733
- function so(_ref52) {
3735
+ function co(_ref52) {
3734
3736
  var n = _ref52.apiRef,
3735
3737
  r = _ref52.ariaLabel,
3736
3738
  _ref52$compact = _ref52.compact,
@@ -3745,18 +3747,18 @@ function so(_ref52) {
3745
3747
  u = _ref52$toolbarMode === void 0 ? "auto" : _ref52$toolbarMode,
3746
3748
  d = _ref52.uploadImage,
3747
3749
  f = _ref52.value;
3748
- var p = co({
3750
+ var p = lo({
3749
3751
  hasSharedToolbar: Ra(),
3750
3752
  hasToolbarExtra: !!l,
3751
3753
  toolbarMode: u
3752
3754
  });
3753
- return lo() ? (0, t.jsxs)("div", {
3754
- className: uo(i),
3755
- children: [(0, t.jsx)(oo, {
3755
+ return uo() ? (0, t.jsxs)("div", {
3756
+ className: fo(i),
3757
+ children: [(0, t.jsx)(so, {
3756
3758
  toolbarExtra: l
3757
3759
  }), (0, t.jsx)("textarea", {
3758
3760
  "aria-label": r,
3759
- className: "".concat(F.textarea, " rich-content-editor-surface"),
3761
+ className: "".concat(oo.textarea, " rich-content-editor-surface"),
3760
3762
  onChange: function onChange(e) {
3761
3763
  return a(qe(e.target.value));
3762
3764
  },
@@ -3764,8 +3766,8 @@ function so(_ref52) {
3764
3766
  value: f.text
3765
3767
  })]
3766
3768
  }) : p ? (0, t.jsx)("div", {
3767
- className: uo(i),
3768
- children: po({
3769
+ className: fo(i),
3770
+ children: mo({
3769
3771
  apiRef: n,
3770
3772
  ariaLabel: r,
3771
3773
  compact: i,
@@ -3774,7 +3776,7 @@ function so(_ref52) {
3774
3776
  value: f
3775
3777
  })
3776
3778
  }) : (0, t.jsx)("div", {
3777
- className: uo(i),
3779
+ className: fo(i),
3778
3780
  children: (0, t.jsxs)(e.RichTextEditor.Root, {
3779
3781
  locale: o,
3780
3782
  plugins: c,
@@ -3809,7 +3811,7 @@ function so(_ref52) {
3809
3811
  }), (0, t.jsx)(e.RichTextEditor.Editor, {
3810
3812
  apiRef: n,
3811
3813
  "aria-label": r,
3812
- className: fo(i),
3814
+ className: po(i),
3813
3815
  initialValue: f.json,
3814
3816
  onChange: function onChange(e) {
3815
3817
  return a(Je({
@@ -3821,22 +3823,22 @@ function so(_ref52) {
3821
3823
  })
3822
3824
  });
3823
3825
  }
3824
- function co(_ref53) {
3826
+ function lo(_ref53) {
3825
3827
  var e = _ref53.hasSharedToolbar,
3826
3828
  t = _ref53.hasToolbarExtra,
3827
3829
  n = _ref53.toolbarMode;
3828
3830
  return n === "auto" && e && !t;
3829
3831
  }
3830
- function lo() {
3832
+ function uo() {
3831
3833
  return (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) < "u" && navigator.userAgent.toLowerCase().includes("jsdom");
3832
3834
  }
3833
- function uo(e) {
3834
- return e ? "".concat(F.field, " ").concat(F.compact, " rich-content-editor is-compact") : "".concat(F.field, " rich-content-editor");
3835
- }
3836
3835
  function fo(e) {
3837
- return e ? "".concat(F.editor, " ").concat(F.compact, " rich-content-editor-surface is-compact") : "".concat(F.editor, " rich-content-editor-surface");
3836
+ return e ? "".concat(oo.field, " ").concat(oo.compact, " rich-content-editor is-compact") : "".concat(oo.field, " rich-content-editor");
3837
+ }
3838
+ function po(e) {
3839
+ return e ? "".concat(oo.editor, " ").concat(oo.compact, " rich-content-editor-surface is-compact") : "".concat(oo.editor, " rich-content-editor-surface");
3838
3840
  }
3839
- function po(_ref54) {
3841
+ function mo(_ref54) {
3840
3842
  var n = _ref54.apiRef,
3841
3843
  r = _ref54.ariaLabel,
3842
3844
  i = _ref54.compact,
@@ -3846,7 +3848,7 @@ function po(_ref54) {
3846
3848
  return (0, t.jsx)(e.RichTextEditor.Editor, {
3847
3849
  apiRef: n,
3848
3850
  "aria-label": r,
3849
- className: fo(i),
3851
+ className: po(i),
3850
3852
  initialValue: s.json,
3851
3853
  onChange: function onChange(e) {
3852
3854
  return a(Je({
@@ -3856,7 +3858,7 @@ function po(_ref54) {
3856
3858
  placeholder: o
3857
3859
  });
3858
3860
  }
3859
- function I(_ref55) {
3861
+ function F(_ref55) {
3860
3862
  var e = _ref55.controls,
3861
3863
  n = _ref55.disabled,
3862
3864
  r = _ref55.editorRef,
@@ -3869,7 +3871,7 @@ function I(_ref55) {
3869
3871
  return (0, t.jsxs)("div", {
3870
3872
  "aria-disabled": n,
3871
3873
  className: n ? "pointer-events-none opacity-70" : void 0,
3872
- children: [(0, t.jsx)(so, {
3874
+ children: [(0, t.jsx)(co, {
3873
3875
  apiRef: r,
3874
3876
  ariaLabel: i,
3875
3877
  compact: c === "compact",
@@ -3883,7 +3885,7 @@ function I(_ref55) {
3883
3885
  }) : null]
3884
3886
  });
3885
3887
  }
3886
- function mo(_ref56) {
3888
+ function ho(_ref56) {
3887
3889
  var e = _ref56.disabled,
3888
3890
  r = _ref56.hasAnswer,
3889
3891
  i = _ref56.item,
@@ -3907,7 +3909,7 @@ function mo(_ref56) {
3907
3909
  }));
3908
3910
  }
3909
3911
  function _(e, t, n) {
3910
- var r = ho(m, e);
3912
+ var r = go(m, e);
3911
3913
  r && g(_r(l(l({}, i), {}, {
3912
3914
  answers: m
3913
3915
  }), e, r.answerPools.map(function (e, r) {
@@ -3915,13 +3917,13 @@ function mo(_ref56) {
3915
3917
  })));
3916
3918
  }
3917
3919
  function v(e) {
3918
- var t = ho(m, e);
3920
+ var t = go(m, e);
3919
3921
  t && g(_r(l(l({}, i), {}, {
3920
3922
  answers: m
3921
3923
  }), e, [].concat(_toConsumableArray(t.answerPools), [A()])));
3922
3924
  }
3923
3925
  function y(e, t) {
3924
- var n = ho(m, e);
3926
+ var n = go(m, e);
3925
3927
  n && g(_r(l(l({}, i), {}, {
3926
3928
  answers: m
3927
3929
  }), e, n.answerPools.filter(function (e, n) {
@@ -3973,7 +3975,7 @@ function mo(_ref56) {
3973
3975
  className: "flex max-w-xl min-w-72 flex-1 items-start gap-2",
3974
3976
  children: [(0, t.jsx)("div", {
3975
3977
  className: "min-w-0 flex-1",
3976
- children: (0, t.jsx)(I, {
3978
+ children: (0, t.jsx)(F, {
3977
3979
  controls: o,
3978
3980
  disabled: e,
3979
3981
  label: c("questionContentEditor.blank.answerPool", {
@@ -4108,7 +4110,7 @@ function mo(_ref56) {
4108
4110
  var i = m.findIndex(function (e) {
4109
4111
  return e.blankIds.includes(n);
4110
4112
  }),
4111
- a = ho(m, i);
4113
+ a = go(m, i);
4112
4114
  if (!a) return t;
4113
4115
  if (a.blankIds.length > 1) {
4114
4116
  if (e.has(i)) return t;
@@ -4169,10 +4171,10 @@ function mo(_ref56) {
4169
4171
  })
4170
4172
  });
4171
4173
  }
4172
- function ho(e, t) {
4174
+ function go(e, t) {
4173
4175
  return e.slice(t, t + 1)[0];
4174
4176
  }
4175
- var L = {
4177
+ var I = {
4176
4178
  board: "_board_fve4l_1",
4177
4179
  zones: "_zones_fve4l_7",
4178
4180
  zone: "_zone_fve4l_7",
@@ -4194,8 +4196,8 @@ var L = {
4194
4196
  "pool-title": "_pool-title_fve4l_164",
4195
4197
  "pool-actions": "_pool-actions_fve4l_168"
4196
4198
  },
4197
- go = "question/content-classification-answer-card";
4198
- function _o(_ref62) {
4199
+ _o = "question/content-classification-answer-card";
4200
+ function vo(_ref62) {
4199
4201
  var e = _ref62.answers,
4200
4202
  r = _ref62.categories,
4201
4203
  i = _ref62.disabled,
@@ -4243,13 +4245,13 @@ function _o(_ref62) {
4243
4245
  g === t && (!n || !e.currentTarget.contains(n)) && _(null);
4244
4246
  }
4245
4247
  function T(e, t) {
4246
- e.preventDefault(), C(e.dataTransfer.getData(go), t), y("");
4248
+ e.preventDefault(), C(e.dataTransfer.getData(_o), t), y("");
4247
4249
  }
4248
4250
  function te(e, n) {
4249
4251
  var r = S === e.id,
4250
4252
  s = e.content.text || e.id;
4251
4253
  return (0, t.jsxs)("article", {
4252
- className: [L.card, r ? L.selected : "", v === e.id ? L.dragging : ""].filter(Boolean).join(" "),
4254
+ className: [I.card, r ? I.selected : "", v === e.id ? I.dragging : ""].filter(Boolean).join(" "),
4253
4255
  "data-testid": "classification-answer-card-".concat(e.id),
4254
4256
  children: [a ? (0, t.jsx)("button", {
4255
4257
  "aria-label": h("questionContentEditor.classification.dragCard", {
@@ -4257,7 +4259,7 @@ function _o(_ref62) {
4257
4259
  index: n + 1
4258
4260
  }),
4259
4261
  "aria-pressed": r,
4260
- className: L.handle,
4262
+ className: I.handle,
4261
4263
  disabled: i,
4262
4264
  draggable: !i,
4263
4265
  onClick: function onClick() {
@@ -4267,17 +4269,17 @@ function _o(_ref62) {
4267
4269
  _(null), y("");
4268
4270
  },
4269
4271
  onDragStart: function onDragStart(t) {
4270
- t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(go, e.id), y(e.id);
4272
+ t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(_o, e.id), y(e.id);
4271
4273
  },
4272
4274
  type: "button",
4273
4275
  children: (0, t.jsxs)("span", {
4274
4276
  "aria-hidden": "true",
4275
- className: L["handle-dots"],
4277
+ className: I["handle-dots"],
4276
4278
  children: [(0, t.jsx)("i", {}), (0, t.jsx)("i", {}), (0, t.jsx)("i", {}), (0, t.jsx)("i", {}), (0, t.jsx)("i", {}), (0, t.jsx)("i", {})]
4277
4279
  })
4278
4280
  }) : null, (0, t.jsx)("div", {
4279
- className: L["card-editor"],
4280
- children: (0, t.jsx)(I, {
4281
+ className: I["card-editor"],
4282
+ children: (0, t.jsx)(F, {
4281
4283
  controls: p,
4282
4284
  disabled: i,
4283
4285
  label: "".concat(h("questionContentEditor.classification.card"), " ").concat(n + 1),
@@ -4291,7 +4293,7 @@ function _o(_ref62) {
4291
4293
  "aria-label": h("questionContentEditor.classification.deleteCard", {
4292
4294
  index: n + 1
4293
4295
  }),
4294
- className: L["delete-button"],
4296
+ className: I["delete-button"],
4295
4297
  danger: !0,
4296
4298
  disabled: i || o.length <= 1,
4297
4299
  icon: "\xD7",
@@ -4303,17 +4305,17 @@ function _o(_ref62) {
4303
4305
  }, e.id);
4304
4306
  }
4305
4307
  return (0, t.jsxs)("div", {
4306
- className: L.board,
4308
+ className: I.board,
4307
4309
  "data-testid": "classification-answer-board",
4308
4310
  children: [(0, t.jsx)("div", {
4309
- className: L.zones,
4311
+ className: I.zones,
4310
4312
  children: r.map(function (n, s) {
4311
4313
  var c = n.content.text || n.id,
4312
4314
  u = a ? o.filter(function (t) {
4313
4315
  return e[t.id] === n.id;
4314
4316
  }) : [];
4315
4317
  return (0, t.jsxs)("section", {
4316
- className: [L.zone, g === n.id ? L["target-active"] : ""].filter(Boolean).join(" "),
4318
+ className: [I.zone, g === n.id ? I["target-active"] : ""].filter(Boolean).join(" "),
4317
4319
  "data-testid": "classification-answer-category-".concat(n.id),
4318
4320
  onDragLeave: function onDragLeave(e) {
4319
4321
  return w(e, n.id);
@@ -4325,10 +4327,10 @@ function _o(_ref62) {
4325
4327
  return T(e, n.id);
4326
4328
  },
4327
4329
  children: [(0, t.jsxs)("div", {
4328
- className: L["zone-head"],
4330
+ className: I["zone-head"],
4329
4331
  children: [(0, t.jsx)("div", {
4330
- className: L["category-editor"],
4331
- children: (0, t.jsx)(I, {
4332
+ className: I["category-editor"],
4333
+ children: (0, t.jsx)(F, {
4332
4334
  controls: p,
4333
4335
  disabled: i,
4334
4336
  label: "".concat(h("questionContentEditor.classification.category"), " ").concat(s + 1),
@@ -4342,7 +4344,7 @@ function _o(_ref62) {
4342
4344
  "aria-label": h("questionContentEditor.classification.placeInCategoryAria", {
4343
4345
  category: c
4344
4346
  }),
4345
- className: L["placement-button"],
4347
+ className: I["placement-button"],
4346
4348
  disabled: i,
4347
4349
  onClick: function onClick() {
4348
4350
  return C(S, n.id);
@@ -4353,7 +4355,7 @@ function _o(_ref62) {
4353
4355
  "aria-label": h("questionContentEditor.classification.deleteCategory", {
4354
4356
  index: s + 1
4355
4357
  }),
4356
- className: L["delete-button"],
4358
+ className: I["delete-button"],
4357
4359
  danger: !0,
4358
4360
  disabled: i || r.length <= 1,
4359
4361
  icon: "\xD7",
@@ -4363,18 +4365,18 @@ function _o(_ref62) {
4363
4365
  size: "small"
4364
4366
  })]
4365
4367
  }), (0, t.jsx)("div", {
4366
- className: L.cards,
4368
+ className: I.cards,
4367
4369
  children: u.length > 0 ? u.map(function (e) {
4368
4370
  return te(e, o.indexOf(e));
4369
4371
  }) : (0, t.jsx)("span", {
4370
- className: L.empty,
4372
+ className: I.empty,
4371
4373
  children: h("questionContentEditor.classification.emptyCategory")
4372
4374
  })
4373
4375
  })]
4374
4376
  }, n.id);
4375
4377
  })
4376
4378
  }), (0, t.jsxs)("section", {
4377
- className: [L.pool, g === "" ? L["target-active"] : ""].filter(Boolean).join(" "),
4379
+ className: [I.pool, g === "" ? I["target-active"] : ""].filter(Boolean).join(" "),
4378
4380
  "data-testid": "classification-answer-unassigned",
4379
4381
  onDragLeave: function onDragLeave(e) {
4380
4382
  return w(e, "");
@@ -4386,14 +4388,14 @@ function _o(_ref62) {
4386
4388
  return T(e, "");
4387
4389
  },
4388
4390
  children: [(0, t.jsxs)("div", {
4389
- className: L["pool-head"],
4391
+ className: I["pool-head"],
4390
4392
  children: [(0, t.jsx)("strong", {
4391
- className: L["pool-title"],
4393
+ className: I["pool-title"],
4392
4394
  children: h(a ? "questionContentEditor.classification.unassigned" : "questionContentEditor.classification.contentPoolTitle")
4393
4395
  }), (0, t.jsxs)("div", {
4394
- className: L["pool-actions"],
4396
+ className: I["pool-actions"],
4395
4397
  children: [S ? (0, t.jsx)(N, {
4396
- className: L["placement-button"],
4398
+ className: I["placement-button"],
4397
4399
  disabled: i,
4398
4400
  onClick: function onClick() {
4399
4401
  return C(S, "");
@@ -4410,7 +4412,7 @@ function _o(_ref62) {
4410
4412
  })]
4411
4413
  })]
4412
4414
  }), (0, t.jsx)("div", {
4413
- className: L.cards,
4415
+ className: I.cards,
4414
4416
  children: o.filter(function (t) {
4415
4417
  return !a || !e[t.id];
4416
4418
  }).map(function (e) {
@@ -4420,13 +4422,13 @@ function _o(_ref62) {
4420
4422
  })]
4421
4423
  });
4422
4424
  }
4423
- var vo = {
4425
+ var yo = {
4424
4426
  board: "_board_36u5p_1",
4425
4427
  panel: "_panel_36u5p_5",
4426
4428
  "section-head": "_section-head_36u5p_15",
4427
4429
  "title-wrap": "_title-wrap_36u5p_24"
4428
4430
  };
4429
- function yo(_ref69) {
4431
+ function bo(_ref69) {
4430
4432
  var e = _ref69.disabled,
4431
4433
  n = _ref69.hasAnswer,
4432
4434
  r = _ref69.item,
@@ -4450,13 +4452,13 @@ function yo(_ref69) {
4450
4452
  }));
4451
4453
  }
4452
4454
  return (0, t.jsx)("div", {
4453
- className: vo.board,
4455
+ className: yo.board,
4454
4456
  children: (0, t.jsxs)("section", {
4455
- className: vo.panel,
4457
+ className: yo.panel,
4456
4458
  children: [(0, t.jsxs)("div", {
4457
- className: vo["section-head"],
4459
+ className: yo["section-head"],
4458
4460
  children: [(0, t.jsx)("div", {
4459
- className: vo["title-wrap"],
4461
+ className: yo["title-wrap"],
4460
4462
  children: (0, t.jsx)(P.Text, {
4461
4463
  strong: !0,
4462
4464
  children: s(n ? "questionContentEditor.classification.answerConfigTitle" : "questionContentEditor.classification.contentConfigTitle")
@@ -4471,7 +4473,7 @@ function yo(_ref69) {
4471
4473
  size: "small",
4472
4474
  children: s("questionContentEditor.classification.addCategory")
4473
4475
  })]
4474
- }), (0, t.jsx)(_o, {
4476
+ }), (0, t.jsx)(vo, {
4475
4477
  answers: c.answers,
4476
4478
  categories: c.categories,
4477
4479
  disabled: e,
@@ -4495,7 +4497,7 @@ function yo(_ref69) {
4495
4497
  })
4496
4498
  });
4497
4499
  }
4498
- function bo(_ref70) {
4500
+ function xo(_ref70) {
4499
4501
  var e = _ref70.disabled,
4500
4502
  r = _ref70.element,
4501
4503
  i = _ref70.hasAnswer,
@@ -4584,7 +4586,7 @@ function bo(_ref70) {
4584
4586
  return !!e && n.indexOf(e) === t;
4585
4587
  });
4586
4588
  t >= i.answerOptionIds.length && n && m(function (e) {
4587
- return l(l({}, e), {}, _defineProperty({}, a, Math.max(0, xo(e, a) - 1)));
4589
+ return l(l({}, e), {}, _defineProperty({}, a, Math.max(0, So(e, a) - 1)));
4588
4590
  }), ne(r.map(function (t, n) {
4589
4591
  return n === e ? l(l({}, t), {}, {
4590
4592
  answerOptionIds: o
@@ -4706,7 +4708,7 @@ function bo(_ref70) {
4706
4708
  function D(e) {
4707
4709
  var t = te(e);
4708
4710
  m(function (e) {
4709
- return l(l({}, e), {}, _defineProperty({}, t, xo(e, t) + 1));
4711
+ return l(l({}, e), {}, _defineProperty({}, t, So(e, t) + 1));
4710
4712
  });
4711
4713
  }
4712
4714
  function he(e, t) {
@@ -4756,7 +4758,7 @@ function bo(_ref70) {
4756
4758
  className: "text-center",
4757
4759
  strong: !0,
4758
4760
  children: o
4759
- }), (0, t.jsx)(I, {
4761
+ }), (0, t.jsx)(F, {
4760
4762
  controls: s,
4761
4763
  disabled: e,
4762
4764
  label: d("questionContentEditor.fields.candidateOption", {
@@ -4823,11 +4825,11 @@ function bo(_ref70) {
4823
4825
  var i = te(n),
4824
4826
  a = sr(n),
4825
4827
  o = a.length ? [].concat(_toConsumableArray(a), _toConsumableArray(Array.from({
4826
- length: xo(p, i)
4828
+ length: So(p, i)
4827
4829
  }, function () {
4828
4830
  return "";
4829
4831
  }))) : Array.from({
4830
- length: xo(p, i) + 1
4832
+ length: So(p, i) + 1
4831
4833
  }, function () {
4832
4834
  return "";
4833
4835
  }),
@@ -5071,7 +5073,7 @@ function bo(_ref70) {
5071
5073
  size: "small",
5072
5074
  children: d("questionContentEditor.actions.insertInlineBlank")
5073
5075
  })]
5074
- }), (0, t.jsx)(I, {
5076
+ }), (0, t.jsx)(F, {
5075
5077
  controls: s,
5076
5078
  disabled: e,
5077
5079
  editorRef: f,
@@ -5081,7 +5083,7 @@ function bo(_ref70) {
5081
5083
  },
5082
5084
  placeholder: d("questionContentEditor.placeholders.fillTextContent"),
5083
5085
  value: y.content
5084
- }), r.config.candidateMode === "none" ? (0, t.jsx)(mo, {
5086
+ }), r.config.candidateMode === "none" ? (0, t.jsx)(ho, {
5085
5087
  disabled: e,
5086
5088
  hasAnswer: i,
5087
5089
  item: b,
@@ -5115,7 +5117,7 @@ function bo(_ref70) {
5115
5117
  })]
5116
5118
  });
5117
5119
  }
5118
- function xo(e, t) {
5120
+ function So(e, t) {
5119
5121
  var n, r;
5120
5122
  return (n = (r = Object.entries(e).find(function (_ref79) {
5121
5123
  var _ref80 = _slicedToArray(_ref79, 1),
@@ -5123,7 +5125,7 @@ function xo(e, t) {
5123
5125
  return e === t;
5124
5126
  })) == null ? void 0 : r[1]) == null ? 0 : n;
5125
5127
  }
5126
- function So(e) {
5128
+ function Co(e) {
5127
5129
  return new Promise(function (t, n) {
5128
5130
  var r = new Image();
5129
5131
  r.onload = function () {
@@ -5133,7 +5135,7 @@ function So(e) {
5133
5135
  }, r.src = e;
5134
5136
  });
5135
5137
  }
5136
- function Co(_ref81) {
5138
+ function wo(_ref81) {
5137
5139
  var e = _ref81.item,
5138
5140
  n = _ref81.object,
5139
5141
  r = _ref81.disabled,
@@ -5156,7 +5158,7 @@ function Co(_ref81) {
5156
5158
  }
5157
5159
  });
5158
5160
  case "judgement":
5159
- return (0, t.jsx)(wo, {
5161
+ return (0, t.jsx)(To, {
5160
5162
  item: e,
5161
5163
  object: n,
5162
5164
  disabled: r,
@@ -5197,14 +5199,14 @@ function Co(_ref81) {
5197
5199
  });
5198
5200
  }
5199
5201
  }
5200
- function wo(_ref82) {
5202
+ function To(_ref82) {
5201
5203
  var e = _ref82.item,
5202
5204
  n = _ref82.object,
5203
5205
  r = _ref82.disabled,
5204
5206
  i = _ref82.hasAnswer,
5205
5207
  a = _ref82.onChange,
5206
5208
  o = _ref82.t;
5207
- var s = To(e.answer, n.judgementValue);
5209
+ var s = Eo(e.answer, n.judgementValue);
5208
5210
  return (0, t.jsx)(t.Fragment, {
5209
5211
  children: i ? (0, t.jsxs)("label", {
5210
5212
  children: [(0, t.jsx)("input", {
@@ -5234,14 +5236,14 @@ function wo(_ref82) {
5234
5236
  }) : null
5235
5237
  });
5236
5238
  }
5237
- function To(e, t) {
5239
+ function Eo(e, t) {
5238
5240
  return e === null || t === void 0 ? !1 : e === t;
5239
5241
  }
5240
- var Eo = {
5242
+ var Do = {
5241
5243
  image: "M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1ZM3 17l5-5 4 4 3-3 6 6M8 7h.01",
5242
5244
  trash: "M3 6h18M9 6V3h6v3M5 6l1 15h12l1-15M10 10v7M14 10v7"
5243
5245
  };
5244
- function Do(_ref83) {
5246
+ function Oo(_ref83) {
5245
5247
  var e = _ref83.name;
5246
5248
  return (0, t.jsx)("svg", {
5247
5249
  "aria-hidden": "true",
@@ -5254,19 +5256,19 @@ function Do(_ref83) {
5254
5256
  strokeLinecap: "round",
5255
5257
  strokeLinejoin: "round",
5256
5258
  children: (0, t.jsx)("path", {
5257
- d: Eo[e]
5259
+ d: Do[e]
5258
5260
  })
5259
5261
  });
5260
5262
  }
5261
- var Oo = ["nw", "n", "ne", "e", "se", "s", "sw", "w"];
5262
- function ko(e) {
5263
+ var ko = ["nw", "n", "ne", "e", "se", "s", "sw", "w"];
5264
+ function Ao(e) {
5263
5265
  var t = e.currentTarget.getBoundingClientRect();
5264
5266
  return {
5265
5267
  x: Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)),
5266
5268
  y: Math.max(0, Math.min(1, (e.clientY - t.top) / t.height))
5267
5269
  };
5268
5270
  }
5269
- function Ao(e, t, n) {
5271
+ function jo(e, t, n) {
5270
5272
  var r = function r(e, t, n) {
5271
5273
  return Math.max(t, Math.min(n, e));
5272
5274
  },
@@ -5283,13 +5285,13 @@ function Ao(e, t, n) {
5283
5285
  height: u - s
5284
5286
  });
5285
5287
  }
5286
- function jo(e) {
5288
+ function Mo(e) {
5287
5289
  var t = e.target.getAttribute("data-resize");
5288
- return Oo.find(function (e) {
5290
+ return ko.find(function (e) {
5289
5291
  return e === t;
5290
5292
  });
5291
5293
  }
5292
- function Mo(e, t) {
5294
+ function No(e, t) {
5293
5295
  var n = e.object,
5294
5296
  r = e.start,
5295
5297
  i = e.handle;
@@ -5298,9 +5300,9 @@ function Mo(e, t) {
5298
5300
  x: t.x - r.x,
5299
5301
  y: t.y - r.y
5300
5302
  };
5301
- return i ? Ao(n, i, a) : C(n, n.x + a.x, n.y + a.y);
5303
+ return i ? jo(n, i, a) : C(n, n.x + a.x, n.y + a.y);
5302
5304
  }
5303
- function No(e) {
5305
+ function Po(e) {
5304
5306
  var t = e.objects,
5305
5307
  r = e.selectedIds,
5306
5308
  i = e.disabled,
@@ -5318,8 +5320,8 @@ function No(e) {
5318
5320
  p = _ref87[1];
5319
5321
  function m(e) {
5320
5322
  if (i || e.button !== 0) return;
5321
- var n = ko(e),
5322
- o = jo(e),
5323
+ var n = Ao(e),
5324
+ o = Mo(e),
5323
5325
  l = o ? t.find(function (e) {
5324
5326
  return r.includes(e.id);
5325
5327
  }) : ee(t, n.x, n.y);
@@ -5332,9 +5334,9 @@ function No(e) {
5332
5334
  function h(e) {
5333
5335
  var n, r;
5334
5336
  if (i) return;
5335
- var o = ko(e);
5337
+ var o = Ao(e);
5336
5338
  p((n = ee(t, o.x, o.y)) == null ? void 0 : n.id), !(!c.current || !a) && d({
5337
- bounds: Mo(c.current, o),
5339
+ bounds: No(c.current, o),
5338
5340
  id: (r = c.current.object) == null ? void 0 : r.id
5339
5341
  });
5340
5342
  }
@@ -5343,7 +5345,7 @@ function No(e) {
5343
5345
  _(e, t);
5344
5346
  return;
5345
5347
  }
5346
- var n = Mo(e, t);
5348
+ var n = No(e, t);
5347
5349
  e.object ? o == null || o(l(l({}, e.object), n)) : n.width >= .01 && n.height >= .01 && a(n);
5348
5350
  }
5349
5351
  function _(e, n) {
@@ -5352,7 +5354,7 @@ function No(e) {
5352
5354
  }
5353
5355
  function v(e) {
5354
5356
  var t = c.current;
5355
- y(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), t && !i && g(t, ko(e));
5357
+ y(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), t && !i && g(t, Ao(e));
5356
5358
  }
5357
5359
  function y() {
5358
5360
  c.current = void 0, d(void 0);
@@ -5369,24 +5371,24 @@ function No(e) {
5369
5371
  }
5370
5372
  };
5371
5373
  }
5372
- var Po = {
5374
+ var Fo = {
5373
5375
  overlay: "_overlay_1q6ex_1",
5374
5376
  blank: "_blank_1q6ex_7",
5375
5377
  number: "_number_1q6ex_19",
5376
5378
  print: "_print_1q6ex_53"
5377
5379
  };
5378
- function Fo(_ref88) {
5380
+ function Io(_ref88) {
5379
5381
  var e = _ref88.item,
5380
5382
  n = _ref88.values,
5381
5383
  r = _ref88.disabled,
5382
5384
  i = _ref88.onChange,
5383
5385
  a = _ref88.gradingResult;
5384
5386
  return (0, t.jsx)("div", {
5385
- className: Po.overlay,
5387
+ className: Fo.overlay,
5386
5388
  children: e.objects.map(function (e, o) {
5387
5389
  var s, c, l;
5388
5390
  return (0, t.jsxs)("div", {
5389
- className: Po.blank,
5391
+ className: Fo.blank,
5390
5392
  "data-state": a == null || (s = a.objectResults.find(function (t) {
5391
5393
  return t.objectId === e.id;
5392
5394
  })) == null ? void 0 : s.status,
@@ -5397,7 +5399,7 @@ function Fo(_ref88) {
5397
5399
  height: "".concat(e.height * 100, "%")
5398
5400
  },
5399
5401
  children: [i ? null : (0, t.jsx)("span", {
5400
- className: Po.number,
5402
+ className: Fo.number,
5401
5403
  "aria-hidden": "true",
5402
5404
  children: o + 1
5403
5405
  }), (0, t.jsx)("textarea", {
@@ -5410,14 +5412,14 @@ function Fo(_ref88) {
5410
5412
  return i == null ? void 0 : i(e.id, t.target.value);
5411
5413
  }
5412
5414
  }), (0, t.jsx)("span", {
5413
- className: Po.print,
5415
+ className: Fo.print,
5414
5416
  children: (l = n[e.id]) == null ? "" : l
5415
5417
  })]
5416
5418
  }, e.id);
5417
5419
  })
5418
5420
  });
5419
5421
  }
5420
- var Io = {
5422
+ var Lo = {
5421
5423
  wrapper: "_wrapper_1x9sv_1",
5422
5424
  scene: "_scene_1x9sv_11",
5423
5425
  object: "_object_1x9sv_36",
@@ -5425,18 +5427,18 @@ var Io = {
5425
5427
  badge: "_badge_1x9sv_90",
5426
5428
  handle: "_handle_1x9sv_149"
5427
5429
  };
5428
- function Lo(e, t) {
5430
+ function Ro(e, t) {
5429
5431
  var n;
5430
5432
  return ((n = t.gradingResult) == null || (n = n.objectResults.find(function (t) {
5431
5433
  return t.objectId === e;
5432
5434
  })) == null ? void 0 : n.status) || (t.showAnswer && b(t.item, t.item.objects).includes(e) ? "answer" : t.selectedIds.includes(e) ? "selected" : "idle");
5433
5435
  }
5434
- function Ro(e) {
5436
+ function zo(e) {
5435
5437
  var n = e.item,
5436
5438
  r = e.disabled,
5437
5439
  i = e.onCreate,
5438
5440
  a = e.onSelect,
5439
- o = No(l(l({}, e), {}, {
5441
+ o = Po(l(l({}, e), {}, {
5440
5442
  objects: n.objects
5441
5443
  })),
5442
5444
  s = o.preview,
@@ -5450,11 +5452,11 @@ function Ro(e) {
5450
5452
  return e.selectedIds.includes(t.id);
5451
5453
  });
5452
5454
  return (0, t.jsxs)("div", {
5453
- className: Io.wrapper,
5455
+ className: Lo.wrapper,
5454
5456
  "data-mode": i ? "edit" : "answer",
5455
5457
  children: [(0, t.jsxs)("svg", {
5456
5458
  "aria-label": "\u56FE\u7247\u70B9\u9009\u753B\u5E03 / Image selection canvas",
5457
- className: Io.scene,
5459
+ className: Lo.scene,
5458
5460
  "data-hovered": !!c,
5459
5461
  onPointerLeave: o.leave,
5460
5462
  viewBox: "0 0 1000 ".concat(f),
@@ -5477,8 +5479,8 @@ function Ro(e) {
5477
5479
  "aria-label": n.label || "\u56FE\u7247 ".concat(o + 1),
5478
5480
  "aria-pressed": e.selectedIds.includes(n.id),
5479
5481
  "aria-disabled": r || !a,
5480
- className: Io.object,
5481
- "data-state": Lo(n.id, e),
5482
+ className: Lo.object,
5483
+ "data-state": Ro(n.id, e),
5482
5484
  "data-selected": e.selectedIds.includes(n.id),
5483
5485
  "data-hovered": c === n.id,
5484
5486
  onKeyDown: function onKeyDown(t) {
@@ -5489,7 +5491,7 @@ function Ro(e) {
5489
5491
  children: [(0, t.jsx)("title", {
5490
5492
  children: n.label || "\u56FE\u7247 ".concat(o + 1)
5491
5493
  }), (0, t.jsx)("rect", {
5492
- className: Io.outline,
5494
+ className: Lo.outline,
5493
5495
  rx: "2",
5494
5496
  x: n.x * 1e3,
5495
5497
  y: n.y * f,
@@ -5502,13 +5504,13 @@ function Ro(e) {
5502
5504
  fill: "#3869df",
5503
5505
  fontSize: "20",
5504
5506
  children: o + 1
5505
- }) : null, (0, t.jsx)(zo, {
5507
+ }) : null, (0, t.jsx)(Bo, {
5506
5508
  x: (n.x + n.width) * 1e3 - 12,
5507
5509
  y: n.y * f + 12,
5508
- state: Lo(n.id, e)
5510
+ state: Ro(n.id, e)
5509
5511
  })]
5510
5512
  }, n.id);
5511
- }), (0, t.jsx)(Bo, {
5513
+ }), (0, t.jsx)(Vo, {
5512
5514
  object: p,
5513
5515
  canvasHeight: f,
5514
5516
  enabled: !!i,
@@ -5523,7 +5525,7 @@ function Ro(e) {
5523
5525
  strokeDasharray: "6 4",
5524
5526
  vectorEffect: "non-scaling-stroke"
5525
5527
  }) : null]
5526
- }), e.fillValues ? (0, t.jsx)(Fo, {
5528
+ }), e.fillValues ? (0, t.jsx)(Io, {
5527
5529
  item: n,
5528
5530
  values: e.fillValues,
5529
5531
  disabled: r,
@@ -5532,7 +5534,7 @@ function Ro(e) {
5532
5534
  }) : null]
5533
5535
  });
5534
5536
  }
5535
- function zo(_ref89) {
5537
+ function Bo(_ref89) {
5536
5538
  var e = _ref89.x,
5537
5539
  n = _ref89.y,
5538
5540
  r = _ref89.state;
@@ -5540,7 +5542,7 @@ function zo(_ref89) {
5540
5542
  var a = new Map([["incorrect", "M-5-5 5 5M5-5-5 5"], ["partial", "M-6 0H6"], ["unanswered", "M-6 0H6"]]);
5541
5543
  return (0, t.jsxs)("g", {
5542
5544
  "aria-hidden": "true",
5543
- className: Io.badge,
5545
+ className: Lo.badge,
5544
5546
  transform: "translate(".concat(e, " ").concat(n, ")"),
5545
5547
  children: [(0, t.jsx)("circle", {
5546
5548
  r: "16"
@@ -5549,19 +5551,19 @@ function zo(_ref89) {
5549
5551
  })]
5550
5552
  });
5551
5553
  }
5552
- function Bo(_ref90) {
5554
+ function Vo(_ref90) {
5553
5555
  var e = _ref90.object,
5554
5556
  n = _ref90.canvasHeight,
5555
5557
  r = _ref90.enabled,
5556
5558
  i = _ref90.disabled;
5557
5559
  return !e || !r || i ? null : (0, t.jsx)("g", {
5558
5560
  "aria-hidden": "true",
5559
- children: Oo.map(function (r) {
5560
- var i = e.x + e.width * Vo(r, "w", "e"),
5561
- a = e.y + e.height * Vo(r, "n", "s");
5561
+ children: ko.map(function (r) {
5562
+ var i = e.x + e.width * Ho(r, "w", "e"),
5563
+ a = e.y + e.height * Ho(r, "n", "s");
5562
5564
  return (0, t.jsx)("rect", {
5563
5565
  "data-resize": r,
5564
- className: Io.handle,
5566
+ className: Lo.handle,
5565
5567
  x: i * 1e3 - 6,
5566
5568
  y: a * n - 6,
5567
5569
  width: "12",
@@ -5574,10 +5576,10 @@ function Bo(_ref90) {
5574
5576
  })
5575
5577
  });
5576
5578
  }
5577
- function Vo(e, t, n) {
5579
+ function Ho(e, t, n) {
5578
5580
  return e.includes(t) ? 0 : e.includes(n) ? 1 : .5;
5579
5581
  }
5580
- var R = {
5582
+ var L = {
5581
5583
  editor: "_editor_jl3bv_1",
5582
5584
  hint: "_hint_jl3bv_10",
5583
5585
  workspace: "_workspace_jl3bv_17",
@@ -5593,11 +5595,11 @@ var R = {
5593
5595
  error: "_error_jl3bv_132",
5594
5596
  "answer-control": "_answer-control_jl3bv_152"
5595
5597
  },
5596
- Ho = {
5598
+ Uo = {
5597
5599
  "background-upload": "_background-upload_1b3j2_1",
5598
5600
  "background-tools": "_background-tools_1b3j2_25"
5599
5601
  };
5600
- function Uo(e, t, n, r, i, a, o) {
5602
+ function Wo(e, t, n, r, i, a, o) {
5601
5603
  try {
5602
5604
  var s = e[a](o),
5603
5605
  c = s.value;
@@ -5607,23 +5609,23 @@ function Uo(e, t, n, r, i, a, o) {
5607
5609
  }
5608
5610
  s.done ? t(c) : Promise.resolve(c).then(r, i);
5609
5611
  }
5610
- function Wo(e) {
5612
+ function Go(e) {
5611
5613
  return function () {
5612
5614
  var t = this,
5613
5615
  n = arguments;
5614
5616
  return new Promise(function (r, i) {
5615
5617
  var a = e.apply(t, n);
5616
5618
  function o(e) {
5617
- Uo(a, r, i, o, s, "next", e);
5619
+ Wo(a, r, i, o, s, "next", e);
5618
5620
  }
5619
5621
  function s(e) {
5620
- Uo(a, r, i, o, s, "throw", e);
5622
+ Wo(a, r, i, o, s, "throw", e);
5621
5623
  }
5622
5624
  o(void 0);
5623
5625
  });
5624
5626
  };
5625
5627
  }
5626
- function Go(e) {
5628
+ function Ko(e) {
5627
5629
  return new Promise(function (t, n) {
5628
5630
  var r = new FileReader();
5629
5631
  r.onload = function () {
@@ -5633,7 +5635,7 @@ function Go(e) {
5633
5635
  }, r.readAsDataURL(e);
5634
5636
  });
5635
5637
  }
5636
- function Ko(_ref91) {
5638
+ function qo(_ref91) {
5637
5639
  var e = _ref91.disabled,
5638
5640
  r = _ref91.hasAnswer,
5639
5641
  i = _ref91.item,
@@ -5676,7 +5678,7 @@ function Ko(_ref91) {
5676
5678
  return w.apply(this, arguments);
5677
5679
  }
5678
5680
  function w() {
5679
- return w = Wo(_regenerator().m(function _callee(e) {
5681
+ return w = Go(_regenerator().m(function _callee(e) {
5680
5682
  var t, n, r, _e2, _t5, _t6;
5681
5683
  return _regenerator().w(function (_context) {
5682
5684
  while (1) switch (_context.p = _context.n) {
@@ -5689,11 +5691,11 @@ function Ko(_ref91) {
5689
5691
  m(!0), g("");
5690
5692
  _context.p = 1;
5691
5693
  _context.n = 2;
5692
- return ((r = s.uploadImage) == null ? Go : r)(n);
5694
+ return ((r = s.uploadImage) == null ? Ko : r)(n);
5693
5695
  case 2:
5694
5696
  _e2 = _context.v;
5695
5697
  _context.n = 3;
5696
- return So(_e2);
5698
+ return Co(_e2);
5697
5699
  case 3:
5698
5700
  _t5 = _context.v;
5699
5701
  x(l(l({}, i), {}, {
@@ -5731,19 +5733,19 @@ function Ko(_ref91) {
5731
5733
  })), f(t.id);
5732
5734
  }
5733
5735
  return (0, t.jsxs)("div", {
5734
- className: R.editor,
5736
+ className: L.editor,
5735
5737
  children: [(0, t.jsx)("p", {
5736
- className: R.hint,
5738
+ className: L.hint,
5737
5739
  children: b("instructions")
5738
- }), (0, t.jsx)(qo, {
5740
+ }), (0, t.jsx)(Jo, {
5739
5741
  busy: p,
5740
5742
  error: h,
5741
5743
  loading: b("loading")
5742
5744
  }), (0, t.jsxs)("div", {
5743
- className: R.workspace,
5745
+ className: L.workspace,
5744
5746
  children: [(0, t.jsxs)("div", {
5745
- className: R.stage,
5746
- children: [(0, t.jsx)(Ro, {
5747
+ className: L.stage,
5748
+ children: [(0, t.jsx)(zo, {
5747
5749
  item: i,
5748
5750
  selectedIds: u ? [u] : [],
5749
5751
  disabled: v || !i.background,
@@ -5751,12 +5753,12 @@ function Ko(_ref91) {
5751
5753
  onCreate: T,
5752
5754
  onUpdate: S
5753
5755
  }), (0, t.jsx)("div", {
5754
- className: Ho["background-tools"],
5756
+ className: Uo["background-tools"],
5755
5757
  "data-empty": !i.background,
5756
5758
  children: (0, t.jsxs)("label", {
5757
- className: Ho["background-upload"],
5759
+ className: Uo["background-upload"],
5758
5760
  "data-disabled": v,
5759
- children: [(0, t.jsx)(Do, {
5761
+ children: [(0, t.jsx)(Oo, {
5760
5762
  name: "image"
5761
5763
  }), (0, t.jsx)("span", {
5762
5764
  children: b(i.background ? "changeBackground" : "uploadBackground")
@@ -5774,24 +5776,24 @@ function Ko(_ref91) {
5774
5776
  })
5775
5777
  })]
5776
5778
  }), (0, t.jsxs)("aside", {
5777
- className: R.panel,
5779
+ className: L.panel,
5778
5780
  "aria-label": b("objects"),
5779
5781
  children: [(0, t.jsxs)("div", {
5780
- className: R["panel-header"],
5782
+ className: L["panel-header"],
5781
5783
  children: [(0, t.jsx)("h3", {
5782
5784
  children: b("objects")
5783
5785
  }), (0, t.jsx)("span", {
5784
5786
  children: i.objects.length
5785
5787
  })]
5786
5788
  }), (0, t.jsx)("div", {
5787
- className: R["object-list"],
5789
+ className: L["object-list"],
5788
5790
  children: i.objects.map(function (e, n) {
5789
5791
  return (0, t.jsxs)("div", {
5790
- className: R["object-row"],
5792
+ className: L["object-row"],
5791
5793
  "data-selected": e.id === u,
5792
5794
  children: [(0, t.jsx)("button", {
5793
5795
  type: "button",
5794
- className: R["object-button"],
5796
+ className: L["object-button"],
5795
5797
  "aria-label": "".concat(n + 1, ". ").concat(e.label),
5796
5798
  "aria-pressed": e.id === u,
5797
5799
  disabled: v,
@@ -5799,12 +5801,12 @@ function Ko(_ref91) {
5799
5801
  return f(e.id);
5800
5802
  },
5801
5803
  children: (0, t.jsx)("span", {
5802
- className: R["object-label"],
5804
+ className: L["object-label"],
5803
5805
  children: n + 1
5804
5806
  })
5805
5807
  }), (0, t.jsx)("div", {
5806
- className: R["answer-control"],
5807
- children: r || i.answerType === "judgement" ? (0, t.jsx)(Co, {
5808
+ className: L["answer-control"],
5809
+ children: r || i.answerType === "judgement" ? (0, t.jsx)(wo, {
5808
5810
  item: i,
5809
5811
  object: e,
5810
5812
  disabled: v,
@@ -5813,7 +5815,7 @@ function Ko(_ref91) {
5813
5815
  t: b
5814
5816
  }) : null
5815
5817
  }), (0, t.jsx)("button", {
5816
- className: R["delete-region"],
5818
+ className: L["delete-region"],
5817
5819
  type: "button",
5818
5820
  "aria-label": "".concat(b("delete"), "\uFF1A").concat(e.label),
5819
5821
  title: b("delete"),
@@ -5821,7 +5823,7 @@ function Ko(_ref91) {
5821
5823
  onClick: function onClick() {
5822
5824
  return C(e.id);
5823
5825
  },
5824
- children: (0, t.jsx)(Do, {
5826
+ children: (0, t.jsx)(Oo, {
5825
5827
  name: "trash"
5826
5828
  })
5827
5829
  })]
@@ -5832,23 +5834,23 @@ function Ko(_ref91) {
5832
5834
  })]
5833
5835
  });
5834
5836
  }
5835
- function qo(_ref98) {
5837
+ function Jo(_ref98) {
5836
5838
  var e = _ref98.busy,
5837
5839
  n = _ref98.error,
5838
5840
  r = _ref98.loading;
5839
5841
  return (0, t.jsxs)(t.Fragment, {
5840
5842
  children: [e ? (0, t.jsx)("p", {
5841
- className: R.status,
5843
+ className: L.status,
5842
5844
  role: "status",
5843
5845
  children: r
5844
5846
  }) : null, n ? (0, t.jsx)("p", {
5845
- className: R.error,
5847
+ className: L.error,
5846
5848
  role: "alert",
5847
5849
  children: n
5848
5850
  }) : null]
5849
5851
  });
5850
5852
  }
5851
- function Jo(_ref99) {
5853
+ function Yo(_ref99) {
5852
5854
  var e = _ref99.disabled,
5853
5855
  n = _ref99.element,
5854
5856
  r = _ref99.hasAnswer,
@@ -5890,23 +5892,23 @@ function Jo(_ref99) {
5890
5892
  })
5891
5893
  });
5892
5894
  }
5893
- function Yo() {
5895
+ function Xo() {
5894
5896
  for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
5895
5897
  e[_key] = arguments[_key];
5896
5898
  }
5897
5899
  return e.reduce(function (e, t) {
5898
- return [].concat(_toConsumableArray(e), _toConsumableArray(Xo(t)));
5900
+ return [].concat(_toConsumableArray(e), _toConsumableArray(Zo(t)));
5899
5901
  }, []).join(" ");
5900
5902
  }
5901
- function Xo(e) {
5902
- return e ? Zo(e) ? e.reduce(function (e, t) {
5903
- return [].concat(_toConsumableArray(e), _toConsumableArray(Xo(t)));
5903
+ function Zo(e) {
5904
+ return e ? Qo(e) ? e.reduce(function (e, t) {
5905
+ return [].concat(_toConsumableArray(e), _toConsumableArray(Zo(t)));
5904
5906
  }, []) : [e] : [];
5905
5907
  }
5906
- function Zo(e) {
5908
+ function Qo(e) {
5907
5909
  return Array.isArray(e);
5908
5910
  }
5909
- function Qo(e, t) {
5911
+ function $o(e, t) {
5910
5912
  var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : mt;
5911
5913
  var r = e.columns.reduce(function (e, t, n) {
5912
5914
  return t.items.forEach(function (t, r) {
@@ -5935,32 +5937,32 @@ function Qo(e, t) {
5935
5937
  }, []))) : e;
5936
5938
  }, []);
5937
5939
  }
5938
- function $o(e, t, n) {
5940
+ function es(e, t, n) {
5939
5941
  return e.left - t.left + n + e.width / 2;
5940
5942
  }
5941
- function es(e, t, n) {
5943
+ function ts(e, t, n) {
5942
5944
  return e.top - t.top + n + e.height / 2;
5943
5945
  }
5944
- function ts(e, t, n) {
5946
+ function ns(e, t, n) {
5945
5947
  return e.left - t.left + n;
5946
5948
  }
5947
- function ns(e, t, n) {
5949
+ function rs(e, t, n) {
5948
5950
  return e.right - t.left + n;
5949
5951
  }
5950
- function rs(e, t) {
5952
+ function is(e, t) {
5951
5953
  e(function (e) {
5952
- return is(e, t) ? e : t;
5954
+ return as(e, t) ? e : t;
5953
5955
  });
5954
5956
  }
5955
- function is(e, t) {
5957
+ function as(e, t) {
5956
5958
  return (e == null ? void 0 : e.height) === t.height && e.width === t.width && e.lines.length === t.lines.length && e.lines.every(function (e, n) {
5957
- return as(e, t.lines[n]);
5959
+ return os(e, t.lines[n]);
5958
5960
  });
5959
5961
  }
5960
- function as(e, t) {
5962
+ function os(e, t) {
5961
5963
  return t !== void 0 && e.key === t.key && e.x1 === t.x1 && e.x2 === t.x2 && e.y1 === t.y1 && e.y2 === t.y2;
5962
5964
  }
5963
- var z = {
5965
+ var R = {
5964
5966
  board: "_board_l8qwk_1",
5965
5967
  hint: "_hint_l8qwk_9",
5966
5968
  columns: "_columns_l8qwk_16",
@@ -5974,7 +5976,7 @@ var z = {
5974
5976
  lines: "_lines_l8qwk_103",
5975
5977
  line: "_line_l8qwk_103"
5976
5978
  },
5977
- B = {
5979
+ z = {
5978
5980
  columns: "_columns_14drz_1",
5979
5981
  column: "_column_14drz_1",
5980
5982
  "connect-handle": "_connect-handle_14drz_13",
@@ -5985,8 +5987,8 @@ var z = {
5985
5987
  "connect-button-connected": "_connect-button-connected_14drz_76",
5986
5988
  "connect-button-selected": "_connect-button-selected_14drz_82"
5987
5989
  },
5988
- os = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"];
5989
- function ss(_ref103) {
5990
+ ss = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"];
5991
+ function cs(_ref103) {
5990
5992
  var e = _ref103.disabled,
5991
5993
  r = _ref103.element,
5992
5994
  i = _ref103.hasAnswer,
@@ -6020,7 +6022,7 @@ function ss(_ref103) {
6020
6022
  });
6021
6023
  }, [_.answers, _.columns]),
6022
6024
  b = (0, n.useMemo)(function () {
6023
- return i ? Qo(_, _.answers) : [];
6025
+ return i ? $o(_, _.answers) : [];
6024
6026
  }, [i, _]),
6025
6027
  x = (0, n.useCallback)(function () {
6026
6028
  var e = h.current;
@@ -6030,20 +6032,20 @@ function ss(_ref103) {
6030
6032
  }
6031
6033
  var t = e.getBoundingClientRect(),
6032
6034
  n = b.reduce(function (n, r) {
6033
- var i = g.current.get(ps(r.fromItemId, "outgoing")),
6034
- a = g.current.get(ps(r.toItemId, "incoming"));
6035
+ var i = g.current.get(ms(r.fromItemId, "outgoing")),
6036
+ a = g.current.get(ms(r.toItemId, "incoming"));
6035
6037
  if (!i || !a) return n;
6036
6038
  var o = i.getBoundingClientRect(),
6037
6039
  s = a.getBoundingClientRect();
6038
6040
  return [].concat(_toConsumableArray(n), [{
6039
6041
  key: r.key,
6040
- x1: $o(o, t, e.scrollLeft),
6041
- x2: $o(s, t, e.scrollLeft),
6042
- y1: es(o, t, e.scrollTop),
6043
- y2: es(s, t, e.scrollTop)
6042
+ x1: es(o, t, e.scrollLeft),
6043
+ x2: es(s, t, e.scrollLeft),
6044
+ y1: ts(o, t, e.scrollTop),
6045
+ y2: ts(s, t, e.scrollTop)
6044
6046
  }]);
6045
6047
  }, []);
6046
- rs(m, {
6048
+ is(m, {
6047
6049
  height: e.scrollHeight,
6048
6050
  lines: n,
6049
6051
  width: e.scrollWidth
@@ -6067,7 +6069,7 @@ function ss(_ref103) {
6067
6069
  }, [i, y, x]);
6068
6070
  function S(e, t) {
6069
6071
  return function (n) {
6070
- var r = ps(e, t);
6072
+ var r = ms(e, t);
6071
6073
  if (n) {
6072
6074
  g.current.set(r, n);
6073
6075
  return;
@@ -6111,7 +6113,7 @@ function ss(_ref103) {
6111
6113
  }
6112
6114
  function ne(n, r) {
6113
6115
  return (0, t.jsxs)("section", {
6114
- className: B.column,
6116
+ className: z.column,
6115
6117
  children: [(0, t.jsxs)("div", {
6116
6118
  className: "flex min-w-0 flex-wrap items-center justify-between gap-2",
6117
6119
  children: [(0, t.jsx)(P.Text, {
@@ -6129,7 +6131,7 @@ function ss(_ref103) {
6129
6131
  onChange: function onChange(e) {
6130
6132
  return e ? C(Fr(_, n.columnId, e)) : void 0;
6131
6133
  },
6132
- options: os.map(function (e) {
6134
+ options: ss.map(function (e) {
6133
6135
  return {
6134
6136
  label: u("questionContentEditor.lineConnect.labels.".concat(e)),
6135
6137
  value: e
@@ -6174,15 +6176,15 @@ function ss(_ref103) {
6174
6176
  var c = On(n.labelStyle, o),
6175
6177
  l = c ? "".concat(c, ". ").concat(a.content.text) : a.content.text,
6176
6178
  f = (d == null ? void 0 : d.itemId) === a.itemId,
6177
- p = cs(_, a.itemId),
6178
- m = ls(_, a.itemId),
6179
- h = us(p, m),
6180
- g = ds(i);
6179
+ p = ls(_, a.itemId),
6180
+ m = us(_, a.itemId),
6181
+ h = ds(p, m),
6182
+ g = fs(i);
6181
6183
  return (0, t.jsxs)("div", {
6182
- className: fs(f, h),
6184
+ className: ps(f, h),
6183
6185
  "data-testid": "line-connect-item-".concat(a.itemId),
6184
6186
  style: g,
6185
- children: [ie(r, a, o, c, l, p), (0, t.jsx)(I, {
6187
+ children: [ie(r, a, o, c, l, p), (0, t.jsx)(F, {
6186
6188
  controls: s,
6187
6189
  disabled: e,
6188
6190
  label: u("questionContentEditor.lineConnect.itemAria", {
@@ -6216,7 +6218,7 @@ function ss(_ref103) {
6216
6218
  return i ? (0, t.jsx)("button", {
6217
6219
  "aria-label": oe("incoming", n, a, r.content.text),
6218
6220
  "aria-pressed": c,
6219
- className: Yo(B.marker, B["incoming-marker"], c && B["connect-button-connected"]),
6221
+ className: Xo(z.marker, z["incoming-marker"], c && z["connect-button-connected"]),
6220
6222
  disabled: e,
6221
6223
  onClick: function onClick() {
6222
6224
  return T(n, r.itemId, s);
@@ -6228,10 +6230,10 @@ function ss(_ref103) {
6228
6230
  type: "button",
6229
6231
  children: o || (0, t.jsx)("span", {
6230
6232
  "aria-hidden": "true",
6231
- className: B["connect-dot"]
6233
+ className: z["connect-dot"]
6232
6234
  })
6233
6235
  }) : (0, t.jsx)(P.Text, {
6234
- className: B.marker,
6236
+ className: z.marker,
6235
6237
  strong: !0,
6236
6238
  children: o
6237
6239
  });
@@ -6240,7 +6242,7 @@ function ss(_ref103) {
6240
6242
  return i ? (0, t.jsx)("button", {
6241
6243
  "aria-label": oe("outgoing", n, a, r.content.text),
6242
6244
  "aria-pressed": s,
6243
- className: Yo(B["connect-handle"], B["connect-handle-outgoing"], s && B["connect-button-selected"], c && B["connect-button-connected"]),
6245
+ className: Xo(z["connect-handle"], z["connect-handle-outgoing"], s && z["connect-button-selected"], c && z["connect-button-connected"]),
6244
6246
  disabled: e,
6245
6247
  ref: S(r.itemId, "outgoing"),
6246
6248
  onClick: function onClick() {
@@ -6252,7 +6254,7 @@ function ss(_ref103) {
6252
6254
  type: "button",
6253
6255
  children: (0, t.jsx)("span", {
6254
6256
  "aria-hidden": "true",
6255
- className: B["connect-dot"]
6257
+ className: z["connect-dot"]
6256
6258
  })
6257
6259
  }) : null;
6258
6260
  }
@@ -6266,12 +6268,12 @@ function ss(_ref103) {
6266
6268
  return (0, t.jsxs)("div", {
6267
6269
  className: "flex min-w-0 flex-col gap-4",
6268
6270
  children: [te(), (0, t.jsxs)("div", {
6269
- className: z.board,
6271
+ className: R.board,
6270
6272
  "data-testid": "line-connect-editor-board",
6271
6273
  ref: h,
6272
6274
  children: [i && p ? (0, t.jsx)("svg", {
6273
6275
  "aria-hidden": "true",
6274
- className: z.lines,
6276
+ className: R.lines,
6275
6277
  "data-testid": "line-connect-editor-lines",
6276
6278
  style: {
6277
6279
  height: "".concat(p.height, "px"),
@@ -6281,7 +6283,7 @@ function ss(_ref103) {
6281
6283
  viewBox: "0 0 ".concat(p.width, " ").concat(p.height),
6282
6284
  children: p.lines.map(function (e) {
6283
6285
  return (0, t.jsx)("line", {
6284
- className: z.line,
6286
+ className: R.line,
6285
6287
  x1: e.x1,
6286
6288
  x2: e.x2,
6287
6289
  y1: e.y1,
@@ -6289,7 +6291,7 @@ function ss(_ref103) {
6289
6291
  }, e.key);
6290
6292
  })
6291
6293
  }) : null, (0, t.jsx)("div", {
6292
- className: B.columns,
6294
+ className: z.columns,
6293
6295
  style: v,
6294
6296
  children: _.columns.map(ne)
6295
6297
  })]
@@ -6304,30 +6306,30 @@ function ss(_ref103) {
6304
6306
  })]
6305
6307
  });
6306
6308
  }
6307
- function cs(e, t) {
6309
+ function ls(e, t) {
6308
6310
  return Object.values(e.answers).some(function (e) {
6309
6311
  return e.includes(t);
6310
6312
  });
6311
6313
  }
6312
- function ls(e, t) {
6314
+ function us(e, t) {
6313
6315
  var n;
6314
6316
  return ((n = e.answers[t]) == null ? [] : n).length > 0;
6315
6317
  }
6316
- function us(e, t) {
6318
+ function ds(e, t) {
6317
6319
  return e || t;
6318
6320
  }
6319
- function ds(e) {
6321
+ function fs(e) {
6320
6322
  return {
6321
6323
  gridTemplateColumns: e ? "2rem minmax(0, 1fr) auto auto" : "2rem minmax(0, 1fr) auto"
6322
6324
  };
6323
6325
  }
6324
- function fs(e, t) {
6325
- return Yo("grid min-w-0 items-center gap-2 rounded-md border border-slate-200 bg-white p-2", e && "border-blue-600 bg-blue-50", t && !e && "border-blue-200 bg-blue-50/40");
6326
- }
6327
6326
  function ps(e, t) {
6327
+ return Xo("grid min-w-0 items-center gap-2 rounded-md border border-slate-200 bg-white p-2", e && "border-blue-600 bg-blue-50", t && !e && "border-blue-200 bg-blue-50/40");
6328
+ }
6329
+ function ms(e, t) {
6328
6330
  return "".concat(t, ":").concat(e);
6329
6331
  }
6330
- var ms = {
6332
+ var hs = {
6331
6333
  board: "_board_30ao0_1",
6332
6334
  "connect-board": "_connect-board_30ao0_7",
6333
6335
  columns: "_columns_30ao0_14",
@@ -6338,8 +6340,8 @@ var ms = {
6338
6340
  matched: "_matched_30ao0_51",
6339
6341
  marker: "_marker_30ao0_55"
6340
6342
  },
6341
- hs = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"];
6342
- function gs(_ref108) {
6343
+ gs = ["number", "upperAlpha", "lowerAlpha", "lowerRoman", "chineseNumber", "none"];
6344
+ function _s(_ref108) {
6343
6345
  var e = _ref108.disabled,
6344
6346
  r = _ref108.element,
6345
6347
  i = _ref108.hasAnswer,
@@ -6363,7 +6365,7 @@ function gs(_ref108) {
6363
6365
  gridTemplateColumns: "repeat(".concat(_.columns.length, ", minmax(16rem, 1fr))")
6364
6366
  },
6365
6367
  y = (0, n.useMemo)(function () {
6366
- return i ? Qo(_, _.answers, Et) : [];
6368
+ return i ? $o(_, _.answers, Et) : [];
6367
6369
  }, [i, _]),
6368
6370
  b = (0, n.useMemo)(function () {
6369
6371
  return JSON.stringify({
@@ -6383,20 +6385,20 @@ function gs(_ref108) {
6383
6385
  }
6384
6386
  var t = e.getBoundingClientRect(),
6385
6387
  n = y.reduce(function (n, r) {
6386
- var i = g.current.get(bs(r.fromItemId, "outgoing")),
6387
- a = g.current.get(bs(r.toItemId, "incoming"));
6388
+ var i = g.current.get(xs(r.fromItemId, "outgoing")),
6389
+ a = g.current.get(xs(r.toItemId, "incoming"));
6388
6390
  if (!i || !a) return n;
6389
6391
  var o = i.getBoundingClientRect(),
6390
6392
  s = a.getBoundingClientRect();
6391
6393
  return [].concat(_toConsumableArray(n), [{
6392
6394
  key: r.key,
6393
- x1: $o(o, t, e.scrollLeft),
6394
- x2: $o(s, t, e.scrollLeft),
6395
- y1: es(o, t, e.scrollTop),
6396
- y2: es(s, t, e.scrollTop)
6395
+ x1: es(o, t, e.scrollLeft),
6396
+ x2: es(s, t, e.scrollLeft),
6397
+ y1: ts(o, t, e.scrollTop),
6398
+ y2: ts(s, t, e.scrollTop)
6397
6399
  }]);
6398
6400
  }, []);
6399
- rs(m, {
6401
+ is(m, {
6400
6402
  height: e.scrollHeight,
6401
6403
  lines: n,
6402
6404
  width: e.scrollWidth
@@ -6420,7 +6422,7 @@ function gs(_ref108) {
6420
6422
  }, [i, b, x]);
6421
6423
  function S(e, t) {
6422
6424
  return function (n) {
6423
- var r = bs(e, t);
6425
+ var r = xs(e, t);
6424
6426
  if (n) {
6425
6427
  g.current.set(r, n);
6426
6428
  return;
@@ -6452,7 +6454,7 @@ function gs(_ref108) {
6452
6454
  }
6453
6455
  function T(n, r) {
6454
6456
  return (0, t.jsxs)("section", {
6455
- className: ms.column,
6457
+ className: hs.column,
6456
6458
  children: [(0, t.jsx)("div", {
6457
6459
  className: "flex min-w-0 flex-wrap items-center justify-end gap-2",
6458
6460
  children: (0, t.jsx)(Ya, {
@@ -6463,7 +6465,7 @@ function gs(_ref108) {
6463
6465
  onChange: function onChange(e) {
6464
6466
  return e ? C(Vr(_, n.columnId, e)) : void 0;
6465
6467
  },
6466
- options: hs.map(function (e) {
6468
+ options: gs.map(function (e) {
6467
6469
  return {
6468
6470
  label: u("questionContentEditor.matching.labels.".concat(e)),
6469
6471
  value: e
@@ -6472,7 +6474,7 @@ function gs(_ref108) {
6472
6474
  value: n.labelStyle
6473
6475
  })
6474
6476
  }), (0, t.jsx)("div", {
6475
- className: ms.items,
6477
+ className: hs.items,
6476
6478
  children: n.items.map(function (e, t) {
6477
6479
  return te(n, r, e, t);
6478
6480
  })
@@ -6493,16 +6495,16 @@ function gs(_ref108) {
6493
6495
  function te(n, r, a, o) {
6494
6496
  var c = kn(n.labelStyle, o),
6495
6497
  l = (d == null ? void 0 : d.itemId) === a.itemId,
6496
- f = _s(_, a.itemId),
6497
- p = vs(_, a.itemId),
6498
+ f = vs(_, a.itemId),
6499
+ p = ys(_, a.itemId),
6498
6500
  m = f || p,
6499
6501
  h = c ? "".concat(c, ". ").concat(a.content.text) : a.content.text,
6500
- g = ys(i);
6502
+ g = bs(i);
6501
6503
  return (0, t.jsxs)("div", {
6502
- className: Yo(ms.item, l ? ms.selected : "", m ? ms.matched : ""),
6504
+ className: Xo(hs.item, l ? hs.selected : "", m ? hs.matched : ""),
6503
6505
  "data-testid": "matching-editor-item-".concat(a.itemId),
6504
6506
  style: g,
6505
- children: [ne(r, a, o, c, h, f), (0, t.jsx)(I, {
6507
+ children: [ne(r, a, o, c, h, f), (0, t.jsx)(F, {
6506
6508
  controls: s,
6507
6509
  disabled: e,
6508
6510
  label: u("questionContentEditor.matching.itemAria", {
@@ -6536,7 +6538,7 @@ function gs(_ref108) {
6536
6538
  return i ? (0, t.jsx)("button", {
6537
6539
  "aria-label": ie("incoming", n, a, r.content.text),
6538
6540
  "aria-pressed": c,
6539
- className: Yo(ms.marker, B["incoming-marker"], c && B["connect-button-connected"]),
6541
+ className: Xo(hs.marker, z["incoming-marker"], c && z["connect-button-connected"]),
6540
6542
  disabled: e,
6541
6543
  onClick: function onClick() {
6542
6544
  return w(n, r.itemId, s);
@@ -6548,10 +6550,10 @@ function gs(_ref108) {
6548
6550
  type: "button",
6549
6551
  children: o || (0, t.jsx)("span", {
6550
6552
  "aria-hidden": "true",
6551
- className: B["connect-dot"]
6553
+ className: z["connect-dot"]
6552
6554
  })
6553
6555
  }) : o ? (0, t.jsx)("span", {
6554
- className: ms.marker,
6556
+ className: hs.marker,
6555
6557
  children: o
6556
6558
  }) : (0, t.jsx)("span", {});
6557
6559
  }
@@ -6559,7 +6561,7 @@ function gs(_ref108) {
6559
6561
  return i ? (0, t.jsx)("button", {
6560
6562
  "aria-label": ie("outgoing", n, a, r.content.text),
6561
6563
  "aria-pressed": s,
6562
- className: Yo(B["connect-handle"], B["connect-handle-outgoing"], s && B["connect-button-selected"], c && B["connect-button-connected"]),
6564
+ className: Xo(z["connect-handle"], z["connect-handle-outgoing"], s && z["connect-button-selected"], c && z["connect-button-connected"]),
6563
6565
  disabled: e,
6564
6566
  onClick: function onClick() {
6565
6567
  return w(n, r.itemId, o);
@@ -6571,7 +6573,7 @@ function gs(_ref108) {
6571
6573
  type: "button",
6572
6574
  children: (0, t.jsx)("span", {
6573
6575
  "aria-hidden": "true",
6574
- className: B["connect-dot"]
6576
+ className: z["connect-dot"]
6575
6577
  })
6576
6578
  }) : null;
6577
6579
  }
@@ -6583,7 +6585,7 @@ function gs(_ref108) {
6583
6585
  });
6584
6586
  }
6585
6587
  return (0, t.jsxs)("div", {
6586
- className: ms.board,
6588
+ className: hs.board,
6587
6589
  children: [i ? (0, t.jsx)("div", {
6588
6590
  "aria-live": "polite",
6589
6591
  className: "rounded-md border border-blue-100 bg-blue-50 px-3 py-2 text-sm text-blue-700",
@@ -6591,12 +6593,12 @@ function gs(_ref108) {
6591
6593
  label: d.label
6592
6594
  }) : u("questionContentEditor.matching.connectHintIdle")
6593
6595
  }) : null, (0, t.jsxs)("div", {
6594
- className: ms["connect-board"],
6596
+ className: hs["connect-board"],
6595
6597
  "data-testid": "matching-editor-board",
6596
6598
  ref: h,
6597
6599
  children: [i && p ? (0, t.jsx)("svg", {
6598
6600
  "aria-hidden": "true",
6599
- className: z.lines,
6601
+ className: R.lines,
6600
6602
  "data-testid": "matching-editor-lines",
6601
6603
  style: {
6602
6604
  height: "".concat(p.height, "px"),
@@ -6606,7 +6608,7 @@ function gs(_ref108) {
6606
6608
  viewBox: "0 0 ".concat(p.width, " ").concat(p.height),
6607
6609
  children: p.lines.map(function (e) {
6608
6610
  return (0, t.jsx)("line", {
6609
- className: z.line,
6611
+ className: R.line,
6610
6612
  x1: e.x1,
6611
6613
  x2: e.x2,
6612
6614
  y1: e.y1,
@@ -6614,7 +6616,7 @@ function gs(_ref108) {
6614
6616
  }, e.key);
6615
6617
  })
6616
6618
  }) : null, (0, t.jsx)("div", {
6617
- className: ms.columns,
6619
+ className: hs.columns,
6618
6620
  style: v,
6619
6621
  children: _.columns.map(function (e, t) {
6620
6622
  return T(e, t);
@@ -6623,24 +6625,24 @@ function gs(_ref108) {
6623
6625
  })]
6624
6626
  });
6625
6627
  }
6626
- function _s(e, t) {
6628
+ function vs(e, t) {
6627
6629
  return Object.values(e.answers).some(function (e) {
6628
6630
  return e.includes(t);
6629
6631
  });
6630
6632
  }
6631
- function vs(e, t) {
6633
+ function ys(e, t) {
6632
6634
  var n;
6633
6635
  return ((n = e.answers[t]) == null ? [] : n).length > 0;
6634
6636
  }
6635
- function ys(e) {
6637
+ function bs(e) {
6636
6638
  return {
6637
6639
  gridTemplateColumns: e ? "2rem minmax(0, 1fr) auto auto" : "2rem minmax(0, 1fr) auto"
6638
6640
  };
6639
6641
  }
6640
- function bs(e, t) {
6642
+ function xs(e, t) {
6641
6643
  return "".concat(t, ":").concat(e);
6642
6644
  }
6643
- function xs() {
6645
+ function Ss() {
6644
6646
  return (0, t.jsx)("svg", {
6645
6647
  "aria-hidden": "true",
6646
6648
  focusable: "false",
@@ -6657,121 +6659,50 @@ function xs() {
6657
6659
  })
6658
6660
  });
6659
6661
  }
6660
- var Ss = {
6661
- media: "_media_1yuwz_1",
6662
- file: "_file_1yuwz_8",
6663
- "video-trigger": "_video-trigger_1yuwz_28",
6664
- "video-dialog": "_video-dialog_1yuwz_53",
6665
- "dialog-content": "_dialog-content_1yuwz_70",
6666
- "dialog-header": "_dialog-header_1yuwz_75",
6667
- "dialog-close": "_dialog-close_1yuwz_85",
6668
- "dialog-video": "_dialog-video_1yuwz_97",
6669
- "dialog-error": "_dialog-error_1yuwz_105",
6670
- "video-playback-area": "_video-playback-area_1yuwz_117"
6662
+ var B = {
6663
+ media: "_media_1yvsi_1",
6664
+ file: "_file_1yvsi_8",
6665
+ "video-trigger": "_video-trigger_1yvsi_28",
6666
+ "video-dialog": "_video-dialog_1yvsi_53",
6667
+ "dialog-content": "_dialog-content_1yvsi_70",
6668
+ "dialog-header": "_dialog-header_1yvsi_75",
6669
+ "dialog-close": "_dialog-close_1yvsi_85",
6670
+ "dialog-video": "_dialog-video_1yvsi_97",
6671
+ "dialog-error": "_dialog-error_1yvsi_105",
6672
+ "video-playback-area": "_video-playback-area_1yvsi_117",
6673
+ "audio-dialog": "_audio-dialog_1yvsi_161",
6674
+ "dialog-audio": "_dialog-audio_1yvsi_165"
6671
6675
  },
6672
- Cs = {
6673
- list: "_list_8zavn_1",
6674
- file: "_file_8zavn_7",
6675
- "video-trigger": "_video-trigger_8zavn_22",
6676
- visual: "_visual_8zavn_35",
6677
- "audio-visual": "_audio-visual_8zavn_36",
6678
- waveform: "_waveform_8zavn_58",
6679
- caption: "_caption_8zavn_63",
6680
- badge: "_badge_8zavn_74",
6681
- filename: "_filename_8zavn_83"
6676
+ V = {
6677
+ list: "_list_ndlif_1",
6678
+ file: "_file_ndlif_7",
6679
+ "video-trigger": "_video-trigger_ndlif_23",
6680
+ visual: "_visual_ndlif_36",
6681
+ "audio-visual": "_audio-visual_ndlif_37",
6682
+ overlay: "_overlay_ndlif_58",
6683
+ waveform: "_waveform_ndlif_91",
6684
+ caption: "_caption_ndlif_99",
6685
+ badge: "_badge_ndlif_110",
6686
+ filename: "_filename_ndlif_124",
6687
+ editable: "_editable_ndlif_141",
6688
+ actions: "_actions_ndlif_145"
6682
6689
  };
6683
- function ws(_ref113) {
6690
+ function Cs(_ref113) {
6684
6691
  var e = _ref113.file,
6685
- i = _ref113.locale,
6686
- _ref113$presentation = _ref113.presentation,
6687
- a = _ref113$presentation === void 0 ? "filename" : _ref113$presentation;
6688
- var _ref114 = (0, n.useState)(!1),
6692
+ r = _ref113.locale,
6693
+ i = _ref113.onClose;
6694
+ var a = (0, n.useRef)(null),
6695
+ _ref114 = (0, n.useState)(!1),
6689
6696
  _ref115 = _slicedToArray(_ref114, 2),
6690
6697
  o = _ref115[0],
6691
- s = _ref115[1],
6692
- c = (0, n.useRef)(null),
6693
- l = za[i];
6694
- function u() {
6695
- var e;
6696
- s(!1), (e = c.current) == null || e.focus(), requestAnimationFrame(function () {
6697
- var e;
6698
- return (e = c.current) == null ? void 0 : e.focus();
6699
- });
6700
- }
6701
- var d = (0, t.jsxs)(t.Fragment, {
6702
- children: [(0, t.jsx)("video", {
6703
- "aria-hidden": "true",
6704
- muted: !0,
6705
- playsInline: !0,
6706
- preload: "metadata",
6707
- src: e.src
6708
- }), (0, t.jsx)("svg", {
6709
- "aria-hidden": "true",
6710
- width: "24",
6711
- height: "24",
6712
- viewBox: "0 0 24 24",
6713
- fill: "currentColor",
6714
- children: (0, t.jsx)("path", {
6715
- d: "M8 5v14l11-7z"
6716
- })
6717
- })]
6718
- });
6719
- return (0, t.jsxs)(t.Fragment, {
6720
- children: [(0, t.jsxs)("button", {
6721
- className: a === "preview" ? Cs["video-trigger"] : Ss["video-trigger"],
6722
- type: "button",
6723
- ref: c,
6724
- "aria-label": "".concat(l.playVideo, ": ").concat(e.name),
6725
- title: "".concat(l.playVideo, ": ").concat(e.name),
6726
- onClick: function onClick() {
6727
- return s(!0);
6728
- },
6729
- children: [a === "preview" && (0, t.jsx)("span", {
6730
- className: "".concat(Ss["video-playback-area"], " ").concat(Cs.visual),
6731
- children: d
6732
- }), a === "preview" ? (0, t.jsxs)("span", {
6733
- className: Cs.caption,
6734
- children: [(0, t.jsx)("span", {
6735
- className: Cs.badge,
6736
- children: l.video
6737
- }), (0, t.jsx)("span", {
6738
- className: Cs.filename,
6739
- children: e.name
6740
- })]
6741
- }) : (0, t.jsx)("span", {
6742
- children: e.name
6743
- })]
6744
- }), a === "editor" && (0, t.jsx)("button", {
6745
- className: Ss["video-playback-area"],
6746
- type: "button",
6747
- "aria-label": "".concat(l.playVideo, ": ").concat(e.name),
6748
- onClick: function onClick() {
6749
- return s(!0);
6750
- },
6751
- children: d
6752
- }), o && (0, r.createPortal)((0, t.jsx)(Ts, {
6753
- file: e,
6754
- locale: i,
6755
- onClose: u
6756
- }), document.body)]
6757
- });
6758
- }
6759
- function Ts(_ref116) {
6760
- var e = _ref116.file,
6761
- r = _ref116.locale,
6762
- i = _ref116.onClose;
6763
- var a = (0, n.useRef)(null),
6764
- _ref117 = (0, n.useState)(!1),
6765
- _ref118 = _slicedToArray(_ref117, 2),
6766
- o = _ref118[0],
6767
- s = _ref118[1];
6698
+ s = _ref115[1];
6768
6699
  (0, n.useEffect)(function () {
6769
6700
  var e;
6770
6701
  (e = a.current) == null || e.showModal();
6771
6702
  }, []);
6772
6703
  var c = za[r];
6773
6704
  return (0, t.jsx)("dialog", {
6774
- className: Ss["video-dialog"],
6705
+ className: "".concat(B["video-dialog"], " ").concat(e.kind === "audio" ? B["audio-dialog"] : ""),
6775
6706
  ref: a,
6776
6707
  "aria-label": e.name,
6777
6708
  onCancel: function onCancel(e) {
@@ -6781,20 +6712,29 @@ function Ts(_ref116) {
6781
6712
  e.target === e.currentTarget && i();
6782
6713
  },
6783
6714
  children: (0, t.jsxs)("div", {
6784
- className: Ss["dialog-content"],
6715
+ className: B["dialog-content"],
6785
6716
  children: [(0, t.jsxs)("div", {
6786
- className: Ss["dialog-header"],
6717
+ className: B["dialog-header"],
6787
6718
  children: [(0, t.jsx)("strong", {
6788
6719
  children: e.name
6789
6720
  }), (0, t.jsx)("button", {
6790
- className: Ss["dialog-close"],
6721
+ className: B["dialog-close"],
6791
6722
  type: "button",
6792
6723
  "aria-label": c.close,
6793
6724
  onClick: i,
6794
6725
  children: "\xD7"
6795
6726
  })]
6796
- }), (0, t.jsx)("video", {
6797
- className: Ss["dialog-video"],
6727
+ }), e.kind === "audio" ? (0, t.jsx)("audio", {
6728
+ className: B["dialog-audio"],
6729
+ "aria-label": e.name,
6730
+ controls: !0,
6731
+ preload: "metadata",
6732
+ src: e.src,
6733
+ onError: function onError() {
6734
+ return s(!0);
6735
+ }
6736
+ }) : (0, t.jsx)("video", {
6737
+ className: B["dialog-video"],
6798
6738
  "aria-label": e.name,
6799
6739
  controls: !0,
6800
6740
  playsInline: !0,
@@ -6804,115 +6744,196 @@ function Ts(_ref116) {
6804
6744
  return s(!0);
6805
6745
  }
6806
6746
  }), o && (0, t.jsx)("p", {
6807
- className: Ss["dialog-error"],
6747
+ className: B["dialog-error"],
6808
6748
  role: "status",
6809
6749
  children: c.playbackFailed
6810
6750
  })]
6811
6751
  })
6812
6752
  });
6813
6753
  }
6814
- function Es(_ref119) {
6754
+ function ws(_ref116) {
6755
+ var e = _ref116.file,
6756
+ i = _ref116.locale;
6757
+ var _ref117 = (0, n.useState)(!1),
6758
+ _ref118 = _slicedToArray(_ref117, 2),
6759
+ a = _ref118[0],
6760
+ o = _ref118[1],
6761
+ s = (0, n.useRef)(null),
6762
+ c = za[i];
6763
+ function l() {
6764
+ o(!1), requestAnimationFrame(function () {
6765
+ var e;
6766
+ return (e = s.current) == null ? void 0 : e.focus();
6767
+ });
6768
+ }
6769
+ return (0, t.jsxs)(t.Fragment, {
6770
+ children: [(0, t.jsxs)("button", {
6771
+ ref: s,
6772
+ className: V["audio-visual"],
6773
+ type: "button",
6774
+ "aria-label": "".concat(c.playAudio, ": ").concat(e.name),
6775
+ title: c.playAudio,
6776
+ onClick: function onClick() {
6777
+ return o(!0);
6778
+ },
6779
+ children: [(0, t.jsx)("svg", {
6780
+ className: V.waveform,
6781
+ "aria-hidden": "true",
6782
+ width: "132",
6783
+ height: "36",
6784
+ viewBox: "0 0 132 36",
6785
+ fill: "none",
6786
+ stroke: "currentColor",
6787
+ strokeWidth: "4",
6788
+ strokeLinecap: "round",
6789
+ children: (0, t.jsx)("path", {
6790
+ d: "M4 15v6m10-12v18m10-16v14m10-21v28m10-17v6m10-11v16m10-23v30m10-24v18m10-13v8m10-18v28m10-21v14m10-17v20m10-13v6"
6791
+ })
6792
+ }), (0, t.jsx)("span", {
6793
+ className: V.overlay,
6794
+ children: (0, t.jsx)("svg", {
6795
+ "aria-hidden": "true",
6796
+ width: "24",
6797
+ height: "24",
6798
+ viewBox: "0 0 24 24",
6799
+ fill: "currentColor",
6800
+ children: (0, t.jsx)("path", {
6801
+ d: "M8 5v14l11-7z"
6802
+ })
6803
+ })
6804
+ })]
6805
+ }), (0, t.jsxs)("div", {
6806
+ className: V.caption,
6807
+ title: e.name,
6808
+ children: [(0, t.jsx)("span", {
6809
+ className: V.badge,
6810
+ children: c.audio
6811
+ }), (0, t.jsx)("span", {
6812
+ className: V.filename,
6813
+ children: e.name
6814
+ })]
6815
+ }), a && (0, r.createPortal)((0, t.jsx)(Cs, {
6816
+ file: e,
6817
+ locale: i,
6818
+ onClose: l
6819
+ }), document.body)]
6820
+ });
6821
+ }
6822
+ function Ts(_ref119) {
6815
6823
  var e = _ref119.file,
6816
- r = _ref119.locale;
6824
+ i = _ref119.locale,
6825
+ _ref119$presentation = _ref119.presentation,
6826
+ a = _ref119$presentation === void 0 ? "filename" : _ref119$presentation;
6817
6827
  var _ref120 = (0, n.useState)(!1),
6818
6828
  _ref121 = _slicedToArray(_ref120, 2),
6819
- i = _ref121[0],
6820
- a = _ref121[1],
6821
- o = {
6822
- "aria-label": e.name,
6823
- controls: !0,
6824
- onError: function onError() {
6825
- return a(!0);
6826
- },
6827
- preload: "metadata",
6828
- src: e.src
6829
- };
6829
+ o = _ref121[0],
6830
+ s = _ref121[1],
6831
+ c = (0, n.useRef)(null),
6832
+ l = za[i];
6833
+ function u() {
6834
+ var e;
6835
+ s(!1), (e = c.current) == null || e.focus(), requestAnimationFrame(function () {
6836
+ var e;
6837
+ return (e = c.current) == null ? void 0 : e.focus();
6838
+ });
6839
+ }
6840
+ var d = (0, t.jsx)("svg", {
6841
+ "aria-hidden": "true",
6842
+ width: "24",
6843
+ height: "24",
6844
+ viewBox: "0 0 24 24",
6845
+ fill: "currentColor",
6846
+ children: (0, t.jsx)("path", {
6847
+ d: "M8 5v14l11-7z"
6848
+ })
6849
+ }),
6850
+ f = (0, t.jsxs)(t.Fragment, {
6851
+ children: [(0, t.jsx)("video", {
6852
+ "aria-hidden": "true",
6853
+ muted: !0,
6854
+ playsInline: !0,
6855
+ preload: "metadata",
6856
+ src: e.src
6857
+ }), a === "preview" ? (0, t.jsx)("span", {
6858
+ className: V.overlay,
6859
+ children: d
6860
+ }) : d]
6861
+ });
6830
6862
  return (0, t.jsxs)(t.Fragment, {
6831
- children: [e.kind === "audio" ? (0, t.jsx)("audio", l({}, o)) : (0, t.jsx)(ws, {
6863
+ children: [(0, t.jsxs)("button", {
6864
+ className: a === "preview" ? V["video-trigger"] : B["video-trigger"],
6865
+ type: "button",
6866
+ ref: c,
6867
+ "aria-label": "".concat(l.playVideo, ": ").concat(e.name),
6868
+ title: "".concat(l.playVideo, ": ").concat(e.name),
6869
+ onClick: function onClick() {
6870
+ return s(!0);
6871
+ },
6872
+ children: [a === "preview" && (0, t.jsx)("span", {
6873
+ className: "".concat(B["video-playback-area"], " ").concat(V.visual),
6874
+ children: f
6875
+ }), a === "preview" ? (0, t.jsxs)("span", {
6876
+ className: V.caption,
6877
+ children: [(0, t.jsx)("span", {
6878
+ className: V.badge,
6879
+ children: l.video
6880
+ }), (0, t.jsx)("span", {
6881
+ className: V.filename,
6882
+ children: e.name
6883
+ })]
6884
+ }) : (0, t.jsx)("span", {
6885
+ children: e.name
6886
+ })]
6887
+ }), o && (0, r.createPortal)((0, t.jsx)(Cs, {
6832
6888
  file: e,
6833
- locale: r
6834
- }), i && (0, t.jsx)("p", {
6835
- role: "status",
6836
- children: za[r].playbackFailed
6837
- })]
6889
+ locale: i,
6890
+ onClose: u
6891
+ }), document.body)]
6838
6892
  });
6839
6893
  }
6840
- function Ds(_ref122) {
6894
+ function Es(_ref122) {
6841
6895
  var e = _ref122.item,
6842
6896
  n = _ref122.locale,
6843
6897
  _ref122$print = _ref122.print,
6844
- r = _ref122$print === void 0 ? !1 : _ref122$print;
6898
+ r = _ref122$print === void 0 ? !1 : _ref122$print,
6899
+ i = _ref122.renderFileActions;
6845
6900
  return (0, t.jsx)("div", {
6846
- className: "".concat(Ss.media, " ").concat(r ? "" : Cs.list),
6901
+ className: "".concat(B.media, " ").concat(r ? "" : V.list),
6847
6902
  children: e.files.map(function (e) {
6848
- return (0, t.jsx)("div", {
6849
- className: r ? Ss.file : Cs.file,
6850
- children: r ? (0, t.jsxs)("div", {
6903
+ return (0, t.jsxs)("div", {
6904
+ className: "".concat(r ? B.file : V.file, " ").concat(!r && i ? V.editable : ""),
6905
+ children: [r ? (0, t.jsxs)("div", {
6851
6906
  children: [za[n][e.kind], ": ", e.name]
6852
- }) : (0, t.jsx)(Os, {
6907
+ }) : (0, t.jsx)(Ds, {
6853
6908
  file: e,
6854
6909
  locale: n
6855
- })
6910
+ }), !r && i && (0, t.jsx)("div", {
6911
+ className: V.actions,
6912
+ children: i(e)
6913
+ })]
6856
6914
  }, e.id);
6857
6915
  })
6858
6916
  });
6859
6917
  }
6860
- function Os(_ref123) {
6918
+ function Ds(_ref123) {
6861
6919
  var e = _ref123.file,
6862
6920
  n = _ref123.locale;
6863
- return e.kind === "video" ? (0, t.jsx)(ws, {
6921
+ return e.kind === "video" ? (0, t.jsx)(Ts, {
6864
6922
  file: e,
6865
6923
  locale: n,
6866
6924
  presentation: "preview"
6867
- }, e.src) : (0, t.jsxs)(t.Fragment, {
6868
- children: [(0, t.jsxs)("div", {
6869
- className: Cs["audio-visual"],
6870
- children: [(0, t.jsx)("svg", {
6871
- className: Cs.waveform,
6872
- "aria-hidden": "true",
6873
- width: "132",
6874
- height: "36",
6875
- viewBox: "0 0 132 36",
6876
- fill: "none",
6877
- stroke: "currentColor",
6878
- strokeWidth: "4",
6879
- strokeLinecap: "round",
6880
- children: (0, t.jsx)("path", {
6881
- d: "M4 15v6m10-12v18m10-16v14m10-21v28m10-17v6m10-11v16m10-23v30m10-24v18m10-13v8m10-18v28m10-21v14m10-17v20m10-13v6"
6882
- })
6883
- }), (0, t.jsx)(Es, {
6884
- file: e,
6885
- locale: n
6886
- }, e.src)]
6887
- }), (0, t.jsxs)("div", {
6888
- className: Cs.caption,
6889
- title: e.name,
6890
- children: [(0, t.jsx)("span", {
6891
- className: Cs.badge,
6892
- children: za[n].audio
6893
- }), (0, t.jsx)("span", {
6894
- className: Cs.filename,
6895
- children: e.name
6896
- })]
6897
- })]
6898
- });
6899
- }
6900
- var V = {
6901
- editor: "_editor_5kbnx_1",
6902
- upload: "_upload_5kbnx_6",
6903
- "upload-icon": "_upload-icon_5kbnx_29",
6904
- "upload-title": "_upload-title_5kbnx_40",
6905
- hint: "_hint_5kbnx_45",
6906
- files: "_files_5kbnx_74",
6907
- file: "_file_5kbnx_74",
6908
- "file-heading": "_file-heading_5kbnx_98",
6909
- badge: "_badge_5kbnx_107",
6910
- filename: "_filename_5kbnx_116",
6911
- actions: "_actions_5kbnx_125",
6912
- status: "_status_5kbnx_136",
6913
- "action-button": "_action-button_5kbnx_148",
6914
- "audio-player": "_audio-player_5kbnx_157",
6915
- "video-heading": "_video-heading_5kbnx_164"
6925
+ }, e.src) : (0, t.jsx)(ws, {
6926
+ file: e,
6927
+ locale: n
6928
+ }, e.src);
6929
+ }
6930
+ var Os = {
6931
+ editor: "_editor_mwfet_1",
6932
+ upload: "_upload_mwfet_6",
6933
+ "upload-icon": "_upload-icon_mwfet_29",
6934
+ "upload-title": "_upload-title_mwfet_40",
6935
+ hint: "_hint_mwfet_45",
6936
+ status: "_status_mwfet_74"
6916
6937
  };
6917
6938
  function ks(_ref124) {
6918
6939
  var e = _ref124.disabled,
@@ -6951,7 +6972,7 @@ function ks(_ref124) {
6951
6972
  return v.apply(this, arguments);
6952
6973
  }
6953
6974
  function v() {
6954
- return v = Wo(_regenerator().m(function _callee2(t) {
6975
+ return v = Go(_regenerator().m(function _callee2(t) {
6955
6976
  var _iterator2, _step2, _e3, _t7;
6956
6977
  return _regenerator().w(function (_context2) {
6957
6978
  while (1) switch (_context2.p = _context2.n) {
@@ -7007,7 +7028,7 @@ function ks(_ref124) {
7007
7028
  return b.apply(this, arguments);
7008
7029
  }
7009
7030
  function b() {
7010
- return b = Wo(_regenerator().m(function _callee3(e, t) {
7031
+ return b = Go(_regenerator().m(function _callee3(e, t) {
7011
7032
  var _n5, _r4, _i3, _t8;
7012
7033
  return _regenerator().w(function (_context3) {
7013
7034
  while (1) switch (_context3.p = _context3.n) {
@@ -7069,13 +7090,13 @@ function ks(_ref124) {
7069
7090
  });
7070
7091
  }
7071
7092
  return (0, t.jsxs)("div", {
7072
- className: "".concat(Ss.media, " ").concat(V.editor),
7093
+ className: "".concat(B.media, " ").concat(Os.editor),
7073
7094
  children: [(0, t.jsxs)("label", {
7074
- className: V.upload,
7095
+ className: Os.upload,
7075
7096
  "data-disabled": h || !a,
7076
7097
  "aria-busy": s,
7077
7098
  children: [(0, t.jsx)("span", {
7078
- className: V["upload-icon"],
7099
+ className: Os["upload-icon"],
7079
7100
  "aria-hidden": "true",
7080
7101
  children: (0, t.jsx)("svg", {
7081
7102
  width: "24",
@@ -7091,17 +7112,17 @@ function ks(_ref124) {
7091
7112
  })
7092
7113
  })
7093
7114
  }), (0, t.jsx)("span", {
7094
- className: V["upload-title"],
7115
+ className: Os["upload-title"],
7095
7116
  children: m.add
7096
7117
  }), (0, t.jsx)("span", {
7097
- className: V.hint,
7118
+ className: Os.hint,
7098
7119
  children: m.uploadHint
7099
7120
  }), x()]
7100
7121
  }), !a && (0, t.jsx)("p", {
7101
7122
  role: "status",
7102
7123
  children: m.missingUploader
7103
7124
  }), s && (0, t.jsx)("p", {
7104
- className: V.status,
7125
+ className: Os.status,
7105
7126
  role: "status",
7106
7127
  children: m.uploading
7107
7128
  }), l.length > 0 && (0, t.jsx)("div", {
@@ -7111,48 +7132,22 @@ function ks(_ref124) {
7111
7132
  children: e
7112
7133
  }, n);
7113
7134
  })
7114
- }), (0, t.jsx)("div", {
7115
- className: V.files,
7116
- children: r.files.map(function (e) {
7117
- return (0, t.jsxs)("div", {
7118
- className: V.file,
7119
- children: [(0, t.jsxs)("div", {
7120
- className: "".concat(V["file-heading"], " ").concat(e.kind === "video" ? V["video-heading"] : ""),
7121
- children: [(0, t.jsx)("span", {
7122
- className: V.badge,
7123
- children: m[e.kind]
7124
- }), e.kind === "video" ? (0, t.jsx)(ws, {
7125
- file: e,
7126
- locale: o,
7127
- presentation: "editor"
7128
- }, e.src) : (0, t.jsx)("span", {
7129
- className: V.filename,
7130
- title: e.name,
7131
- children: e.name
7132
- })]
7133
- }), e.kind === "audio" && (0, t.jsx)("div", {
7134
- className: V["audio-player"],
7135
- children: (0, t.jsx)(Es, {
7136
- file: e,
7137
- locale: o
7138
- }, e.src)
7139
- }), (0, t.jsx)("div", {
7140
- className: V.actions,
7141
- children: (0, t.jsx)(N, {
7142
- className: V["action-button"],
7143
- "aria-label": m.remove,
7144
- title: m.remove,
7145
- disabled: h,
7146
- onClick: function onClick() {
7147
- return g(r.files.filter(function (t) {
7148
- return t.id !== e.id;
7149
- }));
7150
- },
7151
- children: (0, t.jsx)(xs, {})
7152
- })
7153
- })]
7154
- }, e.id);
7155
- })
7135
+ }), (0, t.jsx)(Es, {
7136
+ item: r,
7137
+ locale: o,
7138
+ renderFileActions: function renderFileActions(e) {
7139
+ return (0, t.jsx)(N, {
7140
+ "aria-label": m.remove,
7141
+ title: m.remove,
7142
+ disabled: h,
7143
+ onClick: function onClick() {
7144
+ return g(r.files.filter(function (t) {
7145
+ return t.id !== e.id;
7146
+ }));
7147
+ },
7148
+ children: (0, t.jsx)(Ss, {})
7149
+ });
7150
+ }
7156
7151
  })]
7157
7152
  });
7158
7153
  }
@@ -7222,7 +7217,7 @@ function As(_ref129) {
7222
7217
  className: "text-center",
7223
7218
  strong: !0,
7224
7219
  children: u
7225
- }), (0, t.jsx)(I, {
7220
+ }), (0, t.jsx)(F, {
7226
7221
  controls: o,
7227
7222
  disabled: e,
7228
7223
  label: c("questionContentEditor.option.optionAria", {
@@ -7263,7 +7258,7 @@ function As(_ref129) {
7263
7258
  }
7264
7259
  function b(n, r) {
7265
7260
  var i;
7266
- return (0, t.jsx)(I, {
7261
+ return (0, t.jsx)(F, {
7267
7262
  controls: o,
7268
7263
  disabled: e,
7269
7264
  label: c("questionContentEditor.table.cellAria", {
@@ -7331,7 +7326,7 @@ function As(_ref129) {
7331
7326
  className: "flex min-w-72 items-start gap-2",
7332
7327
  children: [(0, t.jsx)("div", {
7333
7328
  className: "min-w-0 flex-1",
7334
- children: (0, t.jsx)(I, {
7329
+ children: (0, t.jsx)(F, {
7335
7330
  controls: o,
7336
7331
  disabled: e,
7337
7332
  label: c("questionContentEditor.table.headerAria", {
@@ -7438,7 +7433,7 @@ function js(_ref131) {
7438
7433
  className: "text-center",
7439
7434
  strong: !0,
7440
7435
  children: i + 1
7441
- }), (0, t.jsx)(I, {
7436
+ }), (0, t.jsx)(F, {
7442
7437
  controls: a,
7443
7438
  disabled: e,
7444
7439
  label: s("questionContentEditor.ordering.optionAria", {
@@ -7528,7 +7523,7 @@ function Ms(_ref132) {
7528
7523
  i = _ref132.richTextControls,
7529
7524
  a = _ref132.translator;
7530
7525
  var o = a.t;
7531
- return (0, t.jsx)(I, {
7526
+ return (0, t.jsx)(F, {
7532
7527
  controls: i,
7533
7528
  disabled: e,
7534
7529
  label: o("questionContentEditor.fields.textContent"),
@@ -7596,7 +7591,7 @@ function Ps(_ref133) {
7596
7591
  size: "small",
7597
7592
  children: d("questionContentEditor.actions.markTextSelection")
7598
7593
  })]
7599
- }), (0, t.jsx)(I, {
7594
+ }), (0, t.jsx)(F, {
7600
7595
  controls: o,
7601
7596
  disabled: e,
7602
7597
  editorRef: u,
@@ -7718,7 +7713,7 @@ function Is(_ref134) {
7718
7713
  size: "small",
7719
7714
  children: d("questionContentEditor.actions.insertInlineBlank")
7720
7715
  })]
7721
- }), (0, t.jsx)(I, {
7716
+ }), (0, t.jsx)(F, {
7722
7717
  controls: s,
7723
7718
  disabled: e,
7724
7719
  editorRef: f,
@@ -7821,7 +7816,7 @@ function Ls(_ref135) {
7821
7816
  locale: (u = c.locale) == null ? "zh-CN" : u
7822
7817
  }));
7823
7818
  }
7824
- return n.type === "imageSelect" ? zs(s, null, (0, t.jsx)(Ko, {
7819
+ return n.type === "imageSelect" ? zs(s, null, (0, t.jsx)(qo, {
7825
7820
  disabled: e,
7826
7821
  element: n,
7827
7822
  hasAnswer: r,
@@ -7829,7 +7824,7 @@ function Ls(_ref135) {
7829
7824
  onChange: a,
7830
7825
  richTextControls: o,
7831
7826
  translator: c
7832
- })) : n.type === "inlineFill" ? (0, t.jsx)(bo, {
7827
+ })) : n.type === "inlineFill" ? (0, t.jsx)(xo, {
7833
7828
  disabled: e,
7834
7829
  element: n,
7835
7830
  hasAnswer: r,
@@ -7847,7 +7842,7 @@ function Ls(_ref135) {
7847
7842
  richTextControls: o,
7848
7843
  title: s,
7849
7844
  translator: c
7850
- }) : n.type === "classification" ? zs(s, null, (0, t.jsx)(yo, {
7845
+ }) : n.type === "classification" ? zs(s, null, (0, t.jsx)(bo, {
7851
7846
  disabled: e,
7852
7847
  hasAnswer: r,
7853
7848
  item: i,
@@ -7892,7 +7887,7 @@ function Rs(_ref136) {
7892
7887
  return a(Bs(i, r));
7893
7888
  },
7894
7889
  children: l("questionContentEditor.actions.addBlank")
7895
- }), (0, t.jsx)(mo, {
7890
+ }), (0, t.jsx)(ho, {
7896
7891
  disabled: e,
7897
7892
  hasAnswer: r,
7898
7893
  item: i,
@@ -7911,7 +7906,7 @@ function Rs(_ref136) {
7911
7906
  translator: c
7912
7907
  }));
7913
7908
  case "judgement":
7914
- return zs(s, null, (0, t.jsx)(Jo, {
7909
+ return zs(s, null, (0, t.jsx)(Yo, {
7915
7910
  disabled: e,
7916
7911
  element: n,
7917
7912
  hasAnswer: r,
@@ -7920,7 +7915,7 @@ function Rs(_ref136) {
7920
7915
  translator: c
7921
7916
  }));
7922
7917
  case "lineConnect":
7923
- return zs(s, null, (0, t.jsx)(ss, {
7918
+ return zs(s, null, (0, t.jsx)(cs, {
7924
7919
  disabled: e,
7925
7920
  element: n,
7926
7921
  hasAnswer: r,
@@ -7930,7 +7925,7 @@ function Rs(_ref136) {
7930
7925
  translator: c
7931
7926
  }));
7932
7927
  case "matching":
7933
- return zs(s, null, (0, t.jsx)(gs, {
7928
+ return zs(s, null, (0, t.jsx)(_s, {
7934
7929
  disabled: e,
7935
7930
  element: n,
7936
7931
  hasAnswer: r,
@@ -9893,7 +9888,7 @@ var wu = {
9893
9888
  },
9894
9889
  blankGroup: Tu,
9895
9890
  classification: Eu,
9896
- lineConnect: z,
9891
+ lineConnect: R,
9897
9892
  matching: Du,
9898
9893
  renderer: G,
9899
9894
  sectionTitle: {
@@ -10765,7 +10760,7 @@ function pd(_ref169) {
10765
10760
  n = _ref169.showAnswer,
10766
10761
  r = _ref169.messages;
10767
10762
  return (0, t.jsxs)(t.Fragment, {
10768
- children: [(0, t.jsx)(Ro, {
10763
+ children: [(0, t.jsx)(zo, {
10769
10764
  item: e,
10770
10765
  selectedIds: [],
10771
10766
  showAnswer: n,
@@ -10816,7 +10811,7 @@ function gd(_ref170) {
10816
10811
  var d = i.items[a];
10817
10812
  if (d.type !== "imageSelect" || d.answerType !== r.config.answerType) throw TypeError("imageSelect: answerType mismatch");
10818
10813
  return (0, t.jsxs)(t.Fragment, {
10819
- children: [(0, t.jsx)(Ro, {
10814
+ children: [(0, t.jsx)(zo, {
10820
10815
  item: n,
10821
10816
  selectedIds: b(d, n.objects),
10822
10817
  disabled: e || !!c,
@@ -10993,7 +10988,7 @@ function Sd(_ref173) {
10993
10988
  gridTemplateColumns: "repeat(".concat(i.columns.length, ", fit-content(16rem))")
10994
10989
  },
10995
10990
  y = (0, n.useMemo)(function () {
10996
- return Qo(i, _.connections);
10991
+ return $o(i, _.connections);
10997
10992
  }, [i, _.connections]),
10998
10993
  b = (0, n.useMemo)(function () {
10999
10994
  return JSON.stringify({
@@ -11020,13 +11015,13 @@ function Sd(_ref173) {
11020
11015
  s = a.getBoundingClientRect();
11021
11016
  return [].concat(_toConsumableArray(n), [{
11022
11017
  key: r.key,
11023
- x1: ns(o, t, e.scrollLeft),
11024
- x2: ts(s, t, e.scrollLeft),
11025
- y1: es(o, t, e.scrollTop),
11026
- y2: es(s, t, e.scrollTop)
11018
+ x1: rs(o, t, e.scrollLeft),
11019
+ x2: ns(s, t, e.scrollLeft),
11020
+ y1: ts(o, t, e.scrollTop),
11021
+ y2: ts(s, t, e.scrollTop)
11027
11022
  }]);
11028
11023
  }, []);
11029
- rs(m, {
11024
+ is(m, {
11030
11025
  height: e.scrollHeight,
11031
11026
  lines: n,
11032
11027
  width: e.scrollWidth
@@ -11077,12 +11072,12 @@ function Sd(_ref173) {
11077
11072
  return (0, t.jsxs)("div", {
11078
11073
  className: G.element,
11079
11074
  children: [(0, t.jsxs)("div", {
11080
- className: z.board,
11075
+ className: R.board,
11081
11076
  "data-testid": "line-connect-player-board",
11082
11077
  ref: h,
11083
11078
  children: [p ? (0, t.jsx)("svg", {
11084
11079
  "aria-hidden": "true",
11085
- className: z.lines,
11080
+ className: R.lines,
11086
11081
  "data-testid": "line-connect-player-lines",
11087
11082
  style: {
11088
11083
  height: "".concat(p.height, "px"),
@@ -11098,7 +11093,7 @@ function Sd(_ref173) {
11098
11093
  return e.fromItemId === (i == null ? void 0 : i.fromItemId) && e.toItemId === (i == null ? void 0 : i.toItemId);
11099
11094
  })) == null ? void 0 : r.status;
11100
11095
  return (0, t.jsx)("line", {
11101
- className: U(z.line, Xl.line, Ql(a)),
11096
+ className: U(R.line, Xl.line, Ql(a)),
11102
11097
  "data-grading-status": a,
11103
11098
  x1: n.x1,
11104
11099
  x2: n.x2,
@@ -11107,29 +11102,29 @@ function Sd(_ref173) {
11107
11102
  }, n.key);
11108
11103
  })
11109
11104
  }) : null, (0, t.jsx)("div", {
11110
- className: U(z.columns, z["player-columns"]),
11105
+ className: U(R.columns, R["player-columns"]),
11111
11106
  style: v,
11112
11107
  children: i.columns.map(function (n, i) {
11113
11108
  return (0, t.jsx)("section", {
11114
- className: z.column,
11109
+ className: R.column,
11115
11110
  children: n.items.map(function (a, o) {
11116
11111
  var s = On(n.labelStyle, o),
11117
11112
  c = !e && (d == null ? void 0 : d.itemId) === a.itemId;
11118
11113
  return (0, t.jsx)("div", {
11119
- className: U(z.item, c && z.selected),
11114
+ className: U(R.item, c && R.selected),
11120
11115
  "data-selected": c ? "true" : void 0,
11121
11116
  "data-testid": "line-connect-player-item-".concat(a.itemId),
11122
11117
  ref: S(a.itemId),
11123
11118
  children: (0, t.jsxs)("button", {
11124
11119
  "aria-pressed": c,
11125
- className: z.button,
11120
+ className: R.button,
11126
11121
  disabled: r,
11127
11122
  onClick: function onClick() {
11128
11123
  return C(i, a.itemId);
11129
11124
  },
11130
11125
  type: "button",
11131
11126
  children: [s ? (0, t.jsx)("span", {
11132
- className: z.marker,
11127
+ className: R.marker,
11133
11128
  children: s
11134
11129
  }) : null, (0, t.jsx)(J, {
11135
11130
  content: a.content
@@ -11141,7 +11136,7 @@ function Sd(_ref173) {
11141
11136
  })
11142
11137
  })]
11143
11138
  }), r ? null : (0, t.jsx)("p", {
11144
- className: z.hint,
11139
+ className: R.hint,
11145
11140
  children: a.lineConnectHint
11146
11141
  }), u ? (0, t.jsx)(Y, {
11147
11142
  groups: bd(i),
@@ -11895,7 +11890,7 @@ function Gd(_ref190) {
11895
11890
  n = c && r.includes(e);
11896
11891
  return {
11897
11892
  answer: n,
11898
- className: Yo(l.marker, o ? l["marker-button"] : "", t ? l["marker-selected"] : "", n ? l["marker-answer"] : ""),
11893
+ className: Xo(l.marker, o ? l["marker-button"] : "", t ? l["marker-selected"] : "", n ? l["marker-answer"] : ""),
11899
11894
  selected: t
11900
11895
  };
11901
11896
  }
@@ -11986,7 +11981,7 @@ function Yd(_ref192) {
11986
11981
  var l = fl(o, s);
11987
11982
  return e ? j(l.content) ? null : (0, t.jsx)(J, {
11988
11983
  content: l.content
11989
- }) : (0, t.jsx)(so, {
11984
+ }) : (0, t.jsx)(co, {
11990
11985
  ariaLabel: r,
11991
11986
  locale: n,
11992
11987
  onChange: function onChange(e) {
@@ -12302,7 +12297,7 @@ function tf(_ref197) {
12302
12297
  }
12303
12298
  }
12304
12299
  function nf(e, n) {
12305
- return e.type === "media" ? (0, t.jsx)(Ds, {
12300
+ return e.type === "media" ? (0, t.jsx)(Es, {
12306
12301
  item: e,
12307
12302
  locale: n
12308
12303
  }) : (0, t.jsx)(J, {
@@ -13174,7 +13169,7 @@ function Mf(_ref216) {
13174
13169
  }
13175
13170
  }
13176
13171
  function Nf(e, n, r, i, a) {
13177
- return e.type === "media" ? (0, t.jsx)(Ds, {
13172
+ return e.type === "media" ? (0, t.jsx)(Es, {
13178
13173
  item: e,
13179
13174
  locale: i,
13180
13175
  print: a
@@ -14652,4 +14647,4 @@ function Gp(e) {
14652
14647
  var t, n, r, i;
14653
14648
  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;
14654
14649
  }
14655
- exports.QuestionContentEditor = fc, exports.QuestionPlayer = pf, exports.QuestionPreview = qf, exports.QuestionPrintPreview = cp, exports.QuestionRichContentView = J, exports.QuestionStructureEditor = Up, exports.addBlankToGroup = ur, exports.alignQuestionContentDraftWithStructure = Rn, exports.assignBlankToAnswerGroup = mr, exports.cn = Yo, exports.createBlankAnswerGroupWithBlank = hr, exports.createEmptyQuestionContentDraft = gn, exports.createEmptyQuestionPlayerResponse = el, exports.createEmptyQuestionStructureDraft = xe, exports.createQuestionContentDraftFromSerialized = Ln, exports.createQuestionContentId = E, exports.createQuestionContentStructureFromDraft = hc, exports.createQuestionPreviewDraft = gc, exports.createQuestionStructureElement = Ce, exports.createQuestionStructureExtra = Se, exports.createRichContentValue = A, exports.createRichContentValueFromDocument = xn, exports.createRichTextContent = qe, exports.deleteBlankFromGroup = dr, exports.deleteQuestionStructureElement = De, exports.deleteQuestionStructureExtra = Ee, exports.detachBlankFromAnswerGroup = gr, exports.findQuestionContentQuestionTypeStructure = Da, exports.findQuestionContentQuestionTypeTemplate = ja, exports.getQuestionContentJudgementOptions = An, exports.getQuestionContentOptionMarker = Dn, exports.getQuestionContentTextMarkerAnswerText = Cn, exports.getQuestionStructureDraftChangeKind = vc, exports.getQuestionStructureElementDefaultEnName = k, exports.getQuestionStructureElementDefaultName = O, exports.getQuestionStructureExtraDefaultEnName = Pe, exports.getQuestionStructureExtraDefaultName = Ne, exports.getRichContentDocument = wn, exports.getSharedBlankAnswerGroups = pr, exports.isCompositeQuestionContentStructure = hn, exports.isQuestionContentDraftEmpty = Fn, exports.moveQuestionStructureElement = Oe, exports.normalizeFillTextCandidateState = qn, exports.normalizeRichTextContent = Je, exports.questionStructureElementTypes = he, exports.questionStructureExtraTypes = ge, exports.reconcileQuestionContentDraftWithTemplates = Ma, exports.resetImageAnswerMode = te, exports.serializeQuestionContentDraft = In, exports.serializeQuestionStructureDraft = _c, exports.updateQuestionStructureElement = Ae, exports.updateQuestionStructureExtra = ke, exports.updateQuestionStructureGlobalConfig = je, exports.updateQuestionStructureMetadata = Me;
14650
+ exports.QuestionContentEditor = fc, exports.QuestionPlayer = pf, exports.QuestionPreview = qf, exports.QuestionPrintPreview = cp, exports.QuestionRichContentView = J, exports.QuestionStructureEditor = Up, exports.addBlankToGroup = ur, exports.alignQuestionContentDraftWithStructure = Rn, exports.assignBlankToAnswerGroup = mr, exports.cn = Xo, exports.createBlankAnswerGroupWithBlank = hr, exports.createEmptyQuestionContentDraft = gn, exports.createEmptyQuestionPlayerResponse = el, exports.createEmptyQuestionStructureDraft = xe, exports.createQuestionContentDraftFromSerialized = Ln, exports.createQuestionContentId = E, exports.createQuestionContentStructureFromDraft = hc, exports.createQuestionPreviewDraft = gc, exports.createQuestionStructureElement = Ce, exports.createQuestionStructureExtra = Se, exports.createRichContentValue = A, exports.createRichContentValueFromDocument = xn, exports.createRichTextContent = qe, exports.deleteBlankFromGroup = dr, exports.deleteQuestionStructureElement = De, exports.deleteQuestionStructureExtra = Ee, exports.detachBlankFromAnswerGroup = gr, exports.findQuestionContentQuestionTypeStructure = Da, exports.findQuestionContentQuestionTypeTemplate = ja, exports.getQuestionContentJudgementOptions = An, exports.getQuestionContentOptionMarker = Dn, exports.getQuestionContentTextMarkerAnswerText = Cn, exports.getQuestionStructureDraftChangeKind = vc, exports.getQuestionStructureElementDefaultEnName = k, exports.getQuestionStructureElementDefaultName = O, exports.getQuestionStructureExtraDefaultEnName = Pe, exports.getQuestionStructureExtraDefaultName = Ne, exports.getRichContentDocument = wn, exports.getSharedBlankAnswerGroups = pr, exports.isCompositeQuestionContentStructure = hn, exports.isQuestionContentDraftEmpty = Fn, exports.moveQuestionStructureElement = Oe, exports.normalizeFillTextCandidateState = qn, exports.normalizeRichTextContent = Je, exports.questionStructureElementTypes = he, exports.questionStructureExtraTypes = ge, exports.reconcileQuestionContentDraftWithTemplates = Ma, exports.resetImageAnswerMode = te, exports.serializeQuestionContentDraft = In, exports.serializeQuestionStructureDraft = _c, exports.updateQuestionStructureElement = Ae, exports.updateQuestionStructureExtra = ke, exports.updateQuestionStructureGlobalConfig = je, exports.updateQuestionStructureMetadata = Me;