This repository has been archived by the owner on Apr 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
ia-cyoa.html
656 lines (511 loc) · 164 KB
/
ia-cyoa.html
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
<!DOCTYPE html><html><head><title>Information Architecture</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style>.small-caps{text-transform:uppercase;font-size:70%;letter-spacing:.075em}#backstage .panel h2{margin:0}#backstage .panel h2 button{text-align:left;background:none;border:none;width:100%;font-weight:400;text-transform:uppercase;font-size:70%;letter-spacing:.075em;font-size:11px;padding:0 8px}#backstage .panel h2 button:before{content:"\25BA";display:inline-block;width:1.25em}#backstage .panel h2 button:hover{color:#495057}#backstage .panel.open h2 button:before{content:"\25BC"}
#backstage table.history td.actions{width:2.5em}#backstage table.history td.go{border-right:1px solid #000}
#backstage ul.tabs{list-style:none;margin:8px;padding:0;display:flex;border:1px solid #000;font-size:12px}#backstage ul.tabs li{flex-grow:1;border-right:1px solid #000;text-align:center}#backstage ul.tabs li:last-child{border-right:none}#backstage ul.tabs li button{color:#000;text-decoration:none;display:block;width:100%;height:28px;padding:8px;border:none;border-radius:0}#backstage ul.tabs li button.active{background:#000;color:#dee2e6}#backstage .tab-content{max-height:calc(100vh - $backstage-tab-height);overflow:auto}
.small-caps{text-transform:uppercase;font-size:70%;letter-spacing:.075em}body.backstage-visible #backdrop{justify-content:flex-start;max-width:67vw}#backstage{position:fixed;top:0;right:0;bottom:0;width:33vw;max-height:100vh;font-size:18px;background:#dee2e6;color:#000;transform:translateX(100%);box-shadow:inset 2px 0 3px rgba(0,0,0,.25);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu Cantarell,Helvetica Neue,sans-serif;font-size:80%}#backstage:before{content:"";position:absolute;z-index:2;top:calc(50% - 25px);right:calc(100% - 4px);height:50px;width:4px;background:#dee2e6}@media screen and (max-width:425px){#backstage{width:calc(100vw - 25px)}}#backstage.open{transform:none}#backstage .toggle-visibility{position:absolute;z-index:1;top:calc(50% - 25px);right:100%;width:25px;height:50px;padding:0;background:#dee2e6;color:#000;border:none;border-top-left-radius:25px;border-bottom-left-radius:25px;border-top-right-radius:0;border-bottom-right-radius:0;box-shadow:inset 2px 0 3px rgba(0,0,0,.25);font-size:18px}#backstage button{color:#000;background:transparent;padding:8px;border-radius:16px;border:1px solid #000}#backstage button:hover{background:#e9ecef}#backstage p{padding:0 8px}#backstage li,#backstage p,#backstage td{font-size:12px}#backstage input,#backstage select{color:#000;background:transparent;border:1px solid #000;padding:8px}#backstage table{background:transparent;table-layout:fixed;border-collapse:collapse;width:calc(100% - 16px);margin:8px}#backstage th{text-align:left}#backstage td{position:relative;border:1px solid #000;padding:8px;vertical-align:top}#backstage td:first-child{border-left:none}#backstage td:last-child{border-right:none}#backstage td button,#backstage td input{background:none;border:none;border-radius:0;position:absolute;top:0;left:0;bottom:0;width:100%;padding:8px}#backstage textarea{background:transparent;border:1px solid #000;color:#000;padding:8px;width:100%;height:7.75em}#backstage .block{display:block;margin:8px;width:calc(100% - 16px)}#backstage .disabled{color:#868e96}#backstage .indented-input{margin-left:calc(10em + 8px);font-size:12px}#backstage .input-group{display:flex;align-items:center}#backstage .input-group label:first-child{text-align:right;margin-right:8px;width:10em}#backstage .input-group input,#backstage .input-group select{flex-grow:1}#backstage .segmented-button{display:flex}#backstage .segmented-button button{border-left:none;border-radius:0;margin:0;flex-grow:1}#backstage .segmented-button button:first-child{border-left:1px solid #000;border-top-left-radius:16px;border-bottom-left-radius:16px}#backstage .segmented-button button:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}#backstage .segmented-button .fixed{flex-grow:0;min-width:24px}#backstage .tab-content{max-height:calc(100vh - 28px);overflow:auto}
.fade-in{opacity:0;animation:fade-in 1s ease-out forwards}.fade-out{animation:fade-in 1s ease-out reverse forwards}.skip-animation{animation-delay:0s!important}@keyframes fade-in{0%{opacity:0}to{opacity:1}}
#page .warnings{list-style-type:none;padding-left:0;margin-left:0}
.small-caps{text-transform:uppercase;font-size:70%;letter-spacing:.075em}#backdrop{min-height:100vh;align-items:center}#backdrop,#page{display:flex;justify-content:center}#page{flex-direction:column;width:40em;min-height:calc(100vh - 2em);max-width:calc(100vw - 2em);line-height:150%;margin:1em;padding:4em 4em 2em;position:relative}#page article{flex-grow:1;display:flex}#page article>:first-child{margin-top:0;width:100%}#page footer,#page header{display:flex}#page footer>div,#page header>div{flex-grow:1}#page footer p,#page header p{margin:.5em 0 0}#page footer .center,#page header .center{text-align:center}#page footer .right p,#page header .right p{text-align:right}#page header{margin-top:0}#page header.has-content{border-bottom:1px solid #000}#page header.has-content+article>article>div>p:first-child,#page header.has-content+article>div>p:first-child{margin-top:1em}#page footer{margin-bottom:0}#page footer.has-content{border-top:1px solid #000}#page hr{border:none}#page hr:after{content:"* \A0 * \A0 *";display:block;text-align:center}#page .error,#page .warning{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu Cantarell,Helvetica Neue,sans-serif;font-size:80%;background:#fff5f5;color:#c92a2a;padding:.5em;border-left:4px solid #ffa8a8;position:relative;margin-bottom:1em;overflow:auto}#page .error :first-child,#page .warning :first-child{margin-top:0}#page .error :last-child,#page .warning :last-child{margin-bottom:0}#page .error a,#page .warning a{color:#c92a2a}#page .warning{background:#fff9db;color:#e67700}#page .warning a{color:#e67700}#page .fork p{display:flex;flex-direction:column;width:100%}#page .fork p a{display:block;flex-grow:1;text-align:center;padding:.5em}@media screen and (max-width:768px){#page{margin:0;width:100vw;max-width:100vw;min-height:100vh;padding:1em}}#spinner{position:absolute;bottom:0;right:0;opacity:0;transition:opacity .25s ease-in-out;pointer-events:none}#spinner.visible{display:block;opacity:1}
*{box-sizing:border-box}body{margin:0;padding:0}img{max-width:100%;height:auto}input[type=text],select{padding:.25em}pre{white-space:pre-wrap}tw-storydata{display:none}</style></head><body><form id="cb-validation" action="javascript:void(0)"><button id="cb-validation-tester" hidden></button> <button id="cb-block-enter-key" hidden></button><div id="backdrop"><div id="page" aria-live="polite"><header><div class="left"></div><div class="center"></div><div class="right"></div></header><article></article><ul class="warnings"></ul><footer><div class="left"></div><div class="center"></div><div class="right"></div></footer><div id="spinner"><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmlld0JveD0iMCAwIDEwMCAxMDAiPgogICAgPHJlY3QgeD0iMzEiIHk9IjE0IiB3aWR0aD0iMzgiIGhlaWdodD0iNzIiIHJ4PSI0IiBmaWxsPSJ3aGl0ZSIgLz4KICAgIDxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIHI9IjI4IiBmaWxsPSJ3aGl0ZSIgLz4KCTxyZWN0IHg9IjM1IiB5PSIxOCIgd2lkdGg9IjMwIiBoZWlnaHQ9IjY0IiByeD0iNCIgZmlsbD0id2hpdGUiIHN0cm9rZS13aWR0aD0iMnB4IiBzdHJva2U9ImJsYWNrIiAvPgogICAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgcj0iMjAiIHN0cm9rZT0iYmxhY2siIGZpbGw9IndoaXRlIiBzdHJva2Utd2lkdGg9IjJweCIgLz4KCTxsaW5lIHgxPSI1MCIgeTE9IjUwIiB4Mj0iNTAiIHkyPSIzNyIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIycHgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCI+CiAgICAgICAgPGFuaW1hdGVUcmFuc2Zvcm0KICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICBiZWdpbj0iMHMiCiAgICAgICAgICAgIGR1cj0iMjBzIgogICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgIGZyb209IjAgNTAgNTAiCiAgICAgICAgICAgIHRvPSIzNjAgNTAgNTAiCiAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIgogICAgICAgIC8+Cgk8L2xpbmU+Cgk8bGluZSB4MT0iNTAiIHkxPSI1MCIgeDI9IjQyIiB5Mj0iNTAiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMnB4IiBzdHJva2UtbGluZWNhcD0icm91bmQiPgogICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgYmVnaW49IjBzIgogICAgICAgICAgICBkdXI9IjEyMHMiCiAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgZnJvbT0iMCA1MCA1MCIKICAgICAgICAgICAgdG89IjM2MCA1MCA1MCIKICAgICAgICAgICAgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiCiAgICAgICAgLz4KCTwvbGluZT4KPC9zdmc+" width="40" height="40" alt=""></div></div></div></form><!-- UUID://5A7D6282-C043-49F6-872B-6518CF0391B6// --><tw-storydata name="Information Architecture" startnode="1" creator="Tweego" creator-version="2.1.1+81d1d71" ifid="5A7D6282-C043-49F6-872B-6518CF0391B6" zoom="1" format="Chapbook" format-version="1.0.0" options="" hidden><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style><script role="script" id="twine-user-script" type="text/twine-javascript"></script><tw-passagedata pid="1" name="Start" tags="" position="100,100" size="100,100">userName: ' '
--
# Information Architecture
**[[Let's Start->Intro]]**</tw-passagedata><tw-passagedata pid="2" name="Intro" tags="" position="225,100" size="100,100">config.footer.left: "▰▱▱▱▱▱▱▱▱▱ 6%"
--
Let's go on an adventure into another world.
This world is not entirely different to our own, but it might have some unexpected treasures - and pitfalls - to find.
It's an adventure into the mind of your reader.
They live in our world, but they don't always think like we do.
And learning to think like a reader can be tricky!
{embed image: 'images/reader_world.svg', alt: 'A blue and green globe sitting on top of a book with a red cover'}
Have you ever been really good at something, and tried to show someone else how to do it?
It's frustrating when they just don't seem to get it, even though it seems easy to you.
Science tells us that the more you know about a topic, the less you are able to imagine what it's like to not know it.
The technical name for this is the Curse of Knowledge, and it can make writing documentation hard.
Writers combat the Curse of Knowledge by putting themselves in the shoes of the reader.
And while this guide won't teach you to be a professional technical writer, it will definitely help you think about your reader, so that you can write better documentation.
This guide is interactive, just click the option you like the most to move on.
Just follow the prompts, and let us guide you into ...
the world of the reader ...
**[[Continue->Before you begin]]**
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="3" name="Before you begin" tags="" position="350,100" size="100,100">userName: 'Type your name here'
config.footer.left: "▰▱▱▱▱▱▱▱ 12%"
--
## Don't start yet!
When you're excited about a new project, it's super-tempting to just start writing the docs without thinking too hard about it.
**DON'T DO THIS!**
This guide is designed to get you thinking about your readers in such a way that you'll end up knowing what docs you need to write.
It won't take very long for you to get through it, and it will save you time in the long run.
{embed image: 'images/stuck.svg', alt: 'A smiling person wearing a blue outfit is in a very big hole, with the words "i am stuck" in red'}
When you're done, you should have a good idea of who your main readers are, the kinds of things they are using your docs for, and what kinds of docs they might be expecting.
This will help you know which templates to use from the Good Docs Project, and give you the basics to start completing them.
If you don't want to do this using the interactive tool, you can [[don't click here the link does not exist yet]] to go to the static text instead.
When you're ready, tell me your name:
{text input for: 'userName'}
and we can [[get started->What are you writing about]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="4" name="What are you writing about" tags="" position="475,100" size="100,100">config.footer.left: "▰▱▱▱▱▱ 18%"
--
Hi {userName}! I'm so glad you decided to join me!
{embed image: 'images/hello_peeps.svg', alt: 'A smiling person with their arms in the air, and text reading "Hello my dear peeps".'}
## What are you writing about?
The first thing to do is think about what you're writing about.
Are you writing about something pretty simple, that people can use without having any experience? Like a toaster?
Or are you writing about something a bit complicated, that people can start to use only after they've done a bit of reading, and might need to ask some questions as they go along? More like a car?
Or are you writing about something really tricky? Something that requires training, a whole lot of background knowledge, and possibly a friend to help them the whole way? Like a nuclear reactor?
> [[Toaster->Writing about a toaster]]
> [[Car->Writing about a car]]
> [[Nuclear Reactor->Writing about a nuclear reactor]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="5" name="Writing about a toaster" tags="" position="600,100" size="100,100">config.footer.left: "▰▰▱▱▱▱▱▱ 25%"
--
## Writing about a toaster
Because the thing you are writing about is pretty simple and straightforward, you might think that you don't need much documentation.
Just because you might not need a lot of docs, you will still need something, and working that out could be tricky.
You're going to need to think a little bit harder about who you're writing for.
{embed image: 'images/tooster.svg', alt: 'A silver toaster marked "Super Tooster" with a red discount star, and a sign saying "wowzars!!!"'}
**Curse of Knowledge alert!!**
Just because your toaster seems super simple to you, doesn't mean everyone will find it as easy as you do.
What if your reader doesn't speak the same language, or is a new migrant from a place with a totally different culture?
What if they are nine years old?
Or 99 years old?
What if they have a physical or mental disability?
When you are thinking about your readers, make sure you are thinking about everyone, not just people like you.
Now, let's [[move on->Who are you writing for?]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="6" name="Writing about a car" tags="" position="725,100" size="100,100">config.footer.left: "▰▰▱▱▱▱▱▱ 25%"
--
## Writing about a car
There is a pretty good chance that you needed to learn how to do this thing yourself, and hopefully it wasn't all that long ago, and you can fairly easily cast your mind back to those days when you didn't know what this thing was, or how it worked.
And hopefully there is also someone nearby who has had to learn as well, so go ask them questions!
{embed image: 'images/car.svg', alt: 'A cheering person in a green outfit driving a red and white striped sports car, with the caption "big red car"'}
**Curse of Knowledge alert!!**
Try to remember that not everyone knows the same stuff, or learns in the same way.
What if your reader doesn't speak the same language, or is a new migrant from a place with a totally different culture?
What if they are nine years old?
Or 99 years old?
What if they have a physical or mental disability?
When you are thinking about your readers, make sure you are thinking about everyone, not just people like you.
Now, let's [[move on->Who are you writing for?]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="7" name="Writing about a nuclear reactor" tags="" position="850,100" size="100,100">config.footer.left: "▰▰▱▱▱▱▱▱ 25%"
--
## Writing about a nuclear reactor
The first thing to work out if you are writing about a nuclear reactor is what reasonable assumptions can you make?
There's a fair chance that you can assume at least some kind of prior knowledge: a degree, some relevant experience, or perhaps using some other related tools or software.
Put these things right up front in your docs, so your readers can go away and learn something else first if they need to.
And be prepared to be challenged: you might discover in time that your assumptions are incorrect, and if that happens, you'll need to revisit your docs, too.
**Curse of Knowledge alert!!**
Try to remember that not everyone knows the same stuff, or learns in the same way.
What if your reader doesn't speak the same language, or is a new migrant from a place with a totally different culture?
What if they are nine years old?
Or 99 years old?
What if they have a physical or mental disability?
When you are thinking about your readers, make sure you are thinking about everyone, not just people like you.
Now, let's [[move on->Who are you writing for?]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="8" name="Who are you writing for?" tags="" position="975,100" size="100,100">readerName1: 'Alex'
readerName2: 'Bobbi'
readerName3: 'Charlie'
config.footer.left: "▰▰▰▱▱▱▱▱▱▱ 30%"
--
## Who are you writing for?
Now that you know what you're writing about, consider who you're writing for.
Remember that people come in all shapes and sizes, so let's think up three different people, to try and make sure we're covering all the options.
{embed image: 'images/wave.svg', alt: 'A winking smiling person wearing a purple shirt and pants, with pastel coloured hair, waving'}
The way you categorize your three readers is up to you, but sometimes the best way to start is by thinking of a beginner, an intermediate reader, and an expert.
Or, depending on the kind of product you have, you might think of an ordinary user, a system administrator, and a support person.
Your three readers should probably be interested in different parts of your product.
They will be trying to do different tasks, and they will need different levels of help from your docs.
Don't be afraid to let them overlap a little bit, but try and make sure you've covered most of the options.
To get started with understanding your readers, you should probably give them names.
What would you like to call your first reader?
{text input for: 'readerName1'}
What would you like to call your second reader?
{text input for: 'readerName2'}
What would you like to call your third reader?
{text input for: 'readerName3'}
Let's take a closer look at our readers, and work out [[Why do they read the docs?]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="9" name="Why do they read the docs?" tags="" position="1100,100" size="100,100">config.footer.left: "▰▰▰▱▱▱▱▱▱ 36%"
--
I'm going to tell you a secret:
No one curls up at night with a warm drink and a great technical manual.
If that's the case, why *do* people read docs?
Generally speaking, it's because they want to achieve something.
To put that in less abstract terms, you need to work out what problem your reader is trying to solve.
If Dusty wants to put their degree up on the wall, they might want to consult some documentation about how to do it.
The documentation Dusty needs to do this would probably not be called "How to Choose a Drill".
The documentation Dusty needs is "How to Hang a Picture".
This is an important distinction, because if you get it wrong, your readers won't know if the content is right for them or, worse, they won't find your content at all.
So let's think about what our readers are trying to achieve.
Which one would you like to start with?
> [[{readerName1}->Reader One]]
> [[{readerName2}->Reader Two]]
> [[{readerName3}->Reader Three]]
When you've got tasks for all of your readers, let's put it all together, and think about [[Writing for your readers->Writing for your readers]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="10" name="Reader One" tags="" position="1225,100" size="100,100">reader1action1: 'Install the product'
reader1action2: 'Perform initial setup'
reader1action3: 'Start their first project'
config.footer.left: "▰▰▰▰▱▱▱▱▱▱ 42%"
--
To understand {readerName1}, let's start by thinking about how they might begin.
What is the very first thing that {readerName1} might want to do?
{text input for: 'reader1action1'}
Now let's assume that {readerName1} manages to complete {reader1action1} without any trouble.
What would be the second thing that they would want to do?
{text input for: 'reader1action2'}
And now that they've managed to complete {reader1action2} what is the next thing?
{text input for: 'reader1action3'}
{embed image: 'images/dog.svg', alt: 'A happy red and orange dog sitting up.'}
Great! Now you have the three main things that a reader like {readerName1} might want to do, [[go back->Why do they read the docs?]] and do the same for {readerName2} and {readerName3}.
Or, if you're done, move on to [[Writing for your readers->Writing for your readers]]</tw-passagedata><tw-passagedata pid="11" name="Reader Two" tags="" position="100,225" size="100,100">reader2action1: 'Configure multiple users'
reader2action2: 'Troubleshoot networking problems'
reader2action3: 'Upgrade to a new version'
config.footer.left: "▰▰▰▰▰▱▱▱▱▱ 48%"
--
To understand {readerName2}, let's start by thinking about how they might begin.
What is the very first thing that {readerName2} might want to do?
{text input for: 'reader2action1'}
Now let's assume that {readerName2} manages to complete {reader2action1} without any trouble.
What would be the second thing that they would want to do?
{text input for: 'reader2action2'}
And now that they've managed to complete {reader2action2} what is the next thing?
{text input for: 'reader2action3'}
{embed image: 'images/platypus.svg', alt: 'A happy platypus with brown fur and yellow bill and feet.'}
Great! Now you have the three main things that a reader like {readerName2} might want to do, [[go back->Why do they read the docs?]] and do the same for {readerName3} and {readerName1}.
Or, if you're done, move on to [[Writing for your readers->Writing for your readers]]</tw-passagedata><tw-passagedata pid="12" name="Reader Three" tags="" position="225,225" size="100,100">reader3action1: 'Understand all the advanced features'
reader3action2: 'Switch from hosted services to local'
reader3action3: 'Shut down the reactor quickly during a meltdown'
config.footer.left: "▰▰▰▰▰▱▱▱▱▱ 54%"
--
To understand {readerName3}, let's start by thinking about how they might begin.
What is the very first thing that {readerName3} might want to do?
{text input for: 'reader3action1'}
Now let's assume that {readerName3} manages to complete {reader3action1} without any trouble.
What would be the second thing that they would want to do?
{text input for: 'reader3action2'}
And now that they've managed to complete {reader3action2} what is the next thing?
{text input for: 'reader3action3'}
{embed image: 'images/unirat.svg', alt: 'A brown rat with white wings and a colorful unicorn horn.'}
Great! Now you have the three main things that a reader like {readerName3} might want to do, [[go back->Why do they read the docs?]] and do the same for {readerName2} and {readerName1}.
Or, if you're done, move on to [[Writing for your readers->Writing for your readers]]</tw-passagedata><tw-passagedata pid="13" name="Writing for your readers" tags="" position="350,225" size="100,100">critpath1: ''
critpath2: ''
critpath3: ''
critpath4: ''
critpath5: ''
critpath6: ''
critpath7: ''
critpath8: ''
critpath9: ''
critpath10: ''
critpath11: ''
critpath12: ''
critpath13: ''
critpath14: ''
critpath15: ''
critpath16: ''
critpath17: ''
critpath18: ''
critpath19: ''
critpath20: ''
critpath21: ''
critpath22: ''
critpath23: ''
critpath24: ''
critpath25: ''
critpath26: ''
critpath27: ''
critscore1: ''
critscore2: ''
critscore3: ''
critscore4: ''
critscore5: ''
critscore6: ''
critscore7: ''
critscore8: ''
critscore9: ''
config.footer.left: "▰▰▰▰▰▰▱▱▱▱ 60% "
--
## Writing for your readers
Now that you know who your readers are, and the kinds of things they might be using your documentation for, you can display them in a table like this:
<table>
<tr>
<th>Task</th>
<th>{readerName1}</th>
<th>{readerName2}</th>
<th>{readerName3}</th>
<th>Critical Path Score</th>
</tr>
<tr>
<td>{reader1action1}</td>
<td>{dropdown menu for: 'critpath1', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath2', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath3', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore1', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader1action2}</td>
<td>{dropdown menu for: 'critpath4', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath5', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath6', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore2', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader1action3}</td>
<td>{dropdown menu for: 'critpath7', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath8', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath9', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore3', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader2action1}</td>
<td>{dropdown menu for: 'critpath10', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath11', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath12', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore4', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader2action2}</td>
<td>{dropdown menu for: 'critpath13', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath14', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath15', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore5', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader2action3}</td>
<td>{dropdown menu for: 'critpath16', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath17', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath18', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore6', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader3action1}</td>
<td>{dropdown menu for: 'critpath19', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath20', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath21', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore7', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader3action2}</td>
<td>{dropdown menu for: 'critpath22', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath23', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath24', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore8', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
<tr>
<td>{reader3action3}</td>
<td>{dropdown menu for: 'critpath25', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath26', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critpath27', choices: ['', '1 (Low)', '2 (Medium)', '3 (High)']}</td>
<td>{dropdown menu for: 'critscore9', choices: ['', '3 (Very low)', '4 (Low)', '5 (Medium)', '6 (Moderate)', '7 (High)', '8 (Very High)', '9 (Super High)']}</td>
</tr>
</table>
Now you just need to fill in the blank spaces.
Consider how likely the reader is to use the documentation to complete each task.
Score a **1** for a low likelihood, **2** for a medium likelihood, and **3** for a high likelihood.
**Curse of Knowledge alert!!**
Remember that this isn't how likely the reader is to do the task.
It's how likely the reader is to *use the documentation* to do the task.
A really experienced reader is not likely to need to the documentation for tasks like installation or setup, but they might need it for more advanced tasks.
When you have the numbers in, add up each row.
The rows that score the highest are what writers like to call *critical paths*.
Now you know what your critical paths are, you are ready to [[Identify the mess]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="14" name="Identify the mess" tags="" position="475,225" size="100,100">missingcontent1:'Installation Guide'
missingcontent2:'Initial setup procedure'
missingcontent3:'Quick Start Guide'
missingcontent4:'Users Guide'
missingcontent5:'Troubleshooting Guide'
missingcontent6:'Upgrade Guide'
missingcontent7:'Tuning Guide'
missingcontent8:'Administration Guide'
missingcontent9:'Reference Guide'
config.footer.left: "▰▰▰▰▰▱▱▱ 66%"
--
## Identify the mess
It's time to turn our attention to what you already have.
If you have already made a start on the docs, that's great!
But even if you think you're starting from scratch, there's a reasonable chance you actually already have something.
Have a think about it:
* Have you written notes while you've been working?
Even if they're just scratches on a notebook on your desk, that's documentation!
* Have you written any comments in your code?
You really should have! They're documentation, too.
* Have you put a README in your code repository?
That's also documentation!
* Have you given any talks or presentations about your project?
Even if there isn't a recording, any notes or slides you made is documentation too!
Get all of these things together and look at them with your critical paths in mind.
Do you have content here that fits all those critical paths?
You will probably start to notice the gaps pretty quickly.
It could be that you have a whole lot of content that describes how to do it, but not a lot that explains what it is.
Or, you could have a lot of stuff aimed at beginners, and not a lot that works for experts.
Sometimes, you might find that you have a lot of descriptions of things, but not a lot of step-by-step instructions.
## What's missing?
Have a think about each of your critical paths, and identify what content you need to fulfil each one:
* {reader1action1} - {critscore1}: {text input for: 'missingcontent1', required: false}
* {reader1action2} - {critscore2}: {text input for: 'missingcontent2', required: false}
* {reader1action3} - {critscore3}: {text input for: 'missingcontent3', required: false}
* {reader2action1} - {critscore4}: {text input for: 'missingcontent4', required: false}
* {reader2action2} - {critscore5}: {text input for: 'missingcontent5', required: false}
* {reader2action3} - {critscore6}: {text input for: 'missingcontent6', required: false}
* {reader3action1} - {critscore7}: {text input for: 'missingcontent7', required: false}
* {reader3action2} - {critscore8}: {text input for: 'missingcontent8', required: false}
* {reader3action3} - {critscore9}: {text input for: 'missingcontent9', required: false}
At this stage, it's normal to be feeling a little overwhelmed.
Now you can work out what you actually need, so you can cut some things from the list.
To do this, you need to [[State your intent->State your intent]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="15" name="State your intent" tags="" position="600,225" size="100,100">config.footer.left: "▰▰▰▰▰▰▰▱▱▱ 71%"
--
## State your intent
If you wanted to build a house, you wouldn't start laying bricks until you'd had a think about what kind of house you want to build.
How big is it going to be?
What materials are you going to use?
What layout and design is it going to have?
You also need to think about what you intend for your documentation.
Is it going to be comprehensive and detailed, or simple and sparse?
Is it going to use simple language, designed for people who have never done this before, or more technical language, for people who know what they're doing and just need the basics?
Is it going to start from the very beginning, or are you going to assume that your readers already have some knowledge?
When you've considered these things, and determined the kind of documentation you want to make sure your project has, you're just about ready to [[Face reality->Face reality]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="16" name="Face reality" tags="" position="725,225" size="100,100">config.footer.left: "▰▰▰▰▰▰▰▱▱ 78%"
--
## Face reality
By now, you should have a good idea of what your ideal documentation looks like.
It will be a shining beacon of docs goodness, hitting all the critical paths for all your readers, and people will talk about it for years to come!
It's a grim reality that project documentation needs to be maintained.
Have a think about how many writers your project might be able to access.
Are you likely to have writers on the project over time?
What skill level are they likely to have?
Is there any content that already exists elsewhere that you can point to, rather than writing it yourself?
Is there any way you can automate any part of the documentation, such as using code comments to generate API documentation?
Make sure you're not biting off more than you can chew, and [[Choose a direction->Choose a direction]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="17" name="Choose a direction" tags="" position="850,225" size="100,100">missingcontent10: 'Anything else?'
config.footer.left: "▰▰▰▰▰▰▰▰▱▱ 83%"
--
## Choose a direction
Now is when you really get to start making decisions.
You've thought about your readers, and the kinds of things they might want to do.
You've thought about the kind of content you already have, and what's missing.
Then you faced reality and realized that you might not be able to create perfect docs, but you can certainly improve what you already have.
So, which docs are you going to write?
Delete anything from this list that doesn't make the cut.
* {missingcontent1}
* {missingcontent2}
* {missingcontent3}
* {missingcontent4}
* {missingcontent5}
* {missingcontent6}
* {missingcontent7}
* {missingcontent8}
* {missingcontent9}
* {text input for: 'missingcontent10', required: false}
Now you get to decide how to move forward.
That starts with [[Measuring the distance->Measure the distance]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="18" name="Measure the distance" tags="" position="975,225" size="100,100">config.footer.left: "▰▰▰▰▰▰▰▰▰▱ 90%"
--
## Measure the distance
Don't let your docs project be like your New Year resolutions, forgotten and lonely by the end of the year.
The best way to make sure you stick to your docs goals, is to work out how much you can do, and set a deadline for each step in the process.
The templates will help you understand how much work is involved in each of the docs you want to write.
Have a read through the information for each template you want to use, and work out how much time you are going to need to work on it.
Then you can split up docs work like this:
* Planning - 20%
* Drafting - 50%
* Reviewing and editing - 20%
* Production - 10%
So, if you want to write a How To, and you have five months to do it, you can work out how much time to spend on each task like this:
Three months = Around 100 working days, not counting weekends, and allowing for a few holidays.
You can adjust this however you like, if you're only working on weekends, for example, or if you have other projects to work on as well.
* Planning - 20 days (4 weeks)
* Drafting - 50 days (10 weeks)
* Review & edit - 20 days (4 weeks)
* Production - 10 days (2 weeks)
There's just one more thing to do: [[Prepare to adjust->Prepare to adjust]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="19" name="Prepare to adjust" tags="" position="1100,225" size="100,100">config.footer.left: "▰▰▰▰▰▰▰▰▰▱ 99%"
--
## Prepare to adjust
The most important thing you need to do is to be flexible.
Things don't always work out, and that's OK!
Perhaps you get a new job and end up with no time to work on things.
If you've written down your plan, and spoken to others in your project about what you were going to do, others can pick up the work, and when you're able to, you can come back to it.
Perhaps you get an injection of cash and can hire some writers.
Go back to the critical paths, expand your scope, and hand that planning to them, so that they have somewhere to start, and understand your vision for the docs.
Or maybe things just don't work out, and the project ends up being abandoned entirely.
That's sad, but it's OK.
At least you've finished up with some valuable knowledge, so you'll be even better for your next idea.
So, are you ready to get started?
Here's what you want to work on (take a note of these now!):
* {missingcontent1}
* {missingcontent2}
* {missingcontent3}
* {missingcontent4}
* {missingcontent5}
* {missingcontent6}
* {missingcontent7}
* {missingcontent8}
* {missingcontent9}
* {missingcontent10}
And now go [[check out the templates->https://github.com/thegooddocsproject/templates/blob/master/README.md]]!
Or, if you want to keep reading, you can [[Find out more about information architecture->Further reading]]
{back link, label: 'Or go back a step'}</tw-passagedata><tw-passagedata pid="20" name="Further reading" tags="" position="1225,225" size="100,100">config.footer.left: "▰▰▰▰▰▰▰▰▰▰ 100%"
--
## Further Reading
This document was largely based on the brilliant book by Abby Covert called [[How to Make Sense of Any Mess->http://www.howtomakesenseofanymess.com/]].
It's a quick read, and it doesn't just apply to technical documentation, you can use the principles in that book to help you organize anything at all.
If you want to delve further into information architecture for technical documentation, the most important text you need is the O'Reilly book [[Information Architecture->https://www.oreilly.com/library/view/information-architecture-4th/9781491913529/]].
It has everything you need to know, including answers to questions you didn't know you needed to ask.
It has a polar bear on the cover.
{embed image: 'images/banana.svg', alt: 'A reclining smiling banana with red writing saying "lets go banana"'}
## That's it!
You've reached the end of the interactive Information Architecture Guide.
If you're ready to get started, go [[check out the templates->https://github.com/thegooddocsproject/templates/blob/master/README.md]]
If you want to refer back to this guide later on, visit the [[static version->don't click here the link does not exist yet]]
Or, if you want to go back and check something, you can {back link, label: 'go back a step'}, or {restart link, label: 'restart from the beginning'}.</tw-passagedata></tw-storydata><script>!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=28)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.set=t.defaults=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.init=function(){var e=(0,u.name)();if(void 0===e)throw new Error("Cannot set up state: the story has no name");d="chapbook-state-"+e},t.reset=v,t.sameObject=function(e,t){for(var n=e.split("."),r=t.split("."),o=0;o<n.length&&o<r.length;o++)if(n[o]!==r[o])return!1;return!0},t.setDefault=function(e,t){var n=y(e);f('Defaulting "'+e+'" to '+JSON.stringify(t)),(0,i.default)(h,e,t),m(window,e),null==n&&a.default.emit("state-change",{name:e,value:t,previous:n})},t.setLookup=function(e,t){var n=y(e);f("Adding lookup variable "+e),(0,i.default)(g,e,t),m(window,e),null==n&&a.default.emit("state-change",{name:e,value:y(e),previous:n})},t.saveToObject=w,t.restoreFromObject=_,t.canSaveToStorage=x,t.saveToStorage=k,t.canRestoreFromStorage=function(){return x()&&null!==window.localStorage.getItem(d)},t.restoreFromStorage=function(){f("Restoring variables from local storage"),_(JSON.parse(window.localStorage.getItem(d))),f("Restore complete")},t.purgeFromStorage=function(e){e||f("Purging variables from local storage");_(JSON.parse(window.localStorage.getItem(d))),e||f("Purge complete")},t.varNames=function(e){function t(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object.keys(e).reduce(function(o,i){if("object"===r(e[i])&&e[i]&&!Array.isArray(e[i]))t(e[i],n?n+"."+i:i,o);else{var s=n?n+"."+i:i;-1===o.indexOf(s)&&o.push(s)}return o},o)}if(e)return t(h,null,t(p,null)).sort();return t(p).sort()};var o=c(n(34)),i=c(n(35)),s=c(n(37)),a=c(n(1)),l=c(n(4)),u=n(6);function c(e){return e&&e.__esModule?e:{default:e}}var f=(0,l.default)("state").log,d=void 0,p={},h={},g={};function m(e,t){if(!(0,o.default)(e,t)){for(var n=t.split("."),r=n[n.length-1],i=0;i<n.length-1;i++)e[n[i]]=e[n[i]]||{},e=e[n[i]];Object.defineProperty(e,r,{get:function(){return y(t)},set:function(e){b(t,e)},configurable:!0})}}function v(){!function e(t,n){Object.keys(t).forEach(function(o){var i,l,u=""===n?o:n+"."+o;if("object"!==r(t[o])||Array.isArray(t[o])){var c=t[o];delete t[o],i=window,l=n,(0,s.default)(i,l),a.default.emit("state-change",{name:u,value:y(u),previous:c})}else e(t[o],u)})}(p,""),a.default.emit("state-reset"),y("config.state.autosave")&&k()}function b(e,t){var n=y(e);(0,i.default)(p,e,t),m(window,e),y(e)!==n&&a.default.emit("state-change",{name:e,value:y(e),previous:n}),y("config.state.autosave")&&k()}function y(e){var t=(0,o.default)(g,e);if(t)return t(y,b);var n=(0,o.default)(p,e);return null==n?(0,o.default)(h,e):n}function w(){return Object.assign({},p)}function _(e){v(),Object.keys(e).forEach(function(t){return b(t,e[t])})}function x(){try{return window.localStorage.setItem("chapbook-test","a"),window.localStorage.removeItem("chapbook-test"),!0}catch(e){return!1}}function k(){f("Saving to local storage: "+JSON.stringify(w())),window.localStorage.setItem(d,JSON.stringify(w())),f("Save complete")}t.defaults={"config.state.autosave":!0},t.set=b,t.get=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(30),i=(r=o)&&r.__esModule?r:{default:r};t.default=(0,i.default)()},function(e,t,n){"use strict";n.r(t),n.d(t,"h",function(){return a}),n.d(t,"createElement",function(){return a}),n.d(t,"cloneElement",function(){return f}),n.d(t,"createRef",function(){return R}),n.d(t,"Component",function(){return D}),n.d(t,"render",function(){return q}),n.d(t,"rerender",function(){return g}),n.d(t,"options",function(){return o});var r=function(){},o={},i=[],s=[];function a(e,t){var n,a,l,u,c=s;for(u=arguments.length;u-- >2;)i.push(arguments[u]);for(t&&null!=t.children&&(i.length||i.push(t.children),delete t.children);i.length;)if((a=i.pop())&&void 0!==a.pop)for(u=a.length;u--;)i.push(a[u]);else"boolean"==typeof a&&(a=null),(l="function"!=typeof e)&&(null==a?a="":"number"==typeof a?a=String(a):"string"!=typeof a&&(l=!1)),l&&n?c[c.length-1]+=a:c===s?c=[a]:c.push(a),n=l;var f=new r;return f.nodeName=e,f.children=c,f.attributes=null==t?void 0:t,f.key=null==t?void 0:t.key,void 0!==o.vnode&&o.vnode(f),f}function l(e,t){for(var n in t)e[n]=t[n];return e}function u(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var c="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function f(e,t){return a(e.nodeName,l(l({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var d=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,p=[];function h(e){!e._dirty&&(e._dirty=!0)&&1==p.push(e)&&(o.debounceRendering||c)(g)}function g(){for(var e;e=p.pop();)e._dirty&&$(e)}function m(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function v(e){var t=l({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)u(n,null),u(r,e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===d.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var s=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,w,s):e.removeEventListener(t,w,s),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(e){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var a=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?a?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(a?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function w(e){return this._listeners[e.type](o.event&&o.event(e)||e)}var _=[],x=0,k=!1,S=!1;function j(){for(var e;e=_.shift();)o.afterMount&&o.afterMount(e),e.componentDidMount&&e.componentDidMount()}function O(e,t,n,r,o,i){x++||(k=null!=o&&void 0!==o.ownerSVGElement,S=null!=e&&!("__preactattr_"in e));var s=C(e,t,n,r,i);return o&&s.parentNode!==o&&o.appendChild(s),--x||(S=!1,i||j()),s}function C(e,t,n,r,o){var i=e,s=k;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),M(e,!0))),i.__preactattr_=!0,i;var a,l,u=t.nodeName;if("function"==typeof u)return function(e,t,n,r){var o=e&&e._component,i=o,s=e,a=o&&e._componentConstructor===t.nodeName,l=a,u=v(t);for(;o&&!l&&(o=o._parentComponent);)l=o.constructor===t.nodeName;o&&l&&(!r||o._component)?(N(o,u,3,n,r),e=o.base):(i&&!a&&(T(i),e=s=null),o=E(t.nodeName,u,n),e&&!o.nextBase&&(o.nextBase=e,s=null),N(o,u,1,n,r),e=o.base,s&&e!==s&&(s._component=null,M(s,!1)));return e}(e,t,n,r);if(k="svg"===u||"foreignObject"!==u&&k,u=String(u),(!e||!m(e,u))&&(a=u,(l=k?document.createElementNS("http://www.w3.org/2000/svg",a):document.createElement(a)).normalizedNodeName=a,i=l,e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),M(e,!0)}var c=i.firstChild,f=i.__preactattr_,d=t.children;if(null==f){f=i.__preactattr_={};for(var p=i.attributes,h=p.length;h--;)f[p[h].name]=p[h].value}return!S&&d&&1===d.length&&"string"==typeof d[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=d[0]&&(c.nodeValue=d[0]):(d&&d.length||null!=c)&&function(e,t,n,r,o){var i,s,a,l,u,c=e.childNodes,f=[],d={},p=0,h=0,g=c.length,v=0,y=t?t.length:0;if(0!==g)for(var w=0;w<g;w++){var _=c[w],x=_.__preactattr_,k=y&&x?_._component?_._component.__key:x.key:null;null!=k?(p++,d[k]=_):(x||(void 0!==_.splitText?!o||_.nodeValue.trim():o))&&(f[v++]=_)}if(0!==y)for(var w=0;w<y;w++){l=t[w],u=null;var k=l.key;if(null!=k)p&&void 0!==d[k]&&(u=d[k],d[k]=void 0,p--);else if(h<v)for(i=h;i<v;i++)if(void 0!==f[i]&&(S=s=f[i],O=o,"string"==typeof(j=l)||"number"==typeof j?void 0!==S.splitText:"string"==typeof j.nodeName?!S._componentConstructor&&m(S,j.nodeName):O||S._componentConstructor===j.nodeName)){u=s,f[i]=void 0,i===v-1&&v--,i===h&&h++;break}u=C(u,l,n,r),a=c[w],u&&u!==e&&u!==a&&(null==a?e.appendChild(u):u===a.nextSibling?b(a):e.insertBefore(u,a))}var S,j,O;if(p)for(var w in d)void 0!==d[w]&&M(d[w],!1);for(;h<=v;)void 0!==(u=f[v--])&&M(u,!1)}(i,d,n,r,S||null!=f.dangerouslySetInnerHTML),function(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||y(e,r,n[r],n[r]=void 0,k);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||y(e,r,n[r],n[r]=t[r],k)}(i,t.attributes,f),k=s,i}function M(e,t){var n=e._component;n?T(n):(null!=e.__preactattr_&&u(e.__preactattr_.ref,null),!1!==t&&null!=e.__preactattr_||b(e),A(e))}function A(e){for(e=e.lastChild;e;){var t=e.previousSibling;M(e,!0),e=t}}var L=[];function E(e,t,n){var r,o=L.length;for(e.prototype&&e.prototype.render?(r=new e(t,n),D.call(r,t,n)):((r=new D(t,n)).constructor=e,r.render=P);o--;)if(L[o].constructor===e)return r.nextBase=L[o].nextBase,L.splice(o,1),r;return r}function P(e,t,n){return this.constructor(e,n)}function N(e,t,n,r,i){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,void 0===e.constructor.getDerivedStateFromProps&&(!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r)),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===o.syncComponentUpdates&&e.base?h(e):$(e,1,i)),u(e.__ref,e))}function $(e,t,n,r){if(!e._disable){var i,s,a,u=e.props,c=e.state,f=e.context,d=e.prevProps||u,p=e.prevState||c,h=e.prevContext||f,g=e.base,m=e.nextBase,b=g||m,y=e._component,w=!1,k=h;if(e.constructor.getDerivedStateFromProps&&(c=l(l({},c),e.constructor.getDerivedStateFromProps(u,c)),e.state=c),g&&(e.props=d,e.state=p,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,f)?w=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,f),e.props=u,e.state=c,e.context=f),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!w){i=e.render(u,c,f),e.getChildContext&&(f=l(l({},f),e.getChildContext())),g&&e.getSnapshotBeforeUpdate&&(k=e.getSnapshotBeforeUpdate(d,p));var S,C,A=i&&i.nodeName;if("function"==typeof A){var L=v(i);(s=y)&&s.constructor===A&&L.key==s.__key?N(s,L,1,f,!1):(S=s,e._component=s=E(A,L,f),s.nextBase=s.nextBase||m,s._parentComponent=e,N(s,L,0,f,!1),$(s,1,n,!0)),C=s.base}else a=b,(S=y)&&(a=e._component=null),(b||1===t)&&(a&&(a._component=null),C=O(a,i,f,n||!g,b&&b.parentNode,!0));if(b&&C!==b&&s!==y){var P=b.parentNode;P&&C!==P&&(P.replaceChild(C,b),S||(b._component=null,M(b,!1)))}if(S&&T(S),e.base=C,C&&!r){for(var D=e,q=e;q=q._parentComponent;)(D=q).base=C;C._component=D,C._componentConstructor=D.constructor}}for(!g||n?_.push(e):w||(e.componentDidUpdate&&e.componentDidUpdate(d,p,k),o.afterUpdate&&o.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);x||r||j()}}function T(e){o.beforeUnmount&&o.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?T(n):t&&(null!=t.__preactattr_&&u(t.__preactattr_.ref,null),e.nextBase=t,b(t),L.push(e),A(t)),u(e.__ref,null)}function D(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function q(e,t,n){return O(n,e,{},!1,t,!1)}function R(){return{}}l(D.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=l(l({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),h(this)},forceUpdate:function(e){e&&this._renderCallbacks.push(e),$(this,2)},render:function(){}});var z={h:a,createElement:a,cloneElement:f,createRef:R,Component:D,render:q,rerender:g,options:o};t.default=z},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warn=t.log=t.defaults=void 0,t.default=function(e){return{log:function(t){l(e,t)},warn:function(t){u(e,t)}}};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},s=n(0);t.defaults={"config.logger.show.parse":!1,"config.logger.show.render":!1,"config.logger.show.sound":!1,"config.logger.show.state":!1,"config.logger.show.story":!1,"config.logger.show.style":!1};function a(e){return e+": "}function l(e,t){(0,s.get)("config.logger.show."+e)&&console.log(a(e)+t),i.default.emit("log",{source:e,message:t})}function u(e,t){console.warn(a(e)+t),i.default.emit("log-warning",{source:e,message:t})}t.log=l,t.warn=u,window.logger={log:l,warn:u}},function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=document.createElement(e);return Object.keys(t).forEach(function(e){void 0!==t[e]&&r.setAttribute(e,t[e])}),n.forEach(function(e){"string"==typeof e?r.appendChild(document.createTextNode(e)):r.appendChild(e)}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.domify=r,t.default=function(){return r.apply(void 0,arguments).outerHTML}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadFromData=function(e){["name","creator","ifid","options"].forEach(function(t){return u[t]=e.getAttribute(t)}),u.startNode=parseInt(e.getAttribute("startnode")),u.creatorVersion=e.getAttribute("creator-version");var t=function(e){return e.map(function(e){return e.textContent})};u.customScripts=t((0,s.selectAll)(e,'[type="text/twine-javascript"]')),u.customStyles=t((0,s.selectAll)(e,'[type="text/twine-css"]')),c=(0,s.selectAll)(e,"tw-passagedata").map(function(e){var t={id:parseInt(e.getAttribute("pid")),name:e.getAttribute("name"),source:e.textContent},n=e.getAttribute("tags");return n&&(t.tags=n.split(" ")),t}),!0},t.init=function(){(0,a.setDefault)("trail",[f().name]),(0,a.setDefault)("config.testing","string"==typeof u.options&&-1!==u.options.indexOf("debug")||!1),document.title=u.name},t.runCustomScripts=function(){l.log("Running custom scripts ("+u.customScripts.length+")"),u.customScripts.forEach(function(e){new Function(e).apply(window)})},t.addCustomStyles=function(){l.log("Adding custom styles ("+u.customStyles.length+")"),u.customStyles.forEach(function(e){var t=document.createElement("style");t.innerHTML=e,document.head.appendChild(t)})},t.name=function(){return u.name},t.startPassage=f,t.passageNamed=function(e){return c.find(function(t){return t.name===e})},t.passageWithId=function(e){return c.find(function(t){return t.id===e})};var r,o=n(4),i=(r=o)&&r.__esModule?r:{default:r},s=n(7),a=n(0);var l=(0,i.default)("story"),u={customScripts:[],customStyles:[]},c=[];function f(){return c.find(function(e){return e.id===u.startNode})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.select=function(e,t){return e.querySelector(t)},t.selectAll=function(e,t){return Array.from(e.querySelectorAll(t))}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);n(46);t.default=class extends r.Component{constructor(e){super(e),this.state={open:void 0===this.props.initiallyOpen||this.props.initiallyOpen}}toggle(){this.setState({open:!this.state.open})}render(){return(0,r.h)("div",{class:"panel"+(this.state.open?" open":"")},(0,r.h)("h2",null,(0,r.h)("button",{onClick:()=>this.toggle()},this.props.title)),this.state.open&&(0,r.h)("div",{class:"content"},this.props.children))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=void 0,t.render=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,s.default)((0,i.default)(e),(0,a.get)("config.template.inserts")||[],(0,a.get)("config.template.modifiers")||[],t)};var r=l(n(60)),o=l(n(84)),i=l(n(94)),s=l(n(96)),a=n(0);function l(e){return e&&e.__esModule?e:{default:e}}t.defaults={"config.template.inserts":r.default,"config.template.modifiers":o.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=void 0,t.init=function(){(0,a.init)(),(0,l.init)(),h=document.querySelector("#page article"),m=document.querySelector("#page #spinner"),g={},["header","footer"].forEach(function(e){g[e]={container:document.querySelector("#page "+e)},["left","center","right"].forEach(function(t){g[e][t]=document.querySelector("#page "+e+" ."+t)})}),o.default.on("state-change",function(e){var t=e.name;e.value;return y("trail"===t)}),["change","click"].forEach(function(e){document.body.addEventListener(e,function(e){for(var t=e.target;t;)t.dataset&&Object.keys(t.dataset).some(function(e){return/^cb[A-Z]/.test(e)})&&o.default.emit("dom-"+e.type,t),t=t.parentNode})})},t.changeBody=function(e){(0,d.selectAll)(h,"input").forEach(function(e){e.setAttribute("value",e.value)}),(0,d.selectAll)(h,"select").forEach(function(e){for(var t=0;t<e.options.length;t++)t===e.options.selectedIndex?e.options[t].setAttribute("selected",""):e.options[t].removeAttribute("selected")});var t={x:window.scrollX,y:window.scrollY},n=h.innerHTML,r=document.createElement("div");for(;h.firstChild;)r.insertBefore(h.firstChild,r.firstChild);h.innerHTML=n,e(r),window.scrollX=t.x,window.scrollY=t.y,b(h,r.innerHTML,(0,s.get)("config.body.transition.name"),(0,s.get)("config.body.transition.duration"))};var r=p(n(20)),o=p(n(1)),i=n(64),s=n(0),a=n(66),l=n(69),u=n(6),c=n(11),f=p(n(71));n(72);var d=n(7);function p(e){return e&&e.__esModule?e:{default:e}}var h=void 0,g=void 0,m=void 0,v={crossfade:i.crossfade,fadeInOut:i.fadeInOut,none:i.none};t.defaults={"config.body.transition.name":"crossfade","config.body.transition.duration":"500ms","config.header.left":"","config.header.center":"","config.header.right":"","config.header.transition.name":"none","config.header.transition.duration":"500ms","config.footer.left":"_{story.name}_","config.footer.center":"","config.footer.right":"{restart link}","config.footer.transition.name":"none","config.footer.transition.duration":"500ms"};function b(e,t,n,r){v[n]?v[n](e,t,r):v.none(e,t)}var y=(0,r.default)(function(e){if(e.some(function(e){return e[0]})){var t=(0,s.get)("trail"),n=(0,u.passageNamed)(t[t.length-1]);if(!n)throw new Error('There is no passage named "'+t[t.length-1]+'".');b(h,(0,c.render)(n.source),(0,s.get)("config.body.transition.name"),(0,s.get)("config.body.transition.duration")),(0,f.default)(h,m)}["header","footer"].forEach(function(e){g[e].container.classList.remove("has-content"),["left","center","right"].forEach(function(t){var n=(0,c.render)((0,s.get)("config."+e+"."+t));""!==n&&g[e].container.classList.add("has-content"),b(g[e][t],n,(0,s.get)("config."+e+".transition.name"),(0,s.get)("config."+e+".transition.duration"))})})})},function(e,t,n){"use strict";e.exports=function(e,t,n){n=Object.assign({},r,n||{});let o=0,s=function(e){let t={ms:.001,s:1,m:60,h:3600};return t.d=e.hoursPerDay*t.h,t.w=e.daysPerWeek*t.d,t.mth=e.daysPerYear/e.monthsPerYear*t.d,t.y=e.daysPerYear*t.d,t}(n),a=e.toLowerCase().replace(/[^.\w+-]+/g,"").match(/[-+]?[0-9.]+[a-z]+/g);null!==a&&a.forEach(e=>{let t=e.match(/[0-9.]+/g)[0],n=e.match(/[a-z]+/g)[0];o+=function(e,t,n){return e*n[i(t)]}(t,n,s)});if(t)return function(e,t,n){return e/n[i(t)]}(o,t,s);return o};const r={hoursPerDay:24,daysPerWeek:7,weeksPerMonth:4,monthsPerYear:12,daysPerYear:365.25},o={ms:["ms","milli","millisecond","milliseconds"],s:["s","sec","secs","second","seconds"],m:["m","min","mins","minute","minutes"],h:["h","hr","hrs","hour","hours"],d:["d","day","days"],w:["w","week","weeks"],mth:["mon","mth","mths","month","months"],y:["y","yr","yrs","year","years"]};function i(e){for(let t of Object.keys(o))if(o[t].indexOf(e)>-1)return t;throw new Error(`The unit [${e}] is not supported by timestring`)}},function(e,t){function n(e,t){if(!e)throw new Error(t||"AssertionError")}n.notEqual=function(e,t,r){n(e!=t,r)},n.notOk=function(e,t){n(!e,t)},n.equal=function(e,t,r){n(e==t,r)},n.ok=n,e.exports=n},function(e,t,n){"use strict";
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderLink=s,t.default=function(e){return e.replace(/\[\[(.*?)\]\]/g,function(e,t){var n=t,r=t.indexOf("|");if(-1!==r)n=t.substr(0,r),t=t.substr(r+1);else{var o=t.indexOf("->");if(-1!==o)n=t.substr(0,o),t=t.substr(o+2);else{var i=t.indexOf("<-");-1!==i&&(n=t.substr(i+2),t=t.substr(0,i))}}return s(t,n||t)})};var r,o=n(5),i=(r=o)&&r.__esModule?r:{default:r};function s(e,t){return/^\w+:\/\/\/?\w/i.test(e)?(0,i.default)("a",{href:e},[t||e]):(0,i.default)("a",{href:"javascript:void(0)","data-cb-go":e},[t||e])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.history=t.defaults=void 0,t.rewindTo=function(e){if(!a[e])throw new Error("There is no history at index "+e+" to rewind to.");l=!1,(0,s.restoreFromObject)(a[e].state),a.length=e+1,l=!0,i.default.emit("backstage-recorder-update")},t.init=function(){i.default.on("state-change",c),i.default.on("state-reset",u)};var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},s=n(0);t.defaults={"config.backstage.trail.maxLength":100};var a=t.history=[],l=!0;function u(){l&&(t.history=a=[],i.default.emit("backstage-recorder-update"))}function c(e){var t=e.name,n=e.value;l&&(a.length===(0,s.get)("config.backstage.trail.maxLength")&&a.shift(),a.push({change:{name:t,value:n},state:(0,s.saveToObject)()}),i.default.emit("backstage-recorder-update"))}},function(e,t,n){(function(t){var n=1/0,r="[object Symbol]",o=/[&<>"'`]/g,i=RegExp(o.source),s="object"==typeof t&&t&&t.Object===Object&&t,a="object"==typeof self&&self&&self.Object===Object&&self,l=s||a||Function("return this")();var u,c=(u={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==u?void 0:u[e]}),f=Object.prototype.toString,d=l.Symbol,p=d?d.prototype:void 0,h=p?p.toString:void 0;function g(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==r}(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-n?"-0":t}e.exports=function(e){var t;return(e=null==(t=e)?"":g(t))&&i.test(e)?e.replace(o,c):e}}).call(this,n(16))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[],n=!1;return function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];n||(n=!0,Promise.resolve().then(function(){try{e(t)}catch(e){window.setTimeout(function(){throw e},0)}t=[],n=!1})),t.push(o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="<span"+Object.keys(t).reduce(function(e,n){return e+" "+n+'="'+t[n]+'"'},"")+">",r=n+e.replace(/[\r\n]{2,}/g,"</span>$&"+n)+"</span>";return r=r.replace(/(<span.*?>)\s*(#+)/gi,"$2 $1")}},function(e,t,n){(function(t){!function(t){"use strict";var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:m,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:m,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:m,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_.defaults,this.rules=n.normal,this.options.pedantic?this.rules=n.pedantic:this.options.gfm&&(this.options.tables?this.rules=n.tables:this.rules=n.gfm)}n._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,n.def=d(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d{1,9}\.)/,n.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,n.item=d(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=d(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",n._comment=/<!--(?!-?>)[\s\S]*?-->/,n.html=d(n.html,"i").replace("comment",n._comment).replace("tag",n._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n.paragraph=d(n.paragraph).replace("hr",n.hr).replace("heading",n.heading).replace("lheading",n.lheading).replace("tag",n._tag).getRegex(),n.blockquote=d(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=v({},n),n.gfm=v({},n.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=d(n.paragraph).replace("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|").getRegex(),n.tables=v({},n.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),n.pedantic=v({},n.normal,{html:d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,o,i,s,a,l,u,c,f,d,p,h,g,m,v,w;for(e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:y(i,"\n")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2]?i[2].trim():i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if((i=this.rules.nptable.exec(e))&&(l={type:"table",header:b(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(i[0].length),p=0;p<l.align.length;p++)/^ *-+: *$/.test(l.align[p])?l.align[p]="right":/^ *:-+: *$/.test(l.align[p])?l.align[p]="center":/^ *:-+ *$/.test(l.align[p])?l.align[p]="left":l.align[p]=null;for(p=0;p<l.cells.length;p++)l.cells[p]=b(l.cells[p],l.header.length);this.tokens.push(l)}else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),u={type:"list_start",ordered:m=(s=i[2]).length>1,start:m?+s:"",loose:!1},this.tokens.push(u),c=[],r=!1,g=(i=i[0].match(this.rules.item)).length,p=0;p<g;p++)d=(l=i[p]).length,~(l=l.replace(/^ *([*+-]|\d+\.) */,"")).indexOf("\n ")&&(d-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+d+"}","gm"),"")),p!==g-1&&(a=n.bullet.exec(i[p+1])[0],(s.length>1?1===a.length:a.length>1||this.options.smartLists&&a!==s)&&(e=i.slice(p+1).join("\n")+e,p=g-1)),o=r||/\n\n(?!\s*$)/.test(l),p!==g-1&&(r="\n"===l.charAt(l.length-1),o||(o=r)),o&&(u.loose=!0),w=void 0,(v=/^\[[ xX]\] /.test(l))&&(w=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),f={type:"list_item_start",task:v,checked:w,loose:o},c.push(f),this.tokens.push(f),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(u.loose)for(g=c.length,p=0;p<g;p++)c[p].loose=!0;this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),i[3]&&(i[3]=i[3].substring(1,i[3].length-1)),h=i[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[h]||(this.tokens.links[h]={href:i[2],title:i[3]});else if((i=this.rules.table.exec(e))&&(l={type:"table",header:b(i[1].replace(/^ *| *\| *$/g,"")),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3]?i[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(i[0].length),p=0;p<l.align.length;p++)/^ *-+: *$/.test(l.align[p])?l.align[p]="right":/^ *:-+: *$/.test(l.align[p])?l.align[p]="center":/^ *:-+ *$/.test(l.align[p])?l.align[p]="left":l.align[p]=null;for(p=0;p<l.cells.length;p++)l.cells[p]=b(l.cells[p].replace(/^ *\| *| *\| *$/g,""),l.header.length);this.tokens.push(l)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var o={escape:/^\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:m,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:m,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/};function i(e,t){if(this.options=t||_.defaults,this.links=e,this.rules=o.normal,this.renderer=this.options.renderer||new s,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=o.pedantic:this.options.gfm&&(this.options.breaks?this.rules=o.breaks:this.rules=o.gfm)}function s(e){this.options=e||_.defaults}function a(){}function l(e){this.tokens=[],this.token=null,this.options=e||_.defaults,this.options.renderer=this.options.renderer||new s,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new u}function u(){this.seen={}}function c(e,t){if(t){if(c.escapeTest.test(e))return e.replace(c.escapeReplace,function(e){return c.replacements[e]})}else if(c.escapeTestNoEncode.test(e))return e.replace(c.escapeReplaceNoEncode,function(e){return c.replacements[e]});return e}function f(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function d(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=(n=n.source||n).replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function p(e,t,n){if(e){try{var r=decodeURIComponent(f(n)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return null}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:")||0===r.indexOf("data:"))return null}t&&!g.test(n)&&(n=function(e,t){h[" "+e]||(/^[^:]+:\/*[^\/]*$/.test(e)?h[" "+e]=e+"/":h[" "+e]=y(e,"/",!0));return e=h[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^\/]*)[\s\S]*/,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}o._punctuation="!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~",o.em=d(o.em).replace(/punctuation/g,o._punctuation).getRegex(),o._escapes=/\\([!"#$%&'()*+,\-.\/:;<=>?@\[\]\\^_`{|}~])/g,o._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,o._email=/[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,o.autolink=d(o.autolink).replace("scheme",o._scheme).replace("email",o._email).getRegex(),o._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,o.tag=d(o.tag).replace("comment",n._comment).replace("attribute",o._attribute).getRegex(),o._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,o._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,o._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,o.link=d(o.link).replace("label",o._label).replace("href",o._href).replace("title",o._title).getRegex(),o.reflink=d(o.reflink).replace("label",o._label).getRegex(),o.normal=v({},o),o.pedantic=v({},o.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",o._label).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",o._label).getRegex()}),o.gfm=v({},o.normal,{escape:d(o.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),o.gfm.url=d(o.gfm.url,"i").replace("email",o.gfm._extended_email).getRegex(),o.breaks=v({},o.gfm,{br:d(o.br).replace("{2,}","*").getRegex(),text:d(o.gfm.text).replace(/\{2,\}/g,"*").getRegex()}),i.rules=o,i.output=function(e,t,n){return new i(t,n).output(e)},i.prototype.output=function(e){for(var t,n,r,o,s,a,l="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),l+=c(s[1]);else if(s=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(s[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(s[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(s[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(s[0])&&(this.inRawBlock=!1),e=e.substring(s[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):c(s[0]):s[0];else if(s=this.rules.link.exec(e)){var u=w(s[2],"()");if(u>-1){var f=s[0].length-(s[2].length-u)-(s[3]||"").length;s[2]=s[2].substring(0,u),s[0]=s[0].substring(0,f).trim(),s[3]=""}e=e.substring(s[0].length),this.inLink=!0,r=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],o=t[3]):o="":o=s[3]?s[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(s,{href:i.escapes(r),title:i.escapes(o)}),this.inLink=!1}else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length),l+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),l+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),l+=this.renderer.codespan(c(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),l+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),l+=this.renderer.del(this.output(s[1]));else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),r="@"===s[2]?"mailto:"+(n=c(this.mangle(s[1]))):n=c(s[1]),l+=this.renderer.link(r,null,n);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.text.exec(e))e=e.substring(s[0].length),this.inRawBlock?l+=this.renderer.text(s[0]):l+=this.renderer.text(c(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===s[2])r="mailto:"+(n=c(s[0]));else{do{a=s[0],s[0]=this.rules._backpedal.exec(s[0])[0]}while(a!==s[0]);n=c(s[0]),r="www."===s[1]?"http://"+n:n}e=e.substring(s[0].length),l+=this.renderer.link(r,null,n)}return l},i.escapes=function(e){return e?e.replace(i.rules._escapes,"$1"):e},i.prototype.outputLink=function(e,t){var n=t.href,r=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,c(e[1]))},i.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,o=0;o<r;o++)t=e.charCodeAt(o),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},s.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,r);null!=o&&o!==e&&(n=!0,e=o)}return r?'<pre><code class="'+this.options.langPrefix+c(r,!0)+'">'+(n?e:c(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:c(e,!0))+"</code></pre>"},s.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},s.prototype.html=function(e){return e},s.prototype.heading=function(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},s.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},s.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"},s.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},s.prototype.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},s.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},s.prototype.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},s.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},s.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},s.prototype.strong=function(e){return"<strong>"+e+"</strong>"},s.prototype.em=function(e){return"<em>"+e+"</em>"},s.prototype.codespan=function(e){return"<code>"+e+"</code>"},s.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},s.prototype.del=function(e){return"<del>"+e+"</del>"},s.prototype.link=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<a href="'+c(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>"},s.prototype.image=function(e,t,n){if(null===(e=p(this.options.sanitize,this.options.baseUrl,e)))return n;var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},s.prototype.text=function(e){return e},a.prototype.strong=a.prototype.em=a.prototype.codespan=a.prototype.del=a.prototype.text=function(e){return e},a.prototype.link=a.prototype.image=function(e,t,n){return""+n},a.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new i(e.links,this.options),this.inlineText=new i(e.links,v({},this.options,{renderer:new a})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,f(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,o="",i="";for(n="",e=0;e<this.token.header.length;e++)n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(o+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",r=0;r<t.length;r++)n+=this.renderer.tablecell(this.inline.output(t[r]),{header:!1,align:this.token.align[r]});i+=this.renderer.tablerow(n)}return this.renderer.table(o,i);case"blockquote_start":for(i="";"blockquote_end"!==this.next().type;)i+=this.tok();return this.renderer.blockquote(i);case"list_start":i="";for(var s=this.token.ordered,a=this.token.start;"list_end"!==this.next().type;)i+=this.tok();return this.renderer.list(i,s,a);case"list_item_start":i="";var l=this.token.loose,u=this.token.checked,c=this.token.task;for(this.token.task&&(i+=this.renderer.checkbox(u));"list_item_end"!==this.next().type;)i+=l||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(i,c,u);case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:var d='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(d);console.log(d)}},u.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},c.escapeTest=/[&<>"']/,c.escapeReplace=/[&<>"']/g,c.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},c.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,c.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var h={},g=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(){}function v(e){for(var t,n,r=1;r<arguments.length;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function b(e,t){var n=e.replace(/\|/g,function(e,t,n){for(var r=!1,o=t;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"}).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function y(e,t,n){if(0===e.length)return"";for(var r=0;r<e.length;){var o=e.charAt(e.length-r-1);if(o!==t||n){if(o===t||!n)break;r++}else r++}return e.substr(0,e.length-r)}function w(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=0,r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return-1}function _(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null);var o,i,s=(t=v({},_.defaults,t||{})).highlight,a=0;try{o=r.lex(e,t)}catch(e){return n(e)}i=o.length;var u=function(e){if(e)return t.highlight=s,n(e);var r;try{r=l.parse(o,t)}catch(t){e=t}return t.highlight=s,e?n(e):n(null,r)};if(!s||s.length<3)return u();if(delete t.highlight,!i)return u();for(;a<o.length;a++)!function(e){"code"!==e.type?--i||u():s(e.text,e.lang,function(t,n){return t?u(t):null==n||n===e.text?--i||u():(e.text=n,e.escaped=!0,void(--i||u()))})}(o[a])}else try{return t&&(t=v({},_.defaults,t)),l.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||_.defaults).silent)return"<p>An error occurred:</p><pre>"+c(e.message+"",!0)+"</pre>";throw e}}m.exec=m,_.options=_.setOptions=function(e){return v(_.defaults,e),_},_.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new s,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},_.defaults=_.getDefaults(),_.Parser=l,_.parser=l.parse,_.Renderer=s,_.TextRenderer=a,_.Lexer=r,_.lexer=r.lex,_.InlineLexer=i,_.inlineLexer=i.output,_.Slugger=u,_.parse=_,e.exports=_}(this||"undefined"!=typeof window&&window)}).call(this,n(16))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=void 0,t.init=function(){(p=document.createElement("div")).setAttribute("hidden",!0),p.dataset.cbSounds="",document.body.appendChild(p),i.default.on("state-change",function(e){var t=e.name,n=e.value,o=(0,a.sameObject)(t,"sound.ambient"),i=(0,a.sameObject)(t,"sound.effect");if(o){var s=(0,a.get)("sound.ambient");s&&Object.keys(s).forEach(function(e){s[e].url&&h(e,s[e].url,!1),s[e].volume&&v(e,s[e].volume),void 0!==s[e].muted&&b(e,s[e].muted),s[e].playing&&g(e,!0).catch(function(t){return f('Could not resume playing ambient sound "'+e+'" ('+t.message+")")})})}if(i){var l=(0,a.get)("sound.effect");l&&Object.keys(l).forEach(function(e){l[e].url&&h(e,l[e].url,!0),l[e].volume&&v(e,l[e].volume),void 0!==l[e].muted&&b(e,l[e].muted),l[e].playing&&g(e,!1).then(function(){return(0,a.set)("sound.effect."+e+".playing",!1)}).catch(function(t){return f('Could not resume playing sound effect "'+e+'" ('+t.message)})})}if(!o&&!i){var u=/^sound\.(ambient|effect)\.(.+?)\.(.+)$/i.exec(t);if(u)switch(u[3].toLowerCase()){case"playing":n?"ambient"===u[1]?g(u[2],!0,(0,r.default)((0,a.get)(u[2]+".transitionDuration")||(0,a.get)("sound.transitionDuration")||"0s","ms")):g(u[2],!1).then(function(){return(0,a.set)(t,!1)}):"ambient"===u[1]?m(u[2],(0,r.default)((0,a.get)(u[2]+".transitionDuration")||(0,a.get)("sound.transitionDuration")||"0s","ms")):m(u[2]);break;case"url":h(u[2],n,"effect"===u[1]);break;case"volume":v(u[2],n)}}})};var r=l(n(13)),o=l(n(4)),i=l(n(1)),s=l(n(99)),a=n(0);function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,o.default)("sound"),c=u.log,f=u.warn,d={},p=void 0;t.defaults={"sound.mute":!1,"sound.volume":1,"sound.transitionDuration":"1s"};function h(e,t,n){d[e]?(d[e].setAttribute("src",t),n?d[e].setAttribute("preload","auto"):d[e].removeAttribute("preload"),c('Updated <audio> element in sound bank for "'+e+'" to use '+t)):(d[e]=document.createElement("audio"),d[e].setAttribute("src",t),n&&d[e].setAttribute("preload","auto"),p.appendChild(d[e]),c('Added new <audio> element to sound bank for "'+e+'" for '+t))}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!d[e])throw new Error("There is no sound loaded named "+e+".");return c('Playing sound "'+e+'" (looping: '+t+")"),n>0&&(d[e].volume=0,(0,s.default)(d[e],1,n)),t?(d[e].loop=!0,d[e].play()):(d[e].loop=!1,new Promise(function(t,n){try{d[e].addEventListener("ended",function n(){d[e].removeEventListener("ended",n),t()}),d[e].play().catch(function(e){return n(e)})}catch(e){n(e)}}))}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!d[e])throw new Error("There is no sound loaded named "+e+".");if(t<=0)d[e].pause(),d[e].currentTime=0;else{var n=d[e].volume;(0,s.default)(d[e],0,t).then(function(){d[e].pause(),d[e].volume=n,d[e].currentTime=0})}}function v(e,t){if(!d[e])throw new Error("There is no sound loaded named "+e+".");if(t<0||t>1)throw new Error("A sound volume must be between 0 and 1.");d[e].volume=t}function b(e,t){if(!d[e])throw new Error("There is no sound loaded named "+e+".");d[e].muted=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=void 0,t.default=function(e){e("random.coinFlip",function(){var e=l();return(0,o.default)(u),e>.5}),e("random.fraction",function(){var e=l();return(0,o.default)(u),e}),[4,5,6,8,10,12,20,25,50,100,1e3].forEach(function(t){e("random.d"+t,function(){var e=1+Math.round(l()*(t-1));return(0,o.default)(u),e})})};var r=a(n(106)),o=a(n(20)),i=a(n(1)),s=n(0);n(6);function a(e){return e&&e.__esModule?e:{default:e}}t.defaults={"config.random.seed":function(){return new Date},"config.random.privateState":null};var l=(0,r.default)(new Date,{state:!0});function u(){(0,s.set)("config.random.privateState",l.state())}i.default.on("state-change",function(e){var t=e.name,n=e.value;"config.random.seed"===t&&(l=(0,r.default)(n,{state:!0}))})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=void 0,t.style=d,t.init=function(){(0,s.init)(),f.dataset.cbAuthorStyles="",document.head.appendChild(f),o.default.on("state-change",function(e){var t=e.name,n=e.value;if((0,i.sameObject)(t,"config.style.backdrop")&&(u("Setting backdrop color"),d("#backdrop",{"background-color":(0,a.parseColor)((0,i.get)("config.style.backdrop")).color})),(0,i.sameObject)(t,"config.style.page.fork.divider.color")&&(u("Setting fork divider color"),d("#page .fork p a + a",{"border-top-color":(0,a.parseColor)((0,i.get)("config.style.page.fork.divider.color")).color})),(0,i.sameObject)(t,"config.style.page.fork.divider.size")&&(u("Setting fork divider size"),d("#page .fork p a + a",{"border-top-width":(0,i.get)("config.style.page.fork.divider.size")+"px"})),(0,i.sameObject)(t,"config.style.page.fork.divider.style")&&(u("Setting fork divider style"),d("#page .fork p a + a",{"border-top-style":(0,i.get)("config.style.page.fork.divider.style")})),(0,i.sameObject)(t,"config.style.page.style")||(0,i.sameObject)(t,"config.style.page.style.borderColor"))switch(u("Setting page style"),(0,i.get)("config.style.page.style")){case"none":d("#page",{border:"none","box-shadow":"none"});break;case"shadow":d("#page",{border:"none","box-shadow":"0 4px 8px hsla(0, 0%, 0%, 0.25)"});break;case"thick-line":d("#page",{border:"4px solid "+(0,a.parseColor)((0,i.get)("config.style.page.style.borderColor")).color,"box-shadow":"none"});break;case"thin-line":d("#page",{border:"1px solid "+(0,a.parseColor)((0,i.get)("config.style.page.style.borderColor")).color,"box-shadow":"none"})}if((0,i.sameObject)(t,"config.style.page.verticalAlign"))switch(u("Setting page vertical alignment"),(0,i.get)("config.style.page.verticalAlign")){case"top":d("#page article",{"align-items":"flex-start"});break;case"center":d("#page article",{"align-items":"center"});break;case"bottom":d("#page article",{"align-items":"flex-end"})}if(/^config\.style\.page\..*\.((line)?color|font)$/i.test(t)&&p(t,n),(0,i.sameObject)(t,"config.style.page")){["config.style.page","config.style.page.header","config.style.page.footer"].forEach(function(e){var t=(0,i.get)(e);t&&function(e,t){["color","font","lineColor"].forEach(function(n){t[n]&&p(e+"."+n,t[n]),t.link&&(t.link[n]&&p(e+".link."+n,t.link[n]),t.link.active&&t.link.active[n]&&p(e+".link.active."+n,t.link.active[n]))})}(e,t)})}})};var r=l(n(4)),o=l(n(1)),i=n(0),s=n(117),a=n(118);function l(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("style").log,c=(t.defaults={"config.style.backdrop":"gray-0","config.style.page.style":"shadow","config.style.page.style.borderColor":"gray-2","config.style.page.font":"Iowan Old Style/Constantia/Georgia/serif 18","config.style.page.color":"gray-9 on white","config.style.page.fork.divider.color":"gray-3","config.style.page.fork.divider.style":"dashed","config.style.page.fork.divider.size":1,"config.style.page.link.color":"gray-9","config.style.page.link.lineColor":"red-8","config.style.page.link.font":"underline","config.style.page.link.active.color":"red-8 on red-0","config.style.page.verticalAlign":"center","config.style.page.header.font":"16","config.style.page.header.link.font":"small caps","config.style.page.footer.font":"16","config.style.page.footer.link.font":"small caps"},{}),f=document.createElement("style");function d(e,t){c[e]=c[e]||{},Object.assign(c[e],t),function(){f.innerHTML=Object.keys(c).reduce(function(e,t){return e+(n=t,r=c[t],n+"{"+Object.keys(r).sort().reduce(function(e,t){return r[t]?e+t+":"+r[t].toString()+";":e},"")+"}");var n,r},"")}()}function p(e,t){var n="#page",r=e.replace(/^config\.style\.page\./i,"").split(".");switch("header"===r[0].toLowerCase()?(n+=" header",r.shift()):"footer"===r[0].toLowerCase()&&(n+=" footer",r.shift()),"link"===r[0].toLowerCase()&&(n+=" a",r.shift()),"active"===r[0].toLowerCase()&&(n=n+":hover, "+n+":active",r.shift()),r[0].toLowerCase()){case"color":u("Setting color for "+n),d(n,(0,a.parseColor)(t));break;case"linecolor":u("Setting line color for "+n);var o=(0,a.parseColor)(t).color;d(n,{"text-decoration-color":o,"-webkit-text-decoration-color":o});break;case"font":u("Setting font for "+n),d(n,(0,a.parseFont)(t))}}},function(e,t){var n=/-?\d+(\.\d+)?%?/g;e.exports=function(e){return e.match(n)}},function(e,t){e.exports=function(e,t,n){return Math.min(Math.max(e,t),n)}},function(e,t,n){"use strict";var r=n(29),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(44)),i=p(n(59)),s=n(0),a=n(23),l=p(n(100)),u=p(n(116)),c=n(12),f=n(6),d=n(25);function p(e){return e&&e.__esModule?e:{default:e}}n(126),(0,f.loadFromData)(document.querySelector("tw-storydata")),(0,i.default)(),(0,s.init)(),Object.assign(window,{go:r.go,restart:r.restart}),(0,d.init)(),(0,u.default)(),(0,l.default)(),(0,c.init)(),(0,a.init)(),(0,f.init)(),o&&(0,s.get)("config.testing")&&o.init(),!(0,s.get)("config.testing")&&(0,s.canRestoreFromStorage)()&&(0,s.restoreFromStorage)(),(0,f.addCustomStyles)(),(0,f.runCustomScripts)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.go=f,t.restart=d;var r,o=n(1),i=(r=o)&&r.__esModule?r:{default:r},s=n(0),a=n(4),l=n(6),u=n(43);function c(e){(0,a.log)("actions",e)}function f(e){c('Going to passage "'+e+'"');var t=(0,l.passageNamed)(e);if(!t)throw new Error('There is no passage with the name "'+e+'"');(0,u.transferToState)(),(0,s.set)("trail",(0,s.get)("trail").concat(t.name))}function d(){c("Restarting"),(0,s.reset)(),window.location.reload()}i.default.on("dom-click",function(e){e.dataset.cbGo&&(0,u.validate)().then(function(){return f(e.dataset.cbGo)})}),i.default.on("dom-click",function(e){e.dataset.cbRestart&&d()})},function(e,t,n){var r=n(31),o=n(32),i=n(14);function s(e){if(!(this instanceof s))return new s(e);this._name=e||"nanobus",this._starListeners=[],this._listeners={}}e.exports=s,s.prototype.emit=function(e){i.ok("string"==typeof e||"symbol"==typeof e,"nanobus.emit: eventName should be type string or symbol");for(var t=[],n=1,r=arguments.length;n<r;n++)t.push(arguments[n]);var s=o(this._name+"('"+e.toString()+"')"),a=this._listeners[e];return a&&a.length>0&&this._emit(this._listeners[e],t),this._starListeners.length>0&&this._emit(this._starListeners,e,t,s.uuid),s(),this},s.prototype.on=s.prototype.addListener=function(e,t){return i.ok("string"==typeof e||"symbol"==typeof e,"nanobus.on: eventName should be type string or symbol"),i.equal(typeof t,"function","nanobus.on: listener should be type function"),"*"===e?this._starListeners.push(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)),this},s.prototype.prependListener=function(e,t){return i.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependListener: eventName should be type string or symbol"),i.equal(typeof t,"function","nanobus.prependListener: listener should be type function"),"*"===e?this._starListeners.unshift(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(t)),this},s.prototype.once=function(e,t){i.ok("string"==typeof e||"symbol"==typeof e,"nanobus.once: eventName should be type string or symbol"),i.equal(typeof t,"function","nanobus.once: listener should be type function");var n=this;return this.on(e,function r(){t.apply(n,arguments);n.removeListener(e,r)}),this},s.prototype.prependOnceListener=function(e,t){i.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependOnceListener: eventName should be type string or symbol"),i.equal(typeof t,"function","nanobus.prependOnceListener: listener should be type function");var n=this;return this.prependListener(e,function r(){t.apply(n,arguments);n.removeListener(e,r)}),this},s.prototype.removeListener=function(e,t){return i.ok("string"==typeof e||"symbol"==typeof e,"nanobus.removeListener: eventName should be type string or symbol"),i.equal(typeof t,"function","nanobus.removeListener: listener should be type function"),"*"===e?(this._starListeners=this._starListeners.slice(),n(this._starListeners,t)):(void 0!==this._listeners[e]&&(this._listeners[e]=this._listeners[e].slice()),n(this._listeners[e],t));function n(e,t){if(e){var n=e.indexOf(t);return-1!==n?(r(e,n,1),!0):void 0}}},s.prototype.removeAllListeners=function(e){return e?"*"===e?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this},s.prototype.listeners=function(e){var t="*"!==e?this._listeners[e]:this._starListeners,n=[];if(t)for(var r=t.length,o=0;o<r;o++)n.push(t[o]);return n},s.prototype._emit=function(e,t,n,r){if(void 0!==e&&0!==e.length){void 0===n&&(n=t,t=null),t&&(n=void 0!==r?[t].concat(n,r):[t].concat(n));for(var o=e.length,i=0;i<o;i++){var s=e[i];s.apply(s,n)}}}},function(e,t,n){"use strict";e.exports=function(e,t,n){var r,o=e.length;if(!(t>=o||0===n)){var i=o-(n=t+n>o?o-t:n);for(r=t;r<i;++r)e[r]=e[r+n];e.length=i}}},function(e,t,n){var r,o=n(33)(),i=n(14);s.disabled=!0;try{r=window.performance,s.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!r.mark}catch(e){}function s(e){if(i.equal(typeof e,"string","nanotiming: name should be type string"),s.disabled)return a;var t=(1e4*r.now()).toFixed()%Number.MAX_SAFE_INTEGER,n="start-"+t+"-"+e;function l(i){var s="end-"+t+"-"+e;r.mark(s),o.push(function(){var o=null;try{var a=e+" ["+t+"]";r.measure(a,n,s),r.clearMarks(n),r.clearMarks(s)}catch(e){o=e}i&&i(o,e)})}return r.mark(n),l.uuid=t,l}function a(e){e&&o.push(function(){e(new Error("nanotiming: performance API unavailable"))})}e.exports=s},function(e,t,n){var r=n(14),o="undefined"!=typeof window;function i(e){this.hasWindow=e,this.hasIdle=this.hasWindow&&window.requestIdleCallback,this.method=this.hasIdle?window.requestIdleCallback.bind(window):this.setTimeout,this.scheduled=!1,this.queue=[]}i.prototype.push=function(e){r.equal(typeof e,"function","nanoscheduler.push: cb should be type function"),this.queue.push(e),this.schedule()},i.prototype.schedule=function(){if(!this.scheduled){this.scheduled=!0;var e=this;this.method(function(t){for(;e.queue.length&&t.timeRemaining()>0;)e.queue.shift()(t);e.scheduled=!1,e.queue.length&&e.schedule()})}},i.prototype.setTimeout=function(e){setTimeout(e,0,{timeRemaining:function(){return 1}})},e.exports=function(){var e;return o?(window._nanoScheduler||(window._nanoScheduler=new i(!0)),e=window._nanoScheduler):e=new i,e}},function(e,t,n){
/*!
* get-value <https://github.com/jonschlinkert/get-value>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/
const r=n(15);function o(e,t,n){return"function"==typeof n.join?n.join(e):e[0]+t+e[1]}function i(e,t,n){return"function"!=typeof n.isValid||n.isValid(e,t)}function s(e){return r(e)||Array.isArray(e)||"function"==typeof e}e.exports=function(e,t,n){if(r(n)||(n={default:n}),!s(e))return void 0!==n.default?n.default:e;"number"==typeof t&&(t=String(t));const a=Array.isArray(t),l="string"==typeof t,u=n.separator||".",c=n.joinChar||("string"==typeof u?u:".");if(!l&&!a)return e;if(l&&t in e)return i(t,e,n)?e[t]:n.default;let f=a?t:function(e,t,n){if("function"==typeof n.split)return n.split(e);return e.split(t)}(t,u,n),d=f.length,p=0;do{let t=f[p];for("number"==typeof t&&(t=String(t));t&&"\\"===t.slice(-1);)t=o([t.slice(0,-1),f[++p]||""],c,n);if(t in e){if(!i(t,e,n))return n.default;e=e[t]}else{let r=!1,s=p+1;for(;s<d;)if(r=(t=o([t,f[s++]],c,n))in e){if(!i(t,e,n))return n.default;e=e[t],p=s-1;break}if(!r)return n.default}}while(++p<d&&s(e));return p===d?e:n.default}},function(e,t,n){"use strict";
/*!
* set-value <https://github.com/jonschlinkert/set-value>
*
* Copyright (c) 2014-2018, Jon Schlinkert.
* Released under the MIT License.
*/const r=n(36);function o(e,t,n,r){if(!s(e))return e;let a=r||{};const l=Array.isArray(t);if(!l&&"string"!=typeof t)return e;let u=a.merge;u&&"function"!=typeof u&&(u=Object.assign);const c=l?t:function(e,t){const n=function(e,t){let n=e;if(void 0===t)return n+"";const r=Object.keys(t);for(let e=0;e<r.length;e++){const o=r[e];n+=";"+o+"="+String(t[o])}return n}(e,t);if(o.memo[n])return o.memo[n];const r=t&&t.separator?t.separator:".";let i=[],s=[];i=t&&"function"==typeof t.split?t.split(e):e.split(r);for(let e=0;e<i.length;e++){let t=i[e];for(;t&&"\\"===t.slice(-1)&&i[e+1];)t=t.slice(0,-1)+r+i[++e];s.push(t)}return o.memo[n]=s,s}(t,a),f=c.length,d=e;if(!r&&1===c.length)return i(e,c[0],n,u),e;for(let t=0;t<f;t++){let r=c[t];if(s(e[r])||(e[r]={}),t===f-1){i(e,r,n,u);break}e=e[r]}return d}function i(e,t,n,o){o&&r(e[t])&&r(n)?e[t]=o({},e[t],n):e[t]=n}function s(e){switch(typeof e){case"null":return!1;case"object":case"function":return!0;default:return!1}}o.memo={},e.exports=o},function(e,t,n){"use strict";
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/var r=n(15);function o(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==o(e)&&("function"==typeof(t=e.constructor)&&(!1!==o(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},function(e,t,n){"use strict";
/*!
* unset-value <https://github.com/jonschlinkert/unset-value>
*
* Copyright (c) 2015, 2017, Jon Schlinkert.
* Released under the MIT License.
*/var r=n(15),o=n(38);e.exports=function(e,t){if(!r(e))throw new TypeError("expected an object.");if(e.hasOwnProperty(t))return delete e[t],!0;if(o(e,t)){for(var n=t.split("."),i=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)i=n.pop().slice(0,-1)+"."+i;for(;n.length;)e=e[t=n.shift()];return delete e[i]}return!0}},function(e,t,n){"use strict";
/*!
* has-value <https://github.com/jonschlinkert/has-value>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/var r=n(39),o=n(41),i=n(42);e.exports=function(e,t,n){return r(e)?o(i(e,t),n):o(e,t)}},function(e,t,n){"use strict";
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/var r=n(40);e.exports=function(e){return null!=e&&"object"==typeof e&&!1===r(e)}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";
/*!
* has-values <https://github.com/jonschlinkert/has-values>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/e.exports=function(e,t){if(null==e)return!1;if("boolean"==typeof e)return!0;if("number"==typeof e)return 0!==e||!0!==t;if(void 0!==e.length)return 0!==e.length;for(var n in e)if(e.hasOwnProperty(n))return!0;return!1}},function(e,t){function n(e){return e?Array.isArray(e)?e.join("."):e:""}
/*!
* get-value <https://github.com/jonschlinkert/get-value>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
e.exports=function(e,t,r,o,i){if(null===(s=e)||"object"!=typeof s&&"function"!=typeof s||!t)return e;var s;if(t=n(t),r&&(t+="."+n(r)),o&&(t+="."+n(o)),i&&(t+="."+n(i)),t in e)return e[t];for(var a=t.split("."),l=a.length,u=-1;e&&++u<l;){for(var c=a[u];"\\"===c[c.length-1];)c=c.slice(0,-1)+"."+a[++u];e=e[c]}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=function(){var e=document.querySelector("form#cb-validation"),t=(0,r.selectAll)(e,"input, select");return new Promise(function(n,r){var o=function n(){e.removeEventListener("submit",i),t.forEach(function(e){return e.removeEventListener("invalid",n)}),r()},i=function r(){e.removeEventListener("submit",r),t.forEach(function(e){return e.removeEventListener("invalid",o)}),n()};t.forEach(function(e){return e.addEventListener("invalid",o)}),e.addEventListener("submit",i),document.querySelector("button#cb-validation-tester").click()})},t.transferToState=function(){(0,r.selectAll)(document,"[data-cb-set]").forEach(function(e){var t=e.dataset.set;switch(e.nodeName){case"INPUT":(0,o.set)(t,e.value);break;case"SELECT":(0,o.set)(t,e.options[e.selectedIndex].value);break;default:(0,o.set)(t,e.textContent)}})};var r=n(7),o=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Backstage=void 0,t.init=function(){(0,o.init)(),(0,r.render)((0,r.h)(f,null),document.body)};var r=n(2),o=n(18),i=c(n(45)),s=c(n(48)),a=c(n(49)),l=c(n(52)),u=c(n(56));function c(e){return e&&e.__esModule?e:{default:e}}n(58);class f extends r.Component{constructor(e){super(e),this.state={open:!0}}setBodyClass(){this.state.open?document.body.classList.add("backstage-visible"):document.body.classList.remove("backstage-visible")}toggle(){this.setState({open:!this.state.open})}render(){const e=this.state.open?{icon:"→",text:"Close"}:{icon:"←",text:"Open"};return(0,r.h)("div",{id:"backstage",class:this.state.open&&"open"},(0,r.h)("button",{onClick:e=>this.toggle(),title:e.text+" backstage panel",class:"toggle-visibility"},e.icon),(0,r.h)(u.default,null,(0,r.h)(a.default,{label:"State"}),(0,r.h)(i.default,{label:"History"}),(0,r.h)(l.default,{label:"Style"}),(0,r.h)(s.default,{label:"Notes"})))}componentDidMount(){this.setBodyClass()}componentDidUpdate(){this.setBodyClass()}}t.Backstage=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=l(n(10)),i=l(n(1)),s=n(18),a=n(0);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if(0===e.length)return[];const t=[];let n,r=[];return e.forEach(({change:e},o)=>{"trail"===e.name?(t.push({historyIndex:o-1,passage:n,varChanges:r}),r=[],n=e.value[e.value.length-1]):r.push({name:e.name,value:e.value})}),t.push({historyIndex:e.length-1,passage:n,varChanges:r}),console.log("Parsed",e,t),t}function c({historyIndex:e,passage:t,varChanges:n}){const o=[(0,r.h)("tr",null,(0,r.h)("td",{class:"actions",rowspan:n.length+1},(0,r.h)("button",{onClick:e>=0?()=>(0,s.rewindTo)(e):a.reset},"↪")),(0,r.h)("td",{class:"go",rowspan:n.length+1,colspan:n.length>0?1:2},t?`Go to "${t}"`:"Startup"))];return n.forEach(e=>{o.push((0,r.h)("tr",null,(0,r.h)("td",null,e.name," ← ",JSON.stringify(e.value))))}),o}n(47);t.default=class extends r.Component{constructor(e){super(e),this.state={history:u(s.history)},this.updateBound=(()=>this.update())}update(){this.setState({history:u(s.history)})}render(){let e;return e=this.state.history.length>0?(0,r.h)("table",{class:"history"},this.state.history.map(c)):(0,r.h)("table",{class:"history"},(0,r.h)("tr",null,(0,r.h)("td",{class:"actions"},(0,r.h)("button",{onClick:a.reset},"↪")),(0,r.h)("td",{class:"go"},"Startup"))),(0,r.h)(o.default,{title:"History"},e)}componentDidMount(){i.default.on("backstage-recorder-update",this.updateBound)}componentDidUnmount(){i.default.removeEventListener("backstage-recorder-update",this.updateBound)}}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(19)),o=n(2),i=l(n(1)),s=n(7),a=n(0);function l(e){return e&&e.__esModule?e:{default:e}}t.default=class extends o.Component{constructor(e){super(e);const t=(0,a.get)("trail");this.state={currentPassage:t[t.length-1],notes:{}},this.restore(),this.syncBound=(e=>this.sync(e))}sync({name:e,value:t}){"trail"===e&&this.setState({currentPassage:t[t.length-1]})}restore(){const e=window.localStorage.getItem(`cb-passage-notes-${(0,a.get)("config.state.saveKey")}`);e&&this.setState({notes:JSON.parse(e)})}save(){window.localStorage.setItem(`cb-passage-notes-${(0,a.get)("config.state.saveKey")}`,JSON.stringify(this.state.notes))}saveNote(e,t){const n=Object.assign({},this.state.notes);n[e]=t,this.setState({notes:n}),this.save()}export(){const e=Object.keys(this.state.notes).reduce((e,t)=>e+`<li class="note"><span class="passage">${(0,r.default)(t)}</span><pre>${(0,r.default)(this.state.notes[t])}</pre></li>`,""),t=document.createElement("a");t.setAttribute("download",`${(0,a.get)("story.name")} Notes - ${(new Date).toDateString()} ${(new Date).toTimeString()}.html`),t.setAttribute("href","data:text/html;base64,"+window.btoa(`<style>body {font-family: sans-serif}</style><h1>Notes for “${(0,r.default)((0,a.get)("story.name"))}”</h1><ul data-cb-backstage-notes data-cb-version="${(0,a.get)("engine.version")}">${e}</ul>`)),document.body.appendChild(t),t.click(),document.body.removeChild(t)}startImport(){this.upload.click()}import(e){const t=this.upload.files[0];if(!t)return;const n=new FileReader(t);n.onload=(e=>{const t=document.createElement("div"),n=Object.assign({},this.state.notes);let r=0;t.innerHTML=e.target.result;const o=(0,s.selectAll)(t,"ul[data-cb-backstage-notes] li");0!==o.length?(o.forEach(e=>{const t=(0,s.select)(e,"span.passage"),o=(0,s.select)(e,"pre");t&&o&&(n[t.textContent]=(n[t.textContent]||"")+"\n\n"+o.textContent,r++)}),this.setState({notes:n}),this.save(),window.alert(`${r} note(s) were imported.`)):window.alert("No notes were found in this file.")}),n.readAsText(t)}deleteAll(){window.confirm("Are you sure? This will delete all text entered in the Notes panel of Backstage, and cannot be undone.")&&(this.setState({notes:{}}),this.save())}render(){return(0,o.h)("div",null,(0,o.h)("p",null,(0,o.h)("label",null,"Notes on “",this.state.currentPassage,"”")),(0,o.h)("p",null,(0,o.h)("textarea",{value:this.state.notes[this.state.currentPassage],onInput:e=>this.saveNote(this.state.currentPassage,e.target.value)})),(0,o.h)("p",null,(0,o.h)("button",{onClick:()=>this.export()},"Export All Notes"),(0,o.h)("button",{onClick:()=>this.startImport()},"Import Notes From File"),(0,o.h)("button",{onClick:()=>this.deleteAll()},"Delete All Notes")),(0,o.h)("input",{type:"file",hidden:!0,ref:e=>this.upload=e,onChange:()=>this.import()}))}componentDidMount(){i.default.on("state-change",this.syncBound)}componentDidUnmount(){i.default.removeListener("state-change",this.syncBound)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.h)("div",null,(0,r.h)(i.default,null),(0,r.h)(o.default,null))};var r=n(2),o=s(n(50)),i=s(n(51));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(2),i=n(0),s=n(10),a=(r=s)&&r.__esModule?r:{default:r};t.default=class extends o.Component{constructor(e){super(e),this.state={snapshots:[]},this.restore()}addSnapshot(){const e=window.prompt("Enter a name for this snapshot:");e&&this.setState({snapshots:this.state.snapshots.concat({name:e,state:(0,i.saveToObject)()})})}loadSnapshot(e){(0,i.restoreFromObject)(this.state.snapshots[e].state)}deleteSnapshot(e){window.confirm(`Are you sure you want to delete the snapshot "${this.state.snapshots[e].name}"? This cannot be undone.`)&&this.setState({snapshots:this.state.snapshots.filter((t,n)=>n!==e)})}save(){window.localStorage.setItem(`cb-snapshots-${(0,i.get)("config.state.saveKey")}`,JSON.stringify(this.state.snapshots))}restore(){const e=window.localStorage.getItem(`cb-snapshots-${(0,i.get)("config.state.saveKey")}`);e&&this.setState({snapshots:JSON.parse(e)})}render(){const e=this.state.snapshots.map((e,t)=>(0,o.h)("div",{class:"segmented-button block"},(0,o.h)("button",{onClick:()=>this.loadSnapshot(t),title:'Load snapshot "{s.name}"'},e.name),(0,o.h)("button",{onClick:()=>this.deleteSnapshot(t),class:"fixed",title:'Delete snapshot "{s.name}"'},(0,o.h)("strong",null,"×"))));return(0,o.h)(a.default,{title:"Snapshots"},e,(0,o.h)("button",{class:"block",onClick:()=>this.addSnapshot()},"Add Snapshot"))}componentDidUpdate(){this.save()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=a(n(10)),i=n(0),s=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}t.default=class extends r.Component{constructor(e){super(e),this.state={varNames:[],showDefaults:!1},this.syncBound=(()=>this.syncWithState())}syncWithState(){this.setState({varNames:(0,i.varNames)(this.state.showDefaults)})}onChangeDefaults(e){this.setState({showDefaults:e.target.checked})}onChangeVar(e,t){(0,i.set)(t,JSON.parse(e.target.value))}render(){return(0,r.h)(o.default,{title:"Variables"},(0,r.h)("p",null,(0,r.h)("input",{type:"checkbox",id:"cb-backstage-show-defaults",checked:this.state.showDefaults,onChange:e=>this.onChangeDefaults(e)}),(0,r.h)("label",{for:"cb-backstage-show-defaults"},"Show Defaults")),(0,r.h)("table",null,this.state.varNames.map(e=>(0,r.h)("tr",null,(0,r.h)("td",null,e),(0,r.h)("td",null,(0,r.h)("input",{type:"text",value:JSON.stringify((0,i.get)(e)),onChange:t=>this.onChangeVar(t,e)}))))))}componentWillMount(){this.syncWithState(),s.default.on("state-change",this.syncBound)}componentDidUpdate(e,t){t.showDefaults!==this.state.showDefaults&&this.syncWithState()}componentWillUnmount(){s.default.removeListener("state-change",this.syncBound)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,r.h)("div",null,(0,r.h)(o.default,null),(0,r.h)(i.default,{title:"Page",prefix:"page"}),(0,r.h)(i.default,{title:"Header",prefix:"page.header"}),(0,r.h)(i.default,{title:"Footer",prefix:"page.footer"}))};var r=n(2),o=s(n(53)),i=s(n(54));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){const e=l.reduce((e,t)=>{const n=(0,i.get)(t);return n?e+`${t}: ${JSON.stringify(n)}\n`:e},"").trim();return(0,o.h)(a.default,{title:"Config"},(0,o.h)("p",null,(0,o.h)("label",{for:"cb-backstage-style-config"},"Enter this code into your first passage’s vars section to permanently use this style:")),(0,o.h)("p",null,(0,o.h)("textarea",{readonly:!0,id:"cb-backstage-style-config",onClick:e=>e.target.select()},e)))};var r,o=n(2),i=n(0),s=n(10),a=(r=s)&&r.__esModule?r:{default:r};const l=["page","page.header","page.footer"].reduce((e,t)=>e.concat([`config.style.${t}.font`,`config.style.${t}.color`,`config.style.${t}.link.font`,`config.style.${t}.link.color`,`config.style.${t}.link.lineColor`,`config.style.${t}.link.active.font`,`config.style.${t}.link.active.color`,`config.style.${t}.link.active.lineColor`]),[])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({title:e,prefix:t}){return(0,r.h)(o.default,{title:e,initiallyOpen:!1},(0,r.h)(i.default,{label:"Font",binding:`config.style.${t}.font`}),(0,r.h)(i.default,{label:"Color",binding:`config.style.${t}.color`}),(0,r.h)(i.default,{label:"Link Font",binding:`config.style.${t}.link.font`}),(0,r.h)(i.default,{label:"Link Color",binding:`config.style.${t}.link.color`}),(0,r.h)(i.default,{label:"Link Line Color",binding:`config.style.${t}.link.lineColor`}),(0,r.h)(i.default,{label:"Active Link Font",binding:`config.style.${t}.link.active.font`}),(0,r.h)(i.default,{label:"Active Link Color",binding:`config.style.${t}.link.active.color`}),(0,r.h)(i.default,{label:"Active Link Line Color",binding:`config.style.${t}.link.active.lineColor`}))};var r=n(2),o=s(n(10)),i=s(n(55));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({label:e,binding:t}){return(0,r.h)("p",{class:"input-group"},(0,r.h)("label",{for:`cb-backstage-${t}`},e),(0,r.h)("input",{type:"text",id:`cb-backstage-${t}`,value:(0,o.get)(t),onChange:e=>(0,o.set)(t,e.target.value)}))};var r=n(2),o=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);n(57);t.default=class extends r.Component{constructor(e){super(e),this.state={selected:0}}select(e){this.setState({selected:e})}render(){const e=this.props.children.map((e,t)=>(0,r.h)("li",null,(0,r.h)("button",{onClick:()=>this.select(t),class:t===this.state.selected&&"active"},e.attributes.label)));return(0,r.h)("div",null,(0,r.h)("ul",{class:"tabs"},e),(0,r.h)("div",{class:"tab-content"},this.props.children[this.state.selected]))}}},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){window.engine={extend:function(e,t){var n=s.get("engine.version"),r=d(e),o=d(n);o[0]<r[0]?f("The current engine version ("+n+") has a lower major version than requested ("+e+"); skipping"):(o[0]>r[0]?f("The current engine version ("+n+") has a higher major version than requested ("+e+"); running code but you may encounter problems"):(o[1]<r[1]&&f("The current engine version ("+n+") has a lower minor version than requested ("+e+"); running code but you may encounter problems"),o[1]===r[1]&&o[2]<r[2]&&f("The current engine version ("+n+") has a lower patch version than requested ("+e+"); running code but you may encounter problems")),t())},event:r.default,log:o.log,render:l.render,state:s,story:a,warn:o.warn}};var r=c(n(1)),o=n(4),i=c(o),s=u(n(0)),a=u(n(6)),l=n(11);function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}var f=(0,i.default)("extensibility").warn;function d(e){return e.split(".").map(window.parseInt)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(61)),o=v(n(62)),i=v(n(63)),s=v(n(73)),a=v(n(74)),l=v(n(75)),u=v(n(76)),c=v(n(77)),f=v(n(78)),d=v(n(79)),p=v(n(80)),h=v(n(81)),g=v(n(82)),m=v(n(83));function v(e){return e&&e.__esModule?e:{default:e}}t.default=[r.default,o.default,i.default,s.default,a.default,l.default,u.default,c.default,f.default,d.default,p.default,h.default,g.default,m.default]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={match:/^ambient\s+sound/i,render:function(e,t){var n=(0,r.get)("sound.ambient."+e+".description")||"",o=(0,r.get)("sound.ambient");return Object.keys(o).forEach(function(t){t!==e&&o[t].playing&&(0,r.set)("sound.ambient."+t+".playing",!1)}),t.volume&&(0,r.set)("sound.ambient."+e+".volume",t.volume),(0,r.set)("sound.ambient."+e+".playing",!0),"<audio>"+n+"</audio>"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17),o=n(0);t.default={match:/^back\s+link/i,render:function(e,t){var n=(0,o.get)("trail");return(0,r.renderLink)(n.length>1?n[n.length-2]:n[0],t.label||"Back")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=n(0),i=a(n(1)),s=a(n(5));function a(e){return e&&e.__esModule?e:{default:e}}t.default={match:/^cycling\s+link(\s+for)?/i,render:function(e,t){var n=void 0;return e?void 0===(n=(0,o.get)(e))&&((0,o.set)(e,t.choices[0]),n=t.choices[0]):n=t.choices[0],(0,s.default)("a",{href:"javascript:void(0)","data-cb-cycle-set":e||void 0,"data-cb-cycle-choices":JSON.stringify(t.choices)},[n])}},i.default.on("dom-click",function(e){if(e.dataset.cbCycleChoices){var t=JSON.parse(e.dataset.cbCycleChoices),n=t.indexOf(e.textContent)+1;n===t.length&&(n=0),(0,r.changeBody)(function(){return e.textContent=t[n]}),e.dataset.cbCycleSet&&(0,o.set)(e.dataset.cbCycleSet,t[n])}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.none=function(e,t){return new Promise(function(n){e.innerHTML=t,n()})},t.fadeInOut=function(e,t,n){return new Promise(function(r){a(e);var o=(0,i.default)(n,"s")/2,s=document.createElement("div");if(s.innerHTML=t,s.style.visibility="hidden",s.style.animationDuration=o+"s",s.addEventListener("animationend",function e(){s.removeEventListener("animationend",e),s.className="",s.style.animationDuration=o+"s",r()}),""!==e.innerHTML.trim()){var u=l(e);u.style.position="absolute",u.style.top="0",u.style.left="0",u.className="fade-out",u.style.animationDuration=o+"s",u.addEventListener("animationend",function e(){u.removeEventListener("animationend",e),u.parentNode.removeChild(u),s.style.visibility="visible",s.className="fade-in"}),e.innerHTML="",e.appendChild(s),e.appendChild(u)}else s.className="fade-in",s.animationDuration=2*o,s.style.visibility="visible",s.className="fade-in",e.appendChild(s)})},t.crossfade=function(e,t,n){return new Promise(function(r){a(e);var o=(0,i.default)(n,"s"),s=document.createElement("div");if(s.innerHTML=t,s.className="fade-in",s.style.animationDuration=o+"s",s.addEventListener("animationend",function e(){s.removeEventListener("animationend",e),s.style.animationDuration=null,s.className="",r()}),""!==e.innerHTML.trim()){var u=l(e);u.style.position="absolute",u.style.top="0",u.style.left="0",u.className="fade-out",u.style.animationDuration=o+"s",u.addEventListener("animationend",function e(){u.removeEventListener("animationend",e),u.style.opacity=.5,u.parentNode.removeChild(u)}),e.innerHTML="",e.appendChild(s),e.appendChild(u)}else e.innerHTML="",e.appendChild(s)})};var r,o=n(13),i=(r=o)&&r.__esModule?r:{default:r},s=n(7);function a(e){"static"===window.getComputedStyle(e).position&&(e.style.position="relative")}function l(e){var t=document.createElement(e.nodeName.toLowerCase());return t.innerHTML=e.innerHTML,t.style.width=e.clientWidth+"px",t.style.height=e.clientHeight+"px",t.setAttribute("aria-hidden",!0),t.style.pointerEvents="none",(0,s.selectAll)(t,"audio").forEach(function(e){return e.parentNode.removeChild(e)}),t}n(65)},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){window.addEventListener("error",a),window.addEventListener("unhandledrejection",function(e){return a(e.reason)})};var r,o=n(67),i=(r=o)&&r.__esModule?r:{default:r},s=n(0);function a(e){try{var t="";t=(t=e.error&&e.error.stack?e.message+"\n\nStack trace:\n"+e.error.stack:e.message+"\n\n[No stack trace available]").replace("\nPlease report this to https://github.com/chjj/marked.","");var n=document.createElement("div"),r=document.querySelector("#page article"),o=(0,s.get)("trail");n.className="error",n.innerHTML="\n\t\t\t<p>\n\t\t\tAn unexpected error has occurred.\n\t\t\t</p>\n\t\t\t<pre>"+((0,s.get)("config.testing")?t:"")+'</pre>\n\t\t\t<ul>\n\t\t\t\t<li>\n\t\t\t\t\t<a href="javascript:void(0)" '+(o.length>1?"data-cb-back":"data-cb-refresh")+'>Go back</a> to the previous passage.\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href="javascript:void(0)" data-cb-hard-restart>Hard restart</a>, clearing all progress and beginning from the start.\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t',n.addEventListener("click",function(e){if((0,i.default)(e.target,"[data-cb-back]",!0)){var t=(0,s.get)("trail");Array.isArray(t)?(0,s.set)("trail",t.slice(0,t.length-1)):window.alert("Sorry, going back was not successful. Please try hard restarting.")}else{if((0,i.default)(e.target,"[data-cb-refresh]",!0))(0,s.set)("trail",[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}((0,s.get)("trail"))));else(0,i.default)(e.target,"[data-cb-hard-restart]",!0)&&((0,s.purgeFromStorage)(!0),window.location.reload())}}),r.innerHTML="",r.appendChild(n)}catch(e){console.log(e)}}},function(e,t,n){var r=n(68);e.exports=function(e,t,n){for(var o=n?e:e.parentNode;o&&o!==document;){if(r(o,t))return o;o=o.parentNode}}},function(e,t){var n=Element.prototype,r=n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector;e.exports=function(e,t){if(r)return r.call(e,t);for(var n=e.parentNode.querySelectorAll(t),o=0;o<n.length;++o)if(n[o]==e)return!0;return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){var e=window.console.warn,t=document.querySelector("#page .warnings");console.warn=function(){for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];if((0,o.get)("config.testing"))try{t.removeAttribute("hidden"),i.forEach(function(e){var n=document.createElement("li");n.className="warning",n.innerHTML="Warning: "+(0,r.default)(e),t.appendChild(n)})}catch(e){}e.apply(window.console,i)},i.default.on("state-change",function(e){var n=e.name;"trail"===n&&(t.setAttribute("hidden",""),t.innerHTML="")})};var r=s(n(19)),o=n(0),i=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}n(70)},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=Date.now(),r=void 0,o=(0,s.selectAll)(e,"[data-cb-skippable]").map(function(e){return{el:e,delay:1e3*(0,i.default)(window.getComputedStyle(e).animationDelay)}}).sort(function(e,t){return e.delay-t.delay});if(0===o.length)return;function a(){var e=Date.now()-n,t=Object.assign({},o.find(function(t){return t.delay>e}));t?(o.forEach(function(e){e.delay<=t.delay?(e.delay=0,e.el.classList.add("skip-animation")):(e.delay-=t.delay,e.el.style.animationDelay=e.delay+"ms")}),n=Date.now(),window.clearTimeout(r),l()):u()}function l(){r&&window.clearTimeout(r),r=window.setTimeout(u,o[o.length-1].delay)}function u(){t.classList.remove("visible"),document.body.removeEventListener("click",a),document.body.removeEventListener("keyup",a)}t.classList.add("visible"),l(),window.setTimeout(function(){document.body.addEventListener("click",a),document.body.addEventListener("keyup",a)},50)};var r,o=n(13),i=(r=o)&&r.__esModule?r:{default:r},s=n(7)},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(5),i=(r=o)&&r.__esModule?r:{default:r};t.default={match:/^embed\s+flickr(\s+image)?/i,render:function(e,t){return(0,i.default)("img",Object.assign({},t,{src:/img src="(.+?)"/.exec(e)[1]}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(5),i=(r=o)&&r.__esModule?r:{default:r};t.default={match:/^embed\s+image?/i,render:function(e,t){return(0,i.default)("img",Object.assign({},t,{src:e}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=n(11);t.default={match:/^embed\s+passage(\s+named)?/i,render:function(e){return(0,o.render)((0,r.passageNamed)(e).source)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(5),i=(r=o)&&r.__esModule?r:{default:r};t.default={match:/^embed\s+unsplash(\s+image)?/i,render:function(e,t){return(0,i.default)("img",Object.assign({},t,{src:"https://source.unsplash.com/"+e.replace(/.*\//,"")+"/"+t.width+"x"+t.height}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(5),i=(r=o)&&r.__esModule?r:{default:r};t.default={match:/^embed\s+youtube(\s+video)?/i,render:function(e,t){var n="https://www.youtube-nocookie.com/embed/"+e.replace(/.*\?v=/,"")+"?modestbranding=1&rel=0&controls="+(t.controls?1:0)+"&";return t.autoplay&&(n+="autoplay=1&"),t.loop&&(n+="loop=1&"),(0,i.default)("div",{style:"position: relative; height: 0; padding-bottom: 56.25%; margin-bottom: 1em"},[(0,o.domify)("iframe",{src:n,frameBorder:0,style:"position: absolute; top: 0; left: 0; width: 100%; height: 100%"})])}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(17);t.default={match:/^link\s+to/i,render:function(e,t){return(0,r.renderLink)(e,t.label)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(1)),o=n(0),i=n(5),s=a(i);function a(e){return e&&e.__esModule?e:{default:e}}t.default={match:/^dropdown menu(\s+for)?/i,render:function(e,t){var n=void 0;return e&&void 0===(n=(0,o.get)(e))&&((0,o.set)(e,t.choices[0]),n=t.choices[0]),(0,s.default)("select",{"data-cb-menu-set":e||void 0},t.choices.map(function(t){var r={value:t};return e&&n===t&&(r.selected=""),(0,i.domify)("option",r,[t])}))}},r.default.on("dom-change",function(e){e.dataset.cbMenuSet&&(0,o.set)(e.dataset.cbMenuSet,e.querySelectorAll("option")[e.selectedIndex].value)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(5),i=(r=o)&&r.__esModule?r:{default:r};t.default={match:/^restart\s+link/i,render:function(e,t){return(0,i.default)("a",{href:"javascript:void(0)","data-cb-restart":!0},[t.label||"Restart"])}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(12),o=l(n(1)),i=l(n(5)),s=n(6),a=n(11);function l(e){return e&&e.__esModule?e:{default:e}}t.default={match:/^reveal\s+link/i,render:function(e,t){return t.text?(0,i.default)("a",{href:"javascript:void(0)","data-cb-reveal-text":t.text},[e]):t.passage?(0,i.default)("a",{href:"javascript:void(0)","data-cb-reveal-passage":t.passage},[e]):void 0}},o.default.on("dom-click",function(e){var t=e.dataset.cbRevealText;if(e.dataset.cbRevealPassage&&(t=(0,s.passageNamed)(e.dataset.cbRevealPassage).source),t){var n=document.createElement("div");n.innerHTML=(0,a.render)(t),(0,r.changeBody)(function(){if("P"===n.firstChild.nodeName){var t=document.createElement("span");t.innerHTML=n.firstChild.innerHTML,e.parentNode.insertBefore(t,e.nextSibling),n.removeChild(n.firstChild)}for(;n.firstChild;)e.parentNode.parentNode.insertBefore(n.firstChild,e.parentNode.nextSibling);e.parentNode.removeChild(e)})}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={match:/^sound\s+effect/i,render:function(e,t){var n=(0,r.get)("sound.effect."+e+".description")||"";return t.volume&&(0,r.set)("sound.effect."+e+".volume",t.volume),(0,r.set)("sound.effect."+e+".playing",!0),"<audio>"+n+"</audio>"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(1)),o=n(0),i=s(n(5));function s(e){return e&&e.__esModule?e:{default:e}}t.default={match:/^text\s+input(\s+for)?/i,render:function(e,t){return(0,i.default)("input",{type:"text",value:e?(0,o.get)(e):"","data-cb-text-field-set":e||void 0,required:!1!==t.required?"":void 0})}},r.default.on("dom-change",function(e){e.dataset.cbTextFieldSet&&(0,o.set)(e.dataset.cbTextFieldSet,e.value)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(85)),o=f(n(86)),i=f(n(87)),s=f(n(88)),a=f(n(89)),l=f(n(90)),u=f(n(91)),c=f(n(93));function f(e){return e&&e.__esModule?e:{default:e}}t.default=[r.default,o.default,i.default,s.default,a.default,l.default,u.default,c.default]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(13)),o=i(n(21));function i(e){return e&&e.__esModule?e:{default:e}}t.default={match:/^after\s/i,process:function(e,t){var n=t.invocation,i=(0,r.default)(n.replace(/^after\s/i,""),"ms");e.text=(0,o.default)(e.text,{"data-cb-skippable":"",class:"fade-in",style:"animation-delay: "+i+"ms"})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(21),i=(r=o)&&r.__esModule?r:{default:r};t.default={match:/^align\s+(left|right|center)/i,process:function(e,t){var n=t.invocation.replace(/^align\s+/i,"");e.text=(0,i.default)(e.text,{style:"display: block; text-align: "+n})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={match:/^append$/i,process:function(e){e.startsNewParagraph=!1}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={match:/^if(always|never)?\s|else$|unless\s/i,processRaw:function(e,t){var n=t.invocation,r=t.state,o=n.replace(/\s.*/,"").toLowerCase(),i=void 0;switch("else"!==o&&(i=new Function("return "+n.replace(/.*?\s/,""))),o){case"if":r.conditionEval=i.apply(window);break;case"ifalways":r.conditionEval=!0;break;case"ifnever":r.conditionEval=!1;break;case"unless":r.conditionEval=!i.apply(window);break;case"else":if(void 0===r.conditionEval)throw new Error("There was no matching if modifier for an else modifier.");r.conditionEval=!r.conditionEval}r.conditionEval||(e.text="")}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={match:/^continued?|cont('d)?$/i,process:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={match:/^css$/i,process:function(e){e.text="<style>"+e.text+"</style>"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(92),i=(r=o)&&r.__esModule?r:{default:r},s=n(0);t.default={match:/^javascript$/i,process:function(e){try{var t=new Function("\n\t\t\t\t\t\tfunction write() { write.__out += write.__join.call(arguments, ''); }\n\t\t\t\t\t\twrite.__out = '';\n\t\t\t\t\t\twrite.__join = Array.prototype.join;\n\t\t\t\t\t\t"+(0,i.default)(e.text)+";\n\t\t\t\t\t\treturn write.__out;\n\t\t\t\t\t");e.text=t.apply(window)}catch(t){if(!(0,s.get)("config.testing"))throw t;var n="unknown error";n=t.error&&t.error.stack?t.error.stack:t.message+"\n[No stack trace available]",e.text='<div class="error">An error occured evaluating:<pre>'+e.text+"</pre><p><pre>"+n+"</pre></p></div>"}}}},function(e,t,n){(function(t){var n=1/0,r="[object Symbol]",o=/&(?:amp|lt|gt|quot|#39|#96);/g,i=RegExp(o.source),s="object"==typeof t&&t&&t.Object===Object&&t,a="object"==typeof self&&self&&self.Object===Object&&self,l=s||a||Function("return this")();var u,c=(u={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},function(e){return null==u?void 0:u[e]}),f=Object.prototype.toString,d=l.Symbol,p=d?d.prototype:void 0,h=p?p.toString:void 0;function g(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==r}(e))return h?h.call(e):"";var t=e+"";return"0"==t&&1/e==-n?"-0":t}e.exports=function(e){var t;return(e=null==(t=e)?"":g(t))&&i.test(e)?e.replace(o,c):e}}).call(this,n(16))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={match:/^(note(\s+to\s+self)?|n?b?|todo|fixme)$/i,process:function(e){e.text=""}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n={vars:[],blocks:[]},i=e.split(t.varsSep,2),s=void 0,c=void 0;if(2===i.length){a("Detected vars section");var f=r(i,2);s=f[0],c=f[1],(0,o.default)(s).forEach(function(e){if(""!==e.trim()){var t=e.indexOf(":");if(-1!==t){var r=e.substr(0,t).trim(),o=e.substr(t+1).trim(),i={name:r,value:new Function("return ("+o+")")},s=r.match(/\(.+\)/);s?(i.condition=new Function("return ("+s[0]+")"),i.name=(i.name.substr(0,s.index)+i.name.substr(s.index+s[0].length)).trim(),a('Setting variable "'+i.name+'" to "'+o+'" with condition ('+s[0]+")")):a('Setting variable "'+r+'" to "'+o+'" without condition'),n.vars.push(i)}else l('The line "'+e+'" in the vars section is missing a colon. It was ignored.')}})}else a("No vars section detected"),c=i[0];var d=function(e,t){var r=t.trim();""!==r&&(a("Creating '"+e+"' block with content: \""+r+'"'),n.blocks.push({type:e,content:r}))},p=new RegExp(t.modifierPattern),h=0,g=p.exec(c);for(;g;){d("text",c.substring(h,g.index));for(var m=g[1],v="",b=0;b<m.length;b++)switch(m[b]){case'"':for(v+='"',b+=1;b<m.length&&(v+=m[b],'"'!==m[b]||"\\"===m[b-1]);b++);break;case";":d("modifier",v),v="";break;default:v+=m[b]}d("modifier",v),h=p.lastIndex,g=p.exec(c)}return d("text",c.substring(h)),n};var o=i(n(95));function i(e){return e&&e.__esModule?e:{default:e}}var s=(0,i(n(4)).default)("parse"),a=s.log,l=s.warn,u={varsSep:/^--$/m,modifierPattern:/^\[([^[].+[^\]])\]$/gm}},function(e,t,n){"use strict";e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string in the first argument, got "+typeof e);if(!(t&&t.preserveNewlines))return e.split(/\r?\n/);for(var n=e.split(/(\r?\n)/),r=[],o=0;o<n.length;o+=2)r.push(n[o]+(n[o+1]||""));return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.markedOptions=void 0,t.default=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e.vars)throw new Error("The renderer was given an object with no vars property.");if(!e.blocks)throw new Error("The renderer was given an object with no blocks property.");var i="";o||(c("Setting vars ("+e.vars.length+")"),e.vars.forEach(function(e){if(e.condition){var t=e.condition();t?(c('Setting var "'+name+'" (condition is currently true)'),(0,l.set)(e.name,e.value())):c('Not setting var "'+name+'" (condition is currently false)')}else c('Setting var "'+name+'"'),(0,l.set)(e.name,e.value())}));var u=[],d={};return e.blocks.forEach(function(e){switch(e.type){case"text":var r={text:e.content,startsNewParagraph:!0},o=u.filter(function(e){return!!e.mod.processRaw});c("Running "+o.length+" modifiers on raw source block"),o.forEach(function(e){e.mod.processRaw(r,{state:d[e.mod],invocation:e.invocation})}),r.text=(0,s.default)((0,a.default)(r.text),t);var l=u.filter(function(e){return!!e.mod.process});c("Running "+l.length+" modifiers on source block"),l.forEach(function(e){return e.mod.process(r,{state:d[e.mod],invocation:e.invocation})}),c("Output after modifiers: "+JSON.stringify(r)),""!==r.text.trim()&&(""!==i&&(i+=r.startsNewParagraph?"\n\n":" "),i+=r.text),u=[];break;case"modifier":var f=n.filter(function(t){return t.match.test(e.content)});if(1===f.length){var p=f[0];c('Activated "'+p.name+'" modifier matching ['+e.content+"]"),d[p]=d[p]||{},u.push({mod:p,invocation:e.content})}else 0===f.length?i+="\n\n["+e.content+"]\n\n":(console.warn('More than one modifier matched "['+e.content+']".'),i+="\n\n["+e.content+"]\n\n");break;default:throw new Error("Don't know how to render a block with type \""+e.type+'".')}}),r.default.setOptions(f),c("Final Markdown:\n"+i),(0,r.default)(i)};var r=u(n(22)),o=u(n(4)),i=u(n(97)),s=u(n(98)),a=u(n(17)),l=n(0);function u(e){return e&&e.__esModule?e:{default:e}}var c=(0,o.default)("render").log,f=t.markedOptions={renderer:i.default,smartypants:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=n(22);var i=new((r=o)&&r.__esModule?r:{default:r}).default.Renderer;Object.assign(i,{blockquote:function(e){return'<div class="fork">'+e+"</div>"},del:function(e){return'<span class="small-caps">'+e+"</span>"}}),t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n="",r=0,o=e.indexOf("{");if(-1===o)return e;for(var i=!1,a=void 0,l=o+1;l<e.length;l++)switch(e[l]){case"{":o=l,i=!1;break;case'"':case"'":i?i&&a===e[l]&&(i=!1):(i=!0,a=e[l]);break;case"}":if(!i){var u=e.substring(o,l+1),c="";try{c=s(u,t)}catch(e){console.warn('An error occurred while rendering "'+u+'": '+e.message),c=u}void 0===c&&(c=""),n+=e.substring(r,o)+c,r=l+1,-1===(o=e.indexOf("{",r))&&(l=e.index)}}return n+e.substring(r)};var r,o=n(0),i=n(4);(0,((r=i)&&r.__esModule?r:{default:r}).default)("render").warn;function s(e,t){var n=e.substr(1,e.length-2).trim();if(/\s/.test(n)){var r=n.match(/^[^:,]+/)[0],i=t.find(function(e){return e.match.test(r)});if(i){var s=n.replace(r,"");if(":"===s[0]){var a=new Function('return {"'+r+'" '+s+"}")(),l=a[r];return delete a[r],i.render(l,a,n)}if(","===s[0]){var u=new Function("return {"+s.substr(1)+"}")();return i.render(null,u,n)}if(""===s)return i.render(null,{},n)}}else{var c=(0,o.get)(n);if(void 0!==c)return c}return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=e.volume,o=t-r,i=void 0,s=0;return new Promise(function(t){return window.requestAnimationFrame(function(a){i=a,window.requestAnimationFrame(function a(l){s+=l-i;e.volume=function(e,t,n,r){if((e/=r/2)<1)return n/2*e*e+t;return-n/2*(--e*(e-2)-1)+t}(s,r,o,n);s<n?(i=l,window.requestAnimationFrame(a)):t()})})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){(0,r.default)(u.setLookup),(0,o.default)(u.setLookup),(0,i.default)(u.setLookup),(0,s.default)(u.setLookup),(0,a.default)(u.setLookup),(0,l.default)(u.setLookup)};var r=c(n(101)),o=c(n(102)),i=c(n(104)),s=c(n(105)),a=c(n(24)),l=c(n(115)),u=n(0);function c(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e("browser.height",function(){return window.innerHeight}),e("browser.online",function(){return window.navigator.onLine}),e("browser.width",function(){return window.innerWidth})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e("engine.version",function(){return i.default.version})};var r,o=n(103),i=(r=o)&&r.__esModule?r:{default:r}},function(e){e.exports={name:"Chapbook",author:"Chris Klimas <[email protected]>",description:"A Twine story format emphasizing ease of authoring, multimedia, and playability on many different types of devices.",version:"1.0.0",main:"index.js",license:"MIT",devDependencies:{"babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-preset-env":"^1.6.1","babel-preset-preact":"^1.1.0","child-process-promise":"^2.2.1",cpy:"^7.2.0","cpy-cli":"^2.0.0","cross-env":"^5.2.0","css-loader":"^0.28.11",eslint:"^4.14.0","gitbook-cli":"^2.3.2","html-webpack-plugin":"^3.2.0",jest:"^24.7.1","jest-localstorage-mock":"^2.2.0",jsdoc:"^3.6.2","jstransformer-marked":"^1.0.3","lodash.escape":"^4.0.1","mini-css-extract-plugin":"^0.4.0","mock-local-storage":"^1.0.5","node-sass":"^4.9.0","npm-run-all":"^4.1.3",pug:"^2.0.3",rimraf:"^2.6.3","rollup-plugin-uglify":"^3.0.0","sass-loader":"^7.0.3","title-case":"^2.1.1","twine-utils":"^1.2.6","url-loader":"^1.1.2",webpack:"^4.28.2","webpack-cli":"^3.1.2","webpack-dev-server":"^3.1.12",yargs:"^11.0.0"},dependencies:{closest:"^0.0.1","get-value":"^3.0.1","lodash.unescape":"^4.0.1",marked:"^0.6.2",nanobus:"^4.3.3","open-color":"^1.6.3",preact:"^8.2.9","pure-color":"^1.3.0",seedrandom:"^2.4.3","set-value":"^3.0.0","split-lines":"^1.1.0",timestring:"^5.0.0","unset-value":"^1.0.0"},scripts:{start:"webpack-dev-server",build:"npm-run-all --parallel build:main build:micro --serial build:format clean","build:format":"node scripts/build-format.js","build:main":"cross-env NODE_ENV=production webpack","build:micro":"cross-env NODE_ENV=production CHAPBOOK_MICRO=y webpack",clean:"rimraf dist/full; rimraf dist/micro",examples:"node scripts/build-examples.js",guide:"gitbook serve guide","guide:init":"cd guide && gitbook install && cd ..","guide:release":"cd guide && gitbook build",lint:"eslint src/",release:"run-s -l build examples guide:release website",test:"jest","test:watch":"jest --watch","test:coverage":"jest --coverage",website:"node scripts/build-website.js"},jest:{setupFiles:["jest-localstorage-mock"]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e("now.second",function(){return(new Date).getSeconds()}),e("now.minute",function(){return(new Date).getMinutes()}),e("now.hour",function(){return(new Date).getHours()}),e("now.day",function(){return(new Date).getDate()}),e("now.weekday",function(){return(new Date).getDay()+1}),e("now.weekdayName",function(){return(new Date).toLocaleString(navigator.language,{weekday:"long"})}),e("now.month",function(){return(new Date).getMonth()+1}),e("now.monthName",function(){return(new Date).toLocaleString(navigator.language,{month:"long"})}),e("now.year",function(){return(new Date).getFullYear()}),e("now.timestamp",function(){return(new Date).toLocaleString(navigator.language,{hour:"numeric",minute:"numeric",second:"numeric"})})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e("passage.name",function(){var e=(0,r.get)("trail");if(e)return e[e.length-1]}),e("passage.visits",function(){var e=(0,r.get)("trail"),t=(0,r.get)("passage.name");if(e)return e.reduce(function(e,n){return n===t?e+1:e},0)})};var r=n(0)},function(e,t,n){var r=n(107),o=n(108),i=n(109),s=n(110),a=n(111),l=n(112),u=n(113);u.alea=r,u.xor128=o,u.xorwow=i,u.xorshift7=s,u.xor4096=a,u.tychei=l,e.exports=u},function(e,t,n){(function(e){var r;!function(e,o,i){function s(e){var t,n=this,r=(t=4022871197,function(e){e=e.toString();for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function l(e,t){var n=new s(e),r=t&&t.state,o=n.next;return o.int32=function(){return 4294967296*n.next()|0},o.double=function(){return o()+1.1102230246251565e-16*(2097152*o()|0)},o.quick=o,r&&("object"==typeof r&&a(r,n),o.state=function(){return a(n,{})}),o}o&&o.exports?o.exports=l:n(3)&&n(9)?void 0===(r=function(){return l}.call(t,n,t,o))||(o.exports=r):this.alea=l}(0,e,n(3))}).call(this,n(8)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function s(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function l(e,t){var n=new s(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&a(r,n),o.state=function(){return a(n,{})}),o}o&&o.exports?o.exports=l:n(3)&&n(9)?void 0===(r=function(){return l}.call(t,n,t,o))||(o.exports=r):this.xor128=l}(0,e,n(3))}).call(this,n(8)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function s(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function l(e,t){var n=new s(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&a(r,n),o.state=function(){return a(n,{})}),o}o&&o.exports?o.exports=l:n(3)&&n(9)?void 0===(r=function(){return l}.call(t,n,t,o))||(o.exports=r):this.xorwow=l}(0,e,n(3))}).call(this,n(8)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function s(e){var t=this;t.next=function(){var e,n,r=t.x,o=t.i;return e=r[o],n=(e^=e>>>7)^e<<24,n^=(e=r[o+1&7])^e>>>10,n^=(e=r[o+3&7])^e>>>3,n^=(e=r[o+4&7])^e<<7,e=r[o+7&7],n^=(e^=e<<13)^e<<9,r[o]=n,t.i=o+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n<t.length;++n)r[7&n]=r[7&n]<<15^t.charCodeAt(n)+r[n+1&7]<<13;for(;r.length<8;)r.push(0);for(n=0;n<8&&0===r[n];++n);for(8==n?r[7]=-1:r[n],e.x=r,e.i=0,n=256;n>0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function l(e,t){null==e&&(e=+new Date);var n=new s(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.x&&a(r,n),o.state=function(){return a(n,{})}),o}o&&o.exports?o.exports=l:n(3)&&n(9)?void 0===(r=function(){return l}.call(t,n,t,o))||(o.exports=r):this.xorshift7=l}(0,e,n(3))}).call(this,n(8)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function s(e){var t=this;t.next=function(){var e,n,r=t.w,o=t.X,i=t.i;return t.w=r=r+1640531527|0,n=o[i+34&127],e=o[i=i+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=o[i]=n^e,t.i=i,n+(r^r>>>16)|0},function(e,t){var n,r,o,i,s,a=[],l=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,l=Math.max(l,t.length)),o=0,i=-32;i<l;++i)t&&(r^=t.charCodeAt((i+32)%t.length)),0===i&&(s=r),r^=r<<10,r^=r>>>15,r^=r<<4,r^=r>>>13,i>=0&&(s=s+1640531527|0,o=0==(n=a[127&i]^=r+s)?o+1:0);for(o>=128&&(a[127&(t&&t.length||0)]=-1),o=127,i=512;i>0;--i)r=a[o+34&127],n=a[o=o+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,a[o]=r^n;e.w=s,e.X=a,e.i=o}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function l(e,t){null==e&&(e=+new Date);var n=new s(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&(r.X&&a(r,n),o.state=function(){return a(n,{})}),o}o&&o.exports?o.exports=l:n(3)&&n(9)?void 0===(r=function(){return l}.call(t,n,t,o))||(o.exports=r):this.xor4096=l}(0,e,n(3))}).call(this,n(8)(e))},function(e,t,n){(function(e){var r;!function(e,o,i){function s(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,o=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^o,o=o-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^o,t.a=o-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function a(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function l(e,t){var n=new s(e),r=t&&t.state,o=function(){return(n.next()>>>0)/4294967296};return o.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},o.int32=n.next,o.quick=o,r&&("object"==typeof r&&a(r,n),o.state=function(){return a(n,{})}),o}o&&o.exports?o.exports=l:n(3)&&n(9)?void 0===(r=function(){return l}.call(t,n,t,o))||(o.exports=r):this.tychei=l}(0,e,n(3))}).call(this,n(8)(e))},function(e,t,n){var r;!function(o,i){var s,a=(0,eval)("this"),l=256,u=6,c="random",f=i.pow(l,u),d=i.pow(2,52),p=2*d,h=l-1;function g(e,t,n){var r=[],h=b(function e(t,n){var r,o=[],i=typeof t;if(n&&"object"==i)for(r in t)try{o.push(e(t[r],n-1))}catch(e){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,y(o)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(l):(e=new Uint8Array(l),(a.crypto||a.msCrypto).getRandomValues(e)),y(e)}catch(e){var t=a.navigator,n=t&&t.plugins;return[+new Date,a,n,a.screen,y(o)]}}():e,3),r),g=new m(r),w=function(){for(var e=g.g(u),t=f,n=0;e<d;)e=(e+n)*l,t*=l,n=g.g(1);for(;e>=p;)e/=2,t/=2,n>>>=1;return(e+n)/t};return w.int32=function(){return 0|g.g(4)},w.quick=function(){return g.g(4)/4294967296},w.double=w,b(y(g.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&v(r,g),e.state=function(){return v(g,{})}),n?(i[c]=e,t):e})(w,h,"global"in t?t.global:this==i,t.state)}function m(e){var t,n=e.length,r=this,o=0,i=r.i=r.j=0,s=r.S=[];for(n||(e=[n++]);o<l;)s[o]=o++;for(o=0;o<l;o++)s[o]=s[i=h&i+e[o%n]+(t=s[o])],s[i]=t;(r.g=function(e){for(var t,n=0,o=r.i,i=r.j,s=r.S;e--;)t=s[o=h&o+1],n=n*l+s[h&(s[o]=s[i=h&i+t])+(s[i]=t)];return r.i=o,r.j=i,n})(l)}function v(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function b(e,t){for(var n,r=e+"",o=0;o<r.length;)t[h&o]=h&(n^=19*t[h&o])+r.charCodeAt(o++);return y(t)}function y(e){return String.fromCharCode.apply(0,e)}if(i["seed"+c]=g,b(i.random(),o),e.exports){e.exports=g;try{s=n(114)}catch(e){}}else void 0===(r=function(){return g}.call(t,n,t,e))||(e.exports=r)}([],Math)},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e("story.name",r.name)};var r=n(6)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){[r.defaults,o.defaults,i.defaults,s.defaults,a.defaults,l.defaults,u.defaults].forEach(function(e){return Object.keys(e).forEach(function(t){"function"==typeof e[t]?(0,a.setDefault)(t,e[t]()):(0,a.setDefault)(t,e[t])})})};var r=n(12),o=n(4),i=n(24),s=n(23),a=n(0),l=n(25),u=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(){l.dataset.cbGoogleFontLoader="",l.setAttribute("hidden",!0),u.dataset.cbTypekitFontLoader="",u.setAttribute("hidden",!0),c.dataset.cbUrlFontLoader="",c.setAttribute("hidden",!0),document.body.appendChild(l),document.body.appendChild(u),document.body.appendChild(c),o.default.on("state-change",function(e){var t=e.name,n=(e.value,"config"===t||"config.style"===t||"config.style.fonts"===t);if(n){var r=(0,i.get)("config.style.fonts");if(!r)return;Object.keys(r).forEach(function(e){var t=r[e].name,n=r[e].url;t&&n&&d(e,n,t)})}else{var o=t.match(/^config\.style\.fonts\.([^\.]+)/i);if(o){var s=o[1],c=(0,i.get)("config.style.fonts."+s+".name"),f=(0,i.get)("config.style.fonts."+s+".url");return void(f&&c&&(a("Adding font from URL ("+c+")"),d(s,f,c)))}}(0,i.sameObject)(t,"config.style.googleFont")&&(a("Adding Google font"),l.innerHTML=(0,i.get)("config.style.googleFont")),(0,i.sameObject)(t,"config.style.typekitFont")&&(a("Adding Typekit font"),u.innerHTML=(0,i.get)("config.style.typekitFont"))})};var r=s(n(4)),o=s(n(1)),i=n(0);function s(e){return e&&e.__esModule?e:{default:e}}var a=(0,r.default)("style").log,l=document.createElement("div"),u=document.createElement("div"),c=document.createElement("div"),f={};function d(e,t,n){var r=t.match(/\.(.+)$/);if(r&&r[1]){var o=r[1],i=f[e]||document.createElement("style");i.dataset.cbFontLoader=e,i.innerHTML='@font-face { font-family: "'+n+'"; src: url("'+t+'") format("'+o+'"); }',i.parentNode||c.appendChild(i)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autopx=function(e){if("number"==typeof e)return e+"px";return e},t.parseColorValue=a,t.parseColor=function(e){if("string"!=typeof e)throw new Error("Only strings can be parsed as colors.");var t={color:"inherit","background-color":"inherit"},n=e.split(/ on /i);t.color=a(n[0].trim().toLowerCase()),2===n.length&&(t["background-color"]=a(n[1].trim().toLowerCase()));return t},t.parseFont=function(e){var t={"font-family":"inherit","font-size":"inherit","font-style":"inherit","font-weight":"inherit","letter-spacing":"inherit","text-decoration":"inherit","text-transform":"inherit"};function n(e,t){e["font-family"]=t.split("/").map(function(e){var t=e;return'"'!==t[0]&&(t='"'+t),'"'!==t[t.length-1]&&(t+='"'),t}).join(",")}function r(e){e["font-weight"]="bold"}function o(e){e["font-style"]="italic"}function i(e){e["font-style"]="none",e["font-weight"]="normal",e["letter-spacing"]="normal",e["text-decoration"]="none",e["text-transform"]="none"}function s(e){e["letter-spacing"]="0.075em",e["text-transform"]="uppercase",e["font-size"]&&"inherit"!==e["font-size"]?e["font-size"]="calc(0.7 * "+e["font-size"]+")":e["font-size"]="70%"}function a(e){e["text-decoration"]="underline"}var l=/\b\d+(ch|cm|ex|in|mm|pc|pt|px|r?em|vh|vmax|vmin|vw|%)?/i.exec(e);if(l){/^\d+$/.test(l[0])?t["font-size"]=l[0]+"px":t["font-size"]=l[0],0!==l.index&&n(t,e.substr(0,l.index).trim());var u=e.substr(l.index);/\bregular\b/i.test(u)?(t["font-style"]="none",t["font-weight"]="normal",t["letter-spacing"]="normal",t["text-decoration"]="none",t["text-transform"]="none"):(/\bbold\b/.test(u)&&r(t),/\bitalics?\b/.test(u)&&o(t),/\bunderlined?/.test(u)&&a(t),/\bsmall caps?\b/.test(u)&&s(t))}else{for(var c=void 0,f=e;c=/(bold|italics?|regular|small caps|underlined?)$/.exec(f);){switch(c[0]){case"bold":r(t);break;case"italic":case"italics":o(t);break;case"regular":i(t);break;case"small caps":s(t);break;case"underline":case"underlined":a(t)}f=f.substr(0,c.index).trim()}""!==f.trim()&&n(t,f)}return t};var r=s(n(119)),o=s(n(120)),i=s(n(125));function s(e){return e&&e.__esModule?e:{default:e}}function a(e){if("string"!=typeof e)throw new Error("Only strings can be parsed as color values.");r.default[e]&&(e=Array.isArray(r.default[e])?r.default[e][r.default[e].length-1]:r.default[e]);var t=/^(\w+)-(\d)$/.exec(e);t&&r.default[t[1]]&&(e=r.default[t[1]][t[2]]);var n=(0,o.default)(e),s=(0,i.default)(n);return s[3]=void 0!==n[3]?n[3]:1,"hsla("+s[0]+", "+s[1]+"%, "+s[2]+"%, "+s[3]+")"}},function(e){e.exports={white:"#ffffff",black:"#000000",gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}},function(e,t,n){var r=n(121),o=n(122),i=n(123),s=n(124);var a={"#":o,hsl:function(e){var t=r(e),n=s(t);return 4===t.length&&n.push(t[3]),n},rgb:i};function l(e){for(var t in a)if(0===e.indexOf(t))return a[t](e)}l.rgb=i,l.hsl=r,l.hex=o,e.exports=l},function(e,t,n){var r=n(26),o=n(27);function i(e,t){switch(e=parseFloat(e),t){case 0:return o(e,0,360);case 1:case 2:return o(e,0,100);case 3:return o(e,0,1)}}e.exports=function(e){return r(e).map(i)}},function(e,t){e.exports=function(e){4!==e.length&&5!==e.length||(e=function(e){for(var t="#",n=1;n<e.length;n++){var r=e.charAt(n);t+=r+r}return t}(e));var t=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];if(9===e.length){var n=parseFloat((parseInt(e.substring(7,9),16)/255).toFixed(2));t.push(n)}return t}},function(e,t,n){var r=n(26),o=n(27);function i(e,t){return t<3?-1!=e.indexOf("%")?Math.round(255*o(parseInt(e,10),0,100)/100):o(parseInt(e,10),0,255):o(parseFloat(e),0,1)}e.exports=function(e){return r(e).map(i)}},function(e,t){e.exports=function(e){var t,n,r,o,i,s=e[0]/360,a=e[1]/100,l=e[2]/100;if(0==a)return[i=255*l,i,i];t=2*l-(n=l<.5?l*(1+a):l+a-l*a),o=[0,0,0];for(var u=0;u<3;u++)(r=s+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[u]=255*i;return o}},function(e,t){e.exports=function(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,s=Math.min(r,o,i),a=Math.max(r,o,i),l=a-s;return a==s?t=0:r==a?t=(o-i)/l:o==a?t=2+(i-r)/l:i==a&&(t=4+(r-o)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(s+a)/2,[t,100*(a==s?0:n<=.5?l/(a+s):l/(2-a-s)),100*n]}},function(e,t,n){}]);</script></body></html>