@jspsych/plugin-tobii-validation 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.js ADDED
@@ -0,0 +1,738 @@
1
+ /**
2
+ * @title Tobii Validation
3
+ * @description jsPsych plugin for Tobii eye tracker validation. Validates calibration
4
+ * accuracy by measuring gaze error at target points and provides detailed feedback.
5
+ * @version 1.0.0
6
+ * @author jsPsych Team
7
+ * @see {@link https://github.com/jspsych/jspsych-tobii/tree/main/packages/plugin-tobii-validation#readme Documentation}
8
+ */
9
+ import { ParameterType } from 'jspsych';
10
+ import { version } from '../package.json';
11
+ import { ValidationDisplay } from './validation-display';
12
+ const info = {
13
+ name: 'tobii-validation',
14
+ version: version,
15
+ parameters: {
16
+ /** Number of validation points (5 or 9) */
17
+ validation_points: {
18
+ type: ParameterType.INT,
19
+ default: 9,
20
+ },
21
+ /** Size of validation points in pixels */
22
+ point_size: {
23
+ type: ParameterType.INT,
24
+ default: 20,
25
+ },
26
+ /** Color of validation points */
27
+ point_color: {
28
+ type: ParameterType.STRING,
29
+ default: '#00ff00',
30
+ },
31
+ /** Duration to collect data at each point (ms) */
32
+ collection_duration: {
33
+ type: ParameterType.INT,
34
+ default: 1000,
35
+ },
36
+ /** Show progress indicator */
37
+ show_progress: {
38
+ type: ParameterType.BOOL,
39
+ default: true,
40
+ },
41
+ /** Custom validation points */
42
+ custom_points: {
43
+ type: ParameterType.COMPLEX,
44
+ default: null,
45
+ },
46
+ /** Show visual feedback */
47
+ show_feedback: {
48
+ type: ParameterType.BOOL,
49
+ default: true,
50
+ },
51
+ /** Instructions text */
52
+ instructions: {
53
+ type: ParameterType.STRING,
54
+ default: 'Look at each point as it appears on the screen to validate calibration accuracy.',
55
+ },
56
+ /** Background color of the validation container */
57
+ background_color: {
58
+ type: ParameterType.STRING,
59
+ default: '#808080',
60
+ },
61
+ /** Primary button color */
62
+ button_color: {
63
+ type: ParameterType.STRING,
64
+ default: '#28a745',
65
+ },
66
+ /** Primary button hover color */
67
+ button_hover_color: {
68
+ type: ParameterType.STRING,
69
+ default: '#218838',
70
+ },
71
+ /** Retry button color */
72
+ retry_button_color: {
73
+ type: ParameterType.STRING,
74
+ default: '#dc3545',
75
+ },
76
+ /** Retry button hover color */
77
+ retry_button_hover_color: {
78
+ type: ParameterType.STRING,
79
+ default: '#c82333',
80
+ },
81
+ /** Success message color */
82
+ success_color: {
83
+ type: ParameterType.STRING,
84
+ default: '#28a745',
85
+ },
86
+ /** Error message color */
87
+ error_color: {
88
+ type: ParameterType.STRING,
89
+ default: '#dc3545',
90
+ },
91
+ /** Normalized tolerance for acceptable accuracy (0-1 scale, validation passes if average error <= this) */
92
+ tolerance: {
93
+ type: ParameterType.FLOAT,
94
+ default: 0.05,
95
+ },
96
+ /** Maximum number of retry attempts allowed on validation failure */
97
+ max_retries: {
98
+ type: ParameterType.INT,
99
+ default: 1,
100
+ },
101
+ /** Duration of zoom in/out animations in ms */
102
+ zoom_duration: {
103
+ type: ParameterType.INT,
104
+ default: 300,
105
+ },
106
+ },
107
+ data: {
108
+ /** Validation success status */
109
+ validation_success: {
110
+ type: ParameterType.BOOL,
111
+ },
112
+ /** Average accuracy */
113
+ average_accuracy: {
114
+ type: ParameterType.FLOAT,
115
+ },
116
+ /** Average precision */
117
+ average_precision: {
118
+ type: ParameterType.FLOAT,
119
+ },
120
+ /** Number of validation points used */
121
+ num_points: {
122
+ type: ParameterType.INT,
123
+ },
124
+ /** Full validation result data */
125
+ validation_data: {
126
+ type: ParameterType.COMPLEX,
127
+ },
128
+ /** Normalized tolerance used for pass/fail determination */
129
+ tolerance: {
130
+ type: ParameterType.FLOAT,
131
+ },
132
+ /** Number of validation attempts made */
133
+ num_attempts: {
134
+ type: ParameterType.INT,
135
+ },
136
+ },
137
+ };
138
+ class TobiiValidationPlugin {
139
+ constructor(jsPsych) {
140
+ this.jsPsych = jsPsych;
141
+ }
142
+ static removeStyles() {
143
+ const el = document.getElementById('tobii-validation-styles');
144
+ if (el) {
145
+ el.remove();
146
+ }
147
+ }
148
+ injectStyles(trial) {
149
+ // Remove existing styles so each trial gets its own colors
150
+ TobiiValidationPlugin.removeStyles();
151
+ const css = `
152
+ .tobii-validation-container {
153
+ position: fixed;
154
+ top: 0;
155
+ left: 0;
156
+ width: 100%;
157
+ height: 100%;
158
+ background-color: ${trial.background_color};
159
+ font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
160
+ z-index: 9999;
161
+ }
162
+
163
+ .tobii-validation-instructions {
164
+ position: absolute;
165
+ top: 50%;
166
+ left: 50%;
167
+ transform: translate(-50%, -50%);
168
+ background-color: white;
169
+ padding: 40px;
170
+ border-radius: 10px;
171
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
172
+ text-align: center;
173
+ max-width: 600px;
174
+ }
175
+
176
+ .tobii-validation-instructions h2 {
177
+ margin-top: 0;
178
+ margin-bottom: 20px;
179
+ font-size: 24px;
180
+ color: #333;
181
+ }
182
+
183
+ .tobii-validation-instructions p {
184
+ margin-bottom: 20px;
185
+ font-size: 16px;
186
+ line-height: 1.5;
187
+ color: #666;
188
+ }
189
+
190
+ .validation-start-btn,
191
+ .validation-continue-btn,
192
+ .validation-retry-btn {
193
+ background-color: ${trial.button_color};
194
+ color: white;
195
+ border: none;
196
+ padding: 12px 30px;
197
+ font-size: 16px;
198
+ border-radius: 5px;
199
+ cursor: pointer;
200
+ transition: background-color 0.3s;
201
+ }
202
+
203
+ .validation-start-btn:hover,
204
+ .validation-continue-btn:hover {
205
+ background-color: ${trial.button_hover_color};
206
+ }
207
+
208
+ .validation-retry-btn {
209
+ background-color: ${trial.retry_button_color};
210
+ }
211
+
212
+ .validation-retry-btn:hover {
213
+ background-color: ${trial.retry_button_hover_color};
214
+ }
215
+
216
+ .tobii-validation-point {
217
+ position: absolute;
218
+ border-radius: 50%;
219
+ transform: translate(-50%, -50%);
220
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
221
+ }
222
+
223
+ .tobii-validation-point.animation-zoom-out {
224
+ animation: tobii-validation-zoom-out ${trial.zoom_duration / 1000}s ease-out forwards;
225
+ }
226
+
227
+ @keyframes tobii-validation-zoom-out {
228
+ 0% {
229
+ transform: translate(-50%, -50%) scale(1);
230
+ }
231
+ 100% {
232
+ transform: translate(-50%, -50%) scale(2.5);
233
+ }
234
+ }
235
+
236
+ .tobii-validation-point.animation-zoom-in {
237
+ animation: tobii-validation-zoom-in ${trial.zoom_duration / 1000}s ease-out forwards;
238
+ }
239
+
240
+ @keyframes tobii-validation-zoom-in {
241
+ 0% {
242
+ transform: translate(-50%, -50%) scale(2.5);
243
+ }
244
+ 100% {
245
+ transform: translate(-50%, -50%) scale(1);
246
+ }
247
+ }
248
+
249
+ .tobii-validation-progress {
250
+ position: fixed;
251
+ top: 20px;
252
+ left: 50%;
253
+ transform: translateX(-50%);
254
+ background-color: rgba(0, 0, 0, 0.7);
255
+ color: white;
256
+ padding: 10px 20px;
257
+ border-radius: 5px;
258
+ font-size: 14px;
259
+ z-index: 10000;
260
+ }
261
+
262
+ .tobii-validation-result {
263
+ position: absolute;
264
+ top: 50%;
265
+ left: 50%;
266
+ transform: translate(-50%, -50%);
267
+ background-color: white;
268
+ padding: 30px 40px;
269
+ border-radius: 10px;
270
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
271
+ text-align: center;
272
+ width: 60vw;
273
+ max-width: 800px;
274
+ max-height: 85vh;
275
+ overflow-y: auto;
276
+ }
277
+
278
+ .tobii-validation-result-content h2 {
279
+ margin-top: 0;
280
+ margin-bottom: 20px;
281
+ font-size: 24px;
282
+ }
283
+
284
+ .tobii-validation-result-content.success h2 {
285
+ color: ${trial.success_color};
286
+ }
287
+
288
+ .tobii-validation-result-content.error h2 {
289
+ color: ${trial.error_color};
290
+ }
291
+
292
+ .tobii-validation-result-content p {
293
+ margin-bottom: 15px;
294
+ font-size: 16px;
295
+ color: #666;
296
+ }
297
+
298
+ .validation-feedback {
299
+ margin: 30px 0;
300
+ }
301
+
302
+ .validation-feedback h3 {
303
+ margin-bottom: 15px;
304
+ font-size: 18px;
305
+ color: #333;
306
+ }
307
+
308
+ .feedback-canvas {
309
+ position: relative;
310
+ width: 100%;
311
+ height: 300px;
312
+ background-color: #f0f0f0;
313
+ border: 2px solid #ddd;
314
+ border-radius: 5px;
315
+ margin-bottom: 15px;
316
+ }
317
+
318
+ .feedback-point {
319
+ position: absolute;
320
+ width: 20px;
321
+ height: 20px;
322
+ border-radius: 50%;
323
+ transform: translate(-50%, -50%);
324
+ border: 2px solid #333;
325
+ cursor: help;
326
+ }
327
+
328
+ .feedback-legend {
329
+ display: flex;
330
+ justify-content: center;
331
+ gap: 20px;
332
+ font-size: 14px;
333
+ color: #666;
334
+ }
335
+
336
+ .feedback-legend span {
337
+ display: flex;
338
+ align-items: center;
339
+ gap: 5px;
340
+ }
341
+
342
+ .legend-color {
343
+ display: inline-block;
344
+ width: 15px;
345
+ height: 15px;
346
+ border-radius: 50%;
347
+ border: 1px solid #333;
348
+ }
349
+
350
+ .target-legend {
351
+ background-color: transparent;
352
+ border: 3px solid #333;
353
+ }
354
+
355
+ .feedback-canvas-fullscreen {
356
+ position: relative;
357
+ width: 100%;
358
+ background-color: #2a2a2a;
359
+ border: 2px solid #444;
360
+ border-radius: 5px;
361
+ margin-bottom: 15px;
362
+ overflow: hidden;
363
+ }
364
+
365
+ .feedback-target {
366
+ position: absolute;
367
+ width: 24px;
368
+ height: 24px;
369
+ border-radius: 50%;
370
+ transform: translate(-50%, -50%);
371
+ border: 3px solid #fff;
372
+ background-color: transparent;
373
+ z-index: 10;
374
+ display: flex;
375
+ align-items: center;
376
+ justify-content: center;
377
+ }
378
+
379
+ .target-label {
380
+ color: #fff;
381
+ font-size: 10px;
382
+ font-weight: bold;
383
+ }
384
+
385
+ .feedback-gaze {
386
+ position: absolute;
387
+ width: 20px;
388
+ height: 20px;
389
+ border-radius: 50%;
390
+ transform: translate(-50%, -50%);
391
+ border: 2px solid;
392
+ z-index: 11;
393
+ display: flex;
394
+ align-items: center;
395
+ justify-content: center;
396
+ cursor: help;
397
+ }
398
+
399
+ .gaze-label {
400
+ color: #000;
401
+ font-size: 9px;
402
+ font-weight: bold;
403
+ }
404
+
405
+ .feedback-sample {
406
+ position: absolute;
407
+ width: 4px;
408
+ height: 4px;
409
+ border-radius: 50%;
410
+ transform: translate(-50%, -50%);
411
+ background-color: rgba(100, 100, 255, 0.4);
412
+ z-index: 5;
413
+ }
414
+
415
+ .accuracy-table {
416
+ width: 100%;
417
+ border-collapse: collapse;
418
+ margin-top: 15px;
419
+ font-size: 13px;
420
+ text-align: left;
421
+ }
422
+
423
+ .accuracy-table th,
424
+ .accuracy-table td {
425
+ padding: 8px 12px;
426
+ border: 1px solid #ddd;
427
+ }
428
+
429
+ .accuracy-table th {
430
+ background-color: #f5f5f5;
431
+ font-weight: 600;
432
+ color: #333;
433
+ }
434
+
435
+ .accuracy-table tr:nth-child(even) {
436
+ background-color: #fafafa;
437
+ }
438
+
439
+ .accuracy-table td {
440
+ color: #555;
441
+ }
442
+
443
+ .saccade-note {
444
+ font-size: 12px;
445
+ color: #888;
446
+ font-style: italic;
447
+ margin-top: 10px;
448
+ }
449
+
450
+ .tolerance-info {
451
+ font-size: 14px;
452
+ color: #666;
453
+ }
454
+
455
+ .gaze-pass-legend {
456
+ background-color: #4ade80;
457
+ }
458
+
459
+ .gaze-fail-legend {
460
+ background-color: #f87171;
461
+ }
462
+
463
+ .feedback-gaze.gaze-pass {
464
+ background-color: #4ade80;
465
+ border-color: #22c55e;
466
+ }
467
+
468
+ .feedback-gaze.gaze-fail {
469
+ background-color: #f87171;
470
+ border-color: #ef4444;
471
+ }
472
+
473
+ .feedback-sample.sample-pass {
474
+ background-color: rgba(74, 222, 128, 0.5);
475
+ }
476
+
477
+ .feedback-sample.sample-fail {
478
+ background-color: rgba(248, 113, 113, 0.5);
479
+ }
480
+ `;
481
+ const styleElement = document.createElement('style');
482
+ styleElement.id = 'tobii-validation-styles';
483
+ styleElement.textContent = css;
484
+ document.head.appendChild(styleElement);
485
+ }
486
+ async trial(display_element, trial) {
487
+ // Inject styles
488
+ this.injectStyles(trial);
489
+ // Get extension instance
490
+ const tobiiExt = this.jsPsych.extensions.tobii;
491
+ if (!tobiiExt) {
492
+ throw new Error('Tobii extension not initialized');
493
+ }
494
+ // Check connection
495
+ if (!tobiiExt.isConnected()) {
496
+ throw new Error('Not connected to Tobii server');
497
+ }
498
+ // Create validation display
499
+ const validationDisplay = new ValidationDisplay(display_element, trial);
500
+ // Show instructions (only once, before retry loop)
501
+ await validationDisplay.showInstructions();
502
+ // Get validation points and validate custom points
503
+ let points;
504
+ if (trial.custom_points) {
505
+ points = this.validateCustomPoints(trial.custom_points);
506
+ }
507
+ else {
508
+ points = this.getValidationPoints(trial.validation_points);
509
+ }
510
+ const maxAttempts = 1 + trial.max_retries;
511
+ let attempt = 0;
512
+ let validationPassed = false;
513
+ let avgAccuracyNorm = 0;
514
+ let avgPrecisionNorm = 0;
515
+ let validationResult = { success: false };
516
+ try {
517
+ // Retry loop
518
+ while (attempt < maxAttempts) {
519
+ attempt++;
520
+ const retriesRemaining = maxAttempts - attempt;
521
+ // Start validation on server (resets server-side state on each call)
522
+ await tobiiExt.startValidation();
523
+ // Start tracking to collect gaze data
524
+ await tobiiExt.startTracking();
525
+ // Initialize point at screen center (with brief pause)
526
+ await validationDisplay.initializePoint();
527
+ // Show each point and collect validation data with smooth path animation
528
+ for (let i = 0; i < points.length; i++) {
529
+ const point = points[i];
530
+ // Travel to the point location (smooth animation from current position)
531
+ await validationDisplay.travelToPoint(point, i, points.length);
532
+ // Zoom out (point grows larger to attract attention)
533
+ await validationDisplay.playZoomOut();
534
+ // Zoom in (point shrinks to fixation size)
535
+ await validationDisplay.playZoomIn();
536
+ // Capture start time before collection period for precise time-range query
537
+ const collectionStartTime = performance.now();
538
+ // Wait for data collection
539
+ await this.delay(trial.collection_duration);
540
+ // Capture end time after collection period
541
+ const collectionEndTime = performance.now();
542
+ // Get gaze samples collected during exactly this point's display period
543
+ const gazeSamples = await tobiiExt.getGazeData(collectionStartTime, collectionEndTime);
544
+ // Collect validation data for this point with the gaze samples
545
+ await tobiiExt.collectValidationPoint(point.x, point.y, gazeSamples);
546
+ // Reset point for next travel (don't remove element)
547
+ if (i < points.length - 1) {
548
+ await validationDisplay.resetPointForTravel();
549
+ }
550
+ }
551
+ // Hide point after final data collection
552
+ await validationDisplay.hidePoint();
553
+ // Stop tracking
554
+ await tobiiExt.stopTracking();
555
+ // Compute validation on server
556
+ validationResult = await tobiiExt.computeValidation();
557
+ // Get normalized accuracy values from server
558
+ avgAccuracyNorm = validationResult.averageAccuracyNorm || 0;
559
+ avgPrecisionNorm = validationResult.averagePrecisionNorm || 0;
560
+ // Determine if validation passes based on normalized tolerance
561
+ validationPassed = validationResult.success && avgAccuracyNorm <= trial.tolerance;
562
+ // Show result with retry option if retries remain
563
+ const userChoice = await validationDisplay.showResult(validationPassed, avgAccuracyNorm, avgPrecisionNorm, validationResult.pointData || [], trial.tolerance, retriesRemaining > 0);
564
+ if (userChoice === 'continue') {
565
+ break;
566
+ }
567
+ // User chose retry — reset display for next attempt
568
+ validationDisplay.resetForRetry();
569
+ }
570
+ }
571
+ finally {
572
+ // Clear display and remove injected styles
573
+ validationDisplay.clear();
574
+ display_element.innerHTML = '';
575
+ TobiiValidationPlugin.removeStyles();
576
+ }
577
+ // Finish trial
578
+ const trial_data = {
579
+ validation_success: validationPassed,
580
+ average_accuracy: avgAccuracyNorm,
581
+ average_precision: avgPrecisionNorm,
582
+ tolerance: trial.tolerance,
583
+ num_points: points.length,
584
+ validation_data: validationResult,
585
+ num_attempts: attempt,
586
+ };
587
+ this.jsPsych.finishTrial(trial_data);
588
+ }
589
+ /**
590
+ * Validate custom validation points
591
+ */
592
+ validateCustomPoints(points) {
593
+ if (!Array.isArray(points) || points.length === 0) {
594
+ throw new Error('custom_points must be a non-empty array');
595
+ }
596
+ const validated = [];
597
+ for (let i = 0; i < points.length; i++) {
598
+ const point = points[i];
599
+ if (typeof point !== 'object' ||
600
+ point === null ||
601
+ typeof point.x !== 'number' ||
602
+ typeof point.y !== 'number') {
603
+ throw new Error(`Invalid validation point at index ${i}: must have numeric x and y`);
604
+ }
605
+ if (point.x < 0 || point.x > 1 || point.y < 0 || point.y > 1) {
606
+ throw new Error(`Validation point at index ${i} out of range: x and y must be between 0 and 1`);
607
+ }
608
+ validated.push({ x: point.x, y: point.y });
609
+ }
610
+ return validated;
611
+ }
612
+ /**
613
+ * Get standard validation points for the given grid size
614
+ */
615
+ getValidationPoints(count) {
616
+ switch (count) {
617
+ case 5:
618
+ return [
619
+ { x: 0.1, y: 0.1 },
620
+ { x: 0.9, y: 0.1 },
621
+ { x: 0.5, y: 0.5 },
622
+ { x: 0.1, y: 0.9 },
623
+ { x: 0.9, y: 0.9 },
624
+ ];
625
+ case 9:
626
+ return [
627
+ { x: 0.1, y: 0.1 },
628
+ { x: 0.5, y: 0.1 },
629
+ { x: 0.9, y: 0.1 },
630
+ { x: 0.1, y: 0.5 },
631
+ { x: 0.5, y: 0.5 },
632
+ { x: 0.9, y: 0.5 },
633
+ { x: 0.1, y: 0.9 },
634
+ { x: 0.5, y: 0.9 },
635
+ { x: 0.9, y: 0.9 },
636
+ ];
637
+ case 13:
638
+ // 3x3 outer grid + 4 diagonal midpoints
639
+ return [
640
+ { x: 0.1, y: 0.1 },
641
+ { x: 0.5, y: 0.1 },
642
+ { x: 0.9, y: 0.1 },
643
+ { x: 0.3, y: 0.3 },
644
+ { x: 0.7, y: 0.3 },
645
+ { x: 0.1, y: 0.5 },
646
+ { x: 0.5, y: 0.5 },
647
+ { x: 0.9, y: 0.5 },
648
+ { x: 0.3, y: 0.7 },
649
+ { x: 0.7, y: 0.7 },
650
+ { x: 0.1, y: 0.9 },
651
+ { x: 0.5, y: 0.9 },
652
+ { x: 0.9, y: 0.9 },
653
+ ];
654
+ case 15:
655
+ // 5 rows x 3 columns
656
+ return [
657
+ { x: 0.1, y: 0.1 },
658
+ { x: 0.5, y: 0.1 },
659
+ { x: 0.9, y: 0.1 },
660
+ { x: 0.1, y: 0.3 },
661
+ { x: 0.5, y: 0.3 },
662
+ { x: 0.9, y: 0.3 },
663
+ { x: 0.1, y: 0.5 },
664
+ { x: 0.5, y: 0.5 },
665
+ { x: 0.9, y: 0.5 },
666
+ { x: 0.1, y: 0.7 },
667
+ { x: 0.5, y: 0.7 },
668
+ { x: 0.9, y: 0.7 },
669
+ { x: 0.1, y: 0.9 },
670
+ { x: 0.5, y: 0.9 },
671
+ { x: 0.9, y: 0.9 },
672
+ ];
673
+ case 19:
674
+ // Symmetric 3-5-3-5-3 pattern
675
+ return [
676
+ { x: 0.1, y: 0.1 },
677
+ { x: 0.5, y: 0.1 },
678
+ { x: 0.9, y: 0.1 },
679
+ { x: 0.1, y: 0.3 },
680
+ { x: 0.3, y: 0.3 },
681
+ { x: 0.5, y: 0.3 },
682
+ { x: 0.7, y: 0.3 },
683
+ { x: 0.9, y: 0.3 },
684
+ { x: 0.1, y: 0.5 },
685
+ { x: 0.5, y: 0.5 },
686
+ { x: 0.9, y: 0.5 },
687
+ { x: 0.1, y: 0.7 },
688
+ { x: 0.3, y: 0.7 },
689
+ { x: 0.5, y: 0.7 },
690
+ { x: 0.7, y: 0.7 },
691
+ { x: 0.9, y: 0.7 },
692
+ { x: 0.1, y: 0.9 },
693
+ { x: 0.5, y: 0.9 },
694
+ { x: 0.9, y: 0.9 },
695
+ ];
696
+ case 25:
697
+ // 5x5 full grid
698
+ return [
699
+ { x: 0.1, y: 0.1 },
700
+ { x: 0.3, y: 0.1 },
701
+ { x: 0.5, y: 0.1 },
702
+ { x: 0.7, y: 0.1 },
703
+ { x: 0.9, y: 0.1 },
704
+ { x: 0.1, y: 0.3 },
705
+ { x: 0.3, y: 0.3 },
706
+ { x: 0.5, y: 0.3 },
707
+ { x: 0.7, y: 0.3 },
708
+ { x: 0.9, y: 0.3 },
709
+ { x: 0.1, y: 0.5 },
710
+ { x: 0.3, y: 0.5 },
711
+ { x: 0.5, y: 0.5 },
712
+ { x: 0.7, y: 0.5 },
713
+ { x: 0.9, y: 0.5 },
714
+ { x: 0.1, y: 0.7 },
715
+ { x: 0.3, y: 0.7 },
716
+ { x: 0.5, y: 0.7 },
717
+ { x: 0.7, y: 0.7 },
718
+ { x: 0.9, y: 0.7 },
719
+ { x: 0.1, y: 0.9 },
720
+ { x: 0.3, y: 0.9 },
721
+ { x: 0.5, y: 0.9 },
722
+ { x: 0.7, y: 0.9 },
723
+ { x: 0.9, y: 0.9 },
724
+ ];
725
+ default:
726
+ throw new Error(`Unsupported validation_points value: ${count}. Use 5, 9, 13, 15, 19, or 25, or provide custom_points.`);
727
+ }
728
+ }
729
+ /**
730
+ * Delay helper
731
+ */
732
+ delay(ms) {
733
+ return new Promise((resolve) => setTimeout(resolve, ms));
734
+ }
735
+ }
736
+ TobiiValidationPlugin.info = info;
737
+ export default TobiiValidationPlugin;
738
+ //# sourceMappingURL=index.js.map