@citolab/qti-components 10.0.0-next.13 → 10.0.0-next.14

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.
Files changed (59) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +383 -399
  3. package/dist/base.d.ts +1 -1
  4. package/dist/base.js +1 -1
  5. package/dist/{chunk-Y5DZTCDP.js → chunk-6XRNX574.js} +224 -257
  6. package/dist/chunk-6XRNX574.js.map +1 -0
  7. package/dist/{chunk-G6LTYTJR.js → chunk-BZPMN57E.js} +2 -2
  8. package/dist/{chunk-AKX4YMWU.js → chunk-C7SYDLMG.js} +197 -93
  9. package/dist/chunk-C7SYDLMG.js.map +1 -0
  10. package/dist/{chunk-H3GITIPE.js → chunk-CCI3QMQA.js} +23 -7
  11. package/dist/chunk-CCI3QMQA.js.map +1 -0
  12. package/dist/{chunk-FLAD6SC6.js → chunk-HGKLF7SP.js} +2 -2
  13. package/dist/{chunk-K4WLYVDT.js → chunk-LEF7AAYZ.js} +2 -2
  14. package/dist/{chunk-HOGJ5ZNW.js → chunk-MP2SUN7J.js} +193 -86
  15. package/dist/chunk-MP2SUN7J.js.map +1 -0
  16. package/dist/{chunk-PHRHLDQB.js → chunk-NYNL5HSR.js} +2 -2
  17. package/dist/{chunk-WUIA4OOX.js → chunk-O2ENNGKV.js} +3 -2
  18. package/dist/chunk-O2ENNGKV.js.map +1 -0
  19. package/dist/chunk-Q4MJCEDE.js +7 -0
  20. package/dist/chunk-Q4MJCEDE.js.map +1 -0
  21. package/dist/{chunk-EIBGCCXH.js → chunk-S5GLISQA.js} +2 -2
  22. package/dist/{chunk-PYHKCIYN.js → chunk-SWNFCQ4G.js} +3 -3
  23. package/dist/{chunk-MDBNEEPH.js → chunk-TU34FFWF.js} +8 -3
  24. package/dist/chunk-TU34FFWF.js.map +1 -0
  25. package/dist/corrections.d.ts +3 -3
  26. package/dist/corrections.js +8 -8
  27. package/dist/elements.d.ts +54 -12
  28. package/dist/elements.js +3 -3
  29. package/dist/index.d.ts +3 -3
  30. package/dist/index.js +13 -13
  31. package/dist/interactions.d.ts +15 -3
  32. package/dist/interactions.js +3 -3
  33. package/dist/item.css +33 -8
  34. package/dist/item.d.ts +1 -1
  35. package/dist/item.js +4 -4
  36. package/dist/loader.d.ts +1 -1
  37. package/dist/processing.d.ts +8 -4
  38. package/dist/processing.js +3 -3
  39. package/dist/qti-components-jsx.d.ts +245 -97
  40. package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
  41. package/dist/{qti-test.d-B6AGSQlk.d.ts → qti-test.d-C0I1BIdH.d.ts} +29 -3
  42. package/dist/{qti-text-entry-interaction.d-B44Z3qUG.d.ts → qti-text-entry-interaction.d-V4sWE9TO.d.ts} +31 -5
  43. package/dist/test.d.ts +3 -3
  44. package/dist/test.js +5 -5
  45. package/package.json +10 -10
  46. package/dist/chunk-AKX4YMWU.js.map +0 -1
  47. package/dist/chunk-DVLSXMXD.js +0 -7
  48. package/dist/chunk-DVLSXMXD.js.map +0 -1
  49. package/dist/chunk-H3GITIPE.js.map +0 -1
  50. package/dist/chunk-HOGJ5ZNW.js.map +0 -1
  51. package/dist/chunk-MDBNEEPH.js.map +0 -1
  52. package/dist/chunk-WUIA4OOX.js.map +0 -1
  53. package/dist/chunk-Y5DZTCDP.js.map +0 -1
  54. /package/dist/{chunk-G6LTYTJR.js.map → chunk-BZPMN57E.js.map} +0 -0
  55. /package/dist/{chunk-FLAD6SC6.js.map → chunk-HGKLF7SP.js.map} +0 -0
  56. /package/dist/{chunk-K4WLYVDT.js.map → chunk-LEF7AAYZ.js.map} +0 -0
  57. /package/dist/{chunk-PHRHLDQB.js.map → chunk-NYNL5HSR.js.map} +0 -0
  58. /package/dist/{chunk-EIBGCCXH.js.map → chunk-S5GLISQA.js.map} +0 -0
  59. /package/dist/{chunk-PYHKCIYN.js.map → chunk-SWNFCQ4G.js.map} +0 -0
@@ -3,10 +3,10 @@ import {
3
3
  dispatchDeclared,
4
4
  listenDeclared,
5
5
  listenPublic
6
- } from "./chunk-AKX4YMWU.js";
6
+ } from "./chunk-C7SYDLMG.js";
7
7
  import {
8
8
  item_css_default
9
- } from "./chunk-DVLSXMXD.js";
9
+ } from "./chunk-Q4MJCEDE.js";
10
10
  import {
11
11
  watch
12
12
  } from "./chunk-4DB4SC5K.js";
@@ -25,7 +25,7 @@ import {
25
25
  qtiContext,
26
26
  sessionContext,
27
27
  testContext
28
- } from "./chunk-WUIA4OOX.js";
28
+ } from "./chunk-O2ENNGKV.js";
29
29
 
30
30
  // ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
31
31
  import { LitElement, nothing as nothing2 } from "lit";
@@ -3054,18 +3054,25 @@ __decorate13([
3054
3054
  ], TestContainer.prototype, "handleTestXMLChange", null);
3055
3055
 
3056
3056
  // ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
3057
- import { css as css6, html as html11, LitElement as LitElement12 } from "lit";
3057
+ import { LitElement as LitElement12 } from "lit";
3058
3058
  import { property as property11 } from "lit/decorators.js";
3059
3059
  import { consume as consume7 } from "@lit/context";
3060
3060
 
3061
3061
  // ../qti-test/dist/components/styles.js
3062
- import { css as css5 } from "lit";
3062
+ import { css as css5, html as html11 } from "lit";
3063
3063
  var surface = css5`var(--qti-color-base-100, var(--cito-color-base-100, Canvas))`;
3064
3064
  var content = css5`var(--qti-color-base-content, var(--cito-color-base-content, CanvasText))`;
3065
3065
  var neutral = css5`var(--qti-color-neutral, var(--cito-color-neutral, CanvasText))`;
3066
3066
  var neutralContent = css5`var(--qti-color-neutral-content, var(--cito-color-neutral-content, Canvas))`;
3067
- var form = css5`
3067
+ var hostBox = css5`
3068
3068
  display: inline-flex;
3069
+ cursor: pointer;
3070
+ user-select: none;
3071
+ border-radius: var(--test-button-border-radius, var(--qti-radius-field, var(--cito-radius-field, 0.2rem)));
3072
+ `;
3073
+ var form = css5`
3074
+ display: flex;
3075
+ flex: 1 1 auto;
3069
3076
  align-items: center;
3070
3077
  justify-content: center;
3071
3078
  gap: 0.375em;
@@ -3126,6 +3133,45 @@ var ind = css5`
3126
3133
  ${form};
3127
3134
  border: var(--qti-border-width, var(--cito-border-width, 1px)) solid var(--qti-border-color, GrayText);
3128
3135
  `;
3136
+ var control = html11`<span class="control" part="button"><slot></slot></span>`;
3137
+ var button = css5`
3138
+ :host {
3139
+ ${hostBox};
3140
+ }
3141
+ .control {
3142
+ ${btn};
3143
+ }
3144
+ @media (hover: hover) and (pointer: fine) {
3145
+ :host(:hover:not([disabled])) .control {
3146
+ ${btnInteractive};
3147
+ }
3148
+ }
3149
+ :host(:active:not([disabled])) .control {
3150
+ ${btnActive};
3151
+ }
3152
+ :host(:focus-visible) {
3153
+ ${focusRing};
3154
+ }
3155
+ :host([disabled]) {
3156
+ ${dis};
3157
+ }
3158
+ :host([disabled]) .control {
3159
+ cursor: not-allowed;
3160
+ }
3161
+ `;
3162
+ var buttonPrimary = css5`
3163
+ .control {
3164
+ ${btnPrimary};
3165
+ }
3166
+ @media (hover: hover) and (pointer: fine) {
3167
+ :host(:hover:not([disabled])) .control {
3168
+ ${btnPrimaryInteractive};
3169
+ }
3170
+ }
3171
+ :host(:active:not([disabled])) .control {
3172
+ ${btnPrimaryActive};
3173
+ }
3174
+ `;
3129
3175
 
3130
3176
  // ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
3131
3177
  var __decorate14 = function(decorators, target, key, desc) {
@@ -3134,6 +3180,13 @@ var __decorate14 = function(decorators, target, key, desc) {
3134
3180
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3135
3181
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3136
3182
  };
3183
+ var itemRefOf = (element) => {
3184
+ const itemRef = element.closest("qti-assessment-item-ref");
3185
+ if (itemRef)
3186
+ return itemRef.getAttribute("identifier") ?? void 0;
3187
+ const root = element.getRootNode();
3188
+ return root instanceof ShadowRoot ? itemRefOf(root.host) : void 0;
3189
+ };
3137
3190
  var TestEndAttempt = class extends LitElement12 {
3138
3191
  _handleTestElementChange(_oldValue, newValue) {
3139
3192
  if (newValue) {
@@ -3141,46 +3194,34 @@ var TestEndAttempt = class extends LitElement12 {
3141
3194
  }
3142
3195
  }
3143
3196
  static {
3144
- this.styles = css6`
3145
- :host {
3146
- ${btn};
3147
- }
3148
- @media (hover: hover) and (pointer: fine) {
3149
- :host(:hover:not([disabled])) {
3150
- ${btnInteractive};
3151
- }
3152
- }
3153
- :host(:active:not([disabled])) {
3154
- ${btnActive};
3155
- }
3156
- :host(:focus-visible) {
3157
- ${focusRing};
3158
- }
3159
- :host([disabled]) {
3160
- ${dis};
3161
- }
3162
- `;
3197
+ this.styles = button;
3163
3198
  }
3164
3199
  constructor() {
3165
3200
  super();
3166
3201
  this._internalDisabled = false;
3202
+ this.requireAnswer = false;
3167
3203
  this.addEventListener("click", (e) => {
3168
3204
  e.preventDefault();
3169
3205
  if (!this._internalDisabled) {
3170
- dispatchPublic(this, "cito-test-end-attempt", {});
3206
+ const itemId = this.#ownItem;
3207
+ dispatchPublic(this, "cito-test-end-attempt", itemId ? { itemId } : {});
3171
3208
  }
3172
3209
  });
3173
3210
  }
3211
+ /** The item named by `item`, or else the item-ref it is stamped into. */
3212
+ get #ownItem() {
3213
+ return this.item || itemRefOf(this);
3214
+ }
3174
3215
  willUpdate(_changedProperties) {
3175
3216
  this.checkDisabled();
3176
3217
  }
3177
3218
  checkDisabled() {
3178
- const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
3179
- if (!testPart)
3219
+ const testParts = this.computedContext?.testParts;
3220
+ const ownItem = this.#ownItem;
3221
+ const testPart = testParts?.find((testPart2) => testPart2.active);
3222
+ if (!testParts || !ownItem && !testPart)
3180
3223
  return;
3181
- const sectionItems = testPart.sections.flatMap((section) => section.items);
3182
- const itemIndex = sectionItems.findIndex((item) => item.active);
3183
- const activeItem = sectionItems[itemIndex];
3224
+ const activeItem = ownItem ? testParts.flatMap((part) => part.sections.flatMap((section) => section.items)).find((i) => i.identifier === ownItem) : testPart.sections.flatMap((section) => section.items).find((item) => item.active);
3184
3225
  if (!activeItem) {
3185
3226
  this._internalDisabled = false;
3186
3227
  return;
@@ -3199,14 +3240,14 @@ var TestEndAttempt = class extends LitElement12 {
3199
3240
  this._internalDisabled = true;
3200
3241
  return;
3201
3242
  }
3202
- if (activeItem.allowSkipping === false) {
3243
+ if (this.requireAnswer || activeItem.allowSkipping === false) {
3203
3244
  this._internalDisabled = activeItem.valid === false || activeItem.isDefaultResponse;
3204
3245
  } else {
3205
3246
  this._internalDisabled = false;
3206
3247
  }
3207
3248
  }
3208
3249
  render() {
3209
- return html11` <slot></slot> `;
3250
+ return control;
3210
3251
  }
3211
3252
  };
3212
3253
  __decorate14([
@@ -3216,12 +3257,18 @@ __decorate14([
3216
3257
  __decorate14([
3217
3258
  property11({ type: Boolean, reflect: true, attribute: "disabled" })
3218
3259
  ], TestEndAttempt.prototype, "_internalDisabled", void 0);
3260
+ __decorate14([
3261
+ property11({ reflect: true })
3262
+ ], TestEndAttempt.prototype, "item", void 0);
3263
+ __decorate14([
3264
+ property11({ type: Boolean, reflect: true, attribute: "require-answer" })
3265
+ ], TestEndAttempt.prototype, "requireAnswer", void 0);
3219
3266
  __decorate14([
3220
3267
  watch("computedContext")
3221
3268
  ], TestEndAttempt.prototype, "_handleTestElementChange", null);
3222
3269
 
3223
3270
  // ../qti-test/dist/components/test-item-link/test-item-link.js
3224
- import { css as css7, html as html12, LitElement as LitElement13 } from "lit";
3271
+ import { LitElement as LitElement13 } from "lit";
3225
3272
  import { property as property12 } from "lit/decorators.js";
3226
3273
  var __decorate15 = function(decorators, target, key, desc) {
3227
3274
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3231,25 +3278,7 @@ var __decorate15 = function(decorators, target, key, desc) {
3231
3278
  };
3232
3279
  var TestItemLink = class extends LitElement13 {
3233
3280
  static {
3234
- this.styles = css7`
3235
- :host {
3236
- ${btn};
3237
- }
3238
- @media (hover: hover) and (pointer: fine) {
3239
- :host(:hover:not([disabled])) {
3240
- ${btnInteractive};
3241
- }
3242
- }
3243
- :host(:active:not([disabled])) {
3244
- ${btnActive};
3245
- }
3246
- :host(:focus-visible) {
3247
- ${focusRing};
3248
- }
3249
- :host([disabled]) {
3250
- ${dis};
3251
- }
3252
- `;
3281
+ this.styles = button;
3253
3282
  }
3254
3283
  constructor() {
3255
3284
  super();
@@ -3260,7 +3289,7 @@ var TestItemLink = class extends LitElement13 {
3260
3289
  dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
3261
3290
  }
3262
3291
  render() {
3263
- return html12` <slot></slot> `;
3292
+ return control;
3264
3293
  }
3265
3294
  };
3266
3295
  __decorate15([
@@ -3269,7 +3298,7 @@ __decorate15([
3269
3298
 
3270
3299
  // ../qti-test/dist/components/test-navigation/test-navigation.js
3271
3300
  import { ContextConsumer, consume as consume8, provide as provide3 } from "@lit/context";
3272
- import { html as html13, LitElement as LitElement14 } from "lit";
3301
+ import { html as html12, LitElement as LitElement14 } from "lit";
3273
3302
  import { property as property13, state as state4 } from "lit/decorators.js";
3274
3303
  var __decorate16 = function(decorators, target, key, desc) {
3275
3304
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3344,6 +3373,7 @@ var TestNavigation = class extends LitElement14 {
3344
3373
  this.autoScoreItems = false;
3345
3374
  this.#optimality = /* @__PURE__ */ new Map();
3346
3375
  this.#itemElement = (identifier) => this.#assessmentItemFor(identifier) ?? null;
3376
+ this.#lockedItems = /* @__PURE__ */ new WeakSet();
3347
3377
  listenPublic2(this, "cito-test-loaded", this.#handleTestConnected.bind(this));
3348
3378
  this.addEventListener("qti-assessment-item-connected", this.#handleItemConnected.bind(this));
3349
3379
  listenPublic(this, "cito-item-response-changed", this.#handleInteractionChanged.bind(this));
@@ -3399,13 +3429,12 @@ var TestNavigation = class extends LitElement14 {
3399
3429
  return this.#testElement.querySelector(`qti-assessment-item-ref[identifier="${this._sessionContext.navItemRefId}"]`)?.assessmentItem;
3400
3430
  }
3401
3431
  /**
3402
- * Handles the 'test-end-attempt' event.
3403
- * @private
3404
- * @listens TestNavigation#test-end-attempt
3405
- * @param {CustomEvent} event - The custom event object.
3432
+ * Ends an attempt: the item named by `detail.itemId` (a `test-end-attempt` stamped into an item, or
3433
+ * given an `item`), or else the item on screen.
3406
3434
  */
3407
- #handleTestEndAttempt(_event) {
3408
- const qtiAssessmentItemEl = this.activeAssessmentItem;
3435
+ #handleTestEndAttempt(event) {
3436
+ const itemId = event.detail?.itemId;
3437
+ const qtiAssessmentItemEl = itemId ? this.#assessmentItemFor(itemId) : this.activeAssessmentItem;
3409
3438
  if (!qtiAssessmentItemEl)
3410
3439
  return;
3411
3440
  const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
@@ -3430,7 +3459,7 @@ var TestNavigation = class extends LitElement14 {
3430
3459
  }
3431
3460
  }
3432
3461
  render() {
3433
- return html13`<slot></slot>`;
3462
+ return html12`<slot></slot>`;
3434
3463
  }
3435
3464
  /* PK: on test connected we can build the computed context */
3436
3465
  #handleTestConnected(event) {
@@ -3622,7 +3651,7 @@ var TestNavigation = class extends LitElement14 {
3622
3651
  return {
3623
3652
  ...section,
3624
3653
  active: this._sessionContext?.navSectionId === section.identifier || false,
3625
- completed: section.items.every((item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"),
3654
+ completed: section.items.every((item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus")?.value === "completed"),
3626
3655
  items: section.items.map((item) => {
3627
3656
  const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
3628
3657
  const computedItem = {
@@ -3637,7 +3666,7 @@ var TestNavigation = class extends LitElement14 {
3637
3666
  const numAttempts = Number(computedItem.variables?.find((v) => v.identifier === "numAttempts")?.value) || 0;
3638
3667
  const active = this._sessionContext?.navItemRefId === computedItem.identifier || false;
3639
3668
  const valid = itemContext?.valid ?? true;
3640
- const responseVars = itemContext?.variables?.filter((v) => v.type === "response") || [];
3669
+ const responseVars = itemContext?.variables?.filter((v) => v.type === "response" && v.identifier !== "numAttempts") || [];
3641
3670
  const isDefaultResponse = responseVars.every((v) => {
3642
3671
  if (v.value === void 0 || v.value === null) {
3643
3672
  return true;
@@ -3712,6 +3741,53 @@ var TestNavigation = class extends LitElement14 {
3712
3741
  bubbles: true
3713
3742
  }));
3714
3743
  }
3744
+ updated(changedProperties) {
3745
+ super.updated(changedProperties);
3746
+ this.#lockUsedItems();
3747
+ }
3748
+ /** The items this navigation disabled because their attempts are used, so it releases only those. */
3749
+ #lockedItems;
3750
+ /**
3751
+ * Disables every rendered item whose attempts are used, from the computed context, so the
3752
+ * candidate cannot change the answer once the last attempt is ended. Runs after every update:
3753
+ * an item rendered later (another item, a section on screen, a restored state) is locked as it
3754
+ * arrives, and one whose attempts are back to zero (a new state) is released.
3755
+ *
3756
+ * Only `disabled = true` is ever set here, and only on an item that was not disabled already; a
3757
+ * host or view that disables or makes an item read-only itself keeps it so.
3758
+ */
3759
+ #lockUsedItems() {
3760
+ if (!this.#testElement || !this.computedContext)
3761
+ return;
3762
+ const items = new Map(this.computedContext.testParts.flatMap((part) => part.sections.flatMap((section) => (section.submissionMode || part.submissionMode) === "simultaneous" ? [] : section.items.map((item) => [item.identifier, item]))));
3763
+ for (const itemRef of this.#testElement.querySelectorAll("qti-assessment-item-ref")) {
3764
+ const element = itemRef.assessmentItem;
3765
+ if (!element)
3766
+ continue;
3767
+ const used = this.#attemptsUsed(items.get(itemRef.identifier), element);
3768
+ if (used && !element.disabled) {
3769
+ element.disabled = true;
3770
+ this.#lockedItems.add(element);
3771
+ } else if (!used && this.#lockedItems.has(element)) {
3772
+ this.#lockedItems.delete(element);
3773
+ element.disabled = false;
3774
+ }
3775
+ }
3776
+ }
3777
+ /**
3778
+ * The same rule as `test-end-attempt`'s max-attempts guard: a non-adaptive item with a
3779
+ * `max-attempts` above 0 whose attempts reached it. Adaptive items end themselves, and 0 is
3780
+ * unlimited. With `auto-score-items` every change is scored as an attempt, so the count is not
3781
+ * the candidate's and locks nothing.
3782
+ */
3783
+ #attemptsUsed(item, element) {
3784
+ if (!item || this.autoScoreItems)
3785
+ return false;
3786
+ if (item.adaptive || element.adaptive === "true")
3787
+ return false;
3788
+ const maxAttempts = item.maxAttempts ?? 1;
3789
+ return maxAttempts > 0 && (item.numAttempts ?? 0) >= maxAttempts;
3790
+ }
3715
3791
  /**
3716
3792
  * Decide whether an item should be treated as "the candidate is done with it"
3717
3793
  * for the purpose of gating forward navigation and further attempts.
@@ -3822,7 +3898,7 @@ __decorate16([
3822
3898
  ], TestNavigation.prototype, "autoScoreItems", void 0);
3823
3899
 
3824
3900
  // ../qti-test/dist/components/test-next/test-next.js
3825
- import { css as css8, html as html14, LitElement as LitElement15 } from "lit";
3901
+ import { LitElement as LitElement15 } from "lit";
3826
3902
  import { property as property14 } from "lit/decorators.js";
3827
3903
  import { consume as consume9 } from "@lit/context";
3828
3904
  var __decorate17 = function(decorators, target, key, desc) {
@@ -3838,26 +3914,7 @@ var TestNext = class extends LitElement15 {
3838
3914
  }
3839
3915
  }
3840
3916
  static {
3841
- this.styles = css8`
3842
- :host {
3843
- ${btn};
3844
- ${btnPrimary};
3845
- }
3846
- @media (hover: hover) and (pointer: fine) {
3847
- :host(:hover:not([disabled])) {
3848
- ${btnPrimaryInteractive};
3849
- }
3850
- }
3851
- :host(:active:not([disabled])) {
3852
- ${btnPrimaryActive};
3853
- }
3854
- :host(:focus-visible) {
3855
- ${focusRing};
3856
- }
3857
- :host([disabled]) {
3858
- ${dis};
3859
- }
3860
- `;
3917
+ this.styles = [button, buttonPrimary];
3861
3918
  }
3862
3919
  #internals;
3863
3920
  constructor() {
@@ -3901,7 +3958,7 @@ var TestNext = class extends LitElement15 {
3901
3958
  dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
3902
3959
  }
3903
3960
  render() {
3904
- return html14`<slot></slot>`;
3961
+ return control;
3905
3962
  }
3906
3963
  };
3907
3964
  __decorate17([
@@ -3915,7 +3972,7 @@ __decorate17([
3915
3972
  ], TestNext.prototype, "_handleTestElementChange", null);
3916
3973
 
3917
3974
  // ../qti-test/dist/components/test-prev/test-prev.js
3918
- import { css as css9, html as html15, LitElement as LitElement16 } from "lit";
3975
+ import { LitElement as LitElement16 } from "lit";
3919
3976
  import { property as property15 } from "lit/decorators.js";
3920
3977
  import { consume as consume10 } from "@lit/context";
3921
3978
  var __decorate18 = function(decorators, target, key, desc) {
@@ -3931,25 +3988,7 @@ var TestPrev = class extends LitElement16 {
3931
3988
  }
3932
3989
  }
3933
3990
  static {
3934
- this.styles = css9`
3935
- :host {
3936
- ${btn};
3937
- }
3938
- @media (hover: hover) and (pointer: fine) {
3939
- :host(:hover:not([disabled])) {
3940
- ${btnInteractive};
3941
- }
3942
- }
3943
- :host(:active:not([disabled])) {
3944
- ${btnActive};
3945
- }
3946
- :host(:focus-visible) {
3947
- ${focusRing};
3948
- }
3949
- :host([disabled]) {
3950
- ${dis};
3951
- }
3952
- `;
3991
+ this.styles = button;
3953
3992
  }
3954
3993
  constructor() {
3955
3994
  super();
@@ -3980,7 +4019,7 @@ var TestPrev = class extends LitElement16 {
3980
4019
  dispatchPublic(this, "cito-test-navigate", { type: "item", id: identifier });
3981
4020
  }
3982
4021
  render() {
3983
- return html15`<slot></slot>`;
4022
+ return control;
3984
4023
  }
3985
4024
  };
3986
4025
  __decorate18([
@@ -3994,7 +4033,7 @@ __decorate18([
3994
4033
  ], TestPrev.prototype, "_handleTestElementChange", null);
3995
4034
 
3996
4035
  // ../qti-test/dist/components/test-section-link/test-section-link.js
3997
- import { css as css10, html as html16, LitElement as LitElement17 } from "lit";
4036
+ import { LitElement as LitElement17 } from "lit";
3998
4037
  import { property as property16 } from "lit/decorators.js";
3999
4038
  var __decorate19 = function(decorators, target, key, desc) {
4000
4039
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4004,25 +4043,7 @@ var __decorate19 = function(decorators, target, key, desc) {
4004
4043
  };
4005
4044
  var TestSectionLink = class extends LitElement17 {
4006
4045
  static {
4007
- this.styles = css10`
4008
- :host {
4009
- ${btn};
4010
- }
4011
- @media (hover: hover) and (pointer: fine) {
4012
- :host(:hover:not([disabled])) {
4013
- ${btnInteractive};
4014
- }
4015
- }
4016
- :host(:active:not([disabled])) {
4017
- ${btnActive};
4018
- }
4019
- :host(:focus-visible) {
4020
- ${focusRing};
4021
- }
4022
- :host([disabled]) {
4023
- ${dis};
4024
- }
4025
- `;
4046
+ this.styles = button;
4026
4047
  }
4027
4048
  #requestItem(identifier) {
4028
4049
  dispatchPublic(this, "cito-test-navigate", { type: "section", id: identifier });
@@ -4033,7 +4054,7 @@ var TestSectionLink = class extends LitElement17 {
4033
4054
  this.addEventListener("click", () => this.#requestItem(this.sectionId));
4034
4055
  }
4035
4056
  render() {
4036
- return html16` <slot></slot> `;
4057
+ return control;
4037
4058
  }
4038
4059
  };
4039
4060
  __decorate19([
@@ -4044,7 +4065,7 @@ __decorate19([
4044
4065
  var pluginState = (context, plugin) => context?.plugins?.[plugin];
4045
4066
 
4046
4067
  // ../qti-test/dist/components/test-bookmark/test-bookmark.js
4047
- import { css as css11, html as html17, LitElement as LitElement18 } from "lit";
4068
+ import { css as css6, html as html13, LitElement as LitElement18 } from "lit";
4048
4069
  import { consume as consume11 } from "@lit/context";
4049
4070
  import { property as property17 } from "lit/decorators.js";
4050
4071
  var __decorate20 = function(decorators, target, key, desc) {
@@ -4054,54 +4075,35 @@ var __decorate20 = function(decorators, target, key, desc) {
4054
4075
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4055
4076
  };
4056
4077
  var bookmarkedItems = (context) => pluginState(context, "bookmarks") ?? [];
4057
- var itemRefOf = (element) => {
4078
+ var itemRefOf2 = (element) => {
4058
4079
  const itemRef = element.closest("qti-assessment-item-ref");
4059
4080
  if (itemRef)
4060
4081
  return itemRef.getAttribute("identifier") ?? void 0;
4061
4082
  const root = element.getRootNode();
4062
- return root instanceof ShadowRoot ? itemRefOf(root.host) : void 0;
4083
+ return root instanceof ShadowRoot ? itemRefOf2(root.host) : void 0;
4063
4084
  };
4064
4085
  var TestBookmark = class extends LitElement18 {
4065
4086
  static {
4066
- this.styles = css11`
4067
- :host {
4068
- ${btn};
4069
- }
4070
- @media (hover: hover) and (pointer: fine) {
4071
- :host(:hover:not([disabled])) {
4072
- ${btnInteractive};
4087
+ this.styles = [
4088
+ button,
4089
+ css6`
4090
+ svg {
4091
+ width: 1.1em;
4092
+ height: 1.1em;
4093
+ flex: none;
4094
+ fill: none;
4095
+ stroke: currentColor;
4096
+ stroke-width: 2;
4097
+ stroke-linejoin: round;
4073
4098
  }
4074
- }
4075
- :host(:active:not([disabled])) {
4076
- ${btnActive};
4077
- }
4078
- :host {
4079
- display: inline-flex;
4080
- align-items: center;
4081
- gap: 0.4em;
4082
- }
4083
- svg {
4084
- width: 1.1em;
4085
- height: 1.1em;
4086
- flex: none;
4087
- fill: none;
4088
- stroke: currentColor;
4089
- stroke-width: 2;
4090
- stroke-linejoin: round;
4091
- }
4092
- :host([bookmarked]) {
4093
- color: var(--qti-bookmark-color, #b45309);
4094
- }
4095
- :host([bookmarked]) svg {
4096
- fill: currentColor;
4097
- }
4098
- :host(:focus-visible) {
4099
- ${focusRing};
4100
- }
4101
- :host([disabled]) {
4102
- ${dis};
4103
- }
4104
- `;
4099
+ :host([bookmarked]) {
4100
+ color: var(--qti-bookmark-color, #b45309);
4101
+ }
4102
+ :host([bookmarked]) svg {
4103
+ fill: currentColor;
4104
+ }
4105
+ `
4106
+ ];
4105
4107
  }
4106
4108
  constructor() {
4107
4109
  super();
@@ -4124,7 +4126,7 @@ var TestBookmark = class extends LitElement18 {
4124
4126
  }
4125
4127
  /** The item this button marks: its own, or else the one on screen. */
4126
4128
  get #activeItem() {
4127
- return this.item || (itemRefOf(this) ?? this.computedContext?.testParts?.flatMap((part) => part.sections.flatMap((section) => section.items)).find((item) => item.active)?.identifier);
4129
+ return this.item || (itemRefOf2(this) ?? this.computedContext?.testParts?.flatMap((part) => part.sections.flatMap((section) => section.items)).find((item) => item.active)?.identifier);
4128
4130
  }
4129
4131
  willUpdate() {
4130
4132
  const active = this.#activeItem;
@@ -4147,7 +4149,9 @@ var TestBookmark = class extends LitElement18 {
4147
4149
  });
4148
4150
  }
4149
4151
  render() {
4150
- return html17`<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 3h12v18l-6-4.5L6 21z" /></svg><slot></slot>`;
4152
+ return html13`<span class="control" part="button"
4153
+ ><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 3h12v18l-6-4.5L6 21z" /></svg><slot></slot
4154
+ ></span>`;
4151
4155
  }
4152
4156
  };
4153
4157
  __decorate20([
@@ -4165,7 +4169,7 @@ __decorate20([
4165
4169
  ], TestBookmark.prototype, "disabled", void 0);
4166
4170
 
4167
4171
  // ../qti-test/dist/components/test-check-item/test-check-item.js
4168
- import { css as css12, html as html18, LitElement as LitElement19 } from "lit";
4172
+ import { LitElement as LitElement19 } from "lit";
4169
4173
  import { property as property18 } from "lit/decorators.js";
4170
4174
  var __decorate21 = function(decorators, target, key, desc) {
4171
4175
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4175,25 +4179,7 @@ var __decorate21 = function(decorators, target, key, desc) {
4175
4179
  };
4176
4180
  var TestCheckItem = class extends LitElement19 {
4177
4181
  static {
4178
- this.styles = css12`
4179
- :host {
4180
- ${btn};
4181
- }
4182
- @media (hover: hover) and (pointer: fine) {
4183
- :host(:hover:not([disabled])) {
4184
- ${btnInteractive};
4185
- }
4186
- }
4187
- :host(:active:not([disabled])) {
4188
- ${btnActive};
4189
- }
4190
- :host(:focus-visible) {
4191
- ${focusRing};
4192
- }
4193
- :host([disabled]) {
4194
- ${dis};
4195
- }
4196
- `;
4182
+ this.styles = button;
4197
4183
  }
4198
4184
  constructor() {
4199
4185
  super();
@@ -4204,7 +4190,7 @@ var TestCheckItem = class extends LitElement19 {
4204
4190
  });
4205
4191
  }
4206
4192
  render() {
4207
- return html18` <slot></slot> `;
4193
+ return control;
4208
4194
  }
4209
4195
  };
4210
4196
  __decorate21([
@@ -4212,7 +4198,7 @@ __decorate21([
4212
4198
  ], TestCheckItem.prototype, "view", void 0);
4213
4199
 
4214
4200
  // ../qti-test/dist/components/test-print-context/test-print-context.js
4215
- import { html as html19, LitElement as LitElement20 } from "lit";
4201
+ import { html as html14, LitElement as LitElement20 } from "lit";
4216
4202
  import { consume as consume12 } from "@lit/context";
4217
4203
  import { state as state5 } from "lit/decorators.js";
4218
4204
  var __decorate22 = function(decorators, target, key, desc) {
@@ -4223,7 +4209,7 @@ var __decorate22 = function(decorators, target, key, desc) {
4223
4209
  };
4224
4210
  var TestPrintContext = class extends LitElement20 {
4225
4211
  render() {
4226
- return html19` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
4212
+ return html14` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
4227
4213
  }
4228
4214
  };
4229
4215
  __decorate22([
@@ -4232,7 +4218,7 @@ __decorate22([
4232
4218
  ], TestPrintContext.prototype, "computedContext", void 0);
4233
4219
 
4234
4220
  // ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
4235
- import { html as html20, css as css13, LitElement as LitElement21 } from "lit";
4221
+ import { html as html15, css as css7, LitElement as LitElement21 } from "lit";
4236
4222
  import { consume as consume13 } from "@lit/context";
4237
4223
  var __decorate23 = function(decorators, target, key, desc) {
4238
4224
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4252,7 +4238,7 @@ var formatVariableValue = (value) => {
4252
4238
  };
4253
4239
  var TestPrintVariables = class extends LitElement21 {
4254
4240
  static {
4255
- this.styles = css13`
4241
+ this.styles = css7`
4256
4242
  table {
4257
4243
  width: 100%;
4258
4244
  border-collapse: collapse;
@@ -4278,10 +4264,10 @@ var TestPrintVariables = class extends LitElement21 {
4278
4264
  render() {
4279
4265
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
4280
4266
  if (!activeItem || !activeItem.variables)
4281
- return html20``;
4267
+ return html15``;
4282
4268
  const responseVariables = activeItem.variables.filter((v) => v.type === "response");
4283
4269
  const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
4284
- const renderTable = (variables, title) => html20`
4270
+ const renderTable = (variables, title) => html15`
4285
4271
  <h3>${title}</h3>
4286
4272
  <table>
4287
4273
  <thead>
@@ -4298,7 +4284,7 @@ var TestPrintVariables = class extends LitElement21 {
4298
4284
  const correctResponse = formatVariableValue(v.correctResponse);
4299
4285
  const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
4300
4286
  const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
4301
- return html20`
4287
+ return html15`
4302
4288
  <tr>
4303
4289
  <td>${v.identifier}</td>
4304
4290
  <td>${formatVariableValue(v.value)}</td>
@@ -4311,7 +4297,7 @@ var TestPrintVariables = class extends LitElement21 {
4311
4297
  </tbody>
4312
4298
  </table>
4313
4299
  `;
4314
- return html20`
4300
+ return html15`
4315
4301
  ${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
4316
4302
  `;
4317
4303
  }
@@ -4321,7 +4307,7 @@ __decorate23([
4321
4307
  ], TestPrintVariables.prototype, "computedContext", void 0);
4322
4308
 
4323
4309
  // ../qti-test/dist/components/test-print-state/test-print-state.js
4324
- import { css as css14, html as html21, LitElement as LitElement22, nothing as nothing3 } from "lit";
4310
+ import { css as css8, html as html16, LitElement as LitElement22, nothing as nothing3 } from "lit";
4325
4311
  import { state as state6 } from "lit/decorators.js";
4326
4312
  var __decorate24 = function(decorators, target, key, desc) {
4327
4313
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4332,7 +4318,7 @@ var __decorate24 = function(decorators, target, key, desc) {
4332
4318
  var TestPrintState = class extends LitElement22 {
4333
4319
  #test = null;
4334
4320
  static {
4335
- this.styles = css14`
4321
+ this.styles = css8`
4336
4322
  :host {
4337
4323
  display: block;
4338
4324
  }
@@ -4366,17 +4352,17 @@ var TestPrintState = class extends LitElement22 {
4366
4352
  render() {
4367
4353
  if (!this.testState)
4368
4354
  return nothing3;
4369
- return html21`<ul>
4355
+ return html16`<ul>
4370
4356
  ${this.#renderNode("state", this.testState, 0)}
4371
4357
  </ul>`;
4372
4358
  }
4373
4359
  #renderNode(label, value, depth) {
4374
4360
  if (value === null || typeof value !== "object") {
4375
- return html21`<li><span part="key">${label}</span>: <span part="value">${JSON.stringify(value)}</span></li>`;
4361
+ return html16`<li><span part="key">${label}</span>: <span part="value">${JSON.stringify(value)}</span></li>`;
4376
4362
  }
4377
4363
  const entries = Array.isArray(value) ? value.map((entry, index) => [entryLabel(entry, index), entry]) : Object.entries(value);
4378
4364
  const count = Array.isArray(value) ? `[${entries.length}]` : `{${entries.length}}`;
4379
- return html21`<li>
4365
+ return html16`<li>
4380
4366
  <details ?open=${depth < 2}>
4381
4367
  <summary><span part="key">${label}</span> <span part="count">${count}</span></summary>
4382
4368
  <ul>
@@ -4395,7 +4381,7 @@ var entryLabel = (entry, index) => {
4395
4381
  };
4396
4382
 
4397
4383
  // ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
4398
- import { html as html22, LitElement as LitElement23, nothing as nothing4 } from "lit";
4384
+ import { html as html17, LitElement as LitElement23, nothing as nothing4 } from "lit";
4399
4385
  import { consume as consume14 } from "@lit/context";
4400
4386
  import { property as property19 } from "lit/decorators.js";
4401
4387
  var __decorate25 = function(decorators, target, key, desc) {
@@ -4430,7 +4416,7 @@ var TestScoringButtons = class extends LitElement23 {
4430
4416
  render() {
4431
4417
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
4432
4418
  if (!activeItem || !activeItem.variables)
4433
- return html22``;
4419
+ return html17``;
4434
4420
  const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
4435
4421
  const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
4436
4422
  const score = scoreOutcome?.value;
@@ -4438,7 +4424,7 @@ var TestScoringButtons = class extends LitElement23 {
4438
4424
  if (!maxScore || !scoreOutcome)
4439
4425
  return nothing4;
4440
4426
  const scores = [...Array(Number(maxScore) + 1).keys()];
4441
- return html22`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing4}`;
4427
+ return html17`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing4}`;
4442
4428
  }
4443
4429
  constructor() {
4444
4430
  super();
@@ -4466,7 +4452,7 @@ __decorate25([
4466
4452
 
4467
4453
  // ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
4468
4454
  import { consume as consume15 } from "@lit/context";
4469
- import { html as html23, LitElement as LitElement24 } from "lit";
4455
+ import { html as html18, LitElement as LitElement24 } from "lit";
4470
4456
  import { property as property20 } from "lit/decorators.js";
4471
4457
  var __decorate26 = function(decorators, target, key, desc) {
4472
4458
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -4482,15 +4468,14 @@ var TestScoringFeedback = class extends LitElement24 {
4482
4468
  render() {
4483
4469
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
4484
4470
  if (!activeItem || !activeItem.variables)
4485
- return html23``;
4471
+ return html18``;
4486
4472
  if (activeItem["category"] === "dep-informational")
4487
- return html23`<div>${this.dataset.informational}</div>`;
4488
- const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
4473
+ return html18`<div>${this.dataset.informational}</div>`;
4489
4474
  const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
4490
4475
  const score = parseFloat(scoreOutcome?.value);
4491
4476
  const externalScored = activeItem["externalScored"];
4492
4477
  const feedbackText = () => {
4493
- if (completionStatus !== "completed") {
4478
+ if (activeItem.valid === false || activeItem.isDefaultResponse) {
4494
4479
  return this.dataset.textNoResponse;
4495
4480
  }
4496
4481
  if (!externalScored && score !== void 0 && !Number.isNaN(score)) {
@@ -4504,7 +4489,7 @@ var TestScoringFeedback = class extends LitElement24 {
4504
4489
  }
4505
4490
  return this.dataset.inProgress;
4506
4491
  };
4507
- return html23`<div>${feedbackText()}</div>`;
4492
+ return html18`<div>${feedbackText()}</div>`;
4508
4493
  }
4509
4494
  };
4510
4495
  __decorate26([
@@ -4515,7 +4500,7 @@ __decorate26([
4515
4500
  ], TestScoringFeedback.prototype, "view", void 0);
4516
4501
 
4517
4502
  // ../qti-test/dist/components/test-stamp/test-stamp.js
4518
- import { html as html24, LitElement as LitElement25, nothing as nothing5 } from "lit";
4503
+ import { html as html19, LitElement as LitElement25, nothing as nothing5 } from "lit";
4519
4504
  import { property as property21, state as state7 } from "lit/decorators.js";
4520
4505
  import { consume as consume16 } from "@lit/context";
4521
4506
  var __decorate27 = function(decorators, target, key, desc) {
@@ -4590,7 +4575,7 @@ var TestStamp = class extends LitElement25 {
4590
4575
  }));
4591
4576
  }
4592
4577
  render() {
4593
- return html24` ${this.debug ? html24`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing5}
4578
+ return html19` ${this.debug ? html19`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing5}
4594
4579
  ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing5}`;
4595
4580
  }
4596
4581
  };
@@ -4606,40 +4591,22 @@ __decorate27([
4606
4591
  ], TestStamp.prototype, "stampContext", void 0);
4607
4592
 
4608
4593
  // ../qti-test/dist/components/test-submit/test-submit.js
4609
- import { css as css15, html as html25, LitElement as LitElement26 } from "lit";
4594
+ import { LitElement as LitElement26 } from "lit";
4610
4595
  var TestSubmit = class extends LitElement26 {
4611
4596
  static {
4612
- this.styles = css15`
4613
- :host {
4614
- ${btn};
4615
- }
4616
- @media (hover: hover) and (pointer: fine) {
4617
- :host(:hover:not([disabled])) {
4618
- ${btnInteractive};
4619
- }
4620
- }
4621
- :host(:active:not([disabled])) {
4622
- ${btnActive};
4623
- }
4624
- :host(:focus-visible) {
4625
- ${focusRing};
4626
- }
4627
- :host([disabled]) {
4628
- ${dis};
4629
- }
4630
- `;
4597
+ this.styles = button;
4631
4598
  }
4632
4599
  constructor() {
4633
4600
  super();
4634
4601
  this.addEventListener("click", () => dispatchPublic(this, "cito-test-submit", {}));
4635
4602
  }
4636
4603
  render() {
4637
- return html25` <slot></slot> `;
4604
+ return control;
4638
4605
  }
4639
4606
  };
4640
4607
 
4641
4608
  // ../qti-test/dist/components/test-view-toggle/test-view.js
4642
- import { html as html26, LitElement as LitElement27 } from "lit";
4609
+ import { html as html20, LitElement as LitElement27 } from "lit";
4643
4610
  import { property as property22, state as state8 } from "lit/decorators.js";
4644
4611
  import { consume as consume17 } from "@lit/context";
4645
4612
  var __decorate28 = function(decorators, target, key, desc) {
@@ -4677,7 +4644,7 @@ var TestView = class extends LitElement27 {
4677
4644
  dispatchPublic(this, "cito-test-switch-view", view);
4678
4645
  }
4679
4646
  render() {
4680
- return html26`
4647
+ return html20`
4681
4648
  <label part="label" for="viewSelect">${this.label}</label>
4682
4649
  <select
4683
4650
  part="select"
@@ -4687,7 +4654,7 @@ var TestView = class extends LitElement27 {
4687
4654
  this._switchView(el.value);
4688
4655
  }}
4689
4656
  >
4690
- ${this._viewOptions.map((v) => html26`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
4657
+ ${this._viewOptions.map((v) => html20`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
4691
4658
  </select>
4692
4659
  `;
4693
4660
  }
@@ -4711,7 +4678,7 @@ __decorate28([
4711
4678
 
4712
4679
  // ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
4713
4680
  import { consume as consume18 } from "@lit/context";
4714
- import { html as html27, LitElement as LitElement28, nothing as nothing6 } from "lit";
4681
+ import { html as html21, LitElement as LitElement28, nothing as nothing6 } from "lit";
4715
4682
  var __decorate29 = function(decorators, target, key, desc) {
4716
4683
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4717
4684
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -4744,7 +4711,7 @@ var TestViewToggle = class extends LitElement28 {
4744
4711
  });
4745
4712
  }
4746
4713
  render() {
4747
- return html27`${this.myTemplate ? this.myTemplate({
4714
+ return html21`${this.myTemplate ? this.myTemplate({
4748
4715
  view: this.sessionContext?.view
4749
4716
  }) : nothing6}`;
4750
4717
  }
@@ -4754,7 +4721,7 @@ __decorate29([
4754
4721
  ], TestViewToggle.prototype, "sessionContext", void 0);
4755
4722
 
4756
4723
  // ../qti-test/dist/tts/test-item-to-speech.js
4757
- import { html as html28, LitElement as LitElement29, css as css16 } from "lit";
4724
+ import { html as html22, LitElement as LitElement29, css as css9 } from "lit";
4758
4725
  import { consume as consume19, provide as provide4, createContext as createContext2 } from "@lit/context";
4759
4726
  import { property as property23, state as state9 } from "lit/decorators.js";
4760
4727
  import { ifDefined } from "lit/directives/if-defined.js";
@@ -4793,14 +4760,14 @@ var ICONS = {
4793
4760
  pick: "M5 3l13 7-5.5 1.6 3.4 6.6-2.4 1.3-3.4-6.7L6 17z"
4794
4761
  };
4795
4762
  var iconContent = (icon, label) => {
4796
- const svg = html28`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
4763
+ const svg = html22`<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
4797
4764
  <path d="${ICONS[icon]}"></path>
4798
4765
  </svg>`;
4799
- return html28`${svg}<span class="label">${label}</span>`;
4766
+ return html22`${svg}<span class="label">${label}</span>`;
4800
4767
  };
4801
4768
  var TtsButtonBase = class extends LitElement29 {
4802
4769
  static {
4803
- this.styles = css16`
4770
+ this.styles = css9`
4804
4771
  :host {
4805
4772
  display: inline-flex;
4806
4773
  }
@@ -4877,7 +4844,7 @@ __decorate30([
4877
4844
  ], TtsButtonBase.prototype, "_tts", void 0);
4878
4845
  var TestItemToSpeech = class extends LitElement29 {
4879
4846
  static {
4880
- this.styles = css16`
4847
+ this.styles = css9`
4881
4848
  :host {
4882
4849
  display: inline-flex;
4883
4850
  flex-wrap: wrap;
@@ -5035,7 +5002,7 @@ var TestItemToSpeech = class extends LitElement29 {
5035
5002
  this.#contentMode = false;
5036
5003
  }
5037
5004
  render() {
5038
- return html28`<slot></slot>`;
5005
+ return html22`<slot></slot>`;
5039
5006
  }
5040
5007
  /** Item-ref mode: our item rendered again, so the elements collected earlier are detached. */
5041
5008
  #handleItemConnected() {
@@ -5467,9 +5434,9 @@ var TestTtsPlay = class extends TtsButtonBase {
5467
5434
  }
5468
5435
  render() {
5469
5436
  const playing = this._tts?.state === "playing";
5470
- return html28`
5437
+ return html22`
5471
5438
  <button part="button" aria-label=${ifDefined(playing ? this.pauseLabel : this.label)} @click=${this.#toggle}>
5472
- ${playing ? html28`<slot name="pause">${iconContent("pause", this.pauseLabel ?? "Pause")}</slot>` : html28`<slot name="play">${iconContent("play", this.label ?? "Play")}</slot>`}
5439
+ ${playing ? html22`<slot name="pause">${iconContent("pause", this.pauseLabel ?? "Pause")}</slot>` : html22`<slot name="play">${iconContent("play", this.label ?? "Play")}</slot>`}
5473
5440
  </button>
5474
5441
  `;
5475
5442
  }
@@ -5479,7 +5446,7 @@ __decorate30([
5479
5446
  ], TestTtsPlay.prototype, "pauseLabel", void 0);
5480
5447
  var TestTtsPause = class extends TtsButtonBase {
5481
5448
  render() {
5482
- return html28`
5449
+ return html22`
5483
5450
  <button
5484
5451
  part="button"
5485
5452
  aria-label=${ifDefined(this.label)}
@@ -5493,7 +5460,7 @@ var TestTtsPause = class extends TtsButtonBase {
5493
5460
  };
5494
5461
  var TestTtsResume = class extends TtsButtonBase {
5495
5462
  render() {
5496
- return html28`
5463
+ return html22`
5497
5464
  <button
5498
5465
  part="button"
5499
5466
  aria-label=${ifDefined(this.label)}
@@ -5508,7 +5475,7 @@ var TestTtsResume = class extends TtsButtonBase {
5508
5475
  var TestTtsStop = class extends TtsButtonBase {
5509
5476
  render() {
5510
5477
  const idle = this._tts?.state === "idle" && !this._tts?.picking;
5511
- return html28`
5478
+ return html22`
5512
5479
  <button part="button" aria-label=${ifDefined(this.label)} ?disabled=${idle} @click=${() => this._tts?.stop()}>
5513
5480
  <slot>${iconContent("stop", this.label ?? "Stop")}</slot>
5514
5481
  </button>
@@ -5519,7 +5486,7 @@ var TestTtsPrev = class extends TtsButtonBase {
5519
5486
  render() {
5520
5487
  const collected = (this._tts?.elementCount ?? 0) > 0;
5521
5488
  const atStart = (this._tts?.currentElementIndex ?? 0) === 0;
5522
- return html28`
5489
+ return html22`
5523
5490
  <button
5524
5491
  part="button"
5525
5492
  aria-label=${ifDefined(this.label)}
@@ -5535,7 +5502,7 @@ var TestTtsNext = class extends TtsButtonBase {
5535
5502
  render() {
5536
5503
  const count = this._tts?.elementCount ?? 0;
5537
5504
  const atEnd = count > 0 && (this._tts?.currentElementIndex ?? 0) >= count - 1;
5538
- return html28`
5505
+ return html22`
5539
5506
  <button
5540
5507
  part="button"
5541
5508
  aria-label=${ifDefined(this.label)}
@@ -5549,7 +5516,7 @@ var TestTtsNext = class extends TtsButtonBase {
5549
5516
  };
5550
5517
  var TestTtsPick = class extends TtsButtonBase {
5551
5518
  render() {
5552
- return html28`
5519
+ return html22`
5553
5520
  <button
5554
5521
  part="button"
5555
5522
  aria-label=${ifDefined(this.label)}
@@ -5676,4 +5643,4 @@ export {
5676
5643
  * Portions Copyright (c) 2013, the Dart project authors.
5677
5644
  *)
5678
5645
  */
5679
- //# sourceMappingURL=chunk-Y5DZTCDP.js.map
5646
+ //# sourceMappingURL=chunk-6XRNX574.js.map