-
Notifications
You must be signed in to change notification settings - Fork 0
/
RealmDungeon_2.html
726 lines (684 loc) · 600 KB
/
RealmDungeon_2.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
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
<!DOCTYPE html>
<html data-init="no-js">
<head>
<meta charset="UTF-8" />
<title>2155 Actual</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<!--
SugarCube (v2.36.1): A free (gratis and libre) story format.
Copyright © 2013–2021 Thomas Michael Edwards <[email protected]>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<script id="script-libraries" type="text/javascript">
if(document.head&&document.addEventListener&&document.querySelector&&Object.create&&Object.freeze&&JSON){document.documentElement.setAttribute("data-init", "loading");
/*! @source http://purl.eligrey.com/github/classList.js/blob/1.2.20171210/classList.js */
"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},c=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new c("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new c("INVALID_CHARACTER_ERR","The token must not contain space characters.");return o.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,s=n.length;s>i;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=l[n]=[],h=function(){return new l(this)};if(c[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return~a(this,t+"")},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do t=e[n]+"",~a(this,t)||(this.push(t),s=!0);while(++n<i);s&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do for(t=n[i]+"",e=a(this,t);~e;)this.splice(e,1),r=!0,e=a(this,t);while(++i<s);r&&this._updateClassName()},u.toggle=function(t,e){var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},u.replace=function(t,e){var n=a(t+"");~n&&(this.splice(n,1,e),this._updateClassName())},u.toString=function(){return this.join(" ")},s.defineProperty){var f={get:h,enumerable:!0,configurable:!0};try{s.defineProperty(i,e,f)}catch(p){void 0!==p.number&&-2146823252!==p.number||(f.enumerable=!1,s.defineProperty(i,e,f))}}else s[n].__defineGetter__&&i.__defineGetter__(e,h)}}(self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;i>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),i=n.indexOf(t+"");~i&&(n=n.slice(i),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}());
/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2020 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/v4.5.14/LICENSE
*/
(function(t,r){"use strict";if(typeof define==="function"&&define.amd){define(r)}else if(typeof exports==="object"){module.exports=r()}else{t.returnExports=r()}})(this,function(){var t=Array;var r=t.prototype;var e=Object;var n=e.prototype;var i=Function;var a=i.prototype;var o=String;var f=o.prototype;var u=Number;var l=u.prototype;var s=r.slice;var c=r.splice;var v=r.push;var h=r.unshift;var p=r.concat;var y=r.join;var d=a.call;var g=a.apply;var w=Math.max;var b=Math.min;var T=n.toString;var m=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var D;var S=Function.prototype.toString,x=/^\s*class /,O=function isES6ClassFn(t){try{var r=S.call(t);var e=r.replace(/\/\/.*\n/g,"");var n=e.replace(/\/\*[.\s\S]*\*\//g,"");var i=n.replace(/\n/gm," ").replace(/ {2}/g," ");return x.test(i)}catch(a){return false}},E=function tryFunctionObject(t){try{if(O(t)){return false}S.call(t);return true}catch(r){return false}},j="[object Function]",I="[object GeneratorFunction]",D=function isCallable(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(m){return E(t)}if(O(t)){return false}var r=T.call(t);return r===j||r===I};var M;var U=RegExp.prototype.exec,$=function tryRegexExec(t){try{U.call(t);return true}catch(r){return false}},F="[object RegExp]";M=function isRegex(t){if(typeof t!=="object"){return false}return m?$(t):T.call(t)===F};var N;var C=String.prototype.valueOf,k=function tryStringObject(t){try{C.call(t);return true}catch(r){return false}},A="[object String]";N=function isString(t){if(typeof t==="string"){return true}if(typeof t!=="object"){return false}return m?k(t):T.call(t)===A};var R=e.defineProperty&&function(){try{var t={};e.defineProperty(t,"x",{enumerable:false,value:t});for(var r in t){return false}return t.x===t}catch(n){return false}}();var P=function(t){var r;if(R){r=function(t,r,n,i){if(!i&&r in t){return}e.defineProperty(t,r,{configurable:true,enumerable:false,writable:true,value:n})}}else{r=function(t,r,e,n){if(!n&&r in t){return}t[r]=e}}return function defineProperties(e,n,i){for(var a in n){if(t.call(n,a)){r(e,a,n[a],i)}}}}(n.hasOwnProperty);var J=function isPrimitive(t){var r=typeof t;return t===null||r!=="object"&&r!=="function"};var Y=u.isNaN||function isActualNaN(t){return t!==t};var z={ToInteger:function ToInteger(t){var r=+t;if(Y(r)){r=0}else if(r!==0&&r!==1/0&&r!==-(1/0)){r=(r>0||-1)*Math.floor(Math.abs(r))}return r},ToPrimitive:function ToPrimitive(t){var r,e,n;if(J(t)){return t}e=t.valueOf;if(D(e)){r=e.call(t);if(J(r)){return r}}n=t.toString;if(D(n)){r=n.call(t);if(J(r)){return r}}throw new TypeError},ToObject:function(t){if(t==null){throw new TypeError("can't convert "+t+" to object")}return e(t)},ToUint32:function ToUint32(t){return t>>>0}};var Z=function Empty(){};P(a,{bind:function bind(t){var r=this;if(!D(r)){throw new TypeError("Function.prototype.bind called on incompatible "+r)}var n=s.call(arguments,1);var a;var o=function(){if(this instanceof a){var i=g.call(r,this,p.call(n,s.call(arguments)));if(e(i)===i){return i}return this}else{return g.call(r,t,p.call(n,s.call(arguments)))}};var f=w(0,r.length-n.length);var u=[];for(var l=0;l<f;l++){v.call(u,"$"+l)}a=i("binder","return function ("+y.call(u,",")+"){ return binder.apply(this, arguments); }")(o);if(r.prototype){Z.prototype=r.prototype;a.prototype=new Z;Z.prototype=null}return a}});var G=d.bind(n.hasOwnProperty);var H=d.bind(n.toString);var W=d.bind(s);var B=g.bind(s);if(typeof document==="object"&&document&&document.documentElement){try{W(document.documentElement.childNodes)}catch(X){var L=W;var q=B;W=function arraySliceIE(t){var r=[];var e=t.length;while(e-- >0){r[e]=t[e]}return q(r,L(arguments,1))};B=function arraySliceApplyIE(t,r){return q(W(t),r)}}}var K=d.bind(f.slice);var Q=d.bind(f.split);var V=d.bind(f.indexOf);var _=d.bind(v);var tt=d.bind(n.propertyIsEnumerable);var rt=d.bind(r.sort);var et=t.isArray||function isArray(t){return H(t)==="[object Array]"};var nt=[].unshift(0)!==1;P(r,{unshift:function(){h.apply(this,arguments);return this.length}},nt);P(t,{isArray:et});var it=e("a");var at=it[0]!=="a"||!(0 in it);var ot=function properlyBoxed(t){var r=true;var e=true;var n=false;if(t){try{t.call("foo",function(t,e,n){if(typeof n!=="object"){r=false}});t.call([1],function(){"use strict";e=typeof this==="string"},"x")}catch(i){n=true}}return!!t&&!n&&r&&e};P(r,{forEach:function forEach(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=-1;var i=z.ToUint32(e.length);var a;if(arguments.length>1){a=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++n<i){if(n in e){if(typeof a==="undefined"){t(e[n],n,r)}else{t.call(a,e[n],n,r)}}}}},!ot(r.forEach));P(r,{map:function map(r){var e=z.ToObject(this);var n=at&&N(this)?Q(this,""):e;var i=z.ToUint32(n.length);var a=t(i);var o;if(arguments.length>1){o=arguments[1]}if(!D(r)){throw new TypeError("Array.prototype.map callback must be a function")}for(var f=0;f<i;f++){if(f in n){if(typeof o==="undefined"){a[f]=r(n[f],f,e)}else{a[f]=r.call(o,n[f],f,e)}}}return a}},!ot(r.map));P(r,{filter:function filter(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);var i=[];var a;var o;if(arguments.length>1){o=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var f=0;f<n;f++){if(f in e){a=e[f];if(typeof o==="undefined"?t(a,f,r):t.call(o,a,f,r)){_(i,a)}}}return i}},!ot(r.filter));P(r,{every:function every(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.every callback must be a function")}for(var a=0;a<n;a++){if(a in e&&!(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return false}}return true}},!ot(r.every));P(r,{some:function some(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.some callback must be a function")}for(var a=0;a<n;a++){if(a in e&&(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return true}}return false}},!ot(r.some));var ft=false;if(r.reduce){ft=typeof r.reduce.call("es5",function(t,r,e,n){return n})==="object"}P(r,{reduce:function reduce(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in e){a=e[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in e){a=t(a,e[i],i,r)}}return a}},!ft);var ut=false;if(r.reduceRight){ut=typeof r.reduceRight.call("es5",function(t,r,e,n){return n})==="object"}P(r,{reduceRight:function reduceRight(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i;var a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in e){i=e[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in e){i=t(i,e[a],a,r)}}while(a--);return i}},!ut);var lt=r.indexOf&&[0,1].indexOf(1,2)!==-1;P(r,{indexOf:function indexOf(t){var r=at&&N(this)?Q(this,""):z.ToObject(this);var e=z.ToUint32(r.length);if(e===0){return-1}var n=0;if(arguments.length>1){n=z.ToInteger(arguments[1])}n=n>=0?n:w(0,e+n);for(;n<e;n++){if(n in r&&r[n]===t){return n}}return-1}},lt);var st=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;P(r,{lastIndexOf:function lastIndexOf(t){var r=at&&N(this)?Q(this,""):z.ToObject(this);var e=z.ToUint32(r.length);if(e===0){return-1}var n=e-1;if(arguments.length>1){n=b(n,z.ToInteger(arguments[1]))}n=n>=0?n:e-Math.abs(n);for(;n>=0;n--){if(n in r&&t===r[n]){return n}}return-1}},st);var ct=function(){var t=[1,2];var r=t.splice();return t.length===2&&et(r)&&r.length===0}();P(r,{splice:function splice(t,r){if(arguments.length===0){return[]}else{return c.apply(this,arguments)}}},!ct);var vt=function(){var t={};r.splice.call(t,0,0,1);return t.length===1}();P(r,{splice:function splice(t,r){if(arguments.length===0){return[]}var e=arguments;this.length=w(z.ToInteger(this.length),0);if(arguments.length>0&&typeof r!=="number"){e=W(arguments);if(e.length<2){_(e,this.length-t)}else{e[1]=z.ToInteger(r)}}return c.apply(this,e)}},!vt);var ht=function(){var r=new t(1e5);r[8]="x";r.splice(1,1);return r.indexOf("x")===7}();var pt=function(){var t=256;var r=[];r[t]="a";r.splice(t+1,0,"b");return r[t]==="a"}();P(r,{splice:function splice(t,r){var e=z.ToObject(this);var n=[];var i=z.ToUint32(e.length);var a=z.ToInteger(t);var f=a<0?w(i+a,0):b(a,i);var u=arguments.length===0?0:arguments.length===1?i-f:b(w(z.ToInteger(r),0),i-f);var l=0;var s;while(l<u){s=o(f+l);if(G(e,s)){n[l]=e[s]}l+=1}var c=W(arguments,2);var v=c.length;var h;if(v<u){l=f;var p=i-u;while(l<p){s=o(l+u);h=o(l+v);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l+=1}l=i;var y=i-u+v;while(l>y){delete e[l-1];l-=1}}else if(v>u){l=i-u;while(l>f){s=o(l+u-1);h=o(l+v-1);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l-=1}}l=f;for(var d=0;d<c.length;++d){e[l]=c[d];l+=1}e.length=i-u+v;return n}},!ht||!pt);var yt=r.join;var dt;try{dt=Array.prototype.join.call("123",",")!=="1,2,3"}catch(X){dt=true}if(dt){P(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return yt.call(N(this)?Q(this,""):this,r)}},dt)}var gt=[1,2].join(undefined)!=="1,2";if(gt){P(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return yt.call(this,r)}},gt)}var wt=function push(t){var r=z.ToObject(this);var e=z.ToUint32(r.length);var n=0;while(n<arguments.length){r[e+n]=arguments[n];n+=1}r.length=e+n;return e+n};var bt=function(){var t={};var r=Array.prototype.push.call(t,undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();P(r,{push:function push(t){if(et(this)){return v.apply(this,arguments)}return wt.apply(this,arguments)}},bt);var Tt=function(){var t=[];var r=t.push(undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();P(r,{push:wt},Tt);P(r,{slice:function(t,r){var e=N(this)?Q(this,""):this;return B(e,arguments)}},at);var mt=function(){try{[1,2].sort(null)}catch(t){try{[1,2].sort({})}catch(r){return false}}return true}();var Dt=function(){try{[1,2].sort(/a/);return false}catch(t){}return true}();var St=function(){try{[1,2].sort(undefined);return true}catch(t){}return false}();P(r,{sort:function sort(t){if(typeof t==="undefined"){return rt(this)}if(!D(t)){throw new TypeError("Array.prototype.sort callback must be a function")}return rt(this,t)}},mt||!St||!Dt);var xt=!tt({toString:null},"toString");var Ot=tt(function(){},"prototype");var Et=!G("x","0");var jt=function(t){var r=t.constructor;return r&&r.prototype===t};var It={$applicationCache:true,$console:true,$external:true,$frame:true,$frameElement:true,$frames:true,$innerHeight:true,$innerWidth:true,$onmozfullscreenchange:true,$onmozfullscreenerror:true,$outerHeight:true,$outerWidth:true,$pageXOffset:true,$pageYOffset:true,$parent:true,$scrollLeft:true,$scrollTop:true,$scrollX:true,$scrollY:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true,$width:true,$height:true,$top:true,$localStorage:true};var Mt=function(){if(typeof window==="undefined"){return false}for(var t in window){try{if(!It["$"+t]&&G(window,t)&&window[t]!==null&&typeof window[t]==="object"){jt(window[t])}}catch(r){return true}}return false}();var Ut=function(t){if(typeof window==="undefined"||!Mt){return jt(t)}try{return jt(t)}catch(r){return false}};var $t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var Ft=$t.length;var Nt=function isArguments(t){return H(t)==="[object Arguments]"};var Ct=function isArguments(t){return t!==null&&typeof t==="object"&&typeof t.length==="number"&&t.length>=0&&!et(t)&&D(t.callee)};var kt=Nt(arguments)?Nt:Ct;P(e,{keys:function keys(t){var r=D(t);var e=kt(t);var n=t!==null&&typeof t==="object";var i=n&&N(t);if(!n&&!r&&!e){throw new TypeError("Object.keys called on a non-object")}var a=[];var f=Ot&&r;if(i&&Et||e){for(var u=0;u<t.length;++u){_(a,o(u))}}if(!e){for(var l in t){if(!(f&&l==="prototype")&&G(t,l)){_(a,o(l))}}}if(xt){var s=Ut(t);for(var c=0;c<Ft;c++){var v=$t[c];if(!(s&&v==="constructor")&&G(t,v)){_(a,v)}}}return a}});var At=e.keys&&function(){return e.keys(arguments).length===2}(1,2);var Rt=e.keys&&function(){var t=e.keys(arguments);return arguments.length!==1||t.length!==1||t[0]!==1}(1);var Pt=e.keys;P(e,{keys:function keys(t){if(kt(t)){return Pt(W(t))}else{return Pt(t)}}},!At||Rt);var Jt=new Date(-0xc782b5b342b24).getUTCMonth()!==0;var Yt=new Date(-0x55d318d56a724);var zt=new Date(14496624e5);var Zt=Yt.toUTCString()!=="Mon, 01 Jan -45875 11:59:59 GMT";var Gt;var Ht;var Wt=Yt.getTimezoneOffset();if(Wt<-720){Gt=Yt.toDateString()!=="Tue Jan 02 -45875";Ht=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(zt))}else{Gt=Yt.toDateString()!=="Mon Jan 01 -45875";Ht=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(zt))}var Bt=d.bind(Date.prototype.getFullYear);var Xt=d.bind(Date.prototype.getMonth);var Lt=d.bind(Date.prototype.getDate);var qt=d.bind(Date.prototype.getUTCFullYear);var Kt=d.bind(Date.prototype.getUTCMonth);var Qt=d.bind(Date.prototype.getUTCDate);var Vt=d.bind(Date.prototype.getUTCDay);var _t=d.bind(Date.prototype.getUTCHours);var tr=d.bind(Date.prototype.getUTCMinutes);var rr=d.bind(Date.prototype.getUTCSeconds);var er=d.bind(Date.prototype.getUTCMilliseconds);var nr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var ir=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var ar=function daysInMonth(t,r){return Lt(new Date(r,t,0))};P(Date.prototype,{getFullYear:function getFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);if(t<0&&Xt(this)>11){return t+1}return t},getMonth:function getMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Xt(this);if(t<0&&r>11){return 0}return r},getDate:function getDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Xt(this);var e=Lt(this);if(t<0&&r>11){if(r===12){return e}var n=ar(0,t+1);return n-e+1}return e},getUTCFullYear:function getUTCFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=qt(this);if(t<0&&Kt(this)>11){return t+1}return t},getUTCMonth:function getUTCMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=qt(this);var r=Kt(this);if(t<0&&r>11){return 0}return r},getUTCDate:function getUTCDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=qt(this);var r=Kt(this);var e=Qt(this);if(t<0&&r>11){if(r===12){return e}var n=ar(0,t+1);return n-e+1}return e}},Jt);P(Date.prototype,{toUTCString:function toUTCString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Vt(this);var r=Qt(this);var e=Kt(this);var n=qt(this);var i=_t(this);var a=tr(this);var o=rr(this);return nr[t]+", "+(r<10?"0"+r:r)+" "+ir[e]+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"}},Jt||Zt);P(Date.prototype,{toDateString:function toDateString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();return nr[t]+" "+ir[e]+" "+(r<10?"0"+r:r)+" "+n}},Jt||Gt);if(Jt||Ht){Date.prototype.toString=function toString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();var i=this.getHours();var a=this.getMinutes();var o=this.getSeconds();var f=this.getTimezoneOffset();var u=Math.floor(Math.abs(f)/60);var l=Math.floor(Math.abs(f)%60);return nr[t]+" "+ir[e]+" "+(r<10?"0"+r:r)+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"+(f>0?"-":"+")+(u<10?"0"+u:u)+(l<10?"0"+l:l)};if(R){e.defineProperty(Date.prototype,"toString",{configurable:true,enumerable:false,writable:true})}}var or=-621987552e5;var fr="-000001";var ur=Date.prototype.toISOString&&new Date(or).toISOString().indexOf(fr)===-1;var lr=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";var sr=d.bind(Date.prototype.getTime);P(Date.prototype,{toISOString:function toISOString(){if(!isFinite(this)||!isFinite(sr(this))){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}var t=qt(this);var r=Kt(this);t+=Math.floor(r/12);r=(r%12+12)%12;var e=[r+1,Qt(this),_t(this),tr(this),rr(this)];t=(t<0?"-":t>9999?"+":"")+K("00000"+Math.abs(t),0<=t&&t<=9999?-4:-6);for(var n=0;n<e.length;++n){e[n]=K("00"+e[n],-2)}return t+"-"+W(e,0,2).join("-")+"T"+W(e,2).join(":")+"."+K("000"+er(this),-3)+"Z"}},ur||lr);var cr=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(or).toJSON().indexOf(fr)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(t){return false}}();if(!cr){Date.prototype.toJSON=function toJSON(t){var r=e(this);var n=z.ToPrimitive(r);if(typeof n==="number"&&!isFinite(n)){return null}var i=r.toISOString;if(!D(i)){throw new TypeError("toISOString property is not callable")}return i.call(r)}}var vr=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var hr=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var pr=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(pr||hr||!vr){var yr=Math.pow(2,31)-1;var dr=Y(new Date(1970,0,1,0,0,0,yr+1).getTime());Date=function(t){var r=function Date(e,n,i,a,f,u,l){var s=arguments.length;var c;if(this instanceof t){var v=u;var h=l;if(dr&&s>=7&&l>yr){var p=Math.floor(l/yr)*yr;var y=Math.floor(p/1e3);v+=y;h-=y*1e3}c=s===1&&o(e)===e?new t(r.parse(e)):s>=7?new t(e,n,i,a,f,v,h):s>=6?new t(e,n,i,a,f,v):s>=5?new t(e,n,i,a,f):s>=4?new t(e,n,i,a):s>=3?new t(e,n,i):s>=2?new t(e,n):s>=1?new t(e instanceof t?+e:e):new t}else{c=t.apply(this,arguments)}if(!J(c)){P(c,{constructor:r},true)}return c};var e=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];var i=function dayFromMonth(t,r){var e=r>1?1:0;return n[r]+Math.floor((t-1969+e)/4)-Math.floor((t-1901+e)/100)+Math.floor((t-1601+e)/400)+365*(t-1970)};var a=function toUTC(r){var e=0;var n=r;if(dr&&n>yr){var i=Math.floor(n/yr)*yr;var a=Math.floor(i/1e3);e+=a;n-=a*1e3}return u(new t(1970,0,1,0,0,e,n))};for(var f in t){if(G(t,f)){r[f]=t[f]}}P(r,{now:t.now,UTC:t.UTC},true);r.prototype=t.prototype;P(r.prototype,{constructor:r},true);var l=function parse(r){var n=e.exec(r);if(n){var o=u(n[1]),f=u(n[2]||1)-1,l=u(n[3]||1)-1,s=u(n[4]||0),c=u(n[5]||0),v=u(n[6]||0),h=Math.floor(u(n[7]||0)*1e3),p=Boolean(n[4]&&!n[8]),y=n[9]==="-"?1:-1,d=u(n[10]||0),g=u(n[11]||0),w;var b=c>0||v>0||h>0;if(s<(b?24:25)&&c<60&&v<60&&h<1e3&&f>-1&&f<12&&d<24&&g<60&&l>-1&&l<i(o,f+1)-i(o,f)){w=((i(o,f)+l)*24+s+d*y)*60;w=((w+c+g*y)*60+v)*1e3+h;if(p){w=a(w)}if(-864e13<=w&&w<=864e13){return w}}return NaN}return t.parse.apply(this,arguments)};P(r,{parse:l});return r}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}var gr=l.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||(1000000000000000128).toFixed(0)!=="1000000000000000128");var wr={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function multiply(t,r){var e=-1;var n=r;while(++e<wr.size){n+=t*wr.data[e];wr.data[e]=n%wr.base;n=Math.floor(n/wr.base)}},divide:function divide(t){var r=wr.size;var e=0;while(--r>=0){e+=wr.data[r];wr.data[r]=Math.floor(e/t);e=e%t*wr.base}},numToString:function numToString(){var t=wr.size;var r="";while(--t>=0){if(r!==""||t===0||wr.data[t]!==0){var e=o(wr.data[t]);if(r===""){r=e}else{r+=K("0000000",0,7-e.length)+e}}}return r},pow:function pow(t,r,e){return r===0?e:r%2===1?pow(t,r-1,e*t):pow(t*t,r/2,e)},log:function log(t){var r=0;var e=t;while(e>=4096){r+=12;e/=4096}while(e>=2){r+=1;e/=2}return r}};var br=function toFixed(t){var r,e,n,i,a,f,l,s;r=u(t);r=Y(r)?0:Math.floor(r);if(r<0||r>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}e=u(this);if(Y(e)){return"NaN"}if(e<=-1e21||e>=1e21){return o(e)}n="";if(e<0){n="-";e=-e}i="0";if(e>1e-21){a=wr.log(e*wr.pow(2,69,1))-69;f=a<0?e*wr.pow(2,-a,1):e/wr.pow(2,a,1);f*=4503599627370496;a=52-a;if(a>0){wr.multiply(0,f);l=r;while(l>=7){wr.multiply(1e7,0);l-=7}wr.multiply(wr.pow(10,l,1),0);l=a-1;while(l>=23){wr.divide(1<<23);l-=23}wr.divide(1<<l);wr.multiply(1,1);wr.divide(2);i=wr.numToString()}else{wr.multiply(0,f);wr.multiply(1<<-a,0);i=wr.numToString()+K("0.00000000000000000000",2,2+r)}}if(r>0){s=i.length;if(s<=r){i=n+K("0.0000000000000000000",0,r-s+2)+i}else{i=n+K(i,0,s-r)+"."+K(i,s-r)}}else{i=n+i}return i};P(l,{toFixed:br},gr);var Tr=function(){try{return 1..toPrecision(undefined)==="1"}catch(t){return true}}();var mr=l.toPrecision;P(l,{toPrecision:function toPrecision(t){return typeof t==="undefined"?mr.call(this):mr.call(this,t)}},Tr);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var t=typeof/()??/.exec("")[1]==="undefined";var r=Math.pow(2,32)-1;f.split=function(e,n){var i=String(this);if(typeof e==="undefined"&&n===0){return[]}if(!M(e)){return Q(this,e,n)}var a=[];var o=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,u,l,s,c;var h=new RegExp(e.source,o+"g");if(!t){u=new RegExp("^"+h.source+"$(?!\\s)",o)}var p=typeof n==="undefined"?r:z.ToUint32(n);l=h.exec(i);while(l){s=l.index+l[0].length;if(s>f){_(a,K(i,f,l.index));if(!t&&l.length>1){l[0].replace(u,function(){for(var t=1;t<arguments.length-2;t++){if(typeof arguments[t]==="undefined"){l[t]=void 0}}})}if(l.length>1&&l.index<i.length){v.apply(a,W(l,1))}c=l[0].length;f=s;if(a.length>=p){break}}if(h.lastIndex===l.index){h.lastIndex++}l=h.exec(i)}if(f===i.length){if(c||!h.test("")){_(a,"")}}else{_(a,K(i,f))}return a.length>p?W(a,0,p):a}})()}else if("0".split(void 0,0).length){f.split=function split(t,r){if(typeof t==="undefined"&&r===0){return[]}return Q(this,t,r)}}var Dr=f.replace;var Sr=function(){var t=[];"x".replace(/x(.)?/g,function(r,e){_(t,e)});return t.length===1&&typeof t[0]==="undefined"}();if(!Sr){f.replace=function replace(t,r){var e=D(r);var n=M(t)&&/\)[*?]/.test(t.source);if(!e||!n){return Dr.call(this,t,r)}else{var i=function(e){var n=arguments.length;var i=t.lastIndex;t.lastIndex=0;var a=t.exec(e)||[];t.lastIndex=i;_(a,arguments[n-2],arguments[n-1]);return r.apply(this,a)};return Dr.call(this,t,i)}}}var xr=f.substr;var Or="".substr&&"0b".substr(-1)!=="b";P(f,{substr:function substr(t,r){var e=t;if(t<0){e=w(this.length+t,0)}return xr.call(this,e,r)}},Or);var Er="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var jr="\u200b";var Ir="["+Er+"]";var Mr=new RegExp("^"+Ir+Ir+"*");var Ur=new RegExp(Ir+Ir+"*$");var $r=f.trim&&(Er.trim()||!jr.trim());P(f,{trim:function trim(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return o(this).replace(Mr,"").replace(Ur,"")}},$r);var Fr=d.bind(String.prototype.trim);var Nr=f.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;P(f,{lastIndexOf:function lastIndexOf(t){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var r=o(this);var e=o(t);var n=arguments.length>1?u(arguments[1]):NaN;var i=Y(n)?Infinity:z.ToInteger(n);var a=b(w(i,0),r.length);var f=e.length;var l=a+f;while(l>0){l=w(0,l-f);var s=V(K(r,l,a+f),e);if(s!==-1){return l+s}}return-1}},Nr);var Cr=f.lastIndexOf;P(f,{lastIndexOf:function lastIndexOf(t){return Cr.apply(this,arguments)}},f.lastIndexOf.length!==1);if(parseInt(Er+"08")!==8||parseInt(Er+"0x16")!==22){parseInt=function(t){var r=/^[-+]?0[xX]/;return function parseInt(e,n){if(typeof e==="symbol"){""+e}var i=Fr(String(e));var a=u(n)||(r.test(i)?16:10);return t(i,a)}}(parseInt)}if(1/parseFloat("-0")!==-Infinity){parseFloat=function(t){return function parseFloat(r){var e=Fr(String(r));var n=t(e);return n===0&&K(e,0,1)==="-"?-0:n}}(parseFloat)}if(String(new RangeError("test"))!=="RangeError: test"){var kr=function toString(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var t=this.name;if(typeof t==="undefined"){t="Error"}else if(typeof t!=="string"){t=o(t)}var r=this.message;if(typeof r==="undefined"){r=""}else if(typeof r!=="string"){r=o(r)}if(!t){return r}if(!r){return t}return t+": "+r};Error.prototype.toString=kr}if(R){var Ar=function(t,r){if(tt(t,r)){var e=Object.getOwnPropertyDescriptor(t,r);if(e.configurable){e.enumerable=false;Object.defineProperty(t,r,e)}}};Ar(Error.prototype,"message");if(Error.prototype.message!==""){Error.prototype.message=""}Ar(Error.prototype,"name")}if(String(/a/gim)!=="/a/gim"){var Rr=function toString(){var t="/"+this.source+"/";if(this.global){t+="g"}if(this.ignoreCase){t+="i"}if(this.multiline){t+="m"}return t};RegExp.prototype.toString=Rr}});
/*!
* https://github.com/paulmillr/es6-shim
* @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
* and contributors, MIT License
* es6-shim: v0.35.4
* see https://github.com/paulmillr/es6-shim/blob/0.35.4/LICENSE
* Details and documentation:
* https://github.com/paulmillr/es6-shim/
*/
(function(e,t){if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){"use strict";var e=Function.call.bind(Function.apply);var t=Function.call.bind(Function.call);var r=Array.isArray;var n=Object.keys;var o=function notThunker(t){return function notThunk(){return!e(t,this,arguments)}};var i=function(e){try{e();return false}catch(t){return true}};var a=function valueOrFalseIfThrows(e){try{return e()}catch(t){return false}};var u=o(i);var f=function(){return!i(function(){return Object.defineProperty({},"x",{get:function(){}})})};var s=!!Object.defineProperty&&f();var c=function foo(){}.name==="foo";var l=Function.call.bind(Array.prototype.forEach);var p=Function.call.bind(Array.prototype.reduce);var v=Function.call.bind(Array.prototype.filter);var y=Function.call.bind(Array.prototype.some);var h=function(e,t,r,n){if(!n&&t in e){return}if(s){Object.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:r})}else{e[t]=r}};var b=function(e,t,r){l(n(t),function(n){var o=t[n];h(e,n,o,!!r)})};var g=Function.call.bind(Object.prototype.toString);var d=typeof/abc/==="function"?function IsCallableSlow(e){return typeof e==="function"&&g(e)==="[object Function]"}:function IsCallableFast(e){return typeof e==="function"};var m={getter:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}Object.defineProperty(e,t,{configurable:true,enumerable:false,get:r})},proxy:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,{configurable:n.configurable,enumerable:n.enumerable,get:function getKey(){return e[t]},set:function setKey(r){e[t]=r}})},redefine:function(e,t,r){if(s){var n=Object.getOwnPropertyDescriptor(e,t);n.value=r;Object.defineProperty(e,t,n)}else{e[t]=r}},defineByDescriptor:function(e,t,r){if(s){Object.defineProperty(e,t,r)}else if("value"in r){e[t]=r.value}},preserveToString:function(e,t){if(t&&d(t.toString)){h(e,"toString",t.toString.bind(t),true)}}};var O=Object.create||function(e,t){var r=function Prototype(){};r.prototype=e;var o=new r;if(typeof t!=="undefined"){n(t).forEach(function(e){m.defineByDescriptor(o,e,t[e])})}return o};var w=function(e,t){if(!Object.setPrototypeOf){return false}return a(function(){var r=function Subclass(t){var r=new e(t);Object.setPrototypeOf(r,Subclass.prototype);return r};Object.setPrototypeOf(r,e);r.prototype=O(e.prototype,{constructor:{value:r}});return t(r)})};var j=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var S=j();var T=S.isFinite;var I=Function.call.bind(String.prototype.indexOf);var E=Function.apply.bind(Array.prototype.indexOf);var P=Function.call.bind(Array.prototype.concat);var C=Function.call.bind(String.prototype.slice);var M=Function.call.bind(Array.prototype.push);var x=Function.apply.bind(Array.prototype.push);var N=Function.call.bind(Array.prototype.shift);var A=Math.max;var R=Math.min;var _=Math.floor;var k=Math.abs;var L=Math.exp;var F=Math.log;var D=Math.sqrt;var z=Function.call.bind(Object.prototype.hasOwnProperty);var q;var W=function(){};var G=S.Map;var H=G&&G.prototype["delete"];var V=G&&G.prototype.get;var B=G&&G.prototype.has;var U=G&&G.prototype.set;var $=S.Symbol||{};var J=$.species||"@@species";var X=Number.isNaN||function isNaN(e){return e!==e};var K=Number.isFinite||function isFinite(e){return typeof e==="number"&&T(e)};var Z=d(Math.sign)?Math.sign:function sign(e){var t=Number(e);if(t===0){return t}if(X(t)){return t}return t<0?-1:1};var Y=function log1p(e){var t=Number(e);if(t<-1||X(t)){return NaN}if(t===0||t===Infinity){return t}if(t===-1){return-Infinity}return 1+t-1===0?t:t*(F(1+t)/(1+t-1))};var Q=function isArguments(e){return g(e)==="[object Arguments]"};var ee=function isArguments(e){return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&g(e)!=="[object Array]"&&g(e.callee)==="[object Function]"};var te=Q(arguments)?Q:ee;var re={primitive:function(e){return e===null||typeof e!=="function"&&typeof e!=="object"},string:function(e){return g(e)==="[object String]"},regex:function(e){return g(e)==="[object RegExp]"},symbol:function(e){return typeof S.Symbol==="function"&&typeof e==="symbol"}};var ne=function overrideNative(e,t,r){var n=e[t];h(e,t,r,true);m.preserveToString(e[t],n)};var oe=typeof $==="function"&&typeof $["for"]==="function"&&re.symbol($());var ie=re.symbol($.iterator)?$.iterator:"_es6-shim iterator_";if(S.Set&&typeof(new S.Set)["@@iterator"]==="function"){ie="@@iterator"}if(!S.Reflect){h(S,"Reflect",{},true)}var ae=S.Reflect;var ue=String;var fe=typeof document==="undefined"||!document?null:document.all;var se=fe==null?function isNullOrUndefined(e){return e==null}:function isNullOrUndefinedAndNotDocumentAll(e){return e==null&&e!==fe};var ce={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!ce.IsCallable(t)){throw new TypeError(t+" is not a function")}return e(t,r,n)},RequireObjectCoercible:function(e,t){if(se(e)){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){if(e===void 0||e===null||e===true||e===false){return false}return typeof e==="function"||typeof e==="object"||e===fe},ToObject:function(e,t){return Object(ce.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return ce.IsCallable(e)},ToInt32:function(e){return ce.ToNumber(e)>>0},ToUint32:function(e){return ce.ToNumber(e)>>>0},ToNumber:function(e){if(g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return+e},ToInteger:function(e){var t=ce.ToNumber(e);if(X(t)){return 0}if(t===0||!K(t)){return t}return(t>0?1:-1)*_(k(t))},ToLength:function(e){var t=ce.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return X(e)&&X(t)},SameValueZero:function(e,t){return e===t||X(e)&&X(t)},IsIterable:function(e){return ce.TypeIsObject(e)&&(typeof e[ie]!=="undefined"||te(e))},GetIterator:function(e){if(te(e)){return new q(e,"value")}var t=ce.GetMethod(e,ie);if(!ce.IsCallable(t)){throw new TypeError("value is not an iterable")}var r=ce.Call(t,e);if(!ce.TypeIsObject(r)){throw new TypeError("bad iterator")}return r},GetMethod:function(e,t){var r=ce.ToObject(e)[t];if(se(r)){return void 0}if(!ce.IsCallable(r)){throw new TypeError("Method not callable: "+t)}return r},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=ce.GetMethod(e,"return");if(r===void 0){return}var n,o;try{n=ce.Call(r,e)}catch(i){o=i}if(t){return}if(o){throw o}if(!ce.TypeIsObject(n)){throw new TypeError("Iterator's return method returned a non-object.")}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!ce.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorStep:function(e){var t=ce.IteratorNext(e);var r=ce.IteratorComplete(t);return r?false:t},Construct:function(e,t,r,n){var o=typeof r==="undefined"?e:r;if(!n&&ae.construct){return ae.construct(e,t,o)}var i=o.prototype;if(!ce.TypeIsObject(i)){i=Object.prototype}var a=O(i);var u=ce.Call(e,a,t);return ce.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(r===void 0){return t}if(!ce.TypeIsObject(r)){throw new TypeError("Bad constructor")}var n=r[J];if(se(n)){return t}if(!ce.IsConstructor(n)){throw new TypeError("Bad @@species")}return n},CreateHTML:function(e,t,r,n){var o=ce.ToString(e);var i="<"+t;if(r!==""){var a=ce.ToString(n);var u=a.replace(/"/g,""");i+=" "+r+'="'+u+'"'}var f=i+">";var s=f+o;return s+"</"+t+">"},IsRegExp:function IsRegExp(e){if(!ce.TypeIsObject(e)){return false}var t=e[$.match];if(typeof t!=="undefined"){return!!t}return re.regex(e)},ToString:function ToString(e){return ue(e)}};if(s&&oe){var le=function defineWellKnownSymbol(e){if(re.symbol($[e])){return $[e]}var t=$["for"]("Symbol."+e);Object.defineProperty($,e,{configurable:false,enumerable:false,writable:false,value:t});return t};if(!re.symbol($.search)){var pe=le("search");var ve=String.prototype.search;h(RegExp.prototype,pe,function search(e){return ce.Call(ve,e,[this])});var ye=function search(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,pe);if(typeof r!=="undefined"){return ce.Call(r,e,[t])}}return ce.Call(ve,t,[ce.ToString(e)])};ne(String.prototype,"search",ye)}if(!re.symbol($.replace)){var he=le("replace");var be=String.prototype.replace;h(RegExp.prototype,he,function replace(e,t){return ce.Call(be,e,[this,t])});var ge=function replace(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,he);if(typeof n!=="undefined"){return ce.Call(n,e,[r,t])}}return ce.Call(be,r,[ce.ToString(e),t])};ne(String.prototype,"replace",ge)}if(!re.symbol($.split)){var de=le("split");var me=String.prototype.split;h(RegExp.prototype,de,function split(e,t){return ce.Call(me,e,[this,t])});var Oe=function split(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,de);if(typeof n!=="undefined"){return ce.Call(n,e,[r,t])}}return ce.Call(me,r,[ce.ToString(e),t])};ne(String.prototype,"split",Oe)}var we=re.symbol($.match);var je=we&&function(){var e={};e[$.match]=function(){return 42};return"a".match(e)!==42}();if(!we||je){var Se=le("match");var Te=String.prototype.match;h(RegExp.prototype,Se,function match(e){return ce.Call(Te,e,[this])});var Ie=function match(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,Se);if(typeof r!=="undefined"){return ce.Call(r,e,[t])}}return ce.Call(Te,t,[ce.ToString(e)])};ne(String.prototype,"match",Ie)}}var Ee=function wrapConstructor(e,t,r){m.preserveToString(t,e);if(Object.setPrototypeOf){Object.setPrototypeOf(e,t)}if(s){l(Object.getOwnPropertyNames(e),function(n){if(n in W||r[n]){return}m.proxy(e,n,t)})}else{l(Object.keys(e),function(n){if(n in W||r[n]){return}t[n]=e[n]})}t.prototype=e.prototype;m.redefine(e.prototype,"constructor",t)};var Pe=function(){return this};var Ce=function(e){if(s&&!z(e,J)){m.getter(e,J,Pe)}};var Me=function(e,t){var r=t||function iterator(){return this};h(e,ie,r);if(!e[ie]&&re.symbol(ie)){e[ie]=r}};var xe=function createDataProperty(e,t,r){if(s){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}};var Ne=function createDataPropertyOrThrow(e,t,r){xe(e,t,r);if(!ce.SameValue(e[t],r)){throw new TypeError("property is nonconfigurable")}};var Ae=function(e,t,r,n){if(!ce.TypeIsObject(e)){throw new TypeError("Constructor requires `new`: "+t.name)}var o=t.prototype;if(!ce.TypeIsObject(o)){o=r}var i=O(o);for(var a in n){if(z(n,a)){var u=n[a];h(i,a,u,true)}}return i};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var Re=String.fromCodePoint;ne(String,"fromCodePoint",function fromCodePoint(e){return ce.Call(Re,this,arguments)})}var _e={fromCodePoint:function fromCodePoint(e){var t=[];var r;for(var n=0,o=arguments.length;n<o;n++){r=Number(arguments[n]);if(!ce.SameValue(r,ce.ToInteger(r))||r<0||r>1114111){throw new RangeError("Invalid code point "+r)}if(r<65536){M(t,String.fromCharCode(r))}else{r-=65536;M(t,String.fromCharCode((r>>10)+55296));M(t,String.fromCharCode(r%1024+56320))}}return t.join("")},raw:function raw(e){var t=ce.ToObject(e,"bad callSite");var r=ce.ToObject(t.raw,"bad raw value");var n=r.length;var o=ce.ToLength(n);if(o<=0){return""}var i=[];var a=0;var u,f,s,c;while(a<o){u=ce.ToString(a);s=ce.ToString(r[u]);M(i,s);if(a+1>=o){break}f=a+1<arguments.length?arguments[a+1]:"";c=ce.ToString(f);M(i,c);a+=1}return i.join("")}};if(String.raw&&String.raw({raw:{0:"x",1:"y",length:2}})!=="xy"){ne(String,"raw",_e.raw)}b(String,_e);var ke=function repeat(e,t){if(t<1){return""}if(t%2){return repeat(e,t-1)+e}var r=repeat(e,t/2);return r+r};var Le=Infinity;var Fe={repeat:function repeat(e){var t=ce.ToString(ce.RequireObjectCoercible(this));var r=ce.ToInteger(e);if(r<0||r>=Le){throw new RangeError("repeat count must be less than infinity and not overflow maximum string size")}return ke(t,r)},startsWith:function startsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e)){throw new TypeError('Cannot call method "startsWith" with a regex')}var r=ce.ToString(e);var n;if(arguments.length>1){n=arguments[1]}var o=A(ce.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e)){throw new TypeError('Cannot call method "endsWith" with a regex')}var r=ce.ToString(e);var n=t.length;var o;if(arguments.length>1){o=arguments[1]}var i=typeof o==="undefined"?n:ce.ToInteger(o);var a=R(A(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(ce.IsRegExp(e)){throw new TypeError('"includes" does not accept a RegExp')}var t=ce.ToString(e);var r;if(arguments.length>1){r=arguments[1]}return I(this,t,r)!==-1},codePointAt:function codePointAt(e){var t=ce.ToString(ce.RequireObjectCoercible(this));var r=ce.ToInteger(e);var n=t.length;if(r>=0&&r<n){var o=t.charCodeAt(r);var i=r+1===n;if(o<55296||o>56319||i){return o}var a=t.charCodeAt(r+1);if(a<56320||a>57343){return o}return(o-55296)*1024+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",Infinity)!==false){ne(String.prototype,"includes",Fe.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var De=i(function(){return"/a/".startsWith(/a/)});var ze=a(function(){return"abc".startsWith("a",Infinity)===false});if(!De||!ze){ne(String.prototype,"startsWith",Fe.startsWith);ne(String.prototype,"endsWith",Fe.endsWith)}}if(oe){var qe=a(function(){var e=/a/;e[$.match]=false;return"/a/".startsWith(e)});if(!qe){ne(String.prototype,"startsWith",Fe.startsWith)}var We=a(function(){var e=/a/;e[$.match]=false;return"/a/".endsWith(e)});if(!We){ne(String.prototype,"endsWith",Fe.endsWith)}var Ge=a(function(){var e=/a/;e[$.match]=false;return"/a/".includes(e)});if(!Ge){ne(String.prototype,"includes",Fe.includes)}}b(String.prototype,Fe);var He=["\t\n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join("");var Ve=new RegExp("(^["+He+"]+)|(["+He+"]+$)","g");var Be=function trim(){return ce.ToString(ce.RequireObjectCoercible(this)).replace(Ve,"")};var Ue=["\x85","\u200b","\ufffe"].join("");var $e=new RegExp("["+Ue+"]","g");var Je=/^[-+]0x[0-9a-f]+$/i;var Xe=Ue.trim().length!==Ue.length;h(String.prototype,"trim",Be,Xe);var Ke=function(e){return{value:e,done:arguments.length===0}};var Ze=function(e){ce.RequireObjectCoercible(e);this._s=ce.ToString(e);this._i=0};Ze.prototype.next=function(){var e=this._s;var t=this._i;if(typeof e==="undefined"||t>=e.length){this._s=void 0;return Ke()}var r=e.charCodeAt(t);var n,o;if(r<55296||r>56319||t+1===e.length){o=1}else{n=e.charCodeAt(t+1);o=n<56320||n>57343?1:2}this._i=t+o;return Ke(e.substr(t,o))};Me(Ze.prototype);Me(String.prototype,function(){return new Ze(this)});var Ye={from:function from(e){var r=this;var n;if(arguments.length>1){n=arguments[1]}var o,i;if(typeof n==="undefined"){o=false}else{if(!ce.IsCallable(n)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){i=arguments[2]}o=true}var a=typeof(te(e)||ce.GetMethod(e,ie))!=="undefined";var u,f,s;if(a){f=ce.IsConstructor(r)?Object(new r):[];var c=ce.GetIterator(e);var l,p;s=0;while(true){l=ce.IteratorStep(c);if(l===false){break}p=l.value;try{if(o){p=typeof i==="undefined"?n(p,s):t(n,i,p,s)}f[s]=p}catch(v){ce.IteratorClose(c,true);throw v}s+=1}u=s}else{var y=ce.ToObject(e);u=ce.ToLength(y.length);f=ce.IsConstructor(r)?Object(new r(u)):new Array(u);var h;for(s=0;s<u;++s){h=y[s];if(o){h=typeof i==="undefined"?n(h,s):t(n,i,h,s)}Ne(f,s,h)}}f.length=u;return f},of:function of(){var e=arguments.length;var t=this;var n=r(t)||!ce.IsCallable(t)?new Array(e):ce.Construct(t,[e]);for(var o=0;o<e;++o){Ne(n,o,arguments[o])}n.length=e;return n}};b(Array,Ye);Ce(Array);q=function(e,t){this.i=0;this.array=e;this.kind=t};b(q.prototype,{next:function(){var e=this.i;var t=this.array;if(!(this instanceof q)){throw new TypeError("Not an ArrayIterator")}if(typeof t!=="undefined"){var r=ce.ToLength(t.length);for(;e<r;e++){var n=this.kind;var o;if(n==="key"){o=e}else if(n==="value"){o=t[e]}else if(n==="entry"){o=[e,t[e]]}this.i=e+1;return Ke(o)}}this.array=void 0;return Ke()}});Me(q.prototype);var Qe=Array.of===Ye.of||function(){var e=function Foo(e){this.length=e};e.prototype=[];var t=Array.of.apply(e,[1,2]);return t instanceof e&&t.length===2}();if(!Qe){ne(Array,"of",Ye.of)}var et={copyWithin:function copyWithin(e,t){var r=ce.ToObject(this);var n=ce.ToLength(r.length);var o=ce.ToInteger(e);var i=ce.ToInteger(t);var a=o<0?A(n+o,0):R(o,n);var u=i<0?A(n+i,0):R(i,n);var f;if(arguments.length>2){f=arguments[2]}var s=typeof f==="undefined"?n:ce.ToInteger(f);var c=s<0?A(n+s,0):R(s,n);var l=R(c-u,n-a);var p=1;if(u<a&&a<u+l){p=-1;u+=l-1;a+=l-1}while(l>0){if(u in r){r[a]=r[u]}else{delete r[a]}u+=p;a+=p;l-=1}return r},fill:function fill(e){var t;if(arguments.length>1){t=arguments[1]}var r;if(arguments.length>2){r=arguments[2]}var n=ce.ToObject(this);var o=ce.ToLength(n.length);t=ce.ToInteger(typeof t==="undefined"?0:t);r=ce.ToInteger(typeof r==="undefined"?o:r);var i=t<0?A(o+t,0):R(t,o);var a=r<0?o+r:r;for(var u=i;u<o&&u<a;++u){n[u]=e}return n},find:function find(e){var r=ce.ToObject(this);var n=ce.ToLength(r.length);if(!ce.IsCallable(e)){throw new TypeError("Array#find: predicate must be a function")}var o=arguments.length>1?arguments[1]:null;for(var i=0,a;i<n;i++){a=r[i];if(o){if(t(e,o,a,i,r)){return a}}else if(e(a,i,r)){return a}}},findIndex:function findIndex(e){var r=ce.ToObject(this);var n=ce.ToLength(r.length);if(!ce.IsCallable(e)){throw new TypeError("Array#findIndex: predicate must be a function")}var o=arguments.length>1?arguments[1]:null;for(var i=0;i<n;i++){if(o){if(t(e,o,r[i],i,r)){return i}}else if(e(r[i],i,r)){return i}}return-1},keys:function keys(){return new q(this,"key")},values:function values(){return new q(this,"value")},entries:function entries(){return new q(this,"entry")}};if(Array.prototype.keys&&!ce.IsCallable([1].keys().next)){delete Array.prototype.keys}if(Array.prototype.entries&&!ce.IsCallable([1].entries().next)){delete Array.prototype.entries}if(Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[ie]){b(Array.prototype,{values:Array.prototype[ie]});if(re.symbol($.unscopables)){Array.prototype[$.unscopables].values=true}}if(c&&Array.prototype.values&&Array.prototype.values.name!=="values"){var tt=Array.prototype.values;ne(Array.prototype,"values",function values(){return ce.Call(tt,this,arguments)});h(Array.prototype,ie,Array.prototype.values,true)}b(Array.prototype,et);if(1/[true].indexOf(true,-0)<0){h(Array.prototype,"indexOf",function indexOf(e){var t=E(this,arguments);if(t===0&&1/t<0){return 0}return t},true)}Me(Array.prototype,function(){return this.values()});if(Object.getPrototypeOf){Me(Object.getPrototypeOf([].values()))}var rt=function(){return a(function(){return Array.from({length:-1}).length===0})}();var nt=function(){var e=Array.from([0].entries());return e.length===1&&r(e[0])&&e[0][0]===0&&e[0][1]===0}();if(!rt||!nt){ne(Array,"from",Ye.from)}var ot=function(){return a(function(){return Array.from([0],void 0)})}();if(!ot){var it=Array.from;ne(Array,"from",function from(e){if(arguments.length>1&&typeof arguments[1]!=="undefined"){return ce.Call(it,this,arguments)}else{return t(it,this,e)}})}var at=-(Math.pow(2,32)-1);var ut=function(e,r){var n={length:at};n[r?(n.length>>>0)-1:0]=true;return a(function(){t(e,n,function(){throw new RangeError("should not reach here")},[]);return true})};if(!ut(Array.prototype.forEach)){var ft=Array.prototype.forEach;ne(Array.prototype,"forEach",function forEach(e){return ce.Call(ft,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.map)){var st=Array.prototype.map;ne(Array.prototype,"map",function map(e){return ce.Call(st,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.filter)){var ct=Array.prototype.filter;ne(Array.prototype,"filter",function filter(e){return ce.Call(ct,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.some)){var lt=Array.prototype.some;ne(Array.prototype,"some",function some(e){return ce.Call(lt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.every)){var pt=Array.prototype.every;ne(Array.prototype,"every",function every(e){return ce.Call(pt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.reduce)){var vt=Array.prototype.reduce;ne(Array.prototype,"reduce",function reduce(e){return ce.Call(vt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.reduceRight,true)){var yt=Array.prototype.reduceRight;ne(Array.prototype,"reduceRight",function reduceRight(e){return ce.Call(yt,this.length>=0?this:[],arguments)},true)}var ht=Number("0o10")!==8;var bt=Number("0b10")!==2;var gt=y(Ue,function(e){return Number(e+0+e)===0});if(ht||bt||gt){var dt=Number;var mt=/^0b[01]+$/i;var Ot=/^0o[0-7]+$/i;var wt=mt.test.bind(mt);var jt=Ot.test.bind(Ot);var St=function(e){var t;if(typeof e.valueOf==="function"){t=e.valueOf();if(re.primitive(t)){return t}}if(typeof e.toString==="function"){t=e.toString();if(re.primitive(t)){return t}}throw new TypeError("No default value")};var Tt=$e.test.bind($e);var It=Je.test.bind(Je);var Et=function(){var e=function Number(t){var r;if(arguments.length>0){r=re.primitive(t)?t:St(t,"number")}else{r=0}if(typeof r==="string"){r=ce.Call(Be,r);if(wt(r)){r=parseInt(C(r,2),2)}else if(jt(r)){r=parseInt(C(r,2),8)}else if(Tt(r)||It(r)){r=NaN}}var n=this;var o=a(function(){dt.prototype.valueOf.call(n);return true});if(n instanceof e&&!o){return new dt(r)}return dt(r)};return e}();Ee(dt,Et,{});b(Et,{NaN:dt.NaN,MAX_VALUE:dt.MAX_VALUE,MIN_VALUE:dt.MIN_VALUE,NEGATIVE_INFINITY:dt.NEGATIVE_INFINITY,POSITIVE_INFINITY:dt.POSITIVE_INFINITY});Number=Et;m.redefine(S,"Number",Et)}var Pt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Pt,MIN_SAFE_INTEGER:-Pt,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:K,isInteger:function isInteger(e){return K(e)&&ce.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&k(e)<=Number.MAX_SAFE_INTEGER},isNaN:X});h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt);if([,1].find(function(){return true})===1){ne(Array.prototype,"find",et.find)}if([,1].findIndex(function(){return true})!==0){ne(Array.prototype,"findIndex",et.findIndex)}var Ct=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var Mt=function ensureEnumerable(e,t){if(s&&Ct(e,t)){Object.defineProperty(e,t,{enumerable:false})}};var xt=function sliceArgs(){var e=Number(this);var t=arguments.length;var r=t-e;var n=new Array(r<0?0:r);for(var o=e;o<t;++o){n[o-e]=arguments[o]}return n};var Nt=function assignTo(e){return function assignToSource(t,r){t[r]=e[r];return t}};var At=function(e,t){var r=n(Object(t));var o;if(ce.IsCallable(Object.getOwnPropertySymbols)){o=v(Object.getOwnPropertySymbols(Object(t)),Ct(t))}return p(P(r,o||[]),Nt(t),e)};var Rt={assign:function(e,t){var r=ce.ToObject(e,"Cannot convert undefined or null to object");return p(ce.Call(xt,1,arguments),At,r)},is:function is(e,t){return ce.SameValue(e,t)}};var _t=Object.assign&&Object.preventExtensions&&function(){var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return e[1]==="y"}}();if(_t){ne(Object,"assign",Rt.assign)}b(Object,Rt);if(s){var kt={setPrototypeOf:function(e,r){var n;var o=function(e,t){if(!ce.TypeIsObject(e)){throw new TypeError("cannot set prototype on a non-object")}if(!(t===null||ce.TypeIsObject(t))){throw new TypeError("can only set prototype to an object or null"+t)}};var i=function(e,r){o(e,r);t(n,e,r);return e};try{n=e.getOwnPropertyDescriptor(e.prototype,r).set;t(n,{},null)}catch(a){if(e.prototype!=={}[r]){return}n=function(e){this[r]=e};i.polyfill=i(i({},null),e.prototype)instanceof e}return i}(Object,"__proto__")};b(Object,kt)}if(Object.setPrototypeOf&&Object.getPrototypeOf&&Object.getPrototypeOf(Object.setPrototypeOf({},null))!==null&&Object.getPrototypeOf(Object.create(null))===null){(function(){var e=Object.create(null);var t=Object.getPrototypeOf;var r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=t(r);return n===e?null:n};Object.setPrototypeOf=function(t,n){var o=n===null?e:n;return r(t,o)};Object.setPrototypeOf.polyfill=false})()}var Lt=!i(function(){return Object.keys("foo")});if(!Lt){var Ft=Object.keys;ne(Object,"keys",function keys(e){return Ft(ce.ToObject(e))});n=Object.keys}var Dt=i(function(){return Object.keys(/a/g)});if(Dt){var zt=Object.keys;ne(Object,"keys",function keys(e){if(re.regex(e)){var t=[];for(var r in e){if(z(e,r)){M(t,r)}}return t}return zt(e)});n=Object.keys}if(Object.getOwnPropertyNames){var qt=!i(function(){return Object.getOwnPropertyNames("foo")});if(!qt){var Wt=typeof window==="object"?Object.getOwnPropertyNames(window):[];var Gt=Object.getOwnPropertyNames;ne(Object,"getOwnPropertyNames",function getOwnPropertyNames(e){var t=ce.ToObject(e);if(g(t)==="[object Window]"){try{return Gt(t)}catch(r){return P([],Wt)}}return Gt(t)})}}if(Object.getOwnPropertyDescriptor){var Ht=!i(function(){return Object.getOwnPropertyDescriptor("foo","bar")});if(!Ht){var Vt=Object.getOwnPropertyDescriptor;ne(Object,"getOwnPropertyDescriptor",function getOwnPropertyDescriptor(e,t){return Vt(ce.ToObject(e),t)})}}if(Object.seal){var Bt=!i(function(){return Object.seal("foo")});if(!Bt){var Ut=Object.seal;ne(Object,"seal",function seal(e){if(!ce.TypeIsObject(e)){return e}return Ut(e)})}}if(Object.isSealed){var $t=!i(function(){return Object.isSealed("foo")});if(!$t){var Jt=Object.isSealed;ne(Object,"isSealed",function isSealed(e){if(!ce.TypeIsObject(e)){return true}return Jt(e)})}}if(Object.freeze){var Xt=!i(function(){return Object.freeze("foo")});if(!Xt){var Kt=Object.freeze;ne(Object,"freeze",function freeze(e){if(!ce.TypeIsObject(e)){return e}return Kt(e)})}}if(Object.isFrozen){var Zt=!i(function(){return Object.isFrozen("foo")});if(!Zt){var Yt=Object.isFrozen;ne(Object,"isFrozen",function isFrozen(e){if(!ce.TypeIsObject(e)){return true}return Yt(e)})}}if(Object.preventExtensions){var Qt=!i(function(){return Object.preventExtensions("foo")});if(!Qt){var er=Object.preventExtensions;ne(Object,"preventExtensions",function preventExtensions(e){if(!ce.TypeIsObject(e)){return e}return er(e)})}}if(Object.isExtensible){var tr=!i(function(){return Object.isExtensible("foo")});if(!tr){var rr=Object.isExtensible;ne(Object,"isExtensible",function isExtensible(e){if(!ce.TypeIsObject(e)){return false}return rr(e)})}}if(Object.getPrototypeOf){var nr=!i(function(){return Object.getPrototypeOf("foo")});if(!nr){var or=Object.getPrototypeOf;ne(Object,"getPrototypeOf",function getPrototypeOf(e){return or(ce.ToObject(e))})}}var ir=s&&function(){var e=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags");return e&&ce.IsCallable(e.get)}();if(s&&!ir){var ar=function flags(){if(!ce.TypeIsObject(this)){throw new TypeError("Method called on incompatible type: must be an object.")}var e="";if(this.global){e+="g"}if(this.ignoreCase){e+="i"}if(this.multiline){e+="m"}if(this.unicode){e+="u"}if(this.sticky){e+="y"}return e};m.getter(RegExp.prototype,"flags",ar)}var ur=s&&a(function(){return String(new RegExp(/a/g,"i"))==="/a/i"});var fr=oe&&s&&function(){var e=/./;e[$.match]=false;return RegExp(e)===e}();var sr=a(function(){return RegExp.prototype.toString.call({source:"abc"})==="/abc/"});var cr=sr&&a(function(){return RegExp.prototype.toString.call({source:"a",flags:"b"})==="/a/b"});if(!sr||!cr){var lr=RegExp.prototype.toString;h(RegExp.prototype,"toString",function toString(){var e=ce.RequireObjectCoercible(this);if(re.regex(e)){return t(lr,e)}var r=ue(e.source);var n=ue(e.flags);return"/"+r+"/"+n},true);m.preserveToString(RegExp.prototype.toString,lr)}if(s&&(!ur||fr)){var pr=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get;var vr=Object.getOwnPropertyDescriptor(RegExp.prototype,"source")||{};var yr=function(){return this.source};var hr=ce.IsCallable(vr.get)?vr.get:yr;var br=RegExp;var gr=function(){return function RegExp(e,t){var r=ce.IsRegExp(e);var n=this instanceof RegExp;if(!n&&r&&typeof t==="undefined"&&e.constructor===RegExp){return e}var o=e;var i=t;if(re.regex(e)){o=ce.Call(hr,e);i=typeof t==="undefined"?ce.Call(pr,e):t;return new RegExp(o,i)}else if(r){o=e.source;i=typeof t==="undefined"?e.flags:t}return new br(e,t)}}();Ee(br,gr,{$input:true});RegExp=gr;m.redefine(S,"RegExp",gr)}if(s){var dr={input:"$_",lastMatch:"$&",lastParen:"$+",leftContext:"$`",rightContext:"$'"};l(n(dr),function(e){if(e in RegExp&&!(dr[e]in RegExp)){m.getter(RegExp,dr[e],function get(){return RegExp[e]})}})}Ce(RegExp);var mr=1/Number.EPSILON;var Or=function roundTiesToEven(e){return e+mr-mr};var wr=Math.pow(2,-23);var jr=Math.pow(2,127)*(2-wr);var Sr=Math.pow(2,-126);var Tr=Math.E;var Ir=Math.LOG2E;var Er=Math.LOG10E;var Pr=Number.prototype.clz;delete Number.prototype.clz;var Cr={acosh:function acosh(e){var t=Number(e);if(X(t)||e<1){return NaN}if(t===1){return 0}if(t===Infinity){return t}var r=1/(t*t);if(t<2){return Y(t-1+D(1-r)*t)}var n=t/2;return Y(n+D(1-r)*n-1)+1/Ir},asinh:function asinh(e){var t=Number(e);if(t===0||!T(t)){return t}var r=k(t);var n=r*r;var o=Z(t);if(r<1){return o*Y(r+n/(D(n+1)+1))}return o*(Y(r/2+D(1+1/n)*r/2-1)+1/Ir)},atanh:function atanh(e){var t=Number(e);if(t===0){return t}if(t===-1){return-Infinity}if(t===1){return Infinity}if(X(t)||t<-1||t>1){return NaN}var r=k(t);return Z(t)*Y(2*r/(1-r))/2},cbrt:function cbrt(e){var t=Number(e);if(t===0){return t}var r=t<0;var n;if(r){t=-t}if(t===Infinity){n=Infinity}else{n=L(F(t)/3);n=(t/(n*n)+2*n)/3}return r?-n:n},clz32:function clz32(e){var t=Number(e);var r=ce.ToUint32(t);if(r===0){return 32}return Pr?ce.Call(Pr,r):31-_(F(r+.5)*Ir)},cosh:function cosh(e){var t=Number(e);if(t===0){return 1}if(X(t)){return NaN}if(!T(t)){return Infinity}var r=L(k(t)-1);return(r+1/(r*Tr*Tr))*(Tr/2)},expm1:function expm1(e){var t=Number(e);if(t===-Infinity){return-1}if(!T(t)||t===0){return t}if(k(t)>.5){return L(t)-1}var r=t;var n=0;var o=1;while(n+r!==n){n+=r;o+=1;r*=t/o}return n},hypot:function hypot(e,t){var r=0;var n=0;for(var o=0;o<arguments.length;++o){var i=k(Number(arguments[o]));if(n<i){r*=n/i*(n/i);r+=1;n=i}else{r+=i>0?i/n*(i/n):i}}return n===Infinity?Infinity:n*D(r)},log2:function log2(e){return F(e)*Ir},log10:function log10(e){return F(e)*Er},log1p:Y,sign:Z,sinh:function sinh(e){var t=Number(e);if(!T(t)||t===0){return t}var r=k(t);if(r<1){var n=Math.expm1(r);return Z(t)*n*(1+1/(n+1))/2}var o=L(r-1);return Z(t)*(o-1/(o*Tr*Tr))*(Tr/2)},tanh:function tanh(e){var t=Number(e);if(X(t)||t===0){return t}if(t>=20){return 1}if(t<=-20){return-1}return(Math.expm1(t)-Math.expm1(-t))/(L(t)+L(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-_(-t):_(t)},imul:function imul(e,t){var r=ce.ToUint32(e);var n=ce.ToUint32(t);var o=r>>>16&65535;var i=r&65535;var a=n>>>16&65535;var u=n&65535;return i*u+(o*u+i*a<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(t===0||t===Infinity||t===-Infinity||X(t)){return t}var r=Z(t);var n=k(t);if(n<Sr){return r*Or(n/Sr/wr)*Sr*wr}var o=(1+wr/Number.EPSILON)*n;var i=o-(o-n);if(i>jr||X(i)){return r*Infinity}return r*i}};var Mr=function withinULPDistance(e,t,r){return k(1-e/t)/Number.EPSILON<(r||8)};b(Math,Cr);h(Math,"sinh",Cr.sinh,Math.sinh(710)===Infinity);h(Math,"cosh",Cr.cosh,Math.cosh(710)===Infinity);h(Math,"log1p",Cr.log1p,Math.log1p(-1e-17)!==-1e-17);h(Math,"asinh",Cr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7));h(Math,"asinh",Cr.asinh,Math.asinh(1e300)===Infinity);h(Math,"atanh",Cr.atanh,Math.atanh(1e-300)===0);h(Math,"tanh",Cr.tanh,Math.tanh(-2e-17)!==-2e-17);
h(Math,"acosh",Cr.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);h(Math,"acosh",Cr.acosh,!Mr(Math.acosh(1+Number.EPSILON),Math.sqrt(2*Number.EPSILON)));h(Math,"cbrt",Cr.cbrt,!Mr(Math.cbrt(1e-300),1e-100));h(Math,"sinh",Cr.sinh,Math.sinh(-2e-17)!==-2e-17);var xr=Math.expm1(10);h(Math,"expm1",Cr.expm1,xr>22025.465794806718||xr<22025.465794806718);var Nr=Math.round;var Ar=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var Rr=mr+1;var _r=2*mr-1;var kr=[Rr,_r].every(function(e){return Math.round(e)===e});h(Math,"round",function round(e){var t=_(e);var r=t===-1?-0:t+1;return e-t<.5?t:r},!Ar||!kr);m.preserveToString(Math.round,Nr);var Lr=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=Cr.imul;m.preserveToString(Math.imul,Lr)}if(Math.imul.length!==2){ne(Math,"imul",function imul(e,t){return ce.Call(Lr,Math,arguments)})}var Fr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}ce.IsPromise=function(e){if(!ce.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!ce.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(ce.IsCallable(t.resolve)&&ce.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&ce.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=N(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=ce.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(ce.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o<n;o++,i+=3){h(r[i+l],r[i+v],t);e[i+l]=void 0;e[i+p]=void 0;e[i+v]=void 0}}}r.result=t;r.state=s;r.reactionLength=0};var m=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o<n;o++,i+=3){h(r[i+p],r[i+v],t);e[i+l]=void 0;e[i+p]=void 0;e[i+v]=void 0}}}r.result=t;r.state=c;r.reactionLength=0};var O=function(e){var t=false;var r=function(r){var n;if(t){return}t=true;if(r===e){return m(e,new TypeError("Self resolution"))}if(!ce.TypeIsObject(r)){return d(e,r)}try{n=r.then}catch(o){return m(e,o)}if(!ce.IsCallable(n)){return d(e,r)}i(function(){j(e,r,n)})};var n=function(r){if(t){return}t=true;return m(e,r)};return{resolve:r,reject:n}};var w=function(e,r,n,o){if(e===I){t(e,r,n,o,y)}else{t(e,r,n,o)}};var j=function(e,t,r){var n=O(e);var o=n.resolve;var i=n.reject;try{w(r,t,o,i)}catch(a){i(a)}};var T,I;var E=function(){var e=function Promise(t){if(!(this instanceof e)){throw new TypeError('Constructor Promise requires "new"')}if(this&&this._promise){throw new TypeError("Bad construction")}if(!ce.IsCallable(t)){throw new TypeError("not a valid resolver")}var r=Ae(this,e,T,{_promise:{result:void 0,state:f,reactionLength:0,fulfillReactionHandler0:void 0,rejectReactionHandler0:void 0,reactionCapability0:void 0}});var n=O(r);var o=n.reject;try{t(n.resolve,o)}catch(i){o(i)}return r};return e}();T=E.prototype;var P=function(e,t,r,n){var o=false;return function(i){if(o){return}o=true;t[e]=i;if(--n.count===0){var a=r.resolve;a(t)}}};var C=function(e,t,r){var n=e.iterator;var o=[];var i={count:1};var a,u;var f=0;while(true){try{a=ce.IteratorStep(n);if(a===false){e.done=true;break}u=a.value}catch(s){e.done=true;throw s}o[f]=void 0;var c=t.resolve(u);var l=P(f,o,r,i);i.count+=1;w(c.then,c,l,r.reject);f+=1}if(--i.count===0){var p=r.resolve;p(o)}return r.promise};var x=function(e,t,r){var n=e.iterator;var o,i,a;while(true){try{o=ce.IteratorStep(n);if(o===false){e.done=true;break}i=o.value}catch(u){e.done=true;throw u}a=t.resolve(i);w(a.then,a,r.resolve,r.reject)}return r.promise};b(E,{all:function all(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Promise is not object")}var n=new r(t);var o,i;try{o=ce.GetIterator(e);i={iterator:o,done:false};return C(i,t,n)}catch(a){var u=a;if(i&&!i.done){try{ce.IteratorClose(o,true)}catch(f){u=f}}var s=n.reject;s(u);return n.promise}},race:function race(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Promise is not object")}var n=new r(t);var o,i;try{o=ce.GetIterator(e);i={iterator:o,done:false};return x(i,t,n)}catch(a){var u=a;if(i&&!i.done){try{ce.IteratorClose(o,true)}catch(f){u=f}}var s=n.reject;s(u);return n.promise}},reject:function reject(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Bad promise constructor")}var n=new r(t);var o=n.reject;o(e);return n.promise},resolve:function resolve(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Bad promise constructor")}if(ce.IsPromise(e)){var n=e.constructor;if(n===t){return e}}var o=new r(t);var i=o.resolve;i(e);return o.promise}});b(T,{"catch":function(e){return this.then(null,e)},then:function then(e,t){var n=this;if(!ce.IsPromise(n)){throw new TypeError("not a promise")}var o=ce.SpeciesConstructor(n,E);var i;var b=arguments.length>2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=ce.IsCallable(e)?e:a;var d=ce.IsCallable(t)?t:u;var m=n._promise;var O;if(m.state===f){if(m.reactionLength===0){m.fulfillReactionHandler0=g;m.rejectReactionHandler0=d;m.reactionCapability0=i}else{var w=3*(m.reactionLength-1);m[w+l]=g;m[w+p]=d;m[w+v]=i}m.reactionLength+=1}else if(m.state===s){O=m.result;h(g,i,O)}else if(m.state===c){O=m.result;h(d,i,O)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof Fr==="function"){b(S,{Promise:Fr});var Dr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var zr=!i(function(){return S.Promise.reject(42).then(null,5).then(null,W)});var qr=i(function(){return S.Promise.call(3,W)});var Wr=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return true}return t===r}(S.Promise);var Gr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var Hr=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};Hr.prototype=Promise.prototype;Hr.all=Promise.all;var Vr=a(function(){return!!Hr.all([1,2])});if(!Dr||!zr||!qr||Wr||!Gr||Vr){Promise=Fr;ne(S,"Promise",Fr)}if(Promise.all.length!==1){var Br=Promise.all;ne(Promise,"all",function all(e){return ce.Call(Br,this,arguments)})}if(Promise.race.length!==1){var Ur=Promise.race;ne(Promise,"race",function race(e){return ce.Call(Ur,this,arguments)})}if(Promise.resolve.length!==1){var $r=Promise.resolve;ne(Promise,"resolve",function resolve(e){return ce.Call($r,this,arguments)})}if(Promise.reject.length!==1){var Jr=Promise.reject;ne(Promise,"reject",function reject(e){return ce.Call(Jr,this,arguments)})}Mt(Promise,"all");Mt(Promise,"race");Mt(Promise,"resolve");Mt(Promise,"reject");Ce(Promise)}var Xr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Kr=Xr(["z","a","bb"]);var Zr=Xr(["z",1,"a","3",2]);if(s){var Yr=function fastkey(e,t){if(!t&&!Kr){return null}if(se(e)){return"^"+ce.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Zr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var Qr=function emptyObject(){return Object.create?Object.create(null):{}};var en=function addIterableToMap(e,n,o){if(r(o)||re.string(o)){l(o,function(e){if(!ce.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(!se(o)){a=n.set;if(!ce.IsCallable(a)){throw new TypeError("bad map")}i=ce.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=ce.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!ce.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){ce.IteratorClose(i,true);throw s}}}}};var tn=function addIterableToSet(e,n,o){if(r(o)||re.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(!se(o)){a=n.add;if(!ce.IsCallable(a)){throw new TypeError("bad set")}i=ce.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=ce.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){ce.IteratorClose(i,true);throw s}}}}};var rn={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!ce.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+ce.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");this.head=e._head;this.i=this.head;this.kind=t};i.prototype={isMapIterator:true,next:function next(){if(!this.isMapIterator){throw new TypeError("Not a MapIterator")}var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ke()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ke(n)}}this.i=void 0;return Ke()}};Me(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=Ae(this,Map,a,{_es6map:true,_head:null,_map:G?new G:null,_size:0,_storage:Qr()});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){en(Map,e,arguments[0])}return e};a=u.prototype;m.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t;var r=Yr(e,true);if(r!==null){t=this._storage[r];if(t){return t.value}else{return}}if(this._map){t=V.call(this._map,e);if(t){return t.value}else{return}}var n=this._head;var i=n;while((i=i.next)!==n){if(ce.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=Yr(e,true);if(t!==null){return typeof this._storage[t]!=="undefined"}if(this._map){return B.call(this._map,e)}var r=this._head;var n=r;while((n=n.next)!==r){if(ce.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=Yr(e,true);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}else{a=this._storage[u]=new r(e,t);i=n.prev}}else if(this._map){if(B.call(this._map,e)){V.call(this._map,e).value=t}else{a=new r(e,t);U.call(this._map,e,a);i=n.prev}}while((i=i.next)!==n){if(ce.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(ce.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=Yr(t,true);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}else if(this._map){if(!B.call(this._map,t)){return false}n=V.call(this._map,t).prev;H.call(this._map,t)}while((n=n.next)!==r){if(ce.SameValueZero(n.key,t)){n.key=e;n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._map=G?new G:null;this._size=0;this._storage=Qr();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=e;r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});Me(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!ce.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+ce.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=Ae(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:Qr()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){tn(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}else{var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=new rn.Map;e["[[SetData]]"]=t;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};m.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=Yr(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=Yr(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=Yr(e))!==null){var n=z(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=Qr()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return new f(this["[[SetData]]"].values())},entries:function entries(){r(this,"entries");u(this);return new f(this["[[SetData]]"].entries())},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);Me(i.prototype,i.prototype.values);var f=function SetIterator(e){this.it=e};f.prototype={isSetIterator:true,next:function next(){if(!this.isSetIterator){throw new TypeError("Not a SetIterator")}return this.it.next()}};Me(f.prototype);return i}()};var nn=S.Set&&!Set.prototype["delete"]&&Set.prototype.remove&&Set.prototype.items&&Set.prototype.map&&Array.isArray((new Set).keys);if(nn){S.Set=rn.Set}if(S.Map||S.Set){var on=a(function(){return new Map([[1,2]]).get(1)===2});if(!on){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new G;if(arguments.length>0){en(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=O(G.prototype);h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,G)}var an=new Map;var un=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var fn=an.set(1,2)===an;if(!un||!fn){ne(Map.prototype,"set",function set(e,r){t(U,this,e===0?0:e,r);return this})}if(!un){b(Map.prototype,{get:function get(e){return t(V,this,e===0?0:e)},has:function has(e){return t(B,this,e===0?0:e)}},true);m.preserveToString(Map.prototype.get,V);m.preserveToString(Map.prototype.has,B)}var sn=new Set;var cn=Set.prototype["delete"]&&Set.prototype.add&&Set.prototype.has&&function(e){e["delete"](0);e.add(-0);return!e.has(0)}(sn);var ln=sn.add(1)===sn;if(!cn||!ln){var pn=Set.prototype.add;Set.prototype.add=function add(e){t(pn,this,e===0?0:e);return this};m.preserveToString(Set.prototype.add,pn)}if(!cn){var vn=Set.prototype.has;Set.prototype.has=function has(e){return t(vn,this,e===0?0:e)};m.preserveToString(Set.prototype.has,vn);var yn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(yn,this,e===0?0:e)};m.preserveToString(Set.prototype["delete"],yn)}var hn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var bn=Object.setPrototypeOf&&!hn;var gn=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||bn||!gn){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new G;if(arguments.length>0){en(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=G.prototype;h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,G)}var dn=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var mn=Object.setPrototypeOf&&!dn;var On=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||mn||!On){var wn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new wn;if(arguments.length>0){tn(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=wn.prototype;h(S.Set.prototype,"constructor",S.Set,true);m.preserveToString(S.Set,wn)}var jn=new S.Map;var Sn=!a(function(){return jn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||jn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof jn.keys().next!=="function"||Sn||!hn){b(S,{Map:rn.Map,Set:rn.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}Me(Object.getPrototypeOf((new S.Map).keys()));Me(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var Tn=S.Set.prototype.has;ne(S.Set.prototype,"has",function has(e){return t(Tn,this,e)})}}b(S,rn);Ce(S.Map);Ce(S.Set)}var In=function throwUnlessTargetIsObject(e){if(!ce.TypeIsObject(e)){throw new TypeError("target must be an object")}};var En={apply:function apply(){return ce.Call(ce.Call,null,arguments)},construct:function construct(e,t){if(!ce.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!ce.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return ce.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){In(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){In(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(En,{ownKeys:function ownKeys(e){In(e);var t=Object.getOwnPropertyNames(e);if(ce.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var Pn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(En,{isExtensible:function isExtensible(e){In(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){In(e);return Pn(function(){return Object.preventExtensions(e)})}})}if(s){var Cn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return Cn(o,t,r)}if("value"in n){return n.value}if(n.get){return ce.Call(n.get,r)}return void 0};var Mn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Mn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!ce.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ae.defineProperty(o,r,{value:n})}else{return ae.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}}if(i.set){t(i.set,o,n);return true}return false};Object.assign(En,{defineProperty:function defineProperty(e,t,r){In(e);return Pn(function(){return Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){In(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){In(e);var r=arguments.length>2?arguments[2]:e;return Cn(e,t,r)},set:function set(e,t,r){In(e);var n=arguments.length>3?arguments[3]:e;return Mn(e,t,r,n)}})}if(Object.getPrototypeOf){var xn=Object.getPrototypeOf;En.getPrototypeOf=function getPrototypeOf(e){In(e);return xn(e)}}if(Object.setPrototypeOf&&En.getPrototypeOf){var Nn=function(e,t){var r=t;while(r){if(e===r){return true}r=En.getPrototypeOf(r)}return false};Object.assign(En,{setPrototypeOf:function setPrototypeOf(e,t){In(e);if(t!==null&&!ce.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ae.getPrototypeOf(e)){return true}if(ae.isExtensible&&!ae.isExtensible(e)){return false}if(Nn(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var An=function(e,t){if(!ce.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){ne(S.Reflect,e,t)}}};Object.keys(En).forEach(function(e){An(e,En[e])});var Rn=S.Reflect.getPrototypeOf;if(c&&Rn&&Rn.name!=="getPrototypeOf"){ne(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(Rn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){ne(S.Reflect,"setPrototypeOf",En.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){ne(S.Reflect,"defineProperty",En.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){ne(S.Reflect,"construct",En.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var _n=Date.prototype.toString;var kn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return ce.Call(_n,this)};ne(Date.prototype,"toString",kn)}var Ln={anchor:function anchor(e){return ce.CreateHTML(this,"a","name",e)},big:function big(){return ce.CreateHTML(this,"big","","")},blink:function blink(){return ce.CreateHTML(this,"blink","","")},bold:function bold(){return ce.CreateHTML(this,"b","","")},fixed:function fixed(){return ce.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return ce.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return ce.CreateHTML(this,"font","size",e)},italics:function italics(){return ce.CreateHTML(this,"i","","")},link:function link(e){return ce.CreateHTML(this,"a","href",e)},small:function small(){return ce.CreateHTML(this,"small","","")},strike:function strike(){return ce.CreateHTML(this,"strike","","")},sub:function sub(){return ce.CreateHTML(this,"sub","","")},sup:function sub(){return ce.CreateHTML(this,"sup","","")}};l(Object.keys(Ln),function(e){var r=String.prototype[e];var n=false;if(ce.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){ne(String.prototype,e,Ln[e])}});var Fn=function(){if(!oe){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e($())!=="undefined"){return true}if(e([$()])!=="[null]"){return true}var t={a:$()};t[$()]=true;if(e(t)!=="{}"){return true}return false}();var Dn=a(function(){if(!oe){return true}return JSON.stringify(Object($()))==="{}"&&JSON.stringify([Object($())])==="[{}]"});if(Fn||!Dn){var zn=JSON.stringify;ne(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=ce.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(re.symbol(n)){return Nt({})(n)}else{return n}}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return zn.apply(this,o)})}return S});
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(j).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Se(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,we)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Se(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Se(this,e,Ce),!1},trigger:function(){return Se(this,e),!0},_default:function(){return!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return Ee(this,e,t,n,r)},one:function(e,t,n,r){return Ee(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){S.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Me=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ie=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Pe.test(a)&&Ie.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var Be=["Webkit","Moz","ms"],$e=E.createElement("div").style,_e={};function ze(e){var t=S.cssProps[e]||_e[e];return t||(e in $e?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Be.length;while(n--)if((e=Be[n]+t)in $e)return e}(e)||e)}var Ue=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ve={position:"absolute",visibility:"hidden",display:"block"},Ge={letterSpacing:"0",fontWeight:"400"};function Ye(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Qe(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Je(e,t,n){var r=Re(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Qe(e,t,n||(i?"border":"content"),o,r,a)+"px"}function Ke(e,t,n,r,i){return new Ke.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Xe.test(t),l=e.style;if(u||(t=ze(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Xe.test(t)||(t=ze(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ge&&(i=Ge[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ue.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Je(e,u,n):Me(e,Ve,function(){return Je(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Qe(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Qe(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Ye(0,t,s)}}}),S.cssHooks.marginLeft=Fe(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Me(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Ye)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=Ke).prototype={constructor:Ke,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=Ke.propHooks[this.prop];return e&&e.get?e.get(this):Ke.propHooks._default.get(this)},run:function(e){var t,n=Ke.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ke.propHooks._default.set(this),this}}).init.prototype=Ke.prototype,(Ke.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[ze(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ke.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=Ke.prototype.init,S.fx.step={};var Ze,et,tt,nt,rt=/^(?:toggle|show|hide)$/,it=/queueHooks$/;function ot(){et&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(ot):C.setTimeout(ot,S.fx.interval),S.fx.tick())}function at(){return C.setTimeout(function(){Ze=void 0}),Ze=Date.now()}function st(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ut(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function lt(o,e,t){var n,a,r=0,i=lt.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=Ze||at(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:Ze||at(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=lt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ut,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(lt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],lt.tweeners[n]=lt.tweeners[n]||[],lt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],rt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ut(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?lt.prefilters.unshift(e):lt.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=lt(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&it.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(st(r,!0),e,t,n)}}),S.each({slideDown:st("show"),slideUp:st("hide"),slideToggle:st("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(Ze=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),Ze=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){et||(et=!0,ot())},S.fx.stop=function(){et=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},tt=E.createElement("input"),nt=E.createElement("select").appendChild(E.createElement("option")),tt.type="checkbox",y.checkOn=""!==tt.value,y.optSelected=nt.selected,(tt=E.createElement("input")).value="t",tt.type="radio",y.radioValue="t"===tt.value;var ct,ft=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ct={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=ft[t]||S.find.attr;ft[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=ft[o],ft[o]=r,r=null!=a(e,t,n)?o:null,ft[o]=i),r}});var pt=/^(?:input|select|textarea|button)$/i,dt=/^(?:a|area)$/i;function ht(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function vt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,gt(this)))});if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,gt(this)))});if(!arguments.length)return this.attr("class","");if((e=vt(t)).length)while(n=this[u++])if(i=gt(n),r=1===n.nodeType&&" "+ht(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ht(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,gt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=vt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=gt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ht(gt(n))+" ").indexOf(t))return!0;return!1}});var yt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(yt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:ht(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var mt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!mt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,mt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,xt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,xt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var bt=C.location,wt={guid:Date.now()},Tt=/\?/;S.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Ct=/\[\]$/,Et=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,kt=/^(?:input|select|textarea|keygen)/i;function At(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||Ct.test(n)?i(n,t):At(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)At(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)At(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&kt.test(this.nodeName)&&!St.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(Et,"\r\n")}}):{name:t.name,value:n.replace(Et,"\r\n")}}).get()}});var Nt=/%20/g,jt=/#.*$/,Dt=/([?&])_=[^&]*/,qt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Lt=/^(?:GET|HEAD)$/,Ht=/^\/\//,Ot={},Pt={},Rt="*/".concat("*"),Mt=E.createElement("a");function It(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Wt(t,i,o,a){var s={},u=t===Pt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Ft(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Mt.href=bt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ft(Ft(e,S.ajaxSettings),t):Ft(S.ajaxSettings,e)},ajaxPrefilter:It(Ot),ajaxTransport:It(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=qt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||bt.href)+"").replace(Ht,bt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Mt.protocol+"//"+Mt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Wt(Ot,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Lt.test(v.type),f=v.url.replace(jt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Nt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Tt.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Dt,"$1"),o=(Tt.test(f)?"&":"?")+"_="+wt.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+Rt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Wt(Pt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&S.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},$t=S.ajaxSettings.xhr();y.cors=!!$t&&"withCredentials"in $t,y.ajax=$t=!!$t,S.ajaxTransport(function(i){var o,a;if(y.cors||$t&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Bt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=ht(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Vt=C.jQuery,Gt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Gt),e&&C.jQuery===S&&(C.jQuery=Vt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S});
/*
* jQuery throttle / debounce - v1.1 - 3/7/2010
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
/*!
* imagesLoaded PACKAGED v4.1.4
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
/*! lz-string-1.3.3-min.js | (c) 2013 Pieroxy | Licensed under a WTFPL license */
var LZString={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_f:String.fromCharCode,compressToBase64:function(e){if(e==null)return"";var t="";var n,r,i,s,o,u,a;var f=0;e=LZString.compress(e);while(f<e.length*2){if(f%2==0){n=e.charCodeAt(f/2)>>8;r=e.charCodeAt(f/2)&255;if(f/2+1<e.length)i=e.charCodeAt(f/2+1)>>8;else i=NaN}else{n=e.charCodeAt((f-1)/2)&255;if((f+1)/2<e.length){r=e.charCodeAt((f+1)/2)>>8;i=e.charCodeAt((f+1)/2)&255}else r=i=NaN}f+=3;s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+LZString._keyStr.charAt(s)+LZString._keyStr.charAt(o)+LZString._keyStr.charAt(u)+LZString._keyStr.charAt(a)}return t},decompressFromBase64:function(e){if(e==null)return"";var t="",n=0,r,i,s,o,u,a,f,l,c=0,h=LZString._f;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(c<e.length){u=LZString._keyStr.indexOf(e.charAt(c++));a=LZString._keyStr.indexOf(e.charAt(c++));f=LZString._keyStr.indexOf(e.charAt(c++));l=LZString._keyStr.indexOf(e.charAt(c++));i=u<<2|a>>4;s=(a&15)<<4|f>>2;o=(f&3)<<6|l;if(n%2==0){r=i<<8;if(f!=64){t+=h(r|s)}if(l!=64){r=o<<8}}else{t=t+h(r|i);if(f!=64){r=s<<8}if(l!=64){t+=h(r|o)}}n+=3}return LZString.decompress(t)},compressToUTF16:function(e){if(e==null)return"";var t="",n,r,i,s=0,o=LZString._f;e=LZString.compress(e);for(n=0;n<e.length;n++){r=e.charCodeAt(n);switch(s++){case 0:t+=o((r>>1)+32);i=(r&1)<<14;break;case 1:t+=o(i+(r>>2)+32);i=(r&3)<<13;break;case 2:t+=o(i+(r>>3)+32);i=(r&7)<<12;break;case 3:t+=o(i+(r>>4)+32);i=(r&15)<<11;break;case 4:t+=o(i+(r>>5)+32);i=(r&31)<<10;break;case 5:t+=o(i+(r>>6)+32);i=(r&63)<<9;break;case 6:t+=o(i+(r>>7)+32);i=(r&127)<<8;break;case 7:t+=o(i+(r>>8)+32);i=(r&255)<<7;break;case 8:t+=o(i+(r>>9)+32);i=(r&511)<<6;break;case 9:t+=o(i+(r>>10)+32);i=(r&1023)<<5;break;case 10:t+=o(i+(r>>11)+32);i=(r&2047)<<4;break;case 11:t+=o(i+(r>>12)+32);i=(r&4095)<<3;break;case 12:t+=o(i+(r>>13)+32);i=(r&8191)<<2;break;case 13:t+=o(i+(r>>14)+32);i=(r&16383)<<1;break;case 14:t+=o(i+(r>>15)+32,(r&32767)+32);s=0;break}}return t+o(i+32)},decompressFromUTF16:function(e){if(e==null)return"";var t="",n,r,i=0,s=0,o=LZString._f;while(s<e.length){r=e.charCodeAt(s)-32;switch(i++){case 0:n=r<<1;break;case 1:t+=o(n|r>>14);n=(r&16383)<<2;break;case 2:t+=o(n|r>>13);n=(r&8191)<<3;break;case 3:t+=o(n|r>>12);n=(r&4095)<<4;break;case 4:t+=o(n|r>>11);n=(r&2047)<<5;break;case 5:t+=o(n|r>>10);n=(r&1023)<<6;break;case 6:t+=o(n|r>>9);n=(r&511)<<7;break;case 7:t+=o(n|r>>8);n=(r&255)<<8;break;case 8:t+=o(n|r>>7);n=(r&127)<<9;break;case 9:t+=o(n|r>>6);n=(r&63)<<10;break;case 10:t+=o(n|r>>5);n=(r&31)<<11;break;case 11:t+=o(n|r>>4);n=(r&15)<<12;break;case 12:t+=o(n|r>>3);n=(r&7)<<13;break;case 13:t+=o(n|r>>2);n=(r&3)<<14;break;case 14:t+=o(n|r>>1);n=(r&1)<<15;break;case 15:t+=o(n|r);i=0;break}s++}return LZString.decompress(t)},compress:function(e){if(e==null)return"";var t,n,r={},i={},s="",o="",u="",a=2,f=3,l=2,c="",h=0,p=0,d,v=LZString._f;for(d=0;d<e.length;d+=1){s=e.charAt(d);if(!Object.prototype.hasOwnProperty.call(r,s)){r[s]=f++;i[s]=true}o=u+s;if(Object.prototype.hasOwnProperty.call(r,o)){u=o}else{if(Object.prototype.hasOwnProperty.call(i,u)){if(u.charCodeAt(0)<256){for(t=0;t<l;t++){h=h<<1;if(p==15){p=0;c+=v(h);h=0}else{p++}}n=u.charCodeAt(0);for(t=0;t<8;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}}else{n=1;for(t=0;t<l;t++){h=h<<1|n;if(p==15){p=0;c+=v(h);h=0}else{p++}n=0}n=u.charCodeAt(0);for(t=0;t<16;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}}a--;if(a==0){a=Math.pow(2,l);l++}delete i[u]}else{n=r[u];for(t=0;t<l;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}}a--;if(a==0){a=Math.pow(2,l);l++}r[o]=f++;u=String(s)}}if(u!==""){if(Object.prototype.hasOwnProperty.call(i,u)){if(u.charCodeAt(0)<256){for(t=0;t<l;t++){h=h<<1;if(p==15){p=0;c+=v(h);h=0}else{p++}}n=u.charCodeAt(0);for(t=0;t<8;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}}else{n=1;for(t=0;t<l;t++){h=h<<1|n;if(p==15){p=0;c+=v(h);h=0}else{p++}n=0}n=u.charCodeAt(0);for(t=0;t<16;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}}a--;if(a==0){a=Math.pow(2,l);l++}delete i[u]}else{n=r[u];for(t=0;t<l;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}}a--;if(a==0){a=Math.pow(2,l);l++}}n=2;for(t=0;t<l;t++){h=h<<1|n&1;if(p==15){p=0;c+=v(h);h=0}else{p++}n=n>>1}while(true){h=h<<1;if(p==15){c+=v(h);break}else p++}return c},decompress:function(e){if(e==null)return"";if(e=="")return null;var t=[],n,r=4,i=4,s=3,o="",u="",a,f,l,c,h,p,d,v=LZString._f,m={string:e,val:e.charCodeAt(0),position:32768,index:1};for(a=0;a<3;a+=1){t[a]=a}l=0;h=Math.pow(2,2);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}switch(n=l){case 0:l=0;h=Math.pow(2,8);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}d=v(l);break;case 1:l=0;h=Math.pow(2,16);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}d=v(l);break;case 2:return""}t[3]=d;f=u=d;while(true){if(m.index>m.string.length){return""}l=0;h=Math.pow(2,s);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}switch(d=l){case 0:l=0;h=Math.pow(2,8);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}t[i++]=v(l);d=i-1;r--;break;case 1:l=0;h=Math.pow(2,16);p=1;while(p!=h){c=m.val&m.position;m.position>>=1;if(m.position==0){m.position=32768;m.val=m.string.charCodeAt(m.index++)}l|=(c>0?1:0)*p;p<<=1}t[i++]=v(l);d=i-1;r--;break;case 2:return u}if(r==0){r=Math.pow(2,s);s++}if(t[d]){o=t[d]}else{if(d===i){o=f+f.charAt(0)}else{return null}}u+=o;t[i++]=f+o.charAt(0);r--;f=o;if(r==0){r=Math.pow(2,s);s++}}}};if(typeof module!=="undefined"&&module!=null){module.exports=LZString}
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/dist/FileSaver.js */
(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)});
/*! seedrandom.js v2.3.3 | (c) 2013 David Bau, all rights reserved. | Licensed under a BSD-style license */
!function(a,b,c,d,e,f,g,h,i){function j(a){var b,c=a.length,e=this,f=0,g=e.i=e.j=0,h=e.S=[];for(c||(a=[c++]);d>f;)h[f]=f++;for(f=0;d>f;f++)h[f]=h[g=r&g+a[f%c]+(b=h[f])],h[g]=b;(e.g=function(a){for(var b,c=0,f=e.i,g=e.j,h=e.S;a--;)b=h[f=r&f+1],c=c*d+h[r&(h[f]=h[g=r&g+b])+(h[g]=b)];return e.i=f,e.j=g,c})(d)}function k(a,b){var c,d=[],e=typeof a;if(b&&"object"==e)for(c in a)try{d.push(k(a[c],b-1))}catch(f){}return d.length?d:"string"==e?a:a+"\0"}function l(a,b){for(var c,d=a+"",e=0;e<d.length;)b[r&e]=r&(c^=19*b[r&e])+d.charCodeAt(e++);return n(b)}function m(c){try{return a.crypto.getRandomValues(c=new Uint8Array(d)),n(c)}catch(e){return[+new Date,a,(c=a.navigator)&&c.plugins,a.screen,n(b)]}}function n(a){return String.fromCharCode.apply(0,a)}var o=c.pow(d,e),p=c.pow(2,f),q=2*p,r=d-1,s=c["seed"+i]=function(a,f,g){var h=[],r=l(k(f?[a,n(b)]:null==a?m():a,3),h),s=new j(h);return l(n(s.S),b),(g||function(a,b,d){return d?(c[i]=a,b):a})(function(){for(var a=s.g(e),b=o,c=0;p>a;)a=(a+c)*d,b*=d,c=s.g(1);for(;a>=q;)a/=2,b/=2,c>>>=1;return(a+c)/b},r,this==c)};l(c[i](),b),g&&g.exports?g.exports=s:h&&h.amd&&h(function(){return s})}(this,[],Math,256,6,52,"object"==typeof module&&module,"function"==typeof define&&define,"random");
/*! console_hack.js | (c) 2015 Thomas Michael Edwards | Licensed under SugarCube's Simple BSD license */
!function(){for(var methods=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"],length=methods.length,noop=function(){},console=window.console=window.console||{};length--;){var method=methods[length];console[method]||(console[method]=noop)}}();
}else{document.documentElement.setAttribute("data-init", "lacking");}
</script>
<style id="style-normalize" type="text/css">/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}</style>
<style id="style-init-screen" type="text/css">@-webkit-keyframes init-loading-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes init-loading-spin{0%{-o-transform:rotate(0);transform:rotate(0)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes init-loading-spin{0%{-webkit-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}#init-screen{display:none;z-index:500000;position:fixed;top:0;left:0;height:100%;width:100%;font:28px/1 Helmet,Freesans,sans-serif;font-weight:700;color:#eee;background-color:#111;text-align:center}#init-screen>div{display:none;position:relative;margin:0 auto;max-width:1136px;top:25%}html[data-init=lacking] #init-screen,html[data-init=loading] #init-screen,html[data-init=no-js] #init-screen{display:block}html[data-init=lacking] #init-lacking,html[data-init=no-js] #init-no-js{display:block;padding:0 1em}html[data-init=no-js] #init-no-js{color:red}html[data-init=loading] #init-loading{display:block;border:24px solid transparent;border-radius:50%;border-top-color:#7f7f7f;border-bottom-color:#7f7f7f;width:100px;height:100px;-webkit-animation:init-loading-spin 2s linear infinite;-o-animation:init-loading-spin 2s linear infinite;animation:init-loading-spin 2s linear infinite}html[data-init=loading] #init-loading>div{text-indent:9999em;overflow:hidden;white-space:nowrap}html[data-init=loading] #passages,html[data-init=loading] #ui-bar{display:none}</style>
<style id="style-font" type="text/css">@font-face{font-family:tme-fa-icons;src:url('data:application/octet-stream;base64,d09GRgABAAAAADLAAA8AAAAAWHgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkIY21hcAAAAdgAAAG8AAAF3rob9jFjdnQgAAADlAAAABMAAAAgBtX/BGZwZ20AAAOoAAAFkAAAC3CKkZBZZ2FzcAAACTgAAAAIAAAACAAAABBnbHlmAAAJQAAAI6gAADv+gJOpzGhlYWQAACzoAAAAMwAAADYY1IZaaGhlYQAALRwAAAAgAAAAJAfCBClobXR4AAAtPAAAAJEAAAFMBfb/0WxvY2EAAC3QAAAAqAAAAKhjiHI5bWF4cAAALngAAAAgAAAAIAFjDA9uYW1lAAAumAAAAY0AAAL94+zEpHBvc3QAADAoAAACHAAAA11cG/YjcHJlcAAAMkQAAAB6AAAAhuVBK7x4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJgYYAAkDwymzEnMz2RgQPGA8qxgGkOIGaDiAIAJjsFSAB4nGNgZNZgnMDAysDAVMW0h4GBoQdCMz5gMGRkAooysDIzYAUBaa4pDA4vGF4EMgf9z2KIYg5imAYUZgTJAQDSIQumAHic7dTVbltRAETR7dpNCikzQ8rMzMxt/M39mHnsU1/TfZz5jFpaV7pXJunMDLAZmOqaZjD5y4Tx+uPTyeL5lG2L5zN+L94zG8+ztr7ulXH1fra4bvK9M79xiWW2sNXPbWeFHexkF7vZw172sZ8DHOQQhznCUY5xnBOc5BSnOcNZVjnHeS5wkUtc5gpX/f3r3OAmt7jNHe5yj/s84CGPeMwTnvKM57zgJa94zRve8o73fOAjn/jMF77yje/84Ce/WGPun1zi/2tlXKbp3Xyc44bFyZanSWokJDXOOjXSk/LUSXn+pEwCKTNBaqQqZU5IjX+XMjukTBEp80TKZJEyY6RMGylzR8oEkjKLpEwlKfNJyqSSMrOkTC8pc0zKRJMy26RMOSnzTsrkk7IDpGwDKXtByoaQsiukbA0p+0PKJpGyU6RsFyl7RmosQcrukbKFpOwjKZtJyo6Ssq2k7C0pG0zKLpOy1aTsNymbTsrOk7L9pNwBUi4CKbeBlCtByr0g5XKQckNIuSak3BVSLgwpt4aUq0PK/SHlEpFyk0i5TqTcKVIuFim3i5QrRso9I+WykXLjXOYNzP8BuAPUwHicY2BAAxIQyBz0PwuEARJsA90AeJytVml300YUHXlJnIQsJQstamHExGmwRiZswYAJQbJjIF2crZWgixQ76b7xid/gX/Nk2nPoN35a7xsvJJC053Cak6N3583VzNtlElqS2AvrkZSbL8XU1iaN7DwJ6YZNy1F8KDt7IWWKyd8FURCtltq3HYdERCJQta6wRBD7HlmaZHzoUUbLtqRXTcotPekuW+NBvVXffho6yrE7oaRmM3RoPbIlVRhVokimPVLSpmWo+itJK7y/wsxXzVDCiE4iabwZxtBI3htntMpoNbbjKIpsstwoUiSa4UEUeZTVEufkigkMygfNkPLKpxHlw/yIrNijnFawS7bT/L4vead3OT+xX29RtuRAH8iO7ODsdCVfhFtbYdy0k+0oVBF213dCbNnsVP9mj/KaRgO3KzK90IxgqXyFECs/ocz+IVktnE/5kkejWrKRE0HrZU7sSz6B1uOIKXHNGFnQ3dEJEdT9kjMM9pg+Hvzx3imWCxMCeBzLekclnAgTKWFzNEnaMHJgJWWLKqn1rpg45XVaxFvCfu3a0ZfOaONQd2I8Ww8dWzlRyfFoUqeZTJ3aSc2jKQ2ilHQmeMyvAyg/oklebWM1iZVH0zhmxoREIgIt3EtTQSw7saQpBM2jGb25G6a5di1apMkD9dyj9/TmVri501PaDvSzRn9Wp2I62AvT6WnkL/Fp2uUiRen66Rl+TOJB1gIykS02w5SDB2/9DtLL15YchdcG2O7t8yuofdZE8KQB+xvQHk/VKQlMhZhViFZAYq1rWZbJ1awWqcjUd0OaVr6s0wSKchwXx76Mcf1fMzOWmBK+34nTsyMuPXPtSwjTHHybdT2a16nFcgFxZnlOp1mW7+s0x/IDneZZntfpCEtbp6MsP9RpgeVHOh1jeUELmnTfwZCLMOQCDpAwhKUDQ1hegiEsFQxhuQhDWBZhCMslGMLyYxjCchmGsLysZdXUU0nj2plYBmxCYGKOHrnMReVqKrlUQrtoVGpDnhJulVQUz6p/ZaBePPKGObAWSJfIml8xzpWPRuX41hUtbxo7V8Cx6m8fjvY58VLWi4U/Bf/V1lQlvWLNw5Or8BuGnmwnqjapeHRNl89VPbr+X1RUWAv0G0iFWCjKsmxwZyKEjzqdhmqglUPMbMw8tOt1y5qfw/03MUIWUP34NxQaC9yDTllJWe3grNXX27LcO4NyOBMsSTE38/pW+CIjs9J+kVnKno98HnAFjEpl2GoDrRW82ScxD5neJM8EcVtRNkja2M4EiQ0c84B5850EJmHqqg3kTuGGDfgFYW7BeSdconqjLIfuRezzKKT8W6fiRPaoaIzAs9kbYa/vQspvcQwkNPmlfgxUFaGpGDUV0DRSbqgGX8bZum1Cxg70Iyp2w7Ks4sPHFveVkm0ZhHykiNWjo5/WXqJOqtx+ZhSX752+BcEgNTF/e990cZDKu1rJMkdtA1O3GpVT15pD41WH6uZR9b3j7BM5a5puuiceel/TqtvBxVwssPZtDtJSJhfU9WGFDaLLxaVQ6mU0Se+4BxgWGNDvUIqN/6v62HyeK1WF0XEk307Ut9HnYAz8D9h/R/UD0Pdj6HINLs/3mhOfbvThbJmuohfrp+g3MGutuVm6BtzQdAPiIUetjrjKDXynBnF6pLkc6SHgY90V4gHAJoDF4BPdtYzmUwCj+Yw5PsDnzGHQZA6DLeYw2GbOGsAOcxjsMofBHnMYfMGcdYAvmcMgZA6DiDkMnjAnAHjKHAZfMYfB18xh8A1z7gN8yxwGMXMYJMxhsK/p1jDMLV7QXaC2QVWgA1NPWNzD4lBTZcj+jheG/b1BzP7BIKb+qOn2kPoTLwz1Z4OY+otBTP1V050h9TdeGOrvBjH1D4OY+ky/GMtlBr+MfJcKB5RdbD7n74n3D9vFQLkAAQAB//8AD3icrXsLcFzlleZ//v+++nb37dfte/VotVrdrW5JltuKpO6WJVluPyXbsmOEbGRjO4KVjWPZlsM4QIU4IYGlgCE2yxqKIQkJg2GreKQCTCZb1CZkiswjzOwOmSTATNVWTZLdDUwSMrVDsomD23vOf69assFAqgbk+773P4//nPOdc/5mwNjFl8WjosbaWblmxiOmIlTGYXzb11M7Z2ohAMbZCcZ5iG9prZl4whfwGju05xtttitUdwXYEUgkbQtWga5lC+XBaqJI285qpb8dVEc8Gnm5L5QM/f58yAlB399a7dD0mWAmdAqaMvBmKPKX9TdDwSjod9yhx03FAPcvI6Gk2lV33XoXUtKgL8C6Wa0WSzXbVjhg6JoqIPShCK0FOvOuE48K1V4B1VUQAVevugmP7Fz2CmTzW5/8+ZGP/+Kp7h/8oI4MuOZ7M5B9IvujH2Wf+PnCAjzn8ZK6AieMKRcvXnxWWSWCzGARlPcqtqs21WZzEBFgYIVDAYWzVJIrXBlH+hXGlWNM00GAJmYZ8sKBzTJFVZVppijqDFMVdTIWLa0o5JrdaHusPZGIG1IjFhQGK2mAZEe56kJnR1bTY7ZT7eivFGODBTdma3pHtlCNDVbwmgMHx/aO4R8ffeet5/ZCG6TfuV03IaSJU3oIzKsGO9+5PV+BwU5xqnOQx1aO8fW71yvD9fPn55/fA22PmsaFvfSgwZ8wzPiFvZ2DUMnzJ2hHVDMmHucPsSRrq7UQo4DMAV/AW7CANw/Zru3NIx20bBEpXwukArlxxOPReibaG63/SyQyiftzcBy3k1HuOHgjEgFHnkYfh4VodDJC4138Ff8hv5PlWbrWmm2O6grNEgGNCWGnbFtRm1Z04gzQPPWvkqMWF4eWU8DB267Df+gNe84bBvfRpfNI5Ny5yAmHDh5/PPLuByMlekDS9DsRR73nWHetwBShSO5PqCBQONO4E2wGlSvYZG6gMzeQ09SWFZC0tWION3oOVVXGTbGM+hrAzQj0O25yoN8R8YzzRsaZdzLwhpsGPEm783hAJ9+kq286eDX5pn/VydDjvk7i8EuchU21JJ3DNOqFzeABmywPcNXxhu/wB+3whrqwVw7Cn1j8vPfdDH6O7PR3fDV/Cb85wua/waSit309grZJHHOhHEQ9CA7zTGVCUb0ZvXzc1lrRe5Af+4An0aSL9op0IU9y6vRFtAYGKy7KJGFbQrdg2dXqGAwWilld0zUy9xLqd6A/zeFuy7gzYFmBOwOhZ6NNhZakm8YTI7S1pyM1mM032V26qevXGlzZ8+TKvROlB/BBkO9ACDalB7OZuBnuC5tRcAItpalENNOfhajVH1A2a1HjbHZ4N4r54oWLz4qPoe4jrMo2sonapm5QRQBQ3XycKVxwRRxjQuVCnWc6mrzOZ5FvBiraOmia5FubYRpok8n0ioRTKOQMNbWiszxYWAFZrQ1sB+dDJTFYghzyiBN3oB857ndIAha4Se/+YGUtjAkXXUO2xPE2eoe3TWPeMOXmzNi+j9w1HghvVbSAmu4c6nFac6MgbzXFU2baDr1241+98TfHtU/9t7df+MzU4msmfPYj06Wbw8Gqohda0/FkSyiyvtPGG/FsMKq1pLqmPvndkye/+y+08eYIHEJZpFmJra2Nop/VWuKcCwPvgRhnGlOFps6iIdAEmFVAKh53jblZyBU6nAFdbfX03tGwioZ9oGnEyDSWTQCyFzhoR+s/jdjgWLmc3L2K21zEmXCsM5aDm4g9Ny5v0PZVb+dY9Rcd/sl5eTiPj0nTaeiU+BhhW2qbuzJcUy2Nc2gCrjBkxWCqZiArGgOuwSzjAlDb5L91XfpvfYbpij6ZRIUWYoVcLqC2+UqNLddsMrekY3GZztVl2uQjpl4xjedIM+Uybc/r5viShuHgcgXuwQtpuoMHz8utCe/s8S+Y/7xMaYu2DX1yDrez3lp3cyyKdop+HLcLi878Uh9SKOSlj73cOIUFRVKVKHhaSS9JP452RCcYoJ3w85bz8Ckp9VN4xeZj9atpH4FnPCV4OtiDNIVYCrWwsbauK81VxUlaQnA+riFBisoUsiU0LbQpASCmmRAwg1MNJoH19uQ6WpriUV1jIQjphA5QjosiTfiy1tF+kPJKMTFYpAu6lkx40odnTv7VjYtC/QtTJyGH9HmMnKamGrcaqmaagRsMUwR9WeLmwsQREvIRevSvYa8uVFXo9Sc0w5A8/Rp5+jcxhXLuYAOIx/pbY+ggFp0FV8lNoLNAEQvyDkwBZR9T1ZC6xR0qFgsybix3DJcR7iIGwCsCHHQM0nYKVSBXQZPnqG7KDZiqrn8K524gpN9ghAx42k4GsvF3nohnA0kbnglkC9mrl7h4Db2TommKcVE1QOPRd97K5WJxsKO5nIjHbHtx/og3kK8iWys1he/EkKlqCbFOB6iKQp5Q5Yp6DB0AsjmPvHEFSGsoFraPaVpI2zLc2lmudErjJ/eeQwbKPoRBZulcwhwXYc6i1SdiEpiCF+KrFOIrAzKaHdhQ79tw4MAGuJv4rt8sQQu80jloGnnDfNVJBa+vn1WjSg1d8NHrg44FbTgdJ5+T77yy/gDI5wY7633yTbI7+CdyMDyEL2paDd0BvZjyfIYXH2/H+aqjDfXUisgnk3rFYMePoyZBegWanQpM5hKdlUSU1JnoQH2iG1d90IYADi0JPV2/oxMEeB7apm+aBngFw/ObMjzHzv7dgzyOh48fHZnmO9c8Wv+2RAGwHiP20UNnzx46mvYxyaMixDpZX22lQqQgRDqG4kYcMo92cpypAOo0Ti+iSYXJRGc5l8wvQhPfqpE0SYa7nDwkeQyh26OOlbecqVumoCwJ8+mDm+9/5T4eOyOt+4wk8WjavYTIG+7nD5Li2cWv8zGkMYoz51q2u3Y1JQSwfcumSn9JUxW0CZIWQ5isqKCo8zoGFPybx/lyHD2w4AaCBw7Ap1HIxAaHyZlr1tXG1owMt7h5Ox5QmxF4Iv6vDhaQoTFAYADuYIlnLa7b7RwtiOBDtVK1dbyCMXXxn5azOIIKfLFKaQP9K3HKIMYEQosvhkIWH23TQ9wIpCq9M4WxycnJsQIUYrEJ/bPGuOZohfHVzdmMaAmHm418c7DU3xdoyYPebFktPJtpHu7fefjw4R0VHiNTa06ZUTPe09a1sdTUVNrYtbo3nth11VW7tBa1d/U1a1t71rdG2u1IJNkWDYdbUs0pnnFT+OloWzISsdsjqVpvy9prqrNjed41POfPx2+J7TIXaWP5Wgf5bvToBEvpppQYOXPOJoda4gTQE6TsNK8sAvUSSHBFygfnfM9wL+8aK/Bddv0tZ8SufyKZ7ml7s20iCWdsPpPu4YVaXuur/2M6WX8riReTE21vtPUAnn4iyTxdf0vJ+/QM0pwsUL4D5BmUBQEeXpaU4W6RtExzN1In7eT9qHPpIoUdqAzSrdyHIPo1JNRps1uioCWJyIm2U/JG8oO4aZMXozF8b4RupRd5JJv7Nn8ZeUyxjlrakhJHcwO2gHMUDgGLR0MmS0GrIoMRWos0K81LUnPZYgmkw6sM8HtCoQTaT9y0Wu3f/MZuCYfijhMPhUVQNdL2hY8kMroS/8UvEqqeSfC/xzPV07k3vsqyrL+2ykYnhJjEz45OLIdbu4ncrbrWhImzltU7oqqaXAEdMWiHxPsSdvuF70K6/xf6FejjL13YBvFVP+UXrkwnyelZjBcltoLypQIoEmsoiDUw4C2QFS/I/J6yx5ybWOOqaMad0kJlKo+ElAdLqvRTMqOsgucuM64j3hgHU1H1mIkQ084Oje3eXT1lZwL1nwaD0BZMNfFTcHpv+sf7v6LEo4oZMlRbFNqH9tb60nEN0UkQ0mYawZNpR878eFuD1lWsl/Jb9J5iMbPlDKnkh3raBmS66U1M9Jm5rKUmMel1dKLOcxrVSgf5dJqU4o0g0pJyTlV37x4bytpCATOG8VUT4+m9cPoURiakE34ZMes/wbB0Roun+2p7h9oLSlwzQqZq2eIr+xe2/Rhp5QF8hHn5Hh/FfM9ibs32UrNG+l22ZbrnJ8N+fERAcD6YCp6nuPc2Aq/vWXiMfzKaye/BDfzTLPwe33MT8ns4P/y0uiLBdyZw3qRvNvGZegjF6H+escXvreOnkD7zm7IkADTbJEkU4sdw1jmwzpTj42smHLB82ijenjfx9YsXkccR+B5+I1azGtQk+4maTpnLlsBL75E7O1IPea+mzfPmUwQt00FJoG+nPxN/zruZzZprTljyx2GpXiHdYWBZtcINeB+2xVP16/GT9euDwf00TbqgK5gK7QvCmfp/wPn15WDa3BcM1l/Hy8F9wZQ31nf4Q2IjjrXyG+BnzXnMmqXiTuB5CLa01gINjvb8mesSTwHuSAEtzm8anp+uvwbdprkfhUs0wCNIxH6TP1l/vf6aPDThK0TXI5I+tjj+SX/8wIcaPxWX4y+CqsCiEIiAIzhsKrgfh+6qv+4L4RETPl6/zqMKukki9AA96OseZb3Zk7UKVKxZKt65tpR1J9p1sTGgP5Z4ah+KEzl73R/xEfr+I8H5fchlN/Jr0n0c3fSGkrz+vbhd5m2ZWltThDeKUaKh3WTZXWauS+WomBdMkjGvOCRuT9YfcIZxk0x24/5cT3q8redxe8TpTsLn03b9LIaFo/I0eQ7uxtjQm6rffI4elnTcJfbwX/qRFyG+Vw+SaJdyFIpugk0WXCcnaZFo1323viNAWHZPvk1+ugfjTf2sbcPR5LDT442bhwPj6Z5z9qi9wr8B85Ji51yXb3tISxlpSUtaZEYnFX8ZbHI6C8vk4ll2h5/YdRQbM0CUbSmXHsd5rH5zWz7fBnc/5iA1NLANwyQZ2+5JjiYfQ4mle+BxJA1prT9g+770dv4zTz9RnTPp+JlY4DJKoroOucmyT4fnsGIeFC3H9EtmB+qnGyP6413tPvs4BhIwipskDKakeIg+KKTgbl92JBkkHn1J3c8t+9ia2vBKhMFkGBJtEjrGDIzKE1SeAgTJiDAVRYpKmSGwMlksJor5gUWgjKlXYS0gurS4neaYflXJnaWBUjDKNAVhkWoF1WhHz7uJ2PapE8NHJkulySPD62/qVmLapMq10a997JqvnphQarc8dO3UQ2smYr38pfOWszK6fTs+eBKfHy4j8t2uWNrWnbDx5CNfe+TkxrHVE/EEW4ynxM9H2FhtpAeE2tnGFUH1J4xXChxD5hACLNXbLgOA3WU353rI37Y44SipbwdxwED/mEC0rOmuIzmlGkw7SBzNxZ6NN3519+zXRhV1Uosp3TdtGD68s4eXJo8uzHVtjyXc85gC9MYmRh+euuaRk+vhAG43Tm3RLGW7Clp52Oesq3N7dKVjnW9KxCdWjyFvi/nUs+Ja5CnPxtn+2t4NnVwLrELw76JqDMz1MacMGJoR0I5RVsA1lR/DLEdonLJLQWnOMcSamKlrszLnWWZ3mzcVOjsrnYWynTfVNmQ6aQFxrWtL9SQtgjqsojbxf5lp+qquSF1rVGyk02qZZEEKRkPdlv9ff3LVQ6MTFMas8xSft3fNVbd+vqg1KaF5w7RwBsirUye24UVXDS3oIcj/nz+56mF6qQlUAQ++gGoNytcxFG7P98DWMXMoHIL/6l/Z7p1riv8ko2oiyiru129WsSrmUjO1XdtWc0Pr7miOoWOV9YUQ07WQPmsCisWYDge5puAUAI3NIk6EQACmaQ+BGRaAwOSemV1TH90+vnlDrZBNFOi/nEUlLL96lYx5VZLqB5zDQLFQzGm6KuUX89L6YqxRuaPsCwXYTlJE1EVJt9ycWTo8bereoW7Wv38ewfOzmgI/N42Kn53LatjTxUCv85zbEyg+Y5hTcDddq99M2ysc8/51lABfjZ++8KvSxvUlnpCj7U+mIG3vR8yhXSbXEbaB3cDmatdds4lrhi9Z8hskNo2hkI+RQHWN6fMIUwKGFZiNhDmCNq6BoR1gejCoTzNdD86woB6cPDh33YFr91w99dHJLePr1tp525NylKZkzJtthLplN+ADzhOxjpiN1trRPwb/vhKfqIcMg8Mr3DDqd38o4cM36y9KWa+Tsn7v4/ocj134Vcg2TZsf/ABFKH4tYwrtObZYYxoF3QiQC+PjATwUho5+W8MkQlOOqUDxnlMNjZpsfB8zjJCxZe2afKeTjXeuboqT2XcOlsACB6XROFhWch7AeNy/VsZfx4fO5Aj8EjTVRPjLdtrmTS1NX7Azce6kmjZnnHf+1iuBiG0duzsmQTiZPzfjEoTGAqZ7xqt/nmmai8gXOWb0/sG9z8vyyPNOZjKDf9DlRgmQR93keVlHOU/9RTkfH8W8ieTQzWpsc21DGRM0Xw4soAUWDEDPtMB0oS9I5qeXC0PhMySPyTWjuYFctn9JEgWLp6FSXdz71TeSgzuQBmnXVHPXGqWhIhXkF+H2lQXxVqiSO5OthN9CQQSazmBOhdycwSgoZRJvQ28Yz8SVltDiwd3PUxMLN9De1dWehinH5783RvA9xhpyoHgnWAfGvE3sqtqOFT25rGIoMB4GBa0NAaepg2KYyiwVijQqFKGtopEeUFFYgQCboj0jZ8cCk7U1Q2W3MBBLjMRi0SCKxO0od6gD6Muon6Q35JGLDZS9DEpfLNZTA4aqrmrD0rwHCAO8Cs/Ur4a3J0Lql9WU4RfBJiYySfg+cviqaczLvipt59LuhbjXflPdSuRLUUd/9VV422jRv6SF/NbehYrcQ1p2AZ6jd80L5+kSRwE3WV+OVGTs9GvnU6yLDbJsrZ2aE+iijskqPtuHgTAktgz0r+xtaUaslZRRH6FKlRJrBwO9bK+lef8YXipg7j8GSJjM+GRPmSApRv6n//T4VrH3qqbRaNxoqoxSNMfwD6MV18yPulftrX+xZ7gXeka7vMCPgf2aQ8+N4bPuaKz7lg2LIGjjTT3x4T4jvubPYKL+cFtPTxscwm0DA+yVNaMjbFNt/cE9k+sUpoxgas8Gu1qjhG7GqUu+oAFel8B2gTDcgt+54If2XXv1VVsmVvRkM4m4TnnrYCGLtt5foc4F2rWO/NrIbxENvBHUy0WJBYqEg8hbyklAxoATvupfHMCZ3wAHaASEAFz/Y7pUPh+ZumWK7z65G1KGftgMJro0NbIzrOvbm1sCuhL9tBGKtrof1aLaZkdRjS4zYhzSDTDVw4bldnrPGtubWgKGiH0adR1JuR9VI/qErSgB72HMk0emp2+anr6F7kfTydZ+zdKSO0EdDRuTqaip3xAIjapaLa1aWqg/kmqNQEiXzza3ZFbqId3euezR4Iiqbkj5j7ZEIeTX7X4n9vLvLmKL2mAXILVUp0WPoyLCVJVGQ+/yNlGhjP8PNLq4y9vNy9rPrn+eW36OaPmdX0nTF7EIpu9XPlvW1XMgOiHbSHIL1ji1nsbpBdbAyXtlTRwjSHuCqyJvkjfAVEiMe317oeLEURlNKa/CI7tfVLxLp5qb4tFwUFVYJ3R6/STHqy1Xi1R9RLvvd6lSPIba14rZoo6zwa3w/7L18OGzRwC+N7B52+HD2zYPfA8OP3iIH9kyjkd4Fdwj9x85skUPzfXhQd9cSN96mB+97yjgoYUXvZ7kxYu/UW7mL7Eo+rwKK9byTKWsSWWz6N8VBaZxB5ShgDJZHerscm0J6L1at2fNGPH4CqQNZ+gAGTeaPZVNBB52IJ7nt/uI3N/B0707Do+8vmEH37rpdTLX8eEDd47Xr564Y3aIj+67azM8Q4dwYHjpHbJoOu1/8OkH++lk4s59Y2Lo+tsevG1ukA/N3uHb9f9TbkFebNRET61I/GEuOEtdCkxKcdfISpPptmSn01kdVNF4Y4NjHF1rWnh0cxWZKImsJdKcKPPIkZR5RIoYkcJ7dh665dDOHqV/4jgc2ILXkYz77zgwypGsH1zKst/L+ir6nJVsPdtR2zaC4aQTZC9CR4p0jigDQ6gmexJcUeeXdbS0xY7WslzDdpPF8uryAPX0L+tqoVNFD5QrFi7rbKGXwYnkJGCpwra4XMZe1th6JZcOCL0VgV445HepqL+l5jVdKMHP1VeH89a/WtYaK2/9Z/g4noyFYduzjf6WpSS0FIKDRovrC4aaQ9ZArQ9b1r/K58P0Yhi/4Msl4WPhFbUuzCTBb1OitsjmCVsAn+Qs3eokTJ1FeEQlI1nGXNlfnbS8tcc/sYz4wU8vsbd+lr/UII5u7mncOYBJ+WKc+5jsETe/L03AXCfmN4IlTVnCOYiVSxyWr5h45up7d/Lpu568c7ey4zRcu6yjzk9P3Xvu3im5qb9yaf98ab2AwZIsy0Zrq6nXxkG22zi121ScGiC71IoiZwcZqlAmzUCmvaU5GgkkzaQfoNCjlKimWnxvGhtR5b4r0roYFX59BZLFsvVB5NMRIVAGQ65bJoBsRuaFbLJM/0n3nZCLlZaWYKj+efWy88WezKv+yiG5dKnN23mX2uUJbi5bY+Rc4XgxBrHXGnlYb637gwLPEuXVBmD1ViiIyzgRfl5f9NddvfoB9NDxw0clWD9KV0FbdhMMjzfc+H7uJXEG8fo6Ns4O1q5fU+KCCq16PhXG3JuJcczFw6GwEaLSBXkQwNwF4DgLs1AgHDqA2FToAXEgCDpj+jTudDaDgUmnGsaG9bWx1UOVctJGzBlDf2HJWgZyh1HHkeV53RK5WC6Gc8fr45AzKSByxwlWHShTsxydSgfVLhALUZsXOiS8w0TlVOdJ006bC4ZayA43j7cN9WCqeCgYDTvGJzKnKG0Jn7ou6KSC18Frs8FUk2Jch1frv65/kWLdMMbf2fWfDKac4HFdaYpb8HY9ZDXZhnEylEgHP7t2L6YMcO46M22b111HA113zoFBDJQUpy/WLx6B36K+MxQdmlHBKerm0BIJKqUu68GgoLY0VSpexdChJiDC1WpC9qwK1cQYpS7U0BW0JAzeMrX6P+hRI2Dy4z/hqqmb4gS3jG8GLT77P1Ue5E4wfOFTFoioAS8NYVYZhv9umJapaPV6hct6wHdkHiowcqVYnvUivt5Qa+3vK/X2dBXy2Uy6pclBE4pR4XkwxWHTtq93vH+tv0l2U6pFvbNRePWrv51uBFbBWmgHbw/upXv+0LnRc1AxL/RjLrVgmvx/yP0Fq1KJxarV2A+PHct2HDvWwbvxJIYX60/THfzHrcdGH7shQm/iC2l6E/fXRumtaPU/ybeyx+p34UkVL0LJv9PAUHOomzL1w8q9uZaYoV3SIOoujHBKKii60eKMxhJHXUMgTQW0InVqqErq22AbYN6BHOMkFCMtlpWLDDc/0NM23tYLZ1uGMX5ZrWfPtkQj+chQ61lZiH+gZSiai0Sbz4JhDbeswXd2PSVr8E/twqtr8KXdu690Q2KpI6jHMMuhBjdRdbG9iQslEae6YVhDV7gBdOiHgK4iKtSERkv4yOpAP8ZMpimmNqtSRuUFG50FDD2AeaYRNrasGS0P2LTwuGDncpRJNtZ5Fpev85SVhMY6T3ewBJrtjAFIs8XZi95eSXOXLJkW75wKaXmE7afkst1TsjBDJxP3v3I//kG6Z9R+ce7WnfcfrvHRo6fPnT46CpteTMJZ7yXKMb2XTlHieMpspgUYLz+k3UsJV/LFTWNH7vvT08eHlfWHHtx+69yLSbZMRhHWhDn2SG0oYCC3qE/B0qAKuZqPg+b5XkErlwWmYkKlMkNY2eLmUAqF3OJinmKjrPIhuK1/W/IJ6z8kh5K1D2aK+/UTWqOzkz1fC4xVOgKKKqgjZqKV9nhTGGOgUGnZjiK4Mq8jJFKOMwJ0UxSLdlO/Ymvrtq8H3/UG+nBNcG0e7Vh79xt/yOf37KklDMPYaeyc3LZ1y8hwT671KoP8BApooL9agOqYUm2FATeRptTcdeQGxexmC3pWyw2u5ZSr4l9xsLCKW+DaaeqxVskXZql+XdTggY9NDrcHk331MoTzqZSj3fGlCe3GxJQT6IsGjeBkQOGQO53v+VKSb9E1EVMQ5vKs2/R7axiimWAmiVCh4/MZ1eYrecvvMWx9oa71KppmNkVhBs6G6m+veHkw8amOFi0QFY4pTI7RrikRxSd1jgBaCeytDEHmYSsUN/HTEEyqQVQ6ppY4937ER/nPmMXaWK6W8TvQy1cj+s28wcIlS70LHqQsSoS5rB18abP70ubwv0VMqrRhJALnb2SJXZ76vg7pAPc9++oF2+s8XzLyZUMt/3ajhy35encPGy4n+lIy4Xvvou1JERMJFmTa8zqHldSwlaBa9k6VC63heDzM/3cYttfndDMiKlbIwCN7eV2F8FS61toUNZhCzHltUoKChwg/yah6WVnr8jIXJer+ultoizj14CWn/GfvvEU5uIjTdtnx8nw86K1TlzWF5QsXBhYXGlw+3rLk/5IB/G8+gzZuYUagPa8ByoUaWfiRIuA35I4CrJOMVariLtOCaKD+Ryq3gvWTwSDci1AAfVtQi7zzsmWE4F5Vq/+RPKDe8714vX5SVSVGuXjxa2K/iCyN42qyOkbLkXwt6FIjmt5sRsHC11VB2yANZQl1HL+GWjFC9Em4Vx7Q2oKTeB2+oKkeL3xEkBU015zWlri4VEBrpICIlwZ7Eso2mgSVKs8GLeJN5YsLnmn7Lh7/45KS6ncSg5I/Por8NcaWi7UW27Te2JeyTGPqPg3VS9j2CzJyeznjn1qaGXCrpsq8ro655n7+1zi3WwkBRkGuRl5e3eMyi6L0TvDJcnYwTnM14fWG5Xyh5nXVLya56BmNJRUi25oYoiGRJBGXdaO+Rb1Y9R861mlZYzodsf21K8/wZ1mC8I75Hr9viTsF+fsW5BzxTSO1IFQNz6DJvnC/lPv9L6Ab4KcvfJU6gC94y9NfMP31s7i5XY5RIn6LJqKRxjAKDuOVppiQA65ycUhaEvVeQya8dVuF6uCYKClVFADVGd5FyGt9RTWAAgg50ahiNFm2YkcCarHv3QTW/6Jna0TY0VA0FEpnMkbciKJ0RGSrrMN/XzzKfy7p3saOsq21cUl7FVQ2Dboqxg8D38S4hnxooL2bGRU1qurqAtP1Q1M7xzd3Sd4MKlx9aN7cxtWq/1OQAi25ohrK0s0ilVHwbgmKVNGWD1T/IMmcmd2u68h5MhPsLpW6Mf7ZEUPfceC+0zfhdXy9uTm5cQffujnZrMQFzmZdv+n0HyDOnl33Z4RjOcFoIL338N50IIpBxBEd9+2+7fV+vGGHQ5Y18NCTDw1EwkITYRu/JwZe9fPMI+IfxFUsyjbSqvKhAcwt168pdedsTBbTzZxTnRzRxQyV/if8uggP8y2VcpqWw7iyTmgJOy3GuEu5oK35P5xC0L6GZFag308hopD9/6r3KyoE7rKG5Tqi3D9z8s6TM/3+7mEeeCxiPDanxdWDjxmRxwKIeebmVFVePajGtTl5VaWLcGDdLdMVpbTvxD0n9pWUyvQtew1RfioQFOU/1vU/Lotg4KmyMEz9nnuM2OINTVu8ETPuuUeXPuNZUcFYEmd9rFRbYSxfVUjLiN9dFerqyvd2yKWFBEEB548Fup3m1PWnBQHUERnjyKYur0O1v1pBfvl30u2Hnj4EwydOw/CBOyd23vd4+YefpuUbvHb84elmO9HXD1P3Tq1f48YM5VZ17msH5/d1fPtmWQndeOwTd1EnZNeXbtwsoBRbcbJ29T3T0GbGDO+3J95aen6KxViWDVCHL8i5wsPAxPLfE1FDb55RmQnmCYgrEoijOyX+6KeDoE66Tt5ONjkSgheKBA9LqL6qpqchU0E7QaSYtJ3+irSVimrrmpLJU3ej0gsK6vTRXbdlEXtnb9u17Z9B+Un9m9Hg5rmoE93YF4zCPwZ31H9b/6f6b3cEgzvAgAIYO4IwfMe64Q03nOX3fXzD8Lo7brzrLtiCz85tCkajwb6N0b9LJD738MOfSxTs2x7mj3yGsEgjzzBYB9Xw2hGCYAZOzYWG2uR6nFlvxlJeEZfO732ziNsX84be4ffMGz7/gRmQb1dyTX8Q/dtArU8Hb8Wybmgod53NBlQOilxbg9mPCIstK3sTAzE7O5BMJuTKkvJgwfulBskXM0CBMymXLQrpkSoDMVmJ6aA2QjGG4SJkRk38g5sd61dtYGoQ4St+jHY+U23r4aVWOEjtseoMnDgvfwCEm2+hp6r/X91AK4zYkU3HMVEaxnR3qBfqPzn+/wHPnsOreJxjYGRgYABi1vIsoXh+m68M3MwvgCIMt5YoxkDp2P9f/2exVDAHAbkcDEwgUQAz1Qu/AHicY2BkYGAO+p/FwMBS9v/r/68sFQxAERQQDACh8QbyeJxdT0sVwzAMy49AkAxAkbT3UQiAITGAISmAYQiA9th4ttUs7Q568UeSlVidiwSkB3PUPg+ESd6ZD/+8v7HyrtzwghY89ZB6BcyrYqc6RZhw48YhaA1Wc/v1PQtdeXJ/HppUmFM597nvBVK7D+Z+E8/uQZLBgDyaz3Llvxx02S3c/Hv813JrznryZP4F+6lSfQAAAAAAAAAAUAC2ATABaAGyAfoCJAKwAzYDmgQSBFwExgUyBbQF/AZOBvwHRAe2B/YISgigCPIJGglCCWQJignACgAKQAp2CroLAAtGC4oL8gxcDPINng5iDuYPag/6EF4RIBGGEeQSShKYEyQTbhOyFAoUYhS+FVoVphYoFooXHBeGGFoYnhjGGOwZChlOGXgZrBneGhwaWhqgGtIbLhvyHHQc2B1QHZ4d/wABAAAAUwBtAAYAAAAAAAIAIAAwAHMAAAB2C3AAAAAAeJx1kN9q2zAUh39q0441YxcbjN3tXJWWEcc1lEGvWkLbXZeSu8JUV/6T2VKQlY48w95ifYa9zt6jd/vFESUUYiP5O5/O8ZEE4AP+QWH9nHKsWeEdozXv4A0uIu/Sf488IN9G3sMQPyLv0/+MfICv+BV5iI/4wz+owVtGM/yNrPBZfYm8g/fqW+Rd+svIA/Jd5D18UovI+/S/Ix9gqp4iD3GoniduvvR1WQU5mhxLlmap3C/FUdVWN6IXoXK+k3MpnA2maVySuza0ZlToUZ07292YctFov6k2eWp8VzsrJ0m6qa+NNV4H87Dq1j2WWQiFFN61chX7yNy7mclDUoUwPxuPN/tjAoc5lvCoUaJCgOCI9pjfDGk/BPfMEGaus2pYaDQ0GgtWVP1Kx/ico2BkaQ0zGnKCnHNL09KNuK451721rLqhLfmfht5vzdrmp7Sr3nUfC07YL92afU1r+wrd7/Dh5WwdHrmLjDawanUK3+9acPXqPML7Wq3NaHL6pL+1QHuGMd8t5/8PvPGO3QAAAHicbZLnlpswEIV9DRiwvZtseu89Ib333vvmBWRZYMVC0pHEEufpg8BO/kTncOfTaLgMOtPr97o17P1/baKPACEiDBAjQYohRhhjDevYhu3YwA7sxC7sxh7sxT7sxwEcxCEcxhEcxTEcxwmcxCmcxhmcxTmcxwVcxCVkuIwruIpruI4buIlbuI07uIt7uI8HeIhHeIwneIpneI4XeIlXeI03eIt3eI8P+IhP+Iwv+Ipv+I5N/OiF1hEz9JKxUrtFrDl1lWF9NR9QIikToRaVjUouKxvOmNBjLxnlhgo2DbnM1djLKrNGnGPScSUzItzGv93yPP2bSQSX84z9cqFQdJ56yZRmMhW8mLlJJSaBI0XYPDaZKDUviZmvr6DrNjJMi0WcK1MTM02mqpbZlJtEsNx5SI238jSodJtoS7qv+BpPw67IY9xU+dg5TXjROTWwdGrIOzWhT+uA0jolxqjaZrSOnCF2Nmq16651EYpMm1fakAul9SJQeR5QVYQlk1VkZ8SwoVNFIVjWnKQrlBGdMToftdoZjrs77DajqXKrS02YEFxbbtdWkG0x44JJVUS5aBqKSlJwmhDrmOF2Hv9Wqsy4TNqoKhfmSrrQKuNSL5nvPG6p0s0AkEWkSWVZMy1Kx3ljk03qLuZ14lTmB8gNGmByGrGfjLrhlhJV2f7SaIneNF1ypQNbybBUSgZswQaWEUNngeay1/sD4l/60HicY/DewXAiKGIjI2Nf5AbGnRwMHAzJBRsZWJ02MTAyaIEYm7mYGDkgLD4GMIvNaRfTAaA0J5DN7rSLwQHCZmZw2ajC2BEYscGhI2Ijc4rLRjUQbxdHAwMji0NHckgESEkkEGzmYWLk0drB+L91A0vvRiYGFwAMdiP0AAA=') format('woff')}</style>
<style id="style-core" type="text/css">html{font:16px/1 Helmet,Freesans,sans-serif}#store-area,tw-storydata{display:none!important;z-index:0}.no-transition{-webkit-transition:none!important;-o-transition:none!important;transition:none!important}:-webkit-full-screen{height:100%;width:100%}:-ms-fullscreen{height:100%;width:100%}:fullscreen{height:100%;width:100%}body::-ms-backdrop{background:0 0}:focus{outline:thin dotted}:disabled{cursor:not-allowed!important}body{color:#eee;background-color:#111;overflow:auto}a{cursor:pointer;color:#68d;text-decoration:none;-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s}a:hover{color:#8af;text-decoration:underline}a.link-broken{color:#c22}a.link-broken:hover{color:#e44}a[disabled],span.link-disabled{color:#aaa;cursor:not-allowed!important;text-decoration:none}area{cursor:pointer}button{cursor:pointer;color:#eee;background-color:#35a;border:1px solid #57c;line-height:normal;padding:.4em;-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}button:hover{background-color:#57c;border-color:#79e}button:disabled{background-color:#444;border:1px solid #666}input,select,textarea{color:#eee;background-color:transparent;border:1px solid #444;padding:.4em}select{padding:.34em .4em}input[type=text]{min-width:18em}textarea{min-width:30em;resize:vertical}input[type=checkbox],input[type=file],input[type=radio],select{cursor:pointer}input[type=range]{-webkit-appearance:none;min-height:1.2em}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{background:#222;border:1px solid #444;border-radius:0;cursor:pointer;height:10px;width:100%}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#35a;border:1px solid #57c;border-radius:0;cursor:pointer;height:18px;margin-top:-5px;width:33px}input[type=range]:focus::-webkit-slider-runnable-track{background:#222}input[type=range]::-moz-range-track{background:#222;border:1px solid #444;border-radius:0;cursor:pointer;height:10px;width:100%}input[type=range]::-moz-range-thumb{background:#35a;border:1px solid #57c;border-radius:0;cursor:pointer;height:18px;width:33px}input[type=range]::-ms-track{background:0 0;border-color:transparent;color:transparent;cursor:pointer;height:10px;width:calc(100% - 1px)}input[type=range]::-ms-fill-lower{background:#222;border:1px solid #444;border-radius:0}input[type=range]::-ms-fill-upper{background:#222;border:1px solid #444;border-radius:0}input[type=range]::-ms-thumb{background:#35a;border:1px solid #57c;border-radius:0;cursor:pointer;height:16px;width:33px}input:not(:disabled):focus,input:not(:disabled):hover,select:not(:disabled):focus,select:not(:disabled):hover,textarea:not(:disabled):focus,textarea:not(:disabled):hover{background-color:#333;border-color:#eee}hr{display:block;height:1px;border:none;border-top:1px solid #eee;margin:1em 0;padding:0}audio,canvas,progress,video{max-width:100%;vertical-align:middle}.error-view{background-color:#511;border-left:.5em solid #c22;display:inline-block;margin:.1em;max-width:100%;padding:0 .25em;position:relative}.error-view>.error-toggle{background-color:transparent;border:none;line-height:inherit;left:0;padding:0;position:absolute;top:0;width:1.75em}.error-view>.error{display:inline-block;margin-left:.25em}.error-view>.error-toggle+.error{margin-left:1.5em}.error-view>.error-source[hidden]{display:none}.error-view>.error-source:not([hidden]){background-color:rgba(0,0,0,.2);display:block;margin:0 0 .25em;overflow-x:auto;padding:.25em}.highlight,.marked{color:#ff0;font-weight:700;font-style:italic}.nobr{white-space:nowrap}.error-view>.error-toggle:before,.error-view>.error:before,[data-icon-after]:after,[data-icon-before]:before,[data-icon]:before,a.link-external:after{font-family:tme-fa-icons!important;font-style:normal;font-weight:900;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-icon]:before{content:attr(data-icon)}[data-icon-before]:before{content:attr(data-icon-before) "\00a0\00a0"}[data-icon-after]:after{content:"\00a0\00a0" attr(data-icon-after)}.error-view>.error-toggle:before{content:"\e81a"}.error-view>.error-toggle.enabled:before{content:"\e818"}.error-view>.error:before{content:"\e80d\00a0\00a0"}a.link-external:after{content:"\00a0\e80e"}</style>
<style id="style-core-display" type="text/css">#story{z-index:10;margin:2.5em}@media screen and (max-width:1136px){#story{margin-right:1.5em}}#passages{max-width:54em;margin:0 auto}</style>
<style id="style-core-passage" type="text/css">.passage{line-height:1.75;text-align:left;-webkit-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.passage-in{opacity:0}.passage ol,.passage ul{margin-left:.5em;padding-left:1.5em}.passage table{margin:1em 0;border-collapse:collapse;font-size:100%}.passage caption,.passage td,.passage th,.passage tr{padding:3px}@media (prefers-reduced-motion:reduce){.passage{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}}</style>
<style id="style-core-macro" type="text/css">@-webkit-keyframes cursor-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}@-o-keyframes cursor-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}@keyframes cursor-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.macro-append-insert,.macro-linkappend-insert,.macro-linkprepend-insert,.macro-linkreplace-insert,.macro-prepend-insert,.macro-repeat-insert,.macro-replace-insert,.macro-timed-insert{-webkit-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.macro-append-in,.macro-linkappend-in,.macro-linkprepend-in,.macro-linkreplace-in,.macro-prepend-in,.macro-repeat-in,.macro-replace-in,.macro-timed-in{opacity:0}.macro-type-cursor:after{-webkit-animation:cursor-blink 1s infinite;-o-animation:cursor-blink 1s infinite;animation:cursor-blink 1s infinite;content:"\2590";opacity:1}</style>
<style id="style-ui-dialog" type="text/css">html[data-dialog] body{overflow:hidden}#ui-overlay.open{visibility:visible;-webkit-transition:opacity .2s ease-in;-o-transition:opacity .2s ease-in;transition:opacity .2s ease-in}#ui-overlay:not(.open){-webkit-transition:visibility .2s step-end,opacity .2s ease-in;-o-transition:visibility .2s step-end,opacity .2s ease-in;transition:visibility .2s step-end,opacity .2s ease-in}#ui-overlay{visibility:hidden;opacity:0;z-index:100000;position:fixed;top:-50%;left:-50%;height:200%;width:200%}#ui-dialog.open{display:block;-webkit-transition:opacity .2s ease-in;-o-transition:opacity .2s ease-in;transition:opacity .2s ease-in}#ui-dialog{display:none;opacity:0;z-index:100100;position:fixed;top:50px;margin:0;padding:0}#ui-dialog>*{-webkit-box-sizing:border-box;box-sizing:border-box}#ui-dialog-titlebar{position:relative}#ui-dialog-close{display:block;position:absolute;right:0;top:0;white-space:nowrap}#ui-dialog-body{overflow:auto;min-width:280px;height:92%;height:calc(100% - 2.1em)}@media (prefers-reduced-motion:reduce){#ui-overlay.open{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}#ui-overlay:not(.open){-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}#ui-dialog.open{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}}#ui-overlay{background-color:#000}#ui-overlay.open{opacity:.8}#ui-dialog{max-width:66em}#ui-dialog.open{opacity:1}#ui-dialog-titlebar{background-color:#444;min-height:24px}#ui-dialog-title{margin:0;padding:.2em 3.5em .2em .5em;font-size:1.5em;text-align:center;text-transform:uppercase}#ui-dialog-close{cursor:pointer;font-size:120%;margin:0;padding:0;width:3.6em;height:92%;background-color:transparent;border:1px solid transparent;-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s}#ui-dialog-close:hover{background-color:#b44;border-color:#d66}#ui-dialog-body{background-color:#111;border:1px solid #444;text-align:left;line-height:1.5;padding:1em}#ui-dialog-body>:first-child{margin-top:0}#ui-dialog-body hr{background-color:#444}#ui-dialog-body ul.buttons{margin:0;padding:0;list-style:none}#ui-dialog-body ul.buttons li{display:inline-block;margin:0;padding:.4em .4em 0 0}#ui-dialog-body ul.buttons>li+li>button{margin-left:1em}#ui-dialog-close{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#ui-dialog-close{font-family:tme-fa-icons!important;font-style:normal;font-weight:900;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}</style>
<style id="style-ui" type="text/css">#ui-dialog-body.settings [id|=setting-body]>div:first-child{display:table;width:100%}#ui-dialog-body.settings [id|=setting-label]{display:table-cell;padding:.4em 2em .4em 0}#ui-dialog-body.settings [id|=setting-label]+div{display:table-cell;min-width:8em;text-align:right;vertical-align:middle;white-space:nowrap}#ui-dialog-body.list{padding:0}#ui-dialog-body.list ul{margin:0;padding:0;list-style:none;border:1px solid transparent}#ui-dialog-body.list li{margin:0}#ui-dialog-body.list li:not(:first-child){border-top:1px solid #444}#ui-dialog-body.list li a{display:block;padding:.25em .75em;border:1px solid transparent;color:#eee;text-decoration:none}#ui-dialog-body.list li a:hover{background-color:#333;border-color:#eee}#ui-dialog-body.saves{padding:0 0 1px}#ui-dialog-body.saves>:not(:first-child){border-top:1px solid #444}#ui-dialog-body.saves table{border-spacing:0;width:100%}#ui-dialog-body.saves tr:not(:first-child){border-top:1px solid #444}#ui-dialog-body.saves td{padding:.33em .33em}#ui-dialog-body.saves td:first-child{min-width:1.5em;text-align:center}#ui-dialog-body.saves td:nth-child(3){line-height:1.2}#ui-dialog-body.saves td:last-child{text-align:right}#ui-dialog-body.saves .empty{color:#999;speak:none;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#ui-dialog-body.saves .datestamp{font-size:75%;margin-left:1em}#ui-dialog-body.saves ul.buttons li{padding:.4em}#ui-dialog-body.saves ul.buttons>li+li>button{margin-left:.2em}#ui-dialog-body.saves ul.buttons li:last-child{float:right}#ui-dialog-body.settings div[id|=header-body]{margin:1em 0}#ui-dialog-body.settings div[id|=header-body]:first-child{margin-top:0}#ui-dialog-body.settings div[id|=header-body]:not(:first-child){border-top:1px solid #444;padding-top:1em}#ui-dialog-body.settings div[id|=header-body]>*{margin:0}#ui-dialog-body.settings h2[id|=header-heading]{font-size:1.375em}#ui-dialog-body.settings p[id|=header-desc],#ui-dialog-body.settings p[id|=setting-desc]{font-size:87.5%;margin:0 0 0 .5em}#ui-dialog-body.settings div[id|=setting-body]+div[id|=setting-body]{margin:1em 0}#ui-dialog-body.settings [id|=setting-control]{white-space:nowrap}#ui-dialog-body.settings button[id|=setting-control]{color:#eee;background-color:transparent;border:1px solid #444;padding:.4em}#ui-dialog-body.settings button[id|=setting-control]:hover{background-color:#333;border-color:#eee}#ui-dialog-body.settings button[id|=setting-control].enabled{background-color:#282;border-color:#4a4}#ui-dialog-body.settings button[id|=setting-control].enabled:hover{background-color:#4a4;border-color:#6c6}#ui-dialog-body.settings input[type=range][id|=setting-control]{max-width:35vw}#ui-dialog-body.list a,#ui-dialog-body.settings span[id|=setting-input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#ui-dialog-body.saves button[id=saves-clear]:before,#ui-dialog-body.saves button[id=saves-export]:before,#ui-dialog-body.saves button[id=saves-import]:before,#ui-dialog-body.settings button[id|=setting-control].enabled:after,#ui-dialog-body.settings button[id|=setting-control]:after{font-family:tme-fa-icons!important;font-style:normal;font-weight:900;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#ui-dialog-body.saves button[id=saves-export]:before{content:"\e829\00a0"}#ui-dialog-body.saves button[id=saves-import]:before{content:"\e82a\00a0"}#ui-dialog-body.saves button[id=saves-clear]:before{content:"\e827\00a0"}#ui-dialog-body.settings button[id|=setting-control]:after{content:"\00a0\00a0\e830"}#ui-dialog-body.settings button[id|=setting-control].enabled:after{content:"\00a0\00a0\e831"}</style>
<style id="style-ui-bar" type="text/css">#story{margin-left:20em;-webkit-transition:margin-left .2s ease-in;-o-transition:margin-left .2s ease-in;transition:margin-left .2s ease-in}#ui-bar.stowed~#story{margin-left:4.5em}@media screen and (max-width:1136px){#story{margin-left:19em}#ui-bar.stowed~#story{margin-left:3.5em}}@media screen and (max-width:768px){#story{margin-left:3.5em}}#ui-bar{position:fixed;z-index:50;top:0;left:0;width:17.5em;height:100%;margin:0;padding:0;-webkit-transition:left .2s ease-in;-o-transition:left .2s ease-in;transition:left .2s ease-in}#ui-bar.stowed{left:-15.5em}#ui-bar-tray{position:absolute;top:.2em;left:0;right:0}#ui-bar-body{height:90%;height:calc(100% - 2.5em);margin:2.5em 0;padding:0 1.5em}#ui-bar.stowed #ui-bar-body,#ui-bar.stowed #ui-bar-history{visibility:hidden;-webkit-transition:visibility .2s step-end;-o-transition:visibility .2s step-end;transition:visibility .2s step-end}@media (prefers-reduced-motion:reduce){#story{-webkit-transition:margin-left 0s;-o-transition:margin-left 0s;transition:margin-left 0s}#ui-bar{-webkit-transition:left 0s;-o-transition:left 0s;transition:left 0s}}#ui-bar{background-color:#222;border-right:1px solid #444;text-align:center}#ui-bar a{text-decoration:none}#ui-bar hr{border-color:#444}#ui-bar-history [id|=history],#ui-bar-toggle{font-size:1.2em;line-height:inherit;color:#eee;background-color:transparent;border:1px solid #444}#ui-bar-toggle{display:block;position:absolute;top:0;right:0;border-right:none;padding:.3em .45em .25em}#ui-bar.stowed #ui-bar-toggle{padding:.3em .35em .25em .55em}#ui-bar-toggle:hover{background-color:#444;border-color:#eee}#ui-bar-history{margin:0 auto}#ui-bar-history [id|=history]{padding:.2em .45em .35em}#ui-bar-history #history-jumpto{padding:.2em .665em .35em}#ui-bar-history [id|=history]:not(:first-child){margin-left:1.2em}#ui-bar-history [id|=history]:hover{background-color:#444;border-color:#eee}#ui-bar-history [id|=history]:disabled{color:#444;background-color:transparent;border-color:#444}#ui-bar-body{line-height:1.5;overflow:auto}#ui-bar-body>:not(:first-child){margin-top:2em}#story-title{margin:0;font-size:162.5%}#story-author{margin-top:2em;font-weight:700}#menu ul{margin:1em 0 0;padding:0;list-style:none;border:1px solid #444}#menu ul:empty{display:none}#menu li{margin:0}#menu li:not(:first-child){border-top:1px solid #444}#menu li a{display:block;padding:.25em .75em;border:1px solid transparent;color:#eee;text-transform:uppercase}#menu li a:hover{background-color:#444;border-color:#eee}#menu a,#ui-bar-history [id|=history],#ui-bar-toggle{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#menu-core li[id|=menu-item] a:before,#ui-bar-history [id|=history],#ui-bar-toggle:before{font-family:tme-fa-icons!important;font-style:normal;font-weight:900;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#ui-bar-toggle:before{content:"\e81d"}#ui-bar.stowed #ui-bar-toggle:before{content:"\e81e"}#menu-item-saves a:before{content:"\e82b\00a0"}#menu-item-settings a:before{content:"\e82d\00a0"}#menu-item-restart a:before{content:"\e82c\00a0"}#menu-item-share a:before{content:"\e82f\00a0"}</style>
<style id="style-ui-debug" type="text/css">#debug-bar{background-color:#222;border-left:1px solid #444;border-top:1px solid #444;bottom:0;margin:0;max-height:75%;padding:.5em;position:fixed;right:0;z-index:99900}#debug-bar>div:not([id])+div{margin-top:.5em}#debug-bar>div>label{margin-right:.5em}#debug-bar>div>input[type=text]{min-width:0;width:8em}#debug-bar>div>select{width:15em}#debug-bar-toggle{color:#eee;background-color:#222;border:1px solid #444;height:101%;height:calc(100% + 1px);left:-2em;left:calc(-2em - 1px);position:absolute;top:-1px;width:2em}#debug-bar-toggle:hover{background-color:#333;border-color:#eee}#debug-bar-hint{bottom:.175em;font-size:4.5em;opacity:.33;pointer-events:none;position:fixed;right:.6em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}#debug-bar-watch{background-color:#222;border-left:1px solid #444;border-top:1px solid #444;bottom:102%;bottom:calc(100% + 1px);font-size:.9em;left:-1px;max-height:650%;max-height:65vh;position:absolute;overflow-x:hidden;overflow-y:scroll;right:0;z-index:99800}#debug-bar-watch[hidden]{display:none}#debug-bar-watch div{color:#999;font-style:italic;margin:1em auto;text-align:center}#debug-bar-watch table{width:100%}#debug-bar-watch tr:nth-child(2n){background-color:rgba(127,127,127,.15)}#debug-bar-watch td{padding:.2em 0}#debug-bar-watch td:first-child+td{padding:.2em .3em .2em .1em}#debug-bar-watch .watch-delete{background-color:transparent;border:none;color:#c00}#debug-bar-watch-all,#debug-bar-watch-none{margin-left:.5em}#debug-bar-views-toggle,#debug-bar-watch-toggle{color:#eee;background-color:transparent;border:1px solid #444;margin-right:1em;padding:.4em}#debug-bar-views-toggle:hover,#debug-bar-watch-toggle:hover{background-color:#333;border-color:#eee}#debug-bar-watch:not([hidden])~div #debug-bar-watch-toggle,html[data-debug-view] #debug-bar-views-toggle{background-color:#282;border-color:#4a4}#debug-bar-watch:not([hidden])~div #debug-bar-watch-toggle:hover,html[data-debug-view] #debug-bar-views-toggle:hover{background-color:#4a4;border-color:#6c6}#debug-bar-hint:after,#debug-bar-toggle:before,#debug-bar-views-toggle:after,#debug-bar-watch .watch-delete:before,#debug-bar-watch-add:before,#debug-bar-watch-all:before,#debug-bar-watch-none:before,#debug-bar-watch-toggle:after{font-family:tme-fa-icons!important;font-style:normal;font-weight:900;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#debug-bar-toggle:before{content:"\e838"}#debug-bar-hint:after{content:"\e838\202f\e822"}#debug-bar-watch .watch-delete:before{content:"\e804"}#debug-bar-watch-add:before{content:"\e805"}#debug-bar-watch-all:before{content:"\e83a"}#debug-bar-watch-none:before{content:"\e827"}#debug-bar-views-toggle:after,#debug-bar-watch-toggle:after{content:"\00a0\00a0\e830"}#debug-bar-watch:not([hidden])~div #debug-bar-watch-toggle:after,html[data-debug-view] #debug-bar-views-toggle:after{content:"\00a0\00a0\e831"}html[data-debug-view] .debug{padding:.25em;background-color:#234}html[data-debug-view] .debug[title]{cursor:help}html[data-debug-view] .debug.block{display:inline-block;vertical-align:middle}html[data-debug-view] .debug.invalid{text-decoration:line-through}html[data-debug-view] .debug.hidden,html[data-debug-view] .debug.hidden .debug{background-color:#555}html:not([data-debug-view]) .debug.hidden{display:none}html[data-debug-view] .debug[data-name][data-type].nonvoid:after,html[data-debug-view] .debug[data-name][data-type]:before{background-color:rgba(0,0,0,.25);font-family:monospace,monospace;white-space:pre}html[data-debug-view] .debug[data-name][data-type]:before{content:attr(data-name)}html[data-debug-view] .debug[data-name][data-type|=macro]:before{content:"<<" attr(data-name) ">>"}html[data-debug-view] .debug[data-name][data-type|=macro].nonvoid:after{content:"<</" attr(data-name) ">>"}html[data-debug-view] .debug[data-name][data-type|=html]:before{content:"<" attr(data-name) ">"}html[data-debug-view] .debug[data-name][data-type|=html].nonvoid:after{content:"</" attr(data-name) ">"}html[data-debug-view] .debug[data-name][data-type]:not(:empty):before{margin-right:.25em}html[data-debug-view] .debug[data-name][data-type].nonvoid:not(:empty):after{margin-left:.25em}html[data-debug-view] .debug[data-name][data-type|=special],html[data-debug-view] .debug[data-name][data-type|=special]:before{display:block}</style>
</head>
<body>
<div id="init-screen">
<div id="init-no-js"><noscript>JavaScript must be enabled to play.</noscript></div>
<div id="init-lacking"><p>Browser lacks capabilities required to play.</p><p>Upgrade or switch to another browser.</p></div>
<div id="init-loading"><div>Loading…</div></div>
</div>
<tw-storydata name="2155 Actual" startnode="13" creator="Twine" creator-version="2.6.2" format="SugarCube" format-version="2.36.1" ifid="9B2386CF-006C-4B6B-B912-A9C8644FF2E7" options="" tags="" zoom="0.6" hidden><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css">#map {
font-family: monospace;
background-color: navy;
color: red;
}
#igt {
font-family: monospace;
background-color: darkslategray;
}
#timer {
color: gold;
font-family: monospace;
background-color: blue;
font-size:24px;
}
</style><script role="script" id="twine-user-script" type="text/twine-javascript">// Remove UI sidebar
$('#ui-bar').remove();
$(document.head).find('#style-ui-bar').remove();
// Set the date we're counting down to
var seconds = 300
var countDownDate = new Date().getTime() + seconds * 1000;
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes and seconds
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Display the result in the element with id="timer"
document.getElementById("timer").innerHTML = minutes + "m " + seconds + "s ";
// If the count down is finished, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("timer").innerHTML = "ALL SERVERS OFFLINE";
}
}, 1000);
//Timeout stuff; removed for testing
const myTimeout0 = setTimeout(shutdown0, 10000);
function shutdown0() {
State.setVar("$serverArray[0]",0)
} // this one goes faster; to show that it's serious!!!!
const myTimeout1 = setTimeout(shutdown1, 75000);
function shutdown1() {
State.setVar("$serverArray[1]",0)
}
const myTimeout2 = setTimeout(shutdown2, 100000);
function shutdown2() {
State.setVar("$serverArray[2]",0)
}
const myTimeout3 = setTimeout(shutdown3, 125000);
function shutdown3() {
State.setVar("$serverArray[3]",0)
}
const myTimeout4 = setTimeout(shutdown4, 150000);
function shutdown4() {
State.setVar("$serverArray[4]",0)
}
const myTimeout5 = setTimeout(shutdown5, 175000);
function shutdown5() {
State.setVar("$serverArray[5]",0)
}
const myTimeout6 = setTimeout(shutdown6, 200000);
function shutdown6() {
State.setVar("$serverArray[6]",0)
}
const myTimeout7 = setTimeout(shutdown7, 225000);
function shutdown7() {
State.setVar("$serverArray[7]",0)
}
const myTimeout8 = setTimeout(shutdown8, 250000);
function shutdown8() {
State.setVar("$serverArray[8]",0)
}
const myTimeout9 = setTimeout(shutdown9, 275000);
function shutdown9() {
State.setVar("$serverArray[9]",0)
}
const myTimeout10 = setTimeout(shutdown10, 300000);
function shutdown10() {
State.setVar("$serverArray[10]",0)
}
const myTimeout11= setTimeout(shutdown11, 300000);
function shutdown11() {
State.setVar("$serverArray[11]",0)
}
/*
CREDITS:
Written in Twine: https://twinery.org/
Code has been adapted from these sources:
https://twinery.org/cookbook/dungeonmoving/sugarcube/sugarcube_dungeonmoving.html
https://www.w3schools.com/howto/howto_js_countdown.asp
Extremely cool ASCII art made with https://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20
*/
</script><tw-passagedata pid="1" name="StoryInit" tags="" position="100,100" size="100,100"><<set $mapArray to
[[0,0,0,0,0,0,0,0,0,0,0,0],
[0,1,0,1,1,1,0,1,1,1,1,0],
[0,1,0,1,0,1,1,0,0,0,1,0],
[0,1,1,1,0,1,1,0,1,0,1,0],
[0,0,0,0,1,1,0,0,1,0,1,0],
[0,1,1,1,1,0,1,1,1,1,1,0],
[0,0,1,0,0,1,0,1,0,0,0,0],
[0,1,1,1,0,1,0,1,1,1,1,0],
[0,0,0,1,0,1,0,0,0,0,1,0],
[0,1,1,1,1,1,0,1,1,1,1,0],
[0,1,1,1,0,1,1,1,0,1,1,0],
[0,0,0,0,0,0,0,0,0,0,0,0]]>>
<<set $serverArray to
[[1,1,1,1,1,1,1,0,1,1,1,1],
[0,1,1,1,1,1,1,1,0,1,0,1],
[1,1,0,1,1,1,1,0,0,0,1,0],
[1,1,1,1,1,1,1,0,1,0,1,0],
[1,1,1,0,1,1,1,1,0,1,1,1],
[1,1,1,0,1,1,1,0,1,1,1,1],
[1,1,1,0,1,1,0,1,1,1,1,1],
[1,1,1,1,1,1,1,1,0,1,1,1],
[1,1,1,1,1,1,1,0,1,1,1,1],
[1,1,1,1,1,1,1,1,1,1,1,1],
[1,1,1,1,1,1,1,0,0,1,0,1],
[1,0,0,1,1,1,1,1,1,0,1,1]]>>
<<set $positionX to 1>>
<<set $positionY to 1>>
<<set $memory to 40>>
<<set $event to 0>></tw-passagedata><tw-passagedata pid="2" name="Location" tags="" position="100,225" size="100,100"><span id="map">
<<nobr>>
<<for $i to 0; $i lt $mapArray.length; $i++>>
<<for $k to 0; $k lt $mapArray[$i].length; $k++>>
<<if $k eq $positionX and $i eq $positionY>>
<<if $serverArray[$i][$k] eq 1>><b style="color:White;"><<print "P">> </b>
<<else>><<print "P">> <</if>>
<<elseif $mapArray[$i][$k] eq 1>>
<<if $serverArray[$i][$k] eq 1>><b style="color:White;"><<print "&#46;">> </b>
<<else>><<print "&#46;">> <</if>>
<<elseif $mapArray[$i][$k] eq 0>>
<<if $serverArray[$i][$k] eq 1>><b style="color:White;"><<print "&#35;">> </b>
<<else>><<print "&#35;">> <</if>>
<<elseif $mapArray[$i][$k] eq 2>>
<<if $serverArray[$i][$k] eq 1>><b style="color:White;"><<print "E">> </b>
<<else>><<print "E">> <</if>>
<</if>>
<</for>>
<<print "<br>">>
<</for>>
<</nobr>>
</span>
<<nobr>>
<<if $serverArray[$positionY][$positionX] eq 1>>
<<set $locvar to String($positionX) + "_" + String($positionY)>>
<<include $locvar>>
<<else>>
<<include NoServer>>
<</if>>
<</nobr>>
</tw-passagedata><tw-passagedata pid="3" name="East" tags="" position="601,201" size="100,100"><<if $serverArray[$positionY][$positionX] eq 1>><<set $serverArray[$positionY][$positionX] to 0>><</if>><<set $positionX += 1>><<include "Map System">></tw-passagedata><tw-passagedata pid="4" name="West" tags="" position="400,200" size="100,100"><<if $serverArray[$positionY][$positionX] eq 1>><<set $serverArray[$positionY][$positionX] to 0>><</if>><<set $positionX -= 1>><<include "Map System">></tw-passagedata><tw-passagedata pid="5" name="South" tags="" position="500,301" size="100,100"><<if $serverArray[$positionY][$positionX] eq 1>><<set $serverArray[$positionY][$positionX] to 0>><</if>><<set $positionY += 1>><<include "Map System">></tw-passagedata><tw-passagedata pid="6" name="North" tags="" position="502,100" size="100,100"><<if $serverArray[$positionY][$positionX] eq 1>><<set $serverArray[$positionY][$positionX] to 0>><</if>><<set $positionY -= 1>><<include "Map System">></tw-passagedata><tw-passagedata pid="7" name="Map System" tags="" position="275,50" size="100,100"><b><span id="timer"></span>
<<nobr>>
<<if $mapArray[$positionY-1][$positionX] eq 1>>
[[North]] |
<<else>>
<s>North |</s>
<</if>><br>
<<if $mapArray[$positionY][$positionX-1] eq 1>>
[[West]] |
<<else>>
<s>West |</s>
<</if>><<if $mapArray[$positionY][$positionX+1] eq 1>>
[[East]] |
<<else>>
<s>East |</s>
<</if>>
<br>
<<if $mapArray[$positionY+1][$positionX] eq 1>>
[[South]] |
<<else>>
<s>South |</s>
<</if>>
<</nobr>>
[[Log out of RealmDungeon 2|Ending]]</b>
<<include "Location">></tw-passagedata><tw-passagedata pid="8" name="PassageFooter" tags="" position="775,350" size="100,100"><<if not tags().includes("nofooter")>>$memory/40 Memory<</if>></tw-passagedata><tw-passagedata pid="9" name="3_3" tags="" position="1300,500" size="100,100"></tw-passagedata><tw-passagedata pid="10" name="1_1" tags="" position="1100,300" size="100,100"></tw-passagedata><tw-passagedata pid="11" name="3_2" tags="" position="1300,400" size="100,100"><span id="igt"><<timed 1s>>[trogdor] hello1<</timed>>
<<timed 4s>>[trogdor] afk???<</timed>>
<<timed 7s>>trogdor attacked you!<</timed>>
<<timed 8s>>trogdor attacked….and missed!<</timed>>
<<timed 9s>>trogdor attacked….and missed!<</timed>>
<<timed 11s>>[trogdor] what the hell<</timed>>
<<timed 12s>>trogdor attacked….and missed!<</timed>>
<<timed 14s>>[trogdor] are you using console cheats?<</timed>>
<<timed 15s>>trogdor attacked….and missed!<</timed>>
<<timed 16s>>[trogdor] freakin hacker<</timed>>
<<timed 17s>>[trogdor] whatever ill find someone else to kill<</timed>>
<<timed 18s>>trogdor has left the area.<</timed>>
</span>
<<timed 19s>><<if $memory > 6>><<set $cost to 6>>[[Record this event for 6 memory|Recorder][$a32 to 1; $memory to $memory - 6]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="12" name="NoServer" tags="" position="300,500" size="100,100"><span style="color:Red;">The server has been de-activated. There is no longer anything to see here.</span></tw-passagedata><tw-passagedata pid="13" name="Intro" tags="nofooter" position="100,500" size="100,100"><span id="igt" style="background-color:blue">
............................██████╗.███████╗.█████╗.██╗.....███╗...███╗....
............................██╔══██╗██╔════╝██╔══██╗██║.....████╗.████║....
............................██████╔╝█████╗..███████║██║.....██╔████╔██║....
............................██╔══██╗██╔══╝..██╔══██║██║.....██║╚██╔╝██║....
............................██║..██║███████╗██║..██║███████╗██║.╚═╝.██║....
............................╚═╝..╚═╝╚══════╝╚═╝..╚═╝╚══════╝╚═╝.....╚═╝....
...........................................................................
██████╗.██╗...██╗███╗...██╗.██████╗.███████╗.██████╗.███╗...██╗....██████╗.
██╔══██╗██║...██║████╗..██║██╔════╝.██╔════╝██╔═══██╗████╗..██║....╚════██╗
██║..██║██║...██║██╔██╗.██║██║..███╗█████╗..██║...██║██╔██╗.██║.....█████╔╝
██║..██║██║...██║██║╚██╗██║██║...██║██╔══╝..██║...██║██║╚██╗██║....██╔═══╝.
██████╔╝╚██████╔╝██║.╚████║╚██████╔╝███████╗╚██████╔╝██║.╚████║....███████╗
╚═════╝..╚═════╝.╚═╝..╚═══╝.╚═════╝.╚══════╝.╚═════╝.╚═╝..╚═══╝....╚══════╝
...........................................................................
</span>
You are a Citizen Preservationist looking to preserve some record of your favourite Massively Multiplayer Online game, <b>RealmDungeon 2</b> (the popular sequel to <b>RealmDungeon</b>). Online since 1988, the game developer has finally begun to decommission servers one by one. As servers lose power, sections of the map will turn red and no longer be operational, meaning you will have to hurry. Some areas near existing events have already shut down, owing to the greater power draw of active events. Events aren't visible from the map, so you may need to slow down and think about your next move, too.
Replacing or emulating <b>RealmDungeon 2</b> is technically and practically impossible, and wouldn't capture the experience of actually playing it with other people. Instead, you've chosen to log into <b>RealmDungeon 2</b> with your trusty Event Recorder to record as much of the game as you have time and memory for. As all fans of <b>RealmDungeon 2</b> know, you can navigate around the map by clicking "<b>North/South/East/West</b>". Your position is highlighted by the letter "<b>P</b>".
Events play out in real time; if you want to record an event, you have to wait for the entire event to play, and click "<b>Record this event</b>". Recording takes memory, so if you're out of memory, you won't be able to record. You only get one chance to record an event; if you walk away, it's gone forever!
Once you're out of memory or the servers have shut down, you can <b>Log Out</b> and admire your excellent work. Better hurry....the timer has already started!!!
<b>[[Log into RealmDungeon 2|Map System]]</b>
<b><span id="timer"></span></b></tw-passagedata><tw-passagedata pid="14" name="Ending" tags="nofooter" position="500,500" size="100,100">Thank you for playing <b>RealmDungeon 2</b>.
You recorded $event events during your visit.
You have $memory unused memory remaining.
A reminder that <b>RealDungeon 2</b>'s servers will be SHUTTING DOWN PERMANENTLY as of <b>August 2nd, 2023</b>.
Thank you to all of our fans for 35 amazing years!!
-the devs
<span id="igt">
<<if $a12 eq 1>>
[hunter2] hello! anyone looking to join my party for a lv5 raid?
[hunter2] anyone?
[hunter2] …
[hunter2] does anyone even play this game anymore????
[hunter2] geez
[hunter2] i shouldve moved onto QuestOnline by now
hunter2 has logged off
<</if>>
<<if $a32 eq 1>>
[trogdor] hello1
[trogdor] afk???
trogdor attacked you!
trogdor attacked….and missed!
trogdor attacked….and missed!
[trogdor] what the hell
trogdor attacked….and missed!
[trogdor] are you using console cheats?
trogdor attacked….and missed!
[trogdor] freakin hacker
[trogdor] whatever ill find someone else to kill
trogdor has left the area.
<</if>>
<<if $a56 eq 1>>
[beastt] i dont know what im gonna do with my time
[gandelf] realmdungeon 3D is in development, you could try questonline as well. I’m in a guild there you could join
[beastt] i dont like 3d games.
[friend_tom] you could go outside, ride a bike, get drunk with friends
[beastt] i dont have friends
[gandelf] ouch
[friend_tom] you can be friends with us on questonline =)
[friend_tom] or you could ask people at work? maybe they would go for a pint
[beastt] i dont work
[beastt] i just stay at home and play realmdungeon. i live with my parents
[beastt] i dont want to do anything else
[beastt] this stinks
[friend_tom] =( sorry dude
[gandelf] hang in there pal
<</if>>
<<if $a71 eq 1>>
[donuts] WOW!!! this photo is really you?
[necromancer] haha yep
[necromancer] wedding day =)
[donuts] you look so good!
[necromancer] you said you live in portland?
[necromancer] im going to be there in febuary for work
[necromancer] we should meet and catch up =)
[donuts] sounds great =)
donuts has logged off.
necromancer has logged off.
<</if>>
<<if $a110 eq 1>>
[gmtony] woo! glad realmdungeon is still online on my birthday =)
[martinmartin] woah its your birthday tony??
[martinmartin] happy birthday!!!!!!!
martinmartin gives gmtony a +1Battleaxe.
[hedge_hunk] bring it in guys!
hedge_hunk gives gmtony a GreenRuby.
megalink gives gmtony a SmokeBomb.
[gmtony] aww thanks guys
[gmtony] Im legit choked up
[gmtony] gonna miss this place
[megalink] I’ll buy you a beer if you’re ever in vancouver
[gmtony] i cant drink
[gmtony] im too young haha
[martinmartin] how old are you tony??
[gmtony] im 14 haha
[martinmartin] omg. a literal baby
<</if>>
<<if $a65 eq 1>>
[BALTHAZAR] Beware, traveller!
[dogcoupland] are you talking to me?
[BALTHAZAR] The Magic Tower lies further this way, to the northeast!
[BALTHAZAR] You would best prepare yourself before going into battle!
[dogcoupland] huh?
[dogcoupland] i have no idea what that is
[nhorn] lol
[BALTHAZAR] Beware, traveller!
[BALTHAZAR] The Magic Tower lies further this way, to the northeast!
[BALTHAZAR] You would best prepare yourself before going into battle!
[dogcoupland] what the hell is going on
[nhorn] thats an NPC
[nhorn] you can tell
[nhorn] their names are in all caps
[nhorn] they just repeat the same lines over and over. their ai hasnt been changed since release date
[dogcoupland] oh
[dogcoupland] ive only been playing for a week
[dogcoupland] thought id check out what the rage is all about
[nhorn] rock on!
[BALTHAZAR] Beware, traveller!
[dogcoupland] ah shut the hell up
<</if>>
<<if $a910 eq 1>>
[MELCHIOR] That Magic Tower has been there since time immemorial.
[MELCHIOR] No one has ever returned from there alive.
[MELCHIOR] The LICH rules the RealmDungeon from there with an iron fist.
[MELCHIOR] That Magic Tower has been there since time immemorial.
[MELCHIOR] No one has ever returned from there alive.
[MELCHIOR] The LICH rules the RealmDungeon from there with an iron fist.
<</if>>
<<if $a83 eq 1>>
[queequeg] woo we made it
[ishmael] lich time!
[ahab] i think we can take him this time
[ishmael] one last chance!
[LICH] Many adventurers have sought to defeat me these past 500 years. I, the LICH, cannot be stopped!
[queequeg] get him!!!!!
[ahab] from hells heart I stab at thee!
LICH casts FIREBALL!
queequeg takes 13 damage!
ishmael takes 13 damage!
ahab takes 13 damage!
queequeg attacks LICH…and misses!
ishmael attacks LICH…LICH takes 5 damage!
ahab casts PROTECT. You are imbued with magical protection!
LICH casts FIREBALL!
queequeg takes 8 damage!
queequeg has perished!
ishmael takes 8 damage!
ishmael has perished!
ahab takes 8 damage!
ahab has perished!
[queequeg] dang
[ahab] i thought we had him this time
[ishmael] they nerfed protect last update it looks
[queequeg] welp. see yall at the office on monday
[ishmael] have a good rest of the weekend
[ishmael] see ya
ishmael has logged off.
ahab has logged off.
queequeg has logged off.
<</if>>
<<if $a77 eq 1>>
[ELF MERCHANT] Seeking KoboldSkin for 5 Gold!
[DROW MERCHANT] Seeking GreenRuby for 30 Gold!
[HALF-ORC MERCHANT] Seeking GoldPhylactery for 1000 Gold!
nouveau_r trades 200 GoldPhylactery for 200000 Gold
[nouveau_r] muahaha
[nouveau_r] Im rich
[living_armor] what the heck
[living_armor] howd you get so many philacteryies (sp?)
[nouveau_r] Ive been grinding the lich fight for about a month or so
[nouveau_r] to get on the leaderboard for most gold
[nouveau_r] Im first place now
[living_armor] oh uh
[living_armor] congrats I guess
[living_armor] you know the game is shutting down right??
[nouveau_r] exactly
[nouveau_r] now no one will be able to take my spot
[living_armor] yeah but no one will be able to see it
[living_armor] the leaderboard shuts down with the servers
[nouveau_r] whatever man shut up
nouveau_r has logged off.
<</if>>
<<if $a105 eq 1>>
[bruce_wain] I’m just saying I’m not interested in politics.
[bruce_wain] Both sides lie all the time.
[jokerfied] you american bruce??
[jokerfied] this stuff is important
[bruce_wain] Voting doesn’t change anything anyway.
[jokerfied] sigh
[ranger5] were talking about this again??????????
[ranger5] holy crap
[ranger5] i come here to relax
[ranger5] not think about stuff
ranger5 has logged off.
[jokerfied] well we pissed off ranger
[jokerfied] oops
[bruce_wain] Some people don’t have the maturity to discuss serious topics it seems.
[jokerfied] ahahaha
[jokerfied] get your head out your ass man
jokerfied has left the area.
<</if>>
<<if $a63 eq 1>>
a wild KOBOLD appears!
[bobwastaken] aaaaaa
[bobwastaken] get the kobold!!!!!!
cow_tools attacks KOBOLD…and hits for 9 damage!
KOBOLD has perished!
KOBOLD drops a KoboldSkin!
[bobwastaken] hmmm
[bobwastaken] thought thatd be tougher
[bobwastaken] that wasnt a very satisfying ecnounter??
[cow_tools] kobolds are good for grinding gold tho
[cow_tools] theres a merchant somewhere who will trade them for 5 gold each
[bobwastaken] that doesnt actually sound like that much tho?
[cow_tools] well you gotta kill a lot of em
[bobwastaken] oh
[bobwastaken] well, lets move on
bobwastaken has left the area.
cow_tools has left the area.
<</if>>
</span>
<span id="timer"></span></tw-passagedata><tw-passagedata pid="15" name="Recorder" tags="" position="900,100" size="100,100">You've recorded this event for posterity. The zone becomes darkened as the server shuts down.
<<set $event to $event + 1>>
<<if $serverArray[$positionY][$positionX] eq 1>><<set $serverArray[$positionY][$positionX] to 0>><</if>>
<<include "Map System">></tw-passagedata><tw-passagedata pid="16" name="3_1" tags="" position="1300,300" size="100,100"></tw-passagedata><tw-passagedata pid="17" name="1_2" tags="" position="1100,400" size="100,100"><span id="igt"><<timed 1s>>[hunter2] hello! anyone looking to join my party for a lv5 raid?<</timed>>
<<timed 4s>>[hunter2] anyone?<</timed>>
<<timed 7s>>[hunter2] …<</timed>>
<<timed 8s>>[hunter2] does anyone even play this game anymore????<</timed>>
<<timed 9s>>[hunter2] geez<</timed>>
<<timed 10s>>[hunter2] i shouldve moved onto QuestOnline by now<</timed>>
<<timed 11s>>hunter2 has logged off<</timed>>
</span><<timed 1s>>
<<if $memory > 3>><<set $cost to 3>>[[Record this event for 3 memory|Recorder][$a12 to 1; $memory to $memory - 3]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="18" name="2_3" tags="" position="1200,500" size="100,100"></tw-passagedata><tw-passagedata pid="19" name="1_3" tags="" position="1100,500" size="100,100"></tw-passagedata><tw-passagedata pid="20" name="4_1" tags="" position="1400,300" size="100,100"></tw-passagedata><tw-passagedata pid="21" name="1_5" tags="" position="1100,700" size="100,100"></tw-passagedata><tw-passagedata pid="22" name="5_3" tags="" position="1500,500" size="100,100"></tw-passagedata><tw-passagedata pid="23" name="5_2" tags="" position="1500,400" size="100,100"></tw-passagedata><tw-passagedata pid="24" name="5_4" tags="" position="1500,600" size="100,100"></tw-passagedata><tw-passagedata pid="25" name="4_4" tags="" position="1400,600" size="100,100"></tw-passagedata><tw-passagedata pid="26" name="5_1" tags="" position="1500,300" size="100,100"></tw-passagedata><tw-passagedata pid="27" name="2_9" tags="" position="1200,1100" size="100,100"></tw-passagedata><tw-passagedata pid="28" name="3_9" tags="" position="1300,1100" size="100,100"></tw-passagedata><tw-passagedata pid="29" name="3_8" tags="" position="1300,1000" size="100,100"></tw-passagedata><tw-passagedata pid="30" name="10_1" tags="" position="2000,300" size="100,100"></tw-passagedata><tw-passagedata pid="31" name="7_1" tags="" position="1700,300" size="100,100"><span id="igt"><<timed 1s>>[donuts] WOW!!! this photo is really you?<</timed>>
<<timed 3s>>[necromancer] haha yep<</timed>>
<<timed 4s>>[necromancer] wedding day =)<</timed>>
<<timed 6s>>[donuts] you look so good!<</timed>>
<<timed 9s>>[necromancer] you said you live in portland?<</timed>>
<<timed 10s>>[necromancer] im going to be there in febuary for work<</timed>>
<<timed 12s>>[necromancer] we should meet and catch up =)<</timed>>
<<timed 14s>>[donuts] sounds great =)<</timed>>
<<timed 16s>>donuts has logged off.<</timed>>
<<timed 17s>>necromancer has logged off.<</timed>>
</span>
<<timed 18s>><<if $memory > 9>><<set $cost to 9>>[[Record this event for 9 memory|Recorder][$a71 to 1; $memory to $memory - 9]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="32" name="9_1" tags="" position="1900,300" size="100,100"></tw-passagedata><tw-passagedata pid="33" name="3_10" tags="" position="1300,1200" size="100,100"></tw-passagedata><tw-passagedata pid="34" name="2_10" tags="" position="1200,1200" size="100,100"></tw-passagedata><tw-passagedata pid="35" name="1_7" tags="" position="1100,900" size="100,100"></tw-passagedata><tw-passagedata pid="36" name="8_1" tags="" position="1800,300" size="100,100"></tw-passagedata><tw-passagedata pid="37" name="1_9" tags="" position="1100,1100" size="100,100"></tw-passagedata><tw-passagedata pid="38" name="1_10" tags="" position="1100,1200" size="100,100"><span id="igt"><<timed 1s>>[gmtony] woo! glad realmdungeon is still online on my birthday =)<</timed>>
<<timed 3s>>[martinmartin] woah its your birthday tony??<</timed>>
<<timed 3.5s>>[martinmartin] happy birthday!!!!!!!<</timed>>
<<timed 4s>>[martinmartin gives gmtony a +1Battleaxe.<</timed>>
<<timed 6s>>[hedge_hunk] bring it in guys!<</timed>>
<<timed 6.5s>>hedge_hunk gives gmtony a GreenRuby.<</timed>>
<<timed 7s>>megalink gives gmtony a SmokeBomb.<</timed>>
<<timed 11s>>[gmtony] aww thanks guys<</timed>>
<<timed 12s>>[gmtony] Im legit choked up<</timed>>
<<timed 13s>>[gmtony] gonna miss this place<</timed>>
<<timed 15s>>[megalink] I’ll buy you a beer if you’re ever in vancouver<</timed>>
<<timed 17s>>[gmtony] i cant drink<</timed>>
<<timed 17.5s>>[gmtony] im too young haha<</timed>>
<<timed 19s>>[martinmartin] how old are you tony??<</timed>>
<<timed 21s>>[gmtony] im 14 haha<</timed>>
<<timed 22s>>[martinmartin] omg. a literal baby<</timed>>
</span>
<<timed 23s>><<if $memory > 11>><<set $cost to 11>>[[Record this event for 11 memory|Recorder][$a110 to 1; $memory to $memory - 11]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="39" name="6_2" tags="" position="1600,400" size="100,100"></tw-passagedata><tw-passagedata pid="40" name="6_3" tags="" position="1600,500" size="100,100"><span id="igt"><<timed 1s>>a wild KOBOLD appears!<</timed>>
<<timed 1.5s>>[bobwastaken] aaaaaa<</timed>>
<<timed 3s>>[bobwastaken] get the kobold!!!!!!<</timed>>
<<timed 3.5s>>cow_tools attacks KOBOLD…and hits for 9 damage!<</timed>>
<<timed 3.75s>>KOBOLD has perished!<</timed>>
<<timed 4.75s>>KOBOLD drops a KoboldSkin!<</timed>>
<<timed 7s>>[bobwastaken] hmmm<</timed>>
<<timed 9s>>[bobwastaken] thought thatd be tougher<</timed>>
<<timed 10s>>[bobwastaken] that wasnt a very satisfying ecnounter??<</timed>>
<<timed 12s>>[cow_tools] kobolds are good for grinding gold tho<</timed>>
<<timed 13s>>[cow_tools] theres a merchant somewhere who will trade them for 5 gold each<</timed>>
<<timed 16s>>[bobwastaken] that doesnt actually sound like that much tho?<</timed>>
<<timed 18s>>[cow_tools] well you gotta kill a lot of em<</timed>>
<<timed 19s>>[bobwastaken] oh<</timed>>
<<timed 20s>>[bobwastaken] well, lets move on<</timed>>
<<timed 22s>>bobwastaken has left the area.<</timed>>
<<timed 22.5s>>cow_tools has left the area.<</timed>>
</span>
<<timed 23s>><<if $memory > 3>><<set $cost to 3>>[[Record this event for 3 memory|Recorder][$a63 to 1; $memory to $memory - 3]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="41" name="3_5" tags="" position="1300,700" size="100,100"></tw-passagedata><tw-passagedata pid="42" name="2_5" tags="" position="1200,700" size="100,100"></tw-passagedata><tw-passagedata pid="43" name="4_5" tags="" position="1400,700" size="100,100"></tw-passagedata><tw-passagedata pid="44" name="2_6" tags="" position="1200,800" size="100,100"></tw-passagedata><tw-passagedata pid="45" name="2_7" tags="" position="1200,900" size="100,100"></tw-passagedata><tw-passagedata pid="46" name="3_7" tags="" position="1300,900" size="100,100"></tw-passagedata><tw-passagedata pid="47" name="6_10" tags="" position="1600,1200" size="100,100"></tw-passagedata><tw-passagedata pid="48" name="5_10" tags="" position="1500,1200" size="100,100"></tw-passagedata><tw-passagedata pid="49" name="7_10" tags="" position="1700,1200" size="100,100"></tw-passagedata><tw-passagedata pid="50" name="9_7" tags="" position="1900,900" size="100,100"></tw-passagedata><tw-passagedata pid="51" name="7_9" tags="" position="1700,1100" size="100,100"></tw-passagedata><tw-passagedata pid="52" name="10_3" tags="" position="2000,500" size="100,100"></tw-passagedata><tw-passagedata pid="53" name="10_2" tags="" position="2000,400" size="100,100"></tw-passagedata><tw-passagedata pid="54" name="10_4" tags="" position="2000,600" size="100,100"></tw-passagedata><tw-passagedata pid="55" name="10_5" tags="" position="2000,700" size="100,100"><span id="igt"><<timed 1s>>[bruce_wain] I’m just saying I’m not interested in politics.<</timed>>
<<timed 1.5s>>[bruce_wain] Both sides lie all the time.<</timed>>
<<timed 2.5s>>[jokerfied] you american bruce??<</timed>>
<<timed 3s>>[jokerfied] this stuff is important<</timed>>
<<timed 4s>>[bruce_wain] Voting doesn’t change anything anyway.<</timed>>
<<timed 5s>>[jokerfied] sigh<</timed>>
<<timed 7s>>[ranger5] were talking about this again??????????<</timed>>
<<timed 7.5s>>[ranger5] holy crap<</timed>>
<<timed 8s>>[ranger5] i come here to relax<</timed>>
<<timed 8.5s>>[ranger5] not think about stuff<</timed>>
<<timed 10s>>ranger5 has logged off.<</timed>>
<<timed 12s>>[jokerfied] well we pissed off ranger<</timed>>
<<timed 12.5s>>[jokerfied] oops<</timed>>
<<timed 14s>>[bruce_wain] Some people don’t have the maturity to discuss serious topics it seems.<</timed>>
<<timed 16s>>[jokerfied] ahahaha<</timed>>
<<timed 17s>>[jokerfied] get your head out your ass man<</timed>>
<<timed 17.5s>>jokerfied has left the area.<</timed>>
</span>
<<timed 18s>><<if $memory > 7>><<set $cost to 7>>[[Record this event for 7 memory|Recorder][$a105 to 1; $memory to $memory - 7]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="56" name="10_7" tags="" position="2000,900" size="100,100"></tw-passagedata><tw-passagedata pid="57" name="10_8" tags="" position="2000,1000" size="100,100"></tw-passagedata><tw-passagedata pid="58" name="10_9" tags="" position="2000,1100" size="100,100"></tw-passagedata><tw-passagedata pid="59" name="10_10" tags="" position="2000,1200" size="100,100"></tw-passagedata><tw-passagedata pid="60" name="9_10" tags="" position="1900,1200" size="100,100"><span id="igt"><<timed 1s>>[MELCHIOR] That Magic Tower has been there since time immemorial.<</timed>>
<<timed 1.5s>>[MELCHIOR] No one has ever returned from there alive.<</timed>>
<<timed 2s>>[MELCHIOR] The LICH rules the RealmDungeon from there with an iron fist.<</timed>>
<<timed 5s>>[MELCHIOR] That Magic Tower has been there since time immemorial.<</timed>>
<<timed 5.5s>>[MELCHIOR] No one has ever returned from there alive.<</timed>>
<<timed 6s>>[MELCHIOR] The LICH rules the RealmDungeon from there with an iron fist.<</timed>>
</span>
<<timed 7s>><<if $memory > 3>><<set $cost to 3>>[[Record this event for 3 memory|Recorder][$a910 to 1; $memory to $memory - 3]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="61" name="9_9" tags="" position="1900,1100" size="100,100"></tw-passagedata><tw-passagedata pid="62" name="8_3" tags="" position="1800,500" size="100,100"><span id="igt"><<timed 1s>>[queequeg] woo we made it<</timed>>
<<timed 2s>>[ishmael] lich time!<</timed>>
<<timed 2.25s>>[ahab] i think we can take him this time<</timed>>
<<timed 2.5s>>[ishmael] one last chance!<</timed>>
<<timed 4s>>[LICH] Many adventurers have sought to defeat me these past 500 years. I, the LICH, cannot be stopped!<</timed>>
<<timed 5s>>[queequeg] get him!!!!!<</timed>>
<<timed 5.5s>>[ahab] from hells heart I stab at thee!<</timed>>
<<timed 6s>>LICH casts FIREBALL!<</timed>>
<<timed 7s>>queequeg takes 13 damage!<</timed>>
<<timed 7.25s>>ishmael takes 13 damage!<</timed>>
<<timed 7.5s>>ahab takes 13 damage!<</timed>>
<<timed 10s>>queequeg attacks LICH…and misses!<</timed>>
<<timed 12s>>ishmael attacks LICH…LICH takes 5 damage!<</timed>>
<<timed 14s>>ahab casts PROTECT. You are imbued with magical protection!<</timed>>
<<timed 16s>>LICH casts FIREBALL!<</timed>>
<<timed 17s>>queequeg takes 8 damage!<</timed>>
<<timed 17.25s>>queequeg has perished!<</timed>>
<<timed 17.75s>>ishmael takes 8 damage!<</timed>>
<<timed 18s>>ishmael has perished!<</timed>>
<<timed 18.5s>>ahab takes 8 damage!<</timed>>
<<timed 18.75s>>ahab has perished!<</timed>>
<<timed 22s>>[queequeg] dang<</timed>>
<<timed 24s>>[ahab] i thought we had him this time<</timed>>
<<timed 25s>>[ishmael] they nerfed protect last update it looks<</timed>>
<<timed 30s>>[queequeg] welp. see yall at the office on monday<</timed>>
<<timed 32s>>[ishmael] have a good rest of the weekend<</timed>>
<<timed 32.5s>>[ishmael] see ya<</timed>>
<<timed 34s>>ishmael has logged off.<</timed>>
<<timed 34.5s>>ahab has logged off.<</timed>>
<<timed 36s>>queequeg has logged off.<</timed>>
</span>
<<timed 37s>><<if $memory > 18>><<set $cost to 18>>[[Record this event for 18 memory|Recorder][$a83 to 1; $memory to $memory - 18]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="63" name="8_5" tags="" position="1800,700" size="100,100"></tw-passagedata><tw-passagedata pid="64" name="8_4" tags="" position="1800,600" size="100,100"></tw-passagedata><tw-passagedata pid="65" name="9_5" tags="" position="1900,700" size="100,100"></tw-passagedata><tw-passagedata pid="66" name="7_7" tags="" position="1700,900" size="100,100"><span id="igt"><<timed 1s>>[ELF MERCHANT] Seeking KoboldSkin for 5 Gold!<</timed>>
<<timed 1.5s>>[DROW MERCHANT] Seeking GreenRuby for 30 Gold!<</timed>>
<<timed 2s>>[HALF-ORC MERCHANT] Seeking GoldPhylactery for 1000 Gold!<</timed>>
<<timed 4s>>nouveau_r trades 200 GoldPhylactery for 200000 Gold<</timed>>
<<timed 5s>>[nouveau_r] muahaha<</timed>>
<<timed 5.5s>>[nouveau_r] Im rich<</timed>>
<<timed 7s>>[living_armor] what the heck<</timed>>
<<timed 7.5s>>[living_armor] howd you get so many philacteryies (sp?)<</timed>>
<<timed 9s>>[nouveau_r] Ive been grinding the lich fight for about a month or so<</timed>>
<<timed 9.5s>>[nouveau_r] to get on the leaderboard for most gold<</timed>>
<<timed 11s>>[nouveau_r] Im first place now<</timed>>
<<timed 13s>>[living_armor] oh uh<</timed>>
<<timed 15s>>[living_armor] congrats I guess<</timed>>
<<timed 15.5s>>[living_armor] you know the game is shutting down right??<</timed>>
<<timed 16.5s>>[nouveau_r] exactly<</timed>>
<<timed 17s>>[nouveau_r] now no one will be able to take my spot<</timed>>
<<timed 19s>>[living_armor] yeah but no one will be able to see it<</timed>>
<<timed 19.5s>>[living_armor] the leaderboard shuts down with the servers<</timed>>
<<timed 23s>>[nouveau_r] whatever man shut up<</timed>>
<<timed 23.5s>>nouveau_r has logged off.<</timed>>
</span>
<<timed 24s>><<if $memory > 8>><<set $cost to 8>>[[Record this event for 8 memory|Recorder][$a77 to 1; $memory to $memory - 8]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="67" name="8_7" tags="" position="1800,900" size="100,100"></tw-passagedata><tw-passagedata pid="68" name="7_6" tags="" position="1700,800" size="100,100"></tw-passagedata><tw-passagedata pid="69" name="7_5" tags="" position="1700,700" size="100,100"></tw-passagedata><tw-passagedata pid="70" name="8_9" tags="" position="1800,1100" size="100,100"></tw-passagedata><tw-passagedata pid="71" name="5_9" tags="" position="1500,1100" size="100,100"></tw-passagedata><tw-passagedata pid="72" name="5_7" tags="" position="1500,900" size="100,100"></tw-passagedata><tw-passagedata pid="73" name="4_9" tags="" position="1400,1100" size="100,100"></tw-passagedata><tw-passagedata pid="74" name="5_8" tags="" position="1500,1000" size="100,100"></tw-passagedata><tw-passagedata pid="75" name="5_6" tags="" position="1500,800" size="100,100"><span id="igt"><<timed 1s>>[beastt] i dont know what im gonna do with my time<</timed>>
<<timed 3s>>[gandelf] realmdungeon 3D is in development, you could try questonline as well. I’m in a guild there you could join<</timed>>
<<timed 5s>>[beastt] i dont like 3d games.<</timed>>
<<timed 6s>>[friend_tom] you could go outside, ride a bike, get drunk with friends<</timed>>
<<timed 9s>>[beastt] i dont have friends<</timed>>
<<timed 11s>>[gandelf] ouch<</timed>>
<<timed 11.5s>>[friend_tom] you can be friends with us on questonline =)<</timed>>
<<timed 12.5s>>[friend_tom] or you could ask people at work? maybe they would go for a pint<</timed>>
<<timed 14s>>[beastt] i dont work<</timed>>
<<timed 16s>>[beastt] i just stay at home and play realmdungeon. i live with my parents<</timed>>
<<timed 17s>>[beastt] i dont want to do anything else<</timed>>
<<timed 17.5s>>[beastt] this stinks<</timed>>
<<timed 20s>>[friend_tom] =( sorry dude<</timed>>
<<timed 20.5s>>[gandelf] hang in there pal<</timed>>
</span>
<<timed 21s>><<if $memory > 10>><<set $cost to 10>>[[Record this event for 10 memory|Recorder][$a56 to 1; $memory to $memory - 10]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata><tw-passagedata pid="76" name="6_5" tags="" position="1600,700" size="100,100"><span id="igt"><<timed 1s>>[BALTHAZAR] Beware, traveller!<</timed>>
<<timed 3s>>[dogcoupland] are you talking to me?<</timed>>
<<timed 3.25s>>[BALTHAZAR] The Magic Tower lies further this way, to the northeast!<</timed>>
<<timed 4s>>[BALTHAZAR] You would best prepare yourself before going into battle!<</timed>>
<<timed 6s>>[dogcoupland] huh?<</timed>>
<<timed 6.5s>>[dogcoupland] i have no idea what that is<</timed>>
<<timed 7.5s>>[nhorn] lol<</timed>>
<<timed 8s>>[BALTHAZAR] Beware, traveller!<</timed>>
<<timed 10.25s>>[BALTHAZAR] The Magic Tower lies further this way, to the northeast!<</timed>>
<<timed 11s>>[BALTHAZAR] You would best prepare yourself before going into battle!<</timed>>
<<timed 12s>>[dogcoupland] what the hell is going on<</timed>>
<<timed 13s>>[nhorn] thats an NPC<</timed>>
<<timed 13.25s>>[nhorn] you can tell<</timed>>
<<timed 13.5s>>[nhorn] their names are in all caps<</timed>>
<<timed 14s>>[nhorn] they just repeat the same lines over and over. their ai hasnt been changed since release date<</timed>>
<<timed 16s>>[dogcoupland] oh<</timed>>
<<timed 17s>>[dogcoupland] ive only been playing for a week<</timed>>
<<timed 18s>>[dogcoupland] thought id check out what the rage is all about<</timed>>
<<timed 19s>>[nhorn] rock on!<</timed>>
<<timed 20s>>[BALTHAZAR] Beware, traveller!<</timed>>
<<timed 20.5s>>[dogcoupland] ah shut the hell up<</timed>>
</span>
<<timed 21s>><<if $memory > 7>><<set $cost to 7>>[[Record this event for 7 memory|Recorder][$a65 to 1; $memory to $memory - 7]]<<else>>You don't have enough Memory to record this event.<</if>><</timed>></tw-passagedata></tw-storydata>
<script id="script-sugarcube" type="text/javascript">
/*! SugarCube JS */
if(document.documentElement.getAttribute("data-init")==="loading"){(function(window,document,jQuery,undefined){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _iterableToArray(iter){if("undefined"!=typeof Symbol&&null!=iter[Symbol.iterator]||null!=iter["@@iterator"])return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _typeof(obj){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}var errorPrologRegExp=/^(?:(?:uncaught\s+(?:exception:\s+)?)?\w*(?:error|exception|_err):\s+)+/i,Alert=function(){function mesg(where,error,isFatal,isUncaught){var mesg="Error",nice="A".concat(isFatal?" fatal":"n"," error has occurred.");nice+=isFatal?" Aborting.":" You may be able to continue, but some parts may not work properly.";var isObject=null!==error&&"object"===_typeof(error),what=(isObject&&"message"in error?String(error.message).replace(errorPrologRegExp,""):String(error)).trim()||"unknown error";null!=where&&(mesg+=" [".concat(where,"]")),mesg+=": ".concat(what,"."),isObject&&"stack"in error&&(mesg+="\n\nStack Trace:\n".concat(error.stack)),mesg&&(nice+="\n\n".concat(mesg)),isUncaught||console[isFatal?"error":"warn"](mesg),window.alert(nice)}var origOnError;return origOnError=window.onerror,window.onerror=function(what,source,lineNum,colNum,error){"complete"===document.readyState?mesg(null,null!=error?error:what,!1,!0):(mesg(null,null!=error?error:what,!0,!0),window.onerror=origOnError,"function"==typeof window.onerror&&window.onerror.apply(this,arguments))},Object.freeze(Object.defineProperties({},{error:{value:function(where,error){mesg(where,error)}},fatal:{value:function(where,error){mesg(where,error,!0)}}}))}(),Patterns=(wsMap=new Map([[" ","\\u0020"],["\f","\\f"],["\n","\\n"],["\r","\\r"],["\t","\\t"],["\v","\\v"],[" ","\\u00a0"],[" ","\\u1680"],["","\\u180e"],[" ","\\u2000"],[" ","\\u2001"],[" ","\\u2002"],[" ","\\u2003"],[" ","\\u2004"],[" ","\\u2005"],[" ","\\u2006"],[" ","\\u2007"],[" ","\\u2008"],[" ","\\u2009"],[" ","\\u200a"],["\u2028","\\u2028"],["\u2029","\\u2029"],[" ","\\u202f"],[" ","\\u205f"],[" ","\\u3000"],["\ufeff","\\ufeff"]]),wsRe=/^\s$/,missing="",wsMap.forEach((function(pat,char){wsRe.test(char)||(missing+=pat)})),space=missing?"[\\s".concat(missing,"]"):"\\s",spaceNoTerminator="[\\u0020\\f\\t\\v\\u00a0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]",notSpace="\\s"===space?"\\S":space.replace(/^\[/,"[^"),anyChar="(?:.|".concat("[\\n\\r\\u2028\\u2029]",")"),anyLetter="[0-9A-Z_a-z\\-\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]",anyLetterStrict=anyLetter.replace("\\-",""),identifier="".concat("[$A-Z_a-z]").concat("[$0-9A-Z_a-z]","*"),variable="[$_]"+identifier,htmlTagName="[A-Za-z](?:".concat(cENChar="(?:[\\x2D.0-9A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])","*-").concat(cENChar,"*|[0-9A-Za-z]*)"),twStyle="(".concat(anyLetter,"+)\\(([^\\)\\|\\n]+)\\):"),cssStyle="".concat(spaceNoTerminator,"*(").concat(anyLetter,"+)").concat(spaceNoTerminator,"*:([^;\\|\\n]+);"),idOrClass="".concat(spaceNoTerminator,"*((?:").concat("[#.]").concat(anyLetter,"+").concat(spaceNoTerminator,"*)+);"),inlineCss="".concat(twStyle,"|").concat(cssStyle,"|").concat(idOrClass),Object.freeze({space:space,spaceNoTerminator:spaceNoTerminator,lineTerminator:"[\\n\\r\\u2028\\u2029]",notSpace:notSpace,anyChar:anyChar,anyLetter:anyLetter,anyLetterStrict:anyLetterStrict,identifierFirstChar:"[$A-Z_a-z]",identifierNextChar:"[$0-9A-Z_a-z]",identifier:identifier,variableSigil:"[$_]",variable:variable,macroName:"[A-Za-z][\\w-]*|[=-]",templateName:"[A-Za-z][\\w-]*",htmlTagName:htmlTagName,cssIdOrClassSigil:"[#.]",cssImage:"\\[[<>]?[Ii][Mm][Gg]\\[(?:\\s|\\S)*?\\]\\]+",inlineCss:inlineCss,url:"(?:file|https?|mailto|ftp|javascript|irc|news|data):[^\\s'\"]+"})),wsMap,wsRe,missing,cENChar,twStyle,cssStyle,idOrClass,space,spaceNoTerminator,notSpace,anyChar,anyLetter,anyLetterStrict,identifier,variable,htmlTagName,inlineCss;!function(){var startWSRe,endWSRe,_trimString=(startWSRe=new RegExp("^".concat(Patterns.space).concat(Patterns.space,"*")),endWSRe=new RegExp("".concat(Patterns.space).concat(Patterns.space,"*$")),function(str,where){var val=String(str);if(!val)return val;switch(where){case"start":return startWSRe.test(val)?val.replace(startWSRe,""):val;case"end":return endWSRe.test(val)?val.replace(endWSRe,""):val;default:throw new Error('_trimString called with incorrect where parameter value: "'.concat(where,'"'))}});function _createPadString(length,padding){var targetLength=Number.parseInt(length,10)||0;if(targetLength<1)return"";var padString=void 0===padding?"":String(padding);for(""===padString&&(padString=" ");padString.length<targetLength;){var curPadLength=padString.length,remainingLength=targetLength-curPadLength;padString+=curPadLength>remainingLength?padString.slice(0,remainingLength):padString}return padString.length>targetLength&&(padString=padString.slice(0,targetLength)),padString}Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,writable:!0,value:function flat(){if(null==this)throw new TypeError("Array.prototype.flat called on null or undefined");var depth=0===arguments.length?1:Number(arguments[0])||0;return depth<1?Array.prototype.slice.call(this):Array.prototype.reduce.call(this,(function(acc,cur){return cur instanceof Array?acc.push.apply(acc,_toConsumableArray(flat.call(cur,depth-1))):acc.push(cur),acc}),[])}}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.flatMap called on null or undefined");return Array.prototype.map.apply(this,arguments).flat()}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");if(0===arguments.length)return!1;var length=this.length>>>0;if(0===length)return!1;var needle=arguments[0],i=Number(arguments[1])||0;for(i<0&&(i=Math.max(0,length+i));i<length;++i){var value=this[i];if(value===needle||value!=value&&needle!=needle)return!0}return!1}}),Object.entries||Object.defineProperty(Object,"entries",{configurable:!0,writable:!0,value:function(obj){if("object"!==_typeof(obj)||null===obj)throw new TypeError("Object.entries object parameter must be an object");return Object.keys(obj).map((function(key){return[key,obj[key]]}))}}),Object.fromEntries||Object.defineProperty(Object,"fromEntries",{configurable:!0,writable:!0,value:function(iter){return Array.from(iter).reduce((function(acc,pair){if(Object(pair)!==pair)throw new TypeError("Object.fromEntries iterable parameter must yield objects");return pair[0]in acc?Object.defineProperty(acc,pair[0],{configurable:!0,enumerable:!0,writable:!0,value:pair[1]}):acc[pair[0]]=pair[1],acc}),{})}}),Object.getOwnPropertyDescriptors||Object.defineProperty(Object,"getOwnPropertyDescriptors",{configurable:!0,writable:!0,value:function(obj){if(null==obj)throw new TypeError("Object.getOwnPropertyDescriptors object parameter is null or undefined");var O=Object(obj);return Reflect.ownKeys(O).reduce((function(acc,key){var desc=Object.getOwnPropertyDescriptor(O,key);return void 0!==desc&&(key in acc?Object.defineProperty(acc,key,{configurable:!0,enumerable:!0,writable:!0,value:desc}):acc[key]=desc),acc}),{})}}),Object.values||Object.defineProperty(Object,"values",{configurable:!0,writable:!0,value:function(obj){if("object"!==_typeof(obj)||null===obj)throw new TypeError("Object.values object parameter must be an object");return Object.keys(obj).map((function(key){return obj[key]}))}}),String.prototype.padStart||Object.defineProperty(String.prototype,"padStart",{configurable:!0,writable:!0,value:function(length,padding){if(null==this)throw new TypeError("String.prototype.padStart called on null or undefined");var baseString=String(this),baseLength=baseString.length,targetLength=Number.parseInt(length,10);return targetLength<=baseLength?baseString:_createPadString(targetLength-baseLength,padding)+baseString}}),String.prototype.padEnd||Object.defineProperty(String.prototype,"padEnd",{configurable:!0,writable:!0,value:function(length,padding){if(null==this)throw new TypeError("String.prototype.padEnd called on null or undefined");var baseString=String(this),baseLength=baseString.length,targetLength=Number.parseInt(length,10);return targetLength<=baseLength?baseString:baseString+_createPadString(targetLength-baseLength,padding)}}),String.prototype.trimStart||Object.defineProperty(String.prototype,"trimStart",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimStart called on null or undefined");return _trimString(this,"start")}}),String.prototype.trimLeft||Object.defineProperty(String.prototype,"trimLeft",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimLeft called on null or undefined");return _trimString(this,"start")}}),String.prototype.trimEnd||Object.defineProperty(String.prototype,"trimEnd",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimEnd called on null or undefined");return _trimString(this,"end")}}),String.prototype.trimRight||Object.defineProperty(String.prototype,"trimRight",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimRight called on null or undefined");return _trimString(this,"end")}})}(),function(){var _nativeMathRandom=Math.random,_regExpMetaCharsRe,_hasRegExpMetaCharsRe,_formatRegExp,_hasFormatRegExp;function _random(){var min,max;switch(arguments.length){case 0:throw new Error("_random called with insufficient parameters");case 1:min=0,max=arguments[0];break;default:min=arguments[0],max=arguments[1]}if(min>max){var _ref=[max,min];min=_ref[0],max=_ref[1]}return Math.floor(_nativeMathRandom()*(max-min+1))+min}function _randomIndex(length,boundsArgs){var min,max;switch(boundsArgs.length){case 1:min=0,max=length-1;break;case 2:min=0,max=Math.trunc(boundsArgs[1]);break;default:min=Math.trunc(boundsArgs[1]),max=Math.trunc(boundsArgs[2])}return Number.isNaN(min)?min=0:!Number.isFinite(min)||min>=length?min=length-1:min<0&&(min=length+min)<0&&(min=0),Number.isNaN(max)?max=0:(!Number.isFinite(max)||max>=length||max<0&&(max=length+max)<0)&&(max=length-1),_random(min,max)}function _getCodePointStartAndEnd(str,pos){var code=str.charCodeAt(pos);if(Number.isNaN(code))return{char:"",start:-1,end:-1};if(code<55296||code>57343)return{char:str.charAt(pos),start:pos,end:pos};if(code>=55296&&code<=56319){var nextPos=pos+1;if(nextPos>=str.length)throw new Error("high surrogate without trailing low surrogate");var nextCode=str.charCodeAt(nextPos);if(nextCode<56320||nextCode>57343)throw new Error("high surrogate without trailing low surrogate");return{char:str.charAt(pos)+str.charAt(nextPos),start:pos,end:nextPos}}if(0===pos)throw new Error("low surrogate without leading high surrogate");var prevPos=pos-1,prevCode=str.charCodeAt(prevPos);if(prevCode<55296||prevCode>56319)throw new Error("low surrogate without leading high surrogate");return{char:str.charAt(prevPos)+str.charAt(pos),start:prevPos,end:pos}}Object.defineProperty(Array,"random",{configurable:!0,writable:!0,value:function(array){if("object"!==_typeof(array)||null===array||!Object.prototype.hasOwnProperty.call(array,"length"))throw new TypeError("Array.random array parameter must be an array or array-lke object");var length=array.length>>>0;if(0!==length){var index=0===arguments.length?_random(0,length-1):_randomIndex(length,Array.prototype.slice.call(arguments,1));return array[index]}}}),Object.defineProperty(Array.prototype,"concatUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.concatUnique called on null or undefined");var result=Array.from(this);if(0===arguments.length)return result;var items=Array.prototype.reduce.call(arguments,(function(prev,cur){return prev.concat(cur)}),[]),addSize=items.length;if(0===addSize)return result;for(var indexOf=Array.prototype.indexOf,push=Array.prototype.push,i=0;i<addSize;++i){var value=items[i];-1===indexOf.call(result,value)&&push.call(result,value)}return result}}),Object.defineProperty(Array.prototype,"count",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.count called on null or undefined");for(var indexOf=Array.prototype.indexOf,needle=arguments[0],pos=Number(arguments[1])||0,count=0;-1!==(pos=indexOf.call(this,needle,pos));)++count,++pos;return count}}),Object.defineProperty(Array.prototype,"countWith",{configurable:!0,writable:!0,value:function(predicate,thisArg){if(null==this)throw new TypeError("Array.prototype.countWith called on null or undefined");if("function"!=typeof predicate)throw new Error("Array.prototype.countWith predicate parameter must be a function");var length=this.length>>>0;if(0===length)return 0;for(var count=0,i=0;i<length;++i)predicate.call(thisArg,this[i],i,this)&&++count;return count}}),Object.defineProperty(Array.prototype,"delete",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.delete called on null or undefined");if(0===arguments.length)return[];var length=this.length>>>0;if(0===length)return[];for(var needles=Array.prototype.concat.apply([],arguments),needlesLength=needles.length,indices=[],i=0;i<length;++i)for(var value=this[i],j=0;j<needlesLength;++j){var needle=needles[j];if(value===needle||value!=value&&needle!=needle){indices.push(i);break}}for(var result=[],_i=0,iend=indices.length;_i<iend;++_i)result[_i]=this[indices[_i]];for(var splice=Array.prototype.splice,_i2=indices.length-1;_i2>=0;--_i2)splice.call(this,indices[_i2],1);return result}}),Object.defineProperty(Array.prototype,"deleteAt",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.deleteAt called on null or undefined");if(0===arguments.length)return[];var length=this.length>>>0;if(0===length)return[];for(var splice=Array.prototype.splice,cpyIndices=_toConsumableArray(new Set(Array.prototype.concat.apply([],arguments).map((function(x){return x<0?Math.max(0,length+x):x}))).values()),delIndices=_toConsumableArray(cpyIndices).sort((function(a,b){return b-a})),result=[],i=0,iend=cpyIndices.length;i<iend;++i)result[i]=this[cpyIndices[i]];for(var _i3=0,_iend=delIndices.length;_i3<_iend;++_i3)splice.call(this,delIndices[_i3],1);return result}}),Object.defineProperty(Array.prototype,"deleteWith",{configurable:!0,writable:!0,value:function(predicate,thisArg){if(null==this)throw new TypeError("Array.prototype.deleteWith called on null or undefined");if("function"!=typeof predicate)throw new Error("Array.prototype.deleteWith predicate parameter must be a function");var length=this.length>>>0;if(0===length)return[];for(var splice=Array.prototype.splice,indices=[],result=[],i=0;i<length;++i)predicate.call(thisArg,this[i],i,this)&&(result.push(this[i]),indices.push(i));for(var _i4=indices.length-1;_i4>=0;--_i4)splice.call(this,indices[_i4],1);return result}}),Object.defineProperty(Array.prototype,"first",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.first called on null or undefined");if(0!==this.length>>>0)return this[0]}}),Object.defineProperty(Array.prototype,"includesAll",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.includesAll called on null or undefined");if(1===arguments.length)return Array.isArray(arguments[0])?Array.prototype.includesAll.apply(this,arguments[0]):Array.prototype.includes.apply(this,arguments);for(var i=0,iend=arguments.length;i<iend;++i)if(!Array.prototype.some.call(this,(function(val){return val===this.val||val!=val&&this.val!=this.val}),{val:arguments[i]}))return!1;return!0}}),Object.defineProperty(Array.prototype,"includesAny",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.includesAny called on null or undefined");if(1===arguments.length)return Array.isArray(arguments[0])?Array.prototype.includesAny.apply(this,arguments[0]):Array.prototype.includes.apply(this,arguments);for(var i=0,iend=arguments.length;i<iend;++i)if(Array.prototype.some.call(this,(function(val){return val===this.val||val!=val&&this.val!=this.val}),{val:arguments[i]}))return!0;return!1}}),Object.defineProperty(Array.prototype,"last",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.last called on null or undefined");var length=this.length>>>0;if(0!==length)return this[length-1]}}),Object.defineProperty(Array.prototype,"pluck",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.pluck called on null or undefined");var length=this.length>>>0;if(0!==length){var index=0===arguments.length?_random(0,length-1):_randomIndex(length,Array.prototype.slice.call(arguments));return Array.prototype.splice.call(this,index,1)[0]}}}),Object.defineProperty(Array.prototype,"pluckMany",{configurable:!0,writable:!0,value:function(wantSize){if(null==this)throw new TypeError("Array.prototype.pluckMany called on null or undefined");var length=this.length>>>0;if(0===length)return[];var want=Math.trunc(wantSize);if(!Number.isInteger(want))throw new Error("Array.prototype.pluckMany want parameter must be an integer");if(want<1)return[];want>length&&(want=length);var splice=Array.prototype.splice,result=[],max=length-1;do{result.push(splice.call(this,_random(0,max--),1)[0])}while(result.length<want);return result}}),Object.defineProperty(Array.prototype,"pushUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.pushUnique called on null or undefined");var addSize=arguments.length;if(0===addSize)return this.length>>>0;for(var indexOf=Array.prototype.indexOf,push=Array.prototype.push,i=0;i<addSize;++i){var value=arguments[i];-1===indexOf.call(this,value)&&push.call(this,value)}return this.length>>>0}}),Object.defineProperty(Array.prototype,"random",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.random called on null or undefined");var length=this.length>>>0;if(0!==length){var index=0===arguments.length?_random(0,length-1):_randomIndex(length,Array.prototype.slice.call(arguments));return this[index]}}}),Object.defineProperty(Array.prototype,"randomMany",{configurable:!0,writable:!0,value:function(wantSize){if(null==this)throw new TypeError("Array.prototype.randomMany called on null or undefined");var length=this.length>>>0;if(0===length)return[];var want=Math.trunc(wantSize);if(!Number.isInteger(want))throw new Error("Array.prototype.randomMany want parameter must be an integer");if(want<1)return[];want>length&&(want=length);var picked=new Map,result=[],max=length-1;do{var i=void 0;do{i=_random(0,max)}while(picked.has(i));picked.set(i,!0),result.push(this[i])}while(result.length<want);return result}}),Object.defineProperty(Array.prototype,"shuffle",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.shuffle called on null or undefined");var length=this.length>>>0;if(0===length)return this;for(var i=length-1;i>0;--i){var j=Math.floor(_nativeMathRandom()*(i+1));if(i!==j){var swap=this[i];this[i]=this[j],this[j]=swap}}return this}}),Object.defineProperty(Array.prototype,"unshiftUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.unshiftUnique called on null or undefined");var addSize=arguments.length;if(0===addSize)return this.length>>>0;for(var indexOf=Array.prototype.indexOf,unshift=Array.prototype.unshift,i=0;i<addSize;++i){var value=arguments[i];-1===indexOf.call(this,value)&&unshift.call(this,value)}return this.length>>>0}}),Object.defineProperty(Function.prototype,"partial",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Function.prototype.partial called on null or undefined");var slice=Array.prototype.slice,fn=this,bound=slice.call(arguments,0);return function(){for(var applied=[],argc=0,i=0;i<bound.length;++i)applied.push(bound[i]===undefined?arguments[argc++]:bound[i]);return fn.apply(this,applied.concat(slice.call(arguments,argc)))}}}),Object.defineProperty(Math,"clamp",{configurable:!0,writable:!0,value:function(num,min,max){var value=Number(num);return Number.isNaN(value)?NaN:value.clamp(min,max)}}),Object.defineProperty(Math,"easeInOut",{configurable:!0,writable:!0,value:function(num){return 1-(Math.cos(Number(num)*Math.PI)+1)/2}}),Object.defineProperty(Number.prototype,"clamp",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Number.prototype.clamp called on null or undefined");if(2!==arguments.length)throw new Error("Number.prototype.clamp called with an incorrect number of parameters");var min=Number(arguments[0]),max=Number(arguments[1]);if(min>max){var _ref2=[max,min];min=_ref2[0],max=_ref2[1]}return Math.min(Math.max(this,min),max)}}),RegExp.escape||(_regExpMetaCharsRe=/[\\^$*+?.()|[\]{}]/g,_hasRegExpMetaCharsRe=new RegExp(_regExpMetaCharsRe.source),Object.defineProperty(RegExp,"escape",{configurable:!0,writable:!0,value:function(str){var val=String(str);return val&&_hasRegExpMetaCharsRe.test(val)?val.replace(_regExpMetaCharsRe,"\\$&"):val}})),_formatRegExp=/{(\d+)(?:,([+-]?\d+))?}/g,_hasFormatRegExp=new RegExp(_formatRegExp.source),Object.defineProperty(String,"format",{configurable:!0,writable:!0,value:function(format){function padString(str,align,pad){if(!align)return str;var plen=Math.abs(align)-str.length;if(plen<1)return str;var padding=String(pad).repeat(plen);return align<0?str+padding:padding+str}if(arguments.length<2)return 0===arguments.length?"":format;var args=2===arguments.length&&Array.isArray(arguments[1])?_toConsumableArray(arguments[1]):Array.prototype.slice.call(arguments,1);return 0===args.length?format:_hasFormatRegExp.test(format)?(_formatRegExp.lastIndex=0,format.replace(_formatRegExp,(function(match,index,align){var retval=args[index];if(null==retval)return"";for(;"function"==typeof retval;)retval=retval();switch(_typeof(retval)){case"string":break;case"object":retval=JSON.stringify(retval);break;default:retval=String(retval)}return padString(retval,align?Number.parseInt(align,10):0," ")}))):format}}),Object.defineProperty(String.prototype,"contains",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.contains called on null or undefined");return-1!==String.prototype.indexOf.apply(this,arguments)}}),Object.defineProperty(String.prototype,"count",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.count called on null or undefined");var needle=String(arguments[0]||"");if(""===needle)return 0;for(var indexOf=String.prototype.indexOf,step=needle.length,pos=Number(arguments[1])||0,count=0;-1!==(pos=indexOf.call(this,needle,pos));)++count,pos+=step;return count}}),Object.defineProperty(String.prototype,"first",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.first called on null or undefined");return _getCodePointStartAndEnd(String(this),0).char}}),Object.defineProperty(String.prototype,"last",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.last called on null or undefined");var str=String(this);return _getCodePointStartAndEnd(str,str.length-1).char}}),Object.defineProperty(String.prototype,"splice",{configurable:!0,writable:!0,value:function(startAt,delCount,replacement){if(null==this)throw new TypeError("String.prototype.splice called on null or undefined");var length=this.length>>>0;if(0===length)return"";var start=Number(startAt);Number.isSafeInteger(start)?start<0&&(start+=length)<0&&(start=0):start=0,start>length&&(start=length);var count=Number(delCount);(!Number.isSafeInteger(count)||count<0)&&(count=0);var res=this.slice(0,start);return void 0!==replacement&&(res+=replacement),start+count<length&&(res+=this.slice(start+count)),res}}),Object.defineProperty(String.prototype,"splitOrEmpty",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.splitOrEmpty called on null or undefined");return""===String(this)?[]:String.prototype.split.apply(this,arguments)}}),Object.defineProperty(String.prototype,"toLocaleUpperFirst",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.toLocaleUpperFirst called on null or undefined");var str=String(this),_getCodePointStartAnd3=_getCodePointStartAndEnd(str,0),char=_getCodePointStartAnd3.char,end=_getCodePointStartAnd3.end;return-1===end?"":char.toLocaleUpperCase()+str.slice(end+1)}}),Object.defineProperty(String.prototype,"toUpperFirst",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.toUpperFirst called on null or undefined");var str=String(this),_getCodePointStartAnd4=_getCodePointStartAndEnd(str,0),char=_getCodePointStartAnd4.char,end=_getCodePointStartAnd4.end;return-1===end?"":char.toUpperCase()+str.slice(end+1)}}),Object.defineProperty(Date.prototype,"toJSON",{configurable:!0,writable:!0,value:function(){return["(revive:date)",this.toISOString()]}}),Object.defineProperty(Function.prototype,"toJSON",{configurable:!0,writable:!0,value:function(){return["(revive:eval)","(".concat(this.toString(),")")]}}),Object.defineProperty(Map.prototype,"toJSON",{configurable:!0,writable:!0,value:function(){return["(revive:map)",_toConsumableArray(this)]}}),Object.defineProperty(RegExp.prototype,"toJSON",{configurable:!0,writable:!0,value:function(){return["(revive:eval)",this.toString()]}}),Object.defineProperty(Set.prototype,"toJSON",{configurable:!0,writable:!0,value:function(){return["(revive:set)",_toConsumableArray(this)]}}),Object.defineProperty(JSON,"reviveWrapper",{configurable:!0,writable:!0,value:function(code,data){if("string"!=typeof code)throw new TypeError("JSON.reviveWrapper code parameter must be a string");return["(revive:eval)",[code,data]]}}),Object.defineProperty(JSON,"_real_stringify",{value:JSON.stringify}),Object.defineProperty(JSON,"stringify",{configurable:!0,writable:!0,value:function(_value,replacer,space){return JSON._real_stringify(_value,(function(key,val){var value=val;if("function"==typeof replacer)try{value=replacer(key,value)}catch(ex){}return void 0===value&&(value=["(revive:eval)","undefined"]),value}),space)}}),Object.defineProperty(JSON,"_real_parse",{value:JSON.parse}),Object.defineProperty(JSON,"parse",{configurable:!0,writable:!0,value:function value(text,reviver){return JSON._real_parse(text,(function(key,val){var value=val;if(Array.isArray(value)&&2===value.length)switch(value[0]){case"(revive:set)":value=new Set(value[1]);break;case"(revive:map)":value=new Map(value[1]);break;case"(revive:date)":value=new Date(value[1]);break;case"(revive:eval)":try{if(Array.isArray(value[1])){var $ReviveData$=value[1][1];value=eval(value[1][0])}else value=eval(value[1])}catch(ex){}}else if("string"==typeof value&&"@@revive@@"===value.slice(0,10))try{value=eval(value.slice(10))}catch(ex){}if("function"==typeof reviver)try{value=reviver(key,value)}catch(ex){}return value}))}}),Object.defineProperty(Array.prototype,"contains",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.contains called on null or undefined");return Array.prototype.includes.apply(this,arguments)}}),Object.defineProperty(Array.prototype,"containsAll",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.containsAll called on null or undefined");return Array.prototype.includesAll.apply(this,arguments)}}),Object.defineProperty(Array.prototype,"containsAny",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.containsAny called on null or undefined");return Array.prototype.includesAny.apply(this,arguments)}}),Object.defineProperty(Array.prototype,"flatten",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.flatten called on null or undefined");return Array.prototype.flat.call(this,1/0)}}),Object.defineProperty(String.prototype,"readBracketedList",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.readBracketedList called on null or undefined");for(var match,re=new RegExp("(?:\\[\\[((?:\\s|\\S)*?)\\]\\])|([^\"'\\s]\\S*)","gm"),names=[];null!==(match=re.exec(this));)match[1]?names.push(match[1]):match[2]&&names.push(match[2]);return names}})}();var Browser=(userAgent=navigator.userAgent.toLowerCase(),winPhone=userAgent.includes("windows phone"),isMobile=Object.freeze({Android:!winPhone&&userAgent.includes("android"),BlackBerry:/blackberry|bb10/.test(userAgent),iOS:!winPhone&&/ip(?:hone|ad|od)/.test(userAgent),Opera:!winPhone&&("object"===_typeof(window.operamini)||userAgent.includes("opera mini")),Windows:winPhone||/iemobile|wpdesktop/.test(userAgent),any:function(){return isMobile.Android||isMobile.BlackBerry||isMobile.iOS||isMobile.Opera||isMobile.Windows}}),isGecko=!isMobile.Windows&&!/khtml|trident|edge/.test(userAgent)&&userAgent.includes("gecko"),isIE=!userAgent.includes("opera")&&/msie|trident/.test(userAgent),ieVersion=isIE?(ver=/(?:msie\s+|rv:)(\d+\.\d)/.exec(userAgent))?Number(ver[1]):0:null,isOpera=userAgent.includes("opera")||userAgent.includes(" opr/"),operaVersion=isOpera?function(){var ver=new RegExp("".concat(/khtml|chrome/.test(userAgent)?"opr":"version","\\/(\\d+\\.\\d+)")).exec(userAgent);return ver?Number(ver[1]):0}():null,isVivaldi=userAgent.includes("vivaldi"),Object.freeze({userAgent:userAgent,isMobile:isMobile,isGecko:isGecko,isIE:isIE,ieVersion:ieVersion,isOpera:isOpera,operaVersion:operaVersion,isVivaldi:isVivaldi})),ver,userAgent,winPhone,isMobile,isGecko,isIE,ieVersion,isOpera,operaVersion,isVivaldi,Has=(hasAudioElement=function(){try{return"function"==typeof document.createElement("audio").canPlayType}catch(ex){}return!1}(),hasFile=function(){try{return"Blob"in window&&"File"in window&&"FileList"in window&&"FileReader"in window&&(!Browser.isOpera||Browser.operaVersion>=15)}catch(ex){}return!1}(),hasGeolocation=function(){try{return"geolocation"in navigator&&"function"==typeof navigator.geolocation.getCurrentPosition&&"function"==typeof navigator.geolocation.watchPosition}catch(ex){}return!1}(),hasMutationObserver=function(){try{return"MutationObserver"in window&&"function"==typeof window.MutationObserver}catch(ex){}return!1}(),hasPerformance=function(){try{return"performance"in window&&"function"==typeof window.performance.now}catch(ex){}return!1}(),hasTouch=function(){try{return"ontouchstart"in window||!!window.DocumentTouch&&document instanceof window.DocumentTouch||!!navigator.maxTouchPoints||!!navigator.msMaxTouchPoints}catch(ex){}return!1}(),hasTransitionEndEvent=function(){try{for(var teMap=new Map([["transition","transitionend"],["MSTransition","msTransitionEnd"],["WebkitTransition","webkitTransitionEnd"],["MozTransition","transitionend"]]),teKeys=_toConsumableArray(teMap.keys()),el=document.createElement("div"),i=0;i<teKeys.length;++i)if(el.style[teKeys[i]]!==undefined)return teMap.get(teKeys[i])}catch(ex){}return!1}(),Object.freeze({audio:hasAudioElement,fileAPI:hasFile,geolocation:hasGeolocation,mutationObserver:hasMutationObserver,performance:hasPerformance,touch:hasTouch,transitionEndEvent:hasTransitionEndEvent})),hasAudioElement,hasFile,hasGeolocation,hasMutationObserver,hasPerformance,hasTouch,hasTransitionEndEvent,Visibility=(vendor=function(){try{return Object.freeze([{hiddenProperty:"hidden",stateProperty:"visibilityState",changeEvent:"visibilitychange"},{hiddenProperty:"webkitHidden",stateProperty:"webkitVisibilityState",changeEvent:"webkitvisibilitychange"},{hiddenProperty:"mozHidden",stateProperty:"mozVisibilityState",changeEvent:"mozvisibilitychange"},{hiddenProperty:"msHidden",stateProperty:"msVisibilityState",changeEvent:"msvisibilitychange"}].find((function(vnd){return vnd.hiddenProperty in document})))}catch(ex){}return undefined}(),Object.freeze(Object.defineProperties({},{vendor:{get:function(){return vendor}},state:{get:function(){return vendor&&document[vendor.stateProperty]||"visible"}},isEnabled:{value:function(){return Boolean(vendor)}},isHidden:{value:function(){return Boolean(vendor&&document[vendor.hiddenProperty])}},hiddenProperty:{value:vendor&&vendor.hiddenProperty},stateProperty:{value:vendor&&vendor.stateProperty},changeEvent:{value:vendor&&vendor.changeEvent}}))),vendor,Fullscreen=function(){var _hasPromise,vendor=function(){try{return Object.freeze([{isEnabled:"fullscreenEnabled",element:"fullscreenElement",requestFn:"requestFullscreen",exitFn:"exitFullscreen",changeEvent:"fullscreenchange",errorEvent:"fullscreenerror"},{isEnabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",requestFn:"webkitRequestFullscreen",exitFn:"webkitExitFullscreen",changeEvent:"webkitfullscreenchange",errorEvent:"webkitfullscreenerror"},{isEnabled:"mozFullScreenEnabled",element:"mozFullScreenElement",requestFn:"mozRequestFullScreen",exitFn:"mozCancelFullScreen",changeEvent:"mozfullscreenchange",errorEvent:"mozfullscreenerror"},{isEnabled:"msFullscreenEnabled",element:"msFullscreenElement",requestFn:"msRequestFullscreen",exitFn:"msExitFullscreen",changeEvent:"MSFullscreenChange",errorEvent:"MSFullscreenError"}].find((function(vnd){return vnd.isEnabled in document})))}catch(ex){}return undefined}(),_returnsPromise=(_hasPromise=null,function(){if(null!==_hasPromise)return _hasPromise;if(_hasPromise=!1,vendor)try{var value=document.exitFullscreen();value.catch((function(){})),_hasPromise=value instanceof Promise}catch(ex){}return _hasPromise});function _selectElement(requestedEl){var selectedEl=requestedEl||document.documentElement;return selectedEl===document.documentElement&&("msRequestFullscreen"===vendor.requestFn||Browser.isOpera&&Browser.operaVersion<15)&&(selectedEl=document.body),selectedEl}function isFullscreen(){return Boolean(vendor&&document[vendor.element])}function requestFullscreen(options,requestedEl){var _this=this;if(!vendor)return Promise.reject(new Error("fullscreen not supported"));var element=_selectElement(requestedEl);if("function"!=typeof element[vendor.requestFn])return Promise.reject(new Error("fullscreen not supported"));if(isFullscreen())return Promise.resolve();if(_returnsPromise())return element[vendor.requestFn](options);var namespace=".Fullscreen_requestFullscreen";return new Promise((function(resolve,reject){jQuery(element).off(namespace).one("".concat(vendor.errorEvent).concat(namespace," ").concat(vendor.changeEvent).concat(namespace),(function(ev){jQuery(_this).off(namespace),ev.type===vendor.errorEvent?reject(new Error("unknown fullscreen request error")):resolve()})),element[vendor.requestFn](options)}))}function exitFullscreen(){var _this2=this;if(!vendor||"function"!=typeof document[vendor.exitFn])return Promise.reject(new TypeError("fullscreen not supported"));if(!isFullscreen())return Promise.reject(new TypeError("fullscreen mode not active"));if(_returnsPromise())return document[vendor.exitFn]();var namespace=".Fullscreen_exitFullscreen";return new Promise((function(resolve,reject){jQuery(document).off(namespace).one("".concat(vendor.errorEvent).concat(namespace," ").concat(vendor.changeEvent).concat(namespace),(function(ev){jQuery(_this2).off(namespace),ev.type===vendor.errorEvent?reject(new Error("unknown fullscreen exit error")):resolve()})),document[vendor.exitFn]()}))}return Object.freeze(Object.defineProperties({},{vendor:{get:function(){return vendor}},element:{get:function(){return vendor?document[vendor.element]:null}},isEnabled:{value:function(){return Boolean(vendor&&document[vendor.isEnabled])}},isFullscreen:{value:isFullscreen},request:{value:requestFullscreen},exit:{value:exitFullscreen},toggle:{value:function(options,requestedEl){return isFullscreen()?exitFullscreen():requestFullscreen(options,requestedEl)}},onChange:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);$(element).on(vendor.changeEvent,handlerFn)}}},offChange:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);handlerFn?$(element).off(vendor.changeEvent,handlerFn):$(element).off(vendor.changeEvent)}}},onError:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);$(element).on(vendor.errorEvent,handlerFn)}}},offError:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);handlerFn?$(element).off(vendor.errorEvent,handlerFn):$(element).off(vendor.errorEvent)}}}}))}(),_ref3=Object.freeze(Object.defineProperties({},{clone:{value:function clone(orig){return"object"!==_typeof(orig)||null===orig?orig:orig instanceof String?String(orig):orig instanceof Number?Number(orig):orig instanceof Boolean?Boolean(orig):"function"==typeof orig.clone?orig.clone(!0):orig.nodeType&&"function"==typeof orig.cloneNode?orig.cloneNode(!0):(orig instanceof Array?copy=new Array(orig.length):orig instanceof Date?copy=new Date(orig.getTime()):orig instanceof Map?(copy=new Map,orig.forEach((function(val,key){return copy.set(key,clone(val))}))):orig instanceof RegExp?copy=new RegExp(orig):orig instanceof Set?(copy=new Set,orig.forEach((function(val){return copy.add(clone(val))}))):copy=Object.create(Object.getPrototypeOf(orig)),Object.keys(orig).forEach((function(name){return copy[name]=clone(orig[name])})),copy);var copy}},convertBreaks:{value:function(source){for(var node,output=document.createDocumentFragment(),para=document.createElement("p");null!==(node=source.firstChild);){if(node.nodeType===Node.ELEMENT_NODE)switch(node.nodeName.toUpperCase()){case"BR":if(null!==node.nextSibling&&node.nextSibling.nodeType===Node.ELEMENT_NODE&&"BR"===node.nextSibling.nodeName.toUpperCase()){source.removeChild(node.nextSibling),source.removeChild(node),output.appendChild(para),para=document.createElement("p");continue}if(!para.hasChildNodes()){source.removeChild(node);continue}break;case"ADDRESS":case"ARTICLE":case"ASIDE":case"BLOCKQUOTE":case"CENTER":case"DIV":case"DL":case"FIGURE":case"FOOTER":case"FORM":case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"HEADER":case"HR":case"MAIN":case"NAV":case"OL":case"P":case"PRE":case"SECTION":case"TABLE":case"UL":para.hasChildNodes()&&(output.appendChild(para),para=document.createElement("p")),output.appendChild(node);continue}para.appendChild(node)}para.hasChildNodes()&&output.appendChild(para),source.appendChild(output)}},safeActiveElement:{value:function(){try{return document.activeElement||null}catch(ex){return null}}},setDisplayTitle:{value:function(title){if("string"!=typeof title)throw new TypeError("story display title must be a string (received: ".concat(Util.getType(title),")"));var render=document.createDocumentFragment();new Wikifier(render,title);var text=function(source){for(var node,copy=source.cloneNode(!0),frag=document.createDocumentFragment();null!==(node=copy.firstChild);){if(node.nodeType===Node.ELEMENT_NODE)switch(node.nodeName.toUpperCase()){case"BR":case"DIV":case"P":frag.appendChild(document.createTextNode(" "))}frag.appendChild(node)}return frag.textContent}(render).trim();document.title=Config.passages.displayTitles&&""!==State.passage&&State.passage!==Config.passages.start?"".concat(State.passage," | ").concat(text):text;var storyTitle=document.getElementById("story-title");null!==storyTitle&&jQuery(storyTitle).empty().append(render)}},setPageElement:{value:function(idOrElement,titles,defaultText){var el="object"===_typeof(idOrElement)?idOrElement:document.getElementById(idOrElement);if(null==el)return null;var ids=Array.isArray(titles)?titles:[titles];jQuery(el).empty();for(var i=0,iend=ids.length;i<iend;++i)if(Story.has(ids[i]))return new Wikifier(el,Story.get(ids[i]).processText().trim()),el;if(null!=defaultText){var text=String(defaultText).trim();""!==text&&new Wikifier(el,text)}return el}},throwError:{value:function(place,message,source){var $wrapper=jQuery(document.createElement("div")),$toggle=jQuery(document.createElement("button")),$source=jQuery(document.createElement("pre")),mesg="".concat(L10n.get("errorTitle"),": ").concat(message||"unknown error");return $toggle.addClass("error-toggle").ariaClick({label:L10n.get("errorToggle")},(function(){$toggle.hasClass("enabled")?($toggle.removeClass("enabled"),$source.attr({"aria-hidden":!0,hidden:"hidden"})):($toggle.addClass("enabled"),$source.removeAttr("aria-hidden hidden"))})).appendTo($wrapper),jQuery(document.createElement("span")).addClass("error").text(mesg).appendTo($wrapper),jQuery(document.createElement("code")).text(source).appendTo($source),$source.addClass("error-source").attr({"aria-hidden":!0,hidden:"hidden"}).appendTo($wrapper),$wrapper.addClass("error-view").appendTo(place),console.warn("".concat(mesg,"\n\t").concat(source.replace(/\n/g,"\n\t"))),!1}},stringFrom:{value:function stringFrom(value){switch(_typeof(value)){case"function":return"[function]";case"number":if(Number.isNaN(value))return"[number NaN]";break;case"object":if(null===value)return"[null]";if(value instanceof Array)return value.map((function(val){return stringFrom(val)})).join(", ");if(value instanceof Set)return Array.from(value).map((function(val){return stringFrom(val)})).join(", ");if(value instanceof Map){var result=Array.from(value).map((function(_ref4){var _ref5=_slicedToArray(_ref4,2),key=_ref5[0],val=_ref5[1];return"".concat(stringFrom(key)," → ").concat(stringFrom(val))}));return"{ ".concat(result.join(", ")," }")}if(value instanceof Date)return value.toLocaleString();if(value instanceof Element){if(value===document.documentElement||value===document.head||value===document.body)throw new Error("illegal operation; attempting to convert the <html>, <head>, or <body> tags to string is not allowed");return value.outerHTML}return value instanceof Node?value.textContent:"function"==typeof value.toString?value.toString():Object.prototype.toString.call(value);case"symbol":var desc=void 0!==value.description?' "'.concat(value.description,'"'):"";return"[symbol".concat(desc,"]");case"undefined":return"[undefined]"}return String(value)}}})),clone=_ref3.clone,convertBreaks=_ref3.convertBreaks,safeActiveElement=_ref3.safeActiveElement,setDisplayTitle=_ref3.setDisplayTitle,setPageElement=_ref3.setPageElement,throwError=_ref3.throwError,stringFrom=_ref3.stringFrom;!function(){function onKeypressFn(ev){13!==ev.which&&32!==ev.which||(ev.preventDefault(),jQuery(safeActiveElement()||this).trigger("click"))}function onClickFnWrapper(fn){return function(){var $this=jQuery(this);$this.ariaIsDisabled()||($this.is("[aria-pressed]")&&$this.attr("aria-pressed","true"===$this.attr("aria-pressed")?"false":"true"),fn.apply(this,arguments))}}function oneClickFnWrapper(fn){return onClickFnWrapper((function(){jQuery(this).off(".aria-clickable").removeAttr("role tabindex aria-controls aria-pressed").filter("button").prop("disabled",!0),fn.apply(this,arguments)}))}jQuery.fn.extend({ariaClick:function(options,handler){if(0===this.length||0===arguments.length)return this;var opts=options,fn=handler;return null==fn&&(fn=opts,opts=undefined),"string"!=typeof(opts=jQuery.extend({namespace:undefined,one:!1,selector:undefined,data:undefined,role:undefined,controls:undefined,pressed:undefined,label:undefined},opts)).namespace?opts.namespace="":"."!==opts.namespace[0]&&(opts.namespace=".".concat(opts.namespace)),"boolean"==typeof opts.pressed&&(opts.pressed=opts.pressed?"true":"false"),this.filter("button").prop("type","button"),null!=opts.role?this.attr("role",opts.role):this.not("[role]").filter("a,[data-passage]").attr("role","link").end().not("a").not("[data-passage]").attr("role","button").end().end().end(),this.attr("tabindex",0),null!=opts.controls&&this.attr("aria-controls",opts.controls),null!=opts.pressed&&this.attr("aria-pressed",opts.pressed),null!=opts.label&&this.attr({"aria-label":opts.label,title:opts.label}),this.not("button").on("keypress.aria-clickable".concat(opts.namespace),opts.selector,onKeypressFn),this.on("click.aria-clickable".concat(opts.namespace),opts.selector,opts.data,opts.one?oneClickFnWrapper(fn):onClickFnWrapper(fn)),this},ariaDisabled:function(disable){if(0===this.length||0===arguments.length)return this;var $nonDisableable=this.not("button,fieldset,input,menuitem,optgroup,option,select,textarea"),$disableable=this.filter("button,fieldset,input,menuitem,optgroup,option,select,textarea");return disable?($nonDisableable.each((function(){this.setAttribute("disabled",""),this.setAttribute("aria-disabled","true")})),$disableable.each((function(){this.disabled=!0,this.setAttribute("aria-disabled","true")}))):($nonDisableable.each((function(){this.removeAttribute("disabled"),this.removeAttribute("aria-disabled")})),$disableable.each((function(){this.disabled=!1,this.removeAttribute("aria-disabled")}))),this},ariaIsDisabled:function(){return this.is("[disabled]")}})}(),jQuery.extend({wikiWithOptions:function(options){for(var _len=arguments.length,sources=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)sources[_key-1]=arguments[_key];if(0!==sources.length){var frag=document.createDocumentFragment();sources.forEach((function(content){return new Wikifier(frag,content,options)}));var errors=_toConsumableArray(frag.querySelectorAll(".error")).map((function(errEl){return errEl.textContent.replace(errorPrologRegExp,"")}));if(errors.length>0)throw new Error(errors.join("; "))}},wiki:function(){for(var _len2=arguments.length,sources=new Array(_len2),_key2=0;_key2<_len2;_key2++)sources[_key2]=arguments[_key2];this.wikiWithOptions.apply(this,[undefined].concat(sources))}}),jQuery.fn.extend({wikiWithOptions:function(options){for(var _len3=arguments.length,sources=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++)sources[_key3-1]=arguments[_key3];if(0===this.length||0===sources.length)return this;var frag=document.createDocumentFragment();return sources.forEach((function(content){return new Wikifier(frag,content,options)})),this.append(frag),this},wiki:function(){for(var _len4=arguments.length,sources=new Array(_len4),_key4=0;_key4<_len4;_key4++)sources[_key4]=arguments[_key4];return this.wikiWithOptions.apply(this,[undefined].concat(sources))}});var Util=function(){var toString,utilGetType="[object Object]"===(toString=Object.prototype.toString).call(new Map)?function(O){if(null===O)return"null";if(O instanceof Map)return"Map";if(O instanceof Set)return"Set";var baseType=_typeof(O);return"object"===baseType?toString.call(O).slice(8,-1):baseType}:function(O){if(null===O)return"null";var baseType=_typeof(O);return"object"===baseType?toString.call(O).slice(8,-1):baseType};function utilToEnum(obj){var pEnum=Object.create(null);if(obj instanceof Array)obj.forEach((function(val,i){return pEnum[String(val)]=i}));else if(obj instanceof Set)Array.from(obj).forEach((function(val,i){return pEnum[String(val)]=i}));else if(obj instanceof Map)obj.forEach((function(val,key){return pEnum[String(key)]=val}));else{if("object"!==_typeof(obj)||null===obj||Object.getPrototypeOf(obj)!==Object.prototype)throw new TypeError("Util.toEnum obj parameter must be an Array, Map, Set, or generic object");Object.assign(pEnum,obj)}return Object.freeze(pEnum)}function utilToStringTag(obj){return Object.prototype.toString.call(obj).slice(8,-1)}var _illegalSlugCharsRe=/[\x00-\x20!-/:-@[-^`{-\x9f]+/g,_isInvalidSlugRe=/^-*$/;var _illegalFilenameCharsRE=/[\x00-\x1f"#$%&'*+,/:;<=>?\\^`|\x7f-\x9f]+/g;var _markupCharsRe=/[!"#$&'*\-/<=>?@[\\\]^_`{|}~]/g,_hasMarkupCharsRe=new RegExp(_markupCharsRe.source),_markupCharsMap=utilToEnum({"!":"!",'"':""","#":"#",$:"$","&":"&","'":"'","*":"*","-":"-","/":"/","<":"<","=":"=",">":">","?":"?","@":"@","[":"[","\\":"\","]":"]","^":"^",_:"_","`":"`","{":"{","|":"|","}":"}","~":"~"});var _htmlCharsRe=/[&<>"'`]/g,_hasHtmlCharsRe=new RegExp(_htmlCharsRe.source),_htmlCharsMap=utilToEnum({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"});function utilEscape(str){if(null==str)return"";var val=String(str);return val&&_hasHtmlCharsRe.test(val)?val.replace(_htmlCharsRe,(function(ch){return _htmlCharsMap[ch]})):val}var _escapedHtmlRe=/&(?:amp|#38|#x26|lt|#60|#x3c|gt|#62|#x3e|quot|#34|#x22|apos|#39|#x27|#96|#x60);/gi,_hasEscapedHtmlRe=new RegExp(_escapedHtmlRe.source,"i"),_escapedHtmlMap=utilToEnum({"&":"&","&":"&","&":"&","<":"<","<":"<","<":"<",">":">",">":">",">":">",""":'"',""":'"',""":'"',"'":"'","'":"'","'":"'","`":"`","`":"`"});function utilUnescape(str){if(null==str)return"";var val=String(str);return val&&_hasEscapedHtmlRe.test(val)?val.replace(_escapedHtmlRe,(function(entity){return _escapedHtmlMap[entity.toLowerCase()]})):val}var _nowSource=Has.performance?performance:Date;var _cssTimeRe=/^([+-]?(?:\d*\.)?\d+)([Mm]?[Ss])$/;var utilScrubEventKey=function(){var separatorKey,decimalKey;if("undefined"!=typeof Intl&&"function"==typeof Intl.NumberFormat){var match=(new Intl.NumberFormat).format(111111.5).match(/(\D*)\d+(\D*)/);match&&(separatorKey=match[1],decimalKey=match[2])}return separatorKey||decimalKey||(separatorKey=",",decimalKey="."),function(key){switch(key){case"Scroll":return"ScrollLock";case"Spacebar":return" ";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Up":return"ArrowUp";case"Down":return"ArrowDown";case"Del":return"Delete";case"Crsel":return"CrSel";case"Exsel":return"ExSel";case"Esc":return"Escape";case"Apps":return"ContextMenu";case"Nonconvert":return"NonConvert";case"MediaNextTrack":return"MediaTrackNext";case"MediaPreviousTrack":return"MediaTrackPrevious";case"VolumeUp":return"AudioVolumeUp";case"VolumeDown":return"AudioVolumeDown";case"VolumeMute":return"AudioVolumeMute";case"Zoom":return"ZoomToggle";case"SelectMedia":case"MediaSelect":return"LaunchMediaPlayer";case"Add":return"+";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Decimal":return decimalKey;case"Separator":return separatorKey}return key}}(),utilHasMediaQuery="function"!=typeof window.matchMedia?function(){return!1}:function(mediaQuery){return window.matchMedia(mediaQuery).matches};return Object.freeze(Object.defineProperties({},{getType:{value:utilGetType},isBoolean:{value:function(obj){return"boolean"==typeof obj||"string"==typeof obj&&("true"===obj||"false"===obj)}},isIterable:{value:function(obj){return null!=obj&&"function"==typeof obj[Symbol.iterator]}},isNumeric:{value:function(obj){var num;switch(_typeof(obj)){case"number":num=obj;break;case"string":num=Number(obj);break;default:return!1}return!Number.isNaN(num)&&Number.isFinite(num)}},sameValueZero:{value:function(a,b){return a===b||a!=a&&b!=b}},toEnum:{value:utilToEnum},toStringTag:{value:utilToStringTag},slugify:{value:function(str){var base=String(str).trim(),_legacy=base.replace(/[^\w\s\u2013\u2014-]+/g,"").replace(/[_\s\u2013\u2014-]+/g,"-").toLocaleLowerCase();return _isInvalidSlugRe.test(_legacy)?base.replace(_illegalSlugCharsRe,"").replace(/[_\s\u2013\u2014-]+/g,"-"):_legacy}},sanitizeFilename:{value:function(str){return String(str).trim().replace(_illegalFilenameCharsRE,"")}},escapeMarkup:{value:function(str){if(null==str)return"";var val=String(str);return val&&_hasMarkupCharsRe.test(val)?val.replace(_markupCharsRe,(function(ch){return _markupCharsMap[ch]})):val}},escape:{value:utilEscape},unescape:{value:utilUnescape},charAndPosAt:{value:function(text,position){var str=String(text),pos=Math.trunc(position),code=str.charCodeAt(pos);if(Number.isNaN(code))return{char:"",start:-1,end:-1};var retval={char:str.charAt(pos),start:pos,end:pos};if(code<55296||code>57343)return retval;if(code>=55296&&code<=56319){var nextPos=pos+1;if(nextPos>=str.length)return retval;var nextCode=str.charCodeAt(nextPos);return nextCode<56320||nextCode>57343||(retval.char=retval.char+str.charAt(nextPos),retval.end=nextPos),retval}if(0===pos)return retval;var prevPos=pos-1,prevCode=str.charCodeAt(prevPos);return prevCode<55296||prevCode>56319||(retval.char=str.charAt(prevPos)+retval.char,retval.start=prevPos),retval}},now:{value:function(){return _nowSource.now()}},fromCssTime:{value:function(cssTime){var match=_cssTimeRe.exec(String(cssTime));if(null===match)throw new SyntaxError('invalid time value syntax: "'.concat(cssTime,'"'));var msec=Number(match[1]);if(1===match[2].length&&(msec*=1e3),Number.isNaN(msec)||!Number.isFinite(msec))throw new RangeError('invalid time value: "'.concat(cssTime,'"'));return msec}},toCssTime:{value:function(msec){if("number"!=typeof msec||Number.isNaN(msec)||!Number.isFinite(msec)){var what;switch(_typeof(msec)){case"string":what='"'.concat(msec,'"');break;case"number":what=String(msec);break;default:what=utilToStringTag(msec)}throw new Error("invalid milliseconds: ".concat(what))}return"".concat(msec,"ms")}},fromCssProperty:{value:function(cssName){if(!cssName.includes("-"))switch(cssName){case"bgcolor":return"backgroundColor";case"float":return"cssFloat";default:return cssName}return("-ms-"===cssName.slice(0,4)?cssName.slice(1):cssName).split("-").map((function(part,i){return 0===i?part:part.toUpperFirst()})).join("")}},parseUrl:{value:function(url){var el=document.createElement("a"),queryObj=Object.create(null);el.href=url,el.search&&el.search.replace(/^\?/,"").splitOrEmpty(/(?:&(?:amp;)?|;)/).forEach((function(query){var _query$split2=_slicedToArray(query.split("="),2),key=_query$split2[0],value=_query$split2[1];queryObj[key]=value}));var pathname=el.host&&"/"!==el.pathname[0]?"/".concat(el.pathname):el.pathname;return{href:el.href,protocol:el.protocol,host:el.host,hostname:el.hostname,port:el.port,path:"".concat(pathname).concat(el.search),pathname:pathname,query:el.search,search:el.search,queries:queryObj,searches:queryObj,hash:el.hash}}},newExceptionFrom:{value:function(original,exceptionType,override){if("object"!==_typeof(original)||null===original)throw new Error("Util.newExceptionFrom original parameter must be an object");if("function"!=typeof exceptionType)throw new Error("Util.newExceptionFrom exceptionType parameter must be an error type constructor");var ex=new exceptionType(original.message);void 0!==original.name&&(ex.name=original.name),void 0!==original.code&&(ex.code=original.code),void 0!==original.columnNumber&&(ex.columnNumber=original.columnNumber),void 0!==original.description&&(ex.description=original.description),void 0!==original.fileName&&(ex.fileName=original.fileName),void 0!==original.lineNumber&&(ex.lineNumber=original.lineNumber),void 0!==original.number&&(ex.number=original.number),void 0!==original.stack&&(ex.stack=original.stack);var overrideType=_typeof(override);if("undefined"!==overrideType)if("object"===overrideType&&null!==override)Object.assign(ex,override);else{if("string"!==overrideType)throw new Error("Util.newExceptionFrom override parameter must be an object or string");ex.message=override}return ex}},scrubEventKey:{value:utilScrubEventKey},hasMediaQuery:{value:utilHasMediaQuery},random:{value:Math.random},entityEncode:{value:utilEscape},entityDecode:{value:utilUnescape},evalExpression:{value:function(){return Scripting.evalJavaScript.apply(Scripting,arguments)}},evalStatements:{value:function(){return Scripting.evalJavaScript.apply(Scripting,arguments)}}}))}(),SimpleStore=(_adapters=[],_initialized=null,Object.freeze(Object.defineProperties({},{adapters:{value:_adapters},create:{value:function(storageId,persistent){if(_initialized)return _initialized.create(storageId,persistent);for(var i=0;i<_adapters.length;++i)if(_adapters[i].init(storageId,persistent))return(_initialized=_adapters[i]).create(storageId,persistent);throw new Error("no valid storage adapters found")}}}))),_adapters,_initialized,_ok,_WebStorageAdapter;SimpleStore.adapters.push((_ok=!1,_WebStorageAdapter=function(){function _WebStorageAdapter(storageId,persistent){_classCallCheck(this,_WebStorageAdapter);var prefix="".concat(storageId,"."),engine=null,name=null;persistent?(engine=window.localStorage,name="localStorage"):(engine=window.sessionStorage,name="sessionStorage"),Object.defineProperties(this,{_engine:{value:engine},_prefix:{value:prefix},_prefixRe:{value:new RegExp("^".concat(RegExp.escape(prefix)))},name:{value:name},id:{value:storageId},persistent:{value:!!persistent}})}return _createClass(_WebStorageAdapter,[{key:"length",get:function(){return this.keys().length}},{key:"size",value:function(){return this.keys().length}},{key:"keys",value:function(){for(var keys=[],i=0;i<this._engine.length;++i){var key=this._engine.key(i);this._prefixRe.test(key)&&keys.push(key.replace(this._prefixRe,""))}return keys}},{key:"has",value:function(key){return!("string"!=typeof key||!key)&&this._engine.hasOwnProperty(this._prefix+key)}},{key:"get",value:function(key){if("string"!=typeof key||!key)return null;var value=this._engine.getItem(this._prefix+key);return null==value?null:_WebStorageAdapter._deserialize(value)}},{key:"set",value:function(key,value){if("string"!=typeof key||!key)return!1;try{this._engine.setItem(this._prefix+key,_WebStorageAdapter._serialize(value))}catch(ex){if(/quota.?(?:exceeded|reached)/i.test(ex.name+ex.message))throw Util.newExceptionFrom(ex,Error,"".concat(this.name," quota exceeded"));throw ex}return!0}},{key:"delete",value:function(key){return!("string"!=typeof key||!key||(this._engine.removeItem(this._prefix+key),0))}},{key:"clear",value:function(){for(var keys=this.keys(),i=0,iend=keys.length;i<iend;++i)this.delete(keys[i]);return!0}}],[{key:"_serialize",value:function(obj){return LZString.compressToUTF16(JSON.stringify(obj))}},{key:"_deserialize",value:function(str){return JSON.parse(LZString.decompressFromUTF16(str))}}]),_WebStorageAdapter}(),Object.freeze(Object.defineProperties({},{init:{value:function(){function hasWebStorage(storeId){try{var store=window[storeId],tid="_sc_".concat(String(Date.now()));store.setItem(tid,tid);var result=store.getItem(tid)===tid;return store.removeItem(tid),result}catch(ex){}return!1}return _ok=hasWebStorage("localStorage")&&hasWebStorage("sessionStorage")}},create:{value:function(storageId,persistent){if(!_ok)throw new Error("adapter not initialized");return new _WebStorageAdapter(storageId,persistent)}}})))),SimpleStore.adapters.push(function(){var _MAX_EXPIRY="Tue, 19 Jan 2038 03:14:07 GMT",_MIN_EXPIRY="Thu, 01 Jan 1970 00:00:00 GMT",_ok=!1,_CookieAdapter=function(){function _CookieAdapter(storageId,persistent){_classCallCheck(this,_CookieAdapter);var prefix="".concat(storageId).concat(persistent?"!":"*",".");Object.defineProperties(this,{_prefix:{value:prefix},_prefixRe:{value:new RegExp("^".concat(RegExp.escape(prefix)))},name:{value:"cookie"},id:{value:storageId},persistent:{value:!!persistent}})}return _createClass(_CookieAdapter,[{key:"length",get:function(){return this.keys().length}},{key:"size",value:function(){return this.keys().length}},{key:"keys",value:function(){if(""===document.cookie)return[];for(var cookies=document.cookie.split(/;\s*/),keys=[],i=0;i<cookies.length;++i){var kvPair=cookies[i].split("="),key=decodeURIComponent(kvPair[0]);if(this._prefixRe.test(key))""!==decodeURIComponent(kvPair[1])&&keys.push(key.replace(this._prefixRe,""))}return keys}},{key:"has",value:function(key){return!("string"!=typeof key||!key)&&null!==_CookieAdapter._getCookie(this._prefix+key)}},{key:"get",value:function(key){if("string"!=typeof key||!key)return null;var value=_CookieAdapter._getCookie(this._prefix+key);return null===value?null:_CookieAdapter._deserialize(value)}},{key:"set",value:function(key,value){if("string"!=typeof key||!key)return!1;try{if(_CookieAdapter._setCookie(this._prefix+key,_CookieAdapter._serialize(value),this.persistent?"Tue, 19 Jan 2038 03:14:07 GMT":undefined),!this.has(key))throw new Error("unknown validation error during set")}catch(ex){throw Util.newExceptionFrom(ex,Error,"cookie error: ".concat(ex.message))}return!0}},{key:"delete",value:function(key){if("string"!=typeof key||!key||!this.has(key))return!1;try{if(_CookieAdapter._setCookie(this._prefix+key,undefined,_MIN_EXPIRY),this.has(key))throw new Error("unknown validation error during delete")}catch(ex){throw Util.newExceptionFrom(ex,Error,"cookie error: ".concat(ex.message))}return!0}},{key:"clear",value:function(){for(var keys=this.keys(),i=0,iend=keys.length;i<iend;++i)this.delete(keys[i]);return!0}}],[{key:"_getCookie",value:function(prefixedKey){if(!prefixedKey||""===document.cookie)return null;for(var cookies=document.cookie.split(/;\s*/),i=0;i<cookies.length;++i){var kvPair=cookies[i].split("=");if(prefixedKey===decodeURIComponent(kvPair[0]))return decodeURIComponent(kvPair[1])||null}return null}},{key:"_setCookie",value:function(prefixedKey,value,expiry){if(prefixedKey){var payload="".concat(encodeURIComponent(prefixedKey),"=");null!=value&&(payload+=encodeURIComponent(value)),null!=expiry&&(payload+="; expires=".concat(expiry)),payload+="; path=/",document.cookie=payload}}},{key:"_serialize",value:function(obj){return LZString.compressToBase64(JSON.stringify(obj))}},{key:"_deserialize",value:function(str){return JSON.parse(LZString.decompressFromBase64(str))}}]),_CookieAdapter}();return Object.freeze(Object.defineProperties({},{init:{value:function(storageId){try{var tid="_sc_".concat(String(Date.now()));_CookieAdapter._setCookie(tid,_CookieAdapter._serialize(tid),undefined),_ok=_CookieAdapter._deserialize(_CookieAdapter._getCookie(tid))===tid,_CookieAdapter._setCookie(tid,undefined,_MIN_EXPIRY)}catch(ex){_ok=!1}return _ok&&function(storageId){if(""===document.cookie)return;for(var oldPrefix="".concat(storageId,"."),oldPrefixRe=new RegExp("^".concat(RegExp.escape(oldPrefix))),persistPrefix="".concat(storageId,"!."),sessionPrefix="".concat(storageId,"*."),sessionTestRe=/\.(?:state|rcWarn)$/,cookies=document.cookie.split(/;\s*/),i=0;i<cookies.length;++i){var kvPair=cookies[i].split("="),key=decodeURIComponent(kvPair[0]);if(oldPrefixRe.test(key)){var value=decodeURIComponent(kvPair[1]);""!==value&&function(){var persist=!sessionTestRe.test(key);_CookieAdapter._setCookie(key,undefined,_MIN_EXPIRY),_CookieAdapter._setCookie(key.replace(oldPrefixRe,(function(){return persist?persistPrefix:sessionPrefix})),value,persist?_MAX_EXPIRY:undefined)}()}}}(storageId),_ok}},create:{value:function(storageId,persistent){if(!_ok)throw new Error("adapter not initialized");return new _CookieAdapter(storageId,persistent)}}}))}());var DebugView=function(){function DebugView(parent,type,name,title){_classCallCheck(this,DebugView),Object.defineProperties(this,{parent:{value:parent},view:{value:document.createElement("span")},break:{value:document.createElement("wbr")}}),jQuery(this.view).attr({title:title,"aria-label":title,"data-type":null!=type?type:"","data-name":null!=name?name:""}).addClass("debug"),jQuery(this.break).addClass("debug hidden"),this.parent.appendChild(this.view),this.parent.appendChild(this.break)}return _createClass(DebugView,[{key:"output",get:function(){return this.view}},{key:"type",get:function(){return this.view.getAttribute("data-type")},set:function(type){this.view.setAttribute("data-type",null!=type?type:"")}},{key:"name",get:function(){return this.view.getAttribute("data-name")},set:function(name){this.view.setAttribute("data-name",null!=name?name:"")}},{key:"title",get:function(){return this.view.title},set:function(title){this.view.title=title}},{key:"append",value:function(el){return jQuery(this.view).append(el),this}},{key:"modes",value:function(options){if(null==options){var current={};return this.view.className.splitOrEmpty(/\s+/).forEach((function(name){"debug"!==name&&(current[name]=!0)})),current}if("object"===_typeof(options))return Object.keys(options).forEach((function(name){this[options[name]?"addClass":"removeClass"](name)}),jQuery(this.view)),this;throw new Error("DebugView.prototype.modes options parameter must be an object or null/undefined")}},{key:"remove",value:function(){var $view=jQuery(this.view);this.view.hasChildNodes()&&$view.contents().appendTo(this.parent),$view.remove(),jQuery(this.break).remove()}}],[{key:"isEnabled",value:function(){return"enabled"===jQuery(document.documentElement).attr("data-debug-view")}},{key:"enable",value:function(){jQuery(document.documentElement).attr("data-debug-view","enabled"),jQuery.event.trigger(":debugviewupdate")}},{key:"disable",value:function(){jQuery(document.documentElement).removeAttr("data-debug-view"),jQuery.event.trigger(":debugviewupdate")}},{key:"toggle",value:function(){"enabled"===jQuery(document.documentElement).attr("data-debug-view")?DebugView.disable():DebugView.enable()}}]),DebugView}(),NodeTyper=function(){var NodeTyper=function(){function NodeTyper(config){if(_classCallCheck(this,NodeTyper),"object"!==_typeof(config)||null===config)throw new Error("config parameter must be an object (received: ".concat(Util.getType(config),")"));if(!(config.hasOwnProperty("targetNode")&&config.targetNode instanceof Node))throw new Error('config parameter object "targetNode" property must be a node');Object.defineProperties(this,{node:{value:config.targetNode},childNodes:{value:[]},nodeValue:{writable:!0,value:""},appendTo:{writable:!0,value:config.parentNode||null},classNames:{writable:!0,value:config.classNames||null},finished:{writable:!0,value:!1}});var childNode,node=this.node;for(node.nodeValue&&(this.nodeValue=node.nodeValue,node.nodeValue="");null!==(childNode=node.firstChild);)this.childNodes.push(new NodeTyper({targetNode:childNode,parentNode:node,classNames:this.classNames})),node.removeChild(childNode)}return _createClass(NodeTyper,[{key:"finish",value:function(){for(;this.type(!0););return!1}},{key:"type",value:function(flush){if(this.finished)return!1;if(this.appendTo){if(this.appendTo.appendChild(this.node),this.appendTo=null,this.node.nodeType!==Node.ELEMENT_NODE&&this.node.nodeType!==Node.TEXT_NODE||"none"===jQuery(this.node.parentNode).css("display"))return this.finish();this.node.parentNode&&this.classNames&&jQuery(this.node.parentNode).addClass(this.classNames)}if(this.nodeValue){if(flush)this.node.nodeValue+=this.nodeValue,this.nodeValue="";else{var _Util$charAndPosAt=Util.charAndPosAt(this.nodeValue,0),char=_Util$charAndPosAt.char,start=_Util$charAndPosAt.start,end=_Util$charAndPosAt.end;this.node.nodeValue+=char,this.nodeValue=this.nodeValue.slice(1+end-start)}return!0}this.classNames&&(jQuery(this.node.parentNode).removeClass(this.classNames),this.classNames=null);for(var childNodes=this.childNodes;childNodes.length>0;){if(childNodes[0].type())return!0;childNodes.shift()}return this.finished=!0,!1}}]),NodeTyper}();return NodeTyper}(),PRNGWrapper=function(){function PRNGWrapper(seed,useEntropy){_classCallCheck(this,PRNGWrapper),Object.defineProperties(this,new Math.seedrandom(seed,useEntropy,(function(prng,seed){return{_prng:{value:prng},seed:{writable:!0,value:seed},pull:{writable:!0,value:0},random:{value:function(){return++this.pull,this._prng()}}}})))}return _createClass(PRNGWrapper,null,[{key:"marshal",value:function(prng){if(!prng||!prng.hasOwnProperty("seed")||!prng.hasOwnProperty("pull"))throw new Error("PRNG is missing required data");return{seed:prng.seed,pull:prng.pull}}},{key:"unmarshal",value:function(prngObj){if(!prngObj||!prngObj.hasOwnProperty("seed")||!prngObj.hasOwnProperty("pull"))throw new Error("PRNG object is missing required data");for(var prng=new PRNGWrapper(prngObj.seed,!1),i=prngObj.pull;i>0;--i)prng.random();return prng}}]),PRNGWrapper}(),StyleWrapper=(_imageMarkupRe=new RegExp(Patterns.cssImage,"g"),_hasImageMarkupRe=new RegExp(Patterns.cssImage),function(){function StyleWrapper(style){if(_classCallCheck(this,StyleWrapper),null==style)throw new TypeError("StyleWrapper style parameter must be an HTMLStyleElement object");Object.defineProperties(this,{style:{value:style}})}return _createClass(StyleWrapper,[{key:"isEmpty",value:function(){return 0===this.style.cssRules.length}},{key:"set",value:function(rawCss){this.clear(),this.add(rawCss)}},{key:"add",value:function(rawCss){var css=rawCss;_hasImageMarkupRe.test(css)&&(_imageMarkupRe.lastIndex=0,css=css.replace(_imageMarkupRe,(function(wikiImage){var markup=Wikifier.helpers.parseSquareBracketedMarkup({source:wikiImage,matchStart:0});if(markup.hasOwnProperty("error")||markup.pos<wikiImage.length)return wikiImage;var source=markup.source;if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(source=passage.text.trim())}return'url("'.concat(source.replace(/"/g,"%22"),'")')}))),this.style.styleSheet?this.style.styleSheet.cssText+=css:this.style.appendChild(document.createTextNode(css))}},{key:"clear",value:function(){this.style.styleSheet?this.style.styleSheet.cssText="":jQuery(this.style).empty()}}]),StyleWrapper}()),_imageMarkupRe,_hasImageMarkupRe,Diff=(Op=Util.toEnum({Delete:0,SpliceArray:1,Copy:2,CopyDate:3}),Object.freeze(Object.defineProperties({},{Op:{value:Op},diff:{value:function diff(orig,dest){for(var aOpRef,objToString=Object.prototype.toString,origIsArray=orig instanceof Array,keys=[].concat(Object.keys(orig),Object.keys(dest)).sort().filter((function(val,i,arr){return 0===i||arr[i-1]!==val})),diffed={},keyIsAOpRef=function(key){return key===aOpRef},i=0,klen=keys.length;i<klen;++i){var key=keys[i],origP=orig[key],destP=dest[key];if(orig.hasOwnProperty(key))if(dest.hasOwnProperty(key)){if(origP===destP)continue;if(_typeof(origP)===_typeof(destP))if("function"==typeof origP)origP.toString()!==destP.toString()&&(diffed[key]=[Op.Copy,destP]);else if("object"!==_typeof(origP)||null===origP)diffed[key]=[Op.Copy,destP];else{var origPType=objToString.call(origP);if(origPType===objToString.call(destP))if(origP instanceof Date)Number(origP)!==Number(destP)&&(diffed[key]=[Op.Copy,clone(destP)]);else if(origP instanceof Map)diffed[key]=[Op.Copy,clone(destP)];else if(origP instanceof RegExp)origP.toString()!==destP.toString()&&(diffed[key]=[Op.Copy,clone(destP)]);else if(origP instanceof Set)diffed[key]=[Op.Copy,clone(destP)];else if("[object Object]"!==origPType)diffed[key]=[Op.Copy,clone(destP)];else{var recurse=diff(origP,destP);null!==recurse&&(diffed[key]=recurse)}else diffed[key]=[Op.Copy,clone(destP)]}else diffed[key]=[Op.Copy,"object"!==_typeof(destP)||null===destP?destP:clone(destP)]}else if(origIsArray&&Util.isNumeric(key)){var nKey=Number(key);if(!aOpRef){aOpRef="";do{aOpRef+="~"}while(keys.some(keyIsAOpRef));diffed[aOpRef]=[Op.SpliceArray,nKey,nKey]}nKey<diffed[aOpRef][1]&&(diffed[aOpRef][1]=nKey),nKey>diffed[aOpRef][2]&&(diffed[aOpRef][2]=nKey)}else diffed[key]=Op.Delete;else diffed[key]=[Op.Copy,"object"!==_typeof(destP)||null===destP?destP:clone(destP)]}return Object.keys(diffed).length>0?diffed:null}},patch:{value:function patch(orig,diffed){for(var keys=Object.keys(diffed||{}),patched=clone(orig),i=0,klen=keys.length;i<klen;++i){var key=keys[i],diffedP=diffed[key];if(diffedP===Op.Delete)delete patched[key];else if(diffedP instanceof Array)switch(diffedP[0]){case Op.SpliceArray:patched.splice(diffedP[1],diffedP[2]-diffedP[1]+1);break;case Op.Copy:patched[key]=clone(diffedP[1]);break;case Op.CopyDate:patched[key]=new Date(diffedP[1])}else patched[key]=patch(patched[key],diffedP)}return patched}}}))),Op,L10n=(_patternRe=/\{\w+\}/g,_hasPatternRe=new RegExp(_patternRe.source),Object.freeze(Object.defineProperties({},{init:{value:function(){strings&&Object.keys(strings).length>0&&Object.keys(l10nStrings).forEach((function(id){try{var value;switch(id){case"identity":value=strings.identity;break;case"aborting":value=strings.aborting;break;case"cancel":value=strings.cancel;break;case"close":value=strings.close;break;case"ok":value=strings.ok;break;case"errorTitle":value=strings.errors.title;break;case"errorNonexistentPassage":value=strings.errors.nonexistentPassage;break;case"errorSaveMissingData":value=strings.errors.saveMissingData;break;case"errorSaveIdMismatch":value=strings.errors.saveIdMismatch;break;case"warningDegraded":value=strings.warnings.degraded;break;case"debugViewTitle":value=strings.debugView.title;break;case"debugViewToggle":value=strings.debugView.toggle;break;case"uiBarToggle":value=strings.uiBar.toggle;break;case"uiBarBackward":value=strings.uiBar.backward;break;case"uiBarForward":value=strings.uiBar.forward;break;case"uiBarJumpto":value=strings.uiBar.jumpto;break;case"jumptoTitle":value=strings.jumpto.title;break;case"jumptoTurn":value=strings.jumpto.turn;break;case"jumptoUnavailable":value=strings.jumpto.unavailable;break;case"savesTitle":value=strings.saves.title;break;case"savesDisallowed":value=strings.saves.disallowed;break;case"savesIncapable":value=strings.saves.incapable;break;case"savesLabelAuto":value=strings.saves.labelAuto;break;case"savesLabelDelete":value=strings.saves.labelDelete;break;case"savesLabelExport":value=strings.saves.labelExport;break;case"savesLabelImport":value=strings.saves.labelImport;break;case"savesLabelLoad":value=strings.saves.labelLoad;break;case"savesLabelClear":value=strings.saves.labelClear;break;case"savesLabelSave":value=strings.saves.labelSave;break;case"savesLabelSlot":value=strings.saves.labelSlot;break;case"savesUnavailable":value=strings.saves.unavailable;break;case"savesUnknownDate":value=strings.saves.unknownDate;break;case"settingsTitle":value=strings.settings.title;break;case"settingsOff":value=strings.settings.off;break;case"settingsOn":value=strings.settings.on;break;case"settingsReset":value=strings.settings.reset;break;case"restartTitle":value=strings.restart.title;break;case"restartPrompt":value=strings.restart.prompt;break;case"shareTitle":value=strings.share.title;break;case"alertTitle":break;case"autoloadTitle":value=strings.autoload.title;break;case"autoloadCancel":value=strings.autoload.cancel;break;case"autoloadOk":value=strings.autoload.ok;break;case"autoloadPrompt":value=strings.autoload.prompt;break;case"macroBackText":value=strings.macros.back.text;break;case"macroReturnText":value=strings.macros.return.text}value&&(l10nStrings[id]=value.replace(/%\w+%/g,(function(pat){return"{".concat(pat.slice(1,-1),"}")})))}catch(ex){}}))}},get:{value:function(ids,overrides){if(!ids)return"";var selectedId,id=((Array.isArray(ids)?ids:[ids]).some((function(id){return!!l10nStrings.hasOwnProperty(id)&&(selectedId=id,!0)})),selectedId);if(!id)return"";for(var processed=l10nStrings[id],iteration=0;_hasPatternRe.test(processed);){if(++iteration>50)throw new Error("L10n.get exceeded maximum replacement iterations, probable infinite loop");_patternRe.lastIndex=0,processed=processed.replace(_patternRe,(function(pat){var subId=pat.slice(1,-1);return overrides&&overrides.hasOwnProperty(subId)?overrides[subId]:l10nStrings.hasOwnProperty(subId)?l10nStrings[subId]:void 0}))}return processed}}}))),_patternRe,_hasPatternRe,strings={errors:{},warnings:{},debugView:{},uiBar:{},jumpto:{},saves:{},settings:{},restart:{},share:{},autoload:{},macros:{back:{},return:{}}},l10nStrings={identity:"game",aborting:"Aborting",cancel:"Cancel",close:"Close",ok:"OK",errorTitle:"Error",errorToggle:"Toggle the error view",errorNonexistentPassage:'the passage "{passage}" does not exist',errorSaveDiskLoadFailed:"failed to load save file from disk",errorSaveMissingData:"save is missing required data. Either the loaded file is not a save or the save has become corrupted",errorSaveIdMismatch:"save is from the wrong {identity}",_warningIntroLacking:"Your browser either lacks or has disabled",_warningOutroDegraded:", so this {identity} is running in a degraded mode. You may be able to continue, however, some parts may not work properly.",warningNoWebStorage:"{_warningIntroLacking} the Web Storage API{_warningOutroDegraded}",warningDegraded:"{_warningIntroLacking} some of the capabilities required by this {identity}{_warningOutroDegraded}",debugBarToggle:"Toggle the debug bar",debugBarNoWatches:"— no watches set —",debugBarAddWatch:"Add watch",debugBarDeleteWatch:"Delete watch",debugBarWatchAll:"Watch all",debugBarWatchNone:"Delete all",debugBarLabelAdd:"Add",debugBarLabelWatch:"Watch",debugBarLabelTurn:"Turn",debugBarLabelViews:"Views",debugBarViewsToggle:"Toggle the debug views",debugBarWatchToggle:"Toggle the watch panel",uiBarToggle:"Toggle the UI bar",uiBarBackward:"Go backward within the {identity} history",uiBarForward:"Go forward within the {identity} history",uiBarJumpto:"Jump to a specific point within the {identity} history",jumptoTitle:"Jump To",jumptoTurn:"Turn",jumptoUnavailable:"No jump points currently available…",savesTitle:"Saves",savesDisallowed:"Saving has been disallowed on this passage.",savesIncapable:"{_warningIntroLacking} the capabilities required to support saves, so saves have been disabled for this session.",savesLabelAuto:"Autosave",savesLabelDelete:"Delete",savesLabelExport:"Save to Disk…",savesLabelImport:"Load from Disk…",savesLabelLoad:"Load",savesLabelClear:"Delete All",savesLabelSave:"Save",savesLabelSlot:"Slot",savesUnavailable:"No save slots found…",savesUnknownDate:"unknown",settingsTitle:"Settings",settingsOff:"Off",settingsOn:"On",settingsReset:"Reset to Defaults",restartTitle:"Restart",restartPrompt:"Are you sure that you want to restart? Unsaved progress will be lost.",shareTitle:"Share",alertTitle:"Alert",autoloadTitle:"Autoload",autoloadCancel:"Go to start",autoloadOk:"Load autosave",autoloadPrompt:"An autosave exists. Load it now or go to the start?",macroBackText:"Back",macroReturnText:"Return"},Config=(_debug=!1,_addVisitedLinkClass=!1,_cleanupWikifierOutput=!1,_loadDelay=0,_audioPauseOnFadeToZero=!0,_audioPreloadMetadata=!0,_historyControls=!0,_historyMaxStates=40,_macrosIfAssignmentError=!0,_macrosMaxLoopIterations=1e3,_macrosTypeSkipKey=" ",_macrosTypeVisitedPassages=!0,_passagesDisplayTitles=!1,_passagesNobr=!1,_savesId="untitled-story",_savesSlots=8,_savesTryDiskOnMobile=!0,_uiStowBarInitially=800,_uiUpdateStoryElements=!0,_errHistoryModeDeprecated="Config.history.mode has been deprecated and is no longer used by SugarCube, please remove it from your code",Object.freeze({get debug(){return _debug},set debug(value){_debug=Boolean(value)},get addVisitedLinkClass(){return _addVisitedLinkClass},set addVisitedLinkClass(value){_addVisitedLinkClass=Boolean(value)},get cleanupWikifierOutput(){return _cleanupWikifierOutput},set cleanupWikifierOutput(value){_cleanupWikifierOutput=Boolean(value)},get loadDelay(){return _loadDelay},set loadDelay(value){if(!Number.isSafeInteger(value)||value<0)throw new RangeError("Config.loadDelay must be a non-negative integer");_loadDelay=value},audio:Object.freeze({get pauseOnFadeToZero(){return _audioPauseOnFadeToZero},set pauseOnFadeToZero(value){_audioPauseOnFadeToZero=Boolean(value)},get preloadMetadata(){return _audioPreloadMetadata},set preloadMetadata(value){_audioPreloadMetadata=Boolean(value)}}),history:Object.freeze({get controls(){return _historyControls},set controls(value){var controls=Boolean(value);if(1===_historyMaxStates&&controls)throw new Error("Config.history.controls must be false when Config.history.maxStates is 1");_historyControls=controls},get maxStates(){return _historyMaxStates},set maxStates(value){if(!Number.isSafeInteger(value)||value<1)throw new RangeError("Config.history.maxStates must be a positive integer");_historyMaxStates=value,_historyControls&&1===value&&(_historyControls=!1)},get mode(){throw new Error(_errHistoryModeDeprecated)},set mode(_){throw new Error(_errHistoryModeDeprecated)},get tracking(){throw new Error("Config.history.tracking has been deprecated, use Config.history.maxStates instead")},set tracking(_){throw new Error("Config.history.tracking has been deprecated, use Config.history.maxStates instead")}}),macros:Object.freeze({get ifAssignmentError(){return _macrosIfAssignmentError},set ifAssignmentError(value){_macrosIfAssignmentError=Boolean(value)},get maxLoopIterations(){return _macrosMaxLoopIterations},set maxLoopIterations(value){if(!Number.isSafeInteger(value)||value<1)throw new RangeError("Config.macros.maxLoopIterations must be a positive integer");_macrosMaxLoopIterations=value},get typeSkipKey(){return _macrosTypeSkipKey},set typeSkipKey(value){_macrosTypeSkipKey=String(value)},get typeVisitedPassages(){return _macrosTypeVisitedPassages},set typeVisitedPassages(value){_macrosTypeVisitedPassages=Boolean(value)}}),navigation:Object.freeze({get override(){return _navigationOverride},set override(value){if(!(null==value||value instanceof Function))throw new TypeError("Config.navigation.override must be a function or null/undefined (received: ".concat(Util.getType(value),")"));_navigationOverride=value}}),passages:Object.freeze({get descriptions(){return _passagesDescriptions},set descriptions(value){if(null!=value){var valueType=Util.getType(value);if("boolean"!==valueType&&"Object"!==valueType&&"function"!==valueType)throw new TypeError("Config.passages.descriptions must be a boolean, object, function, or null/undefined (received: ".concat(valueType,")"))}_passagesDescriptions=value},get displayTitles(){return _passagesDisplayTitles},set displayTitles(value){_passagesDisplayTitles=Boolean(value)},get nobr(){return _passagesNobr},set nobr(value){_passagesNobr=Boolean(value)},get onProcess(){return _passagesOnProcess},set onProcess(value){if(null!=value){var valueType=Util.getType(value);if("function"!==valueType)throw new TypeError("Config.passages.onProcess must be a function or null/undefined (received: ".concat(valueType,")"))}_passagesOnProcess=value},get start(){return _passagesStart},set start(value){if(null!=value){var valueType=Util.getType(value);if("string"!==valueType)throw new TypeError("Config.passages.start must be a string or null/undefined (received: ".concat(valueType,")"))}_passagesStart=value},get transitionOut(){return _passagesTransitionOut},set transitionOut(value){if(null!=value){var valueType=Util.getType(value);if("string"!==valueType&&("number"!==valueType||!Number.isSafeInteger(value)||value<0))throw new TypeError("Config.passages.transitionOut must be a string, non-negative integer, or null/undefined (received: ".concat(valueType,")"))}_passagesTransitionOut=value}}),saves:Object.freeze({get autoload(){return _savesAutoload},set autoload(value){if(null!=value){var valueType=Util.getType(value);if("boolean"!==valueType&&"string"!==valueType&&"function"!==valueType)throw new TypeError("Config.saves.autoload must be a boolean, string, function, or null/undefined (received: ".concat(valueType,")"))}_savesAutoload=value},get autosave(){return _savesAutosave},set autosave(value){if(null!=value){var valueType=Util.getType(value);if("string"===valueType)return void(_savesAutosave=[value]);if("boolean"!==valueType&&("Array"!==valueType||!value.every((function(item){return"string"==typeof item})))&&"function"!==valueType)throw new TypeError("Config.saves.autosave must be a boolean, Array<string>, function, or null/undefined (received: ".concat(valueType).concat("Array"===valueType?"<any>":"",")"))}_savesAutosave=value},get id(){return _savesId},set id(value){if("string"!=typeof value||""===value)throw new TypeError("Config.saves.id must be a non-empty string (received: ".concat(Util.getType(value),")"));_savesId=value},get isAllowed(){return _savesIsAllowed},set isAllowed(value){if(!(null==value||value instanceof Function))throw new TypeError("Config.saves.isAllowed must be a function or null/undefined (received: ".concat(Util.getType(value),")"));_savesIsAllowed=value},get slots(){return _savesSlots},set slots(value){if(!Number.isSafeInteger(value)||value<0)throw new TypeError("Config.saves.slots must be a non-negative integer (received: ".concat(Util.getType(value),")"));_savesSlots=value},get tryDiskOnMobile(){return _savesTryDiskOnMobile},set tryDiskOnMobile(value){_savesTryDiskOnMobile=Boolean(value)},get version(){return _savesVersion},set version(value){_savesVersion=value},get onLoad(){throw new Error("Config.saves.onLoad has been deprecated, use the Save.onLoad API instead")},set onLoad(value){console.warn("Config.saves.onLoad has been deprecated, use the Save.onLoad API instead"),Save.onLoad.add(value)},get onSave(){throw new Error("Config.saves.onSave has been deprecated, use the Save.onSave API instead")},set onSave(value){console.warn("Config.saves.onSave has been deprecated, use the Save.onSave API instead"),Save.onSave.add(value)}}),ui:Object.freeze({get stowBarInitially(){return _uiStowBarInitially},set stowBarInitially(value){var valueType=Util.getType(value);if("boolean"!==valueType&&("number"!==valueType||!Number.isSafeInteger(value)||value<0))throw new TypeError("Config.ui.stowBarInitially must be a boolean or non-negative integer (received: ".concat(valueType,")"));_uiStowBarInitially=value},get updateStoryElements(){return _uiUpdateStoryElements},set updateStoryElements(value){_uiUpdateStoryElements=Boolean(value)}})})),_navigationOverride,_passagesDescriptions,_passagesStart,_passagesOnProcess,_passagesTransitionOut,_savesAutoload,_savesAutosave,_savesIsAllowed,_savesVersion,_debug,_addVisitedLinkClass,_cleanupWikifierOutput,_loadDelay,_audioPauseOnFadeToZero,_audioPreloadMetadata,_historyControls,_historyMaxStates,_macrosIfAssignmentError,_macrosMaxLoopIterations,_macrosTypeSkipKey,_macrosTypeVisitedPassages,_passagesDisplayTitles,_passagesNobr,_savesId,_savesSlots,_savesTryDiskOnMobile,_uiStowBarInitially,_uiUpdateStoryElements,_errHistoryModeDeprecated,SimpleAudio=function(){var _hasPromise,_gestureEventNames=Object.freeze(["click","contextmenu","dblclick","keyup","mouseup","pointerup","touchend"]),_specialIds=Object.freeze([":not",":all",":looped",":muted",":paused",":playing"]),_formatSpecRe=/^([\w-]+)\s*\|\s*(\S.*)$/,_badIdRe=/[:\s]/,_tracks=new Map,_groups=new Map,_lists=new Map,_subscribers=new Map,_masterRate=1,_masterVolume=1,_masterMute=!1,_masterMuteOnHidden=!1,_playReturnsPromise=(_hasPromise=null,function(){if(null!==_hasPromise)return _hasPromise;if(_hasPromise=!1,Has.audio)try{var audio=document.createElement("audio");audio.muted=!0;var value=audio.play();value.catch((function(){})),_hasPromise=value instanceof Promise}catch(ex){}return _hasPromise}),AudioTrack=function(){function AudioTrack(obj){if(_classCallCheck(this,AudioTrack),obj instanceof Array)this._create(obj);else{if(!(obj instanceof AudioTrack))throw new Error("sources parameter must be either an array, of URIs or source objects, or an AudioTrack instance");this._copy(obj)}}return _createClass(AudioTrack,[{key:"_create",value:function(sourceList){var dataUriRe=/^data:\s*audio\/(?:x-)?([^;,]+)\s*[;,]/i,extRe=/\.([^./\\]+)$/,formats=AudioTrack.formats,usedSources=[],audio=document.createElement("audio");audio.preload="none",sourceList.forEach((function(src){var srcUri=null;switch(_typeof(src)){case"string":var match;if("data:"===src.slice(0,5)){if(null===(match=dataUriRe.exec(src)))throw new Error("source data URI missing media type")}else if(null===(match=extRe.exec(Util.parseUrl(src).pathname)))throw new Error("source URL missing file extension");formats[match[1]]&&(srcUri=src);break;case"object":if(null===src)throw new Error("source object cannot be null");if(!src.hasOwnProperty("src"))throw new Error('source object missing required "src" property');if(!src.hasOwnProperty("format"))throw new Error('source object missing required "format" property');formats[src.format]&&(srcUri=src.src);break;default:throw new Error("invalid source value (type: ".concat(_typeof(src),")"))}if(null!==srcUri){var source=document.createElement("source");source.src=srcUri,audio.appendChild(source),usedSources.push(srcUri)}})),audio.hasChildNodes()&&Config.audio.preloadMetadata&&(audio.preload="metadata"),this._finalize(audio,usedSources,clone(sourceList))}},{key:"_copy",value:function(obj){this._finalize(obj.audio.cloneNode(!0),clone(obj.sources),clone(obj.originals))}},{key:"_finalize",value:function(audio,sources,originals){var _this3=this;Object.defineProperties(this,{audio:{configurable:!0,value:audio},sources:{value:Object.freeze(sources)},originals:{value:Object.freeze(originals)},_error:{writable:!0,value:!1},_faderId:{writable:!0,value:null},_mute:{writable:!0,value:!1},_rate:{writable:!0,value:1},_volume:{writable:!0,value:1}}),jQuery(this.audio).on("loadstart.AudioTrack",(function(){return _this3._error=!1})).on("error.AudioTrack",(function(){return _this3._error=!0})).find("source:last-of-type").on("error.AudioTrack",(function(){return _this3._trigger("error")})),function(id,callback){if("function"!=typeof callback)throw new Error("callback parameter must be a function");_subscribers.set(id,callback)}(this,(function(mesg){if(_this3.audio)switch(mesg){case"loadwithscreen":if(_this3.hasSource()){var lockId=LoadScreen.lock();_this3.one("canplaythrough.AudioTrack_loadwithscreen error.AudioTrack_loadwithscreen",(function(){jQuery(this).off(".AudioTrack_loadwithscreen"),LoadScreen.unlock(lockId)})).load()}break;case"load":_this3.load();break;case"mute":_this3._updateAudioMute();break;case"rate":_this3._updateAudioRate();break;case"stop":_this3.stop();break;case"volume":_this3._updateAudioVolume();break;case"unload":_this3.unload()}else unsubscribe(_this3)})),this._updateAudioMute(),this._updateAudioRate(),this._updateAudioVolume()}},{key:"_trigger",value:function(eventName){jQuery(this.audio).triggerHandler(eventName)}},{key:"_destroy",value:function(){unsubscribe(this),this.audio&&(jQuery(this.audio).off(),this.unload(),this._error=!0,delete this.audio)}},{key:"clone",value:function(){return new AudioTrack(this)}},{key:"load",value:function(){var _this4=this;if(this.fadeStop(),this.audio.pause(),!this.audio.hasChildNodes()){if(0===this.sources.length)return;this.sources.forEach((function(srcUri){var source=document.createElement("source");source.src=srcUri,_this4.audio.appendChild(source)}))}"auto"!==this.audio.preload&&(this.audio.preload="auto"),this.isLoading()||this.audio.load()}},{key:"unload",value:function(){this.fadeStop(),this.stop();var audio=this.audio;for(audio.preload="none";audio.hasChildNodes();)audio.removeChild(audio.firstChild);audio.load()}},{key:"play",value:function(){var _this5=this;if(!this.hasSource())return Promise.reject(new Error("none of the candidate sources were acceptable"));if(this.isUnloaded())return Promise.reject(new Error("no sources are loaded"));if(this.isFailed())return Promise.reject(new Error("failed to load any of the sources"));"auto"!==this.audio.preload&&(this.audio.preload="auto");var namespace=".AudioTrack_play";return _playReturnsPromise()?this.audio.play():new Promise((function(resolve,reject){_this5.isPlaying()?resolve():(jQuery(_this5.audio).off(namespace).one("error".concat(namespace," playing").concat(namespace," timeupdate").concat(namespace),(function(ev){jQuery(_this5).off(namespace),"error"===ev.type?reject(new Error("unknown audio play error")):resolve()})),_this5.audio.play())}))}},{key:"playWhenAllowed",value:function(){var _this6=this;this.play().catch((function(){var gestures=_gestureEventNames.map((function(name){return"".concat(name,".AudioTrack_playWhenAllowed")})).join(" ");jQuery(document).one(gestures,(function(){jQuery(document).off(".AudioTrack_playWhenAllowed"),_this6.audio.play()}))}))}},{key:"pause",value:function(){this.audio.pause()}},{key:"stop",value:function(){this.audio.pause(),this.time(0),this._trigger(":stopped")}},{key:"fade",value:function(duration,toVol,fromVol){var _this7=this;if("number"!=typeof duration)throw new TypeError("duration parameter must be a number");if("number"!=typeof toVol)throw new TypeError("toVolume parameter must be a number");if(null!=fromVol&&"number"!=typeof fromVol)throw new TypeError("fromVolume parameter must be a number");if(!this.hasSource())return Promise.reject(new Error("none of the candidate sources were acceptable"));if(this.isUnloaded())return Promise.reject(new Error("no sources are loaded"));if(this.isFailed())return Promise.reject(new Error("failed to load any of the sources"));this.fadeStop();var from=Math.clamp(null==fromVol?this.volume():fromVol,0,1),to=Math.clamp(toVol,0,1);return from!==to?(this.volume(from),jQuery(this.audio).off("timeupdate.AudioTrack_fade").one("timeupdate.AudioTrack_fade",(function(){var min,max;from<to?(min=from,max=to):(min=to,max=from);var time=Math.max(duration,1),delta=(to-from)/(time/.025);_this7._trigger(":fading"),_this7._faderId=setInterval((function(){_this7.isPlaying()?(_this7.volume(Math.clamp(_this7.volume()+delta,min,max)),Config.audio.pauseOnFadeToZero&&0===_this7.volume()&&_this7.pause(),_this7.volume()===to&&(_this7.fadeStop(),_this7._trigger(":faded"))):_this7.fadeStop()}),25)})),this.play()):void 0}},{key:"fadeIn",value:function(duration,fromVol){return this.fade(duration,1,fromVol)}},{key:"fadeOut",value:function(duration,fromVol){return this.fade(duration,0,fromVol)}},{key:"fadeStop",value:function(){null!==this._faderId&&(clearInterval(this._faderId),this._faderId=null)}},{key:"loop",value:function(_loop){return null==_loop?this.audio.loop:(this.audio.loop=!!_loop,this)}},{key:"mute",value:function(_mute){return null==_mute?this._mute:(this._mute=!!_mute,this._updateAudioMute(),this)}},{key:"_updateAudioMute",value:function(){this.audio.muted=this._mute||_masterMute}},{key:"rate",value:function(_rate){if(null==_rate)return this._rate;if("number"!=typeof _rate)throw new TypeError("rate parameter must be a number");return this._rate=Math.clamp(_rate,.2,5),this._updateAudioRate(),this}},{key:"_updateAudioRate",value:function(){this.audio.playbackRate=Math.clamp(this._rate*_masterRate,.2,5)}},{key:"time",value:function(_time){var _this8=this;if(null==_time)return this.audio.currentTime;if("number"!=typeof _time)throw new TypeError("time parameter must be a number");return this.hasMetadata()?this.audio.currentTime=_time:jQuery(this.audio).off("loadedmetadata.AudioTrack_time").one("loadedmetadata.AudioTrack_time",(function(){return _this8.audio.currentTime=_time})),this}},{key:"volume",value:function(_volume){if(null==_volume)return this._volume;if("number"!=typeof _volume)throw new TypeError("volume parameter must be a number");return this._volume=Math.clamp(_volume,0,1),this._updateAudioVolume(),this}},{key:"_updateAudioVolume",value:function(){this.audio.volume=Math.clamp(this._volume*_masterVolume,0,1)}},{key:"duration",value:function(){return this.audio.duration}},{key:"remaining",value:function(){return this.audio.duration-this.audio.currentTime}},{key:"isFailed",value:function(){return this._error}},{key:"isLoading",value:function(){return this.audio.networkState===HTMLMediaElement.NETWORK_LOADING}},{key:"isUnloaded",value:function(){return!this.audio.hasChildNodes()}},{key:"isUnavailable",value:function(){return!this.hasSource()||this.isUnloaded()||this.isFailed()}},{key:"isPlaying",value:function(){return!this.audio.paused&&this.hasSomeData()}},{key:"isPaused",value:function(){return this.audio.paused&&(this.audio.duration===1/0||this.audio.currentTime>0)&&!this.audio.ended}},{key:"isStopped",value:function(){return this.audio.paused&&0===this.audio.currentTime}},{key:"isEnded",value:function(){return this.audio.ended}},{key:"isFading",value:function(){return null!==this._faderId}},{key:"isSeeking",value:function(){return this.audio.seeking}},{key:"hasSource",value:function(){return this.sources.length>0}},{key:"hasNoData",value:function(){return this.audio.readyState===HTMLMediaElement.HAVE_NOTHING}},{key:"hasMetadata",value:function(){return this.audio.readyState>=HTMLMediaElement.HAVE_METADATA}},{key:"hasSomeData",value:function(){return this.audio.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA}},{key:"hasData",value:function(){return this.audio.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA}},{key:"on",value:function(){for(var _len5=arguments.length,args=new Array(_len5),_key5=0;_key5<_len5;_key5++)args[_key5]=arguments[_key5];return jQuery.fn.on.apply(jQuery(this.audio),args),this}},{key:"one",value:function(){for(var _len6=arguments.length,args=new Array(_len6),_key6=0;_key6<_len6;_key6++)args[_key6]=arguments[_key6];return jQuery.fn.one.apply(jQuery(this.audio),args),this}},{key:"off",value:function(){for(var _len7=arguments.length,args=new Array(_len7),_key7=0;_key7<_len7;_key7++)args[_key7]=arguments[_key7];return jQuery.fn.off.apply(jQuery(this.audio),args),this}}]),AudioTrack}();Object.defineProperties(AudioTrack,{formats:{value:function(){var audio=document.createElement("audio"),types=new Map;function canPlay(mimeType){return types.has(mimeType)||types.set(mimeType,""!==audio.canPlayType(mimeType).replace(/^no$/i,"")),types.get(mimeType)}return Object.assign(Object.create(null),{aac:canPlay("audio/aac"),caf:canPlay("audio/x-caf")||canPlay("audio/caf"),flac:canPlay("audio/x-flac")||canPlay("audio/flac"),mp3:canPlay('audio/mpeg; codecs="mp3"')||canPlay("audio/mpeg")||canPlay("audio/mp3")||canPlay("audio/mpa"),mpeg:canPlay("audio/mpeg"),m4a:canPlay("audio/x-m4a")||canPlay("audio/m4a")||canPlay("audio/aac"),mp4:canPlay("audio/x-mp4")||canPlay("audio/mp4")||canPlay("audio/aac"),ogg:canPlay("audio/ogg"),oga:canPlay("audio/ogg"),opus:canPlay('audio/ogg; codecs="opus"')||canPlay("audio/opus"),wav:canPlay('audio/wave; codecs="1"')||canPlay('audio/wav; codecs="1"')||canPlay("audio/wave")||canPlay("audio/wav"),wave:canPlay('audio/wave; codecs="1"')||canPlay('audio/wav; codecs="1"')||canPlay("audio/wave")||canPlay("audio/wav"),weba:canPlay("audio/webm"),webm:canPlay("audio/webm")})}()}});var AudioList=function(){function AudioList(obj){if(_classCallCheck(this,AudioList),obj instanceof Array)this._create(obj);else{if(!(obj instanceof AudioList))throw new Error("tracks parameter must be either an array, of track objects, or an AudioTrack instance");this._copy(obj)}}return _createClass(AudioList,[{key:"_create",value:function(trackList){var _this9=this;this._finalize(trackList.map((function(trackObj){if("object"!==_typeof(trackObj))throw new Error("tracks parameter array members must be objects");var own,rate,track,volume;if(trackObj instanceof AudioTrack)own=!0,rate=trackObj.rate(),track=trackObj.clone(),volume=trackObj.volume();else{if(!trackObj.hasOwnProperty("track"))throw new Error('track object missing required "track" property');if(!(trackObj.track instanceof AudioTrack))throw new Error('track object\'s "track" property must be an AudioTrack object');own=trackObj.hasOwnProperty("own")&&trackObj.own,rate=trackObj.hasOwnProperty("rate")?trackObj.rate:trackObj.track.rate(),track=trackObj.track,volume=trackObj.hasOwnProperty("volume")?trackObj.volume:trackObj.track.volume()}return track.stop(),track.loop(!1),track.mute(!1),track.rate(rate),track.volume(volume),track.on("ended.AudioList",(function(){return _this9._onEnd()})),{own:own,track:track,volume:volume,rate:rate}})))}},{key:"_copy",value:function(obj){this._finalize(clone(obj.tracks))}},{key:"_finalize",value:function(tracks){Object.defineProperties(this,{tracks:{configurable:!0,value:Object.freeze(tracks)},queue:{configurable:!0,value:[]},current:{writable:!0,value:null},_rate:{writable:!0,value:1},_volume:{writable:!0,value:1},_mute:{writable:!0,value:!1},_loop:{writable:!0,value:!1},_shuffle:{writable:!0,value:!1}})}},{key:"_destroy",value:function(){this.stop(),this.tracks.filter((function(trackObj){return trackObj.own})).forEach((function(trackObj){return trackObj.track._destroy()})),delete this.tracks,delete this.queue}},{key:"load",value:function(){this.tracks.forEach((function(trackObj){return trackObj.track.load()}))}},{key:"unload",value:function(){this.stop(),this.tracks.forEach((function(trackObj){return trackObj.track.unload()}))}},{key:"play",value:function(){return null!==this.current&&!this.current.track.isUnavailable()&&!this.current.track.isEnded()||(0===this.queue.length&&this._fillQueue(),this._next())?this.current.track.play():Promise.reject(new Error("no tracks were available"))}},{key:"playWhenAllowed",value:function(){var _this10=this;this.play().catch((function(){var gestures=_gestureEventNames.map((function(name){return"".concat(name,".AudioList_playWhenAllowed")})).join(" ");jQuery(document).one(gestures,(function(){jQuery(document).off(".AudioList_playWhenAllowed"),_this10.play()}))}))}},{key:"pause",value:function(){null!==this.current&&this.current.track.pause()}},{key:"stop",value:function(){null!==this.current&&(this.current.track.stop(),this.current=null),this._drainQueue()}},{key:"skip",value:function(){this._next()?this.current.track.play():this._loop&&this.play()}},{key:"fade",value:function(duration,toVol,fromVol){if("number"!=typeof duration)throw new TypeError("duration parameter must be a number");if("number"!=typeof toVol)throw new TypeError("toVolume parameter must be a number");if(null!=fromVol&&"number"!=typeof fromVol)throw new TypeError("fromVolume parameter must be a number");if(0===this.queue.length&&this._fillQueue(),null!==this.current&&!this.current.track.isUnavailable()&&!this.current.track.isEnded()||this._next()){var adjFromVol,adjToVol=Math.clamp(toVol,0,1)*this.current.volume;return null!=fromVol&&(adjFromVol=Math.clamp(fromVol,0,1)*this.current.volume),this._volume=toVol,this.current.track.fade(duration,adjToVol,adjFromVol)}}},{key:"fadeIn",value:function(duration,fromVol){return this.fade(duration,1,fromVol)}},{key:"fadeOut",value:function(duration,fromVol){return this.fade(duration,0,fromVol)}},{key:"fadeStop",value:function(){null!==this.current&&this.current.track.fadeStop()}},{key:"loop",value:function(_loop2){return null==_loop2?this._loop:(this._loop=!!_loop2,this)}},{key:"mute",value:function(_mute2){return null==_mute2?this._mute:(this._mute=!!_mute2,null!==this.current&&this.current.track.mute(this._mute),this)}},{key:"rate",value:function(_rate2){if(null==_rate2)return this._rate;if("number"!=typeof _rate2)throw new TypeError("rate parameter must be a number");return this._rate=Math.clamp(_rate2,.2,5),null!==this.current&&this.current.track.rate(this._rate*this.current.rate),this}},{key:"shuffle",value:function(_shuffle){var _this11=this;if(null==_shuffle)return this._shuffle;if(this._shuffle=!!_shuffle,this.queue.length>0&&(this._fillQueue(),!this._shuffle&&null!==this.current&&this.queue.length>1)){var _this$queue,firstIdx=this.queue.findIndex((function(trackObj){return trackObj===_this11.current}));if(-1!==firstIdx)(_this$queue=this.queue).push.apply(_this$queue,_toConsumableArray(this.queue.splice(0,firstIdx+1)))}return this}},{key:"volume",value:function(_volume2){if(null==_volume2)return this._volume;if("number"!=typeof _volume2)throw new TypeError("volume parameter must be a number");return this._volume=Math.clamp(_volume2,0,1),null!==this.current&&this.current.track.volume(this._volume*this.current.volume),this}},{key:"duration",value:function(){if(arguments.length>0)throw new Error("duration takes no parameters");return this.tracks.map((function(trackObj){return trackObj.track.duration()})).reduce((function(prev,cur){return prev+cur}),0)}},{key:"remaining",value:function(){if(arguments.length>0)throw new Error("remaining takes no parameters");var remainingTime=this.queue.map((function(trackObj){return trackObj.track.duration()})).reduce((function(prev,cur){return prev+cur}),0);return null!==this.current&&(remainingTime+=this.current.track.remaining()),remainingTime}},{key:"time",value:function(){if(arguments.length>0)throw new Error("time takes no parameters");return this.duration()-this.remaining()}},{key:"isPlaying",value:function(){return null!==this.current&&this.current.track.isPlaying()}},{key:"isPaused",value:function(){return null===this.current||this.current.track.isPaused()}},{key:"isStopped",value:function(){return 0===this.queue.length&&null===this.current}},{key:"isEnded",value:function(){return 0===this.queue.length&&(null===this.current||this.current.track.isEnded())}},{key:"isFading",value:function(){return null!==this.current&&this.current.track.isFading()}},{key:"_next",value:function(){var nextTrack;for(null!==this.current&&(this.current.track.stop(),this.current=null);nextTrack=this.queue.shift();)if(!nextTrack.track.isUnavailable()){this.current=nextTrack;break}return null!==this.current&&(this.current.track.mute(this._mute),this.current.track.rate(this._rate*this.current.rate),this.current.track.volume(this._volume*this.current.volume),this.current.track.loop(!1),!0)}},{key:"_onEnd",value:function(){if(0===this.queue.length){if(!this._loop)return;this._fillQueue()}this._next()&&this.current.track.play()}},{key:"_drainQueue",value:function(){this.queue.splice(0)}},{key:"_fillQueue",value:function(){var _this$queue2;this._drainQueue(),(_this$queue2=this.queue).push.apply(_this$queue2,_toConsumableArray(this.tracks.filter((function(trackObj){return!trackObj.track.isUnavailable()})))),0!==this.queue.length&&this._shuffle&&(this.queue.shuffle(),this.queue.length>1&&this.queue[0]===this.current&&this.queue.push(this.queue.shift()))}}]),AudioList}(),AudioRunner=function(){function AudioRunner(list){if(_classCallCheck(this,AudioRunner),!(list instanceof Set||list instanceof AudioRunner))throw new TypeError("list parameter must be a Set or a AudioRunner instance");Object.defineProperties(this,{trackIds:{value:new Set(list instanceof AudioRunner?list.trackIds:list)}})}return _createClass(AudioRunner,[{key:"load",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.load)}},{key:"unload",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.unload)}},{key:"play",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.play)}},{key:"playWhenAllowed",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.playWhenAllowed)}},{key:"pause",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.pause)}},{key:"stop",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.stop)}},{key:"fade",value:function(duration,toVol,fromVol){if(null==duration||null==toVol)throw new Error("fade requires parameters");AudioRunner._run(this.trackIds,AudioTrack.prototype.fade,duration,toVol,fromVol)}},{key:"fadeIn",value:function(duration,fromVol){if(null==duration)throw new Error("fadeIn requires a parameter");AudioRunner._run(this.trackIds,AudioTrack.prototype.fadeIn,duration,fromVol)}},{key:"fadeOut",value:function(duration,fromVol){if(null==duration)throw new Error("fadeOut requires a parameter");AudioRunner._run(this.trackIds,AudioTrack.prototype.fadeOut,duration,fromVol)}},{key:"fadeStop",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.fadeStop)}},{key:"loop",value:function(_loop3){if(null==_loop3)throw new Error("loop requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.loop,_loop3),this}},{key:"mute",value:function(_mute3){if(null==_mute3)throw new Error("mute requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.mute,_mute3),this}},{key:"rate",value:function(_rate3){if(null==_rate3)throw new Error("rate requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.rate,_rate3),this}},{key:"time",value:function(_time2){if(null==_time2)throw new Error("time requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.time,_time2),this}},{key:"volume",value:function(_volume3){if(null==_volume3)throw new Error("volume requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.volume,_volume3),this}},{key:"on",value:function(){for(var _len8=arguments.length,args=new Array(_len8),_key8=0;_key8<_len8;_key8++)args[_key8]=arguments[_key8];return AudioRunner._run.apply(AudioRunner,[this.trackIds,AudioTrack.prototype.on].concat(args)),this}},{key:"one",value:function(){for(var _len9=arguments.length,args=new Array(_len9),_key9=0;_key9<_len9;_key9++)args[_key9]=arguments[_key9];return AudioRunner._run.apply(AudioRunner,[this.trackIds,AudioTrack.prototype.one].concat(args)),this}},{key:"off",value:function(){for(var _len10=arguments.length,args=new Array(_len10),_key10=0;_key10<_len10;_key10++)args[_key10]=arguments[_key10];return AudioRunner._run.apply(AudioRunner,[this.trackIds,AudioTrack.prototype.off].concat(args)),this}}],[{key:"_run",value:function(ids,fn){for(var _len11=arguments.length,args=new Array(_len11>2?_len11-2:0),_key11=2;_key11<_len11;_key11++)args[_key11-2]=arguments[_key11];ids.forEach((function(id){var track=_tracks.get(id);track&&fn.apply(track,args)}))}}]),AudioRunner}();var _runnerParseSelector=function(){var notWsRe=/\S/g,parenRe=/[()]/g;function processNegation(str,startPos){var match;if(notWsRe.lastIndex=startPos,null===(match=notWsRe.exec(str))||"("!==match[0])throw new Error('invalid ":not()" syntax: missing parentheticals');parenRe.lastIndex=notWsRe.lastIndex;for(var start=notWsRe.lastIndex,result={str:"",nextMatch:-1},depth=1;null!==(match=parenRe.exec(str));)if("("===match[0]?++depth:--depth,depth<1){result.nextMatch=parenRe.lastIndex,result.str=str.slice(start,result.nextMatch-1);break}return result}return function parseSelector(idArg){for(var match,ids=[],idRe=/:?[^\s:()]+/g;null!==(match=idRe.exec(idArg));){var id=match[0];if(":not"===id){if(0===ids.length)throw new Error('invalid negation: no group ID preceded ":not()"');var parent=ids[ids.length-1];if(":"!==parent.id[0])throw new Error('invalid negation of track "'.concat(parent.id,'": only groups may be negated with ":not()"'));var negation=processNegation(idArg,idRe.lastIndex);if(-1===negation.nextMatch)throw new Error('unknown error parsing ":not()"');idRe.lastIndex=negation.nextMatch,parent.not=parseSelector(negation.str)}else ids.push({id:id})}return ids}}();function masterMute(mute){if(null==mute)return _masterMute;publish("mute",_masterMute=!!mute)}function unsubscribe(id){_subscribers.delete(id)}function publish(mesg,data){_subscribers.forEach((function(fn){return fn(mesg,data)}))}function _newTrack(sources){return new AudioTrack(sources.map((function(source){if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);if(passage.tags.includes("Twine.audio"))return passage.text.trim()}var match=_formatSpecRe.exec(source);return null===match?source:{format:match[1],src:match[2]}})))}return Object.freeze(Object.defineProperties({},{tracks:{value:Object.freeze(Object.defineProperties({},{add:{value:function(){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("track ID"),arguments.length<2&&errors.push("sources"),new Error("no ".concat(errors.join(" or ")," specified"))}var id=String(arguments[0]).trim(),what='track ID "'.concat(id,'"');if(_badIdRe.test(id))throw new Error("invalid ".concat(what,": track IDs must not contain colons or whitespace"));var track,sources=Array.isArray(arguments[1])?Array.from(arguments[1]):Array.from(arguments).slice(1);try{track=_newTrack(sources)}catch(ex){throw new Error("".concat(what,": error during track initialization: ").concat(ex.message))}if(Config.debug&&!track.hasSource())throw new Error("".concat(what,": no supported audio sources found"));_tracks.has(id)&&_tracks.get(id)._destroy(),_tracks.set(id,track)}},delete:{value:function(id){return _tracks.has(id)&&_tracks.get(id)._destroy(),_tracks.delete(id)}},clear:{value:function(){_tracks.forEach((function(track){return track._destroy()})),_tracks.clear()}},has:{value:function(id){return _tracks.has(id)}},get:{value:function(id){return _tracks.get(id)||null}}}))},groups:{value:Object.freeze(Object.defineProperties({},{add:{value:function(){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("group ID"),arguments.length<2&&errors.push("track IDs"),new Error("no ".concat(errors.join(" or ")," specified"))}var id=String(arguments[0]).trim(),what='group ID "'.concat(id,'"');if(":"!==id[0]||_badIdRe.test(id.slice(1)))throw new Error("invalid ".concat(what,": group IDs must start with a colon and must not contain colons or whitespace"));if(_specialIds.includes(id))throw new Error("cannot clobber special ".concat(what));var group,trackIds=Array.isArray(arguments[1])?Array.from(arguments[1]):Array.from(arguments).slice(1);try{group=new Set(trackIds.map((function(trackId){if(!_tracks.has(trackId))throw new Error('track "'.concat(trackId,'" does not exist'));return trackId})))}catch(ex){throw new Error("".concat(what,": error during group initialization: ").concat(ex.message))}_groups.set(id,Object.freeze(Array.from(group)))}},delete:{value:function(id){return _groups.delete(id)}},clear:{value:function(){_groups.clear()}},has:{value:function(id){return _groups.has(id)}},get:{value:function(id){return _groups.get(id)||null}}}))},lists:{value:Object.freeze(Object.defineProperties({},{add:{value:function(){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("list ID"),arguments.length<2&&errors.push("track IDs"),new Error("no ".concat(errors.join(" or ")," specified"))}var id=String(arguments[0]).trim(),what='list ID "'.concat(id,'"');if(_badIdRe.test(id))return this.error("invalid ".concat(what,": list IDs must not contain colons or whitespace"));var list,descriptors=Array.isArray(arguments[1])?Array.from(arguments[1]):Array.from(arguments).slice(1);try{list=new AudioList(descriptors.map((function(desc){if(null===desc)throw new Error("track descriptor must be a string or object (type: null)");switch(_typeof(desc)){case"string":desc={id:desc};break;case"object":if(!desc.hasOwnProperty("id")&&!desc.hasOwnProperty("sources"))throw new Error('track descriptor must contain one of either an "id" or a "sources" property');if(desc.hasOwnProperty("id")&&desc.hasOwnProperty("sources"))throw new Error('track descriptor must contain either an "id" or a "sources" property, not both');break;default:throw new Error("track descriptor must be a string or object (type: ".concat(_typeof(desc),")"))}var own,track,volume;if(desc.hasOwnProperty("id")){if("string"!=typeof desc.id)throw new Error('"id" property must be a string');if(!_tracks.has(desc.id))throw new Error('track "'.concat(desc.id,'" does not exist'));track=_tracks.get(desc.id)}else if(desc.hasOwnProperty("sources")){if(!Array.isArray(desc.sources)||0===desc.sources.length)throw new Error('"sources" property must be a non-empty array');if(desc.hasOwnProperty("own"))throw new Error('"own" property is not allowed with the "sources" property');try{track=_newTrack(desc.sources),own=!0}catch(ex){throw new Error("error during track initialization: ".concat(ex.message))}if(Config.debug&&!track.hasSource())throw new Error("no supported audio sources found")}if(desc.hasOwnProperty("own")){if("boolean"!=typeof desc.own)throw new Error('"own" property must be a boolean');(own=desc.own)&&(track=track.clone())}if(desc.hasOwnProperty("volume")){if("number"!=typeof desc.volume||Number.isNaN(desc.volume)||!Number.isFinite(desc.volume)||desc.volume<0)throw new Error('"volume" property must be a non-negative finite number');volume=desc.volume}return{own:null!=own&&own,track:track,volume:null!=volume?volume:track.volume()}})))}catch(ex){throw new Error("".concat(what,": error during playlist initialization: ").concat(ex.message))}_lists.has(id)&&_lists.get(id)._destroy(),_lists.set(id,list)}},delete:{value:function(id){return _lists.has(id)&&_lists.get(id)._destroy(),_lists.delete(id)}},clear:{value:function(){_lists.forEach((function(list){return list._destroy()})),_lists.clear()}},has:{value:function(id){return _lists.has(id)}},get:{value:function(id){return _lists.get(id)||null}}}))},select:{value:function(){if(0===arguments.length)throw new Error("no track selector specified");var selector=String(arguments[0]).trim(),trackIds=new Set;try{var renderIds=function renderIds(idObj){var ids,id=idObj.id;switch(id){case":all":ids=allIds;break;case":looped":ids=allIds.filter((function(id){return _tracks.get(id).loop()}));break;case":muted":ids=allIds.filter((function(id){return _tracks.get(id).mute()}));break;case":paused":ids=allIds.filter((function(id){return _tracks.get(id).isPaused()}));break;case":playing":ids=allIds.filter((function(id){return _tracks.get(id).isPlaying()}));break;default:ids=":"===id[0]?_groups.get(id):[id]}if(idObj.hasOwnProperty("not")){var negated=idObj.not.map((function(idObj){return renderIds(idObj)})).flat(1/0);ids=ids.filter((function(id){return!negated.includes(id)}))}return ids},allIds=Array.from(_tracks.keys());_runnerParseSelector(selector).forEach((function(idObj){return renderIds(idObj).forEach((function(id){if(!_tracks.has(id))throw new Error('track "'.concat(id,'" does not exist'));trackIds.add(id)}))}))}catch(ex){throw new Error("error during runner initialization: ".concat(ex.message))}return new AudioRunner(trackIds)}},load:{value:function(){publish("load")}},loadWithScreen:{value:function(){publish("loadwithscreen")}},mute:{value:masterMute},muteOnHidden:{value:function(mute){if(!Visibility.isEnabled())return!1;if(null==mute)return _masterMuteOnHidden;var namespace=".SimpleAudio_masterMuteOnHidden";if(_masterMuteOnHidden=!!mute){var visibilityChange="".concat(Visibility.changeEvent).concat(namespace);jQuery(document).off(namespace).on(visibilityChange,(function(){return masterMute(Visibility.isHidden())})),Visibility.isHidden()&&masterMute(!0)}else jQuery(document).off(namespace)}},rate:{value:function(rate){if(null==rate)return _masterRate;if("number"!=typeof rate||Number.isNaN(rate)||!Number.isFinite(rate))throw new Error("rate must be a finite number");publish("rate",_masterRate=Math.clamp(rate,.2,5))}},stop:{value:function(){publish("stop")}},unload:{value:function(){publish("unload")}},volume:{value:function(volume){if(null==volume)return _masterVolume;if("number"!=typeof volume||Number.isNaN(volume)||!Number.isFinite(volume))throw new Error("volume must be a finite number");publish("volume",_masterVolume=Math.clamp(volume,0,1))}}}))}(),State=function(){var _history=[],_active=momentCreate(),_activeIndex=-1,_expired=[],_prng=null,_tempVariables={};function stateMarshal(noDelta){var stateObj={index:_activeIndex};return noDelta?stateObj.history=clone(_history):stateObj.delta=historyDeltaEncode(_history),_expired.length>0&&(stateObj.expired=_toConsumableArray(_expired)),null!==_prng&&(stateObj.seed=_prng.seed),stateObj}function stateUnmarshal(stateObj,noDelta){if(null==stateObj)throw new Error("state object is null or undefined");if(!stateObj.hasOwnProperty(noDelta?"history":"delta")||0===stateObj[noDelta?"history":"delta"].length)throw new Error("state object has no history or history is empty");if(!stateObj.hasOwnProperty("index"))throw new Error("state object has no index");if(null!==_prng&&!stateObj.hasOwnProperty("seed"))throw new Error("state object has no seed, but PRNG is enabled");if(null===_prng&&stateObj.hasOwnProperty("seed"))throw new Error("state object has seed, but PRNG is disabled");_history=noDelta?clone(stateObj.history):historyDeltaDecode(stateObj.delta),_activeIndex=stateObj.index,_expired=stateObj.hasOwnProperty("expired")?_toConsumableArray(stateObj.expired):[],stateObj.hasOwnProperty("seed")&&(_prng.seed=stateObj.seed),momentActivate(_activeIndex)}function momentCreate(title,variables){return{title:null==title?"":String(title),variables:null==variables?{}:clone(variables)}}function momentActivate(moment){if(null==moment)throw new Error("moment activation attempted with null or undefined");switch(_typeof(moment)){case"object":_active=clone(moment);break;case"number":if(historyIsEmpty())throw new Error("moment activation attempted with index on empty history");if(moment<0||moment>=historySize())throw new RangeError("moment activation attempted with out-of-bounds index; need [0, ".concat(historySize()-1,"], got ").concat(moment));_active=clone(_history[moment]);break;default:throw new TypeError('moment activation attempted with a "'.concat(_typeof(moment),'"; must be an object or valid history stack index'))}return null!==_prng&&(_prng=PRNGWrapper.unmarshal({seed:_prng.seed,pull:_active.pull})),session.set("state",stateMarshal()),jQuery.event.trigger(":historyupdate"),_active}function historyLength(){return _activeIndex+1}function historySize(){return _history.length}function historyIsEmpty(){return 0===_history.length}function historyTop(){return _history.length>0?_history[_history.length-1]:null}function historyGoTo(index){return!(null==index||index<0||index>=historySize()||index===_activeIndex)&&(momentActivate(_activeIndex=index),!0)}function historyDeltaEncode(historyArr){if(!Array.isArray(historyArr))return null;if(0===historyArr.length)return[];for(var delta=[historyArr[0]],i=1,iend=historyArr.length;i<iend;++i)delta.push(Diff.diff(historyArr[i-1],historyArr[i]));return delta}function historyDeltaDecode(delta){if(!Array.isArray(delta))return null;if(0===delta.length)return[];for(var historyArr=[clone(delta[0])],i=1,iend=delta.length;i<iend;++i)historyArr.push(Diff.patch(historyArr[i-1],delta[i]));return historyArr}function prngInit(seed,useEntropy){var scriptSection;if(!historyIsEmpty())throw scriptSection="the Story JavaScript",new Error("State.prng.init must be called during initialization, within either ".concat(scriptSection," or the StoryInit special passage"));_prng=new PRNGWrapper(seed,useEntropy),_active.pull=_prng.pull}function metadataDelete(key){if("string"!=typeof key)throw new TypeError("State.metadata.delete key parameter must be a string (received: ".concat(_typeof(key),")"));var store=storage.get("metadata");store&&store.hasOwnProperty(key)&&(1===Object.keys(store).length?storage.delete("metadata"):(delete store[key],storage.set("metadata",store)))}return Object.freeze(Object.defineProperties({},{reset:{value:function(){session.delete("state"),_history=[],_active=momentCreate(),_activeIndex=-1,_expired=[],_prng=null===_prng?null:new PRNGWrapper(_prng.seed,!1)}},restore:{value:function(){if(session.has("state")){var stateObj=session.get("state");return null!=stateObj&&(stateUnmarshal(stateObj),!0)}return!1}},marshalForSave:{value:function(){return stateMarshal(!0)}},unmarshalForSave:{value:function(stateObj){return stateUnmarshal(stateObj,!0)}},expired:{get:function(){return _expired}},turns:{get:function(){return _expired.length+historyLength()}},passages:{get:function(){return _expired.concat(_history.slice(0,historyLength()).map((function(moment){return moment.title})))}},hasPlayed:{value:function(title){return null!=title&&""!==title&&(!!_expired.includes(title)||!!_history.slice(0,historyLength()).some((function(moment){return moment.title===title})))}},active:{get:function(){return _active}},activeIndex:{get:function(){return _activeIndex}},passage:{get:function(){return _active.title}},variables:{get:function(){return _active.variables}},history:{get:function(){return _history}},length:{get:historyLength},size:{get:historySize},isEmpty:{value:historyIsEmpty},current:{get:function(){return _history.length>0?_history[_activeIndex]:null}},top:{get:historyTop},bottom:{get:function(){return _history.length>0?_history[0]:null}},index:{value:function(index){return historyIsEmpty()||index<0||index>_activeIndex?null:_history[index]}},peek:{value:function(offset){if(historyIsEmpty())return null;var lengthOffset=1+(offset?Math.abs(offset):0);return lengthOffset>historyLength()?null:_history[historyLength()-lengthOffset]}},has:{value:function(title){if(historyIsEmpty()||null==title||""===title)return!1;for(var i=_activeIndex;i>=0;--i)if(_history[i].title===title)return!0;return!1}},create:{value:function(title){for(0,historyLength()<historySize()&&_history.splice(historyLength(),historySize()-historyLength()),_history.push(momentCreate(title,_active.variables)),_prng&&(historyTop().pull=_prng.pull);historySize()>Config.history.maxStates;)_expired.push(_history.shift().title);return momentActivate(_activeIndex=historySize()-1),historyLength()}},goTo:{value:historyGoTo},go:{value:function(offset){return null!=offset&&0!==offset&&historyGoTo(_activeIndex+offset)}},deltaEncode:{value:historyDeltaEncode},deltaDecode:{value:historyDeltaDecode},prng:{value:Object.freeze(Object.defineProperties({},{init:{value:prngInit},isEnabled:{value:function(){return null!==_prng}},pull:{get:function(){return _prng?_prng.pull:NaN}},seed:{get:function(){return _prng?_prng.seed:null}}}))},random:{value:function(){return _prng?_prng.random():Math.random()}},clearTemporary:{value:function(){TempVariables=_tempVariables={}}},temporary:{get:function(){return _tempVariables}},getVar:{value:function(varExpression){try{return Scripting.evalTwineScript(varExpression)}catch(ex){}}},setVar:{value:function(varExpression,value){try{return Scripting.evalTwineScript("".concat(varExpression," = evalTwineScript$Data$"),null,value),!0}catch(ex){}return!1}},metadata:{value:Object.freeze(Object.defineProperties({},{clear:{value:function(){storage.delete("metadata")}},delete:{value:metadataDelete},entries:{value:function(){var store=storage.get("metadata");return store&&Object.entries(store)}},get:{value:function(key){if("string"!=typeof key)throw new TypeError("State.metadata.get key parameter must be a string (received: ".concat(_typeof(key),")"));var store=storage.get("metadata");return store&&store.hasOwnProperty(key)?store[key]:undefined}},has:{value:function(key){if("string"!=typeof key)throw new TypeError("State.metadata.has key parameter must be a string (received: ".concat(_typeof(key),")"));var store=storage.get("metadata");return store&&store.hasOwnProperty(key)}},keys:{value:function(){var store=storage.get("metadata");return store&&Object.keys(store)}},set:{value:function(key,value){if("string"!=typeof key)throw new TypeError("State.metadata.set key parameter must be a string (received: ".concat(_typeof(key),")"));if(void 0===value)metadataDelete(key);else{var store=storage.get("metadata")||{};store[key]=value,storage.set("metadata",store)}}},size:{get:function(){var store=storage.get("metadata");return store?Object.keys(store).length:0}}}))},initPRNG:{value:prngInit},restart:{value:function(){return Engine.restart()}},backward:{value:function(){return Engine.backward()}},forward:{value:function(){return Engine.forward()}},display:{value:function(){return Engine.display.apply(Engine,arguments)}},show:{value:function(){return Engine.show.apply(Engine,arguments)}},play:{value:function(){return Engine.play.apply(Engine,arguments)}}}))}(),Scripting=function(){function addAccessibleClickHandler(targets,selector,handler,one,namespace){if(arguments.length<2)throw new Error("addAccessibleClickHandler insufficient number of parameters");var fn,opts;if("function"==typeof selector?(fn=selector,opts={namespace:one,one:!!handler}):(fn=handler,opts={namespace:namespace,one:!!one,selector:selector}),"function"!=typeof fn)throw new TypeError("addAccessibleClickHandler handler parameter must be a function");return jQuery(targets).ariaClick(opts,fn)}function insertElement(place,type,id,classNames,text,title){var $el=jQuery(document.createElement(type));return id&&$el.attr("id",id),classNames&&$el.addClass(classNames),title&&$el.attr("title",title),text&&$el.text(text),place&&$el.appendTo(place),$el[0]}function insertText(place,text){jQuery(place).append(document.createTextNode(text))}function removeChildren(node){jQuery(node).empty()}function removeElement(node){jQuery(node).remove()}function fade(el,options){var current,intervalId,direction="in"===options.fade?1:-1,proxy=el.cloneNode(!0);function setOpacity(el,opacity){el.style.zoom=1,el.style.filter="alpha(opacity=".concat(Math.floor(100*opacity),")"),el.style.opacity=opacity}el.parentNode.replaceChild(proxy,el),"in"===options.fade?(current=0,proxy.style.visibility="visible"):current=1,setOpacity(proxy,current),intervalId=window.setInterval((function(){current+=.05*direction,setOpacity(proxy,Math.easeInOut(current)),(1===direction&¤t>=1||-1===direction&¤t<=0)&&(el.style.visibility="in"===options.fade?"visible":"hidden",proxy.parentNode.replaceChild(el,proxy),proxy=null,window.clearInterval(intervalId),options.onComplete&&options.onComplete())}),25)}function scrollWindowTo(el,incrementBy){var increment=null!=incrementBy?Number(incrementBy):.1;Number.isNaN(increment)||!Number.isFinite(increment)||increment<0?increment=.1:increment>1&&(increment=1);var intervalId,start=window.scrollY?window.scrollY:document.body.scrollTop,end=function(el){var posTop=function(el){var curtop=0;for(;el.offsetParent;)curtop+=el.offsetTop,el=el.offsetParent;return curtop}(el),posBottom=posTop+el.offsetHeight,winTop=window.scrollY?window.scrollY:document.body.scrollTop,winHeight=window.innerHeight?window.innerHeight:document.body.clientHeight,winBottom=winTop+winHeight;return posTop>=winTop&&posBottom>winBottom&&el.offsetHeight<winHeight?posTop-(winHeight-el.offsetHeight)+20:posTop}(el),distance=Math.abs(start-end),direction=start>end?-1:1,progress=0;intervalId=window.setInterval((function(){progress+=increment,window.scroll(0,start+direction*(distance*Math.easeInOut(progress))),progress>=1&&window.clearInterval(intervalId)}),25)}function toStringOrDefault(value){return stringFrom(value)}function either(){if(0!==arguments.length)return Array.prototype.concat.apply([],arguments).random()}function forget(key){if("string"!=typeof key)throw new TypeError("forget key parameter must be a string (received: ".concat(Util.getType(key),")"));State.metadata.delete(key)}function hasVisited(){if(0===arguments.length)throw new Error("hasVisited called with insufficient parameters");if(State.isEmpty())return!1;for(var needles=Array.prototype.concat.apply([],arguments),played=State.passages,i=0,iend=needles.length;i<iend;++i)if(!played.includes(needles[i]))return!1;return!0}function lastVisited(){if(0===arguments.length)throw new Error("lastVisited called with insufficient parameters");if(State.isEmpty())return-1;for(var needles=Array.prototype.concat.apply([],arguments),played=State.passages,uBound=played.length-1,turns=State.turns,i=0,iend=needles.length;i<iend&&turns>-1;++i){var lastIndex=played.lastIndexOf(needles[i]);turns=Math.min(turns,-1===lastIndex?-1:uBound-lastIndex)}return turns}function memorize(key,value){if("string"!=typeof key)throw new TypeError("memorize key parameter must be a string (received: ".concat(Util.getType(key),")"));State.metadata.set(key,value)}function passage(){return State.passage}function previous(){var passages=State.passages;if(arguments.length>0){var offset=Number(arguments[0]);if(!Number.isSafeInteger(offset)||offset<1)throw new RangeError("previous offset parameter must be a positive integer greater than zero");return passages.length>offset?passages[passages.length-1-offset]:""}for(var i=passages.length-2;i>=0;--i)if(passages[i]!==State.passage)return passages[i];return""}function random(){var min,max;switch(arguments.length){case 0:throw new Error("random called with insufficient parameters");case 1:min=0,max=Math.trunc(arguments[0]);break;default:min=Math.trunc(arguments[0]),max=Math.trunc(arguments[1])}if(!Number.isInteger(min))throw new Error("random min parameter must be an integer");if(!Number.isInteger(max))throw new Error("random max parameter must be an integer");if(min>max){var _ref6=[max,min];min=_ref6[0],max=_ref6[1]}return Math.floor(State.random()*(max-min+1))+min}function randomFloat(){var min,max;switch(arguments.length){case 0:throw new Error("randomFloat called with insufficient parameters");case 1:min=0,max=Number(arguments[0]);break;default:min=Number(arguments[0]),max=Number(arguments[1])}if(Number.isNaN(min)||!Number.isFinite(min))throw new Error("randomFloat min parameter must be a number");if(Number.isNaN(max)||!Number.isFinite(max))throw new Error("randomFloat max parameter must be a number");if(min>max){var _ref7=[max,min];min=_ref7[0],max=_ref7[1]}return State.random()*(max-min)+min}function recall(key,defaultValue){if("string"!=typeof key)throw new TypeError("recall key parameter must be a string (received: ".concat(Util.getType(key),")"));return State.metadata.has(key)?State.metadata.get(key):defaultValue}function tags(){if(0===arguments.length)return Story.get(State.passage).tags.slice(0);for(var passages=Array.prototype.concat.apply([],arguments),tags=[],i=0,iend=passages.length;i<iend;++i)tags=tags.concat(Story.get(passages[i]).tags);return tags}function temporary(){return State.temporary}function time(){return null===Engine.lastPlay?0:Util.now()-Engine.lastPlay}function turns(){return State.turns}function variables(){return State.variables}function visited(){if(State.isEmpty())return 0;for(var needles=Array.prototype.concat.apply([],0===arguments.length?[State.passage]:arguments),played=State.passages,count=State.turns,i=0,iend=needles.length;i<iend&&count>0;++i)count=Math.min(count,played.count(needles[i]));return count}function visitedTags(){if(0===arguments.length)throw new Error("visitedTags called with insufficient parameters");if(State.isEmpty())return 0;for(var needles=Array.prototype.concat.apply([],arguments),nLength=needles.length,played=State.passages,seen=new Map,count=0,i=0,iend=played.length;i<iend;++i){var title=played[i];if(seen.has(title))seen.get(title)&&++count;else{var _tags2=Story.get(title).tags;if(_tags2.length>0){for(var found=0,j=0;j<nLength;++j)_tags2.includes(needles[j])&&++found;found===nLength?(++count,seen.set(title,!0)):seen.set(title,!1)}}}return count}var _ref8=function(){function slugifyUrl(url){return Util.parseUrl(url).path.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w]+/g,"-").toLocaleLowerCase()}function addScript(url){return new Promise((function(resolve,reject){jQuery(document.createElement("script")).one("load abort error",(function(ev){jQuery(ev.target).off(),"load"===ev.type?resolve(ev.target):reject(new Error('importScripts failed to load the script "'.concat(url,'".')))})).appendTo(document.head).attr({id:"script-imported-".concat(slugifyUrl(url)),type:"text/javascript",src:url})}))}function addStyle(url){return new Promise((function(resolve,reject){jQuery(document.createElement("link")).one("load abort error",(function(ev){jQuery(ev.target).off(),"load"===ev.type?resolve(ev.target):reject(new Error('importStyles failed to load the stylesheet "'.concat(url,'".')))})).appendTo(document.head).attr({id:"style-imported-".concat(slugifyUrl(url)),rel:"stylesheet",href:url})}))}function sequence(callbacks){return callbacks.reduce((function(seq,fn){return seq.then(fn)}),Promise.resolve())}return{importScripts:function(){for(var _len12=arguments.length,urls=new Array(_len12),_key12=0;_key12<_len12;_key12++)urls[_key12]=arguments[_key12];return Promise.all(urls.map((function(oneOrSeries){return Array.isArray(oneOrSeries)?sequence(oneOrSeries.map((function(url){return function(){return addScript(url)}}))):addScript(oneOrSeries)})))},importStyles:function(){for(var _len13=arguments.length,urls=new Array(_len13),_key13=0;_key13<_len13;_key13++)urls[_key13]=arguments[_key13];return Promise.all(urls.map((function(oneOrSeries){return Array.isArray(oneOrSeries)?sequence(oneOrSeries.map((function(url){return function(){return addStyle(url)}}))):addStyle(oneOrSeries)})))}}}(),importScripts=_ref8.importScripts,importStyles=_ref8.importStyles,parse=function(){var tokenTable=Util.toEnum({$:"State.variables.",_:"State.temporary.",to:"=",eq:"==",neq:"!=",is:"===",isnot:"!==",gt:">",gte:">=",lt:"<",lte:"<=",and:"&&",or:"||",not:"!",def:'"undefined" !== typeof',ndef:'"undefined" === typeof'}),parseRe=new RegExp(["(?:\"\"|''|``)",'(?:"(?:\\\\.|[^"\\\\])+")',"(?:'(?:\\\\.|[^'\\\\])+')","(`(?:\\\\.|[^`\\\\])+`)","(?:[=+\\-*\\/%<>&\\|\\^~!?:,;\\(\\)\\[\\]{}]+)","([^\"'=+\\-*\\/%<>&\\|\\^~!?:,;\\(\\)\\[\\]{}\\s]+)"].join("|"),"g"),notSpaceRe=/\S/,varTest=new RegExp("^".concat(Patterns.variable)),withColonTestRe=/^\s*:/,withNotTestRe=/^\s+not\b/;function parse(rawCodeString){if(0!==parseRe.lastIndex)throw new RangeError("Scripting.parse last index is non-zero at start");for(var match,code=rawCodeString;null!==(match=parseRe.exec(code));)if(match[1]){var rawTemplate=match[1],parsedTemplate=parseTemplate(rawTemplate);parsedTemplate!==rawTemplate&&(code=code.splice(match.index,rawTemplate.length,parsedTemplate),parseRe.lastIndex+=parsedTemplate.length-rawTemplate.length)}else if(match[2]){var token=match[2];if("$"===token||"_"===token)continue;if(varTest.test(token))token=token[0];else if("is"===token){var start=parseRe.lastIndex,ahead=code.slice(start);withNotTestRe.test(ahead)&&(code=code.splice(start,ahead.search(notSpaceRe)),token="isnot")}else{var _ahead=code.slice(parseRe.lastIndex);if(withColonTestRe.test(_ahead))continue}tokenTable[token]&&(code=code.splice(match.index,token.length,tokenTable[token]),parseRe.lastIndex+=tokenTable[token].length-token.length)}return code}var templateGroupStartRe=/\$\{/g,templateGroupParseRe=new RegExp(["(?:\"\"|'')",'(?:"(?:\\\\.|[^"\\\\])+")',"(?:'(?:\\\\.|[^'\\\\])+')","(\\{)","(\\})"].join("|"),"g");function parseTemplate(rawTemplateLiteral){if(0!==templateGroupStartRe.lastIndex)throw new RangeError("Scripting.parse last index is non-zero at start of template literal");for(var startMatch,template=rawTemplateLiteral;null!==(startMatch=templateGroupStartRe.exec(template));){var startIdx=startMatch.index+2,endIdx=startIdx,depth=1,endMatch=void 0;for(templateGroupParseRe.lastIndex=startIdx;null!==(endMatch=templateGroupParseRe.exec(template));)if(endMatch[1]?++depth:endMatch[2]&&--depth,0===depth){endIdx=endMatch.index;break}if(endIdx>startIdx){var parseIndex=parseRe.lastIndex,rawGroup=template.slice(startIdx,endIdx);parseRe.lastIndex=0;var parsedGroup=parse(rawGroup);parseRe.lastIndex=parseIndex,template=template.splice(startIdx,rawGroup.length,parsedGroup),templateGroupStartRe.lastIndex+=parsedGroup.length-rawGroup.length}}return template}return parse}();function evalJavaScript(code,output,data){return function(code,output,evalJavaScript$Data$){return eval(code)}.call(output?{output:output}:null,String(code),output,data)}function evalTwineScript(code,output,data){return function(code,output,evalTwineScript$Data$){return eval(code)}.call(output?{output:output}:null,parse(String(code)),output,data)}return Object.freeze(Object.defineProperties({},{parse:{value:parse},evalJavaScript:{value:evalJavaScript},evalTwineScript:{value:evalTwineScript}}))}(),_ref9=function(){var Lexer=function(){function Lexer(source,initialState){if(_classCallCheck(this,Lexer),arguments.length<2)throw new Error("Lexer constructor called with too few parameters (source:string , initialState:function)");Object.defineProperties(this,{source:{value:source},initial:{value:initialState},state:{writable:!0,value:initialState},start:{writable:!0,value:0},pos:{writable:!0,value:0},depth:{writable:!0,value:0},items:{writable:!0,value:[]},data:{writable:!0,value:{}}})}return _createClass(Lexer,[{key:"reset",value:function(){this.state=this.initial,this.start=0,this.pos=0,this.depth=0,this.items=[],this.data={}}},{key:"run",value:function(){for(;null!==this.state;)this.state=this.state(this);return this.items}},{key:"nextItem",value:function(){for(;0===this.items.length&&null!==this.state;)this.state=this.state(this);return this.items.shift()}},{key:"next",value:function(){return this.pos>=this.source.length?-1:this.source[this.pos++]}},{key:"peek",value:function(){return this.pos>=this.source.length?-1:this.source[this.pos]}},{key:"backup",value:function(num){this.pos-=num||1}},{key:"forward",value:function(num){this.pos+=num||1}},{key:"ignore",value:function(){this.start=this.pos}},{key:"accept",value:function(valid){var ch=this.next();return-1!==ch&&(!!valid.includes(ch)||(this.backup(),!1))}},{key:"acceptRe",value:function(validRe){var ch=this.next();return-1!==ch&&(!!validRe.test(ch)||(this.backup(),!1))}},{key:"acceptRun",value:function(valid){for(;;){var ch=this.next();if(-1===ch)return;if(!valid.includes(ch))break}this.backup()}},{key:"acceptRunRe",value:function(validRe){for(;;){var ch=this.next();if(-1===ch)return;if(!validRe.test(ch))break}this.backup()}},{key:"emit",value:function(type){this.items.push({type:type,text:this.source.slice(this.start,this.pos),start:this.start,pos:this.pos}),this.start=this.pos}},{key:"error",value:function(type,message){if(arguments.length<2)throw new Error("Lexer.prototype.error called with too few parameters (type:number , message:string)");return this.items.push({type:type,message:message,text:this.source.slice(this.start,this.pos),start:this.start,pos:this.pos}),null}}],[{key:"enumFromNames",value:function(names){var obj=names.reduce((function(obj,name,i){return obj[name]=i,obj}),{});return Object.freeze(Object.assign(Object.create(null),obj))}}]),Lexer}();return{EOF:-1,Lexer:Lexer}}(),EOF=_ref9.EOF,Lexer=_ref9.Lexer,Wikifier=function(){var _optionsStack,lookaheadRe,idOrClassRe,_callDepth=0,Wikifier=function(){function Wikifier(destination,source,options){_classCallCheck(this,Wikifier),Wikifier.Parser.Profile.isEmpty()&&Wikifier.Parser.Profile.compile(),Object.defineProperties(this,{source:{value:String(source)},options:{writable:!0,value:Object.assign({profile:"all"},options)},nextMatch:{writable:!0,value:0},output:{writable:!0,value:null},_rawArgs:{writable:!0,value:""}}),null==destination?this.output=document.createDocumentFragment():destination.jquery?this.output=destination[0]:this.output=destination;try{++_callDepth,this.subWikify(this.output),1===_callDepth&&Config.cleanupWikifierOutput&&convertBreaks(this.output)}finally{--_callDepth}}return _createClass(Wikifier,[{key:"subWikify",value:function(output,terminator,options){var newOptions,oldOptions,oldOutput=this.output;this.output=output,Wikifier.Option.length>0&&(newOptions=Object.assign(newOptions||{},Wikifier.Option.options)),null!==options&&"object"===_typeof(options)&&(newOptions=Object.assign(newOptions||{},options)),newOptions&&(oldOptions=this.options,this.options=Object.assign({},this.options,newOptions));var terminatorMatch,parserMatch,parsersProfile=Wikifier.Parser.Profile.get(this.options.profile),terminatorRegExp=terminator?new RegExp("(?:".concat(terminator,")"),this.options.ignoreTerminatorCase?"gim":"gm"):null;do{if(parsersProfile.parserRegExp.lastIndex=this.nextMatch,terminatorRegExp&&(terminatorRegExp.lastIndex=this.nextMatch),parserMatch=parsersProfile.parserRegExp.exec(this.source),(terminatorMatch=terminatorRegExp?terminatorRegExp.exec(this.source):null)&&(!parserMatch||terminatorMatch.index<=parserMatch.index))return terminatorMatch.index>this.nextMatch&&this.outputText(this.output,this.nextMatch,terminatorMatch.index),this.matchStart=terminatorMatch.index,this.matchLength=terminatorMatch[0].length,this.matchText=terminatorMatch[0],this.nextMatch=terminatorRegExp.lastIndex,this.output=oldOutput,void(oldOptions&&(this.options=oldOptions));if(parserMatch){parserMatch.index>this.nextMatch&&this.outputText(this.output,this.nextMatch,parserMatch.index),this.matchStart=parserMatch.index,this.matchLength=parserMatch[0].length,this.matchText=parserMatch[0],this.nextMatch=parsersProfile.parserRegExp.lastIndex;for(var matchingParser=void 0,i=1,iend=parserMatch.length;i<iend;++i)if(parserMatch[i]){matchingParser=i-1;break}if(parsersProfile.parsers[matchingParser].handler(this),null!=TempState.break)break}}while(terminatorMatch||parserMatch);null==TempState.break?this.nextMatch<this.source.length&&(this.outputText(this.output,this.nextMatch,this.source.length),this.nextMatch=this.source.length):this.output.lastChild&&this.output.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===this.output.lastChild.nodeName.toUpperCase()&&jQuery(this.output.lastChild).remove(),this.output=oldOutput,oldOptions&&(this.options=oldOptions)}},{key:"outputText",value:function(destination,startPos,endPos){jQuery(destination).append(document.createTextNode(this.source.substring(startPos,endPos)))}},{key:"rawArgs",value:function(){return this._rawArgs}},{key:"fullArgs",value:function(){return Scripting.parse(this._rawArgs)}}],[{key:"wikifyEval",value:function(text){var output=document.createDocumentFragment();new Wikifier(output,text);var errors=output.querySelector(".error");if(null!==errors)throw new Error(errors.textContent.replace(errorPrologRegExp,""));return output}},{key:"createInternalLink",value:function(destination,passage,text,callback){var $link=jQuery(document.createElement("a"));return null!=passage&&($link.attr("data-passage",passage),Story.has(passage)?($link.addClass("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&$link.addClass("link-visited")):$link.addClass("link-broken"),$link.ariaClick({one:!0},(function(){"function"==typeof callback&&callback(),Engine.play(passage)}))),text&&$link.append(document.createTextNode(text)),destination&&$link.appendTo(destination),$link[0]}},{key:"createExternalLink",value:function(destination,url,text){var $link=jQuery(document.createElement("a")).attr("target","_blank").addClass("link-external").text(text).appendTo(destination);return null!=url&&$link.attr({href:url,tabindex:0}),$link[0]}},{key:"isExternalLink",value:function(link){return!Story.has(link)&&(new RegExp("^".concat(Patterns.url),"gim").test(link)||/[/.?#]/.test(link))}}]),Wikifier}();return Object.defineProperty(Wikifier,"Option",{value:(_optionsStack=[],Object.freeze(Object.defineProperties({},{length:{get:function(){return _optionsStack.length}},options:{get:function(){return Object.assign.apply(Object,[{}].concat(_toConsumableArray(_optionsStack)))}},clear:{value:function(){_optionsStack=[]}},get:{value:function(idx){return _optionsStack[idx]}},pop:{value:function(){return _optionsStack.pop()}},push:{value:function(options){if("object"!==_typeof(options)||null===options)throw new TypeError("Wikifier.Option.push options parameter must be an object (received: ".concat(Util.getType(options),")"));return _optionsStack.push(options)}}})))}),Object.defineProperty(Wikifier,"Parser",{value:function(){var _profiles,_parsers=[];function parsersHas(name){return!!_parsers.find((function(parser){return parser.name===name}))}return Object.freeze(Object.defineProperties({},{parsers:{get:function(){return _parsers}},add:{value:function(parser){if("object"!==_typeof(parser))throw new Error("Wikifier.Parser.add parser parameter must be an object");if(!parser.hasOwnProperty("name"))throw new Error('parser object missing required "name" property');if("string"!=typeof parser.name)throw new Error('parser object "name" property must be a string');if(!parser.hasOwnProperty("match"))throw new Error('parser object missing required "match" property');if("string"!=typeof parser.match)throw new Error('parser object "match" property must be a string');if(!parser.hasOwnProperty("handler"))throw new Error('parser object missing required "handler" property');if("function"!=typeof parser.handler)throw new Error('parser object "handler" property must be a function');if(parser.hasOwnProperty("profiles")&&!Array.isArray(parser.profiles))throw new Error('parser object "profiles" property must be an array');if(parsersHas(parser.name))throw new Error('cannot clobber existing parser "'.concat(parser.name,'"'));_parsers.push(parser)}},delete:{value:function(name){var parser=_parsers.find((function(parser){return parser.name===name}));parser&&_parsers.delete(parser)}},isEmpty:{value:function(){return 0===_parsers.length}},has:{value:parsersHas},get:{value:function(name){return _parsers.find((function(parser){return parser.name===name}))||null}},Profile:{value:Object.freeze(Object.defineProperties({},{profiles:{get:function(){return _profiles}},compile:{value:function(){var all=_parsers,core=all.filter((function(parser){return!Array.isArray(parser.profiles)||parser.profiles.includes("core")}));return _profiles=Object.freeze({all:{parsers:all,parserRegExp:new RegExp(all.map((function(parser){return"(".concat(parser.match,")")})).join("|"),"gm")},core:{parsers:core,parserRegExp:new RegExp(core.map((function(parser){return"(".concat(parser.match,")")})).join("|"),"gm")}})}},isEmpty:{value:function(){return"object"!==_typeof(_profiles)||0===Object.keys(_profiles).length}},has:{value:function(profile){return"object"===_typeof(_profiles)&&_profiles.hasOwnProperty(profile)}},get:{value:function(profile){if("object"!==_typeof(_profiles)||!_profiles.hasOwnProperty(profile))throw new Error('nonexistent parser profile "'.concat(profile,'"'));return _profiles[profile]}}}))}}))}()}),Object.defineProperties(Wikifier,{helpers:{value:{}},getValue:{value:State.getVar},setValue:{value:State.setVar},parse:{value:Scripting.parse},evalExpression:{value:Scripting.evalTwineScript},evalStatements:{value:Scripting.evalTwineScript},textPrimitives:{value:Patterns}}),Object.defineProperties(Wikifier.helpers,{inlineCss:{value:(lookaheadRe=new RegExp(Patterns.inlineCss,"gm"),idOrClassRe=new RegExp("(".concat(Patterns.cssIdOrClassSigil,")(").concat(Patterns.anyLetter,"+)"),"g"),function(w){var matched,css={classes:[],id:"",styles:{}};do{lookaheadRe.lastIndex=w.nextMatch;var match=lookaheadRe.exec(w.source);if(matched=match&&match.index===w.nextMatch){if(match[1])css.styles[Util.fromCssProperty(match[1])]=match[2].trim();else if(match[3])css.styles[Util.fromCssProperty(match[3])]=match[4].trim();else if(match[5]){var subMatch=void 0;for(idOrClassRe.lastIndex=0;null!==(subMatch=idOrClassRe.exec(match[5]));)"."===subMatch[1]?css.classes.push(subMatch[2]):css.id=subMatch[2]}w.nextMatch=lookaheadRe.lastIndex}}while(matched);return css})},evalText:{value:function(text){var result;try{switch(_typeof(result=Scripting.evalTwineScript(text))){case"string":""===result.trim()&&(result=text);break;case"number":result=String(result);break;default:result=text}}catch(ex){result=text}return result}},evalPassageId:{value:function(passage){return null==passage||Story.has(passage)?passage:Wikifier.helpers.evalText(passage)}},hasBlockContext:{value:function(nodes){for(var hasGCS="function"==typeof window.getComputedStyle,i=nodes.length-1;i>=0;--i){var node=nodes[i];switch(node.nodeType){case Node.ELEMENT_NODE:var tagName=node.nodeName.toUpperCase();if("BR"===tagName)return!0;var styles=hasGCS?window.getComputedStyle(node,null):node.currentStyle;if(styles&&styles.display){if("none"===styles.display)continue;return"block"===styles.display}switch(tagName){case"ADDRESS":case"ARTICLE":case"ASIDE":case"BLOCKQUOTE":case"CENTER":case"DIV":case"DL":case"FIGURE":case"FOOTER":case"FORM":case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"HEADER":case"HR":case"MAIN":case"NAV":case"OL":case"P":case"PRE":case"SECTION":case"TABLE":case"UL":return!0}return!1;case Node.COMMENT_NODE:continue;default:return!1}}return!0}},createShadowSetterCallback:{value:function(){var macroParser=null;function getMacroContextShadowView(){for(var macro=macroParser||function(){if(!macroParser&&!(macroParser=Wikifier.Parser.get("macro")))throw new Error('cannot find "macro" parser');return macroParser}(),view=new Set,context=macro.context;null!==context;context=context.parent)context._shadows&&context._shadows.forEach((function(name){return view.add(name)}));return _toConsumableArray(view)}return function(code){var shadowStore={};return getMacroContextShadowView().forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey]})),function(){var shadowNames=Object.keys(shadowStore),valueCache=shadowNames.length>0?{}:null;try{return shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;store.hasOwnProperty(varKey)&&(valueCache[varKey]=store[varKey]),store[varKey]=shadowStore[varName]})),Scripting.evalJavaScript(code)}finally{shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey],valueCache.hasOwnProperty(varKey)?store[varKey]=valueCache[varKey]:delete store[varKey]}))}}}}()},parseSquareBracketedMarkup:{value:function(){var Item=Lexer.enumFromNames(["Error","DelimLTR","DelimRTL","InnerMeta","ImageMeta","LinkMeta","Link","RightMeta","Setter","Source","Text"]),Delim=Lexer.enumFromNames(["None","LTR","RTL"]);function slurpQuote(lexer,endQuote){loop:for(;;)switch(lexer.next()){case"\\":var ch=lexer.next();if(ch!==EOF&&"\n"!==ch)break;case EOF:case"\n":return EOF;case endQuote:break loop}return lexer.pos}function lexLeftMeta(lexer){if(!lexer.accept("["))return lexer.error(Item.Error,"malformed square-bracketed markup");if(lexer.accept("["))lexer.data.isLink=!0,lexer.emit(Item.LinkMeta);else{if(lexer.accept("<>"),!(lexer.accept("Ii")&&lexer.accept("Mm")&&lexer.accept("Gg")&&lexer.accept("[")))return lexer.error(Item.Error,"malformed square-bracketed markup");lexer.data.isLink=!1,lexer.emit(Item.ImageMeta)}return lexer.depth=2,lexCoreComponents}function lexCoreComponents(lexer){for(var what=lexer.data.isLink?"link":"image",delim=Delim.None;;)switch(lexer.next()){case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case'"':if(slurpQuote(lexer,'"')===EOF)return lexer.error(Item.Error,"unterminated double quoted string in ".concat(what," markup"));break;case"|":delim===Delim.None&&(delim=Delim.LTR,lexer.backup(),lexer.emit(Item.Text),lexer.forward(),lexer.emit(Item.DelimLTR));break;case"-":delim===Delim.None&&">"===lexer.peek()&&(delim=Delim.LTR,lexer.backup(),lexer.emit(Item.Text),lexer.forward(2),lexer.emit(Item.DelimLTR));break;case"<":delim===Delim.None&&"-"===lexer.peek()&&(delim=Delim.RTL,lexer.backup(),lexer.emit(lexer.data.isLink?Item.Link:Item.Source),lexer.forward(2),lexer.emit(Item.DelimRTL));break;case"[":++lexer.depth;break;case"]":if(--lexer.depth,1===lexer.depth)switch(lexer.peek()){case"[":return++lexer.depth,lexer.backup(),delim===Delim.RTL?lexer.emit(Item.Text):lexer.emit(lexer.data.isLink?Item.Link:Item.Source),lexer.forward(2),lexer.emit(Item.InnerMeta),lexer.data.isLink?lexSetter:lexImageLink;case"]":return--lexer.depth,lexer.backup(),delim===Delim.RTL?lexer.emit(Item.Text):lexer.emit(lexer.data.isLink?Item.Link:Item.Source),lexer.forward(2),lexer.emit(Item.RightMeta),null;default:return lexer.error(Item.Error,"malformed ".concat(what," markup"))}}}function lexImageLink(lexer){for(var what=lexer.data.isLink?"link":"image";;)switch(lexer.next()){case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case'"':if(slurpQuote(lexer,'"')===EOF)return lexer.error(Item.Error,"unterminated double quoted string in ".concat(what," markup link component"));break;case"[":++lexer.depth;break;case"]":if(--lexer.depth,1===lexer.depth)switch(lexer.peek()){case"[":return++lexer.depth,lexer.backup(),lexer.emit(Item.Link),lexer.forward(2),lexer.emit(Item.InnerMeta),lexSetter;case"]":return--lexer.depth,lexer.backup(),lexer.emit(Item.Link),lexer.forward(2),lexer.emit(Item.RightMeta),null;default:return lexer.error(Item.Error,"malformed ".concat(what," markup"))}}}function lexSetter(lexer){for(var what=lexer.data.isLink?"link":"image";;)switch(lexer.next()){case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case'"':if(slurpQuote(lexer,'"')===EOF)return lexer.error(Item.Error,"unterminated double quoted string in ".concat(what," markup setter component"));break;case"'":if(slurpQuote(lexer,"'")===EOF)return lexer.error(Item.Error,"unterminated single quoted string in ".concat(what," markup setter component"));break;case"[":++lexer.depth;break;case"]":if(--lexer.depth,1===lexer.depth)return"]"!==lexer.peek()?lexer.error(Item.Error,"malformed ".concat(what," markup")):(--lexer.depth,lexer.backup(),lexer.emit(Item.Setter),lexer.forward(2),lexer.emit(Item.RightMeta),null)}}return function(w){var lexer=new Lexer(w.source,lexLeftMeta);lexer.start=lexer.pos=w.matchStart;var markup={},items=lexer.run(),last=items.last();return last&&last.type===Item.Error?markup.error=last.message:items.forEach((function(item){var text=item.text.trim();switch(item.type){case Item.ImageMeta:markup.isImage=!0,"<"===text[1]?markup.align="left":">"===text[1]&&(markup.align="right");break;case Item.LinkMeta:markup.isLink=!0;break;case Item.Link:"~"===text[0]?(markup.forceInternal=!0,markup.link=text.slice(1)):markup.link=text;break;case Item.Setter:markup.setter=text;break;case Item.Source:markup.source=text;break;case Item.Text:markup.text=text}})),markup.pos=lexer.pos,markup}}()}}),Wikifier}();!function(){function _verbatimTagHandler(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);match&&match.index===w.matchStart&&(w.nextMatch=this.lookahead.lastIndex,jQuery(document.createDocumentFragment()).append(match[1]).appendTo(w.output))}Wikifier.Parser.add({name:"quoteByBlock",profiles:["block"],match:"^<<<\\n",terminator:"^<<<\\n",handler:function(w){Wikifier.helpers.hasBlockContext(w.output.childNodes)?w.subWikify(jQuery(document.createElement("blockquote")).appendTo(w.output).get(0),this.terminator):jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"quoteByLine",profiles:["block"],match:"^>+",lookahead:/^>+/gm,terminator:"\\n",handler:function(w){if(Wikifier.helpers.hasBlockContext(w.output.childNodes)){var matched,i,destStack=[w.output],curLevel=0,newLevel=w.matchLength;do{if(newLevel>curLevel)for(i=curLevel;i<newLevel;++i)destStack.push(jQuery(document.createElement("blockquote")).appendTo(destStack[destStack.length-1]).get(0));else if(newLevel<curLevel)for(i=curLevel;i>newLevel;--i)destStack.pop();curLevel=newLevel,w.subWikify(destStack[destStack.length-1],this.terminator),jQuery(document.createElement("br")).appendTo(destStack[destStack.length-1]),this.lookahead.lastIndex=w.nextMatch;var match=this.lookahead.exec(w.source);(matched=match&&match.index===w.nextMatch)&&(newLevel=match[0].length,w.nextMatch+=match[0].length)}while(matched)}else jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"macro",profiles:["core"],match:"<<",lookahead:new RegExp("<<(/?".concat(Patterns.macroName,")(?:\\s*)((?:(?:/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/)|(?://.*\\n)|(?:`(?:\\\\.|[^`\\\\])*`)|(?:\"(?:\\\\.|[^\"\\\\])*\")|(?:'(?:\\\\.|[^'\\\\])*')|(?:\\[(?:[<>]?[Ii][Mm][Gg])?\\[[^\\r\\n]*?\\]\\]+)|[^>]|(?:>(?!>)))*)>>"),"gm"),working:{source:"",name:"",arguments:"",index:0},context:null,handler:function(w){var matchStart=this.lookahead.lastIndex=w.matchStart;if(this.parseTag(w)){var macro,nextMatch=w.nextMatch,name=this.working.name,rawArgs=this.working.arguments;try{if(!(macro=Macro.get(name))){if(Macro.tags.has(name)){var tags=Macro.tags.get(name);return throwError(w.output,"child tag <<".concat(name,">> was found outside of a call to its parent macro").concat(1===tags.length?"":"s"," <<").concat(tags.join(">>, <<"),">>"),w.source.slice(matchStart,w.nextMatch))}return throwError(w.output,"macro <<".concat(name,">> does not exist"),w.source.slice(matchStart,w.nextMatch))}var payload=null;if(void 0!==macro.tags&&!(payload=this.parseBody(w,macro)))return w.nextMatch=nextMatch,throwError(w.output,"cannot find a closing tag for macro <<".concat(name,">>"),"".concat(w.source.slice(matchStart,w.nextMatch),"…"));if("function"!=typeof macro.handler)return throwError(w.output,"macro <<".concat(name,">> handler function ").concat(void 0===macro.handler?"does not exist":"is not a function"),w.source.slice(matchStart,w.nextMatch));var args=payload?payload[0].args:this.createArgs(rawArgs,this.skipArgs(macro,macro.name));if(void 0!==macro._MACRO_API){this.context=new MacroContext({macro:macro,name:name,args:args,payload:payload,source:w.source.slice(matchStart,w.nextMatch),parent:this.context,parser:w});try{macro.handler.call(this.context)}finally{this.context=this.context.parent}}else{var prevRawArgs=w._rawArgs;w._rawArgs=rawArgs;try{macro.handler(w.output,name,args,w,payload)}finally{w._rawArgs=prevRawArgs}}}catch(ex){return throwError(w.output,"cannot execute ".concat(macro&¯o.isWidget?"widget":"macro"," <<").concat(name,">>: ").concat(ex.message),w.source.slice(matchStart,w.nextMatch))}finally{this.working.source="",this.working.name="",this.working.arguments="",this.working.index=0}}else w.outputText(w.output,w.matchStart,w.nextMatch)},parseTag:function(w){var match=this.lookahead.exec(w.source);return!(!match||match.index!==w.matchStart||!match[1])&&(w.nextMatch=this.lookahead.lastIndex,this.working.source=w.source.slice(match.index,this.lookahead.lastIndex),this.working.name=match[1],this.working.arguments=match[2],this.working.index=match.index,!0)},parseBody:function(w,macro){for(var openTag=this.working.name,closeTag="/".concat(openTag),closeAlt="end".concat(openTag),bodyTags=!!Array.isArray(macro.tags)&¯o.tags,payload=[],end=-1,opened=1,curSource=this.working.source,curTag=this.working.name,curArgument=this.working.arguments,contentStart=w.nextMatch;-1!==(w.matchStart=w.source.indexOf(this.match,w.nextMatch));)if(this.parseTag(w)){var tagSource=this.working.source,tagName=this.working.name,tagArgs=this.working.arguments,tagBegin=this.working.index,tagEnd=w.nextMatch,hasArgs=""!==tagArgs.trim();switch(tagName){case openTag:++opened;break;case closeAlt:case closeTag:if(hasArgs)throw w.nextMatch=tagBegin+2+tagName.length,new Error('malformed closing tag: "'.concat(tagSource,'"'));--opened;break;default:if(hasArgs&&(tagName.startsWith("/")||tagName.startsWith("end"))){this.lookahead.lastIndex=w.nextMatch=tagBegin+2+tagName.length;continue}if(1===opened&&bodyTags)for(var i=0,iend=bodyTags.length;i<iend;++i)tagName===bodyTags[i]&&(payload.push({source:curSource,name:curTag,arguments:curArgument,args:this.createArgs(curArgument,this.skipArgs(macro,curTag)),contents:w.source.slice(contentStart,tagBegin)}),curSource=tagSource,curTag=tagName,curArgument=tagArgs,contentStart=tagEnd)}if(0===opened){payload.push({source:curSource,name:curTag,arguments:curArgument,args:this.createArgs(curArgument,this.skipArgs(macro,curTag)),contents:w.source.slice(contentStart,tagBegin)}),end=tagEnd;break}}else this.lookahead.lastIndex=w.nextMatch=w.matchStart+this.match.length;return-1!==end?(w.nextMatch=end,payload):null},createArgs:function(rawArgsString,skipArgs){var args=skipArgs?[]:this.parseArgs(rawArgsString);return Object.defineProperties(args,{raw:{value:rawArgsString},full:{value:Scripting.parse(rawArgsString)}}),args},skipArgs:function(macro,tagName){if(void 0!==macro.skipArgs){var sa=macro.skipArgs;return"boolean"==typeof sa&&sa||Array.isArray(sa)&&sa.includes(tagName)}return void 0!==macro.skipArg0&&(macro.skipArg0&¯o.name===tagName)},parseArgs:function(){var Item=Lexer.enumFromNames(["Error","Bareword","Expression","String","SquareBracket"]),spaceRe=new RegExp(Patterns.space),notSpaceRe=new RegExp(Patterns.notSpace),varTest=new RegExp("^".concat(Patterns.variable));function slurpQuote(lexer,endQuote){loop:for(;;)switch(lexer.next()){case"\\":var ch=lexer.next();if(ch!==EOF&&"\n"!==ch)break;case EOF:case"\n":return EOF;case endQuote:break loop}return lexer.pos}function lexSpace(lexer){var offset=lexer.source.slice(lexer.pos).search(notSpaceRe);if(offset===EOF)return null;switch(0!==offset&&(lexer.pos+=offset,lexer.ignore()),lexer.next()){case"`":return lexExpression;case'"':return lexDoubleQuote;case"'":return lexSingleQuote;case"[":return lexSquareBracket;default:return lexBareword}}function lexExpression(lexer){return slurpQuote(lexer,"`")===EOF?lexer.error(Item.Error,"unterminated backquote expression"):(lexer.emit(Item.Expression),lexSpace)}function lexDoubleQuote(lexer){return slurpQuote(lexer,'"')===EOF?lexer.error(Item.Error,"unterminated double quoted string"):(lexer.emit(Item.String),lexSpace)}function lexSingleQuote(lexer){return slurpQuote(lexer,"'")===EOF?lexer.error(Item.Error,"unterminated single quoted string"):(lexer.emit(Item.String),lexSpace)}function lexSquareBracket(lexer){var what;if(lexer.accept("<>IiMmGg")?(what="image",lexer.acceptRun("<>IiMmGg")):what="link",!lexer.accept("["))return lexer.error(Item.Error,"malformed ".concat(what," markup"));lexer.depth=2;loop:for(;;)switch(lexer.next()){case"\\":var ch=lexer.next();if(ch!==EOF&&"\n"!==ch)break;case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case"[":++lexer.depth;break;case"]":if(--lexer.depth,lexer.depth<0)return lexer.error(Item.Error,"unexpected right square bracket ']'");if(1===lexer.depth){if("]"===lexer.next()){--lexer.depth;break loop}lexer.backup()}}return lexer.emit(Item.SquareBracket),lexSpace}function lexBareword(lexer){var offset=lexer.source.slice(lexer.pos).search(spaceRe);return lexer.pos=offset===EOF?lexer.source.length:lexer.pos+offset,lexer.emit(Item.Bareword),offset===EOF?null:lexSpace}return function(rawArgsString){var lexer=new Lexer(rawArgsString,lexSpace),args=[];return lexer.run().forEach((function(item){var arg=item.text;switch(item.type){case Item.Error:throw new Error('unable to parse macro argument "'.concat(arg,'": ').concat(item.message));case Item.Bareword:if(varTest.test(arg))arg=State.getVar(arg);else if(/^(?:settings|setup)[.[]/.test(arg))try{arg=Scripting.evalTwineScript(arg)}catch(ex){throw new Error('unable to parse macro argument "'.concat(arg,'": ').concat(ex.message))}else if("null"===arg)arg=null;else if("undefined"===arg)arg=undefined;else if("true"===arg)arg=!0;else if("false"===arg)arg=!1;else if("NaN"===arg)arg=NaN;else{var argAsNum=Number(arg);Number.isNaN(argAsNum)||(arg=argAsNum)}break;case Item.Expression:if(""===(arg=arg.slice(1,-1).trim()))arg=undefined;else try{arg=Scripting.evalTwineScript("(".concat(arg,")"))}catch(ex){throw new Error('unable to parse macro argument expression "'.concat(arg,'": ').concat(ex.message))}break;case Item.String:try{arg=Scripting.evalJavaScript(arg)}catch(ex){throw new Error('unable to parse macro argument string "'.concat(arg,'": ').concat(ex.message))}break;case Item.SquareBracket:var markup=Wikifier.helpers.parseSquareBracketedMarkup({source:arg,matchStart:0});if(markup.hasOwnProperty("error"))throw new Error('unable to parse macro argument "'.concat(arg,'": ').concat(markup.error));if(markup.pos<arg.length)throw new Error('unable to parse macro argument "'.concat(arg,'": unexpected character(s) "').concat(arg.slice(markup.pos),'" (pos: ').concat(markup.pos,")"));markup.isLink?((arg={isLink:!0}).count=markup.hasOwnProperty("text")?2:1,arg.link=Wikifier.helpers.evalPassageId(markup.link),arg.text=markup.hasOwnProperty("text")?Wikifier.helpers.evalText(markup.text):arg.link,arg.external=!markup.forceInternal&&Wikifier.isExternalLink(arg.link),arg.setFn=markup.hasOwnProperty("setter")?Wikifier.helpers.createShadowSetterCallback(Scripting.parse(markup.setter)):null):markup.isImage&&(arg=function(source){var imgObj={source:source,isImage:!0};if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(imgObj.source=passage.text,imgObj.passage=passage.title)}return imgObj}(Wikifier.helpers.evalPassageId(markup.source)),markup.hasOwnProperty("align")&&(arg.align=markup.align),markup.hasOwnProperty("text")&&(arg.title=Wikifier.helpers.evalText(markup.text)),markup.hasOwnProperty("link")&&(arg.link=Wikifier.helpers.evalPassageId(markup.link),arg.external=!markup.forceInternal&&Wikifier.isExternalLink(arg.link)),arg.setFn=markup.hasOwnProperty("setter")?Wikifier.helpers.createShadowSetterCallback(Scripting.parse(markup.setter)):null)}args.push(arg)})),args}}()}),Wikifier.Parser.add({name:"link",profiles:["core"],match:"\\[\\[[^[]",handler:function(w){var markup=Wikifier.helpers.parseSquareBracketedMarkup(w);if(markup.hasOwnProperty("error"))w.outputText(w.output,w.matchStart,w.nextMatch);else{w.nextMatch=markup.pos;var link=Wikifier.helpers.evalPassageId(markup.link),text=markup.hasOwnProperty("text")?Wikifier.helpers.evalText(markup.text):link,setFn=markup.hasOwnProperty("setter")?Wikifier.helpers.createShadowSetterCallback(Scripting.parse(markup.setter)):null,output=(Config.debug?new DebugView(w.output,"link-markup","[[link]]",w.source.slice(w.matchStart,w.nextMatch)):w).output;markup.forceInternal||!Wikifier.isExternalLink(link)?Wikifier.createInternalLink(output,link,text,setFn):Wikifier.createExternalLink(output,link,text)}}}),Wikifier.Parser.add({name:"urlLink",profiles:["core"],match:Patterns.url,handler:function(w){w.outputText(Wikifier.createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch)}}),Wikifier.Parser.add({name:"image",profiles:["core"],match:"\\[[<>]?[Ii][Mm][Gg]\\[",handler:function(w){var markup=Wikifier.helpers.parseSquareBracketedMarkup(w);if(markup.hasOwnProperty("error"))w.outputText(w.output,w.matchStart,w.nextMatch);else{var debugView;w.nextMatch=markup.pos,Config.debug&&(debugView=new DebugView(w.output,"image-markup",markup.hasOwnProperty("link")?"[img[][link]]":"[img[]]",w.source.slice(w.matchStart,w.nextMatch))).modes({block:!0});var source,setFn=markup.hasOwnProperty("setter")?Wikifier.helpers.createShadowSetterCallback(Scripting.parse(markup.setter)):null,el=(Config.debug?debugView:w).output;if(markup.hasOwnProperty("link")){var link=Wikifier.helpers.evalPassageId(markup.link);(el=markup.forceInternal||!Wikifier.isExternalLink(link)?Wikifier.createInternalLink(el,link,null,setFn):Wikifier.createExternalLink(el,link)).classList.add("link-image")}if(el=jQuery(document.createElement("img")).appendTo(el).get(0),"data:"!==(source=Wikifier.helpers.evalPassageId(markup.source)).slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(el.setAttribute("data-passage",passage.title),source=passage.text.trim())}el.src=source,markup.hasOwnProperty("text")&&(el.title=Wikifier.helpers.evalText(markup.text)),markup.hasOwnProperty("align")&&(el.align=markup.align)}}}),Wikifier.Parser.add({name:"monospacedByBlock",profiles:["block"],match:"^\\{\\{\\{\\n",lookahead:/^\{\{\{\n((?:^[^\n]*\n)+?)(^\}\}\}$\n?)/gm,handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);if(match&&match.index===w.matchStart){var pre=jQuery(document.createElement("pre"));jQuery(document.createElement("code")).text(match[1]).appendTo(pre),pre.appendTo(w.output),w.nextMatch=this.lookahead.lastIndex}}}),Wikifier.Parser.add({name:"formatByChar",profiles:["core"],match:"''|//|__|\\^\\^|~~|==|\\{\\{\\{",handler:function(w){switch(w.matchText){case"''":w.subWikify(jQuery(document.createElement("strong")).appendTo(w.output).get(0),"''");break;case"//":w.subWikify(jQuery(document.createElement("em")).appendTo(w.output).get(0),"//");break;case"__":w.subWikify(jQuery(document.createElement("u")).appendTo(w.output).get(0),"__");break;case"^^":w.subWikify(jQuery(document.createElement("sup")).appendTo(w.output).get(0),"\\^\\^");break;case"~~":w.subWikify(jQuery(document.createElement("sub")).appendTo(w.output).get(0),"~~");break;case"==":w.subWikify(jQuery(document.createElement("s")).appendTo(w.output).get(0),"==");break;case"{{{":var lookahead=/\{\{\{((?:.|\n)*?)\}\}\}/gm;lookahead.lastIndex=w.matchStart;var match=lookahead.exec(w.source);match&&match.index===w.matchStart&&(jQuery(document.createElement("code")).text(match[1]).appendTo(w.output),w.nextMatch=lookahead.lastIndex)}}}),Wikifier.Parser.add({name:"customStyle",profiles:["core"],match:"@@",terminator:"@@",blockRe:/\s*\n/gm,handler:function(w){var css=Wikifier.helpers.inlineCss(w);this.blockRe.lastIndex=w.nextMatch;var blockMatch=this.blockRe.exec(w.source),blockLevel=blockMatch&&blockMatch.index===w.nextMatch,$el=jQuery(document.createElement(blockLevel?"div":"span")).appendTo(w.output);0===css.classes.length&&""===css.id&&0===Object.keys(css.styles).length?$el.addClass("marked"):(css.classes.forEach((function(className){return $el.addClass(className)})),""!==css.id&&$el.attr("id",css.id),$el.css(css.styles)),blockLevel?(w.nextMatch+=blockMatch[0].length,w.subWikify($el[0],"\\n?".concat(this.terminator))):w.subWikify($el[0],this.terminator)}}),Wikifier.Parser.add({name:"verbatimText",profiles:["core"],match:'"{3}|<[Nn][Oo][Ww][Ii][Kk][Ii]>',lookahead:/(?:"{3}((?:.|\n)*?)"{3})|(?:<[Nn][Oo][Ww][Ii][Kk][Ii]>((?:.|\n)*?)<\/[Nn][Oo][Ww][Ii][Kk][Ii]>)/gm,handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);match&&match.index===w.matchStart&&(w.nextMatch=this.lookahead.lastIndex,jQuery(document.createElement("span")).addClass("verbatim").text(match[1]||match[2]).appendTo(w.output))}}),Wikifier.Parser.add({name:"horizontalRule",profiles:["core"],match:"^----+$\\n?|<[Hh][Rr]\\s*/?>\\n?",handler:function(w){jQuery(document.createElement("hr")).appendTo(w.output)}}),Wikifier.Parser.add({name:"emdash",profiles:["core"],match:"--",handler:function(w){jQuery(document.createTextNode("—")).appendTo(w.output)}}),Wikifier.Parser.add({name:"doubleDollarSign",profiles:["core"],match:"\\${2}",handler:function(w){jQuery(document.createTextNode("$")).appendTo(w.output)}}),Wikifier.Parser.add({name:"nakedVariable",profiles:["core"],match:"".concat(Patterns.variable,"(?:(?:\\.").concat(Patterns.identifier,")|(?:\\[\\d+\\])|(?:\\[\"(?:\\\\.|[^\"\\\\])+\"\\])|(?:\\['(?:\\\\.|[^'\\\\])+'\\])|(?:\\[").concat(Patterns.variable,"\\]))*"),handler:function(w){var result=State.getVar(w.matchText);null==result?jQuery(document.createTextNode(w.matchText)).appendTo(w.output):new Wikifier((Config.debug?new DebugView(w.output,"variable",w.matchText,w.matchText):w).output,stringFrom(result))}}),Wikifier.Parser.add({name:"template",profiles:["core"],match:"\\?".concat(Patterns.templateName),handler:function(w){var name=w.matchText.slice(1),template=Template.get(name),result=null;switch(template instanceof Array&&(template=template.random()),_typeof(template)){case"function":try{result=stringFrom(template.call({name:name}))}catch(ex){return throwError(w.output,"cannot execute function template ?".concat(name,": ").concat(ex.message),w.source.slice(w.matchStart,w.nextMatch))}break;case"string":result=template}null===result?jQuery(document.createTextNode(w.matchText)).appendTo(w.output):new Wikifier((Config.debug?new DebugView(w.output,"template",w.matchText,w.matchText):w).output,result)}}),Wikifier.Parser.add({name:"heading",profiles:["block"],match:"^!{1,6}",terminator:"\\n",handler:function(w){Wikifier.helpers.hasBlockContext(w.output.childNodes)?w.subWikify(jQuery(document.createElement("h".concat(w.matchLength))).appendTo(w.output).get(0),this.terminator):jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"table",profiles:["block"],match:"^\\|(?:[^\\n]*)\\|(?:[fhck]?)$",lookahead:/^\|([^\n]*)\|([fhck]?)$/gm,rowTerminator:"\\|(?:[cfhk]?)$\\n?",cellPattern:"(?:\\|([^\\n\\|]*)\\|)|(\\|[cfhk]?$\\n?)",cellTerminator:"(?:\\u0020*)\\|",rowTypes:{c:"caption",f:"tfoot",h:"thead","":"tbody"},handler:function(w){if(Wikifier.helpers.hasBlockContext(w.output.childNodes)){var matched,table=jQuery(document.createElement("table")).appendTo(w.output).get(0),prevColumns=[],curRowType=null,$rowContainer=null,rowCount=0;w.nextMatch=w.matchStart;do{this.lookahead.lastIndex=w.nextMatch;var match=this.lookahead.exec(w.source);if(matched=match&&match.index===w.nextMatch){var nextRowType=match[2];"k"===nextRowType?(table.className=match[1],w.nextMatch+=match[0].length+1):(nextRowType!==curRowType&&(curRowType=nextRowType,$rowContainer=jQuery(document.createElement(this.rowTypes[nextRowType])).appendTo(table)),"c"===curRowType?($rowContainer.css("caption-side",0===rowCount?"top":"bottom"),w.nextMatch+=1,w.subWikify($rowContainer[0],this.rowTerminator)):this.rowHandler(w,jQuery(document.createElement("tr")).appendTo($rowContainer).get(0),prevColumns),++rowCount)}}while(matched)}else jQuery(w.output).append(document.createTextNode(w.matchText))},rowHandler:function(w,rowEl,prevColumns){var matched,_this12=this,cellRe=new RegExp(this.cellPattern,"gm"),col=0,curColCount=1;do{cellRe.lastIndex=w.nextMatch;var cellMatch=cellRe.exec(w.source);if(matched=cellMatch&&cellMatch.index===w.nextMatch){if("~"===cellMatch[1]){var last=prevColumns[col];last&&(++last.rowCount,last.$element.attr("rowspan",last.rowCount).css("vertical-align","middle")),w.nextMatch=cellMatch.index+cellMatch[0].length-1}else if(">"===cellMatch[1])++curColCount,w.nextMatch=cellMatch.index+cellMatch[0].length-1;else{if(cellMatch[2]){w.nextMatch=cellMatch.index+cellMatch[0].length;break}!function(){++w.nextMatch;for(var css=Wikifier.helpers.inlineCss(w),spaceLeft=!1,spaceRight=!1,$cell=void 0;" "===w.source.substr(w.nextMatch,1);)spaceLeft=!0,++w.nextMatch;"!"===w.source.substr(w.nextMatch,1)?($cell=jQuery(document.createElement("th")).appendTo(rowEl),++w.nextMatch):$cell=jQuery(document.createElement("td")).appendTo(rowEl),prevColumns[col]={rowCount:1,$element:$cell},curColCount>1&&($cell.attr("colspan",curColCount),curColCount=1),w.subWikify($cell[0],_this12.cellTerminator)," "===w.matchText.substr(w.matchText.length-2,1)&&(spaceRight=!0),css.classes.forEach((function(className){return $cell.addClass(className)})),""!==css.id&&$cell.attr("id",css.id),spaceLeft&&spaceRight?css.styles["text-align"]="center":spaceLeft?css.styles["text-align"]="right":spaceRight&&(css.styles["text-align"]="left"),$cell.css(css.styles),w.nextMatch=w.nextMatch-1}()}++col}}while(matched)}}),Wikifier.Parser.add({name:"list",profiles:["block"],match:"^(?:(?:\\*+)|(?:#+))",lookahead:/^(?:(\*+)|(#+))/gm,terminator:"\\n",handler:function(w){if(Wikifier.helpers.hasBlockContext(w.output.childNodes)){w.nextMatch=w.matchStart;var matched,i,destStack=[w.output],curType=null,curLevel=0;do{this.lookahead.lastIndex=w.nextMatch;var match=this.lookahead.exec(w.source);if(matched=match&&match.index===w.nextMatch){var newType=match[2]?"ol":"ul",newLevel=match[0].length;if(w.nextMatch+=match[0].length,newLevel>curLevel)for(i=curLevel;i<newLevel;++i)destStack.push(jQuery(document.createElement(newType)).appendTo(destStack[destStack.length-1]).get(0));else if(newLevel<curLevel)for(i=curLevel;i>newLevel;--i)destStack.pop();else newLevel===curLevel&&newType!==curType&&(destStack.pop(),destStack.push(jQuery(document.createElement(newType)).appendTo(destStack[destStack.length-1]).get(0)));curLevel=newLevel,curType=newType,w.subWikify(jQuery(document.createElement("li")).appendTo(destStack[destStack.length-1]).get(0),this.terminator)}}while(matched)}else jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"commentByBlock",profiles:["core"],match:"(?:/(?:%|\\*))|(?:\x3c!--)",lookahead:/(?:\/(%|\*)(?:(?:.|\n)*?)\1\/)|(?:<!--(?:(?:.|\n)*?)-->)/gm,handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);match&&match.index===w.matchStart&&(w.nextMatch=this.lookahead.lastIndex)}}),Wikifier.Parser.add({name:"lineContinuation",profiles:["core"],match:"\\\\".concat(Patterns.spaceNoTerminator,"*\\n|\\n").concat(Patterns.spaceNoTerminator,"*\\\\|\\n?\\\\").concat(Patterns.spaceNoTerminator,"*$|^").concat(Patterns.spaceNoTerminator,"*\\\\\\n?"),handler:function(w){w.nextMatch=w.matchStart+w.matchLength}}),Wikifier.Parser.add({name:"lineBreak",profiles:["core"],match:"\\n|<[Bb][Rr]\\s*/?>",handler:function(w){w.options.nobr||jQuery(document.createElement("br")).appendTo(w.output)}}),Wikifier.Parser.add({name:"htmlCharacterReference",profiles:["core"],match:"(?:(?:&#?[0-9A-Za-z]{2,8};|.)(?:&#?(?:x0*(?:3[0-6][0-9A-Fa-f]|1D[C-Fc-f][0-9A-Fa-f]|20[D-Fd-f][0-9A-Fa-f]|FE2[0-9A-Fa-f])|0*(?:76[89]|7[7-9][0-9]|8[0-7][0-9]|761[6-9]|76[2-7][0-9]|84[0-3][0-9]|844[0-7]|6505[6-9]|6506[0-9]|6507[0-1]));)+|&#?[0-9A-Za-z]{2,8};)",handler:function(w){jQuery(document.createDocumentFragment()).append(w.matchText).appendTo(w.output)}}),Wikifier.Parser.add({name:"xmlProlog",profiles:["core"],match:"<\\?[Xx][Mm][Ll][^>]*\\?>",handler:function(w){w.nextMatch=w.matchStart+w.matchLength}}),Wikifier.Parser.add({name:"verbatimHtml",profiles:["core"],match:"<[Hh][Tt][Mm][Ll]>",lookahead:/<[Hh][Tt][Mm][Ll]>((?:.|\n)*?)<\/[Hh][Tt][Mm][Ll]>/gm,handler:_verbatimTagHandler}),Wikifier.Parser.add({name:"verbatimScriptTag",profiles:["core"],match:"<[Ss][Cc][Rr][Ii][Pp][Tt][^>]*>",lookahead:/(<[Ss][Cc][Rr][Ii][Pp][Tt]*>(?:.|\n)*?<\/[Ss][Cc][Rr][Ii][Pp][Tt]>)/gm,handler:_verbatimTagHandler}),Wikifier.Parser.add({name:"styleTag",profiles:["core"],match:"<[Ss][Tt][Yy][Ll][Ee][^>]*>",lookahead:/(<[Ss][Tt][Yy][Ll][Ee]*>)((?:.|\n)*?)(<\/[Ss][Tt][Yy][Ll][Ee]>)/gm,imageMarkup:new RegExp(Patterns.cssImage,"g"),hasImageMarkup:new RegExp(Patterns.cssImage),handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);if(match&&match.index===w.matchStart){w.nextMatch=this.lookahead.lastIndex;var css=match[2];this.hasImageMarkup.test(css)&&(this.imageMarkup.lastIndex=0,css=css.replace(this.imageMarkup,(function(wikiImage){var markup=Wikifier.helpers.parseSquareBracketedMarkup({source:wikiImage,matchStart:0});if(markup.hasOwnProperty("error")||markup.pos<wikiImage.length)return wikiImage;var source=markup.source;if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(source=passage.text)}return'url("'.concat(source.replace(/"/g,"%22"),'")')}))),jQuery(document.createDocumentFragment()).append(match[1]+css+match[3]).appendTo(w.output)}}}),Wikifier.Parser.add({name:"svgTag",profiles:["core"],match:"<[Ss][Vv][Gg][^>]*>",lookahead:/<(\/?)[Ss][Vv][Gg][^>]*>/gm,namespace:"http://www.w3.org/2000/svg",handler:function(w){var _this13=this;this.lookahead.lastIndex=w.nextMatch;for(var match,depth=1;depth>0&&null!==(match=this.lookahead.exec(w.source));)depth+="/"===match[1]?-1:1;if(0===depth){w.nextMatch=this.lookahead.lastIndex;var svgTag=w.source.slice(w.matchStart,this.lookahead.lastIndex),$frag=jQuery(document.createDocumentFragment()).append(svgTag);$frag.find("a[data-passage],image[data-passage]").each((function(_,el){var tagName=el.tagName.toLowerCase();try{_this13.processAttributeDirectives(el)}catch(ex){return throwError(w.output,"svg|<".concat(tagName,">: ").concat(ex.message),"".concat(w.matchText,"…"))}el.hasAttribute("data-passage")&&_this13.processDataAttributes(el,tagName)})),$frag.appendTo(w.output)}},processAttributeDirectives:function(el){_toConsumableArray(el.attributes).forEach((function(_ref10){var name=_ref10.name,value=_ref10.value,evalShorthand="@"===name[0];if(evalShorthand||name.startsWith("sc-eval:")){var result,newName=name.slice(evalShorthand?1:8);if("data-setter"===newName)throw new Error('evaluation directive is not allowed on the data-setter attribute: "'.concat(name,'"'));try{result=Scripting.evalTwineScript(value)}catch(ex){throw new Error('bad evaluation from attribute directive "'.concat(name,'": ').concat(ex.message))}try{el.setAttribute(newName,result),el.removeAttribute(name)}catch(ex){throw new Error('cannot transform attribute directive "'.concat(name,'" into attribute "').concat(newName,'"'))}}}))},processDataAttributes:function(el,tagName){var passage=el.getAttribute("data-passage");if(null!=passage){var evaluated=Wikifier.helpers.evalPassageId(passage);if(evaluated!==passage&&(passage=evaluated,el.setAttribute("data-passage",evaluated)),""!==passage)if("image"===tagName)"data:"!==passage.slice(0,5)&&Story.has(passage)&&(passage=Story.get(passage)).tags.includes("Twine.image")&&el.setAttribute("href",passage.text.trim());else{var setFn,setter=el.getAttribute("data-setter");null!=setter&&""!==(setter=String(setter).trim())&&(setFn=Wikifier.helpers.createShadowSetterCallback(Scripting.parse(setter))),Story.has(passage)?(el.classList.add("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&el.classList.add("link-visited")):el.classList.add("link-broken"),jQuery(el).ariaClick({one:!0},(function(){"function"==typeof setFn&&setFn.call(this),Engine.play(passage)}))}}}}),Wikifier.Parser.add({name:"htmlTag",profiles:["core"],match:"<".concat(Patterns.htmlTagName,"(?:\\s+[^\\u0000-\\u001F\\u007F-\\u009F\\s\"'>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*?\"|'[^']*?'|[^\\s\"'=<>`]+))?)*\\s*\\/?>"),tagRe:new RegExp("^<(".concat(Patterns.htmlTagName,")")),mediaTags:["audio","img","source","track","video"],nobrTags:["audio","colgroup","datalist","dl","figure","meter","ol","optgroup","picture","progress","ruby","select","table","tbody","tfoot","thead","tr","ul","video"],voidTags:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],handler:function(w){var tagMatch=this.tagRe.exec(w.matchText),tag=tagMatch&&tagMatch[1],tagName=tag&&tag.toLowerCase();if(tagName){var terminator,terminatorMatch,isVoid=this.voidTags.includes(tagName)||w.matchText.endsWith("/>"),isNobr=this.nobrTags.includes(tagName);if(!isVoid){terminator="<\\/".concat(tagName,"\\s*>");var terminatorRe=new RegExp(terminator,"gim");terminatorRe.lastIndex=w.matchStart,terminatorMatch=terminatorRe.exec(w.source)}if(!isVoid&&!terminatorMatch)return throwError(w.output,"cannot find a closing tag for HTML <".concat(tag,">"),"".concat(w.matchText,"…"));var debugView,output=w.output,el=document.createElement(w.output.tagName);for(el.innerHTML=w.matchText;el.firstChild;)el=el.firstChild;try{this.processAttributeDirectives(el)}catch(ex){return throwError(w.output,"<".concat(tagName,">: ").concat(ex.message),"".concat(w.matchText,"…"))}if(el.hasAttribute("data-passage")&&(this.processDataAttributes(el,tagName),Config.debug&&((debugView=new DebugView(w.output,"html-".concat(tagName),tagName,w.matchText)).modes({block:"img"===tagName,nonvoid:terminatorMatch}),output=debugView.output)),terminatorMatch){try{Wikifier.Option.push({nobr:isNobr}),w.subWikify(el,terminator,{ignoreTerminatorCase:!0})}finally{Wikifier.Option.pop()}debugView&&jQuery(el).find(".debug.block").length>0&&debugView.modes({block:!0})}output.appendChild("track"===tagName?el.cloneNode(!0):el)}},processAttributeDirectives:function(el){_toConsumableArray(el.attributes).forEach((function(_ref11){var name=_ref11.name,value=_ref11.value,evalShorthand="@"===name[0];if(evalShorthand||name.startsWith("sc-eval:")){var result,newName=name.slice(evalShorthand?1:8);if("data-setter"===newName)throw new Error('evaluation directive is not allowed on the data-setter attribute: "'.concat(name,'"'));try{result=Scripting.evalTwineScript(value)}catch(ex){throw new Error('bad evaluation from attribute directive "'.concat(name,'": ').concat(ex.message))}try{el.setAttribute(newName,result),el.removeAttribute(name)}catch(ex){throw new Error('cannot transform attribute directive "'.concat(name,'" into attribute "').concat(newName,'"'))}}}))},processDataAttributes:function(el,tagName){var passage=el.getAttribute("data-passage");if(null!=passage){var evaluated=Wikifier.helpers.evalPassageId(passage);if(evaluated!==passage&&(passage=evaluated,el.setAttribute("data-passage",evaluated)),""!==passage)if(this.mediaTags.includes(tagName)){if("data:"!==passage.slice(0,5)&&Story.has(passage)){var parentName,twineTag;switch(passage=Story.get(passage),tagName){case"audio":case"video":twineTag="Twine.".concat(tagName);break;case"img":twineTag="Twine.image";break;case"track":twineTag="Twine.vtt";break;case"source":var $parent=$(el).closest("audio,picture,video");$parent.length&&(parentName=$parent.get(0).tagName.toLowerCase(),twineTag="Twine.".concat("picture"===parentName?"image":parentName))}passage.tags.includes(twineTag)&&(el["picture"===parentName?"srcset":"src"]=passage.text.trim())}}else{var setFn,setter=el.getAttribute("data-setter");null!=setter&&""!==(setter=String(setter).trim())&&(setFn=Wikifier.helpers.createShadowSetterCallback(Scripting.parse(setter))),Story.has(passage)?(el.classList.add("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&el.classList.add("link-visited")):el.classList.add("link-broken"),jQuery(el).ariaClick({one:!0},(function(){"function"==typeof setFn&&setFn.call(this),Engine.play(passage)}))}}}})}();var Template=(_templates=new Map,_validNameRe=new RegExp("^(?:".concat(Patterns.templateName,")$")),_validType=function(template){var templateType=_typeof(template);return"function"===templateType||"string"===templateType},Object.freeze(Object.defineProperties({},{add:{value:function(name,template){if(!(_validType(template)||template instanceof Array&&template.length>0&&template.every(_validType)))throw new TypeError("invalid template type (".concat(name,"); templates must be: functions, strings, or an array of either"));(name instanceof Array?name:[name]).forEach((function(name){if(!_validNameRe.test(name))throw new Error('invalid template name "'.concat(name,'"'));if(_templates.has(name))throw new Error("cannot clobber existing template ?".concat(name));_templates.set(name,template)}))}},delete:{value:function(name){(name instanceof Array?name:[name]).forEach((function(name){return _templates.delete(name)}))}},get:{value:function(name){return _templates.has(name)?_templates.get(name):null}},has:{value:function(name){return _templates.has(name)}},size:{get:function(){return _templates.size}}}))),_templates,_validNameRe,_validType,Macro=function(){var _macros={},_tags={},_validNameRe=new RegExp("^(?:".concat(Patterns.macroName,")$"));function macrosHas(name){return _macros.hasOwnProperty(name)}function tagsRegister(parent,bodyTags){if(!parent)throw new Error("no parent specified");for(var endTags=["/".concat(parent),"end".concat(parent)],allTags=[].concat(endTags,Array.isArray(bodyTags)?bodyTags:[]),i=0;i<allTags.length;++i){var tag=allTags[i];if(macrosHas(tag))throw new Error("cannot register tag for an existing macro");tagsHas(tag)?_tags[tag].includes(parent)||(_tags[tag].push(parent),_tags[tag].sort()):_tags[tag]=[parent]}}function tagsUnregister(parent){if(!parent)throw new Error("no parent specified");Object.keys(_tags).forEach((function(tag){var i=_tags[tag].indexOf(parent);-1!==i&&(1===_tags[tag].length?delete _tags[tag]:_tags[tag].splice(i,1))}))}function tagsHas(name){return _tags.hasOwnProperty(name)}return Object.freeze(Object.defineProperties({},{add:{value:function macrosAdd(name,def){if(Array.isArray(name))name.forEach((function(name){return macrosAdd(name,def)}));else{if(!_validNameRe.test(name))throw new Error('invalid macro name "'.concat(name,'"'));if(macrosHas(name))throw new Error("cannot clobber existing macro <<".concat(name,">>"));if(tagsHas(name))throw new Error("cannot clobber child tag <<".concat(name,">> of parent macro").concat(1===_tags[name].length?"":"s"," <<").concat(_tags[name].join(">>, <<"),">>"));try{if("object"===_typeof(def))_macros[name]=Object.assign(Object.create(null),def,{_MACRO_API:!0});else{if(!macrosHas(def))throw new Error("cannot create alias of nonexistent macro <<".concat(def,">>"));_macros[name]=Object.create(_macros[def],{_ALIAS_OF:{enumerable:!0,value:def}})}Object.defineProperty(_macros,name,{writable:!1})}catch(ex){throw"TypeError"===ex.name?new Error("cannot clobber protected macro <<".concat(name,">>")):new Error("unknown error when attempting to add macro <<".concat(name,">>: [").concat(ex.name,"] ").concat(ex.message))}if(void 0!==_macros[name].tags)if(null==_macros[name].tags)tagsRegister(name);else{if(!Array.isArray(_macros[name].tags))throw new Error('bad value for "tags" property of macro <<'.concat(name,">>"));tagsRegister(name,_macros[name].tags)}}}},delete:{value:function macrosDelete(name){if(Array.isArray(name))name.forEach((function(name){return macrosDelete(name)}));else if(macrosHas(name)){void 0!==_macros[name].tags&&tagsUnregister(name);try{Object.defineProperty(_macros,name,{writable:!0}),delete _macros[name]}catch(ex){throw new Error("unknown error removing macro <<".concat(name,">>: ").concat(ex.message))}}else if(tagsHas(name))throw new Error("cannot remove child tag <<".concat(name,">> of parent macro <<").concat(_tags[name],">>"))}},isEmpty:{value:function(){return 0===Object.keys(_macros).length}},has:{value:macrosHas},get:{value:function(name){var macro=null;return macrosHas(name)&&"function"==typeof _macros[name].handler?macro=_macros[name]:macros.hasOwnProperty(name)&&"function"==typeof macros[name].handler&&(macro=macros[name]),macro}},init:{value:function(){var handler=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"init";Object.keys(_macros).forEach((function(name){"function"==typeof _macros[name][handler]&&_macros[name][handler](name)})),Object.keys(macros).forEach((function(name){"function"==typeof macros[name][handler]&¯os[name][handler](name)}))}},tags:{value:Object.freeze(Object.defineProperties({},{register:{value:tagsRegister},unregister:{value:tagsUnregister},has:{value:tagsHas},get:{value:function(name){return tagsHas(name)?_tags[name]:null}}}))},evalStatements:{value:function(){return Scripting.evalJavaScript.apply(Scripting,arguments)}}}))}(),MacroContext=function(){var MacroContext=function(){function MacroContext(contextData){_classCallCheck(this,MacroContext);var context=Object.assign({parent:null,macro:null,name:"",displayName:"",args:null,payload:null,parser:null,source:""},contextData);if(null===context.macro||""===context.name||null===context.parser)throw new TypeError("context object missing required properties");Object.defineProperties(this,{self:{value:context.macro},name:{value:void 0===context.macro._ALIAS_OF?context.name:context.macro._ALIAS_OF},displayName:{value:context.name},args:{value:context.args},payload:{value:context.payload},source:{value:context.source},parent:{value:context.parent},parser:{value:context.parser},_output:{value:context.parser.output},_shadows:{writable:!0,value:null},_debugView:{writable:!0,value:null},_debugViewEnabled:{writable:!0,value:Config.debug}})}return _createClass(MacroContext,[{key:"output",get:function(){return this._debugViewEnabled?this.debugView.output:this._output}},{key:"shadows",get:function(){return _toConsumableArray(this._shadows)}},{key:"shadowView",get:function(){var view=new Set;return this.contextSelectAll((function(ctx){return ctx._shadows})).forEach((function(ctx){return ctx._shadows.forEach((function(name){return view.add(name)}))})),_toConsumableArray(view)}},{key:"debugView",get:function(){return this._debugViewEnabled?null!==this._debugView?this._debugView:this.createDebugView():null}},{key:"contextHas",value:function(filter){for(var context=this;null!==(context=context.parent);)if(filter(context))return!0;return!1}},{key:"contextSelect",value:function(filter){for(var context=this;null!==(context=context.parent);)if(filter(context))return context;return null}},{key:"contextSelectAll",value:function(filter){for(var result=[],context=this;null!==(context=context.parent);)filter(context)&&result.push(context);return result}},{key:"addShadow",value:function(){var _this14=this;this._shadows||(this._shadows=new Set);for(var varRe=new RegExp("^".concat(Patterns.variable,"$")),_len14=arguments.length,names=new Array(_len14),_key14=0;_key14<_len14;_key14++)names[_key14]=arguments[_key14];names.flat(1/0).forEach((function(name){if("string"!=typeof name)throw new TypeError("variable name must be a string; type: ".concat(_typeof(name)));if(!varRe.test(name))throw new Error('invalid variable name "'.concat(name,'"'));_this14._shadows.add(name)}))}},{key:"createShadowWrapper",value:function(callback,doneCallback,startCallback){var shadowStore,shadowContext=this;return"function"==typeof callback&&(shadowStore={},this.shadowView.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey]}))),function(){for(var _len15=arguments.length,args=new Array(_len15),_key15=0;_key15<_len15;_key15++)args[_key15]=arguments[_key15];if("function"==typeof startCallback&&startCallback.apply(this,args),"function"==typeof callback){var contextCache,shadowNames=Object.keys(shadowStore),valueCache=shadowNames.length>0?{}:null,macroParser=Wikifier.Parser.get("macro");try{shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;store.hasOwnProperty(varKey)&&(valueCache[varKey]=store[varKey]),store[varKey]=shadowStore[varName]})),contextCache=macroParser.context,macroParser.context=shadowContext,callback.apply(this,args)}finally{contextCache!==undefined&&(macroParser.context=contextCache),shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey],valueCache.hasOwnProperty(varKey)?store[varKey]=valueCache[varKey]:delete store[varKey]}))}}"function"==typeof doneCallback&&doneCallback.apply(this,args)}}},{key:"createDebugView",value:function(name,title){return this._debugView=new DebugView(this._output,"macro",name||this.displayName,title||this.source),null!==this.payload&&this.payload.length>0&&this._debugView.modes({nonvoid:!0}),this._debugViewEnabled=!0,this._debugView}},{key:"removeDebugView",value:function(){null!==this._debugView&&(this._debugView.remove(),this._debugView=null),this._debugViewEnabled=!1}},{key:"error",value:function(message,source){return throwError(this._output,"<<".concat(this.displayName,">>: ").concat(message),source||this.source)}}]),MacroContext}();return MacroContext}();!function(){if(Macro.add("capture",{skipArgs:!0,tags:null,tsVarRe:new RegExp("(".concat(Patterns.variable,")"),"g"),handler:function(){if(0===this.args.raw.length)return this.error("no story/temporary variable list specified");var valueCache={};try{for(var match,tsVarRe=this.self.tsVarRe;null!==(match=tsVarRe.exec(this.args.raw));){var varName=match[1],varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;store.hasOwnProperty(varKey)&&(valueCache[varKey]=store[varKey]),this.addShadow(varName)}new Wikifier(this.output,this.payload[0].contents)}finally{this.shadows.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;valueCache.hasOwnProperty(varKey)?store[varKey]=valueCache[varKey]:delete store[varKey]}))}}}),Macro.add("set",{skipArgs:!0,handler:function(){if(0===this.args.full.length)return this.error("no expression specified");try{Scripting.evalJavaScript(this.args.full)}catch(ex){return this.error("bad evaluation: ".concat("object"===_typeof(ex)?ex.message:ex))}Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("unset",{skipArgs:!0,jsVarRe:new RegExp("State\\.(variables|temporary)\\.(".concat(Patterns.identifier,")"),"g"),handler:function(){if(0===this.args.full.length)return this.error("no story/temporary variable list specified");for(var match,jsVarRe=this.self.jsVarRe;null!==(match=jsVarRe.exec(this.args.full));){var store=State[match[1]],name=match[2];store.hasOwnProperty(name)&&delete store[name]}Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("remember",{skipArgs:!0,jsVarRe:new RegExp("State\\.variables\\.(".concat(Patterns.identifier,")"),"g"),handler:function(){if(0===this.args.full.length)return this.error("no expression specified");try{Scripting.evalJavaScript(this.args.full)}catch(ex){return this.error("bad evaluation: ".concat("object"===_typeof(ex)?ex.message:ex))}for(var match,remember=storage.get("remember")||{},jsVarRe=this.self.jsVarRe;null!==(match=jsVarRe.exec(this.args.full));){var name=match[1];remember[name]=State.variables[name]}if(!storage.set("remember",remember))return this.error("unknown error, cannot remember: ".concat(this.args.raw));Config.debug&&this.debugView.modes({hidden:!0})},init:function(){var remember=storage.get("remember");remember&&Object.keys(remember).forEach((function(name){return State.variables[name]=remember[name]}))}}),Macro.add("forget",{skipArgs:!0,jsVarRe:new RegExp("State\\.variables\\.(".concat(Patterns.identifier,")"),"g"),handler:function(){if(0===this.args.full.length)return this.error("no story variable list specified");for(var match,remember=storage.get("remember"),jsVarRe=this.self.jsVarRe,needStore=!1;null!==(match=jsVarRe.exec(this.args.full));){var name=match[1];State.variables.hasOwnProperty(name)&&delete State.variables[name],remember&&remember.hasOwnProperty(name)&&(needStore=!0,delete remember[name])}if(needStore)if(0===Object.keys(remember).length){if(!storage.delete("remember"))return this.error("unknown error, cannot update remember store")}else if(!storage.set("remember",remember))return this.error("unknown error, cannot update remember store");Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("run","set"),Macro.add("script",{skipArgs:!0,tags:null,handler:function(){var output=document.createDocumentFragment();try{Scripting.evalJavaScript(this.payload[0].contents,output)}catch(ex){return this.error("bad evaluation: ".concat("object"===_typeof(ex)?ex.message:ex))}Config.debug&&this.createDebugView(),output.hasChildNodes()&&this.output.appendChild(output)}}),Macro.add("include",{handler:function(){return 0===this.args.length?this.error("no passage specified"):(passage="object"===_typeof(this.args[0])?this.args[0].link:this.args[0],Story.has(passage)?(Config.debug&&this.debugView.modes({block:!0}),passage=Story.get(passage),void(this.args[1]?jQuery(document.createElement(this.args[1])).addClass("".concat(passage.domId," macro-").concat(this.name)).attr("data-passage",passage.title).appendTo(this.output):jQuery(this.output)).wiki(passage.processText())):this.error('passage "'.concat(passage,'" does not exist')));var passage}}),Macro.add("nobr",{skipArgs:!0,tags:null,handler:function(){new Wikifier(this.output,this.payload[0].contents.replace(/^\n+|\n+$/g,"").replace(/\n+/g," "))}}),Macro.add(["print","=","-"],{skipArgs:!0,handler:function(){if(0===this.args.full.length)return this.error("no expression specified");try{var result=stringFrom(Scripting.evalJavaScript(this.args.full));null!==result&&new Wikifier(this.output,"-"===this.name?Util.escape(result):result)}catch(ex){return this.error("bad evaluation: ".concat("object"===_typeof(ex)?ex.message:ex))}}}),Macro.add("silently",{skipArgs:!0,tags:null,handler:function(){var frag=document.createDocumentFragment();if(new Wikifier(frag,this.payload[0].contents.trim()),Config.debug)this.debugView.modes({block:!0,hidden:!0}),this.output.appendChild(frag);else{var errList=_toConsumableArray(frag.querySelectorAll(".error")).map((function(errEl){return errEl.textContent}));if(errList.length>0)return this.error("error".concat(1===errList.length?"":"s"," within contents (").concat(errList.join("; "),")"))}}}),Macro.add("type",{isAsync:!0,tags:null,typeId:0,handler:function(){if(0===this.args.length)return this.error("no speed specified");var cursor,speed=Util.fromCssTime(this.args[0]);if(speed<0)return this.error("speed time value must be non-negative (received: ".concat(this.args[0],")"));for(var elClass="",elId="",elTag="div",skipKey=Config.macros.typeSkipKey,start=400,options=this.args.slice(1);options.length>0;){var option=options.shift();switch(option){case"class":if(0===options.length)return this.error("class option missing required class name(s)");if(""===(elClass=options.shift()))throw new Error('class option class name(s) must be non-empty (received: "")');break;case"element":if(0===options.length)return this.error("element option missing required element tag name");if(""===(elTag=options.shift()))throw new Error('element option tag name must be non-empty (received: "")');break;case"id":if(0===options.length)return this.error("id option missing required ID");if(""===(elId=options.shift()))throw new Error('id option ID must be non-empty (received: "")');break;case"keep":cursor="keep";break;case"none":cursor="none";break;case"skipkey":if(0===options.length)return this.error("skipkey option missing required key value");if(""===(skipKey=options.shift()))throw new Error('skipkey option key value must be non-empty (received: "")');break;case"start":if(0===options.length)return this.error("start option missing required time value");var value=options.shift();if((start=Util.fromCssTime(value))<0)throw new Error("start option time value must be non-negative (received: ".concat(value,")"));break;default:return this.error("unknown option: ".concat(option))}}var contents=this.payload[0].contents;if(""!==contents.trim()){Config.debug&&this.debugView.modes({block:!0});var className="macro-".concat(this.name),namespace=".".concat(className),$target=jQuery(document.createElement(elTag)).addClass("".concat(className," ").concat(className,"-target")).appendTo(this.output);TempState.macroTypeQueue||(TempState.macroTypeQueue=[],$(document).off(namespace).one(":passageinit".concat(namespace),(function(){return $(document).off(namespace)})));var startTyping=0===TempState.macroTypeQueue.length,selfId=++this.self.typeId;TempState.macroTypeQueue.push({id:selfId,handler:function(){var $wrapper=jQuery(document.createElement(elTag)).addClass(className);elId&&$wrapper.attr("id",elId),elClass&&$wrapper.addClass(elClass),new Wikifier($wrapper,contents);var passage=State.passage,turn=State.turns;if(!Config.macros.typeVisitedPassages&&State.passages.slice(0,-1).some((function(title){return title===passage}))||$wrapper.find(".error").length>0)return $target.replaceWith($wrapper),TempState.macroTypeQueue.shift(),void(TempState.macroTypeQueue.length>0&&TempState.macroTypeQueue.first().handler());var typer=new NodeTyper({targetNode:$wrapper.get(0),classNames:"none"===cursor?null:"".concat(className,"-cursor")});$target.replaceWith($wrapper);var keydownAndNS="keydown".concat(namespace),typingStopAndNS="".concat(":typingstop").concat(namespace);$(document).off(keydownAndNS).on(keydownAndNS,(function(ev){Util.scrubEventKey(ev.key)!==skipKey||ev.target!==document.body&&ev.target!==document.documentElement||(ev.preventDefault(),$(document).off(keydownAndNS),typer.finish())})).one(typingStopAndNS,(function(){TempState.macroTypeQueue&&(0===TempState.macroTypeQueue.length?jQuery.event.trigger(":typingcomplete"):TempState.macroTypeQueue.first().handler())}));var typeNode=function(){var typeNodeMember=function(typeIntervalId){State.passage===passage&&State.turns===turn&&typer.type()||(typeIntervalId&&clearInterval(typeIntervalId),TempState.macroTypeQueue&&TempState.macroTypeQueue.length>0&&TempState.macroTypeQueue.first().id===selfId&&TempState.macroTypeQueue.shift(),$wrapper.trigger(":typingstop"),$wrapper.addClass("".concat(className,"-done")),"keep"===cursor&&$wrapper.addClass("".concat(className,"-cursor")))};$wrapper.trigger(":typingstart"),typeNodeMember();var typeNodeMemberId=setInterval((function(){return typeNodeMember(typeNodeMemberId)}),speed)};start?setTimeout(typeNode,start):typeNode()}}),startTyping&&(Engine.isPlaying()?$(document).one(":passageend".concat(namespace),(function(){return TempState.macroTypeQueue.first().handler()})):TempState.macroTypeQueue.first().handler())}}}),Macro.add("display","include"),Macro.add("if",{skipArgs:!0,tags:["elseif","else"],elseifWsRe:/^\s*if\b/i,ifAssignRe:/[^!=&^|<>*/%+-]=[^=>]/,handler:function(){var i;try{var len=this.payload.length,elseifWsRe=this.self.elseifWsRe,ifAssignRe=this.self.ifAssignRe;for(i=0;i<len;++i)if("else"===this.payload[i].name){if(this.payload[i].args.raw.length>0)return elseifWsRe.test(this.payload[i].args.raw)?this.error('whitespace is not allowed between the "else" and "if" in <<elseif>> clause'.concat(i>0?" (#"+i+")":"")):this.error("<<else>> does not accept a conditional expression (perhaps you meant to use <<elseif>>), invalid: ".concat(this.payload[i].args.raw));if(i+1!==len)return this.error("<<else>> must be the final clause")}else{if(0===this.payload[i].args.full.length)return this.error("no conditional expression specified for <<".concat(this.payload[i].name,">> clause").concat(i>0?" (#"+i+")":""));if(Config.macros.ifAssignmentError&&ifAssignRe.test(this.payload[i].args.full))return this.error("assignment operator found within <<".concat(this.payload[i].name,">> clause").concat(i>0?" (#"+i+")":""," (perhaps you meant to use an equality operator: ==, ===, eq, is), invalid: ").concat(this.payload[i].args.raw))}var evalJavaScript=Scripting.evalJavaScript,success=!1;for(i=0;i<len;++i){if(Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1}),"else"===this.payload[i].name||evalJavaScript(this.payload[i].args.full)){success=!0,new Wikifier(this.output,this.payload[i].contents);break}Config.debug&&this.debugView.modes({hidden:!0,invalid:!0})}if(Config.debug){for(++i;i<len;++i)this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0,invalid:!0});this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!success,invalid:!success})}}catch(ex){return this.error("bad conditional expression in <<".concat(0===i?"if":"elseif",">> clause").concat(i>0?" (#"+i+")":"",": ").concat("object"===_typeof(ex)?ex.message:ex))}}}),Macro.add("switch",{skipArgs:["switch"],tags:["case","default"],handler:function(){if(0===this.args.full.length)return this.error("no expression specified");var i,result,len=this.payload.length;if(1===len)return this.error("no cases specified");for(i=1;i<len;++i)if("default"===this.payload[i].name){if(this.payload[i].args.length>0)return this.error("<<default>> does not accept values, invalid: ".concat(this.payload[i].args.raw));if(i+1!==len)return this.error("<<default>> must be the final case")}else if(0===this.payload[i].args.length)return this.error("no value(s) specified for <<".concat(this.payload[i].name,">> (#").concat(i,")"));try{result=Scripting.evalJavaScript(this.args.full)}catch(ex){return this.error("bad evaluation: ".concat("object"===_typeof(ex)?ex.message:ex))}var debugView=this.debugView,success=!1;for(Config.debug&&debugView.modes({nonvoid:!1,hidden:!0}),i=1;i<len;++i){if(Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1}),"default"===this.payload[i].name||this.payload[i].args.some((function(val){return val===result}))){success=!0,new Wikifier(this.output,this.payload[i].contents);break}Config.debug&&this.debugView.modes({hidden:!0,invalid:!0})}if(Config.debug){for(++i;i<len;++i)this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0,invalid:!0});debugView.modes({nonvoid:!1,hidden:!0,invalid:!success}),this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!0,invalid:!success})}}}),Macro.add("for",{skipArgs:!0,tags:null,hasRangeRe:new RegExp("^\\S".concat(Patterns.anyChar,"*?\\s+range\\s+\\S").concat(Patterns.anyChar,"*?$")),rangeRe:new RegExp("^(?:State\\.(variables|temporary)\\.(".concat(Patterns.identifier,")\\s*,\\s*)?State\\.(variables|temporary)\\.(").concat(Patterns.identifier,")\\s+range\\s+(\\S").concat(Patterns.anyChar,"*?)$")),threePartRe:/^([^;]*?)\s*;\s*([^;]*?)\s*;\s*([^;]*?)$/,forInRe:/^\S+\s+in\s+\S+/i,forOfRe:/^\S+\s+of\s+\S+/i,handler:function(){var argsStr=this.args.full.trim(),payload=this.payload[0].contents.replace(/\n$/,"");if(0===argsStr.length)this.self.handleFor.call(this,payload,null,!0,null);else if(this.self.hasRangeRe.test(argsStr)){var parts=argsStr.match(this.self.rangeRe);if(null===parts)return this.error("invalid range form syntax, format: [index ,] value range collection");this.self.handleForRange.call(this,payload,{type:parts[1],name:parts[2]},{type:parts[3],name:parts[4]},parts[5])}else{var init,condition,post;if(-1===argsStr.indexOf(";")){if(this.self.forInRe.test(argsStr))return this.error("invalid syntax, for…in is not supported; see: for…range");if(this.self.forOfRe.test(argsStr))return this.error("invalid syntax, for…of is not supported; see: for…range");condition=argsStr}else{var _parts=argsStr.match(this.self.threePartRe);if(null===_parts)return this.error("invalid 3-part conditional form syntax, format: [init] ; [condition] ; [post]");init=_parts[1],condition=_parts[2].trim(),post=_parts[3],0===condition.length&&(condition=!0)}this.self.handleFor.call(this,payload,init,condition,post)}},handleFor:function(payload,init,condition,post){var evalJavaScript=Scripting.evalJavaScript,first=!0,safety=Config.macros.maxLoopIterations;Config.debug&&this.debugView.modes({block:!0});try{if(TempState.break=null,init)try{evalJavaScript(init)}catch(ex){return this.error("bad init expression: ".concat("object"===_typeof(ex)?ex.message:ex))}for(;evalJavaScript(condition);){if(--safety<0)return this.error("exceeded configured maximum loop iterations (".concat(Config.macros.maxLoopIterations,")"));if(new Wikifier(this.output,first?payload.replace(/^\n/,""):payload),first&&(first=!1),null!=TempState.break)if(1===TempState.break)TempState.break=null;else if(2===TempState.break){TempState.break=null;break}if(post)try{evalJavaScript(post)}catch(ex){return this.error("bad post expression: ".concat("object"===_typeof(ex)?ex.message:ex))}}}catch(ex){return this.error("bad conditional expression: ".concat("object"===_typeof(ex)?ex.message:ex))}finally{TempState.break=null}},handleForRange:function(payload,indexVar,valueVar,rangeExp){var rangeList,first=!0;try{rangeList=this.self.toRangeList(rangeExp)}catch(ex){return this.error(ex.message)}Config.debug&&this.debugView.modes({block:!0});try{TempState.break=null;for(var i=0;i<rangeList.length;++i)if(indexVar.name&&(State[indexVar.type][indexVar.name]=rangeList[i][0]),State[valueVar.type][valueVar.name]=rangeList[i][1],new Wikifier(this.output,first?payload.replace(/^\n/,""):payload),first&&(first=!1),null!=TempState.break)if(1===TempState.break)TempState.break=null;else if(2===TempState.break){TempState.break=null;break}}catch(ex){return this.error("object"===_typeof(ex)?ex.message:ex)}finally{TempState.break=null}},toRangeList:function(rangeExp){var value,list,evalJavaScript=Scripting.evalJavaScript;try{value=evalJavaScript("{"===rangeExp[0]?"(".concat(rangeExp,")"):rangeExp)}catch(ex){if("object"!==_typeof(ex))throw new Error("bad range expression: ".concat(ex));throw ex.message="bad range expression: ".concat(ex.message),ex}switch(_typeof(value)){case"string":list=[];for(var i=0;i<value.length;){var obj=Util.charAndPosAt(value,i);list.push([i,obj.char]),i=1+obj.end}break;case"object":if(Array.isArray(value))list=value.map((function(val,i){return[i,val]}));else if(value instanceof Set)list=_toConsumableArray(value).map((function(val,i){return[i,val]}));else if(value instanceof Map)list=_toConsumableArray(value.entries());else{if("Object"!==Util.toStringTag(value))throw new Error("unsupported range expression type: ".concat(Util.toStringTag(value)));list=Object.keys(value).map((function(key){return[key,value[key]]}))}break;default:throw new Error("unsupported range expression type: ".concat(_typeof(value)))}return list}}),Macro.add(["break","continue"],{skipArgs:!0,handler:function(){if(!this.contextHas((function(ctx){return"for"===ctx.name})))return this.error("must only be used in conjunction with its parent macro <<for>>");TempState.break="continue"===this.name?1:2,Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add(["button","link"],{isAsync:!0,tags:null,handler:function(){var _this15=this;if(0===this.args.length)return this.error("no ".concat("button"===this.name?"button":"link"," text specified"));var passage,$link=jQuery(document.createElement("button"===this.name?"button":"a"));if("object"===_typeof(this.args[0]))if(this.args[0].isImage){var $image=jQuery(document.createElement("img")).attr("src",this.args[0].source).appendTo($link);$link.addClass("link-image"),this.args[0].hasOwnProperty("passage")&&$image.attr("data-passage",this.args[0].passage),this.args[0].hasOwnProperty("title")&&$image.attr("title",this.args[0].title),this.args[0].hasOwnProperty("align")&&$image.attr("align",this.args[0].align),passage=this.args[0].link}else $link.append(document.createTextNode(this.args[0].text)),passage=this.args[0].link;else $link.wikiWithOptions({profile:"core"},this.args[0]),passage=this.args.length>1?this.args[1]:undefined;null!=passage?($link.attr("data-passage",passage),Story.has(passage)?($link.addClass("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&$link.addClass("link-visited")):$link.addClass("link-broken")):$link.addClass("link-internal"),$link.addClass("macro-".concat(this.name)).ariaClick({namespace:".macros",role:null!=passage?"link":"button",one:null!=passage},this.createShadowWrapper(""!==this.payload[0].contents?function(){return Wikifier.wikifyEval(_this15.payload[0].contents.trim())}:null,null!=passage?function(){return Engine.play(passage)}:null)).appendTo(this.output)}}),Macro.add("checkbox",{isAsync:!0,handler:function(){if(this.args.length<3){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("unchecked value"),this.args.length<3&&errors.push("checked value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));var varId=Util.slugify(varName),uncheckValue=this.args[1],checkValue=this.args[2],el=document.createElement("input");switch(jQuery(el).attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),type:"checkbox",tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.createShadowWrapper((function(){State.setVar(varName,this.checked?checkValue:uncheckValue)}))).appendTo(this.output),this.args[3]){case"autocheck":State.getVar(varName)===checkValue?el.checked=!0:State.setVar(varName,uncheckValue);break;case"checked":el.checked=!0,State.setVar(varName,checkValue);break;default:State.setVar(varName,uncheckValue)}}}),Macro.add(["cycle","listbox"],{isAsync:!0,skipArgs:["optionsfrom"],tags:["option","optionsfrom"],handler:function(){var _this16=this;if(0===this.args.length)return this.error("no variable name specified");if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));var varId=Util.slugify(varName),len=this.payload.length;if(1===len)return this.error("no options specified");for(var config={autoselect:!1,once:!1},i=1;i<this.args.length;++i){var arg=this.args[i];switch(arg){case"once":config.once=!0;break;case"autoselect":config.autoselect=!0;break;default:return this.error("unknown argument: ".concat(arg))}}for(var options=[],tagCount={option:0,optionsfrom:0},selectedIdx=-1,_i5=1;_i5<len;++_i5){var payload=this.payload[_i5];if("option"===payload.name){if(++tagCount.option,0===payload.args.length)return this.error("no arguments specified for <<".concat(payload.name,">> (#").concat(tagCount.option,")"));var option={label:String(payload.args[0])},isSelected=!1;switch(payload.args.length){case 1:option.value=payload.args[0];break;case 2:"selected"===payload.args[1]?(option.value=payload.args[0],isSelected=!0):option.value=payload.args[1];break;default:option.value=payload.args[1],"selected"===payload.args[2]&&(isSelected=!0)}if(options.push(option),isSelected){if(config.autoselect)return this.error("cannot specify both the autoselect and selected keywords");if(-1!==selectedIdx)return this.error("multiple selected keywords specified for <<".concat(payload.name,">> (#").concat(selectedIdx+1," & #").concat(tagCount.option,")"));selectedIdx=options.length-1}}else{var _ret=function(){if(++tagCount.optionsfrom,0===payload.args.full.length)return{v:_this16.error("no expression specified for <<".concat(payload.name,">> (#").concat(tagCount.optionsfrom,")"))};var result=void 0;try{var exp=payload.args.full;result=Scripting.evalJavaScript("{"===exp[0]?"(".concat(exp,")"):exp)}catch(ex){return{v:_this16.error("bad evaluation: ".concat("object"===_typeof(ex)?ex.message:ex))}}if("object"!==_typeof(result)||null===result)return{v:_this16.error("expression must yield a supported collection or generic object (type: ".concat(null===result?"null":_typeof(result),")"))};if(result instanceof Array||result instanceof Set)result.forEach((function(val){return options.push({label:String(val),value:val})}));else if(result instanceof Map)result.forEach((function(val,key){return options.push({label:String(key),value:val})}));else{var oType=Util.toStringTag(result);if("Object"!==oType)return{v:_this16.error("expression must yield a supported collection or generic object (object type: ".concat(oType,")"))};Object.keys(result).forEach((function(key){return options.push({label:key,value:result[key]})}))}}();if("object"===_typeof(_ret))return _ret.v}}if(-1===selectedIdx)if(config.autoselect){var sameValueZero=Util.sameValueZero,curValue=State.getVar(varName),curValueIdx=options.findIndex((function(opt){return sameValueZero(opt.value,curValue)}));selectedIdx=-1===curValueIdx?0:curValueIdx}else selectedIdx=0;if("cycle"===this.name){var lastIdx=options.length-1;if(config.once&&selectedIdx===lastIdx)jQuery(this.output).wikiWithOptions({profile:"core"},options[selectedIdx].label);else{var cycleIdx=selectedIdx;jQuery(document.createElement("a")).wikiWithOptions({profile:"core"},options[selectedIdx].label).attr("id","".concat(this.name,"-").concat(varId)).addClass("macro-".concat(this.name)).ariaClick({namespace:".macros",role:"button"},this.createShadowWrapper((function(){var $this=$(this);cycleIdx=(cycleIdx+1)%options.length,State.setVar(varName,options[cycleIdx].value),$this.empty().wikiWithOptions({profile:"core"},options[cycleIdx].label),config.once&&cycleIdx===lastIdx&&$this.off().contents().unwrap()}))).appendTo(this.output)}}else{var $select=jQuery(document.createElement("select"));options.forEach((function(opt,i){jQuery(document.createElement("option")).val(i).text(opt.label).appendTo($select)})),$select.attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),tabindex:0}).addClass("macro-".concat(this.name)).val(selectedIdx).on("change.macros",this.createShadowWrapper((function(){State.setVar(varName,options[Number(this.value)].value)}))).appendTo(this.output)}State.setVar(varName,options[selectedIdx].value)}}),Macro.add(["linkappend","linkprepend","linkreplace"],{isAsync:!0,tags:null,t8nRe:/^(?:transition|t8n)$/,handler:function(){var _this17=this;if(0===this.args.length)return this.error("no link text specified");var $link=jQuery(document.createElement("a")),$insert=jQuery(document.createElement("span")),transition=this.args.length>1&&this.self.t8nRe.test(this.args[1]);$link.wikiWithOptions({profile:"core"},this.args[0]).addClass("link-internal macro-".concat(this.name)).ariaClick({namespace:".macros",one:!0},this.createShadowWrapper((function(){if("linkreplace"===_this17.name?$link.remove():$link.wrap('<span class="macro-'.concat(_this17.name,'"></span>')).replaceWith((function(){return $link.html()})),""!==_this17.payload[0].contents){var frag=document.createDocumentFragment();new Wikifier(frag,_this17.payload[0].contents),$insert.append(frag)}transition&&setTimeout((function(){return $insert.removeClass("macro-".concat(_this17.name,"-in"))}),Engine.minDomActionDelay)}))).appendTo(this.output),$insert.addClass("macro-".concat(this.name,"-insert")),transition&&$insert.addClass("macro-".concat(this.name,"-in")),"linkprepend"===this.name?$insert.insertBefore($link):$insert.insertAfter($link)}}),Macro.add(["numberbox","textbox"],{isAsync:!0,handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("default value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));Config.debug&&this.debugView.modes({block:!0});var asNumber="numberbox"===this.name,defaultValue=asNumber?Number(this.args[1]):this.args[1];if(asNumber&&Number.isNaN(defaultValue))return this.error('default value "'.concat(this.args[1],'" is neither a number nor can it be parsed into a number'));var passage,varId=Util.slugify(varName),el=document.createElement("input"),autofocus=!1;this.args.length>3?(passage=this.args[2],autofocus="autofocus"===this.args[3]):this.args.length>2&&("autofocus"===this.args[2]?autofocus=!0:passage=this.args[2]),"object"===_typeof(passage)&&(passage=passage.link),jQuery(el).attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),type:asNumber?"number":"text",inputmode:asNumber?"decimal":"text",tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.createShadowWrapper((function(){State.setVar(varName,asNumber?Number(this.value):this.value)}))).on("keypress.macros",this.createShadowWrapper((function(ev){13===ev.which&&(ev.preventDefault(),State.setVar(varName,asNumber?Number(this.value):this.value),null!=passage&&Engine.play(passage))}))).appendTo(this.output),asNumber&&(el.step="any"),State.setVar(varName,defaultValue),el.value=defaultValue,autofocus&&(el.setAttribute("autofocus","autofocus"),postdisplay["#autofocus:".concat(el.id)]=function(task){delete postdisplay[task],setTimeout((function(){return el.focus()}),Engine.minDomActionDelay)})}}),Macro.add("radiobutton",{isAsync:!0,handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("checked value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));var varId=Util.slugify(varName),checkValue=this.args[1],el=document.createElement("input");switch(TempState.hasOwnProperty(this.name)||(TempState[this.name]={}),TempState[this.name].hasOwnProperty(varId)||(TempState[this.name][varId]=0),jQuery(el).attr({id:"".concat(this.name,"-").concat(varId,"-").concat(TempState[this.name][varId]++),name:"".concat(this.name,"-").concat(varId),type:"radio",tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.createShadowWrapper((function(){this.checked&&State.setVar(varName,checkValue)}))).appendTo(this.output),this.args[2]){case"autocheck":State.getVar(varName)===checkValue&&(el.checked=!0);break;case"checked":el.checked=!0,State.setVar(varName,checkValue)}}}),Macro.add("textarea",{isAsync:!0,handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("default value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));Config.debug&&this.debugView.modes({block:!0});var varId=Util.slugify(varName),defaultValue=this.args[1],autofocus="autofocus"===this.args[2],el=document.createElement("textarea");jQuery(el).attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),rows:4,tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.createShadowWrapper((function(){State.setVar(varName,this.value)}))).appendTo(this.output),State.setVar(varName,defaultValue),el.textContent=defaultValue,autofocus&&(el.setAttribute("autofocus","autofocus"),postdisplay["#autofocus:".concat(el.id)]=function(task){delete postdisplay[task],setTimeout((function(){return el.focus()}),Engine.minDomActionDelay)})}}),Macro.add("click","link"),Macro.add("actions",{handler:function(){for(var $list=jQuery(document.createElement("ul")).addClass(this.name).appendTo(this.output),i=0;i<this.args.length;++i){var passage=void 0,text=void 0,$image=void 0,setFn=void 0;if("object"===_typeof(this.args[i])?this.args[i].isImage?($image=jQuery(document.createElement("img")).attr("src",this.args[i].source),this.args[i].hasOwnProperty("passage")&&$image.attr("data-passage",this.args[i].passage),this.args[i].hasOwnProperty("title")&&$image.attr("title",this.args[i].title),this.args[i].hasOwnProperty("align")&&$image.attr("align",this.args[i].align),passage=this.args[i].link,setFn=this.args[i].setFn):(text=this.args[i].text,passage=this.args[i].link,setFn=this.args[i].setFn):text=passage=this.args[i],!(State.variables.hasOwnProperty("#actions")&&State.variables["#actions"].hasOwnProperty(passage)&&State.variables["#actions"][passage])){var $link=jQuery(Wikifier.createInternalLink(jQuery(document.createElement("li")).appendTo($list),passage,null,function(passage,fn){return function(){State.variables.hasOwnProperty("#actions")||(State.variables["#actions"]={}),State.variables["#actions"][passage]=!0,"function"==typeof fn&&fn()}}(passage,setFn))).addClass("macro-".concat(this.name)).append($image||document.createTextNode(text));$image&&$link.addClass("link-image")}}}}),Macro.add(["back","return"],{handler:function(){if(this.args.length>1)return this.error("too many arguments specified, check the documentation for details");var passage,text,$image,$link,momentIndex=-1;if(1===this.args.length&&("object"===_typeof(this.args[0])?this.args[0].isImage?($image=jQuery(document.createElement("img")).attr("src",this.args[0].source),this.args[0].hasOwnProperty("passage")&&$image.attr("data-passage",this.args[0].passage),this.args[0].hasOwnProperty("title")&&$image.attr("title",this.args[0].title),this.args[0].hasOwnProperty("align")&&$image.attr("align",this.args[0].align),this.args[0].hasOwnProperty("link")&&(passage=this.args[0].link)):(1===this.args[0].count||(text=this.args[0].text),passage=this.args[0].link):1===this.args.length&&(text=this.args[0])),null==passage){for(var i=State.length-2;i>=0;--i)if(State.history[i].title!==State.passage){momentIndex=i,passage=State.history[i].title;break}if(null==passage&&"return"===this.name)for(var _i6=State.expired.length-1;_i6>=0;--_i6)if(State.expired[_i6]!==State.passage){passage=State.expired[_i6];break}}else{if(!Story.has(passage))return this.error('passage "'.concat(passage,'" does not exist'));if("back"===this.name){for(var _i7=State.length-2;_i7>=0;--_i7)if(State.history[_i7].title===passage){momentIndex=_i7;break}if(-1===momentIndex)return this.error('cannot find passage "'.concat(passage,'" in the current story history'))}}if(null==passage)return this.error("cannot find passage");"back"!==this.name||-1!==momentIndex?($link=jQuery(document.createElement("a")).addClass("link-internal").ariaClick({one:!0},"return"===this.name?function(){return Engine.play(passage)}:function(){return Engine.goTo(momentIndex)}),$image&&$link.addClass("link-image")):$link=jQuery(document.createElement("span")).addClass("link-disabled"),$link.addClass("macro-".concat(this.name)).append($image||document.createTextNode(text||L10n.get("macro".concat(this.name.toUpperFirst(),"Text")))).appendTo(this.output)}}),Macro.add("choice",{handler:function(){if(0===this.args.length)return this.error("no passage specified");var passage,text,$image,setFn,$link,choiceId=State.passage;if(1===this.args.length?"object"===_typeof(this.args[0])?this.args[0].isImage?($image=jQuery(document.createElement("img")).attr("src",this.args[0].source),this.args[0].hasOwnProperty("passage")&&$image.attr("data-passage",this.args[0].passage),this.args[0].hasOwnProperty("title")&&$image.attr("title",this.args[0].title),this.args[0].hasOwnProperty("align")&&$image.attr("align",this.args[0].align),passage=this.args[0].link,setFn=this.args[0].setFn):(text=this.args[0].text,passage=this.args[0].link,setFn=this.args[0].setFn):text=passage=this.args[0]:(passage=this.args[0],text=this.args[1]),State.variables.hasOwnProperty("#choice")&&State.variables["#choice"].hasOwnProperty(choiceId)&&State.variables["#choice"][choiceId])return $link=jQuery(document.createElement("span")).addClass("link-disabled macro-".concat(this.name)).attr("tabindex",-1).append($image||document.createTextNode(text)).appendTo(this.output),void($image&&$link.addClass("link-image"));$link=jQuery(Wikifier.createInternalLink(this.output,passage,null,(function(){State.variables.hasOwnProperty("#choice")||(State.variables["#choice"]={}),State.variables["#choice"][choiceId]=!0,"function"==typeof setFn&&setFn()}))).addClass("macro-".concat(this.name)).append($image||document.createTextNode(text)),$image&&$link.addClass("link-image")}}),Macro.add(["addclass","toggleclass"],{handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("selector"),this.args.length<2&&errors.push("class names"),this.error("no ".concat(errors.join(" or ")," specified"))}var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));switch(this.name){case"addclass":$targets.addClass(this.args[1].trim());break;case"toggleclass":$targets.toggleClass(this.args[1].trim())}Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("removeclass",{handler:function(){if(0===this.args.length)return this.error("no selector specified");var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));this.args.length>1?$targets.removeClass(this.args[1].trim()):$targets.removeClass(),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("copy",{handler:function(){if(0===this.args.length)return this.error("no selector specified");var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));jQuery(this.output).append($targets.html()),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add(["append","prepend","replace"],{tags:null,t8nRe:/^(?:transition|t8n)$/,handler:function(){var _this18=this;if(0===this.args.length)return this.error("no selector specified");var $insert,$targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));if(""!==this.payload[0].contents)switch(this.args.length>1&&this.self.t8nRe.test(this.args[1])?(($insert=jQuery(document.createElement("span"))).addClass("macro-".concat(this.name,"-insert macro-").concat(this.name,"-in")),setTimeout((function(){return $insert.removeClass("macro-".concat(_this18.name,"-in"))}),Engine.minDomActionDelay)):$insert=jQuery(document.createDocumentFragment()),$insert.wiki(this.payload[0].contents),this.name){case"replace":$targets.empty();case"append":$targets.append($insert);break;case"prepend":$targets.prepend($insert)}else"replace"===this.name&&$targets.empty();Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("remove",{handler:function(){if(0===this.args.length)return this.error("no selector specified");var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));$targets.remove(),Config.debug&&this.debugView.modes({hidden:!0})}}),Has.audio){var errorOnePlaybackAction=function(cur,prev){return'only one playback action allowed per invocation, "'.concat(cur,'" cannot be combined with "').concat(prev,'"')};Macro.add("audio",{handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("track and/or group IDs"),this.args.length<2&&errors.push("actions"),this.error("no ".concat(errors.join(" or ")," specified"))}var selected;try{selected=SimpleAudio.select(this.args[0])}catch(ex){return this.error(ex.message)}for(var action,fadeTo,loop,mute,passage,time,volume,args=this.args.slice(1),fadeOver=5;args.length>0;){var arg=args.shift(),raw=void 0;switch(arg){case"load":case"pause":case"play":case"stop":case"unload":if(action)return this.error(errorOnePlaybackAction(arg,action));action=arg;break;case"fadein":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=1;break;case"fadeout":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=0;break;case"fadeto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(0===args.length)return this.error("fadeto missing required level value");if(action="fade",raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeto: ".concat(raw));break;case"fadeoverto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(args.length<2){var _errors=[];return args.length<1&&_errors.push("seconds"),args.length<2&&_errors.push("level"),this.error("fadeoverto missing required ".concat(_errors.join(" and ")," value").concat(_errors.length>1?"s":""))}if(action="fade",raw=args.shift(),fadeOver=Number.parseFloat(raw),Number.isNaN(fadeOver)||!Number.isFinite(fadeOver))return this.error("cannot parse fadeoverto: ".concat(raw));if(raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeoverto: ".concat(raw));break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),volume=Number.parseFloat(raw),Number.isNaN(volume)||!Number.isFinite(volume))return this.error("cannot parse volume: ".concat(raw));break;case"mute":case"unmute":mute="mute"===arg;break;case"time":if(0===args.length)return this.error("time missing required seconds value");if(raw=args.shift(),time=Number.parseFloat(raw),Number.isNaN(time)||!Number.isFinite(time))return this.error("cannot parse time: ".concat(raw));break;case"loop":case"unloop":loop="loop"===arg;break;case"goto":if(0===args.length)return this.error("goto missing required passage title");if(raw=args.shift(),passage="object"===_typeof(raw)?raw.link:raw,!Story.has(passage))return this.error('passage "'.concat(passage,'" does not exist'));break;default:return this.error("unknown action: ".concat(arg))}}try{if(null!=volume&&selected.volume(volume),null!=time&&selected.time(time),null!=mute&&selected.mute(mute),null!=loop&&selected.loop(loop),null!=passage){var nsEnded="ended.macros.macro-".concat(this.name,"_goto");selected.off(nsEnded).one(nsEnded,(function(){selected.off(nsEnded),Engine.play(passage)}))}switch(action){case"fade":selected.fade(fadeOver,fadeTo);break;case"load":selected.load();break;case"pause":selected.pause();break;case"play":selected.playWhenAllowed();break;case"stop":selected.stop();break;case"unload":selected.unload()}Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error("error executing action: ".concat(ex.message))}}}),Macro.add("cacheaudio",{handler:function(){var _this19=this;if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("track ID"),this.args.length<2&&errors.push("sources"),this.error("no ".concat(errors.join(" or ")," specified"))}var id=String(this.args[0]).trim(),oldFmtRe=/^format:\s*([\w-]+)\s*;\s*/i;try{SimpleAudio.tracks.add(id,this.args.slice(1).map((function(source){if(oldFmtRe.test(source)){if(Config.debug)return _this19.error('track ID "'.concat(id,'": format specifier migration required, "format:formatId;" → "formatId|"'));source=source.replace(oldFmtRe,"$1|")}return source})))}catch(ex){return this.error(ex.message)}if(Config.debug&&!SimpleAudio.tracks.get(id).hasSource())return this.error('track ID "'.concat(id,'": no supported audio sources found'));Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("createaudiogroup",{tags:["track"],handler:function(){if(0===this.args.length)return this.error("no group ID specified");if(1===this.payload.length)return this.error("no tracks defined via <<track>>");Config.debug&&this.debugView.modes({nonvoid:!1,hidden:!0});for(var groupId=String(this.args[0]).trim(),trackIds=[],i=1,len=this.payload.length;i<len;++i){if(this.payload[i].args.length<1)return this.error("no track ID specified");trackIds.push(String(this.payload[i].args[0]).trim()),Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0})}try{SimpleAudio.groups.add(groupId,trackIds)}catch(ex){return this.error(ex.message)}Config.debug&&this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!0})}}),Macro.add("createplaylist",{tags:["track"],handler:function(){if(0===this.args.length)return this.error("no list ID specified");if(1===this.payload.length)return this.error("no tracks defined via <<track>>");var playlist=Macro.get("playlist");if(null!==playlist.from&&"createplaylist"!==playlist.from)return this.error("a playlist has already been defined with <<setplaylist>>");Config.debug&&this.debugView.modes({nonvoid:!1,hidden:!0});for(var listId=String(this.args[0]).trim(),trackObjs=[],i=1,len=this.payload.length;i<len;++i){if(0===this.payload[i].args.length)return this.error("no track ID specified");for(var trackObj={id:String(this.payload[i].args[0]).trim()},args=this.payload[i].args.slice(1);args.length>0;){var arg=args.shift(),raw=void 0,parsed=void 0;switch(arg){case"copy":case"own":trackObj.own=!0;break;case"rate":args.length>0&&args.shift();break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),parsed=Number.parseFloat(raw),Number.isNaN(parsed)||!Number.isFinite(parsed))return this.error("cannot parse volume: ".concat(raw));trackObj.volume=parsed;break;default:return this.error("unknown action: ".concat(arg))}}trackObjs.push(trackObj),Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0})}try{SimpleAudio.lists.add(listId,trackObjs)}catch(ex){return this.error(ex.message)}null===playlist.from&&(playlist.from="createplaylist"),Config.debug&&this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!0})}}),Macro.add("masteraudio",{handler:function(){if(0===this.args.length)return this.error("no actions specified");for(var action,mute,muteOnHide,volume,args=this.args.slice(0);args.length>0;){var arg=args.shift(),raw=void 0;switch(arg){case"load":case"stop":case"unload":if(action)return this.error(errorOnePlaybackAction(arg,action));action=arg;break;case"mute":case"unmute":mute="mute"===arg;break;case"muteonhide":case"nomuteonhide":muteOnHide="muteonhide"===arg;break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),volume=Number.parseFloat(raw),Number.isNaN(volume)||!Number.isFinite(volume))return this.error("cannot parse volume: ".concat(raw));break;default:return this.error("unknown action: ".concat(arg))}}try{switch(null!=mute&&SimpleAudio.mute(mute),null!=muteOnHide&&SimpleAudio.muteOnHidden(muteOnHide),null!=volume&&SimpleAudio.volume(volume),action){case"load":SimpleAudio.load();break;case"stop":SimpleAudio.stop();break;case"unload":SimpleAudio.unload()}Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error("error executing action: ".concat(ex.message))}}}),Macro.add("playlist",{from:null,handler:function(){var list,args,action,from=this.self.from;if(null===from)return this.error("no playlists have been created");if("createplaylist"===from){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("list ID"),this.args.length<2&&errors.push("actions"),this.error("no ".concat(errors.join(" or ")," specified"))}var id=String(this.args[0]).trim();if(!SimpleAudio.lists.has(id))return this.error('playlist "'.concat(id,'" does not exist'));list=SimpleAudio.lists.get(id),args=this.args.slice(1)}else{if(0===this.args.length)return this.error("no actions specified");list=SimpleAudio.lists.get("setplaylist"),args=this.args.slice(0)}for(var fadeTo,loop,mute,shuffle,volume,fadeOver=5;args.length>0;){var arg=args.shift(),raw=void 0;switch(arg){case"load":case"pause":case"play":case"skip":case"stop":case"unload":if(action)return this.error(errorOnePlaybackAction(arg,action));action=arg;break;case"fadein":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=1;break;case"fadeout":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=0;break;case"fadeto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(0===args.length)return this.error("fadeto missing required level value");if(action="fade",raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeto: ".concat(raw));break;case"fadeoverto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(args.length<2){var _errors2=[];return args.length<1&&_errors2.push("seconds"),args.length<2&&_errors2.push("level"),this.error("fadeoverto missing required ".concat(_errors2.join(" and ")," value").concat(_errors2.length>1?"s":""))}if(action="fade",raw=args.shift(),fadeOver=Number.parseFloat(raw),Number.isNaN(fadeOver)||!Number.isFinite(fadeOver))return this.error("cannot parse fadeoverto: ".concat(raw));if(raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeoverto: ".concat(raw));break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),volume=Number.parseFloat(raw),Number.isNaN(volume)||!Number.isFinite(volume))return this.error("cannot parse volume: ".concat(raw));break;case"mute":case"unmute":mute="mute"===arg;break;case"loop":case"unloop":loop="loop"===arg;break;case"shuffle":case"unshuffle":shuffle="shuffle"===arg;break;default:return this.error("unknown action: ".concat(arg))}}try{switch(null!=volume&&list.volume(volume),null!=mute&&list.mute(mute),null!=loop&&list.loop(loop),null!=shuffle&&list.shuffle(shuffle),action){case"fade":list.fade(fadeOver,fadeTo);break;case"load":list.load();break;case"pause":list.pause();break;case"play":list.playWhenAllowed();break;case"skip":list.skip();break;case"stop":list.stop();break;case"unload":list.unload()}Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error("error executing action: ".concat(ex.message))}}}),Macro.add("removeaudiogroup",{handler:function(){if(0===this.args.length)return this.error("no group ID specified");var id=String(this.args[0]).trim();if(!SimpleAudio.groups.has(id))return this.error('group "'.concat(id,'" does not exist'));SimpleAudio.groups.delete(id),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("removeplaylist",{handler:function(){if(0===this.args.length)return this.error("no list ID specified");var id=String(this.args[0]).trim();if(!SimpleAudio.lists.has(id))return this.error('playlist "'.concat(id,'" does not exist'));SimpleAudio.lists.delete(id),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("waitforaudio",{skipArgs:!0,handler:function(){SimpleAudio.loadWithScreen()}}),Macro.add("setplaylist",{handler:function(){if(0===this.args.length)return this.error("no track ID(s) specified");var playlist=Macro.get("playlist");if(null!==playlist.from&&"setplaylist"!==playlist.from)return this.error("playlists have already been defined with <<createplaylist>>");try{SimpleAudio.lists.add("setplaylist",this.args.slice(0))}catch(ex){return this.error(ex.message)}null===playlist.from&&(playlist.from="setplaylist"),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("stopallaudio",{skipArgs:!0,handler:function(){SimpleAudio.select(":all").stop(),Config.debug&&this.debugView.modes({hidden:!0})}})}else Macro.add(["audio","cacheaudio","createaudiogroup","createplaylist","masteraudio","playlist","removeaudiogroup","removeplaylist","waitforaudio","setplaylist","stopallaudio"],{skipArgs:!0,handler:function(){Config.debug&&this.debugView.modes({hidden:!0})}});Macro.add("done",{skipArgs:!0,tags:null,handler:function(){var contents=this.payload[0].contents.trim();""!==contents&&setTimeout(this.createShadowWrapper((function(){return $.wiki(contents)})),Engine.minDomActionDelay)}}),Macro.add("goto",{handler:function(){return 0===this.args.length?this.error("no passage specified"):(passage="object"===_typeof(this.args[0])?this.args[0].link:this.args[0],Story.has(passage)?void setTimeout((function(){return Engine.play(passage)}),Engine.minDomActionDelay):this.error('passage "'.concat(passage,'" does not exist')));var passage}}),Macro.add("repeat",{isAsync:!0,tags:null,timers:new Set,t8nRe:/^(?:transition|t8n)$/,handler:function(){var delay,_this20=this;if(0===this.args.length)return this.error("no time value specified");try{delay=Math.max(Engine.minDomActionDelay,Util.fromCssTime(this.args[0]))}catch(ex){return this.error(ex.message)}Config.debug&&this.debugView.modes({block:!0});var transition=this.args.length>1&&this.self.t8nRe.test(this.args[1]),$wrapper=jQuery(document.createElement("span")).addClass("macro-".concat(this.name)).appendTo(this.output);this.self.registerInterval(this.createShadowWrapper((function(){var frag=document.createDocumentFragment();new Wikifier(frag,_this20.payload[0].contents);var $output=$wrapper;transition&&($output=jQuery(document.createElement("span")).addClass("macro-repeat-insert macro-repeat-in").appendTo($output)),$output.append(frag),transition&&setTimeout((function(){return $output.removeClass("macro-repeat-in")}),Engine.minDomActionDelay)})),delay)},registerInterval:function(callback,delay){var _this21=this;if("function"!=typeof callback)throw new TypeError("callback parameter must be a function");var passage=State.passage,turn=State.turns,timers=this.timers,timerId=null;timerId=setInterval((function(){if(State.passage!==passage||State.turns!==turn)return clearInterval(timerId),void timers.delete(timerId);var timerIdCache;try{TempState.break=null,TempState.hasOwnProperty("repeatTimerId")&&(timerIdCache=TempState.repeatTimerId),TempState.repeatTimerId=timerId,callback.call(_this21)}finally{void 0!==timerIdCache?TempState.repeatTimerId=timerIdCache:delete TempState.repeatTimerId,TempState.break=null}}),delay),timers.add(timerId),prehistory.hasOwnProperty("#repeat-timers-cleanup")||(prehistory["#repeat-timers-cleanup"]=function(task){delete prehistory[task],timers.forEach((function(timerId){return clearInterval(timerId)})),timers.clear()})}}),Macro.add("stop",{skipArgs:!0,handler:function(){if(!TempState.hasOwnProperty("repeatTimerId"))return this.error("must only be used in conjunction with its parent macro <<repeat>>");var timers=Macro.get("repeat").timers,timerId=TempState.repeatTimerId;clearInterval(timerId),timers.delete(timerId),TempState.break=2,Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("timed",{isAsync:!0,tags:["next"],timers:new Set,t8nRe:/^(?:transition|t8n)$/,handler:function(){if(0===this.args.length)return this.error("no time value specified in <<timed>>");var i,items=[];try{items.push({name:this.name,source:this.source,delay:Math.max(Engine.minDomActionDelay,Util.fromCssTime(this.args[0])),content:this.payload[0].contents})}catch(ex){return this.error("".concat(ex.message," in <<timed>>"))}if(this.payload.length>1)try{var len;for(i=1,len=this.payload.length;i<len;++i)items.push({name:this.payload[i].name,source:this.payload[i].source,delay:0===this.payload[i].args.length?items[items.length-1].delay:Math.max(Engine.minDomActionDelay,Util.fromCssTime(this.payload[i].args[0])),content:this.payload[i].contents})}catch(ex){return this.error("".concat(ex.message," in <<next>> (#").concat(i,")"))}Config.debug&&this.debugView.modes({block:!0});var transition=this.args.length>1&&this.self.t8nRe.test(this.args[1]),$wrapper=jQuery(document.createElement("span")).addClass("macro-".concat(this.name)).appendTo(this.output);this.self.registerTimeout(this.createShadowWrapper((function(item){var frag=document.createDocumentFragment();new Wikifier(frag,item.content);var $output=$wrapper;Config.debug&&"next"===item.name&&($output=jQuery(new DebugView($output[0],"macro",item.name,item.source).output)),transition&&($output=jQuery(document.createElement("span")).addClass("macro-timed-insert macro-timed-in").appendTo($output)),$output.append(frag),transition&&setTimeout((function(){return $output.removeClass("macro-timed-in")}),Engine.minDomActionDelay)})),items)},registerTimeout:function(callback,items){if("function"!=typeof callback)throw new TypeError("callback parameter must be a function");var passage=State.passage,turn=State.turns,timers=this.timers,timerId=null,nextItem=items.shift();timerId=setTimeout((function worker(){if(timers.delete(timerId),State.passage===passage&&State.turns===turn){var curItem=nextItem;null!=(nextItem=items.shift())&&(timerId=setTimeout(worker,nextItem.delay),timers.add(timerId)),callback.call(this,curItem)}}),nextItem.delay),timers.add(timerId),prehistory.hasOwnProperty("#timed-timers-cleanup")||(prehistory["#timed-timers-cleanup"]=function(task){delete prehistory[task],timers.forEach((function(timerId){return clearTimeout(timerId)})),timers.clear()})}}),Macro.add("widget",{tags:null,handler:function(){if(0===this.args.length)return this.error("no widget name specified");var widgetCode,widgetName=this.args[0],isNonVoid=this.args.length>1&&"container"===this.args[1];if(Macro.has(widgetName)){if(!Macro.get(widgetName).isWidget)return this.error('cannot clobber existing macro "'.concat(widgetName,'"'));Macro.delete(widgetName)}try{var widgetDef={isWidget:!0,handler:(widgetCode=this.payload[0].contents,function(){var shadowStore={};State.temporary.hasOwnProperty("args")&&(shadowStore._args=State.temporary.args),State.temporary.args=_toConsumableArray(this.args),State.temporary.args.raw=this.args.raw,State.temporary.args.full=this.args.full,this.addShadow("_args"),isNonVoid&&(State.temporary.hasOwnProperty("contents")&&(shadowStore._contents=State.temporary.contents),State.temporary.contents=this.payload[0].contents,this.addShadow("_contents")),State.variables.hasOwnProperty("args")&&(shadowStore.$args=State.variables.args),State.variables.args=State.temporary.args,this.addShadow("$args");try{var resFrag=document.createDocumentFragment(),errList=[];if(new Wikifier(resFrag,widgetCode),Array.from(resFrag.querySelectorAll(".error")).forEach((function(errEl){errList.push(errEl.textContent)})),0!==errList.length)return this.error("error".concat(errList.length>1?"s":""," within widget code (").concat(errList.join("; "),")"));this.output.appendChild(resFrag)}catch(ex){return this.error("cannot execute widget: ".concat(ex.message))}finally{shadowStore.hasOwnProperty("_args")?State.temporary.args=shadowStore._args:delete State.temporary.args,isNonVoid&&(shadowStore.hasOwnProperty("_contents")?State.temporary.contents=shadowStore._contents:delete State.temporary.contents),shadowStore.hasOwnProperty("$args")?State.variables.args=shadowStore.$args:delete State.variables.args}})};isNonVoid&&(widgetDef.tags=[]),Macro.add(widgetName,widgetDef),Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error('cannot create widget macro "'.concat(widgetName,'": ').concat(ex.message))}}})}();var Dialog=function(){var _$overlay=null,_$dialog=null,_$dialogTitle=null,_$dialogBody=null,_lastActive=null,_scrollbarWidth=0,_dialogObserver=null;function dialogClose(ev){return _$dialogBody.trigger(":dialogclosing"),jQuery(document).off(".dialog-close"),_dialogObserver?(_dialogObserver.disconnect(),_dialogObserver=null):_$dialogBody.off(".dialog-resize"),jQuery(window).off(".dialog-resize"),_$dialog.removeClass("open").css({left:"",right:"",top:"",bottom:""}),jQuery("#ui-bar,#story").find("[tabindex=-2]").removeAttr("aria-hidden").attr("tabindex",0),jQuery("body>[tabindex=-3]").removeAttr("aria-hidden").removeAttr("tabindex"),_$overlay.removeClass("open"),jQuery(document.documentElement).removeAttr("data-dialog"),_$dialogTitle.empty(),_$dialogBody.empty().removeClass(),null!==_lastActive&&(jQuery(_lastActive).focus(),_lastActive=null),ev&&ev.data&&"function"==typeof ev.data.closeFn&&ev.data.closeFn(ev),_$dialogBody.trigger(":dialogclose"),_$dialogBody.trigger(":dialogclosed"),Dialog}function dialogIsOpen(classNames){return _$dialog.hasClass("open")&&(!classNames||classNames.splitOrEmpty(/\s+/).every((function(cn){return _$dialogBody.hasClass(cn)})))}function dialogOpen(options,closeFn){_$dialogBody.trigger(":dialogopening");var top=jQuery.extend({top:50},options).top;return dialogIsOpen()||(_lastActive=safeActiveElement()),jQuery(document.documentElement).attr("data-dialog","open"),_$overlay.addClass("open"),null!==_$dialogBody[0].querySelector("img")&&_$dialogBody.imagesLoaded().always((function(){return _resizeHandler({data:{top:top}})})),jQuery("body>:not(script,#store-area,tw-storydata,#ui-bar,#ui-overlay,#ui-dialog)").attr("tabindex",-3).attr("aria-hidden",!0),jQuery("#ui-bar,#story").find("[tabindex]:not([tabindex^=-])").attr("tabindex",-2).attr("aria-hidden",!0),_$dialog.css(_calcPosition(top)).addClass("open").focus(),jQuery(window).on("resize.dialog-resize",null,{top:top},jQuery.throttle(40,_resizeHandler)),Has.mutationObserver?(_dialogObserver=new MutationObserver((function(mutations){for(var i=0;i<mutations.length;++i)if("childList"===mutations[i].type){_resizeHandler({data:{top:top}});break}}))).observe(_$dialogBody[0],{childList:!0,subtree:!0}):_$dialogBody.on("DOMNodeInserted.dialog-resize DOMNodeRemoved.dialog-resize",null,{top:top},jQuery.throttle(40,_resizeHandler)),jQuery(document).one("click.dialog-close",".ui-close",{closeFn:closeFn},(function(ev){dialogClose(ev)})).one("keypress.dialog-close",".ui-close",(function(ev){13!==ev.which&&32!==ev.which||jQuery(this).trigger("click")})),_$dialogBody.trigger(":dialogopen"),_$dialogBody.trigger(":dialogopened"),Dialog}function _calcPosition(topPos){var top=null!=topPos?topPos:50,$parent=jQuery(window),dialogPos={left:"",right:"",top:"",bottom:""};_$dialog.css(dialogPos);var horzSpace=$parent.width()-_$dialog.outerWidth(!0)-1,vertSpace=$parent.height()-_$dialog.outerHeight(!0)-1;return horzSpace<=32+_scrollbarWidth&&(vertSpace-=_scrollbarWidth),vertSpace<=32+_scrollbarWidth&&(horzSpace-=_scrollbarWidth),dialogPos.left=dialogPos.right=horzSpace<=32?16:horzSpace/2>>0,dialogPos.top=vertSpace<=32?dialogPos.bottom=16:vertSpace/2>top?top:dialogPos.bottom=vertSpace/2>>0,Object.keys(dialogPos).forEach((function(key){""!==dialogPos[key]&&(dialogPos[key]+="px")})),dialogPos}function _resizeHandler(ev){var top=ev&&ev.data&&void 0!==ev.data.top?ev.data.top:50;"block"===_$dialog.css("display")&&(_$dialog.css({display:"none"}),_$dialog.css(jQuery.extend({display:""},_calcPosition(top))))}return Object.freeze(Object.defineProperties({},{append:{value:function(){var _$dialogBody2;return(_$dialogBody2=_$dialogBody).append.apply(_$dialogBody2,arguments),Dialog}},body:{value:function(){return _$dialogBody.get(0)}},close:{value:dialogClose},init:{value:function(){if(!document.getElementById("ui-dialog")){_scrollbarWidth=function(){var scrollbarWidth;try{var inner=document.createElement("p"),outer=document.createElement("div");inner.style.width="100%",inner.style.height="200px",outer.style.position="absolute",outer.style.left="0px",outer.style.top="0px",outer.style.width="100px",outer.style.height="100px",outer.style.visibility="hidden",outer.style.overflow="hidden",outer.appendChild(inner),document.body.appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow="auto";var w2=inner.offsetWidth;w1===w2&&(w2=outer.clientWidth),document.body.removeChild(outer),scrollbarWidth=w1-w2}catch(ex){}return scrollbarWidth||17}();var $elems=jQuery(document.createDocumentFragment()).append('<div id="ui-overlay" class="ui-close"></div><div id="ui-dialog" tabindex="0" role="dialog" aria-labelledby="ui-dialog-title"><div id="ui-dialog-titlebar"><h1 id="ui-dialog-title"></h1>'+'<button id="ui-dialog-close" class="ui-close" tabindex="0" aria-label="'.concat(L10n.get("close"),'"></button>')+'</div><div id="ui-dialog-body"></div></div>');_$overlay=jQuery($elems.find("#ui-overlay").get(0)),_$dialog=jQuery($elems.find("#ui-dialog").get(0)),_$dialogTitle=jQuery($elems.find("#ui-dialog-title").get(0)),_$dialogBody=jQuery($elems.find("#ui-dialog-body").get(0)),$elems.insertBefore("body>script#script-sugarcube")}}},isOpen:{value:dialogIsOpen},open:{value:dialogOpen},resize:{value:function(data){return _resizeHandler("object"===_typeof(data)?{data:data}:undefined)}},setup:{value:function(title,classNames){return _$dialogBody.empty().removeClass(),null!=classNames&&_$dialogBody.addClass(classNames),_$dialogTitle.empty().append((null!=title?String(title):"")||" "),_$dialogBody.get(0)}},wiki:{value:function(){var _$dialogBody3;return(_$dialogBody3=_$dialogBody).wiki.apply(_$dialogBody3,arguments),Dialog}},addClickHandler:{value:function(targets,options,startFn,doneFn,closeFn){return jQuery(targets).ariaClick((function(ev){ev.preventDefault(),"function"==typeof startFn&&startFn(ev),dialogOpen(options,closeFn),"function"==typeof doneFn&&doneFn(ev)}))}}}))}(),Engine=function(){var States=Util.toEnum({Idle:"idle",Playing:"playing",Rendering:"rendering"}),_initDebugViews=[],_state=States.Idle,_lastPlay=null,_outlinePatch=null,_updating=null;function engineGo(offset){var succeded=State.go(offset);return succeded&&engineShow(),succeded}function engineShow(){return enginePlay(State.passage,!0)}function enginePlay(title,noHistory){var passageReadyOutput,passageDoneOutput,passageTitle=title;if(_state=States.Playing,TempState={},State.clearTemporary(),"function"==typeof Config.navigation.override)try{var overrideTitle=Config.navigation.override(passageTitle);overrideTitle&&(passageTitle=overrideTitle)}catch(ex){}var passage=Story.get(passageTitle);if(jQuery.event.trigger({type:":passageinit",passage:passage}),Object.keys(prehistory).forEach((function(task){"function"==typeof prehistory[task]&&prehistory[task].call(passage,task)})),noHistory||State.create(passage.title),document.body.className&&(document.body.className=""),_lastPlay=Util.now(),Object.keys(predisplay).forEach((function(task){"function"==typeof predisplay[task]&&predisplay[task].call(passage,task)})),Story.has("PassageReady"))try{passageReadyOutput=Wikifier.wikifyEval(Story.get("PassageReady").text)}catch(ex){console.error(ex),Alert.error("PassageReady",ex.message)}_state=States.Rendering;var dataTags=passage.tags.length>0?passage.tags.join(" "):null,passageEl=document.createElement("div");jQuery(passageEl).attr({id:passage.domId,"data-passage":passage.title,"data-tags":dataTags}).addClass("passage ".concat(passage.className)),jQuery(document.body).attr("data-tags",dataTags).addClass(passage.className),jQuery(document.documentElement).attr("data-tags",dataTags),jQuery.event.trigger({type:":passagestart",content:passageEl,passage:passage}),Object.keys(prerender).forEach((function(task){"function"==typeof prerender[task]&&prerender[task].call(passage,passageEl,task)})),Story.has("PassageHeader")&&new Wikifier(passageEl,Story.get("PassageHeader").processText()),passageEl.appendChild(passage.render()),Story.has("PassageFooter")&&new Wikifier(passageEl,Story.get("PassageFooter").processText()),jQuery.event.trigger({type:":passagerender",content:passageEl,passage:passage}),Object.keys(postrender).forEach((function(task){"function"==typeof postrender[task]&&postrender[task].call(passage,passageEl,task)}));var debugView,containerEl=document.getElementById("passages");if(containerEl.hasChildNodes()&&("number"==typeof Config.passages.transitionOut||"string"==typeof Config.passages.transitionOut&&""!==Config.passages.transitionOut&&Has.transitionEndEvent?_toConsumableArray(containerEl.childNodes).forEach((function(outgoing){var $outgoing=jQuery(outgoing);if(outgoing.nodeType===Node.ELEMENT_NODE&&$outgoing.hasClass("passage")){if($outgoing.hasClass("passage-out"))return;$outgoing.attr({id:"out-".concat($outgoing.attr("id")),"aria-live":"off"}).addClass("passage-out"),"string"==typeof Config.passages.transitionOut?$outgoing.on(Has.transitionEndEvent,(function(ev){ev.propertyName===Config.passages.transitionOut&&$outgoing.remove()})):setTimeout((function(){return $outgoing.remove()}),Math.max(40,Config.passages.transitionOut))}else $outgoing.remove()})):jQuery(containerEl).empty()),jQuery(passageEl).addClass("passage-in").appendTo(containerEl),setTimeout((function(){return jQuery(passageEl).removeClass("passage-in")}),40),Story.has("StoryDisplayTitle")?null===_updating&&Config.ui.updateStoryElements||setDisplayTitle(Story.get("StoryDisplayTitle").processText()):Config.passages.displayTitles&&passage.title!==Config.passages.start&&(document.title="".concat(passage.title," | ").concat(Story.title)),window.scroll(0,0),_state=States.Playing,Story.has("PassageDone"))try{passageDoneOutput=Wikifier.wikifyEval(Story.get("PassageDone").text)}catch(ex){console.error(ex),Alert.error("PassageDone",ex.message)}(jQuery.event.trigger({type:":passagedisplay",content:passageEl,passage:passage}),Object.keys(postdisplay).forEach((function(task){"function"==typeof postdisplay[task]&&postdisplay[task].call(passage,task)})),null!==_updating?_updating.forEach((function(pair){jQuery(pair.element).empty(),new Wikifier(pair.element,Story.get(pair.passage).processText().trim())})):Config.ui.updateStoryElements&&UIBar.update(),Config.debug)&&(null!=passageReadyOutput&&((debugView=new DebugView(document.createDocumentFragment(),"special","PassageReady","PassageReady")).modes({hidden:!0}),debugView.append(passageReadyOutput),jQuery(passageEl).prepend(debugView.output)),null!=passageDoneOutput&&((debugView=new DebugView(document.createDocumentFragment(),"special","PassageDone","PassageDone")).modes({hidden:!0}),debugView.append(passageDoneOutput),jQuery(passageEl).append(debugView.output)),1===State.turns&&_initDebugViews.length>0&&jQuery(passageEl).prepend(_initDebugViews));switch(jQuery("#story").find("a[href]:not(.link-external)").addClass("link-external").end().find("a,link,button,input,select,textarea").not("[tabindex]").attr("tabindex",0),_typeof(Config.saves.autosave)){case"boolean":Config.saves.autosave&&Save.autosave.save();break;case"object":passage.tags.some((function(tag){return Config.saves.autosave.includes(tag)}))&&Save.autosave.save();break;case"function":Config.saves.autosave()&&Save.autosave.save()}return jQuery.event.trigger({type:":passageend",content:passageEl,passage:passage}),_state=States.Idle,_lastPlay=Util.now(),passageEl}function _hideOutlines(){_outlinePatch.set("*:focus{outline:none;}")}return Object.freeze(Object.defineProperties({},{States:{value:States},minDomActionDelay:{value:40},init:{value:function(){var _lastOutlineEvent;jQuery("#init-no-js,#init-lacking").remove(),function(){var $elems=jQuery(document.createDocumentFragment()),markup=Story.has("StoryInterface")&&Story.get("StoryInterface").text.trim();if(markup){UIBar.destroy(),jQuery(document.head).find("#style-core-display").remove(),$elems.append(markup);var $passages=$elems.find("#passages");if(0===$passages.length)throw new Error('no element with ID "passages" found within "StoryInterface" special passage');$passages.empty().not("[aria-live]").attr("aria-live","polite").end(),$elems.find("[data-init-passage]").each((function(i,el){if("passages"===el.id)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' id="passages"> must not contain a "data-init-passage" content attribute'));var passage=el.getAttribute("data-init-passage").trim();if(el.hasAttribute("data-passage"))throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' data-init-passage="').concat(passage,'"> must not contain a "data-passage" content attribute'));if(null!==el.firstElementChild)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' data-init-passage="').concat(passage,'"> contains child elements'));Story.has(passage)&&jQuery(el).empty().wiki(Story.get(passage).processText().trim())}));var updating=[];$elems.find("[data-passage]").each((function(i,el){if("passages"===el.id)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' id="passages"> must not contain a "data-passage" content attribute'));var passage=el.getAttribute("data-passage").trim();if(null!==el.firstElementChild)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' data-passage="').concat(passage,'"> contains child elements'));Story.has(passage)&&updating.push({passage:passage,element:el})})),updating.length>0&&(_updating=updating),Config.ui.updateStoryElements=!1}else $elems.append('<div id="story" role="main"><div id="passages" aria-live="polite"></div></div>');$elems.insertBefore("body>script#script-sugarcube")}(),_outlinePatch=new StyleWrapper(jQuery(document.createElement("style")).attr({id:"style-aria-outlines",type:"text/css"}).appendTo(document.head).get(0)),_hideOutlines(),jQuery(document).on("mousedown.aria-outlines keydown.aria-outlines",(function(ev){ev.type!==_lastOutlineEvent&&(_lastOutlineEvent=ev.type,"keydown"===ev.type?_outlinePatch.clear():_hideOutlines())}))}},start:{value:function(){if(Story.getAllInit().forEach((function(passage){try{var debugBuffer=Wikifier.wikifyEval(passage.text);if(Config.debug){var debugView=new DebugView(document.createDocumentFragment(),"special","".concat(passage.title," [init-tagged]"),"".concat(passage.title," [init-tagged]"));debugView.modes({hidden:!0}),debugView.append(debugBuffer),_initDebugViews.push(debugView.output)}}catch(ex){console.error(ex),Alert.error("".concat(passage.title," [init-tagged]"),"object"===_typeof(ex)?ex.message:ex)}})),Story.has("StoryInit"))try{var debugBuffer=Wikifier.wikifyEval(Story.get("StoryInit").text);if(Config.debug){var debugView=new DebugView(document.createDocumentFragment(),"special","StoryInit","StoryInit");debugView.modes({hidden:!0}),debugView.append(debugBuffer),_initDebugViews.push(debugView.output)}}catch(ex){console.error(ex),Alert.error("StoryInit","object"===_typeof(ex)?ex.message:ex)}if(null==Config.passages.start)throw new Error("starting passage not selected");if(!Story.has(Config.passages.start))throw new Error('starting passage ("'.concat(Config.passages.start,'") not found'));if(jQuery(document.documentElement).focus(),State.restore())engineShow();else{var loadStart=!0;switch(_typeof(Config.saves.autoload)){case"boolean":Config.saves.autoload&&Save.autosave.ok()&&Save.autosave.has()&&(loadStart=!Save.autosave.load());break;case"string":"prompt"===Config.saves.autoload&&Save.autosave.ok()&&Save.autosave.has()&&(loadStart=!1,UI.buildAutoload(),Dialog.open());break;case"function":Save.autosave.ok()&&Save.autosave.has()&&Config.saves.autoload()&&(loadStart=!Save.autosave.load())}loadStart&&enginePlay(Config.passages.start)}}},restart:{value:function(){LoadScreen.show(),window.scroll(0,0),State.reset(),jQuery.event.trigger(":enginerestart"),window.location.reload()}},state:{get:function(){return _state}},isIdle:{value:function(){return _state===States.Idle}},isPlaying:{value:function(){return _state!==States.Idle}},isRendering:{value:function(){return _state===States.Rendering}},lastPlay:{get:function(){return _lastPlay}},goTo:{value:function(idx){var succeded=State.goTo(idx);return succeded&&engineShow(),succeded}},go:{value:engineGo},backward:{value:function(){return engineGo(-1)}},forward:{value:function(){return engineGo(1)}},show:{value:engineShow},play:{value:enginePlay},display:{value:function(title,link,option){var noHistory=!1;switch(option){case undefined:break;case"replace":case"back":noHistory=!0;break;default:throw new Error('Engine.display option parameter called with obsolete value "'.concat(option,'"; please notify the developer'))}enginePlay(title,noHistory)}}}))}(),Passage=(_tagsToSkip=/^(?:debug|nobr|passage|widget|twine\..*)$/i,function(){function Passage(title,el){var _this22=this;_classCallCheck(this,Passage),Object.defineProperties(this,{title:{value:Util.unescape(title)},element:{value:el||null},tags:{value:Object.freeze(el&&el.hasAttribute("tags")?Array.from(new Set(el.getAttribute("tags").trim().splitOrEmpty(/\s+/))):[])},_excerpt:{writable:!0,value:null}}),Object.defineProperties(this,{domId:{value:"passage-".concat(Util.slugify(this.title))},classes:{value:Object.freeze(0===this.tags.length?[]:_this22.tags.filter((function(tag){return!_tagsToSkip.test(tag)})).map((function(tag){return Util.slugify(tag)})))}})}return _createClass(Passage,[{key:"className",get:function(){return this.classes.join(" ")}},{key:"text",get:function(){if(null==this.element){var passage=Util.escapeMarkup(this.title),mesg="".concat(L10n.get("errorTitle"),": ").concat(L10n.get("errorNonexistentPassage",{passage:passage}));return'<div class="error-view"><span class="error">'.concat(mesg,"</span></div>")}return this.element.textContent.replace(/\r/g,"")}},{key:"description",value:function(){var descriptions=Config.passages.descriptions;switch(_typeof(descriptions)){case"boolean":if(descriptions)return this.title;break;case"object":if(descriptions.hasOwnProperty(this.title))return descriptions[this.title];break;case"function":var result=descriptions.call(this);if(result)return result}return null===this._excerpt&&(this._excerpt=Passage.getExcerptFromText(this.text)),this._excerpt}},{key:"processText",value:function(){if(null==this.element)return this.text;if(this.tags.includes("Twine.image"))return"[img[".concat(this.text,"]]");var processed=this.text;return Config.passages.onProcess&&(processed=Config.passages.onProcess.call(null,{title:this.title,tags:this.tags,text:processed})),(Config.passages.nobr||this.tags.includes("nobr"))&&(processed=processed.replace(/^\n+|\n+$/g,"").replace(/\n+/g," ")),processed}},{key:"render",value:function(options){var frag=document.createDocumentFragment();return new Wikifier(frag,this.processText(),options),this._excerpt=Passage.getExcerptFromNode(frag),frag}}],[{key:"getExcerptFromNode",value:function(node,count){if(!node.hasChildNodes())return"";var excerpt=node.textContent.trim();if(""!==excerpt){var excerptRe=new RegExp("(\\S+(?:\\s+\\S+){0,".concat(count>0?count-1:7,"})"));excerpt=excerpt.replace(/\s+/g," ").match(excerptRe)}return excerpt?"".concat(excerpt[1],"…"):"…"}},{key:"getExcerptFromText",value:function(text,count){if(""===text)return"";var excerptRe=new RegExp("(\\S+(?:\\s+\\S+){0,".concat(count>0?count-1:7,"})")),excerpt=text.replace(/<<.*?>>/g," ").replace(/<.*?>/g," ").trim().replace(/^\s*\|.*\|.*?$/gm,"").replace(/\[[<>]?img\[[^\]]*\]\]/g,"").replace(/\[\[([^|\]]*?)(?:(?:\||->|<-)[^\]]*)?\]\]/g,"$1").replace(/^\s*!+(.*?)$/gm,"$1").replace(/'{2}|\/{2}|_{2}|@{2}/g,"").trim().replace(/\s+/g," ").match(excerptRe);return excerpt?"".concat(excerpt[1],"…"):"…"}}]),Passage}()),_tagsToSkip,Save=function(){var Type=Util.toEnum({Autosave:"autosave",Disk:"disk",Serialize:"serialize",Slot:"slot"}),_slotsUBound=-1,_onLoadHandlers=new Set,_onSaveHandlers=new Set;function savesObjGet(){var saves=storage.get("saves");return null===saves?{autosave:null,slots:_appendSlots([],Config.saves.slots)}:saves}function savesObjClear(){return storage.delete("saves"),!0}function autosaveOk(){return"cookie"!==storage.name&&void 0!==Config.saves.autosave}function slotsOk(){return"cookie"!==storage.name&&-1!==_slotsUBound}function slotsCount(){if(!slotsOk())return 0;for(var saves=savesObjGet(),count=0,i=0,iend=saves.slots.length;i<iend;++i)null!==saves.slots[i]&&++count;return count}function _appendSlots(array,num){for(var i=0;i<num;++i)array.push(null);return array}function _savesObjIsEmpty(saves){for(var slots=saves.slots,isSlotsEmpty=!0,i=0,iend=slots.length;i<iend;++i)if(null!==slots[i]){isSlotsEmpty=!1;break}return null===saves.autosave&&isSlotsEmpty}function _savesObjSave(saves){return _savesObjIsEmpty(saves)?(storage.delete("saves"),!0):storage.set("saves",saves)}function _savesObjUpdate(saveObj){if(null==saveObj||"object"!==_typeof(saveObj))return!1;var updated=!1;return saveObj.hasOwnProperty("state")&&saveObj.state.hasOwnProperty("delta")&&saveObj.state.hasOwnProperty("index")||(saveObj.hasOwnProperty("data")?(delete saveObj.mode,saveObj.state={delta:State.deltaEncode(saveObj.data)},delete saveObj.data):saveObj.state.hasOwnProperty("delta")?saveObj.state.hasOwnProperty("index")||delete saveObj.state.mode:(delete saveObj.state.mode,saveObj.state.delta=State.deltaEncode(saveObj.state.history),delete saveObj.state.history),saveObj.state.index=saveObj.state.delta.length-1,updated=!0),saveObj.state.hasOwnProperty("rseed")&&(saveObj.state.seed=saveObj.state.rseed,delete saveObj.state.rseed,saveObj.state.delta.forEach((function(_,i,delta){delta[i].hasOwnProperty("rcount")&&(delta[i].pull=delta[i].rcount,delete delta[i].rcount)})),updated=!0),(saveObj.state.hasOwnProperty("expired")&&"number"==typeof saveObj.state.expired||saveObj.state.hasOwnProperty("unique")||saveObj.state.hasOwnProperty("last"))&&(saveObj.state.hasOwnProperty("expired")&&"number"==typeof saveObj.state.expired&&delete saveObj.state.expired,(saveObj.state.hasOwnProperty("unique")||saveObj.state.hasOwnProperty("last"))&&(saveObj.state.expired=[],saveObj.state.hasOwnProperty("unique")&&(saveObj.state.expired.push(saveObj.state.unique),delete saveObj.state.unique),saveObj.state.hasOwnProperty("last")&&(saveObj.state.expired.push(saveObj.state.last),delete saveObj.state.last)),updated=!0),updated}function _marshal(supplemental,details){if(null!=supplemental&&"object"!==_typeof(supplemental))throw new Error("supplemental parameter must be an object");var saveObj=Object.assign({},supplemental,{id:Config.saves.id,state:State.marshalForSave()});return Config.saves.version&&(saveObj.version=Config.saves.version),_onSaveHandlers.forEach((function(fn){return fn(saveObj,details)})),saveObj.state.delta=State.deltaEncode(saveObj.state.history),delete saveObj.state.history,saveObj}function _unmarshal(saveObj){try{if(_savesObjUpdate(saveObj),!saveObj||!saveObj.hasOwnProperty("id")||!saveObj.hasOwnProperty("state"))throw new Error(L10n.get("errorSaveMissingData"));if(saveObj.state.history=State.deltaDecode(saveObj.state.delta),delete saveObj.state.delta,_onLoadHandlers.forEach((function(fn){return fn(saveObj)})),saveObj.id!==Config.saves.id)throw new Error(L10n.get("errorSaveIdMismatch"));State.unmarshalForSave(saveObj.state),Engine.show()}catch(ex){return UI.alert("".concat(ex.message.toUpperFirst(),".</p><p>").concat(L10n.get("aborting"),".")),!1}return!0}return Object.freeze(Object.defineProperties({},{init:{value:function(){if("cookie"===storage.name)return savesObjClear(),Config.saves.autoload=undefined,Config.saves.autosave=undefined,Config.saves.slots=0,!1;var saves=savesObjGet(),updated=!1;Array.isArray(saves)&&(saves={autosave:null,slots:saves},updated=!0),Config.saves.slots!==saves.slots.length&&(Config.saves.slots<saves.slots.length?(saves.slots.reverse(),saves.slots=saves.slots.filter((function(val){return!(null===val&&this.count>0)||(--this.count,!1)}),{count:saves.slots.length-Config.saves.slots}),saves.slots.reverse()):Config.saves.slots>saves.slots.length&&_appendSlots(saves.slots,Config.saves.slots-saves.slots.length),updated=!0),_savesObjUpdate(saves.autosave)&&(updated=!0);for(var i=0;i<saves.slots.length;++i)_savesObjUpdate(saves.slots[i])&&(updated=!0);return _savesObjIsEmpty(saves)&&(storage.delete("saves"),updated=!1),updated&&_savesObjSave(saves),_slotsUBound=saves.slots.length-1,!0}},get:{value:savesObjGet},clear:{value:savesObjClear},ok:{value:function(){return autosaveOk()||slotsOk()}},autosave:{value:Object.freeze(Object.defineProperties({},{ok:{value:autosaveOk},has:{value:function(){return null!==savesObjGet().autosave}},get:{value:function(){return savesObjGet().autosave}},load:{value:function(){var saves=savesObjGet();return null!==saves.autosave&&_unmarshal(saves.autosave)}},save:{value:function(title,metadata){if("function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed())return!1;var saves=savesObjGet(),supplemental={title:title||Story.get(State.passage).description(),date:Date.now()};return null!=metadata&&(supplemental.metadata=metadata),saves.autosave=_marshal(supplemental,{type:Type.Autosave}),_savesObjSave(saves)}},delete:{value:function(){var saves=savesObjGet();return saves.autosave=null,_savesObjSave(saves)}}}))},slots:{value:Object.freeze(Object.defineProperties({},{ok:{value:slotsOk},length:{get:function(){return _slotsUBound+1}},isEmpty:{value:function(){return 0===slotsCount()}},count:{value:slotsCount},has:{value:function(slot){if(slot<0||slot>_slotsUBound)return!1;var saves=savesObjGet();return!(slot>=saves.slots.length||null===saves.slots[slot])}},get:{value:function(slot){if(slot<0||slot>_slotsUBound)return null;var saves=savesObjGet();return slot>=saves.slots.length?null:saves.slots[slot]}},load:{value:function(slot){if(slot<0||slot>_slotsUBound)return!1;var saves=savesObjGet();return!(slot>=saves.slots.length||null===saves.slots[slot])&&_unmarshal(saves.slots[slot])}},save:{value:function(slot,title,metadata){if("function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed())return Dialog.isOpen()?$(document).one(":dialogclosed",(function(){return UI.alert(L10n.get("savesDisallowed"))})):UI.alert(L10n.get("savesDisallowed")),!1;if(slot<0||slot>_slotsUBound)return!1;var saves=savesObjGet();if(slot>=saves.slots.length)return!1;var supplemental={title:title||Story.get(State.passage).description(),date:Date.now()};return null!=metadata&&(supplemental.metadata=metadata),saves.slots[slot]=_marshal(supplemental,{type:Type.Slot}),_savesObjSave(saves)}},delete:{value:function(slot){if(slot<0||slot>_slotsUBound)return!1;var saves=savesObjGet();return!(slot>=saves.slots.length)&&(saves.slots[slot]=null,_savesObjSave(saves))}}}))},export:{value:function(filename,metadata){if("function"!=typeof Config.saves.isAllowed||Config.saves.isAllowed()){var str,now,MM,DD,hh,mm,ss,baseName=null==filename?Story.domId:(str=filename,Util.sanitizeFilename(str).replace(/[_\s\u2013\u2014-]+/g,"-")),saveName="".concat(baseName,"-").concat((now=new Date,MM=now.getMonth()+1,DD=now.getDate(),hh=now.getHours(),mm=now.getMinutes(),ss=now.getSeconds(),MM<10&&(MM="0".concat(MM)),DD<10&&(DD="0".concat(DD)),hh<10&&(hh="0".concat(hh)),mm<10&&(mm="0".concat(mm)),ss<10&&(ss="0".concat(ss)),"".concat(now.getFullYear()).concat(MM).concat(DD,"-").concat(hh).concat(mm).concat(ss)),".save"),supplemental=null==metadata?{}:{metadata:metadata},saveObj=LZString.compressToBase64(JSON.stringify(_marshal(supplemental,{type:Type.Disk})));saveAs(new Blob([saveObj],{type:"text/plain;charset=UTF-8"}),saveName)}else Dialog.isOpen()?$(document).one(":dialogclosed",(function(){return UI.alert(L10n.get("savesDisallowed"))})):UI.alert(L10n.get("savesDisallowed"))}},import:{value:function(event){var file=event.target.files[0],reader=new FileReader;jQuery(reader).one("loadend",(function(){if(reader.error){var ex=reader.error;UI.alert("".concat(L10n.get("errorSaveDiskLoadFailed").toUpperFirst()," (").concat(ex.name,": ").concat(ex.message,").</p><p>").concat(L10n.get("aborting"),"."))}else{var saveObj;try{saveObj=JSON.parse(/\.json$/i.test(file.name)||/^\{/.test(reader.result)?reader.result:LZString.decompressFromBase64(reader.result))}catch(ex){}_unmarshal(saveObj)}})),reader.readAsText(file)}},serialize:{value:function(metadata){if("function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed())return Dialog.isOpen()?$(document).one(":dialogclosed",(function(){return UI.alert(L10n.get("savesDisallowed"))})):UI.alert(L10n.get("savesDisallowed")),null;var supplemental=null==metadata?{}:{metadata:metadata};return LZString.compressToBase64(JSON.stringify(_marshal(supplemental,{type:Type.Serialize})))}},deserialize:{value:function(base64Str){var saveObj;try{saveObj=JSON.parse(LZString.decompressFromBase64(base64Str))}catch(ex){}return _unmarshal(saveObj)?saveObj.metadata:null}},onLoad:{value:Object.freeze(Object.defineProperties({},{add:{value:function(handler){var valueType=Util.getType(handler);if("function"!==valueType)throw new TypeError("Save.onLoad.add handler parameter must be a function (received: ".concat(valueType,")"));_onLoadHandlers.add(handler)}},clear:{value:function(){_onLoadHandlers.clear()}},delete:{value:function(handler){return _onLoadHandlers.delete(handler)}},size:{get:function(){return _onLoadHandlers.size}}}))},onSave:{value:Object.freeze(Object.defineProperties({},{add:{value:function(handler){var valueType=Util.getType(handler);if("function"!==valueType)throw new TypeError("Save.onSave.add handler parameter must be a function (received: ".concat(valueType,")"));_onSaveHandlers.add(handler)}},clear:{value:function(){_onSaveHandlers.clear()}},delete:{value:function(handler){return _onSaveHandlers.delete(handler)}},size:{get:function(){return _onSaveHandlers.size}}}))}}))}(),Setting=function(){var Types=Util.toEnum({Header:0,Toggle:1,List:2,Range:3}),_definitions=[];function settingsCreate(){return Object.create(null)}function settingsSave(){var savedSettings=settingsCreate();return Object.keys(settings).length>0&&_definitions.filter((function(def){return def.type!==Types.Header&&settings[def.name]!==def.default})).forEach((function(def){return savedSettings[def.name]=settings[def.name]})),0===Object.keys(savedSettings).length?(storage.delete("settings"),!0):storage.set("settings",savedSettings)}function settingsLoad(){var defaultSettings=settingsCreate(),loadedSettings=storage.get("settings")||settingsCreate();_definitions.filter((function(def){return def.type!==Types.Header})).forEach((function(def){return defaultSettings[def.name]=def.default})),window.SugarCube.settings=settings=Object.assign(defaultSettings,loadedSettings)}function settingsClear(){return window.SugarCube.settings=settings=settingsCreate(),storage.delete("settings"),!0}function definitionsAdd(type,name,def){if(arguments.length<3){var errors=[];throw arguments.length<1&&errors.push("type"),arguments.length<2&&errors.push("name"),arguments.length<3&&errors.push("definition"),new Error("missing parameters, no ".concat(errors.join(" or ")," specified"))}if("object"!==_typeof(def))throw new TypeError("definition parameter must be an object");if(definitionsHas(name))throw new Error('cannot clobber existing setting "'.concat(name,'"'));var str,pos,definition={type:type,name:name,label:"string"==typeof def.label?def.label.trim():""};if("string"==typeof def.desc){var desc=def.desc.trim();""!==desc&&(definition.desc=desc)}switch(type){case Types.Header:break;case Types.Toggle:definition.default=!!def.default;break;case Types.List:if(!def.hasOwnProperty("list"))throw new Error("no list specified");if(!Array.isArray(def.list))throw new TypeError("list must be an array");if(0===def.list.length)throw new Error("list must not be empty");if(definition.list=Object.freeze(def.list),null==def.default)definition.default=def.list[0];else{var defaultIndex=def.list.indexOf(def.default);if(-1===defaultIndex)throw new Error("list does not contain default");definition.default=def.list[defaultIndex]}break;case Types.Range:if(!def.hasOwnProperty("min"))throw new Error("no min specified");if("number"!=typeof def.min||Number.isNaN(def.min)||!Number.isFinite(def.min))throw new TypeError("min must be a finite number");if(!def.hasOwnProperty("max"))throw new Error("no max specified");if("number"!=typeof def.max||Number.isNaN(def.max)||!Number.isFinite(def.max))throw new TypeError("max must be a finite number");if(!def.hasOwnProperty("step"))throw new Error("no step specified");if("number"!=typeof def.step||Number.isNaN(def.step)||!Number.isFinite(def.step)||def.step<=0)throw new TypeError("step must be a finite number greater than zero");var stepValidate=function(value){if(fracDigits>0){var ma=Number("".concat(def.min,"e").concat(fracDigits)),sa=Number("".concat(def.step,"e").concat(fracDigits)),_va=Number("".concat(value,"e").concat(fracDigits))-ma;return Number("".concat(_va-_va%sa+ma,"e-").concat(fracDigits))}var va=value-def.min;return va-va%def.step+def.min},fracDigits=(str=String(def.step),-1===(pos=str.lastIndexOf("."))?0:str.length-pos-1);if(stepValidate(def.max)!==def.max)throw new RangeError("max (".concat(def.max,") is not a multiple of the step (").concat(def.step,") plus the min (").concat(def.min,")"));if(definition.max=def.max,definition.min=def.min,definition.step=def.step,null==def.default)definition.default=def.max;else{if("number"!=typeof def.default||Number.isNaN(def.default)||!Number.isFinite(def.default))throw new TypeError("default must be a finite number");if(def.default<def.min)throw new RangeError("default (".concat(def.default,") is less than min (").concat(def.min,")"));if(def.default>def.max)throw new RangeError("default (".concat(def.default,") is greater than max (").concat(def.max,")"));definition.default=def.default}break;default:throw new Error("unknown Setting type: ".concat(type))}"function"==typeof def.onInit&&(definition.onInit=Object.freeze(def.onInit)),"function"==typeof def.onChange&&(definition.onChange=Object.freeze(def.onChange)),_definitions.push(Object.freeze(definition))}function definitionsHas(name){return _definitions.some((function(definition){return definition.name===name}))}function definitionsGet(name){return _definitions.find((function(definition){return definition.name===name}))}return Object.freeze(Object.defineProperties({},{Types:{value:Types},init:{value:function(){if(storage.has("options")){var old=storage.get("options");null!==old&&(window.SugarCube.settings=settings=Object.assign(settingsCreate(),old)),settingsSave(),storage.delete("options")}settingsLoad(),_definitions.forEach((function(def){if(def.hasOwnProperty("onInit")){var thisArg={name:def.name,value:settings[def.name],default:def.default};def.hasOwnProperty("list")&&(thisArg.list=def.list),def.onInit.call(thisArg)}}))}},create:{value:settingsCreate},save:{value:settingsSave},load:{value:settingsLoad},clear:{value:settingsClear},reset:{value:function(name){if(0===arguments.length)settingsClear(),settingsLoad();else{if(null==name||!definitionsHas(name))throw new Error('nonexistent setting "'.concat(name,'"'));var def=definitionsGet(name);def.type!==Types.Header&&(settings[name]=def.default)}return settingsSave()}},forEach:{value:function(callback,thisArg){_definitions.forEach(callback,thisArg)}},add:{value:definitionsAdd},addHeader:{value:function(name,desc){definitionsAdd(Types.Header,name,{desc:desc})}},addToggle:{value:function(){for(var _len16=arguments.length,args=new Array(_len16),_key16=0;_key16<_len16;_key16++)args[_key16]=arguments[_key16];definitionsAdd.apply(void 0,[Types.Toggle].concat(args))}},addList:{value:function(){for(var _len17=arguments.length,args=new Array(_len17),_key17=0;_key17<_len17;_key17++)args[_key17]=arguments[_key17];definitionsAdd.apply(void 0,[Types.List].concat(args))}},addRange:{value:function(){for(var _len18=arguments.length,args=new Array(_len18),_key18=0;_key18<_len18;_key18++)args[_key18]=arguments[_key18];definitionsAdd.apply(void 0,[Types.Range].concat(args))}},isEmpty:{value:function(){return 0===_definitions.length}},has:{value:definitionsHas},get:{value:definitionsGet},delete:{value:function definitionsDelete(name){definitionsHas(name)&&delete settings[name];for(var i=0;i<_definitions.length;++i)if(_definitions[i].name===name){_definitions.splice(i,1),definitionsDelete(name);break}}}}))}(),Story=function(){var _passages={},_inits=[],_scripts=[],_styles=[],_widgets=[],_title="",_ifId="",_domId="";function _storySetTitle(rawTitle){if(null==rawTitle)throw new Error("story title must not be null or undefined");var title=Util.unescape(String(rawTitle)).trim();if(""===title)throw new Error("story title must not be empty or consist solely of whitespace");if(document.title=_title=title,""===(_domId=Util.slugify(_title)))if(""!==_ifId)_domId=_ifId;else for(var i=0,len=_title.length;i<len;++i){var _Util$charAndPosAt2=Util.charAndPosAt(_title,i),char=_Util$charAndPosAt2.char,start=_Util$charAndPosAt2.start,end=_Util$charAndPosAt2.end;_domId+=char.codePointAt(0).toString(16),i+=end-start}}return Object.freeze(Object.defineProperties({},{load:{value:function(){var validationCodeTags=["init","widget"],validationNoCodeTagPassages=["PassageDone","PassageFooter","PassageHeader","PassageReady","StoryAuthor","StoryBanner","StoryCaption","StoryInit","StoryMenu","StoryShare","StorySubtitle"];function validateStartingPassage(passage){if(passage.tags.includesAny(validationCodeTags))throw new Error('starting passage "'.concat(passage.title,'" contains special tags; invalid: "').concat(passage.tags.filter((function(tag){return validationCodeTags.includes(tag)})).sort().join('", "'),'"'))}function validateSpecialPassages(passage){if(validationNoCodeTagPassages.includes(passage.title)){for(var _len19=arguments.length,tags=new Array(_len19>1?_len19-1:0),_key19=1;_key19<_len19;_key19++)tags[_key19-1]=arguments[_key19];throw new Error('special passage "'.concat(passage.title,'" contains special tags; invalid: "').concat(tags.sort().join('", "'),'"'))}var codeTags=[].concat(validationCodeTags),foundTags=[];if(passage.tags.forEach((function(tag){codeTags.includes(tag)&&foundTags.push.apply(foundTags,_toConsumableArray(codeTags.delete(tag)))})),foundTags.length>1)throw new Error('passage "'.concat(passage.title,'" contains multiple special tags; invalid: "').concat(foundTags.sort().join('", "'),'"'))}var $storydata=jQuery("tw-storydata"),startNode=$storydata.attr("startnode")||"";Config.passages.start=null,Config.debug=/\bdebug\b/.test($storydata.attr("options")),$storydata.children("style").each((function(i){_styles.push(new Passage("tw-user-style-".concat(i),this))})),$storydata.children("script").each((function(i){_scripts.push(new Passage("tw-user-script-".concat(i),this))})),$storydata.children('tw-passagedata:not([tags~="Twine.private"],[tags~="annotation"])').each((function(){var $this=jQuery(this),pid=$this.attr("pid")||"",passage=new Passage($this.attr("name"),this);pid===startNode&&""!==startNode?(Config.passages.start=passage.title,validateStartingPassage(passage),_passages[passage.title]=passage):passage.tags.includes("init")?(validateSpecialPassages(passage,"init"),_inits.push(passage)):passage.tags.includes("widget")?(validateSpecialPassages(passage,"widget"),_widgets.push(passage)):_passages[passage.title]=passage})),_ifId=$storydata.attr("ifid"),_storySetTitle("2155 Actual"),Config.saves.id=Story.domId}},init:{value:function(){var storyStyle;storyStyle=document.createElement("style"),new StyleWrapper(storyStyle).add(_styles.map((function(style){return style.text.trim()})).join("\n")),jQuery(storyStyle).appendTo(document.head).attr({id:"style-story",type:"text/css"});for(var i=0;i<_scripts.length;++i)try{Scripting.evalJavaScript(_scripts[i].text)}catch(ex){console.error(ex),Alert.error(_scripts[i].title,"object"===_typeof(ex)?ex.message:ex)}for(var _i8=0;_i8<_widgets.length;++_i8)try{Wikifier.wikifyEval(_widgets[_i8].processText())}catch(ex){console.error(ex),Alert.error(_widgets[_i8].title,"object"===_typeof(ex)?ex.message:ex)}}},title:{get:function(){return _title}},domId:{get:function(){return _domId}},ifId:{get:function(){return _ifId}},add:{value:function(passage){if(!(passage instanceof Passage))throw new TypeError("Story.add passage parameter must be an instance of Passage");var title=passage.title;return!_passages.hasOwnProperty(title)&&(_passages[title]=passage,!0)}},has:{value:function(title){var type=_typeof(title);switch(type){case"number":case"string":return _passages.hasOwnProperty(String(title));case"undefined":break;case"object":type=null===title?"null":"an object";break;default:type="a ".concat(type)}throw new TypeError("Story.has title parameter cannot be ".concat(type))}},get:{value:function(title){var type=_typeof(title);switch(type){case"number":case"string":var id=String(title);return _passages.hasOwnProperty(id)?_passages[id]:new Passage(id||"(unknown)");case"undefined":break;case"object":type=null===title?"null":"an object";break;default:type="a ".concat(type)}throw new TypeError("Story.get title parameter cannot be ".concat(type))}},getAllInit:{value:function(){return Object.freeze(Array.from(_inits))}},getAllRegular:{value:function(){return Object.freeze(Object.assign({},_passages))}},getAllScript:{value:function(){return Object.freeze(Array.from(_scripts))}},getAllStylesheet:{value:function(){return Object.freeze(Array.from(_styles))}},getAllWidget:{value:function(){return Object.freeze(Array.from(_widgets))}},lookup:{value:function(key,value){var sortKey=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"title",results=[];return Object.keys(_passages).forEach((function(name){var passage=_passages[name];"object"===_typeof(passage[key])&&null!==passage[key]?passage[key]instanceof Array&&passage[key].some((function(m){return Util.sameValueZero(m,value)}))&&results.push(passage):Util.sameValueZero(passage[key],value)&&results.push(passage)})),results.sort((function(a,b){return a[sortKey]==b[sortKey]?0:a[sortKey]<b[sortKey]?-1:1})),results}},lookupWith:{value:function(predicate){var sortKey=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"title";if("function"!=typeof predicate)throw new TypeError("Story.lookupWith predicate parameter must be a function");var results=[];return Object.keys(_passages).forEach((function(name){var passage=_passages[name];predicate(passage)&&results.push(passage)})),results.sort((function(a,b){return a[sortKey]==b[sortKey]?0:a[sortKey]<b[sortKey]?-1:1})),results}}}))}(),UI=function(){function uiAssembleLinkList(passage,listEl){var list=listEl,debugState=Config.debug,cleanState=Config.cleanupWikifierOutput;Config.debug=!1,Config.cleanupWikifierOutput=!1;try{null==list&&(list=document.createElement("ul"));var frag=document.createDocumentFragment();new Wikifier(frag,Story.get(passage).processText().trim());var errors=_toConsumableArray(frag.querySelectorAll(".error")).map((function(errEl){return errEl.textContent.replace(errorPrologRegExp,"")}));if(errors.length>0)throw new Error(errors.join("; "));for(;frag.hasChildNodes();){var node=frag.firstChild;if(node.nodeType===Node.ELEMENT_NODE&&"A"===node.nodeName.toUpperCase()){var li=document.createElement("li");list.appendChild(li),li.appendChild(node)}else frag.removeChild(node)}}finally{Config.cleanupWikifierOutput=cleanState,Config.debug=debugState}return list}function uiOpenAlert(message){jQuery(Dialog.setup(L10n.get("alertTitle"),"alert")).append("<p>".concat(message,'</p><ul class="buttons">')+'<li><button id="alert-ok" class="ui-close">'.concat(L10n.get(["alertOk","ok"]),"</button></li>")+"</ul>");for(var _len20=arguments.length,args=new Array(_len20>1?_len20-1:0),_key20=1;_key20<_len20;_key20++)args[_key20-1]=arguments[_key20];Dialog.open.apply(Dialog,args)}function uiBuildAutoload(){return jQuery(Dialog.setup(L10n.get("autoloadTitle"),"autoload")).append("<p>".concat(L10n.get("autoloadPrompt"),'</p><ul class="buttons">')+'<li><button id="autoload-ok" class="ui-close">'.concat(L10n.get(["autoloadOk","ok"]),"</button></li>")+'<li><button id="autoload-cancel" class="ui-close">'.concat(L10n.get(["autoloadCancel","cancel"]),"</button></li>")+"</ul>"),jQuery(document).one("click.autoload",".ui-close",(function(ev){var isAutoloadOk="autoload-ok"===ev.target.id;jQuery(document).one(":dialogclosed",(function(){isAutoloadOk&&Save.autosave.load()||Engine.play(Config.passages.start)}))})),!0}function uiBuildJumpto(){var list=document.createElement("ul");jQuery(Dialog.setup(L10n.get("jumptoTitle"),"jumpto list")).append(list);for(var expired=State.expired.length,i=State.size-1;i>=0;--i)if(i!==State.activeIndex){var passage=Story.get(State.history[i].title);passage&&passage.tags.includes("bookmark")&&jQuery(document.createElement("li")).append(jQuery(document.createElement("a")).ariaClick({one:!0},function(idx){return function(){return jQuery(document).one(":dialogclosed",(function(){return Engine.goTo(idx)}))}}(i)).addClass("ui-close").text("".concat(L10n.get("jumptoTurn")," ").concat(expired+i+1,": ").concat(passage.description()))).appendTo(list)}list.hasChildNodes()||jQuery(list).append("<li><a><em>".concat(L10n.get("jumptoUnavailable"),"</em></a></li>"))}function uiBuildRestart(){return jQuery(Dialog.setup(L10n.get("restartTitle"),"restart")).append("<p>".concat(L10n.get("restartPrompt"),'</p><ul class="buttons">')+'<li><button id="restart-ok">'.concat(L10n.get(["restartOk","ok"]),"</button></li>")+'<li><button id="restart-cancel" class="ui-close">'.concat(L10n.get(["restartCancel","cancel"]),"</button></li>")+"</ul>").find("#restart-ok").ariaClick({one:!0},(function(){jQuery(document).one(":dialogclosed",(function(){return Engine.restart()})),Dialog.close()})),!0}function uiBuildSaves(){var savesAllowed="function"!=typeof Config.saves.isAllowed||Config.saves.isAllowed();function createActionItem(bId,bClass,bText,bAction){var $btn=jQuery(document.createElement("button")).attr("id","saves-".concat(bId)).html(bText);return bClass&&$btn.addClass(bClass),bAction?$btn.ariaClick(bAction):$btn.ariaDisabled(!0),jQuery(document.createElement("li")).append($btn)}var $dialogBody=jQuery(Dialog.setup(L10n.get("savesTitle"),"saves")),savesOk=Save.ok(),fileOk=Has.fileAPI&&(Config.saves.tryDiskOnMobile||!Browser.isMobile.any());if(savesOk&&$dialogBody.append(function(){function createButton(bId,bClass,bText,bSlot,bAction){var $btn=jQuery(document.createElement("button")).attr("id","saves-".concat(bId,"-").concat(bSlot)).addClass(bId).html(bText);return bClass&&$btn.addClass(bClass),bAction?"auto"===bSlot?$btn.ariaClick({label:"".concat(bText," ").concat(L10n.get("savesLabelAuto"))},(function(){return bAction()})):$btn.ariaClick({label:"".concat(bText," ").concat(L10n.get("savesLabelSlot")," ").concat(bSlot+1)},(function(){return bAction(bSlot)})):$btn.ariaDisabled(!0),$btn}var saves=Save.get(),$tbody=jQuery(document.createElement("tbody"));if(Save.autosave.ok()){var $tdSlot=jQuery(document.createElement("td")),$tdLoad=jQuery(document.createElement("td")),$tdDesc=jQuery(document.createElement("td")),$tdDele=jQuery(document.createElement("td"));jQuery(document.createElement("b")).attr({title:L10n.get("savesLabelAuto"),"aria-label":L10n.get("savesLabelAuto")}).text("A").appendTo($tdSlot),saves.autosave?($tdLoad.append(createButton("load","ui-close",L10n.get("savesLabelLoad"),"auto",(function(){jQuery(document).one(":dialogclosed",(function(){return Save.autosave.load()}))}))),jQuery(document.createElement("div")).text(saves.autosave.title).appendTo($tdDesc),jQuery(document.createElement("div")).addClass("datestamp").html(saves.autosave.date?"".concat(new Date(saves.autosave.date).toLocaleString()):"<em>".concat(L10n.get("savesUnknownDate"),"</em>")).appendTo($tdDesc),$tdDele.append(createButton("delete",null,L10n.get("savesLabelDelete"),"auto",(function(){Save.autosave.delete(),uiBuildSaves()})))):($tdLoad.append(createButton("load",null,L10n.get("savesLabelLoad"),"auto")),$tdDesc.addClass("empty").text("• • •"),$tdDele.append(createButton("delete",null,L10n.get("savesLabelDelete"),"auto"))),jQuery(document.createElement("tr")).append($tdSlot).append($tdLoad).append($tdDesc).append($tdDele).appendTo($tbody)}for(var i=0,iend=saves.slots.length;i<iend;++i){var _$tdSlot=jQuery(document.createElement("td")),_$tdLoad=jQuery(document.createElement("td")),_$tdDesc=jQuery(document.createElement("td")),_$tdDele=jQuery(document.createElement("td"));_$tdSlot.append(document.createTextNode(i+1)),saves.slots[i]?(_$tdLoad.append(createButton("load","ui-close",L10n.get("savesLabelLoad"),i,(function(slot){jQuery(document).one(":dialogclosed",(function(){return Save.slots.load(slot)}))}))),jQuery(document.createElement("div")).text(saves.slots[i].title).appendTo(_$tdDesc),jQuery(document.createElement("div")).addClass("datestamp").html(saves.slots[i].date?"".concat(new Date(saves.slots[i].date).toLocaleString()):"<em>".concat(L10n.get("savesUnknownDate"),"</em>")).appendTo(_$tdDesc),_$tdDele.append(createButton("delete",null,L10n.get("savesLabelDelete"),i,(function(slot){Save.slots.delete(slot),uiBuildSaves()})))):(_$tdLoad.append(createButton("save","ui-close",L10n.get("savesLabelSave"),i,savesAllowed?Save.slots.save:null)),_$tdDesc.addClass("empty").text("• • •"),_$tdDele.append(createButton("delete",null,L10n.get("savesLabelDelete"),i))),jQuery(document.createElement("tr")).append(_$tdSlot).append(_$tdLoad).append(_$tdDesc).append(_$tdDele).appendTo($tbody)}return jQuery(document.createElement("table")).attr("id","saves-list").append($tbody)}()),savesOk||fileOk){var $btnBar=jQuery(document.createElement("ul")).addClass("buttons").appendTo($dialogBody);return fileOk&&($btnBar.append(createActionItem("export","ui-close",L10n.get("savesLabelExport"),savesAllowed?function(){return Save.export()}:null)),$btnBar.append(createActionItem("import",null,L10n.get("savesLabelImport"),(function(){return $dialogBody.find("#saves-import-file").trigger("click")}))),jQuery(document.createElement("input")).css({display:"block",visibility:"hidden",position:"fixed",left:"-9999px",top:"-9999px",width:"1px",height:"1px"}).attr({type:"file",id:"saves-import-file",tabindex:-1,"aria-hidden":!0}).on("change",(function(ev){jQuery(document).one(":dialogclosed",(function(){return Save.import(ev)})),Dialog.close()})).appendTo($dialogBody)),savesOk&&$btnBar.append(createActionItem("clear",null,L10n.get("savesLabelClear"),Save.autosave.has()||!Save.slots.isEmpty()?function(){Save.clear(),uiBuildSaves()}:null)),!0}return uiOpenAlert(L10n.get("savesIncapable")),!1}function uiBuildSettings(){var $dialogBody=jQuery(Dialog.setup(L10n.get("settingsTitle"),"settings"));return Setting.forEach((function(control){if(control.type===Setting.Types.Header){var _name=control.name,_id=Util.slugify(_name),$header=jQuery(document.createElement("div")),$heading=jQuery(document.createElement("h2"));return $header.attr("id","header-body-".concat(_id)).append($heading).appendTo($dialogBody),$heading.attr("id","header-heading-".concat(_id)).wiki(_name),void(control.desc&&jQuery(document.createElement("p")).attr("id","header-desc-".concat(_id)).wiki(control.desc).appendTo($header))}var $control,name=control.name,id=Util.slugify(name),$setting=jQuery(document.createElement("div")),$label=jQuery(document.createElement("label")),$controlBox=jQuery(document.createElement("div"));switch(jQuery(document.createElement("div")).append($label).append($controlBox).appendTo($setting),control.desc&&jQuery(document.createElement("p")).attr("id","setting-desc-".concat(id)).wiki(control.desc).appendTo($setting),$label.attr({id:"setting-label-".concat(id),for:"setting-control-".concat(id)}).wiki(control.label),null==settings[name]&&(settings[name]=control.default),control.type){case Setting.Types.Toggle:$control=jQuery(document.createElement("button")),settings[name]?$control.addClass("enabled").text(L10n.get("settingsOn")):$control.text(L10n.get("settingsOff")),$control.ariaClick((function(){settings[name]?(jQuery(this).removeClass("enabled").text(L10n.get("settingsOff")),settings[name]=!1):(jQuery(this).addClass("enabled").text(L10n.get("settingsOn")),settings[name]=!0),Setting.save(),control.hasOwnProperty("onChange")&&control.onChange.call({name:name,value:settings[name],default:control.default})}));break;case Setting.Types.List:$control=jQuery(document.createElement("select"));for(var i=0,iend=control.list.length;i<iend;++i)jQuery(document.createElement("option")).val(i).text(control.list[i]).appendTo($control);$control.val(control.list.indexOf(settings[name])).attr("tabindex",0).on("change",(function(){settings[name]=control.list[Number(this.value)],Setting.save(),control.hasOwnProperty("onChange")&&control.onChange.call({name:name,value:settings[name],default:control.default,list:control.list})}));break;case Setting.Types.Range:($control=jQuery(document.createElement("input"))).attr({type:"range",min:control.min,max:control.max,step:control.step,value:settings[name],tabindex:0}).on("change input",(function(){settings[name]=Number(this.value),Setting.save(),control.hasOwnProperty("onChange")&&control.onChange.call({name:name,value:settings[name],default:control.default,min:control.min,max:control.max,step:control.step})})).on("keypress",(function(ev){13===ev.which&&(ev.preventDefault(),$control.trigger("change"))}))}$control.attr("id","setting-control-".concat(id)).appendTo($controlBox),$setting.attr("id","setting-body-".concat(id)).appendTo($dialogBody)})),$dialogBody.append('<ul class="buttons">'+'<li><button id="settings-ok" class="ui-close">'.concat(L10n.get(["settingsOk","ok"]),"</button></li>")+'<li><button id="settings-reset">'.concat(L10n.get("settingsReset"),"</button></li>")+"</ul>").find("#settings-reset").ariaClick({one:!0},(function(){jQuery(document).one(":dialogclosed",(function(){Setting.reset(),window.location.reload()})),Dialog.close()})),!0}function uiBuildShare(){try{jQuery(Dialog.setup(L10n.get("shareTitle"),"share list")).append(uiAssembleLinkList("StoryShare"))}catch(ex){return console.error(ex),Alert.error("StoryShare",ex.message),!1}return!0}return Object.freeze(Object.defineProperties({},{assembleLinkList:{value:uiAssembleLinkList},alert:{value:uiOpenAlert},jumpto:{value:function(){uiBuildJumpto(),Dialog.open.apply(Dialog,arguments)}},restart:{value:function(){uiBuildRestart(),Dialog.open.apply(Dialog,arguments)}},saves:{value:function(){uiBuildSaves(),Dialog.open.apply(Dialog,arguments)}},settings:{value:function(){uiBuildSettings(),Dialog.open.apply(Dialog,arguments)}},share:{value:function(){uiBuildShare(),Dialog.open.apply(Dialog,arguments)}},buildAutoload:{value:uiBuildAutoload},buildJumpto:{value:uiBuildJumpto},buildRestart:{value:uiBuildRestart},buildSaves:{value:uiBuildSaves},buildSettings:{value:uiBuildSettings},buildShare:{value:uiBuildShare},stow:{value:function(){return UIBar.stow()}},unstow:{value:function(){return UIBar.unstow()}},setStoryElements:{value:function(){return UIBar.update()}},isOpen:{value:function(){return Dialog.isOpen.apply(Dialog,arguments)}},body:{value:function(){return Dialog.body()}},setup:{value:function(){return Dialog.setup.apply(Dialog,arguments)}},addClickHandler:{value:function(){return Dialog.addClickHandler.apply(Dialog,arguments)}},open:{value:function(){return Dialog.open.apply(Dialog,arguments)}},close:{value:function(){return Dialog.close.apply(Dialog,arguments)}},resize:{value:function(){return Dialog.resize()}},buildDialogAutoload:{value:uiBuildAutoload},buildDialogJumpto:{value:uiBuildJumpto},buildDialogRestart:{value:uiBuildRestart},buildDialogSaves:{value:uiBuildSaves},buildDialogSettings:{value:uiBuildSettings},buildDialogShare:{value:uiBuildShare},buildLinkListFromPassage:{value:uiAssembleLinkList}}))}(),UIBar=function(){var _$uiBar=null;function uiBarStow(noAnimation){var $story;_$uiBar&&!_$uiBar.hasClass("stowed")&&(noAnimation&&(($story=jQuery("#story")).addClass("no-transition"),_$uiBar.addClass("no-transition")),_$uiBar.addClass("stowed"),noAnimation&&setTimeout((function(){$story.removeClass("no-transition"),_$uiBar.removeClass("no-transition")}),Engine.minDomActionDelay));return this}function uiBarUpdate(){if(Story.has("StoryDisplayTitle")&&setDisplayTitle(Story.get("StoryDisplayTitle").processText()),_$uiBar){setPageElement("story-banner","StoryBanner"),setPageElement("story-subtitle","StorySubtitle"),setPageElement("story-author","StoryAuthor"),setPageElement("story-caption","StoryCaption");var menuStory=document.getElementById("menu-story");if(null!==menuStory&&(jQuery(menuStory).empty(),Story.has("StoryMenu")))try{UI.assembleLinkList("StoryMenu",menuStory)}catch(ex){console.error(ex),Alert.error("StoryMenu",ex.message)}}}return Object.freeze(Object.defineProperties({},{destroy:{value:function(){_$uiBar&&(_$uiBar.hide(),jQuery(document).off(".ui-bar"),jQuery(document.head).find("#style-ui-bar").remove(),_$uiBar.remove(),_$uiBar=null)}},hide:{value:function(){return _$uiBar&&_$uiBar.hide(),this}},init:{value:function(){if(!document.getElementById("ui-bar")){var toggleLabel,backwardLabel,jumptoLabel,forwardLabel,$backward,$forward,$elems=(toggleLabel=L10n.get("uiBarToggle"),backwardLabel=L10n.get("uiBarBackward"),jumptoLabel=L10n.get("uiBarJumpto"),forwardLabel=L10n.get("uiBarForward"),jQuery(document.createDocumentFragment()).append('<div id="ui-bar" aria-live="polite"><div id="ui-bar-tray">'+'<button id="ui-bar-toggle" tabindex="0" title="'.concat(toggleLabel,'" aria-label="').concat(toggleLabel,'"></button>')+'<div id="ui-bar-history">'+'<button id="history-backward" tabindex="0" title="'.concat(backwardLabel,'" aria-label="').concat(backwardLabel,'"></button>')+'<button id="history-jumpto" tabindex="0" title="'.concat(jumptoLabel,'" aria-label="').concat(jumptoLabel,'"></button>')+'<button id="history-forward" tabindex="0" title="'.concat(forwardLabel,'" aria-label="').concat(forwardLabel,'"></button>')+'</div></div><div id="ui-bar-body"><header id="title" role="banner"><div id="story-banner"></div><h1 id="story-title"></h1><div id="story-subtitle"></div><div id="story-title-separator"></div><p id="story-author"></p></header><div id="story-caption"></div><nav id="menu" role="navigation"><ul id="menu-story"></ul><ul id="menu-core">'+'<li id="menu-item-saves"><a tabindex="0">'.concat(L10n.get("savesTitle"),"</a></li>")+'<li id="menu-item-settings"><a tabindex="0">'.concat(L10n.get("settingsTitle"),"</a></li>")+'<li id="menu-item-restart"><a tabindex="0">'.concat(L10n.get("restartTitle"),"</a></li>")+'<li id="menu-item-share"><a tabindex="0">'.concat(L10n.get("shareTitle"),"</a></li>")+"</ul></nav></div></div>"));_$uiBar=jQuery($elems.find("#ui-bar").get(0)),$elems.insertBefore("body>script#script-sugarcube"),jQuery(document).on(":historyupdate.ui-bar",($backward=jQuery("#history-backward"),$forward=jQuery("#history-forward"),function(){$backward.ariaDisabled(State.length<2),$forward.ariaDisabled(State.length===State.size)}))}}},isHidden:{value:function(){return _$uiBar&&"none"===_$uiBar.css("display")}},isStowed:{value:function(){return _$uiBar&&_$uiBar.hasClass("stowed")}},show:{value:function(){return _$uiBar&&_$uiBar.show(),this}},start:{value:function(){_$uiBar&&(("boolean"==typeof Config.ui.stowBarInitially?Config.ui.stowBarInitially:jQuery(window).width()<=Config.ui.stowBarInitially)&&uiBarStow(!0),jQuery("#ui-bar-toggle").ariaClick({label:L10n.get("uiBarToggle")},(function(){return _$uiBar.toggleClass("stowed")})),Config.history.controls?(jQuery("#history-backward").ariaDisabled(State.length<2).ariaClick({label:L10n.get("uiBarBackward")},(function(){return Engine.backward()})),Story.lookup("tags","bookmark").length>0?jQuery("#history-jumpto").ariaClick({label:L10n.get("uiBarJumpto")},(function(){return UI.jumpto()})):jQuery("#history-jumpto").remove(),jQuery("#history-forward").ariaDisabled(State.length===State.size).ariaClick({label:L10n.get("uiBarForward")},(function(){return Engine.forward()}))):jQuery("#ui-bar-history").remove(),Story.has("StoryDisplayTitle")?setDisplayTitle(Story.get("StoryDisplayTitle").processText()):jQuery("#story-title").text(Story.title),Story.has("StoryCaption")||jQuery("#story-caption").remove(),Story.has("StoryMenu")||jQuery("#menu-story").remove(),Config.ui.updateStoryElements||uiBarUpdate(),jQuery("#menu-item-saves a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildSaves(),Dialog.open()})).text(L10n.get("savesTitle")),Setting.isEmpty()?jQuery("#menu-item-settings").remove():jQuery("#menu-item-settings a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildSettings(),Dialog.open()})).text(L10n.get("settingsTitle")),jQuery("#menu-item-restart a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildRestart(),Dialog.open()})).text(L10n.get("restartTitle")),Story.has("StoryShare")?jQuery("#menu-item-share a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildShare(),Dialog.open()})).text(L10n.get("shareTitle")):jQuery("#menu-item-share").remove())}},stow:{value:uiBarStow},unstow:{value:function(noAnimation){var $story;return _$uiBar&&_$uiBar.hasClass("stowed")&&(noAnimation&&(($story=jQuery("#story")).addClass("no-transition"),_$uiBar.addClass("no-transition")),_$uiBar.removeClass("stowed"),noAnimation&&setTimeout((function(){$story.removeClass("no-transition"),_$uiBar.removeClass("no-transition")}),Engine.minDomActionDelay)),this}},update:{value:uiBarUpdate},setStoryElements:{value:uiBarUpdate}}))}(),DebugBar=function(){var _variableRe=new RegExp("^".concat(Patterns.variable,"$")),_numericKeyRe=/^\d+$/,_watchList=[],_$debugBar=null,_$watchBody=null,_$watchList=null,_$turnSelect=null,_stowed=!0;function debugBarStow(){_$debugBar.css("right","-".concat(_$debugBar.outerWidth(),"px")),_stowed=!0,_updateSession()}function debugBarUnstow(){_$debugBar.css("right",0),_stowed=!1,_updateSession()}function debugBarToggle(){_stowed?debugBarUnstow():debugBarStow()}function debugBarWatchAdd(varName){_variableRe.test(varName)&&(_watchList.pushUnique(varName),_watchList.sort(),_updateWatchBody(),_updateWatchList(),_updateSession())}function debugBarWatchAddAll(){Object.keys(State.variables).map((function(name){return _watchList.pushUnique("$".concat(name))})),Object.keys(State.temporary).map((function(name){return _watchList.pushUnique("_".concat(name))})),_watchList.sort(),_updateWatchBody(),_updateWatchList(),_updateSession()}function debugBarWatchClear(){for(var i=_watchList.length-1;i>=0;--i)_watchList.pop();_updateWatchBody(),_updateWatchList(),_updateSession()}function debugBarWatchDelete(varName){_watchList.delete(varName),_updateWatchBody(),_updateWatchList(),_updateSession()}function debugBarWatchDisable(){_debugBarWatchDisableNoUpdate(),_updateSession()}function debugBarWatchEnable(){_debugBarWatchEnableNoUpdate(),_updateSession()}function debugBarWatchIsEnabled(){return!_$watchBody.attr("hidden")}function debugBarWatchToggle(){_$watchBody.attr("hidden")?debugBarWatchEnable():debugBarWatchDisable()}function _debugBarWatchDisableNoUpdate(){_$watchBody.attr({"aria-hidden":!0,hidden:"hidden"})}function _debugBarWatchEnableNoUpdate(){_$watchBody.removeAttr("aria-hidden hidden")}function _clearSession(){session.delete("debugState")}function _hasSession(){return session.has("debugState")}function _updateSession(){session.set("debugState",{stowed:_stowed,watchList:_watchList,watchEnabled:debugBarWatchIsEnabled(),viewsEnabled:DebugView.isEnabled()})}function _updateWatchBody(){if(0!==_watchList.length){for(var delLabel=L10n.get("debugBarDeleteWatch"),$table=jQuery(document.createElement("table")),$tbody=jQuery(document.createElement("tbody")),_loop4=function(i,len){var varName=_watchList[i],varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary,$row=jQuery(document.createElement("tr")),$delBtn=jQuery(document.createElement("button")),$code=jQuery(document.createElement("code"));$delBtn.addClass("watch-delete").attr("data-name",varName).ariaClick({one:!0,label:delLabel},(function(){return debugBarWatchDelete(varName)})),$code.text(_toWatchString(store[varKey])),jQuery(document.createElement("td")).append($delBtn).appendTo($row),jQuery(document.createElement("td")).text(varName).appendTo($row),jQuery(document.createElement("td")).append($code).appendTo($row),$row.appendTo($tbody)},i=0,len=_watchList.length;i<len;++i)_loop4(i);$table.append($tbody),_$watchBody.empty().append($table)}else _$watchBody.empty().append("<div>".concat(L10n.get("debugBarNoWatches"),"</div>"))}function _updateWatchList(){var svn=Object.keys(State.variables),tvn=Object.keys(State.temporary);if(0!==svn.length||0!==tvn.length){var names=[].concat(_toConsumableArray(svn.map((function(name){return"$".concat(name)}))),_toConsumableArray(tvn.map((function(name){return"_".concat(name)})))).sort(),options=document.createDocumentFragment();names.delete(_watchList);for(var i=0,len=names.length;i<len;++i)jQuery(document.createElement("option")).val(names[i]).appendTo(options);_$watchList.empty().append(options)}else _$watchList.empty()}function _updateTurnSelect(){for(var histLen=State.size,expLen=State.expired.length,options=document.createDocumentFragment(),i=0;i<histLen;++i)jQuery(document.createElement("option")).val(i).text("".concat(expLen+i+1,". ").concat(Util.escape(State.history[i].title))).appendTo(options);_$turnSelect.empty().ariaDisabled(histLen<2).append(options).val(State.activeIndex)}function _toWatchString(value){if(null===value)return"null";switch(_typeof(value)){case"number":if(Number.isNaN(value))return"NaN";if(!Number.isFinite(value))return"Infinity";case"boolean":case"symbol":case"undefined":return String(value);case"string":return JSON.stringify(value);case"function":return"Function"}var objType=Util.toStringTag(value);if("Date"===objType)return"Date {".concat(value.toLocaleString(),"}");if("RegExp"===objType)return"RegExp ".concat(value.toString());var result=[];if(value instanceof Array||value instanceof Set){for(var list=value instanceof Array?value:Array.from(value),i=0,len=list.length;i<len;++i)result.push(list.hasOwnProperty(i)?_toWatchString(list[i]):"<empty>");return Object.keys(list).filter((function(key){return!_numericKeyRe.test(key)})).forEach((function(key){return result.push("".concat(_toWatchString(key),": ").concat(_toWatchString(list[key])))})),"".concat(objType,"(").concat(list.length,") [").concat(result.join(", "),"]")}return value instanceof Map?(value.forEach((function(val,key){return result.push("".concat(_toWatchString(key)," → ").concat(_toWatchString(val)))})),"".concat(objType,"(").concat(value.size,") {").concat(result.join(", "),"}")):(Object.keys(value).forEach((function(key){return result.push("".concat(_toWatchString(key),": ").concat(_toWatchString(value[key])))})),"".concat(objType," {").concat(result.join(", "),"}"))}return Object.freeze(Object.defineProperties({},{init:{value:function(){var barToggleLabel=L10n.get("debugBarToggle"),watchAddLabel=L10n.get("debugBarAddWatch"),watchAllLabel=L10n.get("debugBarWatchAll"),watchNoneLabel=L10n.get("debugBarWatchNone"),watchToggleLabel=L10n.get("debugBarWatchToggle"),viewsToggleLabel=L10n.get("debugBarViewsToggle");jQuery(document.createDocumentFragment()).append('<div id="debug-bar"><div id="debug-bar-watch">'+"<div>".concat(L10n.get("debugBarNoWatches"),"</div>>")+"</div><div>"+'<button id="debug-bar-watch-toggle" tabindex="0" title="'.concat(watchToggleLabel,'" aria-label="').concat(watchToggleLabel,'">').concat(L10n.get("debugBarLabelWatch"),"</button>")+'<label id="debug-bar-watch-label" for="debug-bar-watch-input">'.concat(L10n.get("debugBarLabelAdd"),"</label>")+'<input id="debug-bar-watch-input" name="debug-bar-watch-input" type="text" list="debug-bar-watch-list" tabindex="0"><datalist id="debug-bar-watch-list" aria-hidden="true" hidden="hidden"></datalist>'+'<button id="debug-bar-watch-add" tabindex="0" title="'.concat(watchAddLabel,'" aria-label="').concat(watchAddLabel,'"></button>')+'<button id="debug-bar-watch-all" tabindex="0" title="'.concat(watchAllLabel,'" aria-label="').concat(watchAllLabel,'"></button>')+'<button id="debug-bar-watch-none" tabindex="0" title="'.concat(watchNoneLabel,'" aria-label="').concat(watchNoneLabel,'"></button>')+"</div><div>"+'<button id="debug-bar-views-toggle" tabindex="0" title="'.concat(viewsToggleLabel,'" aria-label="').concat(viewsToggleLabel,'">').concat(L10n.get("debugBarLabelViews"),"</button>")+'<label id="debug-bar-turn-label" for="debug-bar-turn-select">'.concat(L10n.get("debugBarLabelTurn"),"</label>")+'<select id="debug-bar-turn-select" tabindex="0"></select></div>'+'<button id="debug-bar-toggle" tabindex="0" title="'.concat(barToggleLabel,'" aria-label="').concat(barToggleLabel,'"></button>')+'</div><div id="debug-bar-hint"></div>').appendTo("body"),_$debugBar=jQuery("#debug-bar"),_$watchBody=jQuery(_$debugBar.find("#debug-bar-watch").get(0)),_$watchList=jQuery(_$debugBar.find("#debug-bar-watch-list").get(0)),_$turnSelect=jQuery(_$debugBar.find("#debug-bar-turn-select").get(0));var $barToggle=jQuery(_$debugBar.find("#debug-bar-toggle").get(0)),$watchToggle=jQuery(_$debugBar.find("#debug-bar-watch-toggle").get(0)),$watchInput=jQuery(_$debugBar.find("#debug-bar-watch-input").get(0)),$watchAdd=jQuery(_$debugBar.find("#debug-bar-watch-add").get(0)),$watchAll=jQuery(_$debugBar.find("#debug-bar-watch-all").get(0)),$watchNone=jQuery(_$debugBar.find("#debug-bar-watch-none").get(0)),$viewsToggle=jQuery(_$debugBar.find("#debug-bar-views-toggle").get(0));$barToggle.ariaClick(debugBarToggle),$watchToggle.ariaClick(debugBarWatchToggle),$watchInput.on(":addwatch",(function(){debugBarWatchAdd(this.value.trim()),this.value=""})).on("keypress",(function(ev){13===ev.which&&(ev.preventDefault(),$watchInput.trigger(":addwatch"))})),$watchAdd.ariaClick((function(){return $watchInput.trigger(":addwatch")})),$watchAll.ariaClick(debugBarWatchAddAll),$watchNone.ariaClick(debugBarWatchClear),_$turnSelect.on("change",(function(){Engine.goTo(Number(this.value))})),$viewsToggle.ariaClick((function(){DebugView.toggle(),_updateSession()})),jQuery(document).on(":historyupdate.debug-bar",_updateTurnSelect).on(":passageend.debug-bar",(function(){_updateWatchBody(),_updateWatchList()})).on(":enginerestart.debug-bar",_clearSession),_hasSession()||DebugView.enable()}},isStowed:{value:function(){return _stowed}},start:{value:function(){(function(){if(!_hasSession())return!1;var debugState=session.get("debugState");_stowed=debugState.stowed,_watchList.push.apply(_watchList,_toConsumableArray(debugState.watchList)),debugState.watchEnabled?_debugBarWatchEnableNoUpdate():_debugBarWatchDisableNoUpdate();debugState.viewsEnabled?DebugView.enable():DebugView.disable()})(),_stowed?debugBarStow():debugBarUnstow(),_updateTurnSelect(),_updateWatchBody(),_updateWatchList()}},stow:{value:debugBarStow},toggle:{value:debugBarToggle},unstow:{value:debugBarUnstow},watch:{value:Object.freeze(Object.defineProperties({},{add:{value:debugBarWatchAdd},all:{value:debugBarWatchAddAll},clear:{value:debugBarWatchClear},delete:{value:debugBarWatchDelete},disable:{value:debugBarWatchDisable},enable:{value:debugBarWatchEnable},isEnabled:{value:debugBarWatchIsEnabled},toggle:{value:debugBarWatchToggle}}))}}))}(),LoadScreen=function(){var _locks=new Set,_autoId=0;function loadScreenHide(){jQuery(document.documentElement).removeAttr("data-init")}function loadScreenShow(){jQuery(document.documentElement).attr("data-init","loading")}return Object.freeze(Object.defineProperties({},{init:{value:function(){jQuery(document).on("readystatechange.SugarCube",(function(){_locks.size>0||("complete"===document.readyState?"loading"===jQuery(document.documentElement).attr("data-init")&&(Config.loadDelay>0?setTimeout((function(){0===_locks.size&&loadScreenHide()}),Math.max(Engine.minDomActionDelay,Config.loadDelay)):loadScreenHide()):loadScreenShow())}))}},clear:{value:function(){jQuery(document).off("readystatechange.SugarCube"),_locks.clear(),loadScreenHide()}},hide:{value:loadScreenHide},show:{value:loadScreenShow},lock:{value:function(){return++_autoId,_locks.add(_autoId),loadScreenShow(),_autoId}},unlock:{value:function(id){if(null==id)throw new Error("LoadScreen.unlock called with a null or undefined ID");_locks.has(id)&&_locks.delete(id),0===_locks.size&&jQuery(document).trigger("readystatechange")}}}))}(),version=Object.freeze({title:"SugarCube",major:2,minor:36,patch:1,prerelease:null,build:9717,date:new Date("2021-12-22T05:37:33.467Z"),extensions:{},toString:function(){var prerelease=this.prerelease?"-".concat(this.prerelease):"";return"".concat(this.major,".").concat(this.minor,".").concat(this.patch).concat(prerelease,"+").concat(this.build)},short:function(){var prerelease=this.prerelease?"-".concat(this.prerelease):"";return"".concat(this.title," (v").concat(this.major,".").concat(this.minor,".").concat(this.patch).concat(prerelease,")")},long:function(){return"".concat(this.title," v").concat(this.toString()," (").concat(this.date.toUTCString(),")")}}),TempState={},macros={},postdisplay={},postrender={},predisplay={},prehistory={},prerender={},session=null,settings={},setup={},storage=null,browser=Browser,config=Config,has=Has,History=State,state=State,tale=Story,TempVariables=State.temporary;window.SugarCube={},jQuery((function(){try{var lockId=LoadScreen.lock();LoadScreen.init(),document.normalize&&document.normalize(),Story.load(),storage=SimpleStore.create(Story.domId,!0),session=SimpleStore.create(Story.domId,!1),Dialog.init(),UIBar.init(),Engine.init(),Story.init(),L10n.init(),session.has("rcWarn")||"cookie"!==storage.name||(session.set("rcWarn",1),window.alert(L10n.get("warningNoWebStorage"))),Save.init(),Setting.init(),Macro.init(),Engine.start(),Config.debug&&DebugBar.init();var $window=$(window),vprCheckId=setInterval((function(){$window.width()&&(clearInterval(vprCheckId),UIBar.start(),Config.debug&&DebugBar.start(),jQuery.event.trigger({type:":storyready"}),setTimeout((function(){return LoadScreen.unlock(lockId)}),2*Engine.minDomActionDelay))}),Engine.minDomActionDelay);Object.defineProperty(window,"SugarCube",{value:Object.seal(Object.assign(Object.create(null),{Browser:Browser,Config:Config,Dialog:Dialog,Engine:Engine,Fullscreen:Fullscreen,Has:Has,L10n:L10n,Macro:Macro,Passage:Passage,Save:Save,Scripting:Scripting,Setting:Setting,SimpleAudio:SimpleAudio,State:State,Story:Story,UI:UI,UIBar:UIBar,DebugBar:DebugBar,Util:Util,Visibility:Visibility,Wikifier:Wikifier,session:session,settings:settings,setup:setup,storage:storage,version:version}))})}catch(ex){return console.error(ex),LoadScreen.clear(),Alert.fatal(null,ex.message,ex)}}))})(window,window.document,jQuery);}
</script>
</body>
</html>