@citolab/qti-components 8.0.1 → 8.0.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.
Files changed (60) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +103 -103
  3. package/dist/base.d.ts +3 -3
  4. package/dist/base.js +1 -1
  5. package/dist/chunk-4DB4SC5K.js +100 -0
  6. package/dist/chunk-4DB4SC5K.js.map +1 -0
  7. package/dist/{chunk-WVVMNF74.js → chunk-7AVWRQIS.js} +188 -160
  8. package/dist/{chunk-WVVMNF74.js.map → chunk-7AVWRQIS.js.map} +1 -1
  9. package/dist/{chunk-CAO4JRLY.js → chunk-BQFWCZFH.js} +2 -2
  10. package/dist/{chunk-LVBIQDPM.js → chunk-CK7AV2UJ.js} +147 -101
  11. package/dist/chunk-CK7AV2UJ.js.map +1 -0
  12. package/dist/{chunk-7HC5SMCU.js → chunk-G6GFQDVN.js} +1 -96
  13. package/dist/chunk-G6GFQDVN.js.map +1 -0
  14. package/dist/{chunk-RXGDQDOV.js → chunk-HBSWJC3B.js} +478 -392
  15. package/dist/chunk-HBSWJC3B.js.map +1 -0
  16. package/dist/chunk-HQESINXH.js +834 -0
  17. package/dist/chunk-HQESINXH.js.map +1 -0
  18. package/dist/{chunk-XU7HNT4F.js → chunk-J5SQLKNP.js} +145 -119
  19. package/dist/{chunk-XU7HNT4F.js.map → chunk-J5SQLKNP.js.map} +1 -1
  20. package/dist/{chunk-V5G7X53Y.js → chunk-NJQHUUTN.js} +2 -2
  21. package/dist/{chunk-QECOPVPO.js → chunk-RSVRS5AK.js} +59 -58
  22. package/dist/chunk-RSVRS5AK.js.map +1 -0
  23. package/dist/{chunk-F4BNJWYN.js → chunk-TWPXES3S.js} +642 -673
  24. package/dist/chunk-TWPXES3S.js.map +1 -0
  25. package/dist/{chunk-NA2N2WSG.js → chunk-VAE6HBKR.js} +176 -152
  26. package/dist/{chunk-NA2N2WSG.js.map → chunk-VAE6HBKR.js.map} +1 -1
  27. package/dist/{chunk-3AJOQCDU.js → chunk-ZII6M3SN.js} +2 -2
  28. package/dist/{computed.types.d-rKLSPvVG.d.ts → computed.types.d-DpKIYO6e.d.ts} +2 -0
  29. package/dist/corrections.d.ts +12 -29
  30. package/dist/corrections.js +8 -9
  31. package/dist/elements.d.ts +86 -86
  32. package/dist/elements.js +4 -5
  33. package/dist/index.d.ts +6 -37
  34. package/dist/index.js +13 -14
  35. package/dist/{interaction.d-D4MstYRz.d.ts → interaction.d-CJiMv8H7.d.ts} +13 -2
  36. package/dist/interactions.d.ts +11 -1299
  37. package/dist/interactions.js +4 -5
  38. package/dist/item.d.ts +3 -3
  39. package/dist/item.js +5 -5
  40. package/dist/processing.js +2 -2
  41. package/dist/qti-components-jsx.d.ts +759 -739
  42. package/dist/qti-test.d-_YAlhDbt.d.ts +702 -0
  43. package/dist/qti-text-entry-interaction.d-BGdfV9qG.d.ts +1567 -0
  44. package/dist/test.d.ts +11 -678
  45. package/dist/test.js +6 -7
  46. package/package.json +8 -7
  47. package/dist/chunk-64XSIBGO.js +0 -241
  48. package/dist/chunk-64XSIBGO.js.map +0 -1
  49. package/dist/chunk-7HC5SMCU.js.map +0 -1
  50. package/dist/chunk-F4BNJWYN.js.map +0 -1
  51. package/dist/chunk-H3J7LFRO.js +0 -2243
  52. package/dist/chunk-H3J7LFRO.js.map +0 -1
  53. package/dist/chunk-LVBIQDPM.js.map +0 -1
  54. package/dist/chunk-QECOPVPO.js.map +0 -1
  55. package/dist/chunk-RXGDQDOV.js.map +0 -1
  56. package/dist/chunk-X3E5HXG2.js +0 -20
  57. package/dist/chunk-X3E5HXG2.js.map +0 -1
  58. /package/dist/{chunk-CAO4JRLY.js.map → chunk-BQFWCZFH.js.map} +0 -0
  59. /package/dist/{chunk-V5G7X53Y.js.map → chunk-NJQHUUTN.js.map} +0 -0
  60. /package/dist/{chunk-3AJOQCDU.js.map → chunk-ZII6M3SN.js.map} +0 -0
@@ -1,45 +1,35 @@
1
1
  import {
2
2
  QtiModalFeedback
3
- } from "./chunk-WVVMNF74.js";
3
+ } from "./chunk-7AVWRQIS.js";
4
4
  import {
5
- item_default,
6
- m
7
- } from "./chunk-7HC5SMCU.js";
5
+ item_default
6
+ } from "./chunk-G6GFQDVN.js";
8
7
  import {
9
8
  watch
10
- } from "./chunk-64XSIBGO.js";
9
+ } from "./chunk-4DB4SC5K.js";
11
10
  import {
12
11
  qtiTransformItem,
13
12
  qtiTransformTest
14
13
  } from "./chunk-IJD53WY6.js";
15
14
  import {
16
- A,
17
- E,
18
15
  INITIAL_SESSION_CONTEXT,
19
16
  INITIAL_TEST_CONTEXT,
20
17
  QtiExpression,
21
- T,
22
- Z,
23
- c,
24
18
  computedContext,
25
19
  configContext,
26
- e,
27
- i,
28
- i2,
29
- n,
30
- n2,
31
20
  qtiContext,
32
- r,
33
21
  sessionContext,
34
22
  testContext
35
- } from "./chunk-H3J7LFRO.js";
23
+ } from "./chunk-HQESINXH.js";
36
24
 
37
25
  // ../qti-test/dist/components/qti-assessment-item-ref/qti-assessment-item-ref.js
26
+ import { LitElement } from "lit";
27
+ import { property } from "lit/decorators.js";
38
28
  var __decorate = function(decorators, target, key, desc) {
39
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
40
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
41
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
42
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
29
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
30
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
31
+ 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;
32
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
43
33
  };
44
34
  var stringToBooleanConverter = {
45
35
  fromAttribute(value) {
@@ -49,7 +39,7 @@ var stringToBooleanConverter = {
49
39
  return value ? "true" : "false";
50
40
  }
51
41
  };
52
- var QtiAssessmentItemRef = class extends i2 {
42
+ var QtiAssessmentItemRef = class extends LitElement {
53
43
  constructor() {
54
44
  super(...arguments);
55
45
  this.weigths = /* @__PURE__ */ new Map();
@@ -74,30 +64,33 @@ var QtiAssessmentItemRef = class extends i2 {
74
64
  }
75
65
  };
76
66
  __decorate([
77
- n2({ type: String })
67
+ property({ type: String })
78
68
  ], QtiAssessmentItemRef.prototype, "category", void 0);
79
69
  __decorate([
80
- n2({ type: String })
70
+ property({ type: String })
81
71
  ], QtiAssessmentItemRef.prototype, "identifier", void 0);
82
72
  __decorate([
83
- n2({ type: Boolean, converter: stringToBooleanConverter })
73
+ property({ type: Boolean, converter: stringToBooleanConverter })
84
74
  ], QtiAssessmentItemRef.prototype, "required", void 0);
85
75
  __decorate([
86
- n2({ type: Boolean, converter: stringToBooleanConverter })
76
+ property({ type: Boolean, converter: stringToBooleanConverter })
87
77
  ], QtiAssessmentItemRef.prototype, "fixed", void 0);
88
78
  __decorate([
89
- n2({ type: String })
79
+ property({ type: String })
90
80
  ], QtiAssessmentItemRef.prototype, "href", void 0);
91
81
  __decorate([
92
- n2({ type: Object, attribute: false })
82
+ property({ type: Object, attribute: false })
93
83
  ], QtiAssessmentItemRef.prototype, "xmlDoc", void 0);
94
84
 
95
85
  // ../qti-test/dist/components/qti-assessment-section/qti-assessment-section.js
86
+ import { consume } from "@lit/context";
87
+ import { html, LitElement as LitElement2 } from "lit";
88
+ import { property as property2 } from "lit/decorators.js";
96
89
  var __decorate2 = function(decorators, target, key, desc) {
97
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
98
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
99
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
100
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
90
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
91
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
92
+ 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;
93
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
101
94
  };
102
95
  var stringToBooleanConverter2 = {
103
96
  fromAttribute(value) {
@@ -107,7 +100,7 @@ var stringToBooleanConverter2 = {
107
100
  return value ? "true" : "false";
108
101
  }
109
102
  };
110
- var QtiAssessmentSection = class extends i2 {
103
+ var QtiAssessmentSection = class extends LitElement2 {
111
104
  get title() {
112
105
  return this.#title;
113
106
  }
@@ -127,36 +120,45 @@ var QtiAssessmentSection = class extends i2 {
127
120
  }));
128
121
  }
129
122
  render() {
130
- return T`<slot name="qti-rubric-block"></slot><slot></slot>`;
123
+ return html`<slot name="qti-rubric-block"></slot><slot></slot>`;
131
124
  }
132
125
  };
133
126
  __decorate2([
134
- n2({ type: String })
127
+ property2({ type: String })
135
128
  ], QtiAssessmentSection.prototype, "identifier", void 0);
136
129
  __decorate2([
137
- n2({ type: String })
130
+ property2({ type: String })
138
131
  ], QtiAssessmentSection.prototype, "required", void 0);
139
132
  __decorate2([
140
- n2({ type: Boolean, converter: stringToBooleanConverter2 })
133
+ property2({ type: Boolean, converter: stringToBooleanConverter2 })
141
134
  ], QtiAssessmentSection.prototype, "fixed", void 0);
142
135
  __decorate2([
143
- n2({ type: Boolean, converter: stringToBooleanConverter2 })
136
+ property2({ type: Boolean, converter: stringToBooleanConverter2 })
144
137
  ], QtiAssessmentSection.prototype, "visible", void 0);
145
138
  __decorate2([
146
- n2({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
139
+ property2({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
147
140
  ], QtiAssessmentSection.prototype, "keepTogether", void 0);
148
141
  __decorate2([
149
- c({ context: testContext, subscribe: true })
142
+ property2({ type: String, attribute: "navigation-mode" })
143
+ ], QtiAssessmentSection.prototype, "navigationMode", void 0);
144
+ __decorate2([
145
+ property2({ type: String, attribute: "submission-mode" })
146
+ ], QtiAssessmentSection.prototype, "submissionMode", void 0);
147
+ __decorate2([
148
+ consume({ context: testContext, subscribe: true })
150
149
  ], QtiAssessmentSection.prototype, "_testContext", void 0);
151
150
 
152
151
  // ../qti-test/dist/components/qti-assessment-test/qti-assessment-test.js
152
+ import { consume as consume2 } from "@lit/context";
153
+ import { html as html2, LitElement as LitElement3 } from "lit";
154
+ import { property as property3 } from "lit/decorators.js";
153
155
  var __decorate3 = function(decorators, target, key, desc) {
154
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
155
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
156
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
157
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
156
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
157
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
158
+ 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;
159
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
158
160
  };
159
- var QtiAssessmentTest = class extends i2 {
161
+ var QtiAssessmentTest = class extends LitElement3 {
160
162
  get title() {
161
163
  return this.#title;
162
164
  }
@@ -176,24 +178,25 @@ var QtiAssessmentTest = class extends i2 {
176
178
  }));
177
179
  }
178
180
  render() {
179
- return T` <slot></slot>`;
181
+ return html2` <slot></slot>`;
180
182
  }
181
183
  };
182
184
  __decorate3([
183
- n2({ type: String })
185
+ property3({ type: String })
184
186
  ], QtiAssessmentTest.prototype, "identifier", void 0);
185
187
  __decorate3([
186
- n2({ type: String })
188
+ property3({ type: String })
187
189
  ], QtiAssessmentTest.prototype, "title", null);
188
190
  __decorate3([
189
- c({ context: testContext, subscribe: true })
191
+ consume2({ context: testContext, subscribe: true })
190
192
  ], QtiAssessmentTest.prototype, "_testContext", void 0);
191
193
 
192
194
  // ../qti-test/dist/components/qti-outcome-processing/qti-outcome-processing.js
193
- var QtiOutcomeProcessing = class extends i2 {
195
+ import { css, html as html3, LitElement as LitElement4 } from "lit";
196
+ var QtiOutcomeProcessing = class extends LitElement4 {
194
197
  static {
195
198
  this.styles = [
196
- i`
199
+ css`
197
200
  :host {
198
201
  display: none;
199
202
  }
@@ -201,7 +204,7 @@ var QtiOutcomeProcessing = class extends i2 {
201
204
  ];
202
205
  }
203
206
  render() {
204
- return T`<slot></slot>`;
207
+ return html3`<slot></slot>`;
205
208
  }
206
209
  process() {
207
210
  const logic = new QtiOutcomeProcessingProcessor();
@@ -218,27 +221,30 @@ var QtiOutcomeProcessingProcessor = class {
218
221
  };
219
222
 
220
223
  // ../qti-test/dist/components/qti-test-feedback/qti-test-feedback.js
224
+ import { css as css2, html as html4 } from "lit";
221
225
  var QtiTestFeedback = class extends QtiModalFeedback {
222
226
  static {
223
- this.styles = i`
227
+ this.styles = css2`
224
228
  :host {
225
229
  color: gray;
226
230
  }
227
231
  `;
228
232
  }
229
233
  render() {
230
- return T``;
234
+ return html4``;
231
235
  }
232
236
  };
233
237
 
234
238
  // ../qti-test/dist/components/qti-test-part/qti-test-part.js
239
+ import { html as html5, LitElement as LitElement5 } from "lit";
240
+ import { property as property4 } from "lit/decorators.js";
235
241
  var __decorate4 = function(decorators, target, key, desc) {
236
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
237
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
238
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
239
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
242
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
243
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
244
+ 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;
245
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
240
246
  };
241
- var QtiTestPart = class extends i2 {
247
+ var QtiTestPart = class extends LitElement5 {
242
248
  constructor() {
243
249
  super(...arguments);
244
250
  this.identifier = "";
@@ -265,34 +271,35 @@ var QtiTestPart = class extends i2 {
265
271
  }));
266
272
  }
267
273
  render() {
268
- return T` <slot></slot>`;
274
+ return html5` <slot></slot>`;
269
275
  }
270
276
  };
271
277
  __decorate4([
272
- n2({ type: String })
278
+ property4({ type: String })
273
279
  ], QtiTestPart.prototype, "identifier", void 0);
274
280
  __decorate4([
275
- n2({ type: String })
281
+ property4({ type: String })
276
282
  ], QtiTestPart.prototype, "class", void 0);
277
283
  __decorate4([
278
- n2({ type: String, attribute: "navigation-mode" })
284
+ property4({ type: String, attribute: "navigation-mode" })
279
285
  ], QtiTestPart.prototype, "navigationMode", void 0);
280
286
  __decorate4([
281
- n2({ type: String, attribute: "submission-mode" })
287
+ property4({ type: String, attribute: "submission-mode" })
282
288
  ], QtiTestPart.prototype, "submissionMode", void 0);
283
289
 
284
290
  // ../qti-test/dist/components/qti-test-variables/qti-test-variables.js
291
+ import { consume as consume3 } from "@lit/context";
285
292
  var __decorate5 = function(decorators, target, key, desc) {
286
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
287
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
288
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
289
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
293
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
294
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
295
+ 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;
296
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
290
297
  };
291
298
  var QtiTestVariables = class extends QtiExpression {
292
299
  #testElement;
293
300
  constructor() {
294
301
  super();
295
- this.addEventListener("qti-assessment-test-connected", (e2) => this.#testElement = e2.detail);
302
+ this.addEventListener("qti-assessment-test-connected", (e) => this.#testElement = e.detail);
296
303
  }
297
304
  getResult() {
298
305
  const includedCategories = this.getAttribute("include-category")?.split(" ") ?? [];
@@ -328,7 +335,7 @@ var QtiTestVariables = class extends QtiExpression {
328
335
  }
329
336
  };
330
337
  __decorate5([
331
- c({ context: testContext, subscribe: true })
338
+ consume3({ context: testContext, subscribe: true })
332
339
  ], QtiTestVariables.prototype, "_testContext", void 0);
333
340
  var QtiTestVariablesExpression = class {
334
341
  constructor(testContext2, itemVariable, includedItems) {
@@ -343,7 +350,7 @@ var QtiTestVariablesExpression = class {
343
350
  items.forEach((item) => {
344
351
  if (uniqueItems.includes(item.identifier)) {
345
352
  const variable = item.variables.find((vr) => vr.identifier === this.itemVariable);
346
- const weight = this.includedItems.find((i4) => i4.item === item.identifier)?.weight ?? 1;
353
+ const weight = this.includedItems.find((i) => i.item === item.identifier)?.weight ?? 1;
347
354
  if (variable) {
348
355
  total += Number(variable.value) * weight;
349
356
  }
@@ -353,12 +360,18 @@ var QtiTestVariablesExpression = class {
353
360
  }
354
361
  };
355
362
 
363
+ // ../qti-test/dist/components/qti-test/qti-test.js
364
+ import { provide as provide2 } from "@lit/context";
365
+ import { html as html6, LitElement as LitElement7 } from "lit";
366
+ import { state } from "lit/decorators.js";
367
+
356
368
  // ../qti-test/dist/mixins/test-navigation.mixin.js
369
+ import { property as property5 } from "lit/decorators.js";
357
370
  var __decorate6 = function(decorators, target, key, desc) {
358
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
359
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
360
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
361
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
371
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
372
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
373
+ 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;
374
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
362
375
  };
363
376
  var TestNavigationMixin = (superClass) => {
364
377
  class TestNavigationClass extends superClass {
@@ -409,15 +422,15 @@ var TestNavigationMixin = (superClass) => {
409
422
  this.addEventListener("qti-assessment-item-connected", this._handleItemConnected.bind(this));
410
423
  this.addEventListener("qti-assessment-stimulus-ref-connected", this._handleStimulusRefConnected.bind(this));
411
424
  }
412
- _handleTestConnected(e2) {
413
- this._testElement = e2.detail;
425
+ _handleTestConnected(e) {
426
+ this._testElement = e.detail;
414
427
  this._initializeNavigation();
415
428
  }
416
429
  /**
417
430
  * Handle item connection events - track connected items and discover stimulus references
418
431
  */
419
- _handleItemConnected(e2) {
420
- const itemRef = e2.detail;
432
+ _handleItemConnected(e) {
433
+ const itemRef = e.detail;
421
434
  this._loadingState.connectedItems++;
422
435
  const stimulusRefs = itemRef.querySelectorAll("qti-assessment-stimulus-ref");
423
436
  this._loadingState.expectedStimulus += stimulusRefs.length;
@@ -426,9 +439,9 @@ var TestNavigationMixin = (superClass) => {
426
439
  /**
427
440
  * Handle stimulus reference connection events with duplicate prevention
428
441
  */
429
- async _handleStimulusRefConnected(e2) {
430
- e2.preventDefault();
431
- const { element, item } = e2;
442
+ async _handleStimulusRefConnected(e) {
443
+ e.preventDefault();
444
+ const { element, item } = e;
432
445
  console.info("Stimulus ref connected:", {
433
446
  identifier: element.identifier,
434
447
  href: element.href,
@@ -481,12 +494,40 @@ var TestNavigationMixin = (superClass) => {
481
494
  this.navigateTo(this.navigate, id);
482
495
  }
483
496
  }
497
+ _isLinearNavigationRestricted(type, targetId) {
498
+ const currentItemId = this.sessionContext?.navItemRefId;
499
+ if (!currentItemId)
500
+ return false;
501
+ if (type === "item" && targetId === currentItemId)
502
+ return false;
503
+ const currentItemRef = this._testElement?.querySelector(`qti-assessment-item-ref[identifier="${currentItemId}"]`);
504
+ if (!currentItemRef)
505
+ return false;
506
+ const section = currentItemRef.closest("qti-assessment-section");
507
+ const testPart = currentItemRef.closest("qti-test-part");
508
+ const navigationMode = section?.navigationMode || section?.getAttribute("navigation-mode") || testPart?.navigationMode || testPart?.getAttribute("navigation-mode") || "nonlinear";
509
+ if (navigationMode !== "linear")
510
+ return false;
511
+ const allItemRefs = Array.from(this._testElement?.querySelectorAll("qti-assessment-item-ref") || []);
512
+ const currentIndex = allItemRefs.findIndex((ref) => ref.identifier === currentItemId);
513
+ if (type === "item") {
514
+ const targetIndex = allItemRefs.findIndex((ref) => ref.identifier === targetId);
515
+ if (targetIndex === -1 || currentIndex === -1)
516
+ return false;
517
+ return targetIndex !== currentIndex + 1;
518
+ }
519
+ return true;
520
+ }
484
521
  /**
485
522
  * Main navigation request handler with proper lifecycle management
486
523
  */
487
524
  async _handleNavigationRequest({ detail }) {
488
525
  if (!detail?.id)
489
526
  return;
527
+ if (this._isLinearNavigationRestricted(detail.type, detail.id)) {
528
+ this._handleNavigationError(new Error("Navigation restricted in linear mode"), detail.type, detail.id);
529
+ return;
530
+ }
490
531
  this._cancelPreviousNavigation();
491
532
  const navigationId = ++this._navigationId;
492
533
  const controller = new AbortController();
@@ -679,7 +720,7 @@ var TestNavigationMixin = (superClass) => {
679
720
  const itemId = itemRef?.identifier;
680
721
  if (!itemRef || !itemId)
681
722
  return;
682
- const savedState = this.testContext.items.find((i4) => i4.identifier === itemId)?.state;
723
+ const savedState = this.testContext.items.find((i) => i.identifier === itemId)?.state;
683
724
  if (savedState === void 0)
684
725
  return;
685
726
  itemRef.updateComplete.then(() => {
@@ -805,16 +846,16 @@ var TestNavigationMixin = (superClass) => {
805
846
  }
806
847
  }
807
848
  __decorate6([
808
- n2({ type: String })
849
+ property5({ type: String })
809
850
  ], TestNavigationClass.prototype, "navigate", void 0);
810
851
  __decorate6([
811
- n2({ type: Number })
852
+ property5({ type: Number })
812
853
  ], TestNavigationClass.prototype, "requestTimeout", void 0);
813
854
  __decorate6([
814
- n2({ attribute: false })
855
+ property5({ attribute: false })
815
856
  ], TestNavigationClass.prototype, "postLoadTransformCallback", void 0);
816
857
  __decorate6([
817
- n2({ attribute: false })
858
+ property5({ attribute: false })
818
859
  ], TestNavigationClass.prototype, "postLoadTestTransformCallback", void 0);
819
860
  return TestNavigationClass;
820
861
  };
@@ -825,16 +866,16 @@ var TestViewMixin = (superClass) => {
825
866
  constructor(...args) {
826
867
  super(...args);
827
868
  this.sessionContext = { ...this.sessionContext, view: "candidate" };
828
- this.addEventListener("on-test-switch-view", (e2) => {
829
- this.sessionContext = { ...this.sessionContext, view: e2.detail };
869
+ this.addEventListener("on-test-switch-view", (e) => {
870
+ this.sessionContext = { ...this.sessionContext, view: e.detail };
830
871
  this._updateElementView();
831
872
  });
832
873
  this.addEventListener("qti-assessment-test-connected", () => {
833
874
  this._updateElementView();
834
875
  });
835
- this.addEventListener("qti-assessment-item-connected", (e2) => {
876
+ this.addEventListener("qti-assessment-item-connected", (e) => {
836
877
  this._updateElementView();
837
- this._setCorrectResponseVisibility(e2.detail);
878
+ this._setCorrectResponseVisibility(e.detail);
838
879
  });
839
880
  }
840
881
  willUpdate(changedProperties) {
@@ -868,11 +909,14 @@ var TestViewMixin = (superClass) => {
868
909
  };
869
910
 
870
911
  // ../qti-test/dist/mixins/test-base.js
912
+ import { provide } from "@lit/context";
913
+ import { LitElement as LitElement6 } from "lit";
914
+ import { property as property6 } from "lit/decorators.js";
871
915
  var __decorate7 = function(decorators, target, key, desc) {
872
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
873
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
874
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
875
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
916
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
917
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
918
+ 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;
919
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
876
920
  };
877
921
  var TestBaseMixin = (superClass) => {
878
922
  class TestBaseClass extends superClass {
@@ -884,7 +928,7 @@ var TestBaseMixin = (superClass) => {
884
928
  const context = assessmentItem._context;
885
929
  const identifier = context.identifier;
886
930
  const fullVariables = context.variables;
887
- const itemContext = this.testContext.items.find((i4) => i4?.identifier === identifier);
931
+ const itemContext = this.testContext.items.find((i) => i?.identifier === identifier);
888
932
  if (!itemContext) {
889
933
  console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
890
934
  return;
@@ -920,12 +964,12 @@ var TestBaseMixin = (superClass) => {
920
964
  }
921
965
  }
922
966
  _initializeEventListeners() {
923
- this.addEventListener("qti-assessment-test-connected", (e2) => {
967
+ this.addEventListener("qti-assessment-test-connected", (e) => {
924
968
  this.testContext = INITIAL_TEST_CONTEXT;
925
969
  this.sessionContext = INITIAL_SESSION_CONTEXT;
926
970
  if (this.testContext && this.testContext.items.length > 0)
927
971
  return;
928
- this._testElement = e2.detail;
972
+ this._testElement = e.detail;
929
973
  const items = Array.from(this._testElement.querySelectorAll("qti-assessment-item-ref")).map((itemRef) => {
930
974
  return {
931
975
  href: itemRef.href,
@@ -942,19 +986,19 @@ var TestBaseMixin = (superClass) => {
942
986
  });
943
987
  this.testContext = { ...this.testContext, items };
944
988
  });
945
- this.addEventListener("qti-assessment-item-connected", (e2) => {
946
- const assessmentItem = e2.detail;
989
+ this.addEventListener("qti-assessment-item-connected", (e) => {
990
+ const assessmentItem = e.detail;
947
991
  const assessmentRefId = assessmentItem.closest("qti-assessment-item-ref")?.identifier;
948
992
  if (assessmentRefId) {
949
993
  assessmentItem.assessmentItemRefId = assessmentRefId;
950
994
  }
951
- this._updateItemInTestContext(e2.detail);
995
+ this._updateItemInTestContext(e.detail);
952
996
  });
953
- this.addEventListener("qti-item-context-updated", (e2) => {
954
- this._updateItemVariablesInTestContext(e2.detail.itemContext.identifier, e2.detail.itemContext.variables, e2.detail.itemContext.state);
997
+ this.addEventListener("qti-item-context-updated", (e) => {
998
+ this._updateItemVariablesInTestContext(e.detail.itemContext.identifier, e.detail.itemContext.variables, e.detail.itemContext.state);
955
999
  });
956
1000
  }
957
- _updateItemVariablesInTestContext(identifier, variables, state) {
1001
+ _updateItemVariablesInTestContext(identifier, variables, state8) {
958
1002
  this.testContext = {
959
1003
  ...this.testContext,
960
1004
  // Spread existing test context properties
@@ -969,7 +1013,7 @@ var TestBaseMixin = (superClass) => {
969
1013
  const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
970
1014
  return matchingVariable ? { ...matchingVariable, ...variable } : variable;
971
1015
  }),
972
- ...state !== void 0 ? { state: state ? { ...state } : void 0 } : {}
1016
+ ...state8 !== void 0 ? { state: state8 ? { ...state8 } : void 0 } : {}
973
1017
  };
974
1018
  })
975
1019
  };
@@ -977,16 +1021,16 @@ var TestBaseMixin = (superClass) => {
977
1021
  }
978
1022
  }
979
1023
  __decorate7([
980
- n2({ attribute: false, type: Object }),
981
- e({ context: testContext })
1024
+ property6({ attribute: false, type: Object }),
1025
+ provide({ context: testContext })
982
1026
  ], TestBaseClass.prototype, "testContext", void 0);
983
1027
  __decorate7([
984
- n2({ attribute: false, type: Object }),
985
- e({ context: sessionContext })
1028
+ property6({ attribute: false, type: Object }),
1029
+ provide({ context: sessionContext })
986
1030
  ], TestBaseClass.prototype, "sessionContext", void 0);
987
1031
  return TestBaseClass;
988
1032
  };
989
- var TestBase = class extends TestBaseMixin(i2) {
1033
+ var TestBase = class extends TestBaseMixin(LitElement6) {
990
1034
  };
991
1035
 
992
1036
  // ../qti-test/dist/mixins/test-processing.mixin.js
@@ -994,17 +1038,17 @@ var TestProcessingMixin = (superClass) => {
994
1038
  class TestProcessingElement extends superClass {
995
1039
  constructor(...args) {
996
1040
  super(...args);
997
- this.addEventListener("qti-register-variable", (e2) => {
1041
+ this.addEventListener("qti-register-variable", (e) => {
998
1042
  this.testContext = {
999
1043
  ...this.testContext,
1000
- testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e2.detail.variable]
1044
+ testOutcomeVariables: [...this.testContext.testOutcomeVariables || [], e.detail.variable]
1001
1045
  };
1002
- e2.stopPropagation();
1046
+ e.stopPropagation();
1003
1047
  });
1004
- this.addEventListener("qti-set-outcome-value", (e2) => {
1005
- const { outcomeIdentifier, value } = e2.detail;
1048
+ this.addEventListener("qti-set-outcome-value", (e) => {
1049
+ const { outcomeIdentifier, value } = e.detail;
1006
1050
  this.updateOutcomeVariable(outcomeIdentifier, value);
1007
- e2.stopPropagation();
1051
+ e.stopPropagation();
1008
1052
  });
1009
1053
  }
1010
1054
  outcomeProcessing() {
@@ -1046,12 +1090,12 @@ var TestProcessingMixin = (superClass) => {
1046
1090
 
1047
1091
  // ../qti-test/dist/components/qti-test/qti-test.js
1048
1092
  var __decorate8 = function(decorators, target, key, desc) {
1049
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1050
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
1051
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
1052
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
1093
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1094
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1095
+ 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;
1096
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1053
1097
  };
1054
- var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBaseMixin(i2)))) {
1098
+ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBaseMixin(LitElement7)))) {
1055
1099
  constructor() {
1056
1100
  super(...arguments);
1057
1101
  this.configContext = {};
@@ -1066,16 +1110,20 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
1066
1110
  this.dispatchEvent(new CustomEvent("qti-test-connected", { detail: this }));
1067
1111
  }
1068
1112
  render() {
1069
- return T`<slot></slot>`;
1113
+ return html6`<slot></slot>`;
1070
1114
  }
1071
1115
  };
1072
1116
  __decorate8([
1073
- r(),
1074
- e({ context: configContext })
1117
+ state(),
1118
+ provide2({ context: configContext })
1075
1119
  ], QtiTest.prototype, "configContext", void 0);
1076
1120
 
1121
+ // ../qti-test/dist/components/test-check-item/test-check-item.js
1122
+ import { css as css4, html as html7, LitElement as LitElement8 } from "lit";
1123
+
1077
1124
  // ../qti-test/dist/components/styles.js
1078
- var form = i`
1125
+ import { css as css3 } from "lit";
1126
+ var form = css3`
1079
1127
  display: inline-flex;
1080
1128
  align-items: center;
1081
1129
  cursor: pointer;
@@ -1083,23 +1131,23 @@ var form = i`
1083
1131
  border-radius: 0.25rem;
1084
1132
  user-select: none;
1085
1133
  `;
1086
- var btn = i`
1134
+ var btn = css3`
1087
1135
  background-color: lightgray;
1088
1136
  ${form};
1089
1137
  `;
1090
- var dis = i`
1138
+ var dis = css3`
1091
1139
  cursor: not-allowed;
1092
1140
  opacity: 0.8;
1093
1141
  `;
1094
- var ind = i`
1142
+ var ind = css3`
1095
1143
  ${form};
1096
1144
  border: 1px solid gray;
1097
1145
  `;
1098
1146
 
1099
1147
  // ../qti-test/dist/components/test-check-item/test-check-item.js
1100
- var TestCheckItem = class extends i2 {
1148
+ var TestCheckItem = class extends LitElement8 {
1101
1149
  static {
1102
- this.styles = i`
1150
+ this.styles = css4`
1103
1151
  :host {
1104
1152
  ${btn};
1105
1153
  }
@@ -1121,18 +1169,22 @@ var TestCheckItem = class extends i2 {
1121
1169
  });
1122
1170
  }
1123
1171
  render() {
1124
- return T` <slot></slot> `;
1172
+ return html7` <slot></slot> `;
1125
1173
  }
1126
1174
  };
1127
1175
 
1128
1176
  // ../qti-test/dist/components/test-container/test-container.js
1177
+ import { consume as consume4 } from "@lit/context";
1178
+ import { LitElement as LitElement9, html as html8 } from "lit";
1179
+ import { property as property7, state as state2 } from "lit/decorators.js";
1180
+ import { until } from "lit/directives/until.js";
1129
1181
  var __decorate9 = function(decorators, target, key, desc) {
1130
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1131
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
1132
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
1133
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
1182
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1183
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1184
+ 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;
1185
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1134
1186
  };
1135
- var TestContainer = class extends i2 {
1187
+ var TestContainer = class extends LitElement9 {
1136
1188
  constructor() {
1137
1189
  super(...arguments);
1138
1190
  this.customElementRegistry = null;
@@ -1200,7 +1252,7 @@ var TestContainer = class extends i2 {
1200
1252
  }
1201
1253
  #initializeTemplateContent() {
1202
1254
  const template = this.querySelector("template");
1203
- this.#templateContent = template ? template.content : T``;
1255
+ this.#templateContent = template ? template.content : html8``;
1204
1256
  }
1205
1257
  #applyStyles() {
1206
1258
  const sheet = new CSSStyleSheet();
@@ -1208,28 +1260,28 @@ var TestContainer = class extends i2 {
1208
1260
  this.shadowRoot.adoptedStyleSheets = [sheet];
1209
1261
  }
1210
1262
  render() {
1211
- return T`
1263
+ return html8`
1212
1264
  ${this.#templateContent}
1213
1265
  <slot></slot>
1214
- ${m(this.testDoc, T`<span>Loading...</span>`)}
1266
+ ${until(this.testDoc, html8`<span>Loading...</span>`)}
1215
1267
  `;
1216
1268
  }
1217
1269
  };
1218
1270
  __decorate9([
1219
- n2({ attribute: false })
1271
+ property7({ attribute: false })
1220
1272
  ], TestContainer.prototype, "customElementRegistry", void 0);
1221
1273
  __decorate9([
1222
- n2({ type: String, attribute: "test-url" })
1274
+ property7({ type: String, attribute: "test-url" })
1223
1275
  ], TestContainer.prototype, "testURL", void 0);
1224
1276
  __decorate9([
1225
- r()
1277
+ state2()
1226
1278
  ], TestContainer.prototype, "testDoc", void 0);
1227
1279
  __decorate9([
1228
- r()
1280
+ state2()
1229
1281
  ], TestContainer.prototype, "testXML", void 0);
1230
1282
  __decorate9([
1231
- r(),
1232
- c({ context: qtiContext, subscribe: true })
1283
+ state2(),
1284
+ consume4({ context: qtiContext, subscribe: true })
1233
1285
  ], TestContainer.prototype, "qtiContext", void 0);
1234
1286
  __decorate9([
1235
1287
  watch("testURL", { waitUntilFirstUpdate: true })
@@ -1239,9 +1291,10 @@ __decorate9([
1239
1291
  ], TestContainer.prototype, "handleTestXMLChange", null);
1240
1292
 
1241
1293
  // ../qti-test/dist/components/test-end-attempt/test-end-attempt.js
1242
- var TestEndAttempt = class extends i2 {
1294
+ import { css as css5, html as html9, LitElement as LitElement10 } from "lit";
1295
+ var TestEndAttempt = class extends LitElement10 {
1243
1296
  static {
1244
- this.styles = i`
1297
+ this.styles = css5`
1245
1298
  :host {
1246
1299
  ${btn};
1247
1300
  }
@@ -1255,20 +1308,22 @@ var TestEndAttempt = class extends i2 {
1255
1308
  this.addEventListener("click", () => this.dispatchEvent(new CustomEvent("test-end-attempt", { bubbles: true })));
1256
1309
  }
1257
1310
  render() {
1258
- return T` <slot></slot> `;
1311
+ return html9` <slot></slot> `;
1259
1312
  }
1260
1313
  };
1261
1314
 
1262
1315
  // ../qti-test/dist/components/test-item-link/test-item-link.js
1316
+ import { css as css6, html as html10, LitElement as LitElement11 } from "lit";
1317
+ import { property as property8 } from "lit/decorators.js";
1263
1318
  var __decorate10 = function(decorators, target, key, desc) {
1264
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1265
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
1266
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
1267
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
1319
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1320
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1321
+ 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;
1322
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1268
1323
  };
1269
- var TestItemLink = class extends i2 {
1324
+ var TestItemLink = class extends LitElement11 {
1270
1325
  static {
1271
- this.styles = i`
1326
+ this.styles = css6`
1272
1327
  :host {
1273
1328
  ${btn};
1274
1329
  }
@@ -1293,19 +1348,22 @@ var TestItemLink = class extends i2 {
1293
1348
  }));
1294
1349
  }
1295
1350
  render() {
1296
- return T` <slot></slot> `;
1351
+ return html10` <slot></slot> `;
1297
1352
  }
1298
1353
  };
1299
1354
  __decorate10([
1300
- n2({ type: String, attribute: "item-id" })
1355
+ property8({ type: String, attribute: "item-id" })
1301
1356
  ], TestItemLink.prototype, "itemId", void 0);
1302
1357
 
1303
1358
  // ../qti-test/dist/components/test-item-to-speech/test-item-to-speech.js
1359
+ import { html as html11, LitElement as LitElement12, css as css7 } from "lit";
1360
+ import { consume as consume5, provide as provide3, createContext } from "@lit/context";
1361
+ import { property as property9, state as state3 } from "lit/decorators.js";
1304
1362
  var __decorate11 = function(decorators, target, key, desc) {
1305
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1306
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
1307
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
1308
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
1363
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1364
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1365
+ 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;
1366
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1309
1367
  };
1310
1368
  var HIGHLIGHT_ELEMENT = "tts-element";
1311
1369
  var HIGHLIGHT_WORD = "tts-word";
@@ -1320,10 +1378,10 @@ function getHighlightSheet() {
1320
1378
  }
1321
1379
  return highlightSheet;
1322
1380
  }
1323
- var ttsContext = n(/* @__PURE__ */ Symbol("tts-context"));
1324
- var TtsButtonBase = class extends i2 {
1381
+ var ttsContext = createContext(/* @__PURE__ */ Symbol("tts-context"));
1382
+ var TtsButtonBase = class extends LitElement12 {
1325
1383
  static {
1326
- this.styles = i`
1384
+ this.styles = css7`
1327
1385
  :host {
1328
1386
  display: inline-block;
1329
1387
  }
@@ -1346,9 +1404,9 @@ var TtsButtonBase = class extends i2 {
1346
1404
  }
1347
1405
  };
1348
1406
  __decorate11([
1349
- c({ context: ttsContext, subscribe: true })
1407
+ consume5({ context: ttsContext, subscribe: true })
1350
1408
  ], TtsButtonBase.prototype, "_tts", void 0);
1351
- var TestItemToSpeech = class extends i2 {
1409
+ var TestItemToSpeech = class extends LitElement12 {
1352
1410
  #internals;
1353
1411
  #itemElements;
1354
1412
  #boundHandleItemConnected;
@@ -1422,7 +1480,7 @@ var TestItemToSpeech = class extends i2 {
1422
1480
  this.#itemElements.clear();
1423
1481
  }
1424
1482
  render() {
1425
- return T`<slot></slot>`;
1483
+ return html11`<slot></slot>`;
1426
1484
  }
1427
1485
  #handleItemConnected(event) {
1428
1486
  const item = event.detail;
@@ -1431,12 +1489,12 @@ var TestItemToSpeech = class extends i2 {
1431
1489
  }
1432
1490
  }
1433
1491
  /** Update speech state on both the context (notifies children) and the host's CSS custom states. */
1434
- #setSpeechState(state) {
1435
- this._ttsContext = { ...this._ttsContext, state };
1492
+ #setSpeechState(state8) {
1493
+ this._ttsContext = { ...this._ttsContext, state: state8 };
1436
1494
  this.#internals.states.delete("idle");
1437
1495
  this.#internals.states.delete("playing");
1438
1496
  this.#internals.states.delete("paused");
1439
- this.#internals.states.add(state);
1497
+ this.#internals.states.add(state8);
1440
1498
  }
1441
1499
  /** Push currentElementIndex and elementCount into context so children can react. */
1442
1500
  #updateContext() {
@@ -1489,7 +1547,7 @@ var TestItemToSpeech = class extends i2 {
1489
1547
  element.scrollIntoView({ behavior: "smooth", block: "nearest" });
1490
1548
  this.#highlightElement(element);
1491
1549
  this.#textNodes = this.#collectTextNodes(element);
1492
- const text = this.#textNodes.map((n3) => n3.textContent ?? "").join("");
1550
+ const text = this.#textNodes.map((n) => n.textContent ?? "").join("");
1493
1551
  if (!text.trim()) {
1494
1552
  this.#speakElement(index + 1);
1495
1553
  return;
@@ -1577,7 +1635,7 @@ var TestItemToSpeech = class extends i2 {
1577
1635
  return;
1578
1636
  this.#ensureHighlightStyles();
1579
1637
  this.#wordHighlight.clear();
1580
- const text = this.#textNodes.map((n3) => n3.textContent ?? "").join("");
1638
+ const text = this.#textNodes.map((n) => n.textContent ?? "").join("");
1581
1639
  const endIndex = charIndex + (charLength > 0 ? charLength : this.#wordLengthAt(charIndex, text));
1582
1640
  let offset = 0;
1583
1641
  let startNode = null;
@@ -1645,14 +1703,14 @@ var TestItemToSpeech = class extends i2 {
1645
1703
  }
1646
1704
  };
1647
1705
  __decorate11([
1648
- n2({ type: String })
1706
+ property9({ type: String })
1649
1707
  ], TestItemToSpeech.prototype, "language", void 0);
1650
1708
  __decorate11([
1651
- c({ context: sessionContext, subscribe: true })
1709
+ consume5({ context: sessionContext, subscribe: true })
1652
1710
  ], TestItemToSpeech.prototype, "_sessionContext", void 0);
1653
1711
  __decorate11([
1654
- r(),
1655
- e({ context: ttsContext })
1712
+ state3(),
1713
+ provide3({ context: ttsContext })
1656
1714
  ], TestItemToSpeech.prototype, "_ttsContext", void 0);
1657
1715
  var TestTtsPlay = class extends TtsButtonBase {
1658
1716
  #toggle() {
@@ -1667,16 +1725,16 @@ var TestTtsPlay = class extends TtsButtonBase {
1667
1725
  }
1668
1726
  render() {
1669
1727
  const playing = this._tts?.state === "playing";
1670
- return T`
1728
+ return html11`
1671
1729
  <button part="button" @click=${this.#toggle}>
1672
- ${playing ? T`<slot name="pause">⏸</slot>` : T`<slot name="play">▶</slot>`}
1730
+ ${playing ? html11`<slot name="pause">⏸</slot>` : html11`<slot name="play">▶</slot>`}
1673
1731
  </button>
1674
1732
  `;
1675
1733
  }
1676
1734
  };
1677
1735
  var TestTtsPause = class extends TtsButtonBase {
1678
1736
  render() {
1679
- return T`
1737
+ return html11`
1680
1738
  <button part="button" ?disabled=${this._tts?.state !== "playing"} @click=${() => this._tts?.pause()}>
1681
1739
  <slot>⏸</slot>
1682
1740
  </button>
@@ -1685,7 +1743,7 @@ var TestTtsPause = class extends TtsButtonBase {
1685
1743
  };
1686
1744
  var TestTtsResume = class extends TtsButtonBase {
1687
1745
  render() {
1688
- return T`
1746
+ return html11`
1689
1747
  <button part="button" ?disabled=${this._tts?.state !== "paused"} @click=${() => this._tts?.resume()}>
1690
1748
  <slot>▶</slot>
1691
1749
  </button>
@@ -1694,7 +1752,7 @@ var TestTtsResume = class extends TtsButtonBase {
1694
1752
  };
1695
1753
  var TestTtsStop = class extends TtsButtonBase {
1696
1754
  render() {
1697
- return T`
1755
+ return html11`
1698
1756
  <button part="button" ?disabled=${this._tts?.state === "idle"} @click=${() => this._tts?.stop()}>
1699
1757
  <slot>■</slot>
1700
1758
  </button>
@@ -1705,7 +1763,7 @@ var TestTtsPrev = class extends TtsButtonBase {
1705
1763
  render() {
1706
1764
  const atStart = (this._tts?.currentElementIndex ?? 0) === 0;
1707
1765
  const noElements = (this._tts?.elementCount ?? 0) === 0;
1708
- return T`
1766
+ return html11`
1709
1767
  <button part="button" ?disabled=${noElements || atStart} @click=${() => this._tts?.prevElement()}>
1710
1768
  <slot>◀◀</slot>
1711
1769
  </button>
@@ -1716,7 +1774,7 @@ var TestTtsNext = class extends TtsButtonBase {
1716
1774
  render() {
1717
1775
  const atEnd = (this._tts?.elementCount ?? 0) > 0 && (this._tts?.currentElementIndex ?? 0) >= (this._tts?.elementCount ?? 0) - 1;
1718
1776
  const noElements = (this._tts?.elementCount ?? 0) === 0;
1719
- return T`
1777
+ return html11`
1720
1778
  <button part="button" ?disabled=${noElements || atEnd} @click=${() => this._tts?.nextElement()}>
1721
1779
  <slot>▶▶</slot>
1722
1780
  </button>
@@ -1725,13 +1783,16 @@ var TestTtsNext = class extends TtsButtonBase {
1725
1783
  };
1726
1784
 
1727
1785
  // ../qti-test/dist/components/test-navigation/test-navigation.js
1786
+ import { consume as consume6, provide as provide4 } from "@lit/context";
1787
+ import { html as html12, LitElement as LitElement13 } from "lit";
1788
+ import { property as property10, state as state4 } from "lit/decorators.js";
1728
1789
  var __decorate12 = function(decorators, target, key, desc) {
1729
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1730
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
1731
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
1732
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
1790
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1791
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1792
+ 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;
1793
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1733
1794
  };
1734
- var TestNavigation = class extends i2 {
1795
+ var TestNavigation = class extends LitElement13 {
1735
1796
  #testElement;
1736
1797
  constructor() {
1737
1798
  super();
@@ -1786,7 +1847,7 @@ var TestNavigation = class extends i2 {
1786
1847
  }
1787
1848
  }
1788
1849
  render() {
1789
- return T`<slot></slot>`;
1850
+ return html12`<slot></slot>`;
1790
1851
  }
1791
1852
  /* PK: on test connected we can build the computed context */
1792
1853
  #handleTestConnected(event) {
@@ -1837,8 +1898,10 @@ var TestNavigation = class extends i2 {
1837
1898
  active: false,
1838
1899
  identifier: section.identifier,
1839
1900
  title: section.title,
1901
+ navigationMode: section.navigationMode,
1902
+ submissionMode: section.submissionMode,
1840
1903
  items: itemElements.map((item) => ({
1841
- ...this.initContext?.find((i4) => i4.identifier === item.identifier),
1904
+ ...this.initContext?.find((i) => i.identifier === item.identifier),
1842
1905
  active: false,
1843
1906
  identifier: item.identifier,
1844
1907
  categories: item.category ? item.category?.split(" ") : [],
@@ -1906,10 +1969,10 @@ var TestNavigation = class extends i2 {
1906
1969
  const scoreOutcome = itemElement.querySelector("qti-outcome-declaration[identifier='SCORE']");
1907
1970
  const externalScored = scoreOutcome?.getAttribute("externalScored");
1908
1971
  const responseDeclarations = itemElement.querySelectorAll("qti-response-declaration");
1909
- const containsCorrectResponse = Array.from(responseDeclarations).some((r3) => r3.querySelector("qti-correct-response"));
1910
- const containsMapping = Array.from(responseDeclarations).some((r3) => {
1911
- const mapping = r3.querySelector("qti-mapping");
1912
- const areaMapping = r3.querySelector("qti-area-mapping");
1972
+ const containsCorrectResponse = Array.from(responseDeclarations).some((r) => r.querySelector("qti-correct-response"));
1973
+ const containsMapping = Array.from(responseDeclarations).some((r) => {
1974
+ const mapping = r.querySelector("qti-mapping");
1975
+ const areaMapping = r.querySelector("qti-area-mapping");
1913
1976
  return mapping?.querySelector("qti-map-entry") || areaMapping?.querySelector("qti-area-map-entry");
1914
1977
  });
1915
1978
  const hasCorrectResponse = containsCorrectResponse || containsMapping;
@@ -1949,13 +2012,13 @@ var TestNavigation = class extends i2 {
1949
2012
  return {
1950
2013
  ...section,
1951
2014
  active: this._sessionContext?.navSectionId === section.identifier || false,
1952
- completed: section.items.every((item) => this._testContext.items.find((i4) => i4.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"),
2015
+ completed: section.items.every((item) => this._testContext.items.find((i) => i.identifier === item.identifier)?.variables.find((v) => v.identifier === "completionStatus").value === "completed"),
1953
2016
  items: section.items.map((item) => {
1954
- const itemContext = this._testContext?.items.find((i4) => i4.identifier === item.identifier);
2017
+ const itemContext = this._testContext?.items.find((i) => i.identifier === item.identifier);
1955
2018
  const computedItem = {
1956
2019
  ...item,
1957
2020
  ...itemContext,
1958
- ...this.initContext?.find((i4) => i4.identifier === item.identifier)
2021
+ ...this.initContext?.find((i) => i.identifier === item.identifier)
1959
2022
  };
1960
2023
  const rawscore = computedItem.variables?.find((vr) => vr.identifier == "SCORE")?.value;
1961
2024
  const score = rawscore === void 0 || rawscore === null ? null : parseFloat(rawscore?.toString());
@@ -1993,50 +2056,53 @@ var TestNavigation = class extends i2 {
1993
2056
  }
1994
2057
  };
1995
2058
  __decorate12([
1996
- n2({ type: String })
2059
+ property10({ type: String })
1997
2060
  ], TestNavigation.prototype, "identifier", void 0);
1998
2061
  __decorate12([
1999
- r()
2062
+ state4()
2000
2063
  ], TestNavigation.prototype, "initContext", void 0);
2001
2064
  __decorate12([
2002
- r(),
2003
- e({ context: qtiContext })
2065
+ state4(),
2066
+ provide4({ context: qtiContext })
2004
2067
  ], TestNavigation.prototype, "qtiContext", void 0);
2005
2068
  __decorate12([
2006
- r(),
2007
- c({ context: configContext, subscribe: true })
2069
+ state4(),
2070
+ consume6({ context: configContext, subscribe: true })
2008
2071
  ], TestNavigation.prototype, "configContext", void 0);
2009
2072
  __decorate12([
2010
- r(),
2011
- c({ context: testContext, subscribe: true })
2073
+ state4(),
2074
+ consume6({ context: testContext, subscribe: true })
2012
2075
  ], TestNavigation.prototype, "_testContext", void 0);
2013
2076
  __decorate12([
2014
- r(),
2015
- c({ context: sessionContext, subscribe: true })
2077
+ state4(),
2078
+ consume6({ context: sessionContext, subscribe: true })
2016
2079
  ], TestNavigation.prototype, "_sessionContext", void 0);
2017
2080
  __decorate12([
2018
- r(),
2019
- e({ context: computedContext })
2081
+ state4(),
2082
+ provide4({ context: computedContext })
2020
2083
  ], TestNavigation.prototype, "computedContext", void 0);
2021
2084
  __decorate12([
2022
- n2({ type: Boolean, attribute: "auto-score-items" })
2085
+ property10({ type: Boolean, attribute: "auto-score-items" })
2023
2086
  ], TestNavigation.prototype, "autoScoreItems", void 0);
2024
2087
 
2025
2088
  // ../qti-test/dist/components/test-next/test-next.js
2089
+ import { css as css8, html as html13, LitElement as LitElement14 } from "lit";
2090
+ import { property as property11 } from "lit/decorators.js";
2091
+ import { consume as consume7 } from "@lit/context";
2026
2092
  var __decorate13 = function(decorators, target, key, desc) {
2027
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2028
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
2029
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
2030
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
2093
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2094
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2095
+ 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;
2096
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
2031
2097
  };
2032
- var TestNext = class extends i2 {
2098
+ var TestNext = class extends LitElement14 {
2033
2099
  _handleTestElementChange(_oldValue, newValue) {
2034
2100
  if (newValue) {
2035
- this._internalDisabled = false;
2101
+ this.requestUpdate();
2036
2102
  }
2037
2103
  }
2038
2104
  static {
2039
- this.styles = i`
2105
+ this.styles = css8`
2040
2106
  :host {
2041
2107
  ${btn};
2042
2108
  }
@@ -2052,8 +2118,8 @@ var TestNext = class extends i2 {
2052
2118
  this.#internals = this.attachInternals();
2053
2119
  this.#internals.role = "button";
2054
2120
  this.#internals.ariaLabel = "Next item";
2055
- this.addEventListener("click", (e2) => {
2056
- e2.preventDefault();
2121
+ this.addEventListener("click", (e) => {
2122
+ e.preventDefault();
2057
2123
  if (!this._internalDisabled)
2058
2124
  this._requestItem(this.sectionItems[this.itemIndex + 1].identifier);
2059
2125
  });
@@ -2073,7 +2139,16 @@ var TestNext = class extends i2 {
2073
2139
  this.checkDisabled();
2074
2140
  }
2075
2141
  checkDisabled() {
2076
- this._internalDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= this.sectionItems?.length - 1;
2142
+ const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
2143
+ if (!testPart)
2144
+ return;
2145
+ const activeSection = testPart.sections.find((s) => s.active);
2146
+ const navigationMode = activeSection?.navigationMode || testPart.navigationMode;
2147
+ const submissionMode = activeSection?.submissionMode || testPart.submissionMode;
2148
+ const activeItem = this.sectionItems[this.itemIndex];
2149
+ const isLinearIndividual = navigationMode === "linear" && submissionMode === "individual";
2150
+ const numAttempts = Number(activeItem?.variables.find((v) => v.identifier === "numAttempts")?.value) || 0;
2151
+ this._internalDisabled = !this.computedContext || this.itemIndex < 0 || this.itemIndex >= (this.sectionItems?.length ?? 0) - 1 || isLinearIndividual && numAttempts === 0;
2077
2152
  }
2078
2153
  _requestItem(identifier) {
2079
2154
  this.dispatchEvent(new CustomEvent("qti-request-navigation", {
@@ -2086,19 +2161,25 @@ var TestNext = class extends i2 {
2086
2161
  }));
2087
2162
  }
2088
2163
  render() {
2089
- return T`<slot></slot>`;
2164
+ return html13`<slot></slot>`;
2090
2165
  }
2091
2166
  };
2092
2167
  __decorate13([
2093
- n2({ type: Boolean, reflect: true, attribute: "disabled" })
2168
+ property11({ type: Boolean, reflect: true, attribute: "disabled" })
2094
2169
  ], TestNext.prototype, "_internalDisabled", void 0);
2095
2170
  __decorate13([
2096
- c({ context: computedContext, subscribe: true })
2171
+ consume7({ context: computedContext, subscribe: true })
2097
2172
  ], TestNext.prototype, "computedContext", void 0);
2098
2173
  __decorate13([
2099
2174
  watch("computedContext")
2100
2175
  ], TestNext.prototype, "_handleTestElementChange", null);
2101
2176
 
2177
+ // ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
2178
+ import { html as html14, LitElement as LitElement15 } from "lit";
2179
+
2180
+ // ../../node_modules/.pnpm/@heximal+templates@0.1.5/node_modules/@heximal/templates/index.js
2181
+ import { render as renderLit, nothing } from "lit-html";
2182
+
2102
2183
  // ../../node_modules/.pnpm/@heximal+expressions@0.1.5/node_modules/@heximal/expressions/lib/constants.js
2103
2184
  var KEYWORDS = ["this"];
2104
2185
  var UNARY_OPERATORS = ["+", "-", "!"];
@@ -2583,7 +2664,7 @@ var Parser = class {
2583
2664
  if (this._matches(Kind.ARROW)) {
2584
2665
  this.#advance();
2585
2666
  const body = this.#parseExpression();
2586
- const params = expressions?.map((e2) => e2.value) ?? [];
2667
+ const params = expressions?.map((e) => e.value) ?? [];
2587
2668
  return this.#ast.arrowFunction(params, body);
2588
2669
  } else {
2589
2670
  return this.#ast.paren(expressions[0]);
@@ -2687,13 +2768,13 @@ var EvalAstFactory = class {
2687
2768
  }
2688
2769
  };
2689
2770
  }
2690
- binary(l, op, r3) {
2771
+ binary(l, op, r) {
2691
2772
  const f = _BINARY_OPERATORS[op];
2692
2773
  return {
2693
2774
  type: "Binary",
2694
2775
  operator: op,
2695
2776
  left: l,
2696
- right: r3,
2777
+ right: r,
2697
2778
  evaluate(scope) {
2698
2779
  if (this.operator === "=") {
2699
2780
  if (this.left.type !== "ID" && this.left.type !== "Getter" && this.left.type !== "Index") {
@@ -2701,18 +2782,18 @@ var EvalAstFactory = class {
2701
2782
  }
2702
2783
  const value = this.right.evaluate(scope);
2703
2784
  let receiver = void 0;
2704
- let property;
2785
+ let property18;
2705
2786
  if (this.left.type === "Getter") {
2706
2787
  receiver = this.left.receiver.evaluate(scope);
2707
- property = this.left.name;
2788
+ property18 = this.left.name;
2708
2789
  } else if (this.left.type === "Index") {
2709
2790
  receiver = this.left.receiver.evaluate(scope);
2710
- property = this.left.argument.evaluate(scope);
2791
+ property18 = this.left.argument.evaluate(scope);
2711
2792
  } else if (this.left.type === "ID") {
2712
2793
  receiver = scope;
2713
- property = this.left.value;
2794
+ property18 = this.left.value;
2714
2795
  }
2715
- return receiver === void 0 ? void 0 : receiver[property] = value;
2796
+ return receiver === void 0 ? void 0 : receiver[property18] = value;
2716
2797
  }
2717
2798
  return f(this.left.evaluate(scope), this.right.evaluate(scope));
2718
2799
  },
@@ -2723,11 +2804,11 @@ var EvalAstFactory = class {
2723
2804
  }
2724
2805
  };
2725
2806
  }
2726
- getter(g, n3) {
2807
+ getter(g, n) {
2727
2808
  return {
2728
2809
  type: "Getter",
2729
2810
  receiver: g,
2730
- name: n3,
2811
+ name: n,
2731
2812
  evaluate(scope) {
2732
2813
  return this.receiver.evaluate(scope)?.[this.name];
2733
2814
  },
@@ -2761,13 +2842,13 @@ var EvalAstFactory = class {
2761
2842
  }
2762
2843
  };
2763
2844
  }
2764
- paren(e2) {
2765
- return e2;
2845
+ paren(e) {
2846
+ return e;
2766
2847
  }
2767
- index(e2, a) {
2848
+ index(e, a) {
2768
2849
  return {
2769
2850
  type: "Index",
2770
- receiver: e2,
2851
+ receiver: e,
2771
2852
  argument: a,
2772
2853
  evaluate(scope) {
2773
2854
  return this.receiver.evaluate(scope)?.[this.argument.evaluate(scope)];
@@ -2778,15 +2859,15 @@ var EvalAstFactory = class {
2778
2859
  }
2779
2860
  };
2780
2861
  }
2781
- ternary(c2, t, f) {
2862
+ ternary(c, t, f) {
2782
2863
  return {
2783
2864
  type: "Ternary",
2784
- condition: c2,
2865
+ condition: c,
2785
2866
  trueExpr: t,
2786
2867
  falseExpr: f,
2787
2868
  evaluate(scope) {
2788
- const c3 = this.condition.evaluate(scope);
2789
- if (c3) {
2869
+ const c2 = this.condition.evaluate(scope);
2870
+ if (c2) {
2790
2871
  return this.trueExpr.evaluate(scope);
2791
2872
  } else {
2792
2873
  return this.falseExpr.evaluate(scope);
@@ -2838,7 +2919,7 @@ var EvalAstFactory = class {
2838
2919
  return this.items?.map((a) => a?.evaluate(scope));
2839
2920
  },
2840
2921
  getIds(idents) {
2841
- this.items?.forEach((i4) => i4?.getIds(idents));
2922
+ this.items?.forEach((i) => i?.getIds(idents));
2842
2923
  return idents;
2843
2924
  }
2844
2925
  };
@@ -2852,7 +2933,7 @@ var EvalAstFactory = class {
2852
2933
  const params2 = this.params;
2853
2934
  const body2 = this.body;
2854
2935
  return function(...args) {
2855
- const paramsObj = fromEntries(params2.map((p, i4) => [p, args[i4]]));
2936
+ const paramsObj = fromEntries(params2.map((p, i) => [p, args[i]]));
2856
2937
  const newScope = new Proxy(scope ?? {}, {
2857
2938
  set(target, prop, value) {
2858
2939
  if (hasOwn(paramsObj, prop)) {
@@ -2877,27 +2958,9 @@ var EvalAstFactory = class {
2877
2958
  }
2878
2959
  };
2879
2960
 
2880
- // ../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/node/private-ssr-support.js
2881
- var r2 = null;
2882
- var i3 = { boundAttributeSuffix: Z.M, marker: Z.P, markerMatch: Z.A, HTML_RESULT: Z.C, getTemplateHtml: Z.L, overrideDirectiveResolve: (e2, t) => class extends e2 {
2883
- _$AS(e3, r3) {
2884
- return t(this, r3);
2885
- }
2886
- }, patchDirectiveResolve: (e2, t) => {
2887
- if (e2.prototype._$AS.name !== t.name) {
2888
- r2 ??= e2.prototype._$AS.name;
2889
- for (let i4 = e2.prototype; i4 !== Object.prototype; i4 = Object.getPrototypeOf(i4)) if (i4.hasOwnProperty(r2)) return void (i4[r2] = t);
2890
- throw Error("Internal error: It is possible that both dev mode and production mode Lit was mixed together during SSR. Please comment on the issue: https://github.com/lit/lit/issues/4527");
2891
- }
2892
- }, setDirectiveClass(e2, t) {
2893
- e2._$litDirective$ = t;
2894
- }, getAttributePartCommittedValue: (e2, r3, i4) => {
2895
- let o = E;
2896
- return e2.j = (e3) => o = e3, e2._$AI(r3, e2, i4), o;
2897
- }, connectedDisconnectable: (e2) => ({ ...e2, _$AU: true }), resolveDirective: Z.V, AttributePart: Z.H, PropertyPart: Z.B, BooleanAttributePart: Z.N, EventPart: Z.U, ElementPart: Z.F, TemplateInstance: Z.R, isIterable: Z.D, ChildPart: Z.I };
2898
-
2899
2961
  // ../../node_modules/.pnpm/@heximal+templates@0.1.5/node_modules/@heximal/templates/index.js
2900
- var { AttributePart, PropertyPart, BooleanAttributePart, EventPart } = i3;
2962
+ import { _$LH } from "lit-html/private-ssr-support.js";
2963
+ var { AttributePart, PropertyPart, BooleanAttributePart, EventPart } = _$LH;
2901
2964
  var astFactory = new EvalAstFactory();
2902
2965
  var expressionCache = /* @__PURE__ */ new Map();
2903
2966
  var toCamelCase = (s) => s.replace(/-(-|\w)/g, (_, p1) => p1.toUpperCase());
@@ -2931,7 +2994,7 @@ var repeatHandler = (template, model, handlers, renderers) => {
2931
2994
  if (repeatAttribute !== null) {
2932
2995
  const items = getSingleValue(repeatAttribute, model);
2933
2996
  if (!items[Symbol.iterator]) {
2934
- return A;
2997
+ return nothing;
2935
2998
  }
2936
2999
  const litTemplate = getLitTemplate(template);
2937
3000
  let index = -1;
@@ -3134,10 +3197,10 @@ var makeLitTemplate = (template) => {
3134
3197
  }
3135
3198
  const strings = [unescapeBindingMarkers(splitValue[0])];
3136
3199
  const exprs = [];
3137
- for (let i4 = 1; i4 < splitValue.length; i4 += 2) {
3138
- const exprText = splitValue[i4];
3200
+ for (let i = 1; i < splitValue.length; i += 2) {
3201
+ const exprText = splitValue[i];
3139
3202
  exprs.push(parse(exprText, astFactory));
3140
- strings.push(unescapeBindingMarkers(splitValue[i4 + 1]));
3203
+ strings.push(unescapeBindingMarkers(splitValue[i + 1]));
3141
3204
  }
3142
3205
  litTemplate.parts.push({
3143
3206
  type: 1,
@@ -3160,15 +3223,15 @@ var makeLitTemplate = (template) => {
3160
3223
  } else if (hasEscapedBindingMarkers(text)) {
3161
3224
  textNode.textContent = unescapeBindingMarkers(text);
3162
3225
  }
3163
- for (let i4 = 1; i4 < strings.length; i4 += 2) {
3164
- const exprText = strings[i4];
3226
+ for (let i = 1; i < strings.length; i += 2) {
3227
+ const exprText = strings[i];
3165
3228
  const expr = parse(exprText, astFactory);
3166
3229
  litTemplate.parts.push({
3167
3230
  type: 2,
3168
3231
  index: ++nodeIndex,
3169
3232
  update: (model, _handlers) => expr.evaluate(model)
3170
3233
  });
3171
- const newTextNode = new Text(strings[i4 + 1].replace("\\{{", "{{"));
3234
+ const newTextNode = new Text(strings[i + 1].replace("\\{{", "{{"));
3172
3235
  textNode.parentNode.insertBefore(newTextNode, textNode.nextSibling);
3173
3236
  textNode.parentNode.insertBefore(document.createComment(""), textNode.nextSibling);
3174
3237
  textNode = newTextNode;
@@ -3176,20 +3239,21 @@ var makeLitTemplate = (template) => {
3176
3239
  }
3177
3240
  }
3178
3241
  }
3179
- for (const e2 of elementsToRemove) {
3180
- e2.remove();
3242
+ for (const e of elementsToRemove) {
3243
+ e.remove();
3181
3244
  }
3182
3245
  return litTemplate;
3183
3246
  };
3184
3247
 
3185
3248
  // ../qti-test/dist/components/test-paging-buttons-stamp/test-paging-buttons-stamp.js
3249
+ import { consume as consume8 } from "@lit/context";
3186
3250
  var __decorate14 = function(decorators, target, key, desc) {
3187
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3188
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3189
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3190
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3251
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3252
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3253
+ 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;
3254
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3191
3255
  };
3192
- var TestPagingButtonsStamp = class extends i2 {
3256
+ var TestPagingButtonsStamp = class extends LitElement15 {
3193
3257
  #internals;
3194
3258
  createRenderRoot() {
3195
3259
  return this;
@@ -3206,30 +3270,33 @@ var TestPagingButtonsStamp = class extends i2 {
3206
3270
  }
3207
3271
  render() {
3208
3272
  if (!this.computedContext)
3209
- return T``;
3273
+ return html14``;
3210
3274
  const items = this.computedContext.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items));
3211
- return T` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
3275
+ return html14` ${items.map((item) => this.myTemplate({ item, view: this.computedContext.view }))} `;
3212
3276
  }
3213
3277
  };
3214
3278
  __decorate14([
3215
- c({ context: computedContext, subscribe: true })
3279
+ consume8({ context: computedContext, subscribe: true })
3216
3280
  ], TestPagingButtonsStamp.prototype, "computedContext", void 0);
3217
3281
 
3218
3282
  // ../qti-test/dist/components/test-prev/test-prev.js
3283
+ import { css as css9, html as html15, LitElement as LitElement16 } from "lit";
3284
+ import { property as property12 } from "lit/decorators.js";
3285
+ import { consume as consume9 } from "@lit/context";
3219
3286
  var __decorate15 = function(decorators, target, key, desc) {
3220
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3221
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3222
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3223
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3287
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3288
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3289
+ 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;
3290
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3224
3291
  };
3225
- var TestPrev = class extends i2 {
3292
+ var TestPrev = class extends LitElement16 {
3226
3293
  _handleTestElementChange(_oldValue, newValue) {
3227
3294
  if (newValue) {
3228
- this._internalDisabled = false;
3295
+ this.requestUpdate();
3229
3296
  }
3230
3297
  }
3231
3298
  static {
3232
- this.styles = i`
3299
+ this.styles = css9`
3233
3300
  :host {
3234
3301
  ${btn};
3235
3302
  }
@@ -3241,8 +3308,8 @@ var TestPrev = class extends i2 {
3241
3308
  constructor() {
3242
3309
  super();
3243
3310
  this._internalDisabled = true;
3244
- this.addEventListener("click", (e2) => {
3245
- e2.preventDefault();
3311
+ this.addEventListener("click", (e) => {
3312
+ e.preventDefault();
3246
3313
  if (!this._internalDisabled)
3247
3314
  this._requestItem(this.sectionItems[this.itemIndex - 1].identifier);
3248
3315
  });
@@ -3258,7 +3325,10 @@ var TestPrev = class extends i2 {
3258
3325
  this.checkDisabled();
3259
3326
  }
3260
3327
  checkDisabled() {
3261
- this._internalDisabled = !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;
3328
+ const testPart = this.computedContext?.testParts.find((testPart2) => testPart2.active);
3329
+ const activeSection = testPart?.sections.find((s) => s.active);
3330
+ const navigationMode = activeSection?.navigationMode || testPart?.navigationMode || "nonlinear";
3331
+ this._internalDisabled = navigationMode === "linear" || !this.computedContext || this.itemIndex === 0 || this.itemIndex === -1;
3262
3332
  }
3263
3333
  _requestItem(identifier) {
3264
3334
  this.dispatchEvent(new CustomEvent("qti-request-navigation", {
@@ -3271,46 +3341,51 @@ var TestPrev = class extends i2 {
3271
3341
  }));
3272
3342
  }
3273
3343
  render() {
3274
- return T`<slot></slot>`;
3344
+ return html15`<slot></slot>`;
3275
3345
  }
3276
3346
  };
3277
3347
  __decorate15([
3278
- n2({ type: Boolean, reflect: true, attribute: "disabled" })
3348
+ property12({ type: Boolean, reflect: true, attribute: "disabled" })
3279
3349
  ], TestPrev.prototype, "_internalDisabled", void 0);
3280
3350
  __decorate15([
3281
- c({ context: computedContext, subscribe: true })
3351
+ consume9({ context: computedContext, subscribe: true })
3282
3352
  ], TestPrev.prototype, "computedContext", void 0);
3283
3353
  __decorate15([
3284
3354
  watch("computedContext")
3285
3355
  ], TestPrev.prototype, "_handleTestElementChange", null);
3286
3356
 
3287
3357
  // ../qti-test/dist/components/test-print-context/test-print-context.js
3358
+ import { html as html16, LitElement as LitElement17 } from "lit";
3359
+ import { consume as consume10 } from "@lit/context";
3360
+ import { state as state5 } from "lit/decorators.js";
3288
3361
  var __decorate16 = function(decorators, target, key, desc) {
3289
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3290
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3291
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3292
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3362
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3363
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3364
+ 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;
3365
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3293
3366
  };
3294
- var TestPrintContext = class extends i2 {
3367
+ var TestPrintContext = class extends LitElement17 {
3295
3368
  render() {
3296
- return T` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
3369
+ return html16` <small><pre>${JSON.stringify(this.computedContext, null, 2)}</pre></small> `;
3297
3370
  }
3298
3371
  };
3299
3372
  __decorate16([
3300
- r(),
3301
- c({ context: computedContext, subscribe: true })
3373
+ state5(),
3374
+ consume10({ context: computedContext, subscribe: true })
3302
3375
  ], TestPrintContext.prototype, "computedContext", void 0);
3303
3376
 
3304
3377
  // ../qti-test/dist/components/test-print-item-variables/test-print-item-variables.js
3378
+ import { html as html17, css as css10, LitElement as LitElement18 } from "lit";
3379
+ import { consume as consume11 } from "@lit/context";
3305
3380
  var __decorate17 = function(decorators, target, key, desc) {
3306
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3307
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3308
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3309
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3381
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3382
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3383
+ 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;
3384
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3310
3385
  };
3311
- var TestPrintVariables = class extends i2 {
3386
+ var TestPrintVariables = class extends LitElement18 {
3312
3387
  static {
3313
- this.styles = i`
3388
+ this.styles = css10`
3314
3389
  table {
3315
3390
  width: 100%;
3316
3391
  border-collapse: collapse;
@@ -3336,10 +3411,10 @@ var TestPrintVariables = class extends i2 {
3336
3411
  render() {
3337
3412
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
3338
3413
  if (!activeItem || !activeItem.variables)
3339
- return T``;
3414
+ return html17``;
3340
3415
  const responseVariables = activeItem.variables.filter((v) => v.type === "response");
3341
3416
  const outcomeVariables = activeItem.variables.filter((v) => v.type === "outcome");
3342
- const renderTable = (variables, title) => T`
3417
+ const renderTable = (variables, title) => html17`
3343
3418
  <h3>${title}</h3>
3344
3419
  <table>
3345
3420
  <thead>
@@ -3354,9 +3429,9 @@ var TestPrintVariables = class extends i2 {
3354
3429
  <tbody>
3355
3430
  ${variables.map((v) => {
3356
3431
  const correctResponse = v.correctResponse ? Array.isArray(v.correctResponse) ? v.correctResponse.join(", ") : v.correctResponse : "";
3357
- const mapEntries = v.mapping?.mapEntries?.map((m2) => `${m2.mapKey}=${m2.mappedValue}pt`).join(", ") || "";
3358
- const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m2) => `${m2.shape}(${m2.coords})=${m2.mappedValue}pt`).join(", ") || "";
3359
- return T`
3432
+ const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
3433
+ const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
3434
+ return html17`
3360
3435
  <tr>
3361
3436
  <td>${v.identifier}</td>
3362
3437
  <td>${Array.isArray(v.value) ? v.value.join(", ") : v.value}</td>
@@ -3369,23 +3444,26 @@ var TestPrintVariables = class extends i2 {
3369
3444
  </tbody>
3370
3445
  </table>
3371
3446
  `;
3372
- return T`
3447
+ return html17`
3373
3448
  ${renderTable(responseVariables, "Response Variables")} ${renderTable(outcomeVariables, "Outcome Variables")}
3374
3449
  `;
3375
3450
  }
3376
3451
  };
3377
3452
  __decorate17([
3378
- c({ context: computedContext, subscribe: true })
3453
+ consume11({ context: computedContext, subscribe: true })
3379
3454
  ], TestPrintVariables.prototype, "computedContext", void 0);
3380
3455
 
3381
3456
  // ../qti-test/dist/components/test-scoring-buttons/test-scoring-buttons.js
3457
+ import { html as html18, LitElement as LitElement19, nothing as nothing2 } from "lit";
3458
+ import { consume as consume12 } from "@lit/context";
3459
+ import { property as property13 } from "lit/decorators.js";
3382
3460
  var __decorate18 = function(decorators, target, key, desc) {
3383
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3384
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3385
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3386
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3461
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3462
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3463
+ 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;
3464
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3387
3465
  };
3388
- var TestScoringButtons = class extends i2 {
3466
+ var TestScoringButtons = class extends LitElement19 {
3389
3467
  createRenderRoot() {
3390
3468
  return this;
3391
3469
  }
@@ -3414,23 +3492,23 @@ var TestScoringButtons = class extends i2 {
3414
3492
  render() {
3415
3493
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
3416
3494
  if (!activeItem || !activeItem.variables)
3417
- return T``;
3495
+ return html18``;
3418
3496
  const maxScore = activeItem.variables.find((vr) => vr.identifier == "MAXSCORE")?.value;
3419
3497
  const scoreOutcome = activeItem.variables.find((vr) => vr.identifier == "SCORE");
3420
3498
  const score = scoreOutcome?.value;
3421
3499
  const disabled = !(scoreOutcome?.externalScored === "human");
3422
3500
  if (!maxScore || !scoreOutcome)
3423
- return A;
3501
+ return nothing2;
3424
3502
  const scores = [...Array(Number(maxScore) + 1).keys()];
3425
- return T`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : A}`;
3503
+ return html18`${this.myTemplate ? this.myTemplate({ scores, score, disabled }) : nothing2}`;
3426
3504
  }
3427
3505
  constructor() {
3428
3506
  super();
3429
3507
  this.view = "";
3430
3508
  this.disabled = false;
3431
3509
  this.myTemplate = null;
3432
- this.addEventListener("click", (e2) => {
3433
- const target = e2.target;
3510
+ this.addEventListener("click", (e) => {
3511
+ const target = e.target;
3434
3512
  const value = parseFloat(target.value);
3435
3513
  if (target.tagName === "INPUT") {
3436
3514
  this.#changeOutcomeScore(value);
@@ -3439,23 +3517,26 @@ var TestScoringButtons = class extends i2 {
3439
3517
  }
3440
3518
  };
3441
3519
  __decorate18([
3442
- n2({ type: String, attribute: "view" })
3520
+ property13({ type: String, attribute: "view" })
3443
3521
  ], TestScoringButtons.prototype, "view", void 0);
3444
3522
  __decorate18([
3445
- n2({ type: Boolean })
3523
+ property13({ type: Boolean })
3446
3524
  ], TestScoringButtons.prototype, "disabled", void 0);
3447
3525
  __decorate18([
3448
- c({ context: computedContext, subscribe: true })
3526
+ consume12({ context: computedContext, subscribe: true })
3449
3527
  ], TestScoringButtons.prototype, "computedContext", void 0);
3450
3528
 
3451
3529
  // ../qti-test/dist/components/test-scoring-feedback/test-scoring-feedback.js
3530
+ import { consume as consume13 } from "@lit/context";
3531
+ import { html as html19, LitElement as LitElement20 } from "lit";
3532
+ import { property as property14 } from "lit/decorators.js";
3452
3533
  var __decorate19 = function(decorators, target, key, desc) {
3453
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3454
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3455
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3456
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3534
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3535
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3536
+ 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;
3537
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3457
3538
  };
3458
- var TestScoringFeedback = class extends i2 {
3539
+ var TestScoringFeedback = class extends LitElement20 {
3459
3540
  constructor() {
3460
3541
  super(...arguments);
3461
3542
  this.view = null;
@@ -3463,9 +3544,9 @@ var TestScoringFeedback = class extends i2 {
3463
3544
  render() {
3464
3545
  const activeItem = this.computedContext?.testParts.flatMap((testPart) => testPart.sections.flatMap((section) => section.items)).find((item) => item.active);
3465
3546
  if (!activeItem || !activeItem.variables)
3466
- return T``;
3547
+ return html19``;
3467
3548
  if (activeItem["category"] === "dep-informational")
3468
- return T`<div>${this.dataset.informational}</div>`;
3549
+ return html19`<div>${this.dataset.informational}</div>`;
3469
3550
  const completionStatus = activeItem?.variables.find((v) => v.identifier === "completionStatus")?.value;
3470
3551
  const scoreOutcome = activeItem?.variables.find((vr) => vr.identifier == "SCORE");
3471
3552
  const score = parseFloat(scoreOutcome?.value);
@@ -3485,24 +3566,26 @@ var TestScoringFeedback = class extends i2 {
3485
3566
  }
3486
3567
  return this.dataset.inProgress;
3487
3568
  };
3488
- return T`<div>${feedbackText()}</div>`;
3569
+ return html19`<div>${feedbackText()}</div>`;
3489
3570
  }
3490
3571
  };
3491
3572
  __decorate19([
3492
- c({ context: computedContext, subscribe: true })
3573
+ consume13({ context: computedContext, subscribe: true })
3493
3574
  ], TestScoringFeedback.prototype, "computedContext", void 0);
3494
3575
  __decorate19([
3495
- n2({ type: String, attribute: "view" })
3576
+ property14({ type: String, attribute: "view" })
3496
3577
  ], TestScoringFeedback.prototype, "view", void 0);
3497
3578
 
3498
3579
  // ../qti-test/dist/components/test-section-buttons-stamp/test-section-buttons-stamp.js
3580
+ import { html as html20, LitElement as LitElement21 } from "lit";
3581
+ import { consume as consume14 } from "@lit/context";
3499
3582
  var __decorate20 = function(decorators, target, key, desc) {
3500
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3501
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3502
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3503
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3583
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3584
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3585
+ 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;
3586
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3504
3587
  };
3505
- var TestSectionButtonsStamp = class extends i2 {
3588
+ var TestSectionButtonsStamp = class extends LitElement21 {
3506
3589
  #internals;
3507
3590
  createRenderRoot() {
3508
3591
  return this;
@@ -3519,25 +3602,27 @@ var TestSectionButtonsStamp = class extends i2 {
3519
3602
  }
3520
3603
  render() {
3521
3604
  if (!this.computedContext)
3522
- return T``;
3605
+ return html20``;
3523
3606
  const sections = this.computedContext.testParts.flatMap((testPart) => testPart.sections);
3524
- return T` ${sections.map((item) => this.myTemplate({ item }))} `;
3607
+ return html20` ${sections.map((item) => this.myTemplate({ item }))} `;
3525
3608
  }
3526
3609
  };
3527
3610
  __decorate20([
3528
- c({ context: computedContext, subscribe: true })
3611
+ consume14({ context: computedContext, subscribe: true })
3529
3612
  ], TestSectionButtonsStamp.prototype, "computedContext", void 0);
3530
3613
 
3531
3614
  // ../qti-test/dist/components/test-section-link/test-section-link.js
3615
+ import { css as css11, html as html21, LitElement as LitElement22 } from "lit";
3616
+ import { property as property15 } from "lit/decorators.js";
3532
3617
  var __decorate21 = function(decorators, target, key, desc) {
3533
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3534
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3535
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3536
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3618
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3619
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3620
+ 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;
3621
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3537
3622
  };
3538
- var TestSectionLink = class extends i2 {
3623
+ var TestSectionLink = class extends LitElement22 {
3539
3624
  static {
3540
- this.styles = i`
3625
+ this.styles = css11`
3541
3626
  :host {
3542
3627
  ${btn};
3543
3628
  }
@@ -3562,21 +3647,24 @@ var TestSectionLink = class extends i2 {
3562
3647
  this.addEventListener("click", () => this.#requestItem(this.sectionId));
3563
3648
  }
3564
3649
  render() {
3565
- return T` <slot></slot> `;
3650
+ return html21` <slot></slot> `;
3566
3651
  }
3567
3652
  };
3568
3653
  __decorate21([
3569
- n2({ type: String, attribute: "section-id" })
3654
+ property15({ type: String, attribute: "section-id" })
3570
3655
  ], TestSectionLink.prototype, "sectionId", void 0);
3571
3656
 
3572
3657
  // ../qti-test/dist/components/test-stamp/test-stamp.js
3658
+ import { html as html22, LitElement as LitElement23, nothing as nothing3 } from "lit";
3659
+ import { property as property16, state as state6 } from "lit/decorators.js";
3660
+ import { consume as consume15 } from "@lit/context";
3573
3661
  var __decorate22 = function(decorators, target, key, desc) {
3574
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3575
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3576
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3577
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3662
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3663
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3664
+ 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;
3665
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3578
3666
  };
3579
- var TestStamp = class extends i2 {
3667
+ var TestStamp = class extends LitElement23 {
3580
3668
  constructor() {
3581
3669
  super(...arguments);
3582
3670
  this.debug = false;
@@ -3639,30 +3727,33 @@ var TestStamp = class extends i2 {
3639
3727
  }));
3640
3728
  }
3641
3729
  render() {
3642
- return T` ${this.debug ? T`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : A}
3643
- ${this.myTemplate ? this.myTemplate(this.stampContext) : A}`;
3730
+ return html22` ${this.debug ? html22`<small><pre>${JSON.stringify(this.stampContext, null, 2)}</pre></small>` : nothing3}
3731
+ ${this.myTemplate ? this.myTemplate(this.stampContext) : nothing3}`;
3644
3732
  }
3645
3733
  };
3646
3734
  __decorate22([
3647
- n2({ type: Boolean, reflect: true })
3735
+ property16({ type: Boolean, reflect: true })
3648
3736
  ], TestStamp.prototype, "debug", void 0);
3649
3737
  __decorate22([
3650
- r(),
3651
- c({ context: computedContext, subscribe: true })
3738
+ state6(),
3739
+ consume15({ context: computedContext, subscribe: true })
3652
3740
  ], TestStamp.prototype, "computedContext", void 0);
3653
3741
  __decorate22([
3654
- r()
3742
+ state6()
3655
3743
  ], TestStamp.prototype, "stampContext", void 0);
3656
3744
 
3657
3745
  // ../qti-test/dist/components/test-view-toggle/test-view.js
3746
+ import { html as html23, LitElement as LitElement24 } from "lit";
3747
+ import { property as property17, state as state7 } from "lit/decorators.js";
3748
+ import { consume as consume16 } from "@lit/context";
3658
3749
  var __decorate23 = function(decorators, target, key, desc) {
3659
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3660
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3661
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3662
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3750
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3751
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3752
+ 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;
3753
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3663
3754
  };
3664
3755
  var _a;
3665
- var TestView = class extends i2 {
3756
+ var TestView = class extends LitElement24 {
3666
3757
  constructor() {
3667
3758
  super(...arguments);
3668
3759
  this.label = "view";
@@ -3694,46 +3785,48 @@ var TestView = class extends i2 {
3694
3785
  }));
3695
3786
  }
3696
3787
  render() {
3697
- return T`
3788
+ return html23`
3698
3789
  <label part="label" for="viewSelect">${this.label}</label>
3699
3790
  <select
3700
3791
  part="select"
3701
3792
  id="viewSelect"
3702
- @change=${(e2) => {
3703
- const el = e2.target;
3793
+ @change=${(e) => {
3794
+ const el = e.target;
3704
3795
  this._switchView(el.value);
3705
3796
  }}
3706
3797
  >
3707
- ${this._viewOptions.map((v) => T`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
3798
+ ${this._viewOptions.map((v) => html23`<option value="${v}" ?selected=${v === this.sessionContext.view}>${v}</option>`)}
3708
3799
  </select>
3709
3800
  `;
3710
3801
  }
3711
3802
  };
3712
3803
  _a = TestView;
3713
3804
  __decorate23([
3714
- c({ context: sessionContext, subscribe: true })
3805
+ consume16({ context: sessionContext, subscribe: true })
3715
3806
  ], TestView.prototype, "sessionContext", void 0);
3716
3807
  __decorate23([
3717
- n2({ type: String })
3808
+ property17({ type: String })
3718
3809
  ], TestView.prototype, "label", void 0);
3719
3810
  __decorate23([
3720
- n2({ type: String, attribute: "view-options" })
3811
+ property17({ type: String, attribute: "view-options" })
3721
3812
  ], TestView.prototype, "viewOptions", void 0);
3722
3813
  __decorate23([
3723
3814
  watch("viewOptions", { waitUntilFirstUpdate: true })
3724
3815
  ], TestView.prototype, "_handleViewOptionsChange", void 0);
3725
3816
  __decorate23([
3726
- r()
3817
+ state7()
3727
3818
  ], TestView.prototype, "_viewOptions", void 0);
3728
3819
 
3729
3820
  // ../qti-test/dist/components/test-view-toggle/test-view-toggle.js
3821
+ import { consume as consume17 } from "@lit/context";
3822
+ import { html as html24, LitElement as LitElement25, nothing as nothing4 } from "lit";
3730
3823
  var __decorate24 = function(decorators, target, key, desc) {
3731
- var c2 = arguments.length, r3 = c2 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3732
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc);
3733
- else for (var i4 = decorators.length - 1; i4 >= 0; i4--) if (d = decorators[i4]) r3 = (c2 < 3 ? d(r3) : c2 > 3 ? d(target, key, r3) : d(target, key)) || r3;
3734
- return c2 > 3 && r3 && Object.defineProperty(target, key, r3), r3;
3824
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3825
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3826
+ 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;
3827
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3735
3828
  };
3736
- var TestViewToggle = class extends i2 {
3829
+ var TestViewToggle = class extends LitElement25 {
3737
3830
  createRenderRoot() {
3738
3831
  return this;
3739
3832
  }
@@ -3763,13 +3856,13 @@ var TestViewToggle = class extends i2 {
3763
3856
  });
3764
3857
  }
3765
3858
  render() {
3766
- return T`${this.myTemplate ? this.myTemplate({
3859
+ return html24`${this.myTemplate ? this.myTemplate({
3767
3860
  view: this.sessionContext?.view
3768
- }) : A}`;
3861
+ }) : nothing4}`;
3769
3862
  }
3770
3863
  };
3771
3864
  __decorate24([
3772
- c({ context: sessionContext, subscribe: true })
3865
+ consume17({ context: sessionContext, subscribe: true })
3773
3866
  ], TestViewToggle.prototype, "sessionContext", void 0);
3774
3867
 
3775
3868
  // ../qti-test/dist/elements.js
@@ -3857,12 +3950,5 @@ export {
3857
3950
  * @license
3858
3951
  * Portions Copyright (c) 2013, the Dart project authors.
3859
3952
  *)
3860
-
3861
- lit-html/node/private-ssr-support.js:
3862
- (**
3863
- * @license
3864
- * Copyright 2019 Google LLC
3865
- * SPDX-License-Identifier: BSD-3-Clause
3866
- *)
3867
3953
  */
3868
- //# sourceMappingURL=chunk-RXGDQDOV.js.map
3954
+ //# sourceMappingURL=chunk-HBSWJC3B.js.map