-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA Note on Statistics Anxiety_Igor.html
More file actions
931 lines (902 loc) · 52.7 KB
/
A Note on Statistics Anxiety_Igor.html
File metadata and controls
931 lines (902 loc) · 52.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
<!DOCTYPE html>
<!-- saved from url=(0022)http://localhost:3689/ -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="quarto-1.1.189">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<meta name="author" content="Dr. Igor Tkalec \ Social Data Institute \ UCL">
<meta name="dcterms.date" content="2022-12-12">
<title>A Note on Statistics Anxiety</title>
<style class="anchorjs"></style><style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
</style>
<script src="./A Note on Statistics Anxiety_Igor_files/clipboard.min.js.download"></script>
<script src="./A Note on Statistics Anxiety_Igor_files/quarto.js.download"></script>
<script src="./A Note on Statistics Anxiety_Igor_files/popper.min.js.download"></script>
<script src="./A Note on Statistics Anxiety_Igor_files/tippy.umd.min.js.download"></script>
<script src="./A Note on Statistics Anxiety_Igor_files/anchor.min.js.download"></script>
<link href="./A Note on Statistics Anxiety_Igor_files/tippy.css" rel="stylesheet">
<link href="./A Note on Statistics Anxiety_Igor_files/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="./A Note on Statistics Anxiety_Igor_files/bootstrap.min.js.download"></script>
<link href="./A Note on Statistics Anxiety_Igor_files/bootstrap-icons.css" rel="stylesheet">
<link href="./A Note on Statistics Anxiety_Igor_files/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
<style>
.quarto-title-block .quarto-title-banner {
background-image: url(Untitled.jpg);
background-size: cover;
}
</style>
</head>
<body class="fullcontent quarto-light" data-new-gr-c-s-check-loaded="14.1088.0" data-gr-ext-installed="">
<header id="title-block-header" class="quarto-title-block default page-columns page-full">
<div class="quarto-title-banner page-columns page-full">
<div class="quarto-title column-body">
<h1 class="title">A Note on Statistics Anxiety</h1>
</div>
</div>
<div class="quarto-title-meta">
<div>
<div class="quarto-title-meta-heading">Author</div>
<div class="quarto-title-meta-contents">
<p>Dr. Igor Tkalec \ Social Data Institute \ UCL </p>
</div>
</div>
<div>
<div class="quarto-title-meta-heading">Published</div>
<div class="quarto-title-meta-contents">
<p class="date">December 12, 2022</p>
</div>
</div>
</div>
</header><div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
<main class="content quarto-banner-title-block" id="quarto-document-content">
<p>Back in 2010 (I was a senior in high school), my friend, then a freshman computer science student called me up one evening asking if I want to join him on a “quest”. Considering we have known each other our whole lives, I gladly accepted his invitation. Later that afternoon when we met up I noticed he was carrying a book, which raised some questions in my head. It turned out that the “quest” was about the book. Without much context and explanation, he somewhat excitedly said that the book must be gone. It must disappear from his life and mind in every possible form. And so it was, the book “magically” disappeared. On the way home, he provided some context – the book was a statistics textbook and he had just passed his undergraduate statistics exam. Back then little did I know that this is a manifestation of what is called statistics anxiety, an omnipresent phenomena among university students.</p>
<p>Statistics anxiety was the main theme of recent Statistics Teaching Community of Practice seminar held at University College London. In this blog post, I provide a brief conceptual overview of statistics anxiety and reflect upon its remedies that were the focus of the discussion at the seminar. Nowadays, statistics anxiety gains momentum notably in the context of (social) data science and corresponding coding skills that have permeated all scientific fields and have become crucial components of business operations and, consequently, labour market demands.</p>
<p>Statistics anxiety entails negative emotional reaction to encountering statistics in any form of level including data collection, data modelling, interpretation of statistical analyses (Bradstreet 1996; Koh and Zawi 2014). It is situation-specific meaning that its symptoms and effects occur only in environments where statistics has increased significance (e.g., attending a statistics class at a university) (Onwuegbuzie 2000). The effects of statistics anxiety inter alia include frustration, fear of failure, depression, panic, non-optimal learning and mental anguish (Schacht and Stewart 1990; Milgram, Sroloff, and Rosenbaum 1988; Onwuegbuzie 2004). Naturally, statistics anxiety is linked to poor performance in statistics classes.</p>
<p>However, there are strategies that remedy statistics anxiety of students. Content-focused remedies concern materials used in classes – e.g., usage of humorous cartoons in explaining statistical concepts (see Ziv 1988). Teacher-focused remedies such as immediacy (Williams 2010) and teacher rapport (Bradstreet 1996) emphasise individual role of a teacher in dealing with statistics anxiety. Class-focused remedies concern modifications in class organisation, structure and objectives. These inter alia include moving away from test and conventional exams toward project-focused assessments (Wilson 1999), using real-life examples in teaching (Zanakis and Valenzi 1997) and the use of technology in classes (Hollis 1997).</p>
<p>The latter – the use of technology – was the main discussion point at the Community of Practice event. In this context, technology is equivalent to using coding to perform statistical analyses. First, the audience observed that coding tends to significantly contribute to statistics anxiety among students. Second, due to over-emphasis on coding in statistics classes that derives from its desirability and consequent monetisation on the labour market, students struggle to understand that coding is an instrument for doing statistical analysis, rather than the essence of statistical reasoning. In other words, students are more concerned about producing an errorless code than in making sense of the actual output of generated by the code. This implies that an instrument (i.e., coding) gains relative importance over reasoning (i.e., interpretation of the output and learning from data). One can immediately notice a problematic nature of such observations. This links to another issue that came up in the discussion and concerns general tendency of students to start developing a project by thinking which method to use (i.e., the instrument) instead of starting from the problem/question definition that should precede, supersede and directly inform the method of analysis.</p>
<p>Remedies to coding-induced statistics anxiety that the audience “tested” in their classes are predominantly class-focused and include: introducing coding labs only half way through the course; splitting (instead of merging) lectures on statistical reasoning from coding labs; using point-interface visual tools to demonstrate statistical concepts prior (re)demonstrating them in a coding environment; distinguishing statistical reasoning from coding and discussing their interaction.</p>
<p>By all means coding is an important skill students should master to a certain degree, but it should not supersede statistical/data science reasoning. Therefore, especially in a teaching environment, it is arguably productive to treat coding as an instrument that enables us to “give life” and operationalise reasoning that derives from pre-defined problem problem/question.</p>
<p>Embracing the reasoning in teaching which arguably reduces coding-induced statistics anxiety, may stop students going on “quests” from the 1st paragraph as soon as they “suffer through” their classes. In this context, teachers are seen as the difference makers.</p>
<p>In conclusion: do not code for the sake of coding, but for the sake of obtaining and, importantly, understanding the answer to a problem/question.</p>
<p>References:</p>
<p>Bradstreet, Thomas E. 1996. ‘Teaching Introductory Statistics Courses so That Nonstatisticians Experience Statistical Reasoning’. The American Statistician 50 (1): 69–78.</p>
<p>Hollis, P. J. 1997. ‘Ideas for Improving Statistics Education’. International Journal of Mathematical Education in Science and Technology 28 (4): 569–73. https://doi.org/10.1080/0020739970280411.</p>
<p>Koh, Denise, and Mohd Khairi Zawi. 2014. ‘Statistics Anxiety among Postgraduate Students’. International Education Studies 7 (13): 166–74. https://doi.org/10.5539/ies.v7n13p166.</p>
<p>Milgram, Norman A., Barry Sroloff, and Michael Rosenbaum. 1988. ‘The Procrastination of Everyday Life’. Journal of Research in Personality 22 (2): 197–212. https://doi.org/10.1016/0092-6566(88)90015-3.</p>
<p>Onwuegbuzie, Anthony J. 2000. ‘Statistics Anxiety and the Role of Self-Perceptions’. The Journal of Educational Research 93 (5): 323–30. https://doi.org/10.1080/00220670009598724.</p>
<p>———. 2004. ‘Academic Procrastination and Statistics Anxiety’. Assessment & Evaluation in Higher Education 29 (1): 3–19. https://doi.org/10.1080/0260293042000160384.</p>
<p>Schacht, Steven, and Brad J. Stewart. 1990. ‘What’s Funny about Statistics? A Technique for Reducing Student Anxiety’. Teaching Sociology 18 (1): 52. https://doi.org/10.2307/1318231.</p>
<p>Williams, Amanda S. 2010. ‘Statistics Anxiety and Instructor Immediacy’. Journal of Statistics Education 18 (2): 10. https://doi.org/10.1080/10691898.2010.11889495.</p>
<p>Wilson, Vicki A. 1999. ‘Reducing Statistics Anxiety’: In . Point Clear, Alabama US.</p>
<p>Zanakis, Stelios H., and Enzo R. Valenzi. 1997. ‘Student Anxiety and Attitudes in Business Statistics’. Journal of Education for Business 73 (1): 10–16. https://doi.org/10.1080/08832329709601608.</p>
<p>Ziv, Avner. 1988. ‘Teaching and Learning with Humor: Experiment and Replication’. The Journal of Experimental Education 57 (1): 5–15.</p>
<section id="section" class="level2">
<h2 class="anchored" data-anchor-id="section"><a class="anchorjs-link " aria-label="Anchor" data-anchorjs-icon="" href="http://localhost:3689/#section" style="font: 1em / 1 anchorjs-icons; padding-left: 0.375em;"></a></h2>
</section>
</main>
<!-- /main column -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const toggleBodyColorMode = (bsSheetEl) => {
const mode = bsSheetEl.getAttribute("data-mode");
const bodyEl = window.document.querySelector("body");
if (mode === "dark") {
bodyEl.classList.add("quarto-dark");
bodyEl.classList.remove("quarto-light");
} else {
bodyEl.classList.add("quarto-light");
bodyEl.classList.remove("quarto-dark");
}
}
const toggleBodyColorPrimary = () => {
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
if (bsSheetEl) {
toggleBodyColorMode(bsSheetEl);
}
}
toggleBodyColorPrimary();
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {
placement: 'right',
icon: icon
};
anchorJS.add('.anchored');
const clipboard = new window.ClipboardJS('.code-copy-button', {
target: function(trigger) {
return trigger.previousElementSibling;
}
});
clipboard.on('success', function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Copied!");
setTimeout(function() {
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
});
function tippyHover(el, contentFn) {
const config = {
allowHTML: true,
content: contentFn,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start'
};
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
// use id or data attribute instead here
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
});
}
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const cites = ref.parentNode.getAttribute('data-cites').split(' ');
tippyHover(ref, function() {
var popup = window.document.createElement('div');
cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
});
</script>
</div> <!-- /content -->
<div class="modal__dialog micromodal-slide" id="quarto-log-error-modal" aria-hidden="true">
<div class="modal__overlay" tabindex="2" data-micromodal-close="">
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="quarto-log-error-modal-title">
<header class="modal__header">
<h2 class="modal__title" id="quarto-log-error-modal-title">
<i class="bi bi-exclamation-circle"></i>Error
</h2>
<button class="modal__close" aria-label="Close modal" data-micromodal-close=""></button>
</header>
<div class="modal__content" id="quarto-log-error-modal-content">
<pre tabindex="1" id="quarto-log-error-display"></pre>
</div>
<footer class="modal__footer">
</footer>
</div>
</div>
</div>
<style type="text/css">
#quarto-log-error-modal .modal__overlay {
z-index: 5000;
}
#quarto-log-error-modal-content {
border: 1px solid #dee2e6;
overflow-y: auto;
}
#quarto-log-error-display {
min-height: 100px;
padding: 8px;
margin-bottom: 0;
font-family: monospace;
}
#quarto-log-error-display:focus {
outline: none;
}
.modal__dialog {
font-size: 16px;
}
.modal__overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.4);
display: flex;
justify-content: center;
align-items: center;
}
.modal__container {
position: fixed;
top: 80px;
background-color: #fff;
padding: 15px;
padding-top: 10px;
min-width: 500px;
max-width: 90%;
max-height: 90vh;
border-radius: 4px;
overflow-y: auto;
box-sizing: border-box;
}
.modal__header {
display: flex;
justify-content: space-between;
align-items: center;
}
.modal__title {
margin-top: 0;
margin-bottom: 0;
font-weight: 600;
border-bottom: none;
padding-bottom: 10px;
font-size: 20px;
color: rgb(191,71,65);
line-height: 1.25;
box-sizing: border-box;
}
.modal__title .bi {
margin-right: 7px;
}
.modal__close {
background: transparent;
border: 0;
margin-bottom: 10px;
}
.modal__header .modal__close:before { content: "\2715"; }
.modal__content {
margin-top: 0;
margin-bottom: 0;
}
@keyframes mmfadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes mmfadeOut {
from { opacity: 1; }
to { opacity: 0; }
}
@keyframes mmslideIn {
from { transform: translateY(15%); }
to { transform: translateY(0); }
}
@keyframes mmslideOut {
from { transform: translateY(0); }
to { transform: translateY(-10%); }
}
.micromodal-slide {
display: none;
}
.micromodal-slide.is-open {
display: block;
}
.micromodal-slide[aria-hidden="false"] .modal__overlay {
animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}
.micromodal-slide[aria-hidden="false"] .modal__container {
animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}
.micromodal-slide[aria-hidden="true"] .modal__overlay {
animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}
.micromodal-slide[aria-hidden="true"] .modal__container {
animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
}
.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
will-change: transform;
}
</style>
<script type="text/javascript">
window.backupDefine = window.define; window.define = undefined;
/* ansi_up.js
* author : Dru Nelson
* license : MIT
* http://github.com/drudru/ansi_up
*/
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports);
} else {
// Browser globals
var exp = {};
factory(exp);
root.AnsiUp = exp.default;
}
}(this, function (exports) {
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var PacketKind;
(function (PacketKind) {
PacketKind[PacketKind["EOS"] = 0] = "EOS";
PacketKind[PacketKind["Text"] = 1] = "Text";
PacketKind[PacketKind["Incomplete"] = 2] = "Incomplete";
PacketKind[PacketKind["ESC"] = 3] = "ESC";
PacketKind[PacketKind["Unknown"] = 4] = "Unknown";
PacketKind[PacketKind["SGR"] = 5] = "SGR";
PacketKind[PacketKind["OSCURL"] = 6] = "OSCURL";
})(PacketKind || (PacketKind = {}));
var AnsiUp = (function () {
function AnsiUp() {
this.VERSION = "5.1.0";
this.setup_palettes();
this._use_classes = false;
this.bold = false;
this.italic = false;
this.underline = false;
this.fg = this.bg = null;
this._buffer = '';
this._url_whitelist = { 'http': 1, 'https': 1 };
}
Object.defineProperty(AnsiUp.prototype, "use_classes", {
get: function () {
return this._use_classes;
},
set: function (arg) {
this._use_classes = arg;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnsiUp.prototype, "url_whitelist", {
get: function () {
return this._url_whitelist;
},
set: function (arg) {
this._url_whitelist = arg;
},
enumerable: false,
configurable: true
});
AnsiUp.prototype.setup_palettes = function () {
var _this = this;
this.ansi_colors =
[
[
{ rgb: [0, 0, 0], class_name: "ansi-black" },
{ rgb: [187, 0, 0], class_name: "ansi-red" },
{ rgb: [0, 187, 0], class_name: "ansi-green" },
{ rgb: [187, 187, 0], class_name: "ansi-yellow" },
{ rgb: [0, 0, 187], class_name: "ansi-blue" },
{ rgb: [187, 0, 187], class_name: "ansi-magenta" },
{ rgb: [0, 187, 187], class_name: "ansi-cyan" },
{ rgb: [255, 255, 255], class_name: "ansi-white" }
],
[
{ rgb: [85, 85, 85], class_name: "ansi-bright-black" },
{ rgb: [255, 85, 85], class_name: "ansi-bright-red" },
{ rgb: [0, 255, 0], class_name: "ansi-bright-green" },
{ rgb: [255, 255, 85], class_name: "ansi-bright-yellow" },
{ rgb: [85, 85, 255], class_name: "ansi-bright-blue" },
{ rgb: [255, 85, 255], class_name: "ansi-bright-magenta" },
{ rgb: [85, 255, 255], class_name: "ansi-bright-cyan" },
{ rgb: [255, 255, 255], class_name: "ansi-bright-white" }
]
];
this.palette_256 = [];
this.ansi_colors.forEach(function (palette) {
palette.forEach(function (rec) {
_this.palette_256.push(rec);
});
});
var levels = [0, 95, 135, 175, 215, 255];
for (var r = 0; r < 6; ++r) {
for (var g = 0; g < 6; ++g) {
for (var b = 0; b < 6; ++b) {
var col = { rgb: [levels[r], levels[g], levels[b]], class_name: 'truecolor' };
this.palette_256.push(col);
}
}
}
var grey_level = 8;
for (var i = 0; i < 24; ++i, grey_level += 10) {
var gry = { rgb: [grey_level, grey_level, grey_level], class_name: 'truecolor' };
this.palette_256.push(gry);
}
};
AnsiUp.prototype.escape_txt_for_html = function (txt) {
return txt.replace(/[&<>"']/gm, function (str) {
if (str === "&")
return "&";
if (str === "<")
return "<";
if (str === ">")
return ">";
if (str === "\"")
return """;
if (str === "'")
return "'";
});
};
AnsiUp.prototype.append_buffer = function (txt) {
var str = this._buffer + txt;
this._buffer = str;
};
AnsiUp.prototype.get_next_packet = function () {
var pkt = {
kind: PacketKind.EOS,
text: '',
url: ''
};
var len = this._buffer.length;
if (len == 0)
return pkt;
var pos = this._buffer.indexOf("\x1B");
if (pos == -1) {
pkt.kind = PacketKind.Text;
pkt.text = this._buffer;
this._buffer = '';
return pkt;
}
if (pos > 0) {
pkt.kind = PacketKind.Text;
pkt.text = this._buffer.slice(0, pos);
this._buffer = this._buffer.slice(pos);
return pkt;
}
if (pos == 0) {
if (len == 1) {
pkt.kind = PacketKind.Incomplete;
return pkt;
}
var next_char = this._buffer.charAt(1);
if ((next_char != '[') && (next_char != ']')) {
pkt.kind = PacketKind.ESC;
pkt.text = this._buffer.slice(0, 1);
this._buffer = this._buffer.slice(1);
return pkt;
}
if (next_char == '[') {
if (!this._csi_regex) {
this._csi_regex = rgx(__makeTemplateObject(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \u001B[ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \u001B[ # CSI\n [ -~]* # anything legal\n ([\0-\u001F:]) # anything illegal\n )\n "], ["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]));
}
var match = this._buffer.match(this._csi_regex);
if (match === null) {
pkt.kind = PacketKind.Incomplete;
return pkt;
}
if (match[4]) {
pkt.kind = PacketKind.ESC;
pkt.text = this._buffer.slice(0, 1);
this._buffer = this._buffer.slice(1);
return pkt;
}
if ((match[1] != '') || (match[3] != 'm'))
pkt.kind = PacketKind.Unknown;
else
pkt.kind = PacketKind.SGR;
pkt.text = match[2];
var rpos = match[0].length;
this._buffer = this._buffer.slice(rpos);
return pkt;
}
if (next_char == ']') {
if (len < 4) {
pkt.kind = PacketKind.Incomplete;
return pkt;
}
if ((this._buffer.charAt(2) != '8')
|| (this._buffer.charAt(3) != ';')) {
pkt.kind = PacketKind.ESC;
pkt.text = this._buffer.slice(0, 1);
this._buffer = this._buffer.slice(1);
return pkt;
}
if (!this._osc_st) {
this._osc_st = rgxG(__makeTemplateObject(["\n (?: # legal sequence\n (\u001B\\) # ESC | # alternate\n (\u0007) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-\u0006] # anything illegal\n | # alternate\n [\b-\u001A] # anything illegal\n | # alternate\n [\u001C-\u001F] # anything illegal\n )\n "], ["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "]));
}
this._osc_st.lastIndex = 0;
{
var match_1 = this._osc_st.exec(this._buffer);
if (match_1 === null) {
pkt.kind = PacketKind.Incomplete;
return pkt;
}
if (match_1[3]) {
pkt.kind = PacketKind.ESC;
pkt.text = this._buffer.slice(0, 1);
this._buffer = this._buffer.slice(1);
return pkt;
}
}
{
var match_2 = this._osc_st.exec(this._buffer);
if (match_2 === null) {
pkt.kind = PacketKind.Incomplete;
return pkt;
}
if (match_2[3]) {
pkt.kind = PacketKind.ESC;
pkt.text = this._buffer.slice(0, 1);
this._buffer = this._buffer.slice(1);
return pkt;
}
}
if (!this._osc_regex) {
this._osc_regex = rgx(__makeTemplateObject(["\n ^ # beginning of line\n #\n \u001B]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\u001B\\) # ESC | # alternate\n (?:\u0007) # BEL (what xterm did)\n )\n ([ -~]+) # TEXT capture\n \u001B]8;; # OSC Hyperlink End\n (?: # ST\n (?:\u001B\\) # ESC | # alternate\n (?:\u0007) # BEL (what xterm did)\n )\n "], ["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x20-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]));
}
var match = this._buffer.match(this._osc_regex);
if (match === null) {
pkt.kind = PacketKind.ESC;
pkt.text = this._buffer.slice(0, 1);
this._buffer = this._buffer.slice(1);
return pkt;
}
pkt.kind = PacketKind.OSCURL;
pkt.url = match[1];
pkt.text = match[2];
var rpos = match[0].length;
this._buffer = this._buffer.slice(rpos);
return pkt;
}
}
};
AnsiUp.prototype.ansi_to_html = function (txt) {
this.append_buffer(txt);
var blocks = [];
while (true) {
var packet = this.get_next_packet();
if ((packet.kind == PacketKind.EOS)
|| (packet.kind == PacketKind.Incomplete))
break;
if ((packet.kind == PacketKind.ESC)
|| (packet.kind == PacketKind.Unknown))
continue;
if (packet.kind == PacketKind.Text)
blocks.push(this.transform_to_html(this.with_state(packet)));
else if (packet.kind == PacketKind.SGR)
this.process_ansi(packet);
else if (packet.kind == PacketKind.OSCURL)
blocks.push(this.process_hyperlink(packet));
}
return blocks.join("");
};
AnsiUp.prototype.with_state = function (pkt) {
return { bold: this.bold, italic: this.italic, underline: this.underline, fg: this.fg, bg: this.bg, text: pkt.text };
};
AnsiUp.prototype.process_ansi = function (pkt) {
var sgr_cmds = pkt.text.split(';');
while (sgr_cmds.length > 0) {
var sgr_cmd_str = sgr_cmds.shift();
var num = parseInt(sgr_cmd_str, 10);
if (isNaN(num) || num === 0) {
this.fg = this.bg = null;
this.bold = false;
this.italic = false;
this.underline = false;
}
else if (num === 1) {
this.bold = true;
}
else if (num === 3) {
this.italic = true;
}
else if (num === 4) {
this.underline = true;
}
else if (num === 22) {
this.bold = false;
}
else if (num === 23) {
this.italic = false;
}
else if (num === 24) {
this.underline = false;
}
else if (num === 39) {
this.fg = null;
}
else if (num === 49) {
this.bg = null;
}
else if ((num >= 30) && (num < 38)) {
this.fg = this.ansi_colors[0][(num - 30)];
}
else if ((num >= 40) && (num < 48)) {
this.bg = this.ansi_colors[0][(num - 40)];
}
else if ((num >= 90) && (num < 98)) {
this.fg = this.ansi_colors[1][(num - 90)];
}
else if ((num >= 100) && (num < 108)) {
this.bg = this.ansi_colors[1][(num - 100)];
}
else if (num === 38 || num === 48) {
if (sgr_cmds.length > 0) {
var is_foreground = (num === 38);
var mode_cmd = sgr_cmds.shift();
if (mode_cmd === '5' && sgr_cmds.length > 0) {
var palette_index = parseInt(sgr_cmds.shift(), 10);
if (palette_index >= 0 && palette_index <= 255) {
if (is_foreground)
this.fg = this.palette_256[palette_index];
else
this.bg = this.palette_256[palette_index];
}
}
if (mode_cmd === '2' && sgr_cmds.length > 2) {
var r = parseInt(sgr_cmds.shift(), 10);
var g = parseInt(sgr_cmds.shift(), 10);
var b = parseInt(sgr_cmds.shift(), 10);
if ((r >= 0 && r <= 255) && (g >= 0 && g <= 255) && (b >= 0 && b <= 255)) {
var c = { rgb: [r, g, b], class_name: 'truecolor' };
if (is_foreground)
this.fg = c;
else
this.bg = c;
}
}
}
}
}
};
AnsiUp.prototype.transform_to_html = function (fragment) {
var txt = fragment.text;
if (txt.length === 0)
return txt;
txt = this.escape_txt_for_html(txt);
if (!fragment.bold && !fragment.italic && !fragment.underline && fragment.fg === null && fragment.bg === null)
return txt;
var styles = [];
var classes = [];
var fg = fragment.fg;
var bg = fragment.bg;
if (fragment.bold)
styles.push('font-weight:bold');
if (fragment.italic)
styles.push('font-style:italic');
if (fragment.underline)
styles.push('text-decoration:underline');
if (!this._use_classes) {
if (fg)
styles.push("color:rgb(" + fg.rgb.join(',') + ")");
if (bg)
styles.push("background-color:rgb(" + bg.rgb + ")");
}
else {
if (fg) {
if (fg.class_name !== 'truecolor') {
classes.push(fg.class_name + "-fg");
}
else {
styles.push("color:rgb(" + fg.rgb.join(',') + ")");
}
}
if (bg) {
if (bg.class_name !== 'truecolor') {
classes.push(bg.class_name + "-bg");
}
else {
styles.push("background-color:rgb(" + bg.rgb.join(',') + ")");
}
}
}
var class_string = '';
var style_string = '';
if (classes.length)
class_string = " class=\"" + classes.join(' ') + "\"";
if (styles.length)
style_string = " style=\"" + styles.join(';') + "\"";
return "<span" + style_string + class_string + ">" + txt + "</span>";
};
;
AnsiUp.prototype.process_hyperlink = function (pkt) {
var parts = pkt.url.split(':');
if (parts.length < 1)
return '';
if (!this._url_whitelist[parts[0]])
return '';
var result = "<a href=\"" + this.escape_txt_for_html(pkt.url) + "\">" + this.escape_txt_for_html(pkt.text) + "</a>";
return result;
};
return AnsiUp;
}());
function rgx(tmplObj) {
var subst = [];
for (var _i = 1; _i < arguments.length; _i++) {
subst[_i - 1] = arguments[_i];
}
var regexText = tmplObj.raw[0];
var wsrgx = /^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;
var txt2 = regexText.replace(wsrgx, '');
return new RegExp(txt2);
}
function rgxG(tmplObj) {
var subst = [];
for (var _i = 1; _i < arguments.length; _i++) {
subst[_i - 1] = arguments[_i];
}
var regexText = tmplObj.raw[0];
var wsrgx = /^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm;
var txt2 = regexText.replace(wsrgx, '');
return new RegExp(txt2, 'g');
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = AnsiUp;
}));
// micromodal: https://github.com/Ghosh/micromodal
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).MicroModal=t()}(this,(function(){"use strict";function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}var n,i,a,r,s,l=(n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'],i=function(){function o(e){var n=e.targetModal,i=e.triggers,a=void 0===i?[]:i,r=e.onShow,s=void 0===r?function(){}:r,l=e.onClose,c=void 0===l?function(){}:l,d=e.openTrigger,u=void 0===d?"data-micromodal-trigger":d,f=e.closeTrigger,h=void 0===f?"data-micromodal-close":f,v=e.openClass,g=void 0===v?"is-open":v,m=e.disableScroll,b=void 0!==m&&m,y=e.disableFocus,p=void 0!==y&&y,w=e.awaitCloseAnimation,E=void 0!==w&&w,k=e.awaitOpenAnimation,M=void 0!==k&&k,A=e.debugMode,C=void 0!==A&&A;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.modal=document.getElementById(n),this.config={debugMode:C,disableScroll:b,openTrigger:u,closeTrigger:h,openClass:g,onShow:s,onClose:c,awaitCloseAnimation:E,awaitOpenAnimation:M,disableFocus:p},a.length>0&&this.registerTriggers.apply(this,t(a)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var i,a,r;return i=o,(a=[{key:"registerTriggers",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];o.filter(Boolean).forEach((function(t){t.addEventListener("click",(function(t){return e.showModal(t)}))}))}},{key:"showModal",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute("aria-hidden","false"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour("disable"),this.addEventListeners(),this.config.awaitOpenAnimation){var o=function t(){e.modal.removeEventListener("animationend",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener("animationend",o,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:"closeModal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute("aria-hidden","true"),this.removeEventListeners(),this.scrollBehaviour("enable"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var o=this.config.openClass;this.modal.addEventListener("animationend",(function e(){t.classList.remove(o),t.removeEventListener("animationend",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:"closeModalById",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:"scrollBehaviour",value:function(e){if(this.config.disableScroll){var t=document.querySelector("body");switch(e){case"enable":Object.assign(t.style,{overflow:""});break;case"disable":Object.assign(t.style,{overflow:"hidden"})}}}},{key:"addEventListeners",value:function(){this.modal.addEventListener("touchstart",this.onClick),this.modal.addEventListener("click",this.onClick),document.addEventListener("keydown",this.onKeydown)}},{key:"removeEventListeners",value:function(){this.modal.removeEventListener("touchstart",this.onClick),this.modal.removeEventListener("click",this.onClick),document.removeEventListener("keydown",this.onKeydown)}},{key:"onClick",value:function(e){(e.target.hasAttribute(this.config.closeTrigger)||e.target.parentNode.hasAttribute(this.config.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),this.closeModal(e))}},{key:"onKeydown",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:"getFocusableNodes",value:function(){var e=this.modal.querySelectorAll(n);return Array.apply(void 0,t(e))}},{key:"setFocusToFirstNode",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var o=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));o.length>0&&o[0].focus(),0===o.length&&t[0].focus()}}}},{key:"retainFocus",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var o=t.indexOf(document.activeElement);e.shiftKey&&0===o&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&o===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&e(i.prototype,a),r&&e(i,r),o}(),a=null,r=function(e){if(!document.getElementById(e))return console.warn("MicroModal: ❗Seems like you have missed %c'".concat(e,"'"),"background-color: #f8f9fa;color: #50596c;font-weight: bold;","ID somewhere in your code. Refer example below to resolve it."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<div class="modal" id="'.concat(e,'"></div>')),!1},s=function(e,t){if(function(e){e.length<=0&&(console.warn("MicroModal: ❗Please specify at least one %c'micromodal-trigger'","background-color: #f8f9fa;color: #50596c;font-weight: bold;","data attribute."),console.warn("%cExample:","background-color: #f8f9fa;color: #50596c;font-weight: bold;",'<a href="#" data-micromodal-trigger="my-modal"></a>'))}(e),!t)return!0;for(var o in t)r(o);return!0},{init:function(e){var o=Object.assign({},{openTrigger:"data-micromodal-trigger"},e),n=t(document.querySelectorAll("[".concat(o.openTrigger,"]"))),r=function(e,t){var o=[];return e.forEach((function(e){var n=e.attributes[t].value;void 0===o[n]&&(o[n]=[]),o[n].push(e)})),o}(n,o.openTrigger);if(!0!==o.debugMode||!1!==s(n,r))for(var l in r){var c=r[l];o.targetModal=l,o.triggers=t(c),a=new i(o)}},show:function(e,t){var o=t||{};o.targetModal=e,!0===o.debugMode&&!1===r(e)||(a&&a.removeEventListeners(),(a=new i(o)).showModal())},close:function(e){e?a.closeModalById(e):a.closeModal()}});return"undefined"!=typeof window&&(window.MicroModal=l),l}));
window.define = window.backupDefine; window.backupDefine = undefined;
</script>
<script type="text/javascript">
(function () {
// forward keydown events so shortcuts can work in vscode, see:
// https://github.com/microsoft/vscode/issues/65452#issuecomment-586485815
if (window.parent.postMessage) {
window.document.addEventListener('keydown', e => {
const event = {
type: "keydown",
data: {
altKey: e.altKey,
code: e.code,
ctrlKey: e.ctrlKey,
isComposing: e.isComposing,
key: e.key,
location: e.location,
metaKey: e.metaKey,
repeat: e.repeat,
shiftKey: e.shiftKey
}
};
window.parent.postMessage(event, '*');
});
}
// listen for execCommand messages
window.addEventListener("message", function (event) {
if (event.data.type === "devhost-exec-command") {
window.document.execCommand(event.data.data);
}
}, true);
const logEntries = new Array(1000);
logEntries.offset = 0;
function recordLogEntry(entry) {
logEntries[logEntries.offset++] = entry;
logEntries.offset %= logEntries.length;
}
function getLogEntry(i) { // backwards, 0 is most recent
return logEntries[(logEntries.offset - 1 - i + logEntries.length) % logEntries.length];
}
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
let path = window.location.pathname;
if (!/\/$/.test(path)) path += "/";
const devServerSocket = new WebSocket(protocol + "//" + window.location.host + path);
devServerSocket.onopen = () => {
console.log('Socket connection open. Listening for events.');
};
// append for errors that occur within the error window
let lastError = 0;
const kErrorWindow = 2500;
function showError(msg) {
const ansiUp = new AnsiUp
const html = ansiUp.ansi_to_html(msg.trim());
const display = document.getElementById("quarto-log-error-display");
if (display.innerHTML && ((Date.now() - lastError) < kErrorWindow)) {
display.innerHTML = display.innerHTML + "<br/>" + html;
} else {
display.innerHTML = html
}
lastError = Date.now()
MicroModal.show('quarto-log-error-modal', {
awaitCloseAnimation: true,
onClose: () => { display.innerHTML = ""; }
});
}
// see if there is already an error to show
const renderError = document.getElementById("quarto-render-error");
if (renderError) {
showError(renderError.innerHTML.trim());
}
devServerSocket.onmessage = (msg) => {
if (msg.data.startsWith('reload')) {
devServerSocket.close();
let target = msg.data.replace(/^reload/, "").replace(/\/index\.html/, "/");
// prepend proxy path to target if we have one
if (target) {
const pathPrefix =
window.location.pathname.match(/^.*?\/p\/\w+\//) ||
window.location.pathname.match(/^.*?\/user\/[\w\d]+\/proxy\/\d+\//);
if (pathPrefix) {
target = pathPrefix + target.slice(1);
}
}
if (target && (target !== window.location.pathname)) {
window.location.replace(target);
} else {
window.location.reload(true);
}
} else if (msg.data.startsWith('log:')) {
const ansiUp = new AnsiUp
const log = JSON.parse(msg.data.substr(4));
recordLogEntry(log);
if (log.levelName === "ERROR") {
showError(log.msgFormatted)
} else {
// see if there is a knitr error to report
const kExecutionHalted = "Execution halted";
if (log.msg.indexOf(kExecutionHalted) !== -1) {
// scan backwards for beginning of error
const errorEntries = [getLogEntry(0).msgFormatted];
for (let i=1; i<logEntries.length; i++) {
const logEntry = getLogEntry(i);
if (logEntry) {
errorEntries.unshift(logEntry.msgFormatted);
if (logEntry.msg.indexOf("Quitting from lines") !== -1) {
showError(errorEntries.join(""));
break;
} else if (logEntry.msg.indexOf(kExecutionHalted) !== -1) {
break;
}
} else {
break;
}
}
}
}
}
};
})();
</script>
<script type="text/javascript">
if (window.parent.postMessage) {
// wait for message providing confirmation we are in a devhost
window.addEventListener("message", function (event) {
if (event.data.type === "devhost-init") {
window.quartoDevhost = {
openInputFile: function (line, column, highlight) {
window.parent.postMessage({
type: "openfile",
file: "C:\Users\ucqhit1\OneDrive - University College London\Desktop\blog.qmd",
line: line,
column: column,
highlight: highlight
}, event.origin);
}
};
} else if (event.data.type === "goback") {
window.history.back()
} else if (event.data.type === "goforward") {
window.history.forward()
}
}, true);
// notify host of navigation (e.g. for 'pop out' command)
window.parent.postMessage({
type: "navigate",
href: window.location.href,
file: "C:\Users\ucqhit1\OneDrive - University College London\Desktop\blog.qmd"
}, "*");
}
</script>
</body><grammarly-desktop-integration data-grammarly-shadow-root="true"></grammarly-desktop-integration></html>