-
Notifications
You must be signed in to change notification settings - Fork 2
/
bsl_tools.js
858 lines (808 loc) · 353 KB
/
bsl_tools.js
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
(()=>{var Fr=Object.defineProperty,Dr=Object.defineProperties;var Mr=Object.getOwnPropertyDescriptors;var xt=Object.getOwnPropertySymbols;var Nr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable;var bt=(e,r,t)=>r in e?Fr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,W=(e,r)=>{for(var t in r||(r={}))Nr.call(r,t)&&bt(e,t,r[t]);if(xt)for(var t of xt(r))Hr.call(r,t)&&bt(e,t,r[t]);return e},ht=(e,r)=>Dr(e,Mr(r));function Ce(e){return Y(e)||z(e)||ze(e)}function Y(e){return e.type==="Function Definition"}function z(e){return e.type==="Constant Definition"}function ze(e){return e.type==="Struct Definition"}function Ee(e){return J(e)||Z(e)||j(e)||$(e)}function J(e){return e.type==="Function Call"}function Z(e){return e.type==="Cond-Expression"}function j(e){return e.type==="Symbol"}function $(e){return e.type==="Literal Value"}function q(e){return e.type==="Struct Value"}function Et(e){return e.map(ae).join(`
`)}function ae(e){return Ce(e)?ve(e):v(e)}function ve(e){return Y(e)?`(define (${E(e.name)} ${e.args.map(E).join(" ")}) ${v(e.body)})`:z(e)?`(define ${E(e.name)} ${v(e.value)})`:ze(e)?`(define-struct ${E(e.binding)} (${e.properties.map(E).join(" ")}))`:(console.error("Invalid input to printDefinition"),"")}function v(e){return J(e)?`(${E(e.name)} ${e.args.map(v).join(" ")})`:Z(e)?`(cond ${e.options.map(ee).join(" ")})`:j(e)?E(e):$(e)?ce(e.value):(console.error("Invalid input to printE"),`<${e}>`)}function ce(e){return typeof e=="string"&&e!=="'()"?`"${e}"`:typeof e=="boolean"?e?"#true":"#false":q(e)?`<${E(e.structDef)} ${e.properties.map(v).join(" ")}>`:`${e}`}function ee(e){return`[${v(e.condition)} ${v(e.result)}]`}function E(e){return e.symbol}var Xn=[{type:"Function Definition",name:{type:"Symbol",symbol:"f"},args:[{type:"Symbol",symbol:"x"},{type:"Symbol",symbol:"y"}],body:{type:"Function Call",name:{type:"Symbol",symbol:"+"},args:[{type:"Symbol",symbol:"x"},{type:"Symbol",symbol:"y"}]}},{type:"Cond-Expression",options:[{type:"Cond-Option",condition:{type:"Function Call",name:{type:"Symbol",symbol:"="},args:[{type:"Symbol",symbol:"x"},{type:"Literal Value",value:3}]},result:{type:"Literal Value",value:"isThree"}},{type:"Cond-Option",condition:{type:"Literal Value",value:!1},result:{type:"Literal Value",value:"'()"}}]},{type:"Constant Definition",name:{type:"Symbol",symbol:"x"},value:{type:"Literal Value",value:42}},{type:"Struct Definition",binding:{type:"Symbol",symbol:"name"},properties:[{type:"Symbol",symbol:"firstName"},{type:"Symbol",symbol:"lastName"}]}];function te(e,r,t="text"){let n=[],s=0,l=0,c=0,p="",d=!1,S=!1;e.split("").forEach(f=>{if(d&&f!=='"'){p+=f;return}if(S&&f!==">"){p+=f;return}switch(f){case"(":case"[":l++;break;case")":case"]":l--;break;case'"':d=!d;break;case"<":S=t==="html";break;case">":t==="html"&&(S=!1);break;case" ":case`
`:case" ":if(!p)return;n.push({term:p,level:s}),s>c&&(c=s),p="",s=l;return}p+=f}),p!==""&&(n.push({term:p,level:s}),s>c&&(c=s));let g=t==="html"?"<br>":`
`;for(let f=c;f>0;f--){let b=[];n.forEach(h=>{h.level<f?b.push(ht(W({},h),{subterms:[]})):b[b.length-1].subterms.push(h.term)}),n=b.map(h=>{let _=h.subterms.some(D=>D.includes(g)),A=`${h.term}${h.subterms.length>0?" ":""}${h.subterms.join(" ")}`,ie=t==="html"?Or(A):A.length;if(_||ie+h.level>r){let D=h.subterms.map(N=>`${Ct(t==="html"?" ":" ",f)}${N}`);D.unshift(h.term);let le=t==="html"?"<br>":`
`;return{term:`${D.join(le)}`,level:h.level}}else return{term:A,level:h.level}})}return n.map(f=>f.term).join(g)}function Ct(e,r){let t="";for(let n=0;n<r;n++)t+=e;return t}function Or(e){let r=document.createElement("div");return r.innerHTML=e,r.textContent?r.textContent.length:0}function B(e){return e.replaceAll("<","<").replaceAll(">",">")}function re(e){return e.replaceAll("<","<").replaceAll(">",">").replaceAll(" "," ")}function w(e,r,t=!1){if(e.length===0)return[];let n=r.split("/"),s=n.shift();if(s=="")return e;let l=n.join("/"),c=[];if(s=="..")c=e.map(p=>p.parentElement).filter(p=>p);else if(s=="+")c=e.map(p=>p.nextElementSibling).filter(p=>p);else if(s.startsWith(".")){let p=s.slice(1);c=e.flatMap(d=>Array.from(d.children).filter(S=>S.classList.contains(p)))}else c=e.flatMap(p=>Array.from(p.children).filter(d=>d.tagName==s.toUpperCase()));return c.length===0&&t&&console.error(`Error traversing ${r}: No element found`),w(c,l)}function ne(e,r){if(e.tagName==r.toUpperCase())return e;{let t=e.parentElement;return t?ne(t,r):(console.error("Could not find parent element with requested tag ",r),null)}}function U(e,r){if(e.classList.contains(r))return e;{let t=e.parentElement;return t?U(t,r):(console.error("Could not find parent element with requested class ",r),null)}}var _t=`/* ######## color variables ###### */
.bsl-tools-tree {
--branch-color: #666;
--node-background: #ebf0f4; /* racket azure */
--text-grey: #444; /* like in scribble */
--hole-yellow: #fdf68d; /* pale yellow */
--highlight-border-connectors: lime;
--wrong-background: red;
--correct-background: lime;
--hole-selection-background: white;
--node-margin-x: 1em; /* horizontally */
}
/*
CSS for tree by Ross Angus
https://www.cssscript.com/clean-tree-diagram/
(Edited and extended)
*/
/* ###### parent ###### */
.bsl-tools-tree-container {
text-align: center;
overflow-y: scroll;
}
/* ###### node layout ######## */
.bsl-tools-tree,
.bsl-tools-tree ul,
.bsl-tools-tree li {
list-style: none;
margin: 0;
padding: 0;
position: relative;
white-space: nowrap;
}
.bsl-tools-tree {
margin: 0 0 1em;
text-align: center;
margin-left: auto;
margin-right: auto;
}
.bsl-tools-tree,
.bsl-tools-tree ul {
display: table;
}
.bsl-tools-tree ul {
width: 100%;
}
.bsl-tools-tree li {
display: table-cell;
padding: 0;
padding-top: 1.5em;
vertical-align: top;
}
.bsl-tools-tree code,
.bsl-tools-tree span {
border: solid .1em var(--branch-color);
border-radius: .2em;
display: inline-block;
margin-left: var(--node-margin-x);
margin-right: var(--node-margin-x);
margin-top: 1.5em;
padding: .2em .5em;
position: relative;
box-sizing: border-box;
}
/* ########### custom AST node styles ######## */
/* node */
.bsl-tools-tree span {
font-family: 'Fira-Mono', monospace;
background-color: var(--node-background);
transition: 1s background-color ease-out;
}
.bsl-tools-tree .terminal-symbol {
border-width: .2em;
border-style: double;
}
/* node label */
.bsl-tools-tree .name {
color: var(--text-grey);
font-style: italic;
font-size: 0.85em;
text-align: right;
position: absolute;
top: calc(-0.85em - 1.5em);
right: var(--edgetext-right, 50%); /* to be set dynamically */
margin-right: -1.5em;
background-color: rgba(255,255,255,0.7);
}
/* tooltip */
.bsl-tools-tree .name .tooltip {
display: none;
}
.bsl-tools-tree .name:hover .tooltip {
display: block;
position: absolute;
left: 100%;
bottom: calc(-0.5em - 1px);
background-color: var(--node-background);
border: 1px solid var(--branch-color);
text-align: left;
padding: 0.5em;
z-index: 1000;
}
/* ###### connectors ########### */
/* part above box */
.bsl-tools-tree span:before {
outline: solid 1px var(--branch-color);
content: "";
width: var(--connector-width, 0px); /* to be set dynamically */
left: var(--connector-left, 50%); /* to be set dynamically */
position: absolute;
top: -1.5em;
transform: var(--connector-transform); /* to be set dynamically */
}
.bsl-tools-tree span.terminal-symbol:before {
top: calc(-1.5em - .2em);
}
/* ####### highlight way back up from a node ###### */
/* .bsl-tools-tree li:hover > span {
border-color: var(--highlight-border-connectors);
}
.bsl-tools-tree li:hover::before {
border-color: var(--highlight-border-connectors);
z-index: 1000;
}
.bsl-tools-tree li:hover > span::before {
outline-color: var(--highlight-border-connectors);
} */
/* ######## hide connectors over root ######## */
.bsl-tools-tree>li:before,
.bsl-tools-tree>li:after,
.bsl-tools-tree>li>code:before,
.bsl-tools-tree>li>span:before {
outline: none !important;
border: none !important;
}
.bsl-tools-tree>li {
margin-top: 0;
}
/* ####### collapse nodes ######## */
/* click on span to hide/show */
.bsl-tools-tree .hole:hover {
cursor: pointer;
}
.bsl-tools-tree [data-collapsed="true"] {
display: none;
}
/* ######### holes ########## */
.bsl-tools-tree .char {
display: inline;
margin: 0;
border: none;
padding: 0;
border-radius: 0;
background-color: transparent;
transition: background-color 1s ease-out;
}
.bsl-tools-tree .char::before {
display: none;
}
.bsl-tools-tree .hole {
display: inline-block;
background-color: var(--hole-yellow);
border: 1px solid var(--text-grey);
color: var(--text-grey);
padding-left: 0.25em;
padding-right: 0.25em;
position: relative;
}
/* ########### quiz ########## */
/* quiz stages */
.bsl-tools-tree span[data-quiz-state="production"] .name,
.bsl-tools-tree span[data-quiz-state="production"] .code,
.bsl-tools-tree span[data-quiz-state="production"] .hole-marking {
display: none;
}
.bsl-tools-tree span[data-quiz-state="hole-marking"] .code,
.bsl-tools-tree span[data-quiz-state="hole-marking"] .production {
display: none;
}
.bsl-tools-tree span[data-quiz-state="done"] .production,
.bsl-tools-tree span[data-quiz-state="done"] .hole-marking {
display: none;
}
/* highlighting text by putting a div behind a textarea */
.bsl-tools-tree textarea,
.bsl-tools-tree .marker-container {
font-family: inherit;
resize: none;
font-size: calc(1em);
padding: 2px;
margin: .2em;
border: none;
box-sizing: border-box;
}
.bsl-tools-tree .textarea-container {
position: relative;
display: inline-block;
}
.bsl-tools-tree textarea {
position: relative;
background-color: transparent;
z-index: 2;
}
.bsl-tools-tree .marker-container {
text-align: left;
background-color: var(--hole-selection-background);
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.bsl-tools-tree .marker {
color: transparent;
background-color: transparent;
transition: 1s background-color ease-out;
}
/* feedback for wrong answer */
.bsl-tools-tree .wrong {
background-color: var(--wrong-background);
transition: none;
}
.bsl-tools-tree .correct {
background-color: var(--correct-background);
transition: none;
}
`;function _e(e,r,t,n=!1,s="en"){if(t||(t=jr(e)),!document.getElementById("bsl-tools-tree-style")){let l=document.createElement("style");l.innerHTML=_t,l.id="bsl-tools-tree-style",document.getElementsByTagName("head")[0].appendChild(l)}Rt.includes(s)||(console.error(`
Selected language "${s}" is not implemented, defaulting to "en".
Available language codes: ${Rt.join(", ")}
`),s="en"),r.innerHTML=`
<div class="bsl-tools-tree-container">
<ul class="bsl-tools-tree">
${n?Bt(e,s,t):$t(e,t)}
</ul>
</div>`,n&&w([r],"ul/li/ul/li").map(l=>l.setAttribute("data-collapsed","false")),Re(r)}function jr(e){let r={};return Lt(e,r),r}function Lt(e,r){r[e.production]=[],e.holes.map(t=>Lt(t.content,r))}var Rt=["en","de"],Pt={en:{"select production":"Select production","mark selected text as hole":"Mark selected text as subexpression"},de:{"select production":"Produktion ausw\xE4hlen","mark selected text as hole":"Auswahl als Teilausdruck markieren"}};function Re(e){let r=parseFloat(getComputedStyle(e).fontSize)*3;for(let t=1;;t++){let n=Array.from(e.getElementsByClassName(`hole-${t}`));if(n.length<1)return;n.map(s=>{let l=s,c=.5*(l.getBoundingClientRect().x+l.getBoundingClientRect().right);if(c==0)return;let p=ne(l,"li");!p||w([p],`ul/.child-${t}/span`).map(d=>{let S=d,g=.5*(S.getBoundingClientRect().x+S.getBoundingClientRect().right),f=c-g,b=-Math.atan2(r,f),h=Math.sqrt(f*f+r*r),_=f/2-h/2;S.style.cssText=`
--connector-width: ${h}px;
--connector-left: calc(50% + ${_}px);
--edgetext-right: calc(50% - ${f/2}px);
--connector-transform: rotate(${b}rad);
`})})}}function $t(e,r,t=-1){return`
<li class="${t>=0?`child-${t+1}`:""}"
data-collapsed="${t>=0?"true":"false"}">
<span class="${e.holes.length>0?"":"terminal-symbol"}">
${It(e,r)}
${At(e)}
</span>
${e.holes.length>0?`<ul>${e.holes.map((n,s)=>$t(n.content,r,s)).join("")}</ul>`:""}
</li>
`}function At(e){return`
<div class="code">${qr(e).map(t=>`<span class="char ${t.pos?`hole hole-${t.pos}`:""}"
${t.pos?`onclick="toggleChild(event,${t.pos})"`:""}
>${e.code.slice(t.start,t.end)}</span>`).join("")}
</div>
`}window.toggleChild=(e,r)=>{let t=e.target,n=ne(t,"li"),s=U(t,"bsl-tools-tree");if(!n||!s){console.error("toggleChild called from .hole not in .bsl-tools-tree");return}w([n],`ul/.child-${r}`).map(l=>{l.setAttribute("data-collapsed",l.getAttribute("data-collapsed")==="true"?"false":"true")}),Re(s)};function qr(e){let r=[],t=0;for(let n=0;n<e.holes.length;n++)e.holes[n].start>t&&r.push({pos:!1,start:t,end:e.holes[n].start}),r.push(W({pos:n+1},e.holes[n])),t=e.holes[n].end;return t<e.code.length&&r.push({pos:!1,start:t,end:e.code.length}),r}function It(e,r){return`
<div class="name">${B(e.production)}${r[e.production]&&r[e.production].length>0?`<div class="tooltip">::= ${r[e.production].map(B).join("<br> | ")}</div>`:""}</div>
`}function Bt(e,r,t,n=-1){return`
<li class="${n>=0?`child-${n+1}`:""}"
data-collapsed="${n>=0?"true":"false"}">
<span class="${e.holes.length>0?"":"terminal-symbol"}"
data-quiz-state="${n>=0?"production":"done"}"
data-is-terminal="${e.holes.length<=0}"
data-is-trivial-hole="${e.holes.length===1&&e.holes[0].start===0&&e.holes[0].end===e.code.length}">
${Kr(e,r,t)}
${Wr(e,r)}
${It(e,t)}
${At(e)}
</span>
${e.holes.length>0?`<ul>${e.holes.map((s,l)=>Bt(s.content,r,t,l)).join("")}</ul>`:""}
</li>
`}function Kr(e,r,t){return`
<div class="production">
<select onchange="checkProduction(event, '${e.production}')">
<option selected="true">${Pt[r]["select production"]}</option>
${Object.keys(t).map(n=>`
<option value="${n}">${B(n)}</option>
`).join("")}
</select>
</div>
`}window.checkProduction=(e,r)=>{let t=e.target;if(t.value===r){let n=ne(t,"span");if(n){n.getAttribute("data-is-terminal")==="true"?n.setAttribute("data-quiz-state","done"):n.getAttribute("data-is-trivial-hole")==="true"?(n.setAttribute("data-quiz-state","done"),w([n],"+/li",!0).map(l=>l.setAttribute("data-collapsed","false"))):n.setAttribute("data-quiz-state","hole-marking"),w([n],"../+").map(l=>l.setAttribute("data-collapsed","false"));let s=U(n,"bsl-tools-tree");s&&Re(s)}}else{Array.from(t.selectedOptions).map(s=>s.remove());let n=ne(t,"span");n&&(n.classList.add("wrong"),window.setTimeout(()=>{n.classList.remove("wrong")},100))}};function Wr(e,r){return`
<div class="hole-marking"
data-holes="${btoa(JSON.stringify(e.holes.map(t=>[t.start,t.end,!1])))}">
<div class="textarea-container">
<div class="marker-container">
${e.code.split(`
`).map(t=>t.split("").map(n=>`<span class="char marker">${n}</span>`).join("")).join('<span class="char marker"></span><br>')}
</div>
<textarea autocorrect="off"
spellcheck="false"
cols="${e.code.split(`
`).map(t=>t.length).reduce((t,n)=>t>n?t:n)}"
rows="${e.code.split(`
`).length}"
oninput="stopInput(event, '${btoa(e.code)}')">${e.code}</textarea>
</div><br>
<button onclick="checkSelection(event)">
${Pt[r]["mark selected text as hole"]}
</button>
</div>
`}window.stopInput=(e,r)=>{e.target.value=atob(r)};window.checkSelection=e=>{let r=e.target,t=U(r,"hole-marking");if(!t){console.error("checkProduction called from el. not wrapped in div.hole-marking");return}let n=JSON.parse(atob(t.getAttribute("data-holes"))),s=t.getElementsByTagName("textarea")[0],l=s.selectionStart,c=s.selectionEnd,p=l<c?l:c,d=l<c?c:l,S=-1;if(n.map((g,f)=>{g[0]===p&&g[1]===d&&(g[2]=!0,S=f)}),S>=0)t.setAttribute("data-holes",btoa(JSON.stringify(n))),w([t],".textarea-container/.marker-container/.marker",!0).slice(p,d).map(g=>g.classList.add("correct"));else{let g=w([t],".textarea-container/.marker-container/.marker",!0).slice(p,d);g.map(f=>f.classList.add("wrong")),window.setTimeout(()=>{g.map(f=>f.classList.remove("wrong"))},100)}if(n.every(g=>g[2])){let g=ne(t,"span");if(g){g.setAttribute("data-quiz-state","done"),w([g],"../ul/.child-1").map(b=>b.setAttribute("data-collapsed","false"));let f=U(g,"bsl-tools-tree");f&&Re(f)}}};function je(e,r,t){return t=t||" ",e.length>r?e:(r-=e.length,t+=t.repeat(r),e+t.slice(0,r))}var K=class extends Error{constructor(t,n,s,l){super();this.message=t,this.expected=n,this.found=s,this.location=l,this.name="SyntaxError",typeof Object.setPrototypeOf=="function"?Object.setPrototypeOf(this,K.prototype):this.__proto__=K.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,K)}static buildMessage(t,n){function s(g){return g.charCodeAt(0).toString(16).toUpperCase()}function l(g){return g.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,f=>"\\x0"+s(f)).replace(/[\x10-\x1F\x7F-\x9F]/g,f=>"\\x"+s(f))}function c(g){return g.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,f=>"\\x0"+s(f)).replace(/[\x10-\x1F\x7F-\x9F]/g,f=>"\\x"+s(f))}function p(g){switch(g.type){case"literal":return'"'+l(g.text)+'"';case"class":let f=g.parts.map(b=>Array.isArray(b)?c(b[0])+"-"+c(b[1]):c(b));return"["+(g.inverted?"^":"")+f+"]";case"any":return"any character";case"end":return"end of input";case"other":return g.description}}function d(g){let f=g.map(p),b,h;if(f.sort(),f.length>0){for(b=1,h=1;b<f.length;b++)f[b-1]!==f[b]&&(f[h]=f[b],h++);f.length=h}switch(f.length){case 1:return f[0];case 2:return f[0]+" or "+f[1];default:return f.slice(0,-1).join(", ")+", or "+f[f.length-1]}}function S(g){return g?'"'+l(g)+'"':"end of input"}return"Expected "+d(t)+" but "+S(n)+" found."}format(t){let n="Error: "+this.message;if(this.location){let s=null,l;for(l=0;l<t.length;l++)if(t[l].source===this.location.source){s=t[l].text.split(/\r\n|\n|\r/g);break}let c=this.location.start,p=this.location.source+":"+c.line+":"+c.column;if(s){let d=this.location.end,S=je("",c.line.toString().length," "),g=s[c.line-1],f=c.line===d.line?d.column:g.length+1;n+=`
--> `+p+`
`+S+` |
`+c.line+" | "+g+`
`+S+" | "+je("",c.column-1," ")+je("",f-c.column,"^")}else n+=`
at `+p}return n}};function Jr(e,r){r=r!==void 0?r:{};let t={},n=r.grammarSource,s={Program:gt},l=gt,c=function(o){return o},p=/^[\t \n \r]/,d=he([" "," ",`
`," ","\r"],!1,!1),S=function(o){return o},g="(define-struct",f=I("(define-struct",!1),b="(",h=I("(",!1),_=")",A=I(")",!1),ie=function(o,a){return{type:"Struct Definition",binding:o,properties:a}},D="(define",le=I("(define",!1),Te=function(o,a,u){return{type:"Function Definition",name:o,args:a,body:u}},N=function(o,a){return{type:"Constant Definition",name:o,value:a}},V=function(o){return o},G="(cond",er=I("(cond",!1),tr=function(o){return{type:"Cond-Expression",options:o}},rr="[",nr=I("[",!1),or="]",sr=I("]",!1),ir=function(o,a){return{type:"Cond-Option",condition:o,result:a}},lr=function(o,a){return{type:"Function Call",name:o,args:a}},Ze="define",ar=I("define",!1),et=/^[^",'`()[\]{}|#\n\t\r ]/,tt=he(['"',",","'","`","(",")","[","]","{","}","|","#",`
`," ","\r"," "],!0,!1),cr=function(o){return{type:"Symbol",symbol:o.join("")}},ur=function(o){return{type:"Literal Value",value:o}},rt=/^[0-9]/,nt=he([["0","9"]],!1,!1),pr=function(){return parseInt(Cr(),10)},ot="#true",dr=I("#true",!1),st="#false",fr=I("#false",!1),it="#t",mr=I("#t",!1),lt="#f",Sr=I("#f",!1),gr=function(o){return o==="#true"||o==="#t"},at="'()",yr=I("'()",!1),Tr=function(){return"'()"},ct='"',ut=I('"',!1),pt=/^[^"]/,dt=he(['"'],!0,!1),xr=function(o){return o.join("")},br=ft("whitespace"),hr=function(){},i=0,C=0,xe=[{line:1,column:1}],H=0,Ve=[],T=0,be;if(r.startRule!==void 0){if(!(r.startRule in s))throw new Error(`Can't start parsing from rule "`+r.startRule+'".');l=s[r.startRule]}function Cr(){return e.substring(C,i)}function Kn(){return de(C,i)}function Wn(o,a){throw a=a!==void 0?a:de(C,i),St([ft(o)],e.substring(C,i),a)}function Jn(o,a){throw a=a!==void 0?a:de(C,i),vr(o,a)}function I(o,a){return{type:"literal",text:o,ignoreCase:a}}function he(o,a,u){return{type:"class",parts:o,inverted:a,ignoreCase:u}}function Gn(){return{type:"any"}}function Er(){return{type:"end"}}function ft(o){return{type:"other",description:o}}function mt(o){let a=xe[o],u;if(a)return a;for(u=o-1;!xe[u];)u--;for(a=xe[u],a={line:a.line,column:a.column};u<o;)e.charCodeAt(u)===10?(a.line++,a.column=1):a.column++,u++;return xe[o]=a,a}function de(o,a){let u=mt(o),m=mt(a);return{source:n,start:{offset:o,line:u.line,column:u.column},end:{offset:a,line:m.line,column:m.column}}}function x(o){i<H||(i>H&&(H=i,Ve=[]),Ve.push(o))}function vr(o,a){return new K(o,[],"",a)}function St(o,a,u){return new K(K.buildMessage(o,a),o,a,u)}function gt(){let o,a,u;if(o=i,a=[],u=yt(),u!==t)for(;u!==t;)a.push(u),u=yt();else a=t;return a!==t&&(C=o,a=c(a)),o=a,o}function yt(){let o,a,u,m;if(o=i,a=_r(),a===t&&(a=Q()),a!==t){if(u=[],p.test(e.charAt(i))?(m=e.charAt(i),i++):(m=t,T===0&&x(d)),m!==t)for(;m!==t;)u.push(m),p.test(e.charAt(i))?(m=e.charAt(i),i++):(m=t,T===0&&x(d));else u=t;u!==t?(C=o,a=c(a),o=a):(i=o,o=t)}else i=o,o=t;return o}function _r(){let o,a,u;return o=i,a=L(),a!==t?(u=Rr(),u===t&&(u=Lr(),u===t&&(u=Pr())),u!==t?(C=o,a=S(u),o=a):(i=o,o=t)):(i=o,o=t),o}function Rr(){let o,a,u,m,y,M,R,P,X;if(o=i,e.substr(i,14)===g?(a=g,i+=14):(a=t,T===0&&x(f)),a!==t)if(u=O(),u!==t)if(m=L(),m!==t)if(e.charCodeAt(i)===40?(y=b,i++):(y=t,T===0&&x(h)),y!==t){if(M=[],R=O(),R!==t)for(;R!==t;)M.push(R),R=O();else M=t;M!==t?(e.charCodeAt(i)===41?(R=_,i++):(R=t,T===0&&x(A)),R!==t?(P=L(),P!==t?(e.charCodeAt(i)===41?(X=_,i++):(X=t,T===0&&x(A)),X!==t?(C=o,a=ie(u,M),o=a):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)}else i=o,o=t;else i=o,o=t;else i=o,o=t;else i=o,o=t;return o}function Lr(){let o,a,u,m,y,M,R,P,X,Oe;if(o=i,e.substr(i,7)===D?(a=D,i+=7):(a=t,T===0&&x(le)),a!==t)if(u=L(),u!==t)if(e.charCodeAt(i)===40?(m=b,i++):(m=t,T===0&&x(h)),m!==t)if(y=O(),y!==t)if(M=L(),M!==t){if(R=[],P=O(),P!==t)for(;P!==t;)R.push(P),P=O();else R=t;R!==t?(e.charCodeAt(i)===41?(P=_,i++):(P=t,T===0&&x(A)),P!==t?(X=Q(),X!==t?(e.charCodeAt(i)===41?(Oe=_,i++):(Oe=t,T===0&&x(A)),Oe!==t?(C=o,a=Te(y,R,X),o=a):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)}else i=o,o=t;else i=o,o=t;else i=o,o=t;else i=o,o=t;else i=o,o=t;return o}function Pr(){let o,a,u,m,y;return o=i,e.substr(i,7)===D?(a=D,i+=7):(a=t,T===0&&x(le)),a!==t?(u=O(),u!==t?(m=Q(),m!==t?(e.charCodeAt(i)===41?(y=_,i++):(y=t,T===0&&x(A)),y!==t?(C=o,a=N(u,m),o=a):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t),o}function Q(){let o,a,u;return o=i,a=L(),a!==t?(u=Ir(),u===t&&(u=$r(),u===t&&(u=Ar(),u===t&&(u=O()))),u!==t?(C=o,a=V(u),o=a):(i=o,o=t)):(i=o,o=t),o}function $r(){let o,a,u,m,y;if(o=i,e.substr(i,5)===G?(a=G,i+=5):(a=t,T===0&&x(er)),a!==t){if(u=[],m=Tt(),m!==t)for(;m!==t;)u.push(m),m=Tt();else u=t;u!==t?(m=L(),m!==t?(e.charCodeAt(i)===41?(y=_,i++):(y=t,T===0&&x(A)),y!==t?(C=o,a=tr(u),o=a):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)}else i=o,o=t;return o}function Tt(){let o,a,u,m,y,M,R,P;return o=i,a=L(),a!==t?(e.charCodeAt(i)===91?(u=rr,i++):(u=t,T===0&&x(nr)),u!==t?(m=L(),m!==t?(y=Q(),y!==t?(M=L(),M!==t?(R=Q(),R!==t?(e.charCodeAt(i)===93?(P=or,i++):(P=t,T===0&&x(sr)),P!==t?(C=o,a=ir(y,R),o=a):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t)):(i=o,o=t),o}function Ar(){let o,a,u,m,y;if(o=i,e.charCodeAt(i)===40?(a=b,i++):(a=t,T===0&&x(h)),a!==t)if(u=O(),u!==t){for(m=[],y=Q();y!==t;)m.push(y),y=Q();m!==t?(e.charCodeAt(i)===41?(y=_,i++):(y=t,T===0&&x(A)),y!==t?(C=o,a=lr(u,m),o=a):(i=o,o=t)):(i=o,o=t)}else i=o,o=t;else i=o,o=t;return o}function O(){let o,a,u,m,y;if(o=i,a=L(),a!==t)if(u=i,T++,e.substr(i,6)===Ze?(m=Ze,i+=6):(m=t,T===0&&x(ar)),T--,m===t?u=void 0:(i=u,u=t),u!==t){if(m=[],et.test(e.charAt(i))?(y=e.charAt(i),i++):(y=t,T===0&&x(tt)),y!==t)for(;y!==t;)m.push(y),et.test(e.charAt(i))?(y=e.charAt(i),i++):(y=t,T===0&&x(tt));else m=t;m!==t?(C=o,a=cr(m),o=a):(i=o,o=t)}else i=o,o=t;else i=o,o=t;return o}function Ir(){let o,a;return o=i,a=Br(),a===t&&(a=wr(),a===t&&(a=Ur(),a===t&&(a=kr()))),a!==t&&(C=o,a=ur(a)),o=a,o}function Br(){let o,a,u,m;if(o=i,a=L(),a!==t){if(u=[],rt.test(e.charAt(i))?(m=e.charAt(i),i++):(m=t,T===0&&x(nt)),m!==t)for(;m!==t;)u.push(m),rt.test(e.charAt(i))?(m=e.charAt(i),i++):(m=t,T===0&&x(nt));else u=t;u!==t?(C=o,a=pr(),o=a):(i=o,o=t)}else i=o,o=t;return o}function wr(){let o,a,u;return o=i,a=L(),a!==t?(e.substr(i,5)===ot?(u=ot,i+=5):(u=t,T===0&&x(dr)),u===t&&(e.substr(i,6)===st?(u=st,i+=6):(u=t,T===0&&x(fr)),u===t&&(e.substr(i,2)===it?(u=it,i+=2):(u=t,T===0&&x(mr)),u===t&&(e.substr(i,2)===lt?(u=lt,i+=2):(u=t,T===0&&x(Sr))))),u!==t?(C=o,a=gr(u),o=a):(i=o,o=t)):(i=o,o=t),o}function Ur(){let o,a,u;return o=i,a=L(),a!==t?(e.substr(i,3)===at?(u=at,i+=3):(u=t,T===0&&x(yr)),u!==t?(C=o,a=Tr(),o=a):(i=o,o=t)):(i=o,o=t),o}function kr(){let o,a,u,m,y;if(o=i,a=L(),a!==t)if(e.charCodeAt(i)===34?(u=ct,i++):(u=t,T===0&&x(ut)),u!==t){if(m=[],pt.test(e.charAt(i))?(y=e.charAt(i),i++):(y=t,T===0&&x(dt)),y!==t)for(;y!==t;)m.push(y),pt.test(e.charAt(i))?(y=e.charAt(i),i++):(y=t,T===0&&x(dt));else m=t;m!==t?(e.charCodeAt(i)===34?(y=ct,i++):(y=t,T===0&&x(ut)),y!==t?(C=o,a=xr(m),o=a):(i=o,o=t)):(i=o,o=t)}else i=o,o=t;else i=o,o=t;return o}function L(){let o,a,u;for(T++,o=i,a=[],p.test(e.charAt(i))?(u=e.charAt(i),i++):(u=t,T===0&&x(d));u!==t;)a.push(u),p.test(e.charAt(i))?(u=e.charAt(i),i++):(u=t,T===0&&x(d));return a!==t&&(C=o,a=hr()),o=a,T--,o===t&&(a=t,T===0&&x(br)),o}if(be=l(),be!==t&&i===e.length)return be;throw be!==t&&i<e.length&&x(Er()),St(Ve,H<e.length?e.charAt(H):null,H<e.length?de(H,H+1):de(H,H))}var Le=Jr;var wt=`/* css for errors */
.error-wrapper{
display:flex;
flex-direction:column;
margin:2vw;
font-size:inherit;
}
.error{
font-size:1.2em;
}
`;function Ut(){Array.from(document.getElementsByTagName("bsltree")).map(e=>{try{let r=Le(re(e.innerHTML)),t=Yr(r),n=e.getAttribute("quiz")==="true",s=e.getAttribute("lang")?e.getAttribute("lang"):void 0;_e(t,e,Xr,n,s)}catch(r){Qr(e,`${r.location.start.line}:${r.location.start.column} ${r}`)}})}function Qr(e,r){if(!document.getElementById("bsl-tools-error-style")){let d=document.createElement("style");d.innerHTML=wt,d.id="bsl-tools-error-style",document.getElementsByTagName("head")[0].appendChild(d)}let t=e.innerHTML;e.innerHTML="";let n=document.createElement("div");n.classList.add("error-wrapper"),e.appendChild(n);let s=`<p> BSL-Tree could not be parsed! </p>
<p> Input: <b style="font-size:0.9em;">${t}</b> </p>`,l=document.createElement("div");l.classList.add("origin"),l.innerHTML=s,n.appendChild(l);let c=document.createElement("pre");c.classList.add("error");let p=document.createElement("code");p.textContent=r,n.appendChild(c),c.appendChild(p)}var Xr={"<program>":["<def-or-expr>*"],"<def-or-expr>*":[],"<def-or-expr>":["<definition>","<e>"],"<definition>":["(define (<name> <name>+) <e>)","(define <name> <e>)","(define-struct <name> (<name>*))"],"<e>":["(name <e>*)","(cond {[<e>,<e>]}+)","<name>","<v>"],"<e>*":[],"{[ <e> <e> ]}+":[],"[ <e> <e> ]":[],"<name>*":[],"<name>+":[],"<name>":[],"<v>":[]};function Yr(e){let r=e.map(ae),t=[],n="";for(let s=0;s<r.length;s++){s>0&&(n=`${n}
`);let l=n.length;n=`${n}${r[s]}`;let c=n.length;t.push({start:l,end:c})}return{production:"<program>",code:n,holes:[{start:0,end:n.length,content:{production:"<def-or-expr>*",code:n,holes:t.map((s,l)=>({start:s.start,end:s.end,content:Zr(e[l])}))}}]}}function Zr(e){let r=ae(e);return{production:"<def-or-expr>",code:r,holes:[{start:0,end:r.length,content:Ce(e)?en(e):ue(e)}]}}function en(e){let r="",t=[];if(Y(e)){r="(define (";let n=r.length;r=`${r}${E(e.name)}`,t.push({start:n,end:r.length,content:oe(e.name)}),r=`${r} `,n=r.length,r=`${r}${e.args.map(E).join(" ")}`,t.push({start:n,end:r.length,content:tn(e.args)}),r=`${r}) `,n=r.length,r=`${r}${v(e.body)}`,t.push({start:n,end:r.length,content:ue(e.body)}),r=`${r})`}else if(z(e)){r="(define ";let n=r.length;r=`${r}${E(e.name)}`,t.push({start:n,end:r.length,content:oe(e.name)}),r=`${r} `,n=r.length,r=`${r}${v(e.value)}`,t.push({start:n,end:r.length,content:ue(e.value)}),r=`${r})`}else{r="(define-struct ";let n=r.length;r=`${r}${E(e.binding)}`,t.push({start:n,end:r.length,content:oe(e.binding)}),r=`${r} (`,n=r.length,r=`${r}${e.properties.map(E).join(" ")}`,t.push({start:n,end:r.length,content:rn(e.properties)}),r=`${r}))`}return{production:"<definition>",code:r,holes:t}}function ue(e){let r="",t=[];if(J(e)){r="(";let n=r.length;r=`${r}${E(e.name)}`,t.push({start:n,end:r.length,content:oe(e.name)}),r=`${r} `,n=r.length,r=`${r}${e.args.map(v).join(" ")}`,t.push({start:n,end:r.length,content:nn(e.args)}),r=`${r})`}else if(Z(e)){r="(cond ";let n=r.length;r=`${r}${e.options.map(ee).join(" ")}`,t.push({start:n,end:r.length,content:on(e.options)}),r=`${r})`}else j(e)?(r=E(e),t.push({start:0,end:r.length,content:oe(e)})):(r=v(e),t.push({start:0,end:r.length,content:ln(e)}));return{production:"<e>",code:r,holes:t}}function oe(e){return{production:"<name>",code:E(e),holes:[]}}function tn(e){e.length<1&&console.error("<name>+ but used but names are empty");let r="",t=[];for(let n=0;n<e.length;n++){let s=r.length;r=`${r}${E(e[n])}`,t.push({start:s,end:r.length,content:oe(e[n])}),n<e.length-1&&(r=`${r} `)}return{production:"<name>+",code:r,holes:t}}function rn(e){let r="",t=[];for(let n=0;n<e.length;n++){let s=r.length;r=`${r}${E(e[n])}`,t.push({start:s,end:r.length,content:oe(e[n])}),n<e.length-1&&(r=`${r} `)}return{production:"<name>*",code:r,holes:t}}function nn(e){let r="",t=[];for(let n=0;n<e.length;n++){let s=r.length;r=`${r}${v(e[n])}`,t.push({start:s,end:r.length,content:ue(e[n])}),n<e.length-1&&(r=`${r} `)}return{production:"<e>*",code:r,holes:t}}function on(e){let r="",t=[];for(let n=0;n<e.length;n++){let s=r.length;r=`${r}${ee(e[n])}`,t.push({start:s,end:r.length,content:sn(e[n])}),n<e.length-1&&(r=`${r} `)}return{production:"{[ <e> <e> ]}+",code:r,holes:t}}function sn(e){let r="",t=[];r=`${r}[`;let n=r.length;return r=`${r}${v(e.condition)}`,t.push({start:n,end:r.length,content:ue(e.condition)}),r=`${r} `,n=r.length,r=`${r}${v(e.result)}`,t.push({start:n,end:r.length,content:ue(e.result)}),r=`${r}]`,{production:"[ <e> <e> ]",code:r,holes:t}}function ln(e){return{production:"<v>",code:v(e),holes:[]}}function kt(){Array.from(document.getElementsByTagName("jsontree")).map(e=>{try{let r=an(re(e.innerHTML)),t=r.root,n=r.grammar,s=e.getAttribute("quiz")==="true",l=e.getAttribute("lang")?e.getAttribute("lang"):void 0;_e(t,e,n,s,l)}catch(r){console.error(r),e.innerHTML=`${r}`,e.style.cssText=`
padding: 2em;
color: darkred;
display: block;
`}})}function an(e){let r=JSON.parse(e.trim()),t=r.grammar;return{root:Ft(r),grammar:t}}function Ft(e){let r=e.production;if(!r||typeof r!="string")throw`${qe(e)}<br> has wrong structure, production needs to be a string`;let t=e.code;if(!t||typeof t!="string")throw`${qe(e)}<br> has wrong structure, code needs to be a string`;e.holes||(e.holes=[]);let n=t.split("|"),s="",l=[];for(let c=0;c<n.length;c++)if(s=`${s}${n[c]}`,c++,c<n.length&&n[c]){let p=s.length;s=`${s}${n[c]}`;let d=e.holes[l.length];if(!d)throw`${qe(e)}<br> has wrong structure: less holes than marked with || in the code`;l.push({start:p,end:s.length,content:Ft(d)})}return{production:r,code:s,holes:l}}function qe(e){let r=JSON.stringify(e,void 0,2);return`
<textarea rows="${r.split(`
`).length}"
cols="${r.split(`
`).map(t=>t.length).reduce((t,n)=>t>n?t:n)}"
readOnly="true"
resizable="false">${r}</textarea>
`}var Ke=(f=>(f.Add="+",f.Sub="-",f.Mul="*",f.Div="/",f.And="and",f.Or="or",f.Not="not",f.Leq="<=",f.Geq=">=",f.Lt="<",f.Gt=">",f))(Ke||{});function Pe(e){return e.type==="DefinitionStep"}function $e(e){return e.type==="EvalStep"}function me(e){return e.type==="CallRedex"}function Se(e){return e.type==="CondRedex"}function ge(e){return e.type==="NameRedex"}function Ae(e){return e.type==="Hole"}function Ie(e){return e.type==="AppContext"}function Be(e){return e.type==="CondContext"}function we(e){return e.type==="Split"}function Dt(e){return e.type==="Prim"||e.type==="PrimError"||e.type==="CondTrue"||e.type==="CondFalse"||e.type==="CondError"||e.type==="Const"||e.type==="ConstError"||e.type==="Fun"||e.type==="FunError"||e.type==="StructMake"||e.type==="StructMakeError"||e.type==="StructPredTrue"||e.type==="StructPredFalse"||e.type==="StructPredError"||e.type==="StructSelect"||e.type==="StructSelectError"}function We(e){return e.type==="Kong"}function k(e){return typeof e=="number"||typeof e=="string"||typeof e=="boolean"||e==="'()"||q(e)}function Mt(e){return e.type==="PrimDef"}function Je(e){return e.type==="FunEnv"}function Nt(e){return e.type==="StructDef"}function ye(e){return e.type==="Identifier"}function Ht(e){return e.type==="MakeFun"||e.type==="PredFun"||e.type==="SelectFun"}function Vt(e){return e.type==="MakeFun"}function Ot(e){return e.type==="PredFun"}function jt(e){let r=Tn();if(r instanceof Error)return r;let t=r,n=e.map(d=>{let S=cn(d,t);return S instanceof Error||(t=S.env),S});if(n.some(d=>d instanceof Error))return n.find(d=>d instanceof Error);let l=n.some(d=>d.result instanceof Error),c=l?n.findIndex(d=>d.result instanceof Error):-1,p=l?n.slice(0,c+1):n;return{type:"Stepper",originProgram:e,progSteps:p}}function cn(e,r){if(Ee(e)){let t=qt(e,r);if(t instanceof Error)return t;if(t.length===0)return{type:"ExprStep",env:r,evalSteps:[],originalDefOrExpr:e,result:Kt(e,r)};{let n=t[t.length-1].result;return Ee(n)?new Error("Result is not a value"):{type:"ExprStep",env:t[t.length-1].env,evalSteps:t,originalDefOrExpr:e,result:n}}}else return un(e,r)}function un(e,r){if(z(e)){let s=e.name,l=e.value;if($(l)){let c=l.value,p=se(r,s.symbol,c),d=p instanceof Error,S=d?{type:"ProgError",result:p}:{type:"Prog",result:e};return{type:"DefinitionStep",env:d?r:p,rule:S,evalSteps:[],originalDefOrExpr:e,result:d?p:e}}else{let c=qt(l,r);if(c instanceof Error)return c;let p=c[c.length-1].result;if(k(p)){let d=se(r,s.symbol,p),S=d instanceof Error,g={type:"Constant Definition",name:s,value:{type:"Literal Value",value:p}},f=S?{type:"ProgError",result:d}:{type:"Prog",result:g};return{type:"DefinitionStep",env:S?r:d,rule:f,evalSteps:c,originalDefOrExpr:e,result:g}}else return p instanceof Error?{type:"DefinitionStep",env:r,rule:{type:"ProgError",result:p},evalSteps:c,originalDefOrExpr:e,result:p}:new Error("Neither a value nor an error; Could not evaluate expression with call-by-value")}}else if(Y(e)){let s=e.name,l={type:"FunEnv",params:e.args,body:e.body},c=se(r,s.symbol,l),p=c instanceof Error,d=p?{type:"ProgError",result:c}:{type:"Prog",result:e};return{type:"DefinitionStep",env:p?r:c,rule:d,evalSteps:[],originalDefOrExpr:e,result:p?c:e}}else{let s=e.binding,l=e.properties,c={type:"StructDef",properties:l},p=se(r,s.symbol,c);if(p instanceof Error)return{type:"DefinitionStep",env:r,rule:{type:"ProgError",result:p},evalSteps:[],originalDefOrExpr:e,result:p};let d=t(s,c),S=n(p,d),g=S instanceof Error,f=g?{type:"ProgError",result:S}:{type:"Prog",result:e};return{type:"DefinitionStep",env:g?r:S,evalSteps:[],rule:f,originalDefOrExpr:e,result:g?S:e}}function t(s,l){let c=l.properties,p=`make-${s.symbol}`,d={type:"MakeFun",structDef:l},S=`${s.symbol}?`,g={type:"PredFun",structDef:l},f=[];c.map(_=>{f.push(`${s.symbol}-${_.symbol}`)});let b={type:"SelectFun",structDef:l},h=[[p,d],[S,g]];return f.forEach(_=>{h.push([_,b])}),h}function n(s,l){console.log("funDefs: ",l);let c=s;for(let p=0;p<l.length;p++){let d=l[p];if(c=se(c,d[0],d[1]),c instanceof Error)return c}return c}}function qt(e,r){let t=[],n=e;for(;!k(n);){let s=Kt(n,r);if(k(s))n=s;else if($e(s))if(s.result instanceof Error){t.push(s);break}else n=s.result,t.push(s);else return s}return t}function Kt(e,r){if($(e))return e.value;{let t=Qe(e);if(we(t)){let n=pn(t.redex,r);if(Dt(n)){let s=Wt(n,t.context,r);return $e(s),s}else return n}else return t}}function Qe(e){let r={type:"Hole"};if(J(e)){let t=e.name,n=e.args;if(n.every(S=>$(S))){let S={type:"CallRedex",name:t,args:n.map(g=>g.value)};return{type:"Split",redex:S,context:r}}let s=n.findIndex(S=>!$(S)),l=n.slice(0,s),c=n[s],p=n.slice(s+1),d=Qe(c);return we(d)?{type:"Split",redex:d.redex,context:{type:"AppContext",op:t,values:l.map(S=>S.value),ctx:d.context,args:p}}:d}else if(Z(e)){let t=e.options[0];if($(t.condition))return{type:"Split",redex:{type:"CondRedex",options:e.options},context:r};{let n=Qe(t.condition);return we(n)?{type:"Split",redex:n.redex,context:{type:"CondContext",options:e.options,ctx:n.context}}:n}}else return j(e)?{type:"Split",context:r,redex:{type:"NameRedex",symbol:e.symbol}}:Error("split: neither a call nor a cond nor name")}function pn(e,r){if(me(e))if(e.args.every(k)){let n=e.args,s=Fe(r,e.name.symbol);if(Mt(s)){let l=dn(e.name,n);return l instanceof Error?{type:"PrimError",redex:e,result:l}:{type:"Prim",redex:e,result:l}}else if(Je(s)){let l=mn(e,r);return l instanceof Error?{type:"FunError",redex:e,result:l}:{type:"Fun",redex:e,result:l}}else if(Ht(s))if(Vt(s)){let l=Sn(e.name,s,n,r);return l instanceof Error?{type:"StructMakeError",redex:e,result:l}:{type:"StructMake",redex:e,result:l}}else if(Ot(s)){let l=gn(e.name,s,n);return l instanceof Error?{type:"StructPredError",redex:e,result:l}:l?{type:"StructPredTrue",redex:e,result:l}:{type:"StructPredFalse",redex:e,result:l}}else{let l=yn(e.name,s,n);return l instanceof Error?{type:"StructSelectError",redex:e,result:l}:{type:"StructSelect",redex:e,result:l}}else return{type:"FunError",redex:e,result:Error(`function '${e.name.symbol}' is not in env`)}}else{let n=Ge(e,r);return n instanceof Error?{type:"ConstError",redex:e,result:n}:{type:"Const",redex:e,result:n}}else if(Se(e))if($(e.options[0].condition)){let t=fn(e);if(t===void 0){let n=e.options.slice(1);if(n.length<1)return{type:"CondError",redex:e,result:Error("'cond': all question results were false")};let s={type:"Cond-Expression",options:n};return{type:"CondFalse",redex:e,result:s}}else return Ee(t)||k(t)?{type:"CondTrue",redex:e,result:t}:{type:"CondError",redex:e,result:t}}else{let t=Ge(e,r);return t instanceof Error?{type:"ConstError",redex:e,result:t}:{type:"Const",redex:e,result:t}}else if(ge(e)){let t=Ge(e,r);return t instanceof Error?{type:"ConstError",redex:e,result:t}:{type:"Const",redex:e,result:t}}else return Error("step: redex is neither a call nor cond nor name")}function Wt(e,r,t){if(Ae(r))return{type:"EvalStep",env:t,rule:e,result:e.result};{let n=Wt(e,r.ctx,t);if($e(n)){if(n.result instanceof Error)return n;if(Ie(r)){let l=[r.values,n.result,r.args].flat().map(p=>k(p)?{type:"Literal Value",value:p}:ye(p)?{type:"Symbol",symbol:p.symbol}:p),c={type:"Function Call",name:r.op,args:l};return{type:"EvalStep",env:t,rule:{type:"Kong",context:r,redexRule:e},result:c}}else if(Be(r)){let s=r.options,l=k(n.result)?{type:"Literal Value",value:n.result}:n.result,p=[{type:"Cond-Option",condition:l,result:s[0].result},...s.slice(1)],d={type:"Cond-Expression",options:p};return{type:"EvalStep",env:t,rule:{type:"Kong",context:r,redexRule:e},result:d}}else return Error("plug: context is not an AppContext or CondContext")}else return n}}function dn(e,r){if(["+","*","-","/"].includes(e.symbol)&&!r.every(t=>typeof t=="number")){let t=r.find(n=>typeof n!="number");return Error(`argument '${t}' is not a number in function '${e.symbol}'`)}switch(e.symbol){case"+":return r.reduce((t,n)=>t+n);case"*":return r.reduce((t,n)=>t*n);case"-":return r.reduce((t,n)=>t-n);case"/":return r.slice(1).every(t=>t!=0)?r.reduce((t,n)=>t/n):Error(`division by zero in function '${e.symbol}'`);default:}if(["and","or","not"].includes(e.symbol)&&!r.every(t=>typeof t=="boolean")){let t=r.find(n=>typeof n!="boolean");return Error(`argument '${t}' is not a boolean in function '${e.symbol}'`)}switch(e.symbol){case"and":return r.length<2?Error(`function '${e.symbol}' needs at least two arguments`):r.every(t=>t);case"or":return r.length<2?Error(`function '${e.symbol}' needs at least two arguments`):r.some(t=>t);case"not":return r.length!==1?Error(`function '${e.symbol}' needs exactly one argument`):!r[0];default:}if(["<",">","<=",">="].includes(e.symbol)){if(r.length!==2)return Error(`function '${e.symbol}' needs exactly two arguments`);let t=r[0],n=r[1];if(typeof t!="number"||typeof n!="number")return Error(`function '${e.symbol}' needs two numbers, but received '${t}' and '${n}'`);switch(e.symbol){case"<":return t<n;case"<=":return t<=n;case">=":return t>=n;case">":return t>n;default:return!0}}else return Error(`function '${e.symbol}' is no implemented primitive function`)}function fn(e){let r=e.options[0];return $(r.condition)&&r.condition.value==!0?$(r.result)?r.result.value:r.result:$(r.condition)&&r.condition.value==!1?void 0:Error("'cond': condition is not a boolean")}function Ge(e,r){if(me(e)){let t=e.args.find(ye);if(!t)return Error("id: could not find an identifier in argument list");let n=ke(r,t.symbol);if(n instanceof Error)return n;let s=e.args.map(l=>ye(l)&&l.symbol===t.symbol?{type:"Literal Value",value:n}:ye(l)?{type:"Symbol",symbol:l.symbol}:{type:"Literal Value",value:l});return{type:"Function Call",name:e.name,args:s}}else if(Se(e)){let t=e.options[0].condition;if(!j(t))return Error("substConst: condition is not a name");let n=ke(r,t.symbol);if(n instanceof Error)return n;let s={type:"Literal Value",value:n},l={type:"Cond-Option",condition:s,result:e.options[0].result};return{type:"Cond-Expression",options:[l]}}else return ge(e)?ke(r,e.symbol):Error("substConst: redex is not a call or cond or name")}function mn(e,r){let t=xn(r,e.name.symbol);if(t instanceof Error)return t;let n=t.params;if(e.args.length!=n.length)return Error(`Arity mismatch in '${e.name.symbol}': number of arguments are not equal to number of parameters`);let s={};n.forEach((p,d)=>{let S=se(s,p.symbol,e.args[d]);if(S instanceof Error)return S;s=S});let l=t.body;return Ue(l,s)}function Sn(e,r,t,n){let s=r.structDef.properties,l=e.symbol.slice(5);return bn(n,l)instanceof Error?Error(`'${l}' not found in environment`):s.length==t.length?{type:"Struct Value",structDef:e,properties:t.map(d=>({type:"Literal Value",value:d}))}:Error(`Arity mismatch in '${e.symbol}: number of arguments does not match number of properties`)}function gn(e,r,t){let n=r.structDef.properties;if(t.length!=1)return Error(`'${e.symbol}' takes exactly one argument`);if(q(t[0])){let s=t[0],l=s.structDef.symbol.split("-")[1],c=e.symbol.split("?")[0];return l===c?n.length==s.properties.length:!1}else return!1}function yn(e,r,t){if(t.length!=1)return Error("selectStruct: number of arguments doesn't match");if(q(t[0])){let n=t[0],s=n.structDef.symbol.split("-")[1],l=e.symbol.split("-")[0],c=e.symbol.split("-")[1];if(s!==l)return Error("selectStruct: struct name doesn't match");{let p=r.structDef.properties.map(d=>d.symbol);if(p.includes(c)){let d=p.indexOf(c),S=n.properties[d];return $(S)?S.value:n.properties[d]}else return Error("selectStruct: property doesn't exist")}}else return Error("selectStruct: argument is not a struct value")}function Ue(e,r){if($(e))return e;if(j(e)){let t=ke(r,e.symbol);return t instanceof Error?t:{type:"Literal Value",value:t}}else if(J(e)){let t=e.args.map(n=>{let s=Ue(n,r);return s instanceof Error?n:s});return t.some(n=>n instanceof Error)?Error("substExpr: error in args"):{type:"Function Call",name:e.name,args:t}}else{let t=e.options.map(s=>{let l=Ue(s.condition,r),c=Ue(s.result,r);return l instanceof Error||c instanceof Error?Error("substExpr: error in cond"):{type:"Cond-Option",condition:l,result:c}});return t.some(s=>s instanceof Error)?Error("substExpr: error in cond"):{type:"Cond-Expression",options:t}}}function Tn(){let e={};return Object.entries(Ke).forEach(r=>{if(e instanceof Error)return e;e=se(e,r[1],{type:"PrimDef"})}),e===void 0?Error("initEnv: environment is undefined"):(e instanceof Error,e)}function se(e,r,t){if(e[r]===void 0){let n=W({},e);return n[r]=t,n}else return Error(`'${r}' already exists in environment`)}function Fe(e,r){return r in e?e[r]:Error(`'${r}' is not bound in environment`)}function ke(e,r){let t=Fe(e,r);return t instanceof Error||k(t)?t:Error("lookupConst: name is not bound to a Value")}function xn(e,r){let t=Fe(e,r);return t instanceof Error||Je(t)?t:Error("lookupFun: name is not bound to a Fun")}function bn(e,r){let t=Fe(e,r);return t instanceof Error||Nt(t)?t:Error("lookupStruct: name is not bound to a Struct")}var Jt=`/* ######### colors ####### */
.bsl-tools-stepper {
/* --branch-color: #666; */
--box-background: #ebf0f4; /* racket azure */
--box-border: #0d3657;
--button-border: #0d3657;
--text-grey: #444; /* like in scribble */
--hole-yellow: #fdf68d; /* pale yellow */
--hole-green: lightgreen;
--hole-red: lightpink;
--font-family-monospace: 'Fira Sans', monospace;
--font-family-rule-description: Palatino, Georgia, "Times New Roman", serif;
}
/* ####### general layout ####### */
div.bsl-tools-stepper {
text-align: center;
box-sizing: border-box;
}
/* ##### boxes ###### */
.bsl-tools-stepper .box {
text-align: left;
background-color: var(--box-background);
padding: 0.5em;
padding-top: 1em;
border: 1px solid var(--box-border);
border-radius: 0.5em;
position: relative;
margin-bottom: 1.5em;
}
.bsl-tools-stepper .boxlabel {
position: absolute;
top: -1em;
left: 0.5em;
padding: 0.25em;
border: 0px solid transparent;
border-radius: 0.25em;
background-color: var(--box-background);
color: var(--box-border);
}
/* single step */
.bsl-tools-stepper .step {
margin-bottom: 0.5em;
position: relative;
background-color: white;
padding: 0.5em;
}
/* ####### buttons ###### */
.bsl-tools-stepper .step[data-currentStep="true"] {
padding-top: 1.5em;
margin-top: 1.5em;
padding-bottom: 1.5em;
margin-bottom: 1.5em;
}
.bsl-tools-stepper .prev-button, .bsl-tools-stepper .next-button {
display: none;
}
.bsl-tools-stepper [data-currentStep="true"] .prev-button,
.bsl-tools-stepper [data-currentStep="true"] .next-button {
position: absolute;
display: inline-block;
right: 2em;
padding: 0.5em;
border: 1px solid var(--button-border);
background-color: white;
border-radius: 0.25em;
}
.bsl-tools-stepper .prev-button:hover, .bsl-tools-stepper .next-button:hover {
cursor: pointer;
}
.bsl-tools-stepper .prev-button {
top: -1em;
}
/* second child because of box label */
.bsl-tools-stepper .step:nth-child(2) .prev-button {
top: -3.5em;
}
.bsl-tools-stepper .next-button {
bottom: -1.25em;
}
.bsl-tools-stepper .step:last-child .next-button {
bottom: -3.25em;
}
.bsl-tools-stepper .step:last-child .info-toggle {
position: absolute;
right: 0;
bottom: -4em;
margin: 0;
background-color: white;
}
.bsl-tools-stepper .icon {
display: inline-block;
height: 1em;
}
.bsl-tools-stepper .split-result .icon {
opacity: 70%;
}
.bsl-tools-stepper [data-visible="false"] {
display: none;
}
/* ######### code and rules ####### */
.bsl-tools-stepper .code {
font-family: var(--font-family-monospace, monospace);
color: var(--text-grey);
}
.bsl-tools-stepper .plug-result {
position: relative;
z-index: 2;
}
.bsl-tools-stepper .hole {
display: inline-block;
background-color: var(--hole-yellow);
/* border: 1px solid var(--text-grey); */
color: var(--text-grey);
padding-left: 0.25em;
padding-right: 0.25em;
position: relative;
}
.bsl-tools-stepper .hole-result {
background-color: var(--hole-green);
}
.bsl-tools-stepper .hole-result.rule-hole {
padding: 0;
}
.bsl-tools-stepper .hole-error {
background-color: var(--hole-red);
}
.bsl-tools-stepper .rule {
display: inline-block;
position: relative;
padding-left: .5em;
width: fit-content;
white-space: nowrap;
margin-top: 1em;
margin-bottom: 1.5em;
}
.bsl-tools-stepper .kong {
position: absolute;
left: 0;
top: 0;
padding-left: 0;
background-color: rgba(255,255,255,0.5);
}
.bsl-tools-stepper .one-rule {
margin-left: var(--one-rule-margin-left, 4em);
}
.bsl-tools-stepper .rule-description {
font-family: var(--font-family-monospace, monospace);
}
/* arrow body */
.bsl-tools-stepper .left-arrowed::before {
position: absolute;
content: '';
left: 0;
top: -0.5em;
height: 2.5em;
border-left: 2px solid var(--text-grey);
z-index: -1;
}
.bsl-tools-stepper .kong::before {
left: 0.35em;
border-left: 2px dotted var(--text-grey);
}
/* arrow head */
.bsl-tools-stepper .left-arrowed::after {
position: absolute;
content: '';
left: calc(2px - 0.35em); /*-0.35em; /* ca. sqrt(2)/2 * 0.5em */
top: 1.5em;
width: 0.5em;
height: 0.5em;
border-right: 2px solid var(--text-grey);
border-bottom: 2px solid var(--text-grey);
transform: rotate(45deg);
}
.bsl-tools-stepper .kong::after {
left: 2px;
}
/* rule info */
.bsl-tools-stepper .info-toggle {
margin-top: 1em;
margin-bottom: 1.5em;
margin-left: 0.5em;
float: right;
}
.bsl-tools-stepper .info-toggle:hover {
cursor: pointer;
}
.bsl-tools-stepper .rule-info {
padding: 0.5em;
}
.bsl-tools-stepper .rule-info-rule-text {
font-family: var(--font-family-rule-description, serif);
}
.bsl-tools-stepper .rule-info-rule-text small {
vertical-align: sub;
}
.bsl-tools-stepper cap {
font-variant-caps: small-caps;
}
.bsl-tools-stepper .rule-info-rule-name {
position: absolute;
left: -6em;
top: 0;
}
.bsl-tools-stepper .rule-info-text-container {
position: relative;
margin-left: 6em;
margin-bottom: 1em;
}
/* ##### showing and hiding stuff #### */
/* hide steps that are not yet reached */
.bsl-tools-stepper .step[data-currentStep="true"] ~ .step {
display: none;
}
/* collapsing and expanding steps */
.bsl-tools-stepper .step[data-collapsed="true"] .plug-result {
display: none;
}
.bsl-tools-stepper .expander, .bsl-tools-stepper .collapser {
padding-left: 0.25em;
padding-right: 0.25em;
float: right;
}
.bsl-tools-stepper .expander:hover, .bsl-tools-stepper .collapser:hover {
cursor: pointer;
}
.bsl-tools-stepper .step[data-collapsed="true"] .collapser {
display: none;
}
.bsl-tools-stepper .step[data-collapsed="false"] .expander {
display: none;
}
/* collapsing and expanding info about the rules */
.bsl-tools-stepper .plug-result[data-info-collapsed="true"] .rule-info,
.bsl-tools-stepper .plug-result[data-info-collapsed="true"] .info-collapse {
display: none;
}
.bsl-tools-stepper .plug-result[data-info-collapsed="false"] .info-expand {
display: none;
}
`;var De="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzODQgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuMS4xIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb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ExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIyIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMCAyNTZDMCAxMTQuNiAxMTQuNiAwIDI1NiAwQzM5Ny40IDAgNTEyIDExNC42IDUxMiAyNTZDNTEyIDM5Ny40IDM5Ny40IDUxMiAyNTYgNTEyQzExNC42IDUxMiAwIDM5Ny40IDAgMjU2ek0xNzUgMjA4LjFMMjIyLjEgMjU1LjFMMTc1IDMwM0MxNjUuNyAzMTIuNCAxNjUuNyAzMjcuNiAxNzUgMzM2LjFDMTg0LjQgMzQ2LjMgMTk5LjYgMzQ2LjMgMjA4LjEgMzM2LjFMMjU1LjEgMjg5LjlMMzAzIDMzNi4xQzMxMi40IDM0Ni4zIDMyNy42IDM0Ni4zIDMzNi4xIDMzNi4xQzM0Ni4zIDMyNy42IDM0Ni4zIDMxMi40IDMzNi4xIDMwM0wyODkuOSAyNTUuMUwzMzYuMSAyMDguMUMzNDYuMyAxOTkuNiAzNDYuMyAxODQuNCAzMzYuMSAxNzVDMzI3LjYgMTY1LjcgMzEyLjQgMTY1LjcgMzAzIDE3NUwyNTUuMSAyMjIuMUwyMDguMSAxNzVDMTk5LjYgMTY1LjcgMTg0LjQgMTY1LjcgMTc1IDE3NUMxNjUuNyAxODQuNCAxNjUuNyAxOTkuNiAxNzUgMjA4LjFWMjA4LjF6Ii8+PC9zdmc+";function Yt(){Array.from(document.getElementsByTagName("stepper")).map(e=>{try{let r=Le(re(e.innerHTML));console.log(r),$n(r,e)}catch(r){Pn(r,e)}})}function Pn(e,r){console.error(e);let t=e?`${e}`:"Unknown Error";r.innerHTML=`
<h3>Error turning Program into Stepper</h3>
<div>${r.innerHTML}</div>
<div>${t}</div>
`,r.style.cssText=`
padding: 2em;
color: darkred;
display: block;
`}function $n(e,r){An();let t=jt(e);if(console.log(te(Et(e),30)),console.log(t),t instanceof Error)throw t;let n=In(r),s=Bn(r);r.innerHTML=wn(t,n,s)}function An(){if(!document.getElementById("bsl-tools-stepper-style")){let e=document.createElement("style");e.innerHTML=Jt,e.id="bsl-tools-stepper-style",document.getElementsByTagName("head")[0].appendChild(e)}}function In(e){let r=e.getAttribute("lang");if(r){if(!Xt.includes(r))return console.error(`
Language ${r} is not implemented for this module,
you can choose from ${Xt.join(",")}.
Defaulting to 'en'.
`),"en"}else return"en";return r}function Bn(e){let r="Loading...";e.innerHTML=`
<div class="bsl-tools-stepper" style="width: 100%;">
<div class="box">
<div class="step code"
data-currentStep="true">
<p style="display: inline-block;">${r}</p>
</div>
</div>
</div>
`;let t=e.getElementsByTagName("p")[0],n=e.getElementsByClassName("bsl-tools-stepper")[0];if(!t||!n)return console.error("failed to inject measuring HTML into",e),{charWidth:12,maxChars:80};let s=t.clientWidth/r.length,c=Math.round(.9*n.clientWidth/s);return{charWidth:s,maxChars:c}}var Xt=["en","de"],F={en:{"current evaluation":"Current Evaluation","next step":"Next Step","previous step":"Previous Step",environment:"Environment","remaining program":"Remaining Program","start evaluation":"Start Evaluation","evaluation finished":"Evaluation Finished","go back":"Go Back"},de:{"current evaluation":"Aktuelle Auswertung","next step":"N\xE4chster Schritt","previous step":"Vorheriger Schritt",environment:"Umgebung","remaining program":"Verbleibendes Programm","start evaluation":"Auswertung Starten","evaluation finished":"Auswertung Beendet","go back":"Schritt zur\xFCck"}};function wn(e,r,t){let n=e.progSteps;return`
<div class="bsl-tools-stepper">
<div class="box environment">
<div class="boxlabel">${F[r].environment}</div>
${n.map((s,l)=>Un(s,l,t)).join("")}
</div>
<div class="box eval-steps"
data-progstep="-1"
data-visible="true">
<div class="boxlabel">${F[r]["current evaluation"]}</div>
<div class="step"
data-currentStep="true">
<div class="next-button"
onclick="takeProgSteps(event, 1)">
<cap>Prog</cap>: ${F[r]["start evaluation"]} <img class="icon" src="${Me}">
</div>
<div class="plug-result code"
data-info-collapsed="true">
<img class="icon info-toggle info-expand"
src="${Ne}"
onclick="expandInfo(event)">
<img class="icon info-toggle info-collapse"
src="${He}"
onclick="collapseInfo(event)">
${Ye("Prog",!1)}
</div>
</div>
</div>
${n.map((s,l)=>Fn(s,l,r,t)).join("")}
<div class="box eval-steps"
data-progstep="${n.length}"
data-visible="false">
<div class="boxlabel">${F[r]["current evaluation"]}</div>
<div class="step"
data-currentStep="true">
<div class="code">${F[r]["evaluation finished"]}</div>
<div class="prev-button"
onclick="takeProgSteps(event, -1)">
${F[r]["go back"]} <img class="icon" src="${De}">
</div>
</div>
</div>
<div class="box program">
<div class="boxlabel">${F[r]["remaining program"]}</div>
${e.originProgram.map((s,l)=>kn(s,l,t)).join("")}
</div>
</div>`}window.takeProgSteps=(e,r)=>{Xe(e,r)};function Un(e,r,t){return!Pe(e)||e.result instanceof Error?"":`
<div class="step code"
data-progstep="${r}"
data-visible="false">
${te(B(ve(e.result)),t.maxChars,"html")}
</div>
`}function kn(e,r,t){return`
<div class="step code"
data-progstep="${r}"
data-visible="true">
${te(B(ae(e)),t.maxChars,"html")}
</div>
`}function Fn(e,r,t,n){let s=Pe(e)&&z(e.originalDefOrExpr)?{left:`(define ${e.originalDefOrExpr.name.symbol} `,right:")"}:{left:"",right:""};return`
<div class="box eval-steps"
data-progstep="${r}"
data-visible="false">
<div class="boxlabel">${F[t]["current evaluation"]}</div>
${e.evalSteps.map((l,c)=>On(c,l,t,W({},s),n)).join("")}
${Dn(e,t,n)}
</div>
`}function Dn(e,r,t){return`
<div class="step"
data-step="${e.evalSteps.length}"
data-currentStep="${e.evalSteps.length===0?"true":"false"}"
data-collapsed="false">
<div class="prev-button"
onclick="prevStep(event)">
${F[r]["previous step"]} <img class="icon" src="${De}">
</div>
<div class="next-button"
onclick="nextStep(event)">
<cap>Prog</cap>: ${F[r]["next step"]} <img class="icon" src="${Me}">
</div>
<div class="plug-result code"
data-info-collapsed="true">
${te(B(Pe(e)&&!(e.result instanceof Error)?ve(e.result):`${e.result instanceof Error?e.result:ce(e.result)}`),t.maxChars)}
<img class="icon info-toggle info-expand"
src="${Ne}"
onclick="expandInfo(event)">
<img class="icon info-toggle info-collapse"
src="${He}"
onclick="collapseInfo(event)">
${Ye("Prog",!1)}
</div>
</div>
`}function Xe(e,r){let t=e.target,n=t.getBoundingClientRect().y,s=U(t,"eval-steps");if(!s){console.error("found no parent with class .eval-steps",t);return}let l=s.getAttribute("data-progstep");if(!l){console.error("div with class .eval-steps has no data-progstep attribute",s);return}let p=parseInt(l)+r;if(p<-1){console.error(`cannot navigate to progStep ${p}: does not exist`);return}let d=s.parentElement;if(!d)return;Mn(d,p),Nn(d,p);let S=Hn(d,p);Vn(S,n,r>0)}function Mn(e,r){w([e],".environment/div").forEach(t=>{let n=t.getAttribute("data-progstep");n&&t.setAttribute("data-visible",parseInt(n)<r?"true":"false")})}function Nn(e,r){w([e],".program/div").forEach(t=>{let n=t.getAttribute("data-progstep");n&&t.setAttribute("data-visible",parseInt(n)>r?"true":"false")})}function Hn(e,r){return w([e],".eval-steps").filter(t=>{let n=t.getAttribute("data-progstep"),s=n&&parseInt(n)===r;return t.setAttribute("data-visible",s?"true":"false"),s})[0]}function Vn(e,r,t){let n=Array.from(e.children).filter(c=>c.getAttribute("data-currentstep")==="true")[0];if(!n)return;let s=n.querySelector(t?".next-button":".prev-button");if(!s)return;let l=s.getBoundingClientRect().y;window.scrollBy(0,l-r)}function On(e,r,t,n={left:"",right:""},s){let l=We(r.rule)?Zt(r.rule.context,n):n,c=We(r.rule)?r.rule.redexRule:r.rule,p=B(jn(c.redex));function d(N){if(k(N)){let V=ce(N);return{html:`${l.left}<span class="hole hole-result">${B(V)}</span>${l.right}`,redex:V}}else if(N instanceof Error){let V=`${N}`,G=`<span class="hole hole-result hole-error">"${N}"</span>`;return{redex:V,html:G}}else{let V=v(N),G=`${l.left}<span class="hole hole-result">${B(V)}</span>${l.right}`;return{redex:V,html:G}}}let S=d(c.result),g=c.type,f=te(`${l.left}<span class="hole">${p}</span>${l.right}`,s.maxChars,"html"),b=te(S.html,s.maxChars,"html"),h=b.slice(0,b.indexOf('<span class="hole hole-result')).split("<br>").reverse()[0],_=h?re(h).length:0,A=4,ie=l.left.length>0&&_<A?A:_,D=pe[g].name.replaceAll("<cap>","").replaceAll("</cap>",""),le=s.maxChars-ie-D.length-5,Te=p.length+S.redex.length<=le;return`
<div class="step"
data-step="${e}"
data-currentStep="${e===0?"true":"false"}"
data-collapsed="false">
<div class="prev-button"
onclick="prevStep(event)">
${F[t]["previous step"]} <img class="icon" src="${De}">
</div>
<div class="next-button"
onclick="nextStep(event)">
${F[t]["next step"]} <img class="icon" src="${Me}">
</div>
<div class="split-result code">${f}<img class="icon expander"
src="${Gt}"
onclick="expand(event)"
><img class="icon collapser"
src="${Qt}"
onclick="collapse(event)"
></div>
<div class="plug-result code"
data-info-collapsed="true">
<div>
${l.left!==""?`<span class="rule rule-name left-arrowed kong">
${pe.Kong.name}
</span>`:""}
<span class="rule left-arrowed one-rule"
style="--one-rule-margin-left: ${ie*s.charWidth}px">
<span class="rule-name">${pe[g].name}</span>${Te?`:
<span class="rule-description">
<span class="hole rule-hole">${p}</span> \u2192
<span class="hole hole-result rule-hole">${B(S.redex)}</span>
</span>`:""}
</span>
<img src="${Ne}"
class="icon info-toggle info-expand"
onclick="expandInfo(event)">
<img src="${He}"
class="icon info-toggle info-collapse"
onclick="collapseInfo(event)">
</div>
${Ye(g,l.left!=="")}
<div>${b}</div>
</div>
</div>
`}window.nextStep=e=>{let r=e.target,t=r.getBoundingClientRect().y,n=U(r,"step");if(!n)return;let s=n.nextElementSibling;if(!s){Xe(e,1);return}n.setAttribute("data-currentStep","false"),n.setAttribute("data-collapsed","true"),s.setAttribute("data-currentStep","true"),s.setAttribute("data-collapsed","false");let l=s.querySelector(".next-button");if(!l)return;let c=l.getBoundingClientRect().y;window.scrollBy(0,c-t)};window.prevStep=e=>{let r=e.target,t=r.getBoundingClientRect().y,n=U(r,"step");if(!n){console.error("prevStep not called from within an element of the .step class");return}if(n.getAttribute("data-step")==="0"){Xe(e,-1);return}let l=n.previousElementSibling;if(!l){console.error("prevStep called on a step with no previous html element");return}n.setAttribute("data-currentStep","false"),n.setAttribute("data-collapsed","true"),l.setAttribute("data-currentStep","true"),l.setAttribute("data-collapsed","false");let c=l.querySelector(".prev-button");if(!c)return;let p=c.getBoundingClientRect().y;window.scrollBy(0,p-t)};window.collapse=e=>{let r=e.target,t=U(r,"step");t&&t.setAttribute("data-collapsed","true")};window.expand=e=>{let r=e.target,t=U(r,"step");t&&t.setAttribute("data-collapsed","false")};function Zt(e,r={left:"",right:""}){if(Ae(e))return{left:B(r.left),right:B(r.right)};if(Ie(e)){let t=[E(e.op),...e.values.map(n=>q(n)?ce(n):`${n}`)];r.left=`${r.left}(${t.join(" ")} `,r.right=e.args.length>0?` ${e.args.map(v).join(" ")})${r.right}`:`)${r.right}`}else if(Be(e)){r.left=`${r.left}(cond [`;let t=[`${v(e.options[0].result)}]`,...e.options.slice(1).map(ee)];r.right=` ${t.join(" ")})${r.right}`}else throw console.error("Printing this context is not implemented yet",e),`Printing ${e.type} context is not implemented yet!`;return Zt(e.ctx,r)}function zn(e){return k(e)?ce(e):qn(e)}function jn(e){if(me(e))return`(${E(e.name)} ${e.args.map(zn).join(" ")})`;if(Se(e))return`(cond ${e.options.map(ee).join(" ")})`;if(ge(e))return e.symbol;throw"Invalid Input to printRedex"}function qn(e){return e.symbol}function Ye(e,r){let t=pe[e];return`<div class="rule-info">${r?`
<div class="rule-info-text-container">
<div class="rule-info-rule-name">${pe.Kong.name}</div>
<div class="rule-info-rule-text">${pe.Kong.text}</div>
</div>
`:""}
<div class="rule-info-text-container">
<div class="rule-info-rule-name">${t.name}</div>
<div class="rule-info-rule-text">${t.text}</div>
</div>
</div>`}window.expandInfo=e=>{let r=e.target,t=U(r,"plug-result");!t||t.setAttribute("data-info-collapsed","false")};window.collapseInfo=e=>{let r=e.target,t=U(r,"plug-result");t&&t.setAttribute("data-info-collapsed","true")};var pe={Kong:{name:"<cap>Kong</cap>",text:`
<em>E[e<small>1</small>] \u2192 E[e<small>2</small>] falls e<small>1</small> \u2192 e<small>2</small></em><br>
<em>\u2039E\u203A ::= []<br>
| (\u2039name\u203A \u2039v\u203A* \u2039E\u203A \u2039e\u203A*)<br>
| (<strong>cond</strong> [\u2039E\u203A \u2039e\u203A ]{[ \u2039e\u203A \u2039e\u203A]}*)</em>
`},Fun:{name:"<cap>Fun</cap>",text:`
<em>(name v<small>1</small> \u2026 v<small>n</small>) \u2192
e[name<small>1</small> := v<small>1</small> \u2026 name<small>n</small> := v<small>n</small> ]</em>
falls
<em>(</em> <strong>define</strong> <em>(name name<small>1</small> \u2026 name<small>n</small>) e)</em> in Umgebung
`},FunError:{name:"<cap>FunError</cap>",text:`
<em>(name v<small>1</small> \u2026 v<small>n</small>) \u2192 Error</em>
falls
<em>(</em> <strong>define</strong> <em>(name name<small>1</small> \u2026 name<small>n</small>) e)</em> nicht in Umgebung.
`},Prim:{name:"<cap>Prim</cap>",text:`
<em>(name v<small>1</small> \u2026 v<small>n</small>) \u2192 v</em> falls
<em>name</em> eine primitive Funktion <em>f</em> ist und
<em>f(v<small>1</small> \u2026 v<small>n</small>) = v</em>
`},PrimError:{name:"<cap>Prim</cap>-Error",text:`
<em>(name v<small>1</small> \u2026 v<small>n</small>) \u2192 Error</em> falls
<em>name</em> eine primitive Funktion <em>f</em> ist und
<em>f(v<small>1</small> \u2026 v<small>n</small>) = Error</em>
`},Const:{name:"<cap>Const</cap>",text:`
<em>name \u2192 v</em> falls <em>(<strong>define</strong> name v)</em> in Umgebung.
`},ConstError:{name:"<cap>Const</cap>-Error",text:`
<em>name \u2192 Error</em> falls <em>(<strong>define</strong> name v)</em>
nicht in Umgebung.
`},CondTrue:{name:"<cap>Cond</cap>-True",text:`
<em>(<strong>cond</strong> [<strong>#true</strong> e] \u2026) \u2192 e</em>
`},CondFalse:{name:"<cap>Cond</cap>-False",text:`
<em>(<strong>cond</strong> [<strong>#false</strong> e<small>1</small>]
[e<small>2</small> e<small>3</small>] \u2026) \u2192
(<strong>cond</strong> [e<small>2</small> e<small>3</small>] \u2026)</em>
`},CondError:{name:"<cap>Cond</cap>-Error",text:`
<em>(<strong>cond</strong> [e<small>1</small> e<small>2</small>] \u2026) \u2192
(<strong>error</strong> "cond: all conditions false")</em>
`},StructMake:{name:"<cap>Struct</cap>-make",text:`
<em>(<strong>make</strong>-name v<small>1</small> \u2026 v<small>n</small>) \u2192
<<strong>make</strong>-name v<small>1</small> \u2026 v<small>n</small>></em>
falls <em>(<strong>define-struct</strong> name (name<small>1</small> \u2026 name<small>n</small>))</em> in Umgebung
`},StructMakeError:{name:"<cap>Struct</cap>-make-Error",text:""},StructSelect:{name:"<cap>Struct</cap>-select",text:`
<em>(name-name<small>i</small> <<strong>make</strong>-name
v<small>1</small> \u2026 v<small>n</small>>) \u2192 v<small>i</small></em>
falls <em>(<strong>define-struct</strong> name
(name<small>1</small> \u2026 name<small>n</small>))</em> in Umgebung
`},StructSelectError:{name:"<cap>Struct</cap>-select-Error",text:""},StructPredTrue:{name:"<cap>Struct</cap>-predtrue",text:`
<em>(name? <<strong>make</strong>-name \u2026>) \u2192 <strong>#true</strong></em>
`},StructPredFalse:{name:"<cap>Struct</cap>-predfalse",text:`
<em>(name? v) \u2192 <strong>#false</strong></em> falls <em>v</em> nicht
<em><<strong>make</strong>-name \u2026></em> ist
`},StructPredError:{name:"<cap>Struct</cap>-prederror",text:""},Prog:{name:"<cap>Prog</cap>",text:`
Ein Programm wird von links nach rechts ausgef\xFChrt und startet mit der
leeren Umgebung. Ist das n\xE4chste Programmelement eine Funktions- oder
Strukturdefinition, so wird diese Definition in die Umgebung aufgenommen
und die Ausf\xFChrung mit dem n\xE4chsten Programmelement in der erweiterten
Umgebung fortgesetzt. Ist das n\xE4chste Programmelement ein Ausdruck, so
wird dieser gem\xE4\xDF der unten stehenden Regeln in der aktuellen Umgebung zu
einem Wert ausgewert. Ist das n\xE4chste Programmelement eine
Konstantendefinition <em>(<strong>define</strong> x e)</em>, so wird in
der aktuellen Umgebung zun\xE4chst <em>e</em> zu einem Wert <em>v</em>
ausgewertet und dann <em>(<strong>define</strong> x v)</em> zur aktuellen
Umgebung hinzugef\xFCgt.
`},ProgError:{name:"<cap>Prog</cap>-Error",text:`
Ein Programm wird von links nach rechts ausgef\xFChrt und startet mit der
leeren Umgebung. Ist das n\xE4chste Programmelement eine Funktions- oder
Strukturdefinition, so wird diese Definition in die Umgebung aufgenommen
und die Ausf\xFChrung mit dem n\xE4chsten Programmelement in der erweiterten
Umgebung fortgesetzt. Sofern die Definition allerdings schon in der Umgebung
vorhanden ist, wird ein Fehler ausgegeben.
`}};window.addEventListener("load",()=>{Ut(),kt(),Yt()});})();
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL0JTTF9BU1QudHMiLCAiLi4vc3JjL0JTTF9QcmludC50cyIsICIuLi9zcmMvRE9NX0hlbHBlcnMudHMiLCAiLi4vc3JjL1Byb2R1Y3Rpb25fVHJlZS50cyIsICIuLi9zcmMvQlNMX1BhcnNlci50cyIsICIuLi9zcmMvQlNMX1RyZWUudHMiLCAiLi4vc3JjL0pTT05fVHJlZS50cyIsICIuLi9zcmMvU0lfU1RSVUNULnRzIiwgIi4uL3NyYy9TSS50cyIsICIuLi9zcmMvU0lfUmVuZGVyZXIudHMiLCAiLi4vc3JjL2JzbF90b29scy50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiZXhwb3J0IGVudW0gUHJvZHVjdGlvbiB7XG4gIEZ1bmN0aW9uRGVmaW5pdGlvbiA9ICdGdW5jdGlvbiBEZWZpbml0aW9uJyxcbiAgQ29uc3RhbnREZWZpbml0aW9uID0gJ0NvbnN0YW50IERlZmluaXRpb24nLFxuICBTdHJ1Y3REZWZpbml0aW9uID0gJ1N0cnVjdCBEZWZpbml0aW9uJyxcbiAgRnVuY3Rpb25DYWxsID0gJ0Z1bmN0aW9uIENhb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AgICBdLFxuICAgIGJvZHk6IHtcbiAgICAgIHR5cGU6IEJTTF9BU1QuUHJvZHVjdGlvbi5GdW5jdGlvbkNhbGwsXG4gICAgICBuYW1lOiB7XG4gICAgICAgIHR5cGU6IEJTTF9BU1QuUHJvZHVjdGlvbi5TeW1ib2wsXG4gICAgICAgIHN5bWJvbDogXCIrXCIsXG4gICAgICB9LFxuICAgICAgYXJnczogW1xuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogQlNMX0FTVC5Qcm9kdWN0aW9uLlN5bWJvbCxcbiAgICAgICAgICBzeW1ib2w6IFwieFwiLFxuICAgICAgICB9LFxuICAgICAgICB7XG4gICAgICAgICAgdHlwZTogQlNMX0FTVC5Qcm9kdWN0aW9uLlN5bWJvbCxcbiAgICAgICAgICBzeW1ib2w6IFwieVwiLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9LFxuICB9LFxuICB7XG4gICAgdHlwZTogQlNMX0FTVC5Qcm9kdWN0aW9uLkNvbmRFeHByZXNzaW9uLFxuICAgIG9wdGlvbnM6IFtcbiAgICAgIHtcbiAgICAgICAgdHlwZTogQlNMX0FTVC5Qcm9kdWN0aW9uLkNvbmRPcHRpb24sXG4gICAgICAgIGNvbmRpdGlvbjoge1xuICAgICAgICAgIHR5cGU6IEJTTF9BU1QuUHJvZHVjdGlvbi5GdW5jdGlvbkNhbGwsXG4gICAgICAgICAgbmFtZToge1xuICAgICAgICAgICAgdHlwZTogQlNMX0FTVC5Qcm9kdWN0aW9uLlN5bWJvbCxcbiAgICAgICAgICAgIHN5bWJvbDogXCI9XCIsXG4gICAgICAgICAgfSxcbiAgICAgICAgICBhcmdzOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHR5cGU6IEJTTF9BU1QuUHJvZHVjdGlvbi5TeW1ib2wsXG4gICAgICAgICAgICAgIHN5bWJvbDogXCJ4XCIsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB0eXBlOiB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uO1xuICAgIH1cbiAgICBpZiAoaW5UYWcgJiYgY2hhciAhPT0gXCI+XCIpIHtcbiAgICAgIGFjYyArPSBjaGFyO1xuICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBzd2l0Y2ggKGNoYXIpIHtcbiAgICAgIGNhc2UgXCIoXCI6XG4gICAgICBjYXNlIFwiW1wiOlxuICAgICAgICBuZXh0TGV2ZWwrKztcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIFwiKVwiOlxuICAgICAgY2FzZSBcIl1cIjpcbiAgICAgICAgbmV4dExldmVsLS07XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAnXCInOlxuICAgICAgICBpblN0cmluZyA9ICFpblN0cmluZztcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIFwiPFwiOlxuICAgICAgICBpblRhZyA9IG1vZGUgPT09IFwiaHRtbFwiO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgXCI+XCI6XG4gICAgICAgIGlmIChtb2RlID09PSBcImh0bWxcIikgaW5UYWcgPSBmYWxzZTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIFwiIFwiOlxuICAgICAgY2FzZSBcIlxcblwiOlxuICAgICAgY2FzZSBcIlxcdFwiOlxuICAgICAgICBpZiAoIWFjYykgcmV0dXJuO1xuICAgICAgICB0ZXJtcy5wdXNoKHsgdGVybTogYWNjLCBsZXZlbDogbGV2ZWwgfSk7XG4gICAgICAgIGlmIChsZXZlbCA+IG1heExldmVsKSBtYXhMZXZlbCA9IGxldmVsO1xuICAgICAgICBhY2MgPSBcIlwiO1xuICAgICAgICBsZXZlbCA9IG5leHRMZXZlbDtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBhY2MgKz0gY2hhcjtcbiAgICByZXR1cm47XG4gIH0pO1xuICBpZiAoYWNjICE9PSBcIlwiKSB7XG4gICAgdGVybXMucHVzaCh7IHRlcm06IGFjYywgbGV2ZWw6IGxldmVsIH0pO1xu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2csIFwiXFxcXHRcIilcbiAgICAgICAgLnJlcGxhY2UoL1xcbi9nLCBcIlxcXFxuXCIpXG4gICAgICAgIC5yZXBsYWNlKC9cXHIvZywgXCJcXFxcclwiKVxuICAgICAgICAucmVwbGFjZSgvW1xceDAwLVxceDBGXS9nLCAgICAgICAgICAgIChjaCkgPT4gXCJcXFxceDBcIiArIGhleChjaCkgKVxuICAgICAgICAucmVwbGFjZSgvW1xceDEwLVxceDFGXFx4N0YtXFx4OUZdL2csIChjaCkgPT4gXCJcXFxceFwiICArIGhleChjaCkgKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjbGFzc0VzY2FwZShzOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgcmV0dXJuIHNcbiAgICAgICAgLnJlcGxhY2UoL1xcXFwvZywgXCJcXFxcXFxcXFwiKVxuICAgICAgICAucmVwbGFjZSgvXFxdL2csIFwiXFxcXF1cIilcbiAgICAgICAgLnJlcGxhY2UoL1xcXi9nLCBcIlxcXFxeXCIpXG4gICAgICAgIC5yZXBsYWNlKC8tL2csICBcIlxcXFwtXCIpXG4gICAgICAgIC5yZXBsYWNlKC9cXDAvZywgXCJcXFxcMFwiKVxuICAgICAgICAucmVwbGFjZSgvXFx0L2csIFwiXFxcXHRcIilcbiAgICAgICAgLnJlcGxhY2UoL1xcbi9nLCBcIlxcXFxuXCIpXG4gICAgICAgIC5yZXBsYWNlKC9cXHIvZywgXCJcXFxcclwiKVxuICAgICAgICAucmVwbGFjZSgvW1xceDAwLVxceDBGXS9nLCAgICAgICAgICAgIChjaCkgPT4gXCJcXFxceDBcIiArIGhleChjaCkgKVxuICAgICAgICAucmVwbGFjZSgvW1xceDEwLVxceDFGXFx4N0YtXFx4OUZdL2csIChjaCkgPT4gXCJcXFxceFwiICArIGhleChjaCkgKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBkZXNjcmliZUV4cGVjdGF0aW9uKGV4cGVjdGF0aW9uOiBFeHBlY3RhdGlvbikge1xuICAgICAgc3dpdGNoIChleHBlY3RhdGlvbi50eXBlKSB7XG4gICAgICAgIGNhc2UgXCJsaXRlcmFsXCI6XG4gICAgICAgICAgcmV0dXJuIFwiXFxcIlwiICsgbGl0ZXJhbEVzY2FwZShleHBlY3RhdGlvbi50ZXh0KSArIFwiXFxcIlwiO1xuICAgICAgICBjYXNlIFwiY2xhc3NcIjpcbiAgICAgICAgICBjb25zdCBlc2NhcGVkUGFydHMgPSBleHBlY3RhdGlvbi5wYXJ0cy5tYXAoKHBhcnQpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBBcnJheS5pc0FycmF5KHBhcnQpXG4gICAgICAgICAgICAgID8gY2xhc3NFc2NhcGUocGFydFswXSBhcyBzdHJpbmcpICsgXCItXCIgKyBjbGFzc0VzY2FwZShwYXJ0WzFdIGFzIHN0cmluZylcbiAgICAgICAgICAgICAgOiBjbGFzc0VzY2FwZShwYXJ0KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIHJldHVybiBcIltcIiArIChleHBlY3RhdGlvbi5pbnZlcnRlZCA/IFwiXlwiIDogXCJcIikgKyBlc2NhcGVkUGFydHMgKyBcIl1cIjtcbiAgICAgICAgY2FzZSBcImFueVwiOlxuICAgICAgICAgIHJldHVybiBcImFueSBjaGFyYWN0ZXJcIjtcbiAgICAgICAgY2FzZSBcImVuZFwiOlxuICAgICAgICAgIHJldHVybiBcImVuZCBvZiBpbnB1dFwiO1xuICAgICAgICBjYXNlIFwib3RoZXJcIjpcbiAgICAgICAgICByZXR1cm4gZXhwZWN0YXRpb24uZGVzY3JpcHRpb247XG4gICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gZGVzY3JpYmVFeHBlY3RlZChleHBlY3RlZDE6IEV4cGVjdGF0aW9uW10pIHtcbiAgICAgIGNvbnN0IGRlc2NyaXB0aW9ucyA9IGV4cGVjdGVkMS5tYXAoZGVzY3JpYmVFeHBlY3RhdGlvbik7XG4gICAgICBsZXQgaTogbnVtYmVyO1x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0gaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKTtcbiAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHMzID0gcGVnJEZBSUxFRDtcbiAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzIpOyB9XG4gICAgICB9XG4gICAgICBpZiAoczMgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgIHdoaWxlIChzMyBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICBzMi5wdXNoKHMzKTtcbiAgICAgICAgICBpZiAocGVnJGMxLnRlc3QoaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKSkpIHtcbiAgICAgICAgICAgIHMzID0gaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKTtcbiAgICAgICAgICAgIHBlZyRjdXJyUG9zKys7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHMzID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgIGlmIChwZWckc2lsZW50RmFpbHMgPT09IDApIHsgcGVnJGZhaWwocGVnJGMyKTsgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgczIgPSBwZWckRkFJTEVEO1xuICAgICAgfVxuICAgICAgaWYgKHMyIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICBwZWckc2F2ZWRQb3MgPSBzMDtcbiAgICAgICAgczEgPSBwZWckYzAoczEpO1xuICAgICAgICBzMCA9IHMxO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgIH1cblxuIC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ICAgICBwZWckY3VyclBvcyArPSAxNDtcbiAgICB9IGVsc2Uge1xuICAgICAgczEgPSBwZWckRkFJTEVEO1xuICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzUpOyB9XG4gICAgfVxuICAgIGlmIChzMSBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgIHMyID0gcGVnJHBhcnNlTmFtZSgpO1xuICAgICAgaWYgKHMyIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICBzMyA9IHBlZyRwYXJzZV8oKTtcbiAgICAgICAgaWYgKHMzIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgIGlmIChpbnB1dC5jaGFyQ29kZUF0KHBlZyRjdXJyUG9zKSA9PT0gNDApIHtcbiAgICAgICAgICAgIHM0ID0gcGVnJGM2O1xuICAgICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgczQgPSBwZWckRkFJTEVEO1xuICAgICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzcpOyB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChzNCBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgIHM1ID0gW107XG4gICAgICAgICAgICBzNiA9IHBlZyRwYXJzZU5hbWUoKTtcbiAgICAgICAgICAgIGlmIChzNiBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgICAgd2hpbGUgKHM2IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICAgIHM1LnB1c2goczYpO1xuICAgICAgICAgICAgICAgIHM2ID0gcGVnJHBhcnNlTmFtZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzNSA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoczUgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICAgIGlmIChpbnB1dC5jaGFyQ29kZUF0KHBlZyRjdXJyUG9zKSA9PT0gNDEpIHtcbiAgICAgICAgICAgICAgICBzNiA9IHBlZyRjODtcbiAgICAgICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHM2ID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjOSk7IH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoczYgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICAgICAgczcgPSBwZWckcGFyc2VfKCk7XG4gICAgICAgICAgICAgICAgaWYgKHM3IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICAgICAgaWYgKGlucHV0LmNoYXJDb2RlQXQocGVnJGN1cnJQb3MpID09PSA0MSkge1xuICAgICAgICAgICAgICAgICAgICBzOCA9IHBlZyRjODtcbiAgICAgICAgICAgICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHM4ID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzkpOyB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICBpZiAoczggYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICAgICAgICAgIHBlZyRzYXZlZFBvcyA9IHMwO1xuICAgICAgICAgICAgICAgICAgICBzMSA9IHBlZyRjMTAoczIsIHM1KTtcbiAgICAgICAgICAgICAgICAgICAgczAgPSBzMTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICB9XG5cbiAgICByZXR1cm4gczA7XG4gIH1cblxuICBmdW5jdGlvbiBwZWckcGFyc2VGdW5EZWYoKTogYW55IHtcbiAgICBsZXQgczAsIHMxLCBzMiwgczMsIHM0LCBzNSwgczYsIHM3LCBzOCwgczk7XG5cbiAgICBzMCA9IHBlZyRjdXJyUG9zO1xuICAgIGlmIChpbnB1dC5zdWJzdHIocGVnJGN1cnJQb3MsIDcpID09PSBwZWckYzExKSB7XG4gICAgICBzMSA9IHBlZyRjMTE7XG4gICAgICBwZWckY3VyclBvcyArPSA3O1xuICAgIH0gZWxzZSB7XG4gICAgICBzMSA9IHBlZyRGQUlMRUQ7XG4gICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMTIpOyB9XG4gICAgfVxuICAgIGlmIChzMSBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgIHMyID0gcGVnJHBhcnNlXygpO1xuICAgICAgaWYgKHMyIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICBpZiAoaW5wdXQuY2hhckNvZGVBdChwZWckY3VyclBvcykgPT09IDQwKSB7XG4gICAgICAgICAgczMgPSBwZWckYzY7XG4gICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBzMyA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzcpOyB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHMzIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgIHM0ID0gcGVnJHBhcnNlTmFtZSgpO1xuICAgICAgICAgIGlmIChzNCBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgIHM1ID0gcGVnJHBhcnNlXygpO1xuICAgICAgICAgICAgaWYgKHM1IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICBzNiA9IFtdO1xuICAgICAgICAgICAgICBzNyA9IHBlZyRwYXJzZU5hbWUoKTtcbiAgICAgICAgICAgICAgaWYgKHM3IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICAgIHdoaWxlIChzNyBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgICAgICAgIHM2LnB1c2goczcpO1xuICAgICAgICAgICAgICAgICAgczcgPSBwZWckcGFyc2VOYW1lKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHM2ID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoczYgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlucHV0LmNoYXJDb2RlQXQocGVnJGN1cnJQb3MpID09PSA0MSkge1xuICAgICAgICAgICAgICAgICAgczcgPSBwZWckYzg7XG4gICAgICAgICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICBzNyA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjOSk7IH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHM3IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICAgICAgczggPSBwZWckcGFyc2VFeHByZXNzaW9uKCk7XG4gICAgICAgICAgICAgICAgICBpZiAoczggYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dC5jaGFyQ29kZUF0KHBlZyRjdXJyUG9zKSA9PT0gNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICBzOSA9IHBlZyRjODtcbiAgICAgICAgICAgICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIHM5ID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjOSk7IH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoczkgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICAgICAgICAgICAgcGVnJHNhdmVkUG9zID0gczA7XG4gICAgICAgICAgICAgICAgICAgICAgczEgPSBwZWckYzEzKHM0LCBzNiwgczgpO1xuICAgICAgICAgICAgICAgICAgICAgIHMwID0gczE7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgICAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gcz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gICAgICAgaWYgKHMzIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgIGlmIChpbnB1dC5jaGFyQ29kZUF0KHBlZyRjdXJyUG9zKSA9PT0gNDEpIHtcbiAgICAgICAgICAgIHM0ID0gcGVnJGM4O1xuICAgICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgczQgPSBwZWckRkFJTEVEO1xuICAgICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzkpOyB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChzNCBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgIHBlZyRzYXZlZFBvcyA9IHMwO1xuICAgICAgICAgICAgczEgPSBwZWckYzE0KHMyLCBzMyk7XG4gICAgICAgICAgICBzMCA9IHMxO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgIH1cblxuICAgIHJldHVybiBzMDtcbiAgfVxuXG4gIGZ1bmN0aW9uIHBlZyRwYXJzZUV4cHJlc3Npb24oKTogYW55IHtcbiAgICBsZXQgczAsIHMxLCBzMjtcblxuICAgIHMwID0gcGVnJGN1cnJQb3M7XG4gICAgczEgPSBwZ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ZBSUxFRDtcbiAgICAgIGlmIChwZWckc2lsZW50RmFpbHMgPT09IDApIHsgcGVnJGZhaWwocGVnJGMxNyk7IH1cbiAgICB9XG4gICAgaWYgKHMxIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgczIgPSBbXTtcbiAgICAgIHMzID0gcGVnJHBhcnNlT3B0aW9uKCk7XG4gICAgICBpZiAoczMgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgIHdoaWxlIChzMyBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICBzMi5wdXNoKHMzKTtcbiAgICAgICAgICBzMyA9IHBlZyRwYXJzZU9wdGlvbigpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBzMiA9IHBlZyRGQUlMRUQ7XG4gICAgICB9XG4gICAgICBpZiAoczIgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgIHMzID0gcGVnJHBhcnNlXygpO1xuICAgICAgICBpZiAoczMgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgaWYgKGlucHV0LmNoYXJDb2RlQXQocGVnJGN1cnJQb3MpID09PSA0MSkge1xuICAgICAgICAgICAgczQgPSBwZWckYzg7XG4gICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzNCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjOSk7IH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHM0IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgcGVnJHNhdmVkUG9zID0gczA7XG4gICAgICAgICAgICBzMSA9IHBlZyRjMTgoczIpO1xuICAgICAgICAgICAgczAgPSBzMTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICA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pO1xuICAgICAgICAgIGlmIChzNCBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgIHM1ID0gcGVnJHBhcnNlXygpO1xuICAgICAgICAgICAgaWYgKHM1IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICBzNiA9IHBlZyRwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgICAgICAgaWYgKHM2IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICAgIGlmIChpbnB1dC5jaGFyQ29kZUF0KHBlZyRjdXJyUG9zKSA9PT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgIHM3ID0gcGVnJGMyMTtcbiAgICAgICAgICAgICAgICAgIHBlZyRjdXJyUG9zKys7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHM3ID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgICAgIGlmIChwZWckc2lsZW50RmFpbHMgPT09IDApIHsgcGVnJGZhaWwocGVnJGMyMik7IH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHM3IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgICAgICAgICAgcGVnJHNhdmVkUG9zID0gczA7XG4gICAgICAgICAgICAgICAgICBzMSA9IHBlZyRjMjMoczQsIHM2KTtcbiAgICAgICAgICAgICAgICAgIHMwID0gczE7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgfVxuXG4gICAgcmV0dXJuIHMwO1xuICB9XG5cbiAgZnVuY3Rpb24gcGVnJHBhcnNlQ2FsbCgpOiBhbnkge1xuICAgIGxldCBzMCwgczEsIHMyLCBzMywgczQ7XG5cbiAgICBzMCA9IHBlZyRjdXJyUG9zO1xuICAgIGlmIChpbnB1dC5jaGFyQ29kZUF0KHBlZyRjdXJyUG9zKSA9PT0gNDApIHtcbiAgICAgIHMxID0gcGVnJGM2O1xuICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICB9IGVsc2Uge1xuICAgICAgczEgPSBwZWckRkFJTEVEO1xuICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzcpOyB9XG4gICAgfVxuICAgIGlmIChzMSBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgIHMyID0gcGVnJHBhcnNlTmFtZSgpO1xuICAgICAgaWYgKHMyIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICBzMyA9IFtdO1xuICAgICAgICBzNCA9IHBlZyRwYXJzZUV4cHJlc3Npb24oKTtcbiAgICAgICAgd2hpbGUgKHM0IGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgIHMzLnB1c2goczQpO1xuICAgICAgICAgIHM0ID0gcGVnJHBhcnNlRXhwcmVzc2lvbigpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzMyBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICBpZiAoaW5wdXQuY2hhckNvZGVBdChwZWckY3VyclBvcykgPT09IDQxKSB7XG4gICAgICAgICAgICBzNCA9IHBlZyRjODtcbiAgICAgICAgICAgIHBlZyRjdXJyUG9zKys7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHM0ID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgIGlmIChwZWckc2lsZW50RmFpbHMgPT09IDApIHsgcGVnJGZhaWwocGVnJGM5KTsgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoczQgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICBwZWckc2F2ZWRQb3MgPSBzMDtcbiAgICAgICAgICAgIHMxID0gcGVnJGMyNChzMiwgczMpO1xuICAgICAgICAgICAgczAgPSBzMTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICB9XG5cbiAgICByZXR1cm4gczA7XG4gIH1cblxuICBmdW5jdGlvbiBwZWckcGFyc2VOYW1lKCk6IGFueSB7XG4gICAgbGV0IHMwLCBzMSwgczIsIHMzLCBzNDtcblxuICAgIHMwID0gcGVnJGN1cnJQb3M7XG4gICAgczEgPSBwZWckcGFyc2VfKCk7XG4gICAgaWYgKHMxIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgczIgPSBwZWckY3VyclBvcztcbiAgICAgIHBlZyRzaWxlbnRGYWlscysrO1xuICAgICAgaWYgKGlucHV0LnN1YnN0cihwZWckY3VyclBvcywgNikgPT09IHBlZyRjMjUpIHtcbiAgICAgICAgczMgPSBwZWckYzI1O1xuICAgICAgICBwZWckY3VyclBvcyArPSA2O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgczMgPSBwZWckRkFJTEVEO1xuICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMjYpOyB9XG4gICAgICB9XG4gICAgICBwZWckc2lsZW50RmFpbHMtLTtcbiAgICAgIGlmIChzMyBhcyBhbnkgPT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgczIgPSB1bmRlZmluZWQ7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwZWckY3VyclBvcyA9IHMyO1xuICAgICAgICBzMiA9IHBlZyRGQUlMRUQ7XG4gICAgICB9XG4gICAgICBpZiAoczIgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgIHMzID0gW107XG4gICAgICAgIGlmIChwZWckYzI3LnRlc3QoaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKSkpIHtcbiAgICAgICAgICBzNCA9IGlucHV0LmNoYXJBdChwZWckY3VyclBvcyk7XG4gICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBzNCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzI4KTsgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChzNCBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICB3aGlsZSAoczQgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICBzMy5wdXNoKHM0KTtcbiAgICAgICAgICAgIGlmIChwZWckYzI3LnRlc3QoaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKSkpIHtcbiAgICAgICAgICAgICAgczQgPSBpbnB1dC5jaGFyQXQocGVnJGN1cnJQb3MpO1xuICAgICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgczQgPSBwZWckRkFJTEVEO1xuICAgICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMjgpOyB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHMzID0gcGVnJEZBSUxFRDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoczMgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgcGVnJHNhdmVkUG9zID0gczA7XG4gICAgICAgICAgczEgPSBwZWckYzI5KHMzKTtcbiAgICAgICAgICBzMCA9IHMxO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICBzMCA9IHBlZyRGQUlMRUQ7XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIHBlZyRj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AgICAgfSBlbHNlIHtcbiAgICAgICAgczMgPSBwZWckRkFJTEVEO1xuICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMzIpOyB9XG4gICAgICB9XG4gICAgICBpZiAoczMgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgIHdoaWxlIChzMyBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICBzMi5wdXNoKHMzKTtcbiAgICAgICAgICBpZiAocGVnJGMzMS50ZXN0KGlucHV0LmNoYXJBdChwZWckY3VyclBvcykpKSB7XG4gICAgICAgICAgICBzMyA9IGlucHV0LmNoYXJBdChwZWckY3VyclBvcyk7XG4gICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzMyA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMzIpOyB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBzMiA9IHBlZyRGQUlMRUQ7XG4gICAgICB9XG4gICAgICBpZiAoczIgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgIHBlZyRzYXZlZFBvcyA9IHMwO1xuICAgICAgICBzMSA9IHBlZyRjMzMoKTtcbiAgICAgICAgczAgPSBzMTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICB9XG5cbiAgICByZXR1cm4gczA7XG4gIH1cblxuICBmdW5jdGlvbiBwZWckcGFyc2VCb29sZWFuKCk6IGFueSB7XG4gICAgbGV0IHMwLCBzMSwgczI7XG5cbiAgICBzMCA9IHBlZyRjdXJyUG9zO1xuICAgIHMxID0gcGVnJHBhcnNlXygpO1xuICAgIGlmIChzMSBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgIGlmIChpbnB1dC5zdWJzdHIocGVnJGN1cnJQb3MsIDUpID09PSBwZWckYzM0KSB7XG4gICAgICAgIHMyID0gcGVnJGMzNDtcbiAgICAgICAgcGVnJGN1cnJQb3MgKz0gNTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHMyID0gcGVnJEZBSUxFRDtcbiAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzM1KTsgfVxuICAgICAgfVxuICAgICAgaWYgKHMyIGFzIGFueSA9PT0gcGVnJEZBSUxFRCkge1xuICAgICAgICBpZiAoaW5wdXQuc3Vic3RyKHBlZyRjdXJyUG9zLCA2KSA9PT0gcGVnJGMzNikge1xuICAgICAgICAgIHMyID0gcGVnJGMzNjtcbiAgICAgICAgICBwZWckY3VyclBvcyArPSA2O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHMyID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMzcpOyB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHMyIGFzIGFueSA9PT0gcGVnJEZBSUxFRCkge1xuICAgICAgICAgIGlmIChpbnB1dC5zdWJzdHIocGVnJGN1cnJQb3MsIDIpID09PSBwZWckYzM4KSB7XG4gICAgICAgICAgICBzMiA9IHBlZyRjMzg7XG4gICAgICAgICAgICBwZWckY3VyclBvcyArPSAyO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzMiA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjMzkpOyB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChzMiBhcyBhbnkgPT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICAgIGlmIChpbnB1dC5zdWJzdHIocGVnJGN1cnJQb3MsIDIpID09PSBwZWckYzQwKSB7XG4gICAgICAgICAgICAgIHMyID0gcGVnJGM0MDtcbiAgICAgICAgICAgICAgcGVnJGN1cnJQb3MgKz0gMjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHMyID0gcGVnJEZBSUxFRDtcbiAgICAgICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzQxKTsgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHMyIGFzIGFueSAhPT0gcGVnJEZBSUxFRCkge1xuICAgICAgICBwZWckc2F2ZWRQb3MgPSBzMDtcbiAgICAgICAgczEgPSBwZWckYzQyKHMyKTtcbiAgICAgICAgczAgPSBzMTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBlZyRjdXJyUG9zID0gczA7XG4gICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICB9XG5cbiAgICByZXR1cm4gczA7XG4gIH1cblxuICBmdW5jdGlvbiBwZWckcGFyc2VFbXB0eSgpOiBhbnkge1xuICAgIGxldCBzMCwgczEsIHMyO1xuXG4gICAgczAgPSBwZWckY3VyclBvcztcbiAgICBzMSA9IHBlZyRwYXJzZV8oKTtcbiAgICBpZiAoczEgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICBpZiAoaW5wdXQuc3Vic3RyKHBlZyRjdXJyUG9zLCAzKSA9PT0gcGVnJGM0Mykge1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4gICAgICAgIHMzID0gW107XG4gICAgICAgIGlmIChwZWckYzQ4LnRlc3QoaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKSkpIHtcbiAgICAgICAgICBzNCA9IGlucHV0LmNoYXJBdChwZWckY3VyclBvcyk7XG4gICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBzNCA9IHBlZyRGQUlMRUQ7XG4gICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzQ5KTsgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChzNCBhcyBhbnkgIT09IHBlZyRGQUlMRUQpIHtcbiAgICAgICAgICB3aGlsZSAoczQgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICBzMy5wdXNoKHM0KTtcbiAgICAgICAgICAgIGlmIChwZWckYzQ4LnRlc3QoaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKSkpIHtcbiAgICAgICAgICAgICAgczQgPSBpbnB1dC5jaGFyQXQocGVnJGN1cnJQb3MpO1xuICAgICAgICAgICAgICBwZWckY3VyclBvcysrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgczQgPSBwZWckRkFJTEVEO1xuICAgICAgICAgICAgICBpZiAocGVnJHNpbGVudEZhaWxzID09PSAwKSB7IHBlZyRmYWlsKHBlZyRjNDkpOyB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHMzID0gcGVnJEZBSUxFRDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoczMgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgaWYgKGlucHV0LmNoYXJDb2RlQXQocGVnJGN1cnJQb3MpID09PSAzNCkge1xuICAgICAgICAgICAgczQgPSBwZWckYzQ2O1xuICAgICAgICAgICAgcGVnJGN1cnJQb3MrKztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgczQgPSBwZWckRkFJTEVEO1xuICAgICAgICAgICAgaWYgKHBlZyRzaWxlbnRGYWlscyA9PT0gMCkgeyBwZWckZmFpbChwZWckYzQ3KTsgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoczQgYXMgYW55ICE9PSBwZWckRkFJTEVEKSB7XG4gICAgICAgICAgICBwZWckc2F2ZWRQb3MgPSBzMDtcbiAgICAgICAgICAgIHMxID0gcGVnJGM1MChzMyk7XG4gICAgICAgICAgICBzMCA9IHMxO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgICAgIHMwID0gcGVnJEZBSUxFRDtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcGVnJGN1cnJQb3MgPSBzMDtcbiAgICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBwZWckY3VyclBvcyA9IHMwO1xuICAgICAgczAgPSBwZWckRkFJTEVEO1xuICAgIH1cblxuICAgIHJldHVybiBzMDtcbiAgfVxuXG4gIGZ1bmN0aW9uIHBlZyRwYXJzZV8oKTogYW55IHtcbiAgICBsZXQgczAsIHMxLCBzMjtcblxuICAgIHBlZyRzaWxlbnRGYWlscysrO1xuICAgIHMwID0gcGVnJGN1cnJQb3M7XG4gICAgczEgPSBbXTtcbiAgICBpZiAocGVnJGMxLnRlc3QoaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKSkpIHtcbiAgICAgIHMyID0gaW5wdXQuY2hhckF0KHBlZyRjdXJyUG9zKTtcbiAgICAgIHBlZyRjdXJyUG9zKys7XG4gICAgfSBlbHNlIHtc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WUgPGU+KiknLFxuICAgICAgICAgICAgICAgICAgICAgJyhjb25kIHtbPGU+LDxlPl19KyknLFxuICAgICAgICAgICAgICAgICAgICAgJzxuYW1lPicsXG4gICAgICAgICAgICAgICAgICAgICAnPHY+J10sXG4gICc8ZT4qJzogICAgICAgICAgIFtdLCAvL1snPGU+IDxlPionLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJyddLFxuICAne1sgPGU+IDxlPiBdfSsnOiBbXSwgLy9bJ1s8ZT4gPGU+XScsXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAnWzxlPiA8ZT5dIHtbPGU+LDxlPl19KyddLFxuICAnWyA8ZT4gPGU+IF0nOiAgICBbXSwgLy9bJ1s8ZT4gPGU+XSddLFxuICAnPG5hbWU+Kic6ICAgICAgICBbXSwgLy9bJycsXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAnPG5hbWU+IDxuYW1lPionXSxcbiAgJzxuYW1lPisnOiAgICAgICAgW10sIC8vWyc8bmFtZT4nLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJzxuYW1lPiA8bmFtZT4rJ10sXG4gICc8bmFtZT4nOiAgICAgICAgIFtdLFxuICAnPHY+JzogICAgICAgICAgICBbXVxufTtcblxuLy8gIyMjIHRyYW5zZm9ybSBBU1QgaW50byBub2RlIGhlbHBlciBzdHJ1Y3R1cmVcbmZ1bmN0aW9uIHByb2dyYW1Ub05vZGUocDogQlNMX0FTVC5wcm9ncmFtKTogbm9kZSB7XG4gIGNvbnN0IGV4cHJlc3Npb25zID0gcC5tYXAoQlNMX1ByaW50LnByaW50RGVmT3JFeHByKTtcbiAgY29uc3QgaW5kaWNlcyA9IFtdO1xuICBsZXQgcHJvZ3JhbSA9ICcnO1xuICBmb3IobGV0IGkgPSAwOyBpIDwgZXhwcmVzc2lvbnMubGVuZ3RoOyBpKyspIHtcbiAgICBpZiAoaSA+IDApIHByb2dyYW0gPSBgJHtwcm9ncmFtfVxcbmA7XG4gICAgY29uc3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ycm9yLFxuICAgICAgICAgICAgICByZWRleDogcixcbiAgICAgICAgICAgICAgcmVzdWx0OiBzdHJ1Y3RWYWwsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgIGNvbnN0IG1ha2VSdWxlOiBTSV9TVFJVQ1QuU3RydWN0TWFrZSA9IHtcbiAgICAgICAgICAgIHR5cGU6IFNJX1NUUlVDVC5SdWxlLlN0cnVjdE1ha2UsXG4gICAgICAgICAgICByZWRleDogcixcbiAgICAgICAgICAgIHJlc3VsdDogc3RydWN0VmFsLFxuICAgICAgICAgIH07XG4gICAgICAgICAgcmV0dXJuIG1ha2VSdWxlO1xuICAgICAgICB9IGVsc2UgaWYgKFNJX1NUUlVDVC5pc1ByZWRGdW4oZnVuRGVmKSkge1xuICAgICAgICAgIGNvbnN0IHByZWRWYWwgPSBwcmVkU3RydWN0KHIubmFtZSwgZnVuRGVmLCBhcmdzKTtcbiAgICAgICAgICBpZiAocHJlZFZhbCBpbnN0YW5jZW9mIEVycm9yKVxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgdHlwZTogU0lfU1RSVUNULlJ1bGUuU3RydWN0UHJlZEVycm9yLFxuICAgICAgICAgICAgICByZWRleDogcixcbiAgICAgICAgICAgICAgcmVzdWx0OiBwcmVkVmFsLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAvLyBpZiBjaGVjayB3aGljaCBTdHJ1Y3RQcmVkUnVsZSB0byB1c2VcbiAgICAgICAgICBpZiAocHJlZFZhbCkge1xuICAgICAgICAgICAgY29uc3QgcHJlZFJ1bGU6IFNJX1NUUlVDVC5TdHJ1Y3RQcmVkVHJ1ZSA9IHtcbiAgICAgICAgICAgICAgdHlwZTogU0lfU1RSVUNULlJ1bGUuU3RydWN0UHJlZFRydWUsXG4gICAgICAgICAgICAgIHJlZGV4OiByLFxuICAgICAgICAgICAgICByZXN1bHQ6IHByZWRWYWwsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIHByZWRSdWxlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBwcmVkUnVsZTogU0lfU1RSVUNULlN0cnVjdFByZWRGYWxzZSA9IHtcbiAgICAgICAgICAgICAgdHlwZTogU0lfU1RSVUNULlJ1bGUuU3RydWN0UHJlZEZhbHNlLFxuICAgICAgICAgICAgICByZWRleDogcixcbiAgICAgICAgICAgICAgcmVzdWx0OiBwcmVkVmFsLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBwcmVkUnVsZTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29uc3Qgc2VsZWN0VmFsID0gc2VsZWN0U3RydWN0KHIubmFtZSwgZnVuRGVmLCBhcmdzKTtcbiAgICAgICAgICBpZiAoc2VsZWN0VmFsIGluc3RhbmNlb2YgRXJyb3IpXG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICB0eXBlOiBTSV9TVFJVQ1QuUnVsZS5TdHJ1Y3RTZWxlY3RFcnJvcixcbiAgICAgICAgICAgICAgcmVkZXg6IHIsXG4gICAgICAgICAgICAgIHJlc3VsdDogc2VsZWN0VmFsLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICBjb25zdCBzZWxlY3RSdWxlOiBTSV9TVFJVQ1QuU3RydWN0U2VsZWN0ID0ge1xuICAgICAgICAgICAgdHlwZTogU0lfU1RSVUNULlJ1bGUuU3RydWN0U2VsZWN0LFxuICAgICAgICAgICAgcmVkZXg6IHIsXG4gICAgICAgICAgICByZXN1bHQ6IHNlbGVjdFZhbCxcbiAgICAgICAgICB9O1xuICAgICAgICAgIHJldHVybiBzZWxlY3RSdWxlO1xuICAgICAgICB9XG4gICAgICB9IGVsc2VcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0eXBlOiBTSV9TVFJVQ1QuUnVsZS5GdW5FcnJvcixcbiAgICAgICAgICByZWRleDogcixcbiAgICAgICAgICByZXN1bH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lZGV4OiByLFxuICAgICAgICAgICAgcmVzdWx0OiBFcnJvcihcIidjb25kJzogYWxsIHF1ZXN0aW9uIHJlc3VsdHMgd2VyZSBmYWxzZVwiKSxcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IG5ld0V4cHI6IEJTTF9BU1QuQ29uZCA9IHtcbiAgICAgICAgICB0eXBlOiBCU0xfQVNULlByb2R1Y3Rpb24uQ29uZEV4cHJlc3Npb24sXG4gICAgICAgICAgb3B0aW9uczogbmV3T3B0aW9ucyxcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB0eXBlOiBTSV9TVFJVQ1QuUnVsZS5Db25kRmFsc2UsXG4gICAgICAgICAgcmVkZXg6IHIsXG4gICAgICAgICAgcmVzdWx0OiBuZXdFeHByLFxuICAgICAgICB9O1xuICAgICAgfSBlbHNlIGlmIChCU0xfQVNULmlzRXhwcihjb25kUmVzdWx0KSB8fCBTSV9TVFJVQ1QuaXNWYWx1ZShjb25kUmVzdWx0KSkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6IFNJX1NUUlVDVC5SdWxlLkNvbmRUcnVlLFxuICAgICAgICAgIHJlZGV4OiByLFxuICAgICAgICAgIHJlc3VsdDogY29uZFJlc3VsdCxcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgdHlwZTogU0lfU1RSVUNULlJ1bGUuQ29uZEVycm9yLFxuICAgICAgICAgIHJlZGV4OiByLFxuICAgICAgICAgIHJlc3VsdDogY29uZFJlc3VsdCxcbiAgICAgICAgfTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgY29uc3Qgc3Vic3RSZWQ6IEJTTF9BU1QuZXhwciB8IFNJX1NUUlVDVC5WYWx1ZSB8IEVycm9yID0gc3Vic3RDb25zdChcbiAgICAgICAgcixcbiAgICAgICAgZW52XG4gICAgICApO1xu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dWN0aW9uLkxpdGVyYWwsXG4gICAgICAgICAgICAgIHZhbHVlOiBhcmcsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIG5ld0FyZztcbiAgICAgICAgICB9IGVsc2UgaWYgKFNJX1NUUlVDVC5pc0lkKGFyZykpIHtcbiAgICAgICAgICAgIGNvbnN0IG5ld0FyZzogQlNMX0FTVC5OYW1lID0ge1xuICAgICAgICAgICAgICB0eXBlOiBCU0xfQVNULlByb2R1Y3Rpb24uU3ltYm9sLFxuICAgICAgICAgICAgICBzeW1ib2w6IGFyZy5zeW1ib2wsXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgcmV0dXJuIG5ld0FyZztcbiAgICAgICAgICB9IGVsc2UgcmV0dXJuIGFyZztcbiAgICAgICAgfSk7XG4gICAgICAgIGNvbnN0IGZpbmFsRXhwcjogQlNMX0FTVC5DYWxsID0ge1xuICAgICAgICAgIHR5cGU6IEJTTF9BU1QuUHJvZHVjdGlvbi5GdW5jdGlvbkNhbGwsXG4gICAgICAgICAgbmFtZTogYy5vcCxcbiAgICAgICAgICBhcmdzOiBuZXdBcmdzLFxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6IFNJX1NUUlVDVC5Qcm9kdWN0aW9uLkV2YWxTdGVwLFxuICAgICAgICAgIGVudjogZW52LFxuICAgICAgICAgIHJ1bGU6IHtcbiAgICAgICAgICAgIHR5cGU6IFNJX1NUUlVDVC5SdWxlLktvbmcsXG4gICAgICAgICAgICBjb250ZXh0OiBjLFxuICAgICAgICAgICAgcmVkZXhSdWxlOiBvbmVSdWxlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgcmVzdWx0OiBmaW5hbEV4cHIsXG4gICAgICAgIH07XG4gICAgICAgIC8vQ29uZENvbnRleHRcbiAgICAgIH0gZWxzZSBpZiAoU0lfU1RSVUNULmlzQ29uZENvbnRleHQoYykpIHtcbiAgICAgICAgY29uc3Qgb3B0aW9ucyA9IGMub3B0aW9ucztcbiAgICAgICAgY29uc3QgZXhwcjogQlNMX0FTVC5leHByID0gU0lfU1RSVUNULmlzVmFsdWUoZXhwclN0ZXAucmVzdWx0KVxuICAgICAgICAgID8geyB0eXBlOiBCU0xfQVNULlByb2R1Y3Rpb24uTGl0ZXJhbCwgdmFsdWU6IGV4cHJTdGVwLnJlc3VsdCB9XG4gICAgICAgICAgOiBleHByU3RlcC5yZXN1bHQ7XG4gICAgICAgIGNvbnN0IGZpcnN0Q2xhdXNlOiBCU0xfQVNULkNsYXVzZSA9IHtcbiAgICAgICAgICB0eXBlOiBCU0xfQVNULlByb2R1Y3Rpb24uQ29uZE9wdGlvbixcbiAgICAgICAgICBjb25kaXRpb246IGV4cHIsXG4gICAgICAgICAgcmVzdWx0OiBvcHRpb25zWzBdLnJlc3VsdCxcbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgbmV3T3B0aW9ucyA9IFtmaXJzdENsYXVzZSwgLi4ub3B0aW9ucy5zbGljZSgxKV07XG4gICAgICAgIGNvbnN0IGZpbmFsRXhwcjogQlNMX0FTVC5Db25kID0ge1xuICAgICAgICAgIHR5cGU6IEJTTF9BU1QuUHJvZHVjdGlvbi5Db25kRXhwcmVzc2lvbixcbiAgICAgICAgICBvcHRpb25zOiBuZXdPcHRpb25zLFxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHR5cGU6IFNJX1NUUlVDVC5Qcm9kdWN0aW9uLkV2YWxTdGVwLFxuICAgICAgICAgIGVudjogZW52LFxuICAgICAgICAgIHJ1bGU6IHtcbiAgICAgICAgICAgIHR5cGU6IFNJX1NUUlVDVC5SdWxlLktvbmcsXG4gICAgICAgICAgICBjb250ZXh0OiBjLFxuICAgICAgICAgICAgcmVkZXhSdWxlOiBvbmVSdWxlLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgcmVzdWx0OiBmaW5hbEV4cHIsXG4gICAgICAgIH07XG4gICAgICB9IGVsc2Uge1xuIC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ZnQtYXJyb3dlZCBvbmUtcnVsZVwiXG4gICAgICAgICAgICAgICAgc3R5bGU9XCItLW9uZS1ydWxlLW1hcmdpbi1sZWZ0OiAke2xlZnRfb2Zmc2V0X2Fycm93ICogbWVhc3VyZXMuY2hhcldpZHRofXB4XCI+XG4gICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJydWxlLW5hbWVcIj4ke3J1bGVzW3J1bGVOYW1lXVtcIm5hbWVcIl19PC9zcGFuPiR7XG4gICAgICAgICAgICAgICAgcmVuZGVySG9sZXNJblJ1bGVcbiAgICAgICAgICAgICAgICAgID8gYDpcbiAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInJ1bGUtZGVzY3JpcHRpb25cIj5cbiAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiaG9sZSBydWxlLWhvbGVcIj4ke3JlZGV4fTwvc3Bhbj4gXHUyMTkyXG4gICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImhvbGUgaG9sZS1yZXN1bHQgcnVsZS1ob2xlXCI+JHtcbiAgICAgICAgICAgICAgICAgICAgICAgQlNMX1ByaW50LnNhbml0aXplKHJlc3VsdC5yZWRleClcbiAgICAgICAgICAgICAgICAgICAgIH08L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgPC9zcGFuPmBcbiAgICAgICAgICAgICAgICAgIDogXCJcIlxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgIDwvc3Bhbj5cblxuICAgICAgICAgICA8aW1nIHNyYz1cIiR7Y2lyY2xlX2luZm99XCJcbiAgICAgICAgICAgICAgICBjbGFzcz1cImljb24gaW5mby10b2dnbGUgaW5mby1leHBhbmRcIlxuICAgICAgICAgICAgICAgIG9uY2xpY2s9XCJleHBhbmRJbmZvKGV2ZW50KVwiPlxuICAgICAgICAgICA8aW1nIHNyYz1cIiR7Y2lyY2xlX3htYXJrfVwiXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJpY29uIGluZm8tdG9nZ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