-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhtml5player.js
1736 lines (1736 loc) · 921 KB
/
html5player.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(function(){var f,aa=aa||{},l=this;function n(a){return void 0!==a}function q(a,b,c){a=a.split(".");c=c||l;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&n(b)?c[d]=b:c[d]?c=c[d]:c=c[d]={}}function s(a,b){for(var c=a.split("."),d=b||l,e;e=c.shift();)if(null!=d[e])d=d[e];else return null;return d}function u(){}function ba(a){a.getInstance=function(){return a.Db?a.Db:a.Db=new a}}
function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function da(a){return null===a}function fa(a){return"array"==ca(a)}function ga(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function w(a){return"string"==typeof a}function ha(a){return"number"==typeof a}function ia(a){return"function"==ca(a)}function ja(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ka(a){return a[la]||(a[la]=++ma)}
var la="closure_uid_"+(1E9*Math.random()>>>0),ma=0;function na(a,b,c){return a.call.apply(a.bind,arguments)}function oa(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}
function x(a,b,c){x=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?na:oa;return x.apply(null,arguments)}function pa(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}}function qa(a,b){for(var c in b)a[c]=b[c]}var y=Date.now||function(){return+new Date};function ra(a,b){b&&(a=a.replace(/\{\$([^}]+)}/g,function(a,d){return d in b?b[d]:a}));return a}
function z(a,b){function c(){}c.prototype=b.prototype;a.H=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,g){return b.prototype[c].apply(a,Array.prototype.slice.call(arguments,2))}}Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return x.apply(null,c)}return x(this,a)};function sa(a){if(Error.captureStackTrace)Error.captureStackTrace(this,sa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}z(sa,Error);sa.prototype.name="CustomError";var ua;function va(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}function A(a){return/^[\s\xa0]*$/.test(a)}var wa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function xa(a){return encodeURIComponent(String(a))}function ya(a){return decodeURIComponent(a.replace(/\+/g," "))}
function za(a){if(!Aa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ba,"&"));-1!=a.indexOf("<")&&(a=a.replace(Ca,"<"));-1!=a.indexOf(">")&&(a=a.replace(Da,">"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"""));-1!=a.indexOf("'")&&(a=a.replace(Fa,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Ga,"�"));return a}var Ba=/&/g,Ca=/</g,Da=/>/g,Ea=/"/g,Fa=/'/g,Ga=/\x00/g,Aa=/[\x00&<>"']/;function Ha(a){return Ia(a,"&")?"document"in l?Ja(a):Ka(a):a}
function Ja(a){var b={"&":"&","<":"<",">":">",""":'"'},c;c=l.document.createElement("div");return a.replace(La,function(a,e){var g=b[a];if(g)return g;if("#"==e.charAt(0)){var h=Number("0"+e.substr(1));isNaN(h)||(g=String.fromCharCode(h))}g||(c.innerHTML=a+" ",g=c.firstChild.nodeValue.slice(0,-1));return b[a]=g})}
function Ka(a){return a.replace(/&([^;]+);/g,function(a,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:if("#"==c.charAt(0)){var d=Number("0"+c.substr(1));if(!isNaN(d))return String.fromCharCode(d)}return a}})}var La=/&([^;\s<&]+);?/g;function Ia(a,b){return-1!=a.indexOf(b)}function Ma(a,b){return Ia(a.toLowerCase(),b.toLowerCase())}function Na(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}
function Oa(a,b){return Array(b+1).join(a)}function Pa(a){a=n(void 0)?a.toFixed(void 0):String(a);var b=a.indexOf(".");-1==b&&(b=a.length);return Oa("0",Math.max(0,2-b))+a}function B(a){return null==a?"":String(a)}function Qa(a){return Array.prototype.join.call(arguments,"")}
function Ra(a,b){for(var c=0,d=wa(String(a)).split("."),e=wa(String(b)).split("."),g=Math.max(d.length,e.length),h=0;0==c&&h<g;h++){var k=d[h]||"",m=e[h]||"",p=RegExp("(\\d*)(\\D*)","g"),r=RegExp("(\\d*)(\\D*)","g");do{var t=p.exec(k)||["","",""],v=r.exec(m)||["","",""];if(0==t[0].length&&0==v[0].length)break;c=Sa(0==t[1].length?0:parseInt(t[1],10),0==v[1].length?0:parseInt(v[1],10))||Sa(0==t[2].length,0==v[2].length)||Sa(t[2],v[2])}while(0==c)}return c}function Sa(a,b){return a<b?-1:a>b?1:0}
function Ta(a){for(var b=0,c=0;c<a.length;++c)b=31*b+a.charCodeAt(c),b%=4294967296;return b}var Ua=2147483648*Math.random()|0;function Va(){return"goog_"+Ua++}function Wa(a){var b=Number(a);return 0==b&&A(a)?NaN:b}function Xa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})}function Ya(a){var b=w(void 0)?Na(void 0):"\\s";return a.replace(new RegExp("(^"+(b?"|["+b+"]+":"")+")([a-z])","g"),function(a,b,e){return b+e.toUpperCase()})}
function Za(a){isFinite(a)&&(a=String(a));return w(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};function $a(){};function ab(a){return a[a.length-1]}
var bb=Array.prototype,cb=bb.indexOf?function(a,b,c){return bb.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(w(a))return w(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},db=bb.lastIndexOf?function(a,b,c){return bb.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(w(a))return w(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;
return-1},C=bb.forEach?function(a,b,c){bb.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},eb=bb.filter?function(a,b,c){return bb.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],g=0,h=w(a)?a.split(""):a,k=0;k<d;k++)if(k in h){var m=h[k];b.call(c,m,k,a)&&(e[g++]=m)}return e},D=bb.map?function(a,b,c){return bb.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),g=w(a)?a.split(""):a,h=0;h<d;h++)h in g&&(e[h]=b.call(c,
g[h],h,a));return e},fb=bb.reduce?function(a,b,c,d){d&&(b=x(b,d));return bb.reduce.call(a,b,c)}:function(a,b,c,d){var e=c;C(a,function(c,h){e=b.call(d,e,c,h,a)});return e},gb=bb.some?function(a,b,c){return bb.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1},hb=bb.every?function(a,b,c){return bb.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&!b.call(c,e[g],g,a))return!1;
return!0};function E(a,b,c){b=ib(a,b,c);return 0>b?null:w(a)?a.charAt(b):a[b]}function ib(a,b,c){for(var d=a.length,e=w(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return g;return-1}function jb(a,b){var c=kb(a,b,void 0);return 0>c?null:w(a)?a.charAt(c):a[c]}function kb(a,b,c){for(var d=w(a)?a.split(""):a,e=a.length-1;0<=e;e--)if(e in d&&b.call(c,d[e],e,a))return e;return-1}function lb(a,b){return 0<=cb(a,b)}function mb(a){return 0==a.length}
function nb(a){if(!fa(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}function ob(a,b){lb(a,b)||a.push(b)}function pb(a,b){var c=cb(a,b),d;(d=0<=c)&&qb(a,c);return d}function qb(a,b){bb.splice.call(a,b,1)}function rb(a,b){var c=ib(a,b,void 0);0<=c&&qb(a,c)}function sb(a){return bb.concat.apply(bb,arguments)}function tb(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}
function ub(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;if(fa(d)||(e=ga(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var g=a.length,h=d.length,k=0;k<h;k++)a[g+k]=d[k];else a.push(d)}}function vb(a,b,c,d){bb.splice.apply(a,wb(arguments,1))}function wb(a,b,c){return 2>=arguments.length?bb.slice.call(a,b):bb.slice.call(a,b,c)}
function xb(a,b,c){b=b||a;c=c||function(){return ja(h)?"o"+ka(h):(typeof h).charAt(0)+h};for(var d={},e=0,g=0;g<a.length;){var h=a[g++],k=c(h);Object.prototype.hasOwnProperty.call(d,k)||(d[k]=!0,b[e++]=h)}b.length=e}function yb(a,b,c){c=c||zb;for(var d=0,e=a.length,g;d<e;){var h=d+e>>1,k;k=c(b,a[h]);0<k?d=h+1:(e=h,g=!k)}return g?d:~d}function Ab(a,b){a.sort(b||zb)}function Bb(a,b){var c=zb;Ab(a,function(a,e){return c(b(a),b(e))})}function Cb(a,b){Bb(a,function(a){return a[b]})}
function Db(a,b,c){if(!ga(a)||!ga(b)||a.length!=b.length)return!1;var d=a.length;c=c||Eb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function zb(a,b){return a>b?1:a<b?-1:0}function Eb(a,b){return a===b}function Fb(a,b,c){c=yb(a,b,c);0>c&&vb(a,-(c+1),0,b)}function Gb(a){for(var b=[],c=0;c<a;c++)b[c]=0;return b}
function Hb(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];if(fa(d))for(var e=0;e<d.length;e+=8192)for(var g=wb(d,e,e+8192),g=Hb.apply(null,g),h=0;h<g.length;h++)b.push(g[h]);else b.push(d)}return b};function Ib(a,b,c){return Math.min(Math.max(a,b),c)}function Jb(a,b,c){return a+c*(b-a)};function Kb(a,b){this.x=n(a)?a:0;this.y=n(b)?b:0}f=Kb.prototype;f.clone=function(){return new Kb(this.x,this.y)};function Lb(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1}function Mb(a,b){return new Kb(a.x-b.x,a.y-b.y)}f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
f.scale=function(a,b){var c=ha(b)?b:a;this.x*=a;this.y*=c;return this};function F(a,b){this.width=a;this.height=b}function Nb(a,b){return a==b?!0:a&&b?a.width==b.width&&a.height==b.height:!1}f=F.prototype;f.clone=function(){return new F(this.width,this.height)};f.isEmpty=function(){return!(this.width*this.height)};f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){var c=ha(b)?b:a;this.width*=a;this.height*=c;return this};function Ob(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Pb(a,b,c){var d={},e;for(e in a)b.call(c,a[e],e,a)&&(d[e]=a[e]);return d}function Qb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function Rb(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return!0;return!1}function Sb(a,b){for(var c in a)if(!b.call(void 0,a[c],c,a))return!1;return!0}function Tb(a){var b=0,c;for(c in a)b++;return b}function Ub(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}
function Vb(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Wb(a,b){for(var c=ga(b),d=c?b:arguments,c=c?0:1;c<d.length&&(a=a[d[c]],n(a));c++);return a}function Xb(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Zb(a,b,c){for(var d in a)if(b.call(c,a[d],d,a))return d}function $b(a){var b=ac;return(a=Zb(b,a,void 0))&&b[a]}function bc(a){for(var b in a)return!1;return!0}function cc(a){for(var b in a)delete a[b]}function dc(a,b){b in a&&delete a[b]}
function ec(a,b,c){return b in a?a[b]:c}function fc(a){var b={},c;for(c in a)b[c]=a[c];return b}function gc(a){var b=ca(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=gc(a[c]);return b}return a}function hc(a){var b={},c;for(c in a)b[a[c]]=c;return b}var ic="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
function jc(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var g=0;g<ic.length;g++)c=ic[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}function kc(a){var b=arguments.length;if(1==b&&fa(arguments[0]))return kc.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};var lc;t:{var mc=l.navigator;if(mc){var nc=mc.userAgent;if(nc){lc=nc;break t}}lc=""}function oc(a){return Ia(lc,a)};var pc,qc,rc,sc,tc;function uc(){return l.navigator||null}var vc=oc("Opera")||oc("OPR"),wc=oc("Trident")||oc("MSIE"),xc=oc("Gecko")&&!Ma(lc,"WebKit")&&!(oc("Trident")||oc("MSIE")),yc=Ma(lc,"WebKit"),zc=yc&&oc("Mobile"),Ac=uc(),Bc=Ac&&Ac.platform||"";pc=Ia(Bc,"Mac");qc=Ia(Bc,"Win");var Cc=lc;rc=!!Cc&&Ia(Cc,"Android");sc=!!Cc&&Ia(Cc,"iPhone");tc=!!Cc&&Ia(Cc,"iPad");var Dc=uc(),Ec=!!Dc&&Ia(Dc.appVersion||"","X11");function Fc(){var a=l.document;return a?a.documentMode:void 0}
var Gc=function(){var a="",b;if(vc&&l.opera)return a=l.opera.version,ia(a)?a():a;xc?b=/rv\:([^\);]+)(\)|;)/:wc?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:yc&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(lc))?a[1]:"");return wc&&(b=Fc(),b>parseFloat(a))?String(b):a}(),Hc={};function Ic(a){return Hc[a]||(Hc[a]=0<=Ra(Gc,a))}function Jc(a){return wc&&Kc>=a}var Lc=l.document,Kc=Lc&&wc?Fc()||("CSS1Compat"==Lc.compatMode?parseInt(Gc,10):5):void 0;var Mc=!wc||Jc(9),Nc=!xc&&!wc||wc&&Jc(9)||xc&&Ic("1.9.1"),Oc=wc&&!Ic("9"),Pc=wc||vc||yc;function Qc(a){return a?new Rc(Sc(a)):ua||(ua=new Rc)}function Tc(a){return w(a)?document.getElementById(a):a}function Uc(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):Vc("*",a,b)}function G(a,b){var c=b||document,d=null;c.querySelectorAll&&c.querySelector?d=c.querySelector("."+a):d=Vc("*",a,b)[0];return d||null}
function Vc(a,b,c){var d=document;c=c||d;a=a&&"*"!=a?a.toUpperCase():"";if(c.querySelectorAll&&c.querySelector&&(a||b))return c.querySelectorAll(a+(b?"."+b:""));if(b&&c.getElementsByClassName){c=c.getElementsByClassName(b);if(a){for(var d={},e=0,g=0,h;h=c[g];g++)a==h.nodeName&&(d[e++]=h);d.length=e;return d}return c}c=c.getElementsByTagName(a||"*");if(b){d={};for(g=e=0;h=c[g];g++)a=h.className,"function"==typeof a.split&&lb(a.split(/\s+/),b)&&(d[e++]=h);d.length=e;return d}return c}
function Wc(a,b){Ob(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in Xc?a.setAttribute(Xc[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})}var Xc={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};
function Yc(a){a=a.document;a=Zc(a)?a.documentElement:a.body;return new F(a.clientWidth,a.clientHeight)}function $c(a){var b=ad(a);a=a.parentWindow||a.defaultView;return wc&&Ic("10")&&a.pageYOffset!=b.scrollTop?new Kb(b.scrollLeft,b.scrollTop):new Kb(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)}function ad(a){return!yc&&Zc(a)?a.documentElement:a.body||a.documentElement}function bd(a){return a?a.parentWindow||a.defaultView:window}function H(a,b,c){return cd(document,arguments)}
function cd(a,b){var c=b[0],d=b[1];if(!Mc&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',za(d.name),'"');if(d.type){c.push(' type="',za(d.type),'"');var e={};jc(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(w(d)?c.className=d:fa(d)?c.className=d.join(" "):Wc(c,d));2<b.length&&dd(a,c,b,2);return c}function dd(a,b,c,d){function e(c){c&&b.appendChild(w(c)?a.createTextNode(c):c)}for(;d<c.length;d++){var g=c[d];!ga(g)||ja(g)&&0<g.nodeType?e(g):C(ed(g)?tb(g):g,e)}}
function fd(a){return document.createElement(a)}function gd(a){return document.createTextNode(String(a))}function Zc(a){return"CSS1Compat"==a.compatMode}function hd(a,b){a.appendChild(b)}function id(a,b){dd(Sc(a),a,arguments,1)}function jd(a){for(var b;b=a.firstChild;)a.removeChild(b)}function kd(a,b,c){a.insertBefore(b,a.childNodes[c]||null)}function ld(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function md(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)}
function nd(a){return Nc&&void 0!=a.children?a.children:eb(a.childNodes,function(a){return 1==a.nodeType})}function od(a){return void 0!=a.firstElementChild?a.firstElementChild:pd(a.firstChild)}function pd(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a}function qd(a){var b;if(Pc&&!(wc&&Ic("9")&&!Ic("10")&&l.SVGElement&&a instanceof l.SVGElement)&&(b=a.parentElement))return b;b=a.parentNode;return ja(b)&&1==b.nodeType?b:null}
function rd(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function Sc(a){return 9==a.nodeType?a:a.ownerDocument||a.document}function sd(a){return a.contentWindow||bd(a.contentDocument||a.contentWindow.document)}
function td(a,b){if("textContent"in a)a.textContent=b;else if(3==a.nodeType)a.data=b;else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=b}else{jd(a);var c=Sc(a);a.appendChild(c.createTextNode(String(b)))}}function ud(a,b){var c=[];return wd(a,b,c,!0)?c[0]:void 0}function wd(a,b,c,d){if(null!=a)for(a=a.firstChild;a;){if(b(a)&&(c.push(a),d)||wd(a,b,c,d))return!0;a=a.nextSibling}return!1}
var xd={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},yd={IMG:" ",BR:"\n"};function zd(a){var b;(b="A"==a.tagName||"INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"BUTTON"==a.tagName?!a.disabled&&(!Ad(a)||Bd(a)):Ad(a)&&Bd(a))&&wc?(a=ia(a.getBoundingClientRect)?a.getBoundingClientRect():{height:a.offsetHeight,width:a.offsetWidth},a=null!=a&&0<a.height&&0<a.width):a=b;return a}function Ad(a){a=a.getAttributeNode("tabindex");return null!=a&&a.specified}
function Bd(a){a=a.tabIndex;return ha(a)&&0<=a&&32768>a}function Cd(a,b,c){if(!(a.nodeName in xd))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in yd)b.push(yd[a.nodeName]);else for(a=a.firstChild;a;)Cd(a,b,c),a=a.nextSibling}function ed(a){if(a&&"number"==typeof a.length){if(ja(a))return"function"==typeof a.item||"string"==typeof a.item;if(ia(a))return"function"==typeof a.item}return!1}
function Dd(a,b,c,d){if(!b&&!c)return null;var e=b?b.toUpperCase():null;return Ed(a,function(a){return(!e||a.nodeName==e)&&(!c||w(a.className)&&lb(a.className.split(/\s+/),c))},!0,d)}function Fd(a,b){return Dd(a,null,b,void 0)}function Ed(a,b,c,d){c||(a=a.parentNode);c=null==d;for(var e=0;a&&(c||e<=d);){if(b(a))return a;a=a.parentNode;e++}return null}function Rc(a){this.g=a||l.document||document}f=Rc.prototype;f.L=function(a){return w(a)?this.g.getElementById(a):a};f.setProperties=Wc;
f.OD=function(a,b,c){return cd(this.g,arguments)};f.createElement=function(a){return this.g.createElement(a)};function Gd(a){return Zc(a.g)}function Hd(a){a=a.g;return a.parentWindow||a.defaultView}function Id(a){return $c(a.g)}f.appendChild=hd;f.append=id;f.contains=rd;var Jd="StopIteration"in l?l.StopIteration:Error("StopIteration");function Kd(){}Kd.prototype.next=function(){throw Jd;};Kd.prototype.$b=function(){return this};function Ld(a){if(a instanceof Kd)return a;if("function"==typeof a.$b)return a.$b(!1);if(ga(a)){var b=0,c=new Kd;c.next=function(){for(;;){if(b>=a.length)throw Jd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}
function Md(a,b,c){if(ga(a))try{C(a,b,c)}catch(d){if(d!==Jd)throw d;}else{a=Ld(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(e){if(e!==Jd)throw e;}}}function Nd(a){if(ga(a))return tb(a);a=Ld(a);var b=[];Md(a,function(a){b.push(a)});return b};function Od(a,b){this.j={};this.g=[];this.k=this.ja=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){a instanceof Od?(c=a.La(),d=a.Wa()):(c=Vb(a),d=Ub(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}}f=Od.prototype;f.Sa=function(){return this.ja};f.Wa=function(){Pd(this);for(var a=[],b=0;b<this.g.length;b++)a.push(this.j[this.g[b]]);return a};f.La=function(){Pd(this);return this.g.concat()};
function Qd(a,b){return Rd(a.j,b)}f.ig=function(a){for(var b=0;b<this.g.length;b++){var c=this.g[b];if(Rd(this.j,c)&&this.j[c]==a)return!0}return!1};f.equals=function(a,b){if(this===a)return!0;if(this.ja!=a.Sa())return!1;var c=b||Sd;Pd(this);for(var d,e=0;d=this.g[e];e++)if(!c(this.get(d),a.get(d)))return!1;return!0};function Sd(a,b){return a===b}f.isEmpty=function(){return 0==this.ja};f.clear=function(){this.j={};this.k=this.ja=this.g.length=0};
f.remove=function(a){return Rd(this.j,a)?(delete this.j[a],this.ja--,this.k++,this.g.length>2*this.ja&&Pd(this),!0):!1};function Pd(a){if(a.ja!=a.g.length){for(var b=0,c=0;b<a.g.length;){var d=a.g[b];Rd(a.j,d)&&(a.g[c++]=d);b++}a.g.length=c}if(a.ja!=a.g.length){for(var e={},c=b=0;b<a.g.length;)d=a.g[b],Rd(e,d)||(a.g[c++]=d,e[d]=1),b++;a.g.length=c}}f.get=function(a,b){return Rd(this.j,a)?this.j[a]:b};f.set=function(a,b){Rd(this.j,a)||(this.ja++,this.g.push(a),this.k++);this.j[a]=b};
f.forEach=function(a,b){for(var c=this.La(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};f.clone=function(){return new Od(this)};f.$b=function(a){Pd(this);var b=0,c=this.g,d=this.j,e=this.k,g=this,h=new Kd;h.next=function(){for(;;){if(e!=g.k)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Jd;var h=c[b++];return a?h:d[h]}};return h};function Rd(a,b){return Object.prototype.hasOwnProperty.call(a,b)};function Td(a){return"function"==typeof a.Sa?a.Sa():ga(a)||w(a)?a.length:Tb(a)}function Ud(a){if("function"==typeof a.Wa)return a.Wa();if(w(a))return a.split("");if(ga(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ub(a)}function Vd(a){if("function"==typeof a.La)return a.La();if("function"!=typeof a.Wa){if(ga(a)||w(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Vb(a)}}
function Wd(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(ga(a)||w(a))C(a,b,void 0);else for(var c=Vd(a),d=Ud(a),e=d.length,g=0;g<e;g++)b.call(void 0,d[g],c&&c[g],a)}function Xd(a,b,c){if("function"==typeof a.every)return a.every(b,c);if(ga(a)||w(a))return hb(a,b,c);for(var d=Vd(a),e=Ud(a),g=e.length,h=0;h<g;h++)if(!b.call(c,e[h],d&&d[h],a))return!1;return!0};var Yd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Zd(a){if($d){$d=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=ae(c))&&c!=b.hostname)throw $d=!0,Error();}}return a.match(Yd)}var $d=yc;function be(a){return a?decodeURI(a):a}function ae(a){return be(Zd(a)[3]||null)}
function ce(a){if(a[1]){var b=a[0],c=b.indexOf("#");0<=c&&(a.push(b.substr(c)),a[0]=b=b.substr(0,c));c=b.indexOf("?");0>c?a[1]="?":c==b.length-1&&(a[1]=void 0)}return a.join("")}function de(a,b,c){if(fa(b))for(var d=0;d<b.length;d++)de(a,String(b[d]),c);else null!=b&&c.push("&",a,""===b?"":"=",xa(b))}function ee(a,b,c){Math.max(b.length-(c||0),0);for(c=c||0;c<b.length;c+=2)de(b[c],b[c+1],a);return a}function fe(a,b){for(var c in b)de(c,b[c],a);return a}
function ge(a){a=fe([],a);a[0]="";return a.join("")}function he(a,b){return ce(2==arguments.length?ee([a],arguments[1],0):ee([a],arguments,1))}function ie(a,b){return ce(fe([a],b))}function je(a,b,c,d){for(var e=c.length;0<=(b=a.indexOf(c,b))&&b<d;){var g=a.charCodeAt(b-1);if(38==g||63==g)if(g=a.charCodeAt(b+e),!g||61==g||38==g||35==g)return b;b+=e+1}return-1}var ke=/#|$/,le=/[?&]($|#)/;
function me(a,b,c){for(var d=a.search(ke),e=0,g,h=[];0<=(g=je(a,e,b,d));)h.push(a.substring(e,g)),e=Math.min(a.indexOf("&",g)+1||d,d);h.push(a.substr(e));a=[h.join("").replace(le,"$1"),"&",b];null!=c&&a.push("=",xa(c));return ce(a)};function J(a,b){var c;a instanceof J?(this.We=n(b)?b:a.We,ne(this,a.Ib),this.Ve=a.Ve,oe(this,a.ob),pe(this,a.pd),qe(this,a.Kb),re(this,a.g.clone()),this.Pf=a.Ag()):a&&(c=Zd(String(a)))?(this.We=!!b,ne(this,c[1]||"",!0),this.Ve=se(c[2]||""),oe(this,c[3]||"",!0),pe(this,c[4]),qe(this,c[5]||"",!0),re(this,c[6]||"",!0),this.Pf=se(c[7]||"")):(this.We=!!b,this.g=new te(null,0,this.We))}f=J.prototype;f.Ib="";f.Ve="";f.ob="";f.pd=null;f.Kb="";f.Pf="";f.We=!1;
f.toString=function(){var a=[],b=this.Ib;b&&a.push(ue(b,ve,!0),":");if(b=this.ob){a.push("//");var c=this.Ve;c&&a.push(ue(c,ve,!0),"@");a.push(xa(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.pd;null!=b&&a.push(":",String(b))}if(b=this.Kb)this.ob&&"/"!=b.charAt(0)&&a.push("/"),a.push(ue(b,"/"==b.charAt(0)?we:xe,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ag())&&a.push("#",ue(b,ye));return a.join("")};
f.resolve=function(a){var b=this.clone(),c=!!a.Ib;c?ne(b,a.Ib):c=!!a.Ve;c?b.Ve=a.Ve:c=!!a.ob;c?oe(b,a.ob):c=null!=a.pd;var d=a.Kb;if(c)pe(b,a.pd);else if(c=!!a.Kb){if("/"!=d.charAt(0))if(this.ob&&!this.Kb)d="/"+d;else{var e=b.Kb.lastIndexOf("/");-1!=e&&(d=b.Kb.substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(Ia(e,"./")||Ia(e,"/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),g=[],h=0;h<e.length;){var k=e[h++];"."==k?d&&h==e.length&&g.push(""):".."==k?((1<g.length||1==g.length&&""!=g[0])&&
g.pop(),d&&h==e.length&&g.push("")):(g.push(k),d=!0)}d=g.join("/")}else d=e}c?qe(b,d):c=""!==a.g.toString();c?re(b,se(a.g.toString())):c=!!a.Pf;c&&(b.Pf=a.Ag());return b};f.clone=function(){return new J(this)};function ne(a,b,c){a.Ib=c?se(b,!0):b;a.Ib&&(a.Ib=a.Ib.replace(/:$/,""));return a}function ze(a){return a.ob}function oe(a,b,c){a.ob=c?se(b,!0):b;return a}function pe(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.pd=b}else a.pd=null;return a}
function qe(a,b,c){a.Kb=c?se(b,!0):b}function re(a,b,c){b instanceof te?(a.g=b,Ae(a.g,a.We)):(c||(b=ue(b,Be)),a.g=new te(b,0,a.We));return a}function Ce(a){return a.g}f.Ip=function(){return this.g.toString()};function K(a,b,c){a.g.set(b,c);return a}function De(a,b,c){fa(c)||(c=[String(c)]);Ee(a.g,b,c)}function Fe(a,b){return a.g.get(b)}f.Ag=function(){return this.Pf};
function Ge(a){K(a,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^y()).toString(36));return a}function He(a){return a instanceof J?a.clone():new J(a,void 0)}function Ie(a,b,c,d){var e=new J(null,void 0);a&&ne(e,a);b&&oe(e,b);c&&pe(e,c);d&&qe(e,d);return e}function se(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function ue(a,b,c){return w(a)?(a=encodeURI(a).replace(b,Je),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}
function Je(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ve=/[#\/\?@]/g,xe=/[\#\?:]/g,we=/[\#\?]/g,Be=/[\#\?@]/g,ye=/#/g;function te(a,b,c){this.g=a||null;this.j=!!c}function Ke(a){if(!a.cb&&(a.cb=new Od,a.ja=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,g=null;0<=d?(e=b[c].substring(0,d),g=b[c].substring(d+1)):e=b[c];e=ya(e);e=Le(a,e);a.add(e,g?ya(g):"")}}f=te.prototype;f.cb=null;f.ja=null;f.Sa=function(){Ke(this);return this.ja};
f.add=function(a,b){Ke(this);this.g=null;a=Le(this,a);var c=this.cb.get(a);c||this.cb.set(a,c=[]);c.push(b);this.ja++;return this};f.remove=function(a){Ke(this);a=Le(this,a);return Qd(this.cb,a)?(this.g=null,this.ja-=this.cb.get(a).length,this.cb.remove(a)):!1};f.clear=function(){this.cb=this.g=null;this.ja=0};f.isEmpty=function(){Ke(this);return 0==this.ja};function Me(a,b){Ke(a);b=Le(a,b);return Qd(a.cb,b)}f.ig=function(a){var b=this.Wa();return lb(b,a)};
f.La=function(){Ke(this);for(var a=this.cb.Wa(),b=this.cb.La(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};f.Wa=function(a){Ke(this);var b=[];if(w(a))Me(this,a)&&(b=sb(b,this.cb.get(Le(this,a))));else{a=this.cb.Wa();for(var c=0;c<a.length;c++)b=sb(b,a[c])}return b};f.set=function(a,b){Ke(this);this.g=null;a=Le(this,a);Me(this,a)&&(this.ja-=this.cb.get(a).length);this.cb.set(a,[b]);this.ja++;return this};
f.get=function(a,b){var c=a?this.Wa(a):[];return 0<c.length?String(c[0]):b};function Ee(a,b,c){a.remove(b);0<c.length&&(a.g=null,a.cb.set(Le(a,b),tb(c)),a.ja+=c.length)}f.toString=function(){if(this.g)return this.g;if(!this.cb)return"";for(var a=[],b=this.cb.La(),c=0;c<b.length;c++)for(var d=b[c],e=xa(d),d=this.Wa(d),g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+xa(d[g]));a.push(h)}return this.g=a.join("&")};
f.clone=function(){var a=new te;a.g=this.g;this.cb&&(a.cb=this.cb.clone(),a.ja=this.ja);return a};function Le(a,b){var c=String(b);a.j&&(c=c.toLowerCase());return c}function Ae(a,b){b&&!a.j&&(Ke(a),a.g=null,a.cb.forEach(function(a,b){var e=b.toLowerCase();b!=e&&(this.remove(b),Ee(this,e,a))},a));a.j=b};var Ne=/^https?:\/\/([-\w.]+\.youtube(education)?\.com\/|[a-z0-9\-]{1,63}\.([a-z]{3}|i)\.corp\.google\.com\/|0\.borg-playground-[a-z0-9\-]+\.youtube-dev\.([a-z]{2}|i)\.borg\.google\.com(:[0-9]+)?\/|yt-devenv-shared\.corp\.google\.com\/|(docs|drive)\.google\.com\/(a\/[^/\\%]+\/|)|play\.google\.com\/)/,Oe=/^https?:\/\/([A-Za-z0-9-]{1,63}\.)*(corp\.google\.com|borg\.google\.com|prod\.google\.com|video\.google\.com|youtube\.com|youtube\.googleapis\.com|youtube-nocookie\.com|youtubeeducation\.com)(:[0-9]+)?([\/\?\#]|$)/,
Pe=/^https?:\/\/([A-Za-z0-9-]{1,63}\.)*(corp\.google\.com|borg\.google\.com|prod\.google\.com|video\.google\.com|youtube\.com|youtube\.googleapis\.com|youtube-nocookie\.com|youtubeeducation\.com)(:[0-9]+)?\/embed\//,Qe=/^https?:\/\/([A-Za-z0-9-]{1,63}\.)*(corp\.google\.com|borg\.google\.com|gdata\.youtube\.com|prod\.google\.com)(:[0-9]+)?([\/\?\#]|$)/,Re=/^(https?:\/\/(lh|dp|gp)[3-6]\.googleusercontent\.com(:[0-9]+)?\/)?[A-Za-z0-9_/-]+photo\.jpg($|\?)|^https?:\/\/(s2\.googleusercontent\.com\/s2\/favicons\?|yt[3-4]\.ggpht\.com\/|([A-Za-z0-9-]{1,63}\.)*(corp\.google\.com|borg\.google\.com|docs\.google\.com|drive\.google\.com|googleplex\.com|play\.google\.com|prod\.google\.com|sandbox\.google\.com|plus\.google\.com|video\.google\.com|youtube\.com|ytimg\.com)(:[0-9]+)?([\/\?\#]|$))/,
Se=/^https?:\/\/(secure\-..\.imrworldwide\.com\/|cdn\.imrworldwide\.com\/|aksecure\.imrworldwide\.com\/)/,Te=/^https?:\/\/(www\.google\.com\/(aclk|pagead\/conversion)|googleadservices\.com\/(aclk|pagead\/conversion)|googleads\.g\.doubleclick\.net\/(aclk|pagead\/conversion))/,Ue=/^https?:\/\/(www\.google\.com\/pagead\/sul|www\.youtube\.com\/gen_204\?a=sul)/,Xe=/^https?:\/\/([A-Za-z0-9-]{1,63}\.)*(ba\.l\.google\.com|c\.googlesyndication\.com|corp\.google\.com|borg\.google\.com|docs\.google\.com|drive\.google\.com|googleplex\.com|googlevideo\.com|play\.google\.com|prod\.google\.com|sandbox\.google\.com|plus\.google\.com|ed\.video\.google\.com|vp\.video\.l\.google\.com|youtube\.com|youtubeeducation\.com)(:[0-9]+)?([\/\?\#]|$)/,
Ye=/^https?:\/\/(www\.gstatic\.com\/doubleclick\/studio\/innovation\/ytplayer|www\.gstatic\.com\/doubleclick\/studio\/innovation\/h5\/layouts\/tetris|tpc\.googlesyndication\.com\/pagead\/gadgets\/|([A-Za-z0-9-]{1,63}\.)*(imasdk\.googleapis\.com|2mdn\.net|googlesyndication\.com|corp\.google\.com|borg\.google\.com|googleads\.g\.doubleclick\.net|prod\.google\.com|static\.doubleclick\.net|static\.googleadsserving\.cn|studioapi\.doubleclick\.net|youtube\.com|youtube\.googleapis\.com|youtube-nocookie\.com|youtubeeducation\.com|ytimg\.com)(:[0-9]+)?([\/\?\#]|$))/,
Ze=/^https?:\/\/(sf\.api\.[a-z0-9\-]+\.km\.playstation\.net\/|([A-Za-z0-9-]{1,63}\.)*(themis\.dl\.playstation\.net)(:[0-9]+)?([\/\?\#]|$))/,$e=/^https?:\/\/((www\.|encrypted\.)?google(\.com|\.co)?\.[a-z]{2,3}\/(search|webhp)\?|24e12c4a-a-95274a9c-s-sites.googlegroups.com\/a\/google.com\/flash-api-test-harness\/apiharness.swf|([A-Za-z0-9-]{1,63}\.)*(corp\.google\.com|borg\.google\.com|docs\.google\.com|drive\.google\.com|googleplex\.com|play\.google\.com|prod\.google\.com|sandbox\.google\.com|plus\.google\.com|mail\.google\.com|talkgadget\.google\.com|survey\.g\.doubleclick\.net|youtube\.com|youtube\.googleapis\.com|youtube-nocookie\.com|youtubeeducation\.com|vevo\.com)(:[0-9]+)?([\/\?\#]|$))/;var af=window.yt&&window.yt.config_||{};q("yt.config_",af,void 0);q("yt.tokens_",window.yt&&window.yt.tokens_||{},void 0);var bf=window.yt&&window.yt.msgs_||{};q("yt.msgs_",bf,void 0);function cf(a){df(af,arguments)}function ef(a){return a in af?af[a]:void 0}function L(a,b){ia(a)&&(a=ff(a));return window.setTimeout(a,b)}function gf(a,b){ia(a)&&(a=ff(a));return window.setInterval(a,b)}function M(a){window.clearTimeout(a)}function hf(a){window.clearInterval(a)}
function ff(a){return a&&window.yterr?function(){try{return a.apply(this,arguments)}catch(b){throw jf(b),b;}}:a}function jf(a){var b=s("yt.www.errors.log");b?b(a,void 0):(b=ef("ERRORS")||[],b.push([a,void 0]),cf("ERRORS",b))}function kf(a){df(bf,arguments)}function lf(a,b,c){var d=b||{};if(a=a in bf?bf[a]:c)for(var e in d)a=a.replace(new RegExp("\\$"+e,"gi"),function(){return d[e]});return a}
ra=function(a,b){var c=b||{},d=a in bf?bf[a]:a;if(d)for(var e in c)var g=(""+c[e]).replace(/\$/g,"$$$$"),d=d.replace(new RegExp("\\{\\$"+e+"\\}","gi"),g),d=d.replace(new RegExp("\\$"+e,"gi"),g);return d};function df(a,b){if(1<b.length){var c=b[0];a[c]=b[1]}else{var d=b[0];for(c in d)a[c]=d[c]}};var mf="corp.google.com googleplex.com youtube.com youtube-nocookie.com youtubeeducation.com borg.google.com prod.google.com sandbox.google.com docs.google.com drive.google.com mail.google.com plus.google.com play.google.com googlevideo.com talkgadget.google.com survey.g.doubleclick.net youtube.googleapis.com vevo.com".split(" "),nf="2mdn.net corp.google.com imasdk.googleapis.com static.doubleclick.net tpc.googlesyndication.com/pagead/gadgets gstatic.com/doubleclick/studio/innovation/h5/layouts/tetris studioapi.doubleclick.net googleads.g.doubleclick.net gstatic.com/doubleclick/studio/innovation/ytplayer".split(" "),
of="";function pf(a){return a&&a==of?!0:qf(a,mf)?(of=a,!0):!1}function rf(a){var b=!!a&&-1!=a.search($e),c=pf(a)||qf(a,nf);b!=c&&jf(Error("isTrustedLoader("+a+") behavior is not consistent"));return c}function sf(a){return!!a&&-1!=a.search(Re)}function tf(a){return!!a&&-1!=a.search(Ye)}function qf(a,b){return(new RegExp("^(https?:)?//([a-z0-9-]{1,63}\\.)*("+b.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i")).test(a)}
function uf(a){
console.log(a);
a=new J(a);
ne(a,document.location.protocol);
oe(a,document.location.hostname);
document.location.port&&pe(a,document.location.port);
console.log(a);
return a.toString()
}
function vf(a){a=new J(a);ne(a,document.location.protocol);return a.toString()};var wf={},xf=0,yf=s("yt.net.ping.workerUrl_")||null;q("yt.net.ping.workerUrl_",yf,void 0);function zf(a,b,c){a&&(c?a&&(a=H("iframe",{src:'javascript:"data:text/html,<body><img src=\\"'+a+'\\"></body>"',style:"display:none"}),Sc(a).body.appendChild(a)):Af(a,b))}function Af(a,b){var c=new Image,d=""+xf++;wf[d]=c;c.onload=c.onerror=function(){b&&wf[d]&&b();delete wf[d]};c.src=a;c=eval("null")};function Bf(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);}function Cf(a){return eval("("+a+")")}function Df(a){return Ef(new Ff(void 0),a)}function Ff(a){this.g=a}
function Ef(a,b){var c=[];Gf(a,b,c);return c.join("")}
function Gf(a,b,c){switch(typeof b){case "string":Hf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(fa(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Gf(a,a.g?a.g.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),Hf(g,c),
c.push(":"),Gf(a,a.g?a.g.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var If={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Jf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function Hf(a,b){b.push('"',a.replace(Jf,function(a){if(a in If)return If[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return If[a]=e+b.toString(16)}),'"')};function Kf(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}f=Kf.prototype;f.getHeight=function(){return this.bottom-this.top};f.clone=function(){return new Kf(this.top,this.right,this.bottom,this.left)};f.contains=function(a){return this&&a?a instanceof Kf?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
f.scale=function(a,b){var c=ha(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function Lf(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}f=Lf.prototype;f.clone=function(){return new Lf(this.left,this.top,this.width,this.height)};function Mf(a){return new Lf(a.left,a.top,a.right-a.left,a.bottom-a.top)}function Nf(a,b){return a==b?!0:a&&b?a.left==b.left&&a.width==b.width&&a.top==b.top&&a.height==b.height:!1}
f.contains=function(a){return a instanceof Lf?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};function Of(a){return new F(a.width,a.height)}f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){var c=ha(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function Pf(a){Pf[" "](a);return a}Pf[" "]=u;function Qf(a,b){try{return Pf(a[b]),!0}catch(c){}return!1};function Rf(){return yc?"Webkit":xc?"Moz":wc?"ms":vc?"O":null}function Sf(){return yc?"-webkit":xc?"-moz":wc?"-ms":vc?"-o":null}function Tf(a,b){if(b&&a in b)return a;var c=Rf();return c?(c=c.toLowerCase(),c+=Ya(a),!n(b)||c in b?c:null):null};function Uf(a,b,c){if(w(b))(b=Vf(a,b))&&(a.style[b]=c);else for(var d in b){c=a;var e=b[d],g=Vf(c,d);g&&(c.style[g]=e)}}function Vf(a,b){var c=Xa(b);if(void 0===a.style[c]){var d=Rf()+Ya(c);if(void 0!==a.style[d])return d}return c}function Wf(a,b){var c=Sc(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function Xf(a,b){return Wf(a,b)||(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]}
function Yf(a,b,c){var d,e=xc&&(pc||Ec)&&Ic("1.9");b instanceof Kb?(d=b.x,b=b.y):(d=b,b=c);a.style.left=Zf(d,e);a.style.top=Zf(b,e)}function $f(a){return new Kb(a.offsetLeft,a.offsetTop)}function ag(a){var b;try{b=a.getBoundingClientRect()}catch(c){return{left:0,top:0,right:0,bottom:0}}wc&&a.ownerDocument.body&&(a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop);return b}
function bg(a){if(wc&&!Jc(8))return a.offsetParent;var b=Sc(a),c=Xf(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Xf(a,"position"),d=d&&"static"==c&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||"fixed"==c||"absolute"==c||"relative"==c))return a;return null}
function cg(a){for(var b=new Kf(0,Infinity,Infinity,0),c=Qc(a),d=c.g.body,e=c.g.documentElement,g=ad(c.g);a=bg(a);)if(!(wc&&0==a.clientWidth||yc&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=Xf(a,"overflow")){var h=dg(a),k;k=a;if(xc&&!Ic("1.9")){var m=parseFloat(Wf(k,"borderLeftWidth"));if(eg(k))var p=k.offsetWidth-k.clientWidth-m-parseFloat(Wf(k,"borderRightWidth")),m=m+p;k=new Kb(m,parseFloat(Wf(k,"borderTopWidth")))}else k=new Kb(k.clientLeft,k.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,
h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=Yc(Hd(c)||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null}
function dg(a){var b,c=Sc(a),d=Xf(a,"position"),e=xc&&c.getBoxObjectFor&&!a.getBoundingClientRect&&"absolute"==d&&(b=c.getBoxObjectFor(a))&&(0>b.screenX||0>b.screenY),g=new Kb(0,0),h;b=c?Sc(c):document;h=!wc||Jc(9)||Gd(Qc(b))?b.documentElement:b.body;if(a==h)return g;if(a.getBoundingClientRect)b=ag(a),a=Id(Qc(c)),g.x=b.left+a.x,g.y=b.top+a.y;else if(c.getBoxObjectFor&&!e)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(h),g.x=b.screenX-a.screenX,g.y=b.screenY-a.screenY;else{b=a;do{g.x+=b.offsetLeft;g.y+=
b.offsetTop;b!=a&&(g.x+=b.clientLeft||0,g.y+=b.clientTop||0);if(yc&&"fixed"==Xf(b,"position")){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(vc||yc&&"absolute"==d)g.y-=c.body.offsetTop;for(b=a;(b=bg(b))&&b!=c.body&&b!=h;)g.x-=b.scrollLeft,vc&&"TR"==b.tagName||(g.y-=b.scrollTop)}return g}function fg(a,b){var c=new Kb(0,0),d=bd(Sc(a)),e=a;do{var g=d==b?dg(e):gg(e);c.x+=g.x;c.y+=g.y}while(d&&d!=b&&(e=d.frameElement)&&(d=d.parent));return c}
function gg(a){var b;if(a.getBoundingClientRect)b=ag(a),b=new Kb(b.left,b.top);else{b=Id(Qc(a));var c=dg(a);b=new Kb(c.x-b.x,c.y-b.y)}if(xc&&!Ic(12)){i:{c=Xa("transform");if(void 0===a.style[c]&&(c=Rf()+Ya(c),void 0!==a.style[c])){c=Sf()+"-transform";break i}c="transform"}a=(a=Xf(a,c)||Xf(a,"transform"))?(a=a.match(hg))?new Kb(parseFloat(a[1]),parseFloat(a[2])):new Kb(0,0):new Kb(0,0);a=new Kb(b.x+a.x,b.y+a.y)}else a=b;return a}
function ig(a){if(1==a.nodeType)return gg(a);var b=ia(a.kE),c=a;a.targetTouches&&a.targetTouches.length?c=a.targetTouches[0]:b&&a.g.targetTouches&&a.g.targetTouches.length&&(c=a.g.targetTouches[0]);return new Kb(c.clientX,c.clientY)}function jg(a,b,c){if(b instanceof F)c=b.height,b=b.width;else if(void 0==c)throw Error("missing height argument");kg(a,b);a.style.height=Zf(c,!0)}function Zf(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a}function kg(a,b){a.style.width=Zf(b,!0)}
function lg(a){return mg(a)}function mg(a){var b=ng;if("none"!=Xf(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=g;c.visibility=e;return a}function ng(a){var b=a.offsetWidth,c=a.offsetHeight,d=yc&&!b&&!c;return n(b)&&!d||!a.getBoundingClientRect?new F(b,c):(a=ag(a),new F(a.right-a.left,a.bottom-a.top))}
function og(a){var b=dg(a);a=mg(a);return new Lf(b.x,b.y,a.width,a.height)}function pg(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*b+")")}function qg(a,b){a.style.display=b?"":"none"}function eg(a){return"rtl"==Xf(a,"direction")}
function rg(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var e=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return e}function sg(a,b){var c=a.currentStyle?a.currentStyle[b]:null;return c?rg(a,c):0}var tg={thin:2,medium:4,thick:6};
function ug(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;return c in tg?tg[c]:rg(a,c)}function vg(a){if(wc&&!Jc(9)){var b=ug(a,"borderLeft"),c=ug(a,"borderRight"),d=ug(a,"borderTop");a=ug(a,"borderBottom");return new Kf(d,c,a,b)}b=Wf(a,"borderLeftWidth");c=Wf(a,"borderRightWidth");d=Wf(a,"borderTopWidth");a=Wf(a,"borderBottomWidth");return new Kf(parseFloat(d),parseFloat(c),parseFloat(a),parseFloat(b))}
var wg=/[^\d]+$/,xg={cm:1,"in":1,mm:1,pc:1,pt:1},yg={em:1,ex:1};function zg(a){var b=Xf(a,"fontSize"),c;c=(c=b.match(wg))&&c[0]||null;if(b&&"px"==c)return parseInt(b,10);if(wc){if(c in xg)return rg(a,b);if(a.parentNode&&1==a.parentNode.nodeType&&c in yg)return a=a.parentNode,c=Xf(a,"fontSize"),rg(a,b==c?"1em":b)}c=H("span",{style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});a.appendChild(c);b=c.offsetHeight;ld(c);return b}var hg=/matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;function Ag(a){if(a.classList)return a.classList;a=a.className;return w(a)&&a.match(/\S+/g)||[]}function Bg(a,b){return a.classList?a.classList.contains(b):lb(Ag(a),b)}function N(a,b){a.classList?a.classList.add(b):Bg(a,b)||(a.className+=0<a.className.length?" "+b:b)}function Cg(a,b){if(a.classList)C(b,function(b){N(a,b)});else{var c={};C(Ag(a),function(a){c[a]=!0});C(b,function(a){c[a]=!0});a.className="";for(var d in c)a.className+=0<a.className.length?" "+d:d}}
function Dg(a,b){a.classList?a.classList.remove(b):Bg(a,b)&&(a.className=eb(Ag(a),function(a){return a!=b}).join(" "))}function Eg(a,b){a.classList?C(b,function(b){Dg(a,b)}):a.className=eb(Ag(a),function(a){return!lb(b,a)}).join(" ")}function O(a,b,c){c?N(a,b):Dg(a,b)}function Fg(a,b){var c=!Bg(a,b);O(a,b,c)};function Gg(a,b,c){a&&(a.dataset?a.dataset[Hg(b)]=c:a.setAttribute("data-"+b,c))}function Ig(a,b){return a?a.dataset?a.dataset[Hg(b)]:a.getAttribute("data-"+b):null}function Jg(a,b){a&&(a.dataset?delete a.dataset[Hg(b)]:a.removeAttribute("data-"+b))}var Kg={};function Hg(a){return Kg[a]||(Kg[a]=String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var Lg=yc?"webkit":xc?"moz":wc?"ms":vc?"o":"";function Mg(a){var b=a.__yt_uid_key;b||(b=Ng(),a.__yt_uid_key=b);return b}var Ng=s("yt.dom.getNextId_");if(!Ng){Ng=function(){return++Og};q("yt.dom.getNextId_",Ng,void 0);var Og=0}function Pg(a,b){var c=Vc(a,null,b);return c.length?c[0]:null}function Qg(a,b){if(a in b)return b[a];var c=Lg+a.charAt(0).toUpperCase()+a.substr(1);if(c in b)return b[c]}function Rg(a,b){var c;gb(a,function(a){c=Qg(a,b);return!!c});return c}
function Sg(a){O(document.body,"hide-players",!0);a&&O(a,"preserve-players",!0)}function Tg(){O(document.body,"hide-players",!1);var a=Uc("preserve-players");C(a,function(a){Dg(a,"preserve-players")})};function Ug(a){if(a=a||window.event){for(var b in a)b in Vg||(this[b]=a[b]);this.scale=a.scale;this.rotation=a.rotation;this.Vb=a;(b=a.target||a.srcElement)&&3==b.nodeType&&(b=b.parentNode);this.target=b;if(b=a.relatedTarget)try{b=b.nodeName?b:null}catch(c){b=null}else"mouseover"==this.type?b=a.fromElement:"mouseout"==this.type&&(b=a.toElement);this.relatedTarget=b;this.clientX=void 0!=a.clientX?a.clientX:a.pageX;this.clientY=void 0!=a.clientY?a.clientY:a.pageY;this.keyCode=a.keyCode?a.keyCode:a.which;
this.charCode=a.charCode||("keypress"==this.type?this.keyCode:0);this.altKey=a.altKey;this.ctrlKey=a.ctrlKey;this.shiftKey=a.shiftKey;"MozMousePixelScroll"==this.type?(this.wheelDeltaX=a.axis==a.HORIZONTAL_AXIS?a.detail:0,this.wheelDeltaY=a.axis==a.HORIZONTAL_AXIS?0:a.detail):window.opera?(this.wheelDeltaX=0,this.wheelDeltaY=a.detail):0==a.wheelDelta%120?"WebkitTransform"in document.documentElement.style?window.chrome&&0==navigator.platform.indexOf("Mac")?(this.wheelDeltaX=a.wheelDeltaX/-30,this.wheelDeltaY=
a.wheelDeltaY/-30):(this.wheelDeltaX=a.wheelDeltaX/-1.2,this.wheelDeltaY=a.wheelDeltaY/-1.2):(this.wheelDeltaX=0,this.wheelDeltaY=a.wheelDelta/-1.6):(this.wheelDeltaX=a.wheelDeltaX/-3,this.wheelDeltaY=a.wheelDeltaY/-3);this.g=a.pageX;this.j=a.pageY}}function Wg(a){if(document.body&&document.documentElement){var b=document.body.scrollTop+document.documentElement.scrollTop;a.g=a.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);a.j=a.clientY+b}}
function Xg(a){n(a.g)||Wg(a);return a.g}function Yg(a){n(a.j)||Wg(a);return a.j}f=Ug.prototype;f.Vb=null;f.type="";f.target=null;f.relatedTarget=null;f.currentTarget=null;f.data=null;f.source=null;f.state=null;f.keyCode=0;f.charCode=0;f.altKey=!1;f.ctrlKey=!1;f.shiftKey=!1;f.clientX=0;f.clientY=0;f.wheelDeltaX=0;f.wheelDeltaY=0;f.rotation=0;f.scale=1;f.touches=null;f.changedTouches=null;f.preventDefault=function(){this.Vb.returnValue=!1;this.Vb.preventDefault&&this.Vb.preventDefault()};
f.stopPropagation=function(){this.Vb.cancelBubble=!0;this.Vb.stopPropagation&&this.Vb.stopPropagation()};f.stopImmediatePropagation=function(){this.Vb.cancelBubble=!0;this.Vb.stopImmediatePropagation&&this.Vb.stopImmediatePropagation()};var Vg={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,scale:1,rotation:1};var Zg=s("yt.events.listeners_")||{};q("yt.events.listeners_",Zg,void 0);var $g=s("yt.events.counter_")||{count:0};q("yt.events.counter_",$g,void 0);function ah(a,b,c,d){return Zb(Zg,function(e){return e[0]==a&&e[1]==b&&e[2]==c&&e[4]==!!d})}
function P(a,b,c,d){if(!a||!a.addEventListener&&!a.attachEvent)return"";d=!!d;var e=ah(a,b,c,d);if(e)return e;var e=++$g.count+"",g=!("mouseenter"!=b&&"mouseleave"!=b||!a.addEventListener||"onmouseenter"in document),h;h=g?function(d){d=new Ug(d);if(!Ed(d.relatedTarget,function(b){return b==a},!0))return d.currentTarget=a,d.type=b,c.call(a,d)}:function(b){b=new Ug(b);b.currentTarget=a;return c.call(a,b)};h=ff(h);Zg[e]=[a,b,c,h,d];a.addEventListener?"mouseenter"==b&&g?a.addEventListener("mouseover",
h,d):"mouseleave"==b&&g?a.addEventListener("mouseout",h,d):"mousewheel"==b&&"MozBoxSizing"in document.documentElement.style?a.addEventListener("MozMousePixelScroll",h,d):a.addEventListener(b,h,d):a.attachEvent("on"+b,h);return e}function bh(a,b){var c;c=P(a,"playing",function(){ch(c);b.apply(a,arguments)},void 0)}function eh(a,b,c,d){return fh(a,b,c,function(a){return Bg(a,d)})}
function fh(a,b,c,d){var e=a||document;return P(e,b,function(a){var b=Ed(a.target,function(a){return a===e||d(a)},!0);b&&b!==e&&!b.disabled&&(a.currentTarget=b,c.call(b,a))})}function ch(a){a&&("string"==typeof a&&(a=[a]),C(a,function(a){if(a in Zg){var c=Zg[a],d=c[0],e=c[1],g=c[3],c=c[4];d.removeEventListener?d.removeEventListener(e,g,c):d.detachEvent&&d.detachEvent("on"+e,g);delete Zg[a]}}))}function gh(a){for(var b in Zg)Zg[b][0]==a&&ch(b)}
function hh(a,b){if(document.createEvent){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0);a.dispatchEvent(c)}else c=document.createEventObject(),a.fireEvent("on"+b,c)};function ih(){return!!Rg(["fullscreenEnabled","fullScreenEnabled"],document)}function jh(){return Rg(["fullscreenElement","fullScreenElement"],document)};function kh(a){a=a||{};this.url=a.url||"";this.urlV8=a.url_v8||"";this.urlV9As2=a.url_v9as2||"";this.args=a.args||fc(lh);this.assets=a.assets||{};this.attrs=a.attrs||fc(mh);this.params=a.params||fc(nh);this.minVersion=a.min_version||"8.0.0";this.fallback=a.fallback||null;this.fallbackMessage=a.fallbackMessage||null;this.html5=!!a.html5;this.disable=a.disable||{};this.loaded=!!a.loaded;this.messages=a.messages||{}}var lh={enablejsapi:1},mh={},nh={allowscriptaccess:"always",allowfullscreen:"true",bgcolor:"#000000"};
kh.prototype.clone=function(){var a=new kh,b;for(b in this){var c=this[b];"object"==ca(c)?a[b]=fc(c):a[b]=c}return a};var oh,ph,qh,rh,sh,th,uh;uh=th=sh=rh=qh=ph=oh=!1;var vh=lc;vh&&(-1!=vh.indexOf("Firefox")?oh=!0:-1!=vh.indexOf("Camino")?ph=!0:-1!=vh.indexOf("iPad")?rh=!0:-1!=vh.indexOf("iPhone")||-1!=vh.indexOf("iPod")?qh=!0:-1!=vh.indexOf("Chrome")?th=!0:-1!=vh.indexOf("Android")?sh=!0:-1!=vh.indexOf("Safari")&&(uh=!0));var wh=oh,xh=ph,yh=qh,zh=rh,Ah=sh,Bh=th,Ch=uh;var Dh=y(),Eh=null,Fh=Array(50),Gh=-1,Hh=!1;function Ih(a){Jh();Eh.push(a);Kh(Eh)}function Lh(a){var b=s("yt.mdx.remote.debug.handlers_");pb(b||[],a)}function Mh(a,b){Jh();var c=Eh,d=Nh(a,String(b));mb(c)?Oh(d):(Kh(c),C(c,function(a){a(d)}))}function Jh(){Eh||(Eh=s("yt.mdx.remote.debug.handlers_")||[],q("yt.mdx.remote.debug.handlers_",Eh,void 0))}function Oh(a){var b=(Gh+1)%50;Gh=b;Fh[b]=a;Hh||(Hh=49==b)}
function Kh(a){var b=Fh;if(b[0]){var c=Gh,d=Hh?c:-1;do{var d=(d+1)%50,e=b[d];C(a,function(a){a(e)})}while(d!=c);Fh=Array(50);Gh=-1;Hh=!1}}function Nh(a,b){var c=(y()-Dh)/1E3;c.toFixed&&(c=c.toFixed(3));var d=[];d.push("[",c+"s","] ");d.push("[","yt.mdx.remote","] ");d.push(a+": "+b,"\n");return d.join("")};function Ph(a){a=a||{};this.name=a.name||"";this.id=a.id||a.screenId||"";this.token=a.token||a.loungeToken||"";this.uuid=a.uuid||a.dialId||""}function Qh(a,b){return!!b&&(a.id==b||a.uuid==b)}function Rh(a,b){return a||b?!a!=!b?!1:a.id==b.id:!0}function Sh(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.token==b.token&&a.name==b.name&&a.uuid==b.uuid:!0}function Th(a){return{name:a.name,screenId:a.id,loungeToken:a.token,dialId:a.uuid}}function Uh(a){return new Ph(a)}
function Vh(a){return fa(a)?D(a,Uh):[]}function Wh(a){return a?'{name:"'+a.name+'",id:'+a.id.substr(0,6)+"..,token:"+(a.token?".."+a.token.slice(-6):"-")+",uuid:"+(a.uuid?".."+a.uuid.slice(-6):"-")+"}":"null"}function Xh(a){return fa(a)?"["+D(a,Wh).join(",")+"]":"null"};function Q(){this.jb=this.jb;this.Ca=this.Ca}Q.prototype.jb=!1;Q.prototype.$=function(){return this.jb};Q.prototype.dispose=function(){this.jb||(this.jb=!0,this.K())};function S(a,b){Yh(a,pa(Zh,b))}function Yh(a,b){a.Ca||(a.Ca=[]);a.Ca.push(n(void 0)?x(b,void 0):b)}Q.prototype.K=function(){if(this.Ca)for(;this.Ca.length;)this.Ca.shift()()};function $h(a){return a&&"function"==typeof a.$?a.$():!1}function Zh(a){a&&"function"==typeof a.dispose&&a.dispose()}
function ai(a){for(var b=0,c=arguments.length;b<c;++b){var d=arguments[b];ga(d)?ai.apply(null,d):Zh(d)}};function bi(){Q.call(this);this.g=[];this.ic={}}z(bi,Q);f=bi.prototype;f.Ss=1;f.Ij=0;f.subscribe=function(a,b,c){var d=this.ic[a];d||(d=this.ic[a]=[]);var e=this.Ss;this.g[e]=a;this.g[e+1]=b;this.g[e+2]=c;this.Ss=e+3;d.push(e);return e};f.unsubscribe=function(a,b,c){if(a=this.ic[a]){var d=this.g;if(a=E(a,function(a){return d[a+1]==b&&d[a+2]==c}))return this.Lb(a)}return!1};
f.Lb=function(a){if(0!=this.Ij)return this.j||(this.j=[]),this.j.push(a),!1;var b=this.g[a];if(b){var c=this.ic[b];c&&pb(c,a);delete this.g[a];delete this.g[a+1];delete this.g[a+2]}return!!b};f.publish=function(a,b){var c=this.ic[a];if(c){this.Ij++;for(var d=wb(arguments,1),e=0,g=c.length;e<g;e++){var h=c[e];this.g[h+1].apply(this.g[h+2],d)}this.Ij--;if(this.j&&0==this.Ij)for(;c=this.j.pop();)this.Lb(c);return 0!=e}return!1};
f.clear=function(a){if(a){var b=this.ic[a];b&&(C(b,this.Lb,this),delete this.ic[a])}else this.g.length=0,this.ic={}};f.Sa=function(a){if(a){var b=this.ic[a];return b?b.length:0}a=0;for(b in this.ic)a+=this.Sa(b);return a};f.K=function(){bi.H.K.call(this);delete this.g;delete this.ic;delete this.j};var ci=s("yt.pubsub.instance_")||new bi;bi.prototype.subscribe=bi.prototype.subscribe;bi.prototype.unsubscribeByKey=bi.prototype.Lb;bi.prototype.publish=bi.prototype.publish;bi.prototype.clear=bi.prototype.clear;q("yt.pubsub.instance_",ci,void 0);var di=s("yt.pubsub.subscribedKeys_")||{};q("yt.pubsub.subscribedKeys_",di,void 0);var ei=s("yt.pubsub.topicToKeys_")||{};q("yt.pubsub.topicToKeys_",ei,void 0);var fi=s("yt.pubsub.isSynchronous_")||{};q("yt.pubsub.isSynchronous_",fi,void 0);
var gi=s("yt.pubsub.skipSubId_")||null;q("yt.pubsub.skipSubId_",gi,void 0);function hi(a,b,c){var d=ii();if(d){var e=d.subscribe(a,function(){if(!gi||gi!=e){var d=arguments,h=function(){di[e]&&b.apply(c||window,d)};try{fi[a]?h():L(h,0)}catch(k){jf(k)}}},c);di[e]=!0;ei[a]||(ei[a]=[]);ei[a].push(e);return e}return 0}function ji(a){var b=ii();b&&("number"==typeof a?a=[a]:"string"==typeof a&&(a=[parseInt(a,10)]),C(a,function(a){b.unsubscribeByKey(a);delete di[a]}))}
function ki(a,b){var c=ii();return c?c.publish.apply(c,arguments):!1}function li(a,b){fi[a]=!0;var c=ii();c&&c.publish.apply(c,arguments);fi[a]=!1}function mi(a){ei[a]&&(a=ei[a],C(a,function(a){di[a]&&delete di[a]}),a.length=0)}function ni(a){var b=ii();if(b)if(b.clear(a),a)mi(a);else for(var c in ei)mi(c)}function ii(){return s("yt.pubsub.instance_")};function oi(){};function pi(){}z(pi,oi);pi.prototype.Sa=function(){var a=0;Md(this.$b(!0),function(){a++});return a};pi.prototype.clear=function(){var a=Nd(this.$b(!0)),b=this;C(a,function(a){b.remove(a)})};function qi(a){this.g=a}z(qi,pi);f=qi.prototype;f.isAvailable=function(){if(!this.g)return!1;try{return this.g.setItem("__sak","1"),this.g.removeItem("__sak"),!0}catch(a){return!1}};f.set=function(a,b){try{this.g.setItem(a,b)}catch(c){if(0==this.g.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};f.get=function(a){a=this.g.getItem(a);if(!w(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a};f.remove=function(a){this.g.removeItem(a)};
f.Sa=function(){return this.g.length};f.$b=function(a){var b=0,c=this.g,d=new Kd;d.next=function(){if(b>=c.length)throw Jd;var d;d=c.key(b++);if(a)return d;d=c.getItem(d);if(!w(d))throw"Storage mechanism: Invalid value was encountered";return d};return d};f.clear=function(){this.g.clear()};f.key=function(a){return this.g.key(a)};function ri(){var a=null;try{a=window.localStorage||null}catch(b){}this.g=a}z(ri,qi);function si(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.g=a}z(si,qi);function ti(a){this.g=a}ti.prototype.set=function(a,b){n(b)?this.g.set(a,Df(b)):this.g.remove(a)};ti.prototype.get=function(a){var b;try{b=this.g.get(a)}catch(c){return}if(null!==b)try{return Bf(b)}catch(d){throw"Storage: Invalid value was encountered";}};ti.prototype.remove=function(a){this.g.remove(a)};function ui(a){this.g=a}z(ui,ti);function vi(a){this.data=a}function wi(a){return!n(a)||a instanceof vi?a:new vi(a)}ui.prototype.set=function(a,b){ui.H.set.call(this,a,wi(b))};ui.prototype.j=function(a){a=ui.H.get.call(this,a);if(!n(a)||a instanceof Object)return a;throw"Storage: Invalid value was encountered";};ui.prototype.get=function(a){if(a=this.j(a)){if(a=a.data,!n(a))throw"Storage: Invalid value was encountered";}else a=void 0;return a};function xi(a){this.g=a}z(xi,ui);function yi(a){var b=a.creation;a=a.expiration;return!!a&&a<y()||!!b&&b>y()}xi.prototype.set=function(a,b,c){if(b=wi(b)){if(c){if(c<y()){xi.prototype.remove.call(this,a);return}b.expiration=c}b.creation=y()}xi.H.set.call(this,a,b)};xi.prototype.j=function(a,b){var c=xi.H.j.call(this,a);if(c)if(!b&&yi(c))xi.prototype.remove.call(this,a);else return c};function zi(a){this.g=a}z(zi,xi);function Ai(a,b){var c=[];Md(b,function(a){var b;try{b=zi.prototype.j.call(this,a,!0)}catch(g){if("Storage: Invalid value was encountered"==g)return;throw g;}n(b)?yi(b)&&c.push(a):c.push(a)},a);return c}function Bi(a,b){var c=Ai(a,b);C(c,function(a){zi.prototype.remove.call(this,a)},a)}function Ci(){var a=Di;Bi(a,a.g.$b(!0))};function Ei(a,b,c){var d=c&&0<c?c:0;c=d?y()+1E3*d:0;if((d=d?Di:Fi)&&window.JSON){w(b)||(b=JSON.stringify(b,void 0));try{d.set(a,b,c)}catch(e){d.remove(a)}}}function Gi(a){if(!Fi&&!Di||!window.JSON)return null;var b;try{b=Fi.get(a)}catch(c){}if(!w(b))try{b=Di.get(a)}catch(d){}if(!w(b))return null;try{b=JSON.parse(b,void 0)}catch(e){}return b}function Hi(a){Fi&&Fi.remove(a);Di&&Di.remove(a)}var Di,Ii=new ri;Di=Ii.isAvailable()?new zi(Ii):null;var Fi,Ji=new si;Fi=Ji.isAvailable()?new zi(Ji):null;var Ki=["boadgeojelhgndaghljhdicfkmllpafd","dliochdbjfkdbacpmhlcpmleaejidimm","hfaagokkkhdbgiakmmlclaapfelnkoah","fmfcbgogabcbclcofgocippekhfcmgfj","enhhojjnijigcajfphajepfemndkmdlo"];function Li(a){var b=Gi("yt-remote-cast-last-extension");b?"none"==b?a(null):a(b):Mi(0,a)}function Mi(a,b){a==Ki.length?(Ei("yt-remote-cast-last-extension","none"),b(null)):Ni(Ki[a],function(c){c?(c=Ki[a],Ei("yt-remote-cast-last-extension",c),b(c)):Mi(a+1,b)})}
function Oi(a){return"chrome-extension://"+a+"/cast_sender.js"}function Ni(a,b){var c=new XMLHttpRequest;c.onreadystatechange=function(){4==c.readyState&&200==c.status&&b(!0)};c.onerror=function(){b(!1)};try{c.open("GET",Oi(a),!0),c.send()}catch(d){b(!1)}}
function Pi(a){window.__onGCastApiAvailable=a;Li(function(b){if(b){Mh("bootstrap","Found cast extension: "+b);q("chrome.cast.extensionId",b,void 0);var c=document.createElement("script");c.src=Oi(b);c.onerror=function(){Qi();Hi("yt-remote-cast-last-extension");a(!1,"Extension JS failed to load.")};(document.head||document.documentElement).appendChild(c)}else Mh("bootstrap","No cast extension found"),a(!1,"No cast extension found")})}
function Qi(){window.__onGCastApiAvailable&&delete window.__onGCastApiAvailable};function Ri(a){var b=a.type;if(!n(b))return null;switch(b.toLowerCase()){case "checkbox":case "radio":return a.checked?a.value:null;case "select-one":return b=a.selectedIndex,0<=b?a.options[b].value:null;case "select-multiple":for(var b=[],c,d=0;c=a.options[d];d++)c.selected&&b.push(c.value);return b.length?b:null;default:return n(a.value)?a.value:null}};function Si(a,b){for(var c=a.split(b),d={},e=0,g=c.length;e<g;e++){var h=c[e].split("=");if(1==h.length&&h[0]||2==h.length){var k=ya(h[0]||""),h=ya(h[1]||"");k in d?fa(d[k])?ub(d[k],h):d[k]=[d[k],h]:d[k]=h}}return d}function Ti(a,b){var c=[];Ob(a,function(a,b){var g=xa(b),h;fa(a)?h=a:h=[a];C(h,function(a){""==a?c.push(g):c.push(g+"="+xa(a))})});return c.join(b)}function Ui(a){"?"==a.charAt(0)&&(a=a.substr(1));return Si(a,"&")}
function Vi(a){return-1!=a.indexOf("?")?(a=(a||"").split("#")[0],a=a.split("?",2),Ui(1<a.length?a[1]:a[0])):{}}var Wi=ae;function Xi(a){var b=Zd(a);a=b[1];var c=b[2],d=b[3],b=b[4],e="";a&&(e+=a+":");d&&(e+="//",c&&(e+=c+"@"),e+=d,b&&(e+=":"+b));return e}function Yi(a,b){var c=a.split("#",2);a=c[0];var c=1<c.length?"#"+c[1]:"",d=a.split("?",2);a=d[0];var d=Ui(d[1]||""),e;for(e in b)d[e]=b[e];return ie(a,d)+c}
function Zi(){var a;a||(a=document.location.href);a=Zd(a)[1]||null;return null!==a&&"https"==a};var $i=null;"undefined"!=typeof XMLHttpRequest?$i=function(){return new XMLHttpRequest}:"undefined"!=typeof ActiveXObject&&($i=function(){return new ActiveXObject("Microsoft.XMLHTTP")});function aj(a){switch(a&&"status"in a?a.status:-1){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1}};function bj(a,b,c,d,e,g,h){function k(){4==(m&&"readyState"in m?m.readyState:0)&&b&&ff(b)(m)}var m=$i&&$i();if(!("open"in m))return null;"onloadend"in m?m.addEventListener("loadend",k,!1):m.onreadystatechange=k;c=(c||"GET").toUpperCase();d=d||"";m.open(c,a,!0);g&&(m.responseType=g);h&&(m.withCredentials=!0);g="POST"==c;if(e=cj(a,e))for(var p in e)m.setRequestHeader(p,e[p]),"content-type"==p.toLowerCase()&&(g=!1);g&&m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.send(d);return m}
function cj(a,b){b=b||{};for(var c in dj){var d=ef(dj[c]),e;if(e=d){e=a;var g=void 0;g=window.location.href;var h=Zd(e)[1]||null,k=Wi(e);h&&k?(e=Zd(e),g=Zd(g),e=e[3]==g[3]&&e[1]==g[1]&&e[4]==g[4]):e=k?Wi(g)==k&&(Number(Zd(g)[4]||null)||null)==(Number(Zd(e)[4]||null)||null):!0;e||(e=c,g=ef("CORS_HEADER_WHITELIST")||{},e=(h=Wi(a))?(g=g[h])?lb(g,e):!1:!0)}e&&(b[c]=d)}return b}function ej(a,b){var c=ef("XSRF_TOKEN");b.method="POST";b.ab||(b.ab={});b.ab[ef("XSRF_FIELD_NAME")]=c;fj(a,b)}
function gj(a,b){var c=ef("XSRF_FIELD_NAME"),d;b.headers&&(d=b.headers["Content-Type"]);return!b.hH&&(!Wi(a)||Wi(a)==document.location.hostname)&&"POST"==b.method&&(!d||"application/x-www-form-urlencoded"==d)&&!(b.ab&&b.ab[c])}
function fj(a,b){var c=b.format||"JSON";b.gH&&(a=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+a);var d=ef("XSRF_FIELD_NAME"),e=ef("XSRF_TOKEN"),g=b.Me;g&&(g[d]&&delete g[d],a=Yi(a,g));var h=b.Iy||"",g=b.ab;gj(a,b)&&(g||(g={}),g[d]=e);g&&w(h)&&(d=Ui(h),jc(d,g),h=ge(d));var k=!1,m,p=bj(a,function(a){if(!k){k=!0;m&&M(m);var d=aj(a),e=null;if(d||400<=a.status&&500>a.status)e=hj(c,a);if(d)t:{switch(c){case "XML":d=0==parseInt(e&&e.return_code,
10);break t;case "RAW":d=!0;break t}d=!!e}var e=e||{},g=b.context||l;d?b.Ma&&b.Ma.call(g,a,e):b.onError&&b.onError.call(g,a,e);b.Ab&&b.Ab.call(g,a,e)}},b.method,h,b.headers,b.responseType,b.withCredentials);b.Ud&&0<b.timeout&&(m=L(function(){k||(k=!0,p.abort(),M(m),b.Ud.call(b.context||l,p))},b.timeout));return p}
function hj(a,b){var c=null;switch(a){case "JSON":var d=b.responseText,e=b.getResponseHeader("Content-Type")||"";d&&0<=e.indexOf("json")&&(c=Cf(d));break;case "XML":if(d=(d=b.responseXML)?ij(d):null)c={},C(d.getElementsByTagName("*"),function(a){c[a.tagName]=jj(a)})}return c}function ij(a){return a?(a=("responseXML"in a?a.responseXML:a).getElementsByTagName("root"))&&0<a.length?a[0]:null:null}function jj(a){var b="";C(a.childNodes,function(a){b+=a.nodeValue});return b}
var kj={html5_ajax:"action_get_html5_token",watch_actions_ajax:"action_get_watch_actions_token",addto_ajax:"action_get_wl_token",playlist_video_ajax:"action_get_html5_wl_token"},lj={html5_ajax:"html5_ajax_token",watch_actions_ajax:"watch_actions_ajax_token",addto_ajax:"addto_ajax_token",playlist_video_ajax:"playlist_video_ajax_token"};
function mj(a,b,c,d){if(ef("XSRF_TOKEN"))c&&window.setTimeout(c,0);else{var e=Xi(document.location.href)+"/token_ajax",g={};a&&(g.authuser=a);b&&(g.pageid=b);g[kj.watch_actions_ajax]=1;fj(e,{format:"RAW",method:"GET",Me:g,Ab:function(a){var b=Ui(a.responseText);b[lj.watch_actions_ajax]?c&&c():d&&d(a,b)}})}}var dj={"X-YouTube-Page-CL":"PAGE_CL","X-YouTube-Page-Timestamp":"PAGE_BUILD_TIMESTAMP","X-YouTube-Variants-Checksum":"VARIANTS_CHECKSUM"};function nj(a){this.port=this.k="";this.g="/api/lounge";this.j=!0;a=a||document.location.href;var b=Number(Zd(a)[4]||null)||null||"";b&&(this.port=":"+b);this.k=ae(a)||"";a=lc;0<=a.search("MSIE")&&(a=a.match(/MSIE ([\d.]+)/)[1],0>Ra(a,"10.0")&&(this.j=!1))}function oj(a,b,c,d){var e=a.g;if(n(d)?d:a.j)e="https://"+a.k+a.port+a.g;return ie(e+b,c||{})}
nj.prototype.sendRequest=function(a,b,c,d,e,g,h){a={format:g?"RAW":"JSON",method:a,context:this,timeout:5E3,withCredentials:!!h,Ma:pa(this.A,d,!g),onError:pa(this.o,e),Ud:pa(this.B,e)};c&&(a.ab=c,a.headers={"Content-Type":"application/x-www-form-urlencoded"});return fj(b,a)};nj.prototype.A=function(a,b,c,d){b?a(d):a({text:c.responseText})};nj.prototype.o=function(a,b){a(Error("Request error: "+b.status))};nj.prototype.B=function(a){a(Error("request timed out"))};function pj(a){a&&(this.id=a.id||"",this.name=a.name||"",this.activityId=a.activityId||"",this.status=a.status||"UNKNOWN")}pj.prototype.id="";pj.prototype.name="";pj.prototype.activityId="";pj.prototype.status="UNKNOWN";function qj(a){return{id:a.id,name:a.name,activityId:a.activityId,status:a.status}}pj.prototype.toString=function(){return"{id:"+this.id+",name:"+this.name+",activityId:"+this.activityId+",status:"+this.status+"}"};
function rj(a){a=a||[];return"["+D(a,function(a){return a?a.toString():"null"}).join(",")+"]"};function sj(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"==a?b:b&3|8).toString(16)})}function tj(a){return D(a,function(a){return{key:a.id,name:a.name}})}function uj(a){return D(a,function(a){return qj(a)})}function vj(a){return D(a,function(a){return new pj(a)})}function wj(a,b){return a||b?a&&b?a.id==b.id&&a.name==b.name:!1:!0}function xj(a,b){return E(a,function(a){return a.id==b})}
function yj(a,b){return E(a,function(a){return Rh(a,b)})}function zj(a,b){return E(a,function(a){return Qh(a,b)})};function T(){Q.call(this);this.N=new bi;S(this,this.N)}z(T,Q);T.prototype.subscribe=function(a,b,c){return this.$()?0:this.N.subscribe(a,b,c)};T.prototype.unsubscribe=function(a,b,c){return this.$()?!1:this.N.unsubscribe(a,b,c)};T.prototype.Lb=function(a){return this.$()?!1:this.N.Lb(a)};T.prototype.publish=function(a,b){return this.$()?!1:this.N.publish.apply(this.N,arguments)};function Aj(a){T.call(this);this.C=a;this.screens=[]}z(Aj,T);f=Aj.prototype;f.Cb=function(){return this.screens};f.contains=function(a){return!!yj(this.screens,a)};f.get=function(a){return a?zj(this.screens,a):null};function Bj(a,b){var c=a.get(b.uuid)||a.get(b.id);if(c){var d=c.name;c.id=b.id||c.id;c.name=b.name;c.token=b.token;c.uuid=b.uuid||c.uuid;return c.name!=d}a.screens.push(b);return!0}
function Cj(a,b){var c=a.screens.length!=b.length;a.screens=eb(a.screens,function(a){return!!yj(b,a)});for(var d=0,e=b.length;d<e;d++)c=Bj(a,b[d])||c;return c}function Dj(a,b){var c=a.screens.length;a.screens=eb(a.screens,function(a){return!Rh(a,b)});return a.screens.length<c}f.info=function(a){Mh(this.C,a)};f.warn=function(a){Mh(this.C,a)};function Ej(a,b){this.jg=a;this.Ze=b+"::"}z(Ej,pi);f=Ej.prototype;f.jg=null;f.Ze="";f.set=function(a,b){this.jg.set(this.Ze+a,b)};f.get=function(a){return this.jg.get(this.Ze+a)};f.remove=function(a){this.jg.remove(this.Ze+a)};f.$b=function(a){var b=this.jg.$b(!0),c=this,d=new Kd;d.next=function(){for(var d=b.next();d.substr(0,c.Ze.length)!=c.Ze;)d=b.next();return a?d.substr(c.Ze.length):c.jg.get(d)};return d};function Fj(a){var b=new ri;return b.isAvailable()?a?new Ej(b,a):b:null};function Gj(a){a&&(this.id=a.id||a.name,this.name=a.name,this.app=a.app,this.type=a.type||"REMOTE_CONTROL",this.TG=a.user||"",this.avatar=a.userAvatarUri||"",this.theme=a.theme||"u")}Gj.prototype.id="";Gj.prototype.name="";f=Gj.prototype;f.app="";f.type="REMOTE_CONTROL";f.TG="";f.avatar="";f.theme="u";f.equals=function(a){return a?this.id==a.id:!1};function Hj(a){this.g=a}var Ij=/\s*;\s*/;f=Hj.prototype;f.set=function(a,b,c,d,e,g){if(/[;=\s]/.test(a))throw Error('Invalid cookie name "'+a+'"');if(/[;\r\n]/.test(b))throw Error('Invalid cookie value "'+b+'"');n(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";g=g?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(y()+1E3*c)).toUTCString();this.g.cookie=a+"="+b+e+d+c+g};
f.get=function(a,b){for(var c=a+"=",d=(this.g.cookie||"").split(Ij),e=0,g;g=d[e];e++){if(0==g.lastIndexOf(c,0))return g.substr(c.length);if(g==a)return""}return b};f.remove=function(a,b,c){var d=n(this.get(a));this.set(a,"",0,b,c);return d};f.La=function(){return Jj(this).keys};f.Wa=function(){return Jj(this).values};f.isEmpty=function(){return!this.g.cookie};f.Sa=function(){return this.g.cookie?(this.g.cookie||"").split(Ij).length:0};
f.ig=function(a){for(var b=Jj(this).values,c=0;c<b.length;c++)if(b[c]==a)return!0;return!1};f.clear=function(){for(var a=Jj(this).keys,b=a.length-1;0<=b;b--)this.remove(a[b])};function Jj(a){a=(a.g.cookie||"").split(Ij);for(var b=[],c=[],d,e,g=0;e=a[g];g++)d=e.indexOf("="),-1==d?(b.push(""),c.push(e)):(b.push(e.substring(0,d)),c.push(e.substring(d+1)));return{keys:b,values:c}}var Kj=new Hj(document);Kj.j=3950;function Lj(a,b){Kj.set(""+a,b,void 0,"/","youtube.com")};var Mj;function Nj(){var a=Oj(),b=Pj();lb(a,b);Qj()&&Fb(a,b);a=Rj(a);if(mb(a))try{a="remote_sid",Kj.remove(""+a,"/","youtube.com")}catch(c){}else try{Lj("remote_sid",a.join(","))}catch(d){}}function Oj(){var a=Gi("yt-remote-connected-devices")||[];Ab(a);return a}function Rj(a){if(mb(a))return[];var b=a[0].indexOf("#"),c=-1==b?a[0]:a[0].substring(0,b);return D(a,function(a,b){return 0==b?a:a.substring(c.length)})}function Sj(a){Ei("yt-remote-connected-devices",a,86400)}
function Pj(){if(Tj)return Tj;var a=Gi("yt-remote-device-id");a||(a=sj(),Ei("yt-remote-device-id",a,31536E3));for(var b=Oj(),c=1,d=a;lb(b,d);)c++,d=a+"#"+c;return Tj=d}function Uj(){return Gi("yt-remote-session-browser-channel")}function Qj(){return Gi("yt-remote-session-screen-id")}
function Vj(a){5<a.length&&(a=a.slice(a.length-5));var b=D(Wj(),function(a){return a.loungeToken}),c=D(a,function(a){return a.loungeToken});hb(c,function(a){return!lb(b,a)})&&Xj();Ei("yt-remote-local-screens",a,31536E3)}function Wj(){return Gi("yt-remote-local-screens")||[]}function Xj(){Ei("yt-remote-lounge-token-expiration",!0,86400)}function Yj(){return!Gi("yt-remote-lounge-token-expiration")}function Zj(a){Ei("yt-remote-online-screens",a,60)}
function ak(){return Gi("yt-remote-online-screens")||[]}function bk(a){Ei("yt-remote-online-dial-devices",a,30)}function ck(){return Gi("yt-remote-online-dial-devices")||[]}function dk(a,b){Ei("yt-remote-session-browser-channel",a);Ei("yt-remote-session-screen-id",b);var c=Oj(),d=Pj();lb(c,d)||c.push(d);Sj(c);Nj()}function ek(a){a||(Hi("yt-remote-session-screen-id"),Hi("yt-remote-session-video-id"));Nj();a=Oj();pb(a,Pj());Sj(a)}
function fk(){if(!Mj){var a=Fj();a&&(Mj=new ti(a))}return Mj?!!Mj.get("yt-remote-use-staging-server"):!1}var Tj="";function gk(a){Aj.call(this,"AccountScreenService");this.g=a;this.j=NaN;this.screens=hk();this.info("Initializing with "+Xh(this.screens))}z(gk,Aj);f=gk.prototype;f.start=function(){this.Ft()};f.add=function(a,b,c){if(this.contains(a))this.ee(a,a.name,b,c);else{var d=ik(this,a.id);this.g.sendRequest("POST",d,{screen_name:a.name},x(this.XD,this,a,b,c),x(this.Gj,this,"add",c),!0,!0)}};
f.remove=function(a,b,c){if(this.contains(a)){var d=ik(this,a.id);this.g.sendRequest("DELETE",d,null,x(this.dE,this,a,b,c),x(this.Gj,this,"remove",c),!0,!0)}else a="Trying to remove non-account screen: "+a.name,this.warn(a),c(Error(a))};f.ee=function(a,b,c,d){if(this.contains(a)){var e=ik(this,a.id);this.g.sendRequest("PUT",e,{screen_name:b},x(this.eE,this,a,b,c,d),x(this.Gj,this,"update",d),!0,!0)}else a="Trying to update non-account screen: "+a.name,this.warn(a),d(Error(a))};
f.K=function(){M(this.j);gk.H.K.call(this)};function jk(a,b){return a.length!=b.length?!1:Db(a,b,function(a,b){return a||b?!a!=!b?!1:a.id==b.id&&a.name==b.name:!0})}function hk(){var a=Vh(Wj()),b=Vh(ak());return eb(b,function(b){return!zj(a,b.id)})}function ik(a,b){var c=oj(a.g,"/screens");return b?c+"/"+b:c}f.Ft=function(){if(!this.$()){M(this.j);var a=ik(this);this.g.sendRequest("GET",a,null,x(this.lC,this),x(this.Gj,this,"load",u),!1,!0)}};
f.lC=function(a){if(!this.$())if(a=Vh(Ub(a)),jk(this.screens,a))for(var b=0,c=this.screens.length;b<c;++b){var d=this.screens[b],e=zj(a,d.id);e&&e.token&&(d.token=e.token)}else this.info("Updated account screens: "+Xh(a)),this.screens=a,this.publish("screenChange"),a=this.Cb().length?12E4:6E4,this.j=L(x(this.Ft,this),a)};f.XD=function(a,b){this.$()||(Bj(this,a),this.publish("screenChange"),b(a))};f.dE=function(a,b){this.$()||(Dj(this,a),this.publish("screenChange"),b(a))};
f.eE=function(a,b,c){this.$()||(a=this.get(a.id),a.name=b,c(a),this.publish("screenChange"))};f.Gj=function(a,b,c){this.$()||(a="Failed to "+a+" account screen: "+c,this.warn(a),b(Error(a)))};function kk(a,b,c,d){T.call(this);this.C=a;this.B=b;this.o=c;this.A=d;this.k=0;this.g=null;this.j=NaN}z(kk,T);var lk=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];f=kk.prototype;f.start=function(){!this.g&&isNaN(this.j)&&this.xr()};f.stop=function(){this.g&&(this.g.abort(),this.g=null);isNaN(this.j)||(M(this.j),this.j=NaN)};f.K=function(){this.stop();kk.H.K.call(this)};
f.xr=function(){this.j=NaN;this.g=fj(oj(this.C,"/pairing/get_screen"),{method:"POST",ab:{pairing_code:this.B},timeout:5E3,Ma:x(this.rB,this),onError:x(this.qB,this),Ud:x(this.sB,this)})};f.rB=function(a,b){this.g=null;var c=b.screen||{};c.dialId=this.o;c.name=this.A;this.publish("pairingComplete",new Ph(c))};
f.qB=function(a){this.g=null;a.status&&404==a.status?this.k>=lk.length?this.publish("pairingFailed",Error("DIAL polling timed out")):(a=lk[this.k],this.j=L(x(this.xr,this),a),this.k++):this.publish("pairingFailed",Error("Server error "+a.status))};f.sB=function(){this.g=null;this.publish("pairingFailed",Error("Server not responding"))};function mk(a){Aj.call(this,"LocalScreenService");this.j=a;this.g=NaN;nk(this);this.info("Initializing with "+Xh(this.screens))}z(mk,Aj);f=mk.prototype;f.start=function(){nk(this)&&this.publish("screenChange");Yj()&&ok(this);M(this.g);this.g=L(x(this.start,this),1E4)};f.add=function(a,b){nk(this);Bj(this,a);pk(this,!1);this.publish("screenChange");b(a);a.token||ok(this)};f.remove=function(a,b){var c=nk(this);Dj(this,a)&&(pk(this,!1),c=!0);b(a);c&&this.publish("screenChange")};
f.ee=function(a,b,c,d){var e=nk(this),g=this.get(a.id);g?(g.name!=b&&(g.name=b,pk(this,!1),e=!0),c(a)):d(Error("no such local screen."));e&&this.publish("screenChange")};f.K=function(){M(this.g);mk.H.K.call(this)};function ok(a){if(a.screens.length){var b=D(a.screens,function(a){return a.id}),c=oj(a.j,"/pairing/get_lounge_token_batch");a.j.sendRequest("POST",c,{screen_ids:b.join(",")},x(a.FE,a),x(a.EE,a))}}
f.FE=function(a){nk(this);var b=this.screens.length;a=a&&a.screens||[];for(var c=0,d=a.length;c<d;++c){var e=a[c],g=this.get(e.screenId);g&&(g.token=e.loungeToken,--b)}pk(this,!b);b&&this.warn("Missed "+b+" lounge tokens.")};f.EE=function(a){this.warn("Requesting lounge tokens failed: "+a)};function nk(a){var b=Vh(Wj()),b=eb(b,function(a){return!a.uuid});return Cj(a,b)}function pk(a,b){Vj(D(a.screens,Th));b&&Xj()};function qk(a,b){T.call(this);this.A=b;this.g=rk(this);this.B=a;this.k=this.o=NaN;this.j=null;this.C=x(this.ix,this);sk("Initialized with "+Df(this.g))}z(qk,T);f=qk.prototype;f.start=function(){var a=parseInt(Gi("yt-remote-fast-check-period")||"0",10);(this.o=y()-144E5<a?0:a)?tk(this,!1):(this.o=y()+3E5,Ei("yt-remote-fast-check-period",this.o),this.pn());P(window,"storage",this.C)};f.isEmpty=function(){return bc(this.g)};
f.update=function(){sk("Updating availability on schedule.");var a=this.A(),b=Pb(this.g,function(b,d){return b&&!!zj(a,d)},this);uk(this,b)};function vk(a,b,c){var d=oj(a.B,"/pairing/get_screen_availability");a.B.sendRequest("POST",d,{lounge_token:b.token},x(function(a){a=a.screens||[];for(var d=0,h=a.length;d<h;++d)if(a[d].loungeToken==b.token){c("online"==a[d].status);return}c(!1)},a),x(function(){c(!1)},a))}
f.K=function(){M(this.k);this.k=NaN;this.j&&(this.j.abort(),this.j=null);var a=ah(window,"storage",this.C,!1);a&&ch(a);qk.H.K.call(this)};function uk(a,b){var c;t:if(Tb(b)!=Tb(a.g))c=!1;else{c=Vb(b);for(var d=0,e=c.length;d<e;++d)if(!a.g[c[d]]){c=!1;break t}c=!0}c||(sk("Updated online screens: "+Df(a.g)),a.g=b,a.publish("screenChange"));wk(a)}function tk(a,b){isNaN(a.k)||M(a.k);var c=x(a.pn,a),d;d=0;b&&(d=2E3+8E3*Math.random());d=0<a.o&&a.o<y()?2E4+d:1E4+d;a.k=L(c,d)}
f.pn=function(){M(this.k);this.k=NaN;this.j&&this.j.abort();var a=xk(this);if(Tb(a)){var b=oj(this.B,"/pairing/get_screen_availability"),c={lounge_token:Vb(a).join(",")};this.j=this.B.sendRequest("POST",b,c,x(this.GD,this,a),x(this.FD,this))}else uk(this,{}),tk(this,!1)};
f.GD=function(a,b){this.j=null;var c=Vb(xk(this));if(Db(c,Vb(a))){for(var c=b.screens||[],d={},e=0,g=c.length;e<g;++e)d[a[c[e].loungeToken]]="online"==c[e].status;uk(this,d);tk(this,!1)}else this.Oa("Changing Screen set during request."),this.pn()};f.FD=function(a){this.Oa("Screen availability failed: "+a);this.j=null;tk(this,!1)};f.ix=function(a){"yt-remote-online-screen-ids"==a.key&&(this.g=rk(this),tk(this,!0))};function sk(a){Mh("OnlineScreenService",a)}
f.Oa=function(a){Mh("OnlineScreenService",a)};function xk(a){var b={};C(a.A(),function(a){a.token?b[a.token]=a.id:this.Oa("Requesting availability of screen w/o lounge token.")});return b}function rk(a){var b=Gi("yt-remote-online-screen-ids")||"",b=b?b.split(","):[],c={};a=a.A();for(var d=0,e=a.length;d<e;++d){var g=a[d].id;c[g]=lb(b,g)}return c}
function wk(a){var b=Vb(Pb(a.g,function(a){return a}));Ab(b);b.length?Ei("yt-remote-online-screen-ids",b.join(","),60):Hi("yt-remote-online-screen-ids");a=eb(a.A(),function(a){return!!this.g[a.id]},a);Zj(D(a,Th))};function yk(a,b){Aj.call(this,"ScreenService");this.o=a;this.k=this.g=this.j=null;this.A=[];this.B={};zk(this,b)}z(yk,Aj);f=yk.prototype;f.start=function(a){a?(this.g||(this.g=new gk(this.o),this.g.subscribe("screenChange",x(this.bh,this))),this.g.start()):this.g&&(Zh(this.g),this.g=null,Ak(this));this.j.start();this.k.start();this.screens.length&&(this.publish("screenChange"),this.k.isEmpty()||this.publish("onlineScreenChange"))};
f.add=function(a,b,c){this.g?this.g.add(a,x(function(a){this.bh();this.j.add(a,u,u);b(a)},this),c):this.j.add(a,b,c)};f.remove=function(a,b,c){this.g&&this.g.contains(a)?(this.g.remove(a,x(function(a){this.bh();b(a)},this),c),this.j.remove(a,u,u)):this.j.remove(a,b,c);this.k.update()};f.ee=function(a,b,c,d){this.g&&this.g.contains(a)?(this.g.ee(a,b,c,d),this.j.ee(a,b,u,u)):this.j.contains(a)?this.j.ee(a,b,c,d):(a="Updating name of unknown screen: "+a.name,this.warn(a),d(Error(a)))};
f.Cb=function(a){return a?this.screens:sb(this.screens,eb(this.A,function(a){return!this.contains(a)},this))};f.As=function(){return eb(this.Cb(!0),function(a){return!!this.k.g[a.id]},this)};
function Bk(a,b,c,d,e,g){a.info("getAutomaticScreenByIds "+c+" / "+b);c||(c=a.B[b]);var h=a.Cb();if(h=(c?zj(h,c):null)||zj(h,b)){h.uuid=b;var k=Ck(a,h);vk(a.k,k,function(a){e(a?k:null)})}else c?Dk(a,c,x(function(a){var g=Ck(this,new Ph({name:d,screenId:c,loungeToken:a,dialId:b||""}));vk(this.k,g,function(a){e(a?g:null)})},a),g):e(null)}
function Ek(a,b,c,d,e,g){a.info("getDialScreenByPairingCode "+b+" / "+c);var h=new kk(a.o,b,c,d);h.subscribe("pairingComplete",x(function(a){Zh(h);e(Ck(this,a))},a));h.subscribe("pairingFailed",function(a){Zh(h);g(a)});h.start();return x(h.stop,h)}function Fk(a,b){for(var c=0,d=a.screens.length;c<d;++c)if(a.screens[c].name==b)return a.screens[c];return null}f.Pt=function(a,b){for(var c=2,d=b(a,c);Fk(this,d);){c++;if(20<c)return a;d=b(a,c)}return d};
f.UG=function(a,b,c,d){fj(oj(this.o,"/pairing/get_screen"),{method:"POST",ab:{pairing_code:a},timeout:5E3,Ma:x(function(a,d){var h=new Ph(d.screen||{});if(!h.name||Fk(this,h.name))h.name=this.Pt(h.name,b);c(Ck(this,h))},this),onError:x(function(a){d(Error("pairing request failed: "+a.status))},this),Ud:x(function(){d(Error("pairing request timed out."))},this)})};f.K=function(){Zh(this.g);Zh(this.j);Zh(this.k);yk.H.K.call(this)};
function Dk(a,b,c,d){a.info("requestLoungeToken_ for "+b);var e={ab:{screen_ids:b},method:"POST",context:a,Ma:function(a,e){var k=e&&e.screens||[];k[0]&&k[0].screenId==b?c(k[0].loungeToken):d(Error("Missing lounge token in token response"))},onError:function(){d(Error("Request screen lounge token failed"))}};fj(oj(a.o,"/pairing/get_lounge_token_batch"),e)}
function Ak(a){a.g?a.screens=sb(a.g.Cb(),eb(a.j.Cb(),function(a){return!this.g.contains(a)},a)):a.screens=a.j.Cb();for(var b=hc(a.B),c=0,d=a.screens.length;c<d;++c){var e=a.screens[c];e.uuid=b[e.id]||""}a.info("Updated manual screens: "+Xh(a.screens))}f.bh=function(){Ak(this);this.publish("screenChange");this.k.update()};
function zk(a,b){Gk(a);a.j=new mk(a.o);a.j.subscribe("screenChange",x(a.bh,a));b&&(a.g=new gk(a.o),a.g.subscribe("screenChange",x(a.bh,a)));Ak(a);a.A=Vh(Gi("yt-remote-automatic-screen-cache")||[]);Gk(a);a.info("Initializing automatic screens: "+Xh(a.A));a.k=new qk(a.o,x(a.Cb,a,!0));a.k.subscribe("screenChange",x(function(){this.publish("onlineScreenChange")},a))}
function Ck(a,b){var c=a.get(b.id);c?(c.uuid=b.uuid,b=c):((c=zj(a.A,b.uuid))?(c.id=b.id,c.token=b.token,b=c):a.A.push(b),Ei("yt-remote-automatic-screen-cache",D(a.A,Th)));Gk(a);a.B[b.uuid]=b.id;Ei("yt-remote-device-id-map",a.B,31536E3);return b}function Gk(a){a.B=Gi("yt-remote-device-id-map")||{}}yk.prototype.dispose=yk.prototype.dispose;function Hk(a,b,c){T.call(this);this.J=c;this.F=a;this.j=b;this.k=null}z(Hk,T);function Ik(a,b){a.k=b;a.publish("sessionScreen",a.k)}f=Hk.prototype;f.Tb=function(a){this.$()||(a&&this.warn(""+a),this.k=null,this.publish("sessionScreen",null))};f.info=function(a){Mh(this.J,a)};f.warn=function(a){Mh(this.J,a)};f.Zs=function(){return null};
f.zm=function(a){var b=this.j;a?(b.displayStatus=new chrome.cast.ReceiverDisplayStatus(a,[]),b.displayStatus.showStop=!0):b.displayStatus=null;chrome.cast.setReceiverDisplayStatus(b,x(function(){this.info("Updated receiver status for "+b.friendlyName+": "+a)},this),x(function(){this.warn("Failed to update receiver status for: "+b.friendlyName)},this))};f.K=function(){this.zm("");Hk.H.K.call(this)};function Jk(a,b){Hk.call(this,a,b,"CastSession");this.g=null;this.A=0;this.o=null;this.C=x(this.QB,this);this.B=x(this.PB,this);this.A=L(x(function(){Kk(this,null)},this),12E4)}z(Jk,Hk);f=Jk.prototype;
f.Wm=function(a){if(this.g){if(this.g==a)return;this.warn("Overriding cast sesison with new session object");this.g.removeUpdateListener(this.C);this.g.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.B)}this.g=a;this.g.addUpdateListener(this.C);this.g.addMessageListener("urn:x-cast:com.google.youtube.mdx",this.B);this.o&&Lk(this);Mk(this,"getMdxSessionStatus")};f.Uf=function(a){this.info("launchWithParams: "+Df(a));this.o=a;this.g&&Lk(this)};
f.stop=function(){this.g?this.g.stop(x(function(){this.Tb()},this),x(function(){this.Tb(Error("Failed to stop receiver app."))},this)):this.Tb(Error("Stopping cast device witout session."))};f.zm=u;f.K=function(){this.info("disposeInternal");M(this.A);this.A=0;this.g&&(this.g.removeUpdateListener(this.C),this.g.removeMessageListener("urn:x-cast:com.google.youtube.mdx",this.B));this.g=null;Jk.H.K.call(this)};
function Lk(a){var b=a.o.videoId||a.o.videoIds[a.o.index];b&&Mk(a,"flingVideo",{videoId:b,currentTime:a.o.currentTime||0});a.o=null}function Mk(a,b,c){a.info("sendYoutubeMessage_: "+b+" "+Df(c));var d={};d.type=b;c&&(d.data=c);a.g?a.g.sendMessage("urn:x-cast:com.google.youtube.mdx",d,u,x(function(){this.warn("Failed to send message: "+b+".")},a)):a.warn("Sending yt message without session: "+Df(d))}
f.PB=function(a,b){if(!this.$())if(b){var c=Cf(b);if(c){var d=""+c.type,c=c.data||{};this.info("onYoutubeMessage_: "+d+" "+Df(c));switch(d){case "mdxSessionStatus":Kk(this,c.screenId);break;default:this.warn("Unknown youtube message: "+d)}}else this.warn("Unable to parse message.")}else this.warn("No data in message.")};
function Kk(a,b){M(a.A);b?(a.info("onConnectedScreenId_: Received screenId: "+b),a.k&&a.k.id==b||Bk(a.F,a.j.label,b,a.j.friendlyName,x(function(a){a?Ik(this,a):this.Tb(Error("Unable to fetch screen."))},a),x(a.Tb,a))):a.Tb(Error("Waiting for session status timed out."))}f.Zs=function(){return this.g};f.QB=function(a){this.$()||a||(this.warn("Cast session died."),this.Tb())};function Nk(a,b){Hk.call(this,a,b,"DialSession");this.A=this.D=null;this.G="";this.o=null;this.C=u;this.B=NaN;this.I=x(this.bA,this);this.g=u}z(Nk,Hk);f=Nk.prototype;f.Wm=function(a){this.A=a;this.A.addUpdateListener(this.I)};f.Uf=function(a){this.o=a;this.C()};f.stop=function(){this.g();this.g=u;M(this.B);this.A?this.A.stop(x(this.Tb,this,null),x(this.Tb,this,"Failed to stop DIAL device.")):this.Tb()};
f.K=function(){this.g();this.g=u;M(this.B);this.A&&this.A.removeUpdateListener(this.I);this.A=null;Nk.H.K.call(this)};function Ok(a){a.g=Ek(a.F,a.G,a.j.label,a.j.friendlyName,x(function(a){this.g=u;Ik(this,a)},a),x(function(a){this.g=u;this.Tb(a)},a))}f.bA=function(a){this.$()||a||(this.warn("DIAL session died."),this.g(),this.g=u,this.Tb())};
function Pk(a){var b={};b.pairingCode=a.G;if(a.o){var c=a.o.index||0,d=a.o.currentTime||0;b.v=a.o.videoId||a.o.videoIds[c];b.t=d}fk()&&(b.env_useStageMdx=1);return ge(b)}f.ym=function(a){this.G=sj();if(this.o){var b=new chrome.cast.DialLaunchResponse(!0,Pk(this));a(b);Ok(this)}else this.C=x(function(){M(this.B);this.C=u;this.B=NaN;var b=new chrome.cast.DialLaunchResponse(!0,Pk(this));a(b);Ok(this)},this),this.B=L(x(function(){this.C()},this),100)};
f.Yz=function(a,b){Bk(this.F,this.D.receiver.label,a,this.j.friendlyName,x(function(a){a&&a.token?(Ik(this,a),b(new chrome.cast.DialLaunchResponse(!1))):this.ym(b)},this),x(function(a){this.warn("Failed to get DIAL screen: "+a);this.ym(b)},this))};function Qk(a,b){Hk.call(this,a,b,"ManualSession");this.g=L(x(this.Uf,this,null),150)}z(Qk,Hk);Qk.prototype.stop=function(){this.Tb()};Qk.prototype.Wm=u;Qk.prototype.Uf=function(){M(this.g);this.g=NaN;var a=zj(this.F.Cb(),this.j.label);a?Ik(this,a):this.Tb(Error("No such screen"))};Qk.prototype.K=function(){M(this.g);this.g=NaN;Qk.H.K.call(this)};function Rk(a){T.call(this);this.j=a;this.g=null;this.A=!1;this.k=[];this.o=x(this.Jy,this)}z(Rk,T);f=Rk.prototype;
f.init=function(a,b){chrome.cast.timeout.requestSession=3E4;var c=new chrome.cast.SessionRequest("233637DE");c.dialRequest=new chrome.cast.DialRequest("YouTube");var d=chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED,e=a?chrome.cast.DefaultActionPolicy.CAST_THIS_TAB:chrome.cast.DefaultActionPolicy.CREATE_SESSION,c=new chrome.cast.ApiConfig(c,x(this.Js,this),x(this.uD,this),d,e);c.customDialLaunchCallback=x(this.tD,this);chrome.cast.initialize(c,x(function(){this.$()||(chrome.cast.addReceiverActionListener(this.o),
Ih(Sk),this.j.subscribe("onlineScreenChange",x(this.sq,this)),this.k=Tk(this),chrome.cast.setCustomReceivers(this.k,u,x(function(a){this.Oa("Failed to set initial custom receivers: "+Df(a))},this)),this.publish("yt-remote-cast2-availability-change",Uk(this)),b(!0))},this),function(a){this.Oa("Failed to initialize API: "+Df(a));b(!1)})};
f.RG=function(a,b){Vk("Setting connected screen ID: "+a+" -> "+b);if(this.g){var c=this.g.k;if(!a||c&&c.id!=a)Vk("Unsetting old screen status: "+this.g.j.friendlyName),Zh(this.g),this.g=null}if(a&&b){if(!this.g){c=zj(this.j.Cb(),a);if(!c){Vk("setConnectedScreenStatus: Unknown screen.");return}var d=Wk(this,c);d||(Vk("setConnectedScreenStatus: Connected receiver not custom..."),d=new chrome.cast.Receiver(c.uuid?c.uuid:c.id,c.name),d.receiverType=chrome.cast.ReceiverType.CUSTOM,this.k.push(d),chrome.cast.setCustomReceivers(this.k,
u,x(function(a){this.Oa("Failed to set initial custom receivers: "+Df(a))},this)));Vk("setConnectedScreenStatus: new active receiver: "+d.friendlyName);Xk(this,new Qk(this.j,d),!0)}this.g.zm(b)}else Vk("setConnectedScreenStatus: no screen.")};function Wk(a,b){return b?E(a.k,function(a){return Qh(b,a.label)},a):null}f.SG=function(a){this.$()?this.Oa("Setting connection data on disposed cast v2"):this.g?this.g.Uf(a):this.Oa("Setting connection data without a session")};
f.stopSession=function(){this.$()?this.Oa("Stopping session on disposed cast v2"):this.g?(this.g.stop(),Zh(this.g),this.g=null):Vk("Stopping non-existing session")};f.requestSession=function(){chrome.cast.requestSession(x(this.Js,this),x(this.mG,this))};f.K=function(){this.j.unsubscribe("onlineScreenChange",x(this.sq,this));window.chrome&&chrome.cast&&chrome.cast.removeReceiverActionListener(this.o);Lh(Sk);Zh(this.g);Rk.H.K.call(this)};function Vk(a){Mh("Controller",a)}
f.Oa=function(a){Mh("Controller",a)};function Sk(a){window.chrome&&chrome.cast&&chrome.cast.logMessage&&chrome.cast.logMessage(a)}function Uk(a){return a.A||!!a.k.length||!!a.g}function Xk(a,b,c){Zh(a.g);(a.g=b)?(c?a.publish("yt-remote-cast2-receiver-resumed",b.j):a.publish("yt-remote-cast2-receiver-selected",b.j),b.subscribe("sessionScreen",x(a.or,a,b)),b.k?a.publish("yt-remote-cast2-session-change",b.k):c&&a.g.Uf(null)):a.publish("yt-remote-cast2-session-change",null)}
f.or=function(a,b){this.g==a&&(b||Xk(this,null),this.publish("yt-remote-cast2-session-change",b))};
f.Jy=function(a,b){if(!this.$())if(a)switch(Vk("onReceiverAction_ "+a.label+" / "+a.friendlyName+"-- "+b),b){case chrome.cast.ReceiverAction.CAST:if(this.g)if(this.g.j.label!=a.label)Vk("onReceiverAction_: Stopping active receiver: "+this.g.j.friendlyName),this.g.stop();else{Vk("onReceiverAction_: Casting to active receiver.");this.g.k&&this.publish("yt-remote-cast2-session-change",this.g.k);break}switch(a.receiverType){case chrome.cast.ReceiverType.CUSTOM:Xk(this,new Qk(this.j,a));break;case chrome.cast.ReceiverType.DIAL:Xk(this,
new Nk(this.j,a));break;case chrome.cast.ReceiverType.CAST:Xk(this,new Jk(this.j,a));break;default:this.Oa("Unknown receiver type: "+a.receiverType);return}break;case chrome.cast.ReceiverAction.STOP:this.g&&this.g.j.label==a.label?this.g.stop():this.Oa("Stopping receiver w/o session: "+a.friendlyName)}else this.Oa("onReceiverAction_ called without receiver.")};
f.tD=function(a){if(this.$())return Promise.reject(Error("disposed"));var b=a.receiver;b.receiverType!=chrome.cast.ReceiverType.DIAL&&(this.Oa("Not DIAL receiver: "+b.friendlyName),b.receiverType=chrome.cast.ReceiverType.DIAL);var c=this.g?this.g.j:null;if(!c||c.label!=b.label)return this.Oa("Receiving DIAL launch request for non-clicked DIAL receiver: "+b.friendlyName),Promise.reject(Error("illegal DIAL launch"));if(c&&c.label==b.label&&c.receiverType!=chrome.cast.ReceiverType.DIAL){if(this.g.k)return Vk("Reselecting dial screen."),
this.publish("yt-remote-cast2-session-change",this.g.k),Promise.resolve(new chrome.cast.DialLaunchResponse(!1));this.Oa('Changing CAST intent from "'+c.receiverType+'" to "dial" for '+b.friendlyName);Xk(this,new Nk(this.j,b))}b=this.g;b.D=a;return b.D.appState==chrome.cast.DialAppState.RUNNING?new Promise(x(b.Yz,b,(b.D.extraData||{}).screenId||null)):new Promise(x(b.ym,b))};
f.Js=function(a){if(!this.$()){Vk("New cast session ID: "+a.sessionId);var b=a.receiver;if(b.receiverType!=chrome.cast.ReceiverType.CUSTOM){if(!this.g)if(b.receiverType==chrome.cast.ReceiverType.CAST)Vk("Got resumed cast session before resumed mdx connection."),Xk(this,new Jk(this.j,b),!0);else{this.Oa("Got non-cast session without previous mdx receiver event, or mdx resume.");return}var c=this.g.j,d=zj(this.j.Cb(),c.label);d&&Qh(d,b.label)&&c.receiverType!=chrome.cast.ReceiverType.CAST&&b.receiverType==
chrome.cast.ReceiverType.CAST&&(Vk("onSessionEstablished_: manual to cast session change "+b.friendlyName),Zh(this.g),this.g=new Jk(this.j,b),this.g.subscribe("sessionScreen",x(this.or,this,this.g)),this.g.Uf(null));this.g.Wm(a)}}};f.VG=function(){return this.g?this.g.Zs():null};f.mG=function(a){this.$()||(this.Oa("Failed to estabilish a session: "+Df(a)),a.code!=chrome.cast.ErrorCode.CANCEL&&Xk(this,null))};
f.uD=function(a){Vk("Receiver availability updated: "+a);if(!this.$()){var b=Uk(this);this.A=a==chrome.cast.ReceiverAvailability.AVAILABLE;Uk(this)!=b&&this.publish("yt-remote-cast2-availability-change",Uk(this))}};
function Tk(a){var b=a.j.As(),c=a.g&&a.g.j;a=D(b,function(a){c&&Qh(a,c.label)&&(c=null);var b=a.uuid?a.uuid:a.id,g=Wk(this,a);g?(g.label=b,g.friendlyName=a.name):(g=new chrome.cast.Receiver(b,a.name),g.receiverType=chrome.cast.ReceiverType.CUSTOM);return g},a);c&&(c.receiverType!=chrome.cast.ReceiverType.CUSTOM&&(c=new chrome.cast.Receiver(c.label,c.friendlyName),c.receiverType=chrome.cast.ReceiverType.CUSTOM),a.push(c));return a}
f.sq=function(){if(!this.$()){var a=Uk(this);this.k=Tk(this);Vk("Updating custom receivers: "+Df(this.k));chrome.cast.setCustomReceivers(this.k,u,x(function(){this.Oa("Failed to set custom receivers.")},this));var b=Uk(this);b!=a&&this.publish("yt-remote-cast2-availability-change",b)}};Rk.prototype.setLaunchParams=Rk.prototype.SG;Rk.prototype.setConnectedScreenStatus=Rk.prototype.RG;Rk.prototype.stopSession=Rk.prototype.stopSession;Rk.prototype.getCastSession=Rk.prototype.VG;
Rk.prototype.requestSession=Rk.prototype.requestSession;Rk.prototype.init=Rk.prototype.init;Rk.prototype.dispose=Rk.prototype.dispose;function Yk(a,b,c){Bh?$k(b)&&(al(!0),window.chrome&&chrome.cast&&chrome.cast.isAvailable?bl(a,c):Pi(function(b,e){b?bl(a,c):(cl("Failed to load cast API: "+e),dl(!1),al(!1),Hi("yt-remote-cast-available"),Hi("yt-remote-cast-receiver"),el(),c(!1))})):Zk("Cannot initialize because not running Chrome")}function el(){Zk("dispose");Qi();var a=fl();a&&a.dispose();gl=null;q("yt.mdx.remote.cloudview.instance_",null,void 0);hl(!1);ji(il);il.length=0}function jl(){return!!Gi("yt-remote-cast-installed")}
function kl(){var a=Gi("yt-remote-cast-receiver");return a?a.friendlyName:null}function ll(){return jl()?fl()?gl.getCastSession():(cl("getCastSelector: Cast is not initialized."),null):(cl("getCastSelector: Cast API is not installed!"),null)}
function ml(){jl()?fl()?nl()?(Zk("Requesting cast selector."),gl.requestSession()):(Zk("Wait for cast API to be ready to request the session."),il.push(hi("yt-remote-cast2-api-ready",ml))):cl("requestCastSelector: Cast is not initialized."):cl("requestCastSelector: Cast API is not installed!")}function ol(a){nl()?fl().setLaunchParams(a):cl("setLaunchParams called before ready.")}
function pl(){var a=ql();nl()?fl().setConnectedScreenStatus(a,"YouTube TV"):cl("setConnectedScreenStatus called before ready.")}var gl=null;function rl(a,b){gl.init(a,b)}
function $k(a){var b=!1;if(!gl){var c=s("yt.mdx.remote.cloudview.instance_");c||(c=new Rk(a),c.subscribe("yt-remote-cast2-availability-change",function(a){Ei("yt-remote-cast-available",a);ki("yt-remote-cast2-availability-change",a)}),c.subscribe("yt-remote-cast2-receiver-selected",function(a){Zk("onReceiverSelected: "+a.friendlyName);Ei("yt-remote-cast-receiver",a);ki("yt-remote-cast2-receiver-selected",a)}),c.subscribe("yt-remote-cast2-receiver-resumed",function(a){Zk("onReceiverResumed: "+a.friendlyName);
Ei("yt-remote-cast-receiver",a)}),c.subscribe("yt-remote-cast2-session-change",function(a){Zk("onSessionChange: "+Wh(a));a||Hi("yt-remote-cast-receiver");ki("yt-remote-cast2-session-change",a)}),q("yt.mdx.remote.cloudview.instance_",c,void 0),b=!0);gl=c}Zk("cloudview.createSingleton_: "+b);return b}function fl(){gl||(gl=s("yt.mdx.remote.cloudview.instance_"));return gl}
function bl(a,b){dl(!0);al(!1);rl(a,function(a){a?(hl(!0),ki("yt-remote-cast2-api-ready")):(cl("Failed to initialize cast API."),dl(!1),Hi("yt-remote-cast-available"),Hi("yt-remote-cast-receiver"),el());b(a)})}function Zk(a){Mh("cloudview",a)}function cl(a){Mh("cloudview",a)}function dl(a){Zk("setCastInstalled_ "+a);Ei("yt-remote-cast-installed",a)}function nl(){return!!s("yt.mdx.remote.cloudview.apiReady_")}function hl(a){Zk("setApiReady_ "+a);q("yt.mdx.remote.cloudview.apiReady_",a,void 0)}
function al(a){q("yt.mdx.remote.cloudview.initializing_",a,void 0)}var il=[];function sl(a,b){this.action=a;this.params=b||null};function tl(){if(!("cast"in window))return!1;var a=window.cast||{};return"ActivityStatus"in a&&"Api"in a&&"LaunchRequest"in a&&"Receiver"in a}function ul(a){Mh("CAST",a)}function vl(a){var b=wl();b&&b.logMessage&&b.logMessage(a)}function xl(a){if(a.source==window&&a.data&&"CastApi"==a.data.source&&"Hello"==a.data.event)for(;yl.length;)yl.shift()()}
function zl(){if(!s("yt.mdx.remote.castv2_")&&!Al&&(mb(Bl)&&ub(Bl,ck()),tl())){var a=wl();a?(a.removeReceiverListener("YouTube",Cl),a.addReceiverListener("YouTube",Cl),ul("API initialized in the other binary")):(a=new cast.Api,Dl(a),a.addReceiverListener("YouTube",Cl),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(function(){L(function(){window.location.reload(!0)},1E3)}),Ih(vl),ul("API initialized"));Al=!0}}
function El(){var a=wl();a&&(ul("API disposed"),Lh(vl),a.setReloadTabRequestHandler&&a.setReloadTabRequestHandler(u),a.removeReceiverListener("YouTube",Cl),Dl(null));Al=!1;yl=null;(a=ah(window,"message",xl,!1))&&ch(a)}function Fl(a){var b=ib(Bl,function(b){return b.id==a.id});0<=b&&(Bl[b]=qj(a))}
function Cl(a){a.length&&ul("Updating receivers: "+Df(a));Gl(a);ki("yt-remote-cast-device-list-update");C(Hl(),function(a){Il(a.id)});C(a,function(a){if(a.isTabProjected){var c=Jl(a.id);ul("Detected device: "+c.id+" is tab projected. Firing DEVICE_TAB_PROJECTED event.");L(function(){ki("yt-remote-cast-device-tab-projected",c.id)},1E3)}})}
function Kl(a,b){ul("Updating "+a+" activity status: "+Df(b));var c=Jl(a);c?(b.activityId&&(c.activityId=b.activityId),c.status="running"==b.status?"RUNNING":"stopped"==b.status?"STOPPED":"error"==b.status?"ERROR":"UNKNOWN","RUNNING"!=c.status&&(c.activityId=""),Fl(c),ki("yt-remote-cast-device-status-update",c)):ul("Device not found")}function Hl(){zl();return vj(Bl)}
function Gl(a){a=D(a,function(a){var c={id:a.id,name:Ha(a.name)};if(a=Jl(a.id))c.activityId=a.activityId,c.status=a.status;return c});nb(Bl);ub(Bl,a)}function Jl(a){var b=Hl();return E(b,function(b){return b.id==a})||null}function Il(a){var b=Jl(a),c=wl();c&&b&&b.activityId&&c.getActivityStatus(b.activityId,function(b){"error"==b.status&&(b.status="stopped");Kl(a,b)})}
function Ll(a){zl();var b=Jl(a),c=wl();c&&b&&b.activityId?(ul("Stopping cast activity"),c.stopActivity(b.activityId,pa(Kl,a))):ul("Dropping cast activity stop")}function wl(){return s("yt.mdx.remote.castapi.api_")}function Dl(a){q("yt.mdx.remote.castapi.api_",a,void 0)}var Al=!1,yl=null,Bl=s("yt.mdx.remote.castapi.devices_")||[];q("yt.mdx.remote.castapi.devices_",Bl,void 0);function Ml(a){this.g=new Od;if(a){a=Ud(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])}}function Nl(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+ka(a):b.substr(0,1)+a}f=Ml.prototype;f.Sa=function(){return this.g.Sa()};f.add=function(a){this.g.set(Nl(a),a)};f.removeAll=function(a){a=Ud(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};f.remove=function(a){return this.g.remove(Nl(a))};f.clear=function(){this.g.clear()};f.isEmpty=function(){return this.g.isEmpty()};
f.contains=function(a){return Qd(this.g,Nl(a))};f.Wa=function(){return this.g.Wa()};f.clone=function(){return new Ml(this)};f.equals=function(a){return this.Sa()==Td(a)&&Ol(this,a)};function Ol(a,b){var c=Td(b);if(a.Sa()>c)return!1;!(b instanceof Ml)&&5<c&&(b=new Ml(b));return Xd(a,function(a){var c=b;return"function"==typeof c.contains?c.contains(a):"function"==typeof c.ig?c.ig(a):ga(c)||w(c)?lb(c,a):Xb(c,a)})}f.$b=function(){return this.g.$b(!1)};function Pl(){};var Ql=kc("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));var Rl=/<[^>]*>|&[^;]+;/g;function Sl(a,b){return b?a.replace(Rl,""):a}
var Tl=RegExp("[\u0591-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc]"),Ul=RegExp("[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]"),Vl=RegExp("^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc]"),Wl=/^http:\/\/.*/,Xl=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,Yl=
/\s+/,Zl=/\d/;function $l(){this.g=am}$l.prototype.dg=!0;$l.prototype.cg=function(){return""};$l.prototype.toString=function(){return"Const{}"};function bm(a){return a instanceof $l&&a.constructor===$l&&a.g===am?"":"type_error:Const"}var am={};function cm(){this.g="";this.j=dm}cm.prototype.dg=!0;var dm={};cm.prototype.cg=function(){return this.g};function em(a){var b=new cm;b.g=a;return b}var fm=em(""),gm=/^[-.%_!# a-zA-Z0-9]+$/;function hm(){this.g=im}hm.prototype.dg=!0;hm.prototype.cg=function(){return""};hm.prototype.Nn=!0;hm.prototype.ag=function(){return 1};function jm(a){return a instanceof hm&&a.constructor===hm&&a.g===im?"":"type_error:SafeUrl"}var im={};function km(){this.g=lm}km.prototype.dg=!0;km.prototype.cg=function(){return""};km.prototype.Nn=!0;km.prototype.ag=function(){return 1};var lm={};function mm(){this.g="";this.k=nm;this.j=null}mm.prototype.Nn=!0;mm.prototype.ag=function(){return this.j};mm.prototype.dg=!0;mm.prototype.cg=function(){return this.g};function om(a){return a instanceof mm&&a.constructor===mm&&a.k===nm?a.g:"type_error:SafeHtml"}var pm=/^[a-zA-Z0-9-]+$/,qm=kc("action","cite","data","formaction","href","manifest","poster","src"),rm=kc("link","script","style");
function sm(a){function b(a){if(fa(a))C(a,b);else{if(!(a instanceof mm)){var g=null;a.Nn&&(g=a.ag());a=tm(za(a.dg?a.cg():String(a)),g)}d+=om(a);a=a.ag();0==c?c=a:0!=a&&c!=a&&(c=null)}}var c=0,d="";C(arguments,b);return tm(d,c)}var nm={};function tm(a,b){var c=new mm;c.g=a;c.j=b;return c}tm("",0);function um(){this.g=y()}new um;um.prototype.set=function(a){this.g=a};um.prototype.get=function(){return this.g};function vm(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.j=!1;this.rs=!0}vm.prototype.K=function(){};vm.prototype.dispose=function(){};vm.prototype.stopPropagation=function(){this.j=!0};vm.prototype.preventDefault=function(){this.defaultPrevented=!0;this.rs=!1};function wm(a){a.stopPropagation()};var xm=!wc||Jc(9),ym=wc&&!Ic("9");!yc||Ic("528");xc&&Ic("1.9b")||wc&&Ic("8")||vc&&Ic("9.5")||yc&&Ic("528");xc&&!Ic("8")||wc&&Ic("9");var zm="ontouchstart"in l||!!(l.document&&document.documentElement&&"ontouchstart"in document.documentElement)||!(!l.navigator||!l.navigator.msMaxTouchPoints);function Am(a,b){vm.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.g=this.state=null;a&&this.init(a,b)}z(Am,vm);f=Am.prototype;
f.init=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;d?xc&&(Qf(d,"nodeName")||(d=null)):"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=
a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.g=a;a.defaultPrevented&&this.preventDefault()};f.stopPropagation=function(){Am.H.stopPropagation.call(this);this.g.stopPropagation?this.g.stopPropagation():this.g.cancelBubble=!0};f.preventDefault=function(){Am.H.preventDefault.call(this);var a=this.g;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,ym)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};
f.kE=function(){return this.g};f.K=function(){};var Bm="closure_listenable_"+(1E6*Math.random()|0);function Cm(a){return!(!a||!a[Bm])}var Dm=0;function Em(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.Sf=!!d;this.Pc=e;this.key=++Dm;this.removed=this.Hj=!1}function Fm(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.Pc=null};function Gm(a){this.src=a;this.g={};this.j=0}Gm.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.g[g];a||(a=this.g[g]=[],this.j++);var h=Hm(a,b,d,e);-1<h?(b=a[h],c||(b.Hj=!1)):(b=new Em(b,this.src,g,!!d,e),b.Hj=c,a.push(b));return b};Gm.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.g))return!1;var e=this.g[a];b=Hm(e,b,c,d);return-1<b?(Fm(e[b]),qb(e,b),0==e.length&&(delete this.g[a],this.j--),!0):!1};
function Im(a,b){var c=b.type;if(!(c in a.g))return!1;var d=pb(a.g[c],b);d&&(Fm(b),0==a.g[c].length&&(delete a.g[c],a.j--));return d}Gm.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.g)if(!a||c==a){for(var d=this.g[c],e=0;e<d.length;e++)++b,Fm(d[e]);delete this.g[c];this.j--}return b};function Jm(a,b,c,d,e){a=a.g[b.toString()];b=-1;a&&(b=Hm(a,c,d,e));return-1<b?a[b]:null}
function Hm(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.listener==b&&g.Sf==!!c&&g.Pc==d)return e}return-1};var Km="closure_lm_"+(1E6*Math.random()|0),Lm={},Mm=0;function Nm(a,b,c,d,e){if(fa(b)){for(var g=0;g<b.length;g++)Nm(a,b[g],c,d,e);return null}c=Om(c);return Cm(a)?a.listen(b,c,d,e):Pm(a,b,c,!1,d,e)}function Pm(a,b,c,d,e,g){if(!b)throw Error("Invalid event type");var h=!!e,k=Qm(a);k||(a[Km]=k=new Gm(a));c=k.add(b,c,d,e,g);if(c.proxy)return c;d=Rm();c.proxy=d;d.src=a;d.listener=c;a.addEventListener?a.addEventListener(b.toString(),d,h):a.attachEvent(Sm(b.toString()),d);Mm++;return c}
function Rm(){var a=Tm,b=xm?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b}function Um(a,b,c,d,e){if(fa(b)){for(var g=0;g<b.length;g++)Um(a,b[g],c,d,e);return null}c=Om(c);return Cm(a)?a.yd.add(String(b),c,!0,d,e):Pm(a,b,c,!0,d,e)}function Vm(a,b,c,d,e){if(fa(b))for(var g=0;g<b.length;g++)Vm(a,b[g],c,d,e);else c=Om(c),Cm(a)?a.Ga(b,c,d,e):a&&(a=Qm(a))&&(b=Jm(a,b,c,!!d,e))&&Wm(b)}
function Wm(a){if(ha(a)||!a||a.removed)return!1;var b=a.src;if(Cm(b))return Im(b.yd,a);var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.Sf):b.detachEvent&&b.detachEvent(Sm(c),d);Mm--;(c=Qm(b))?(Im(c,a),0==c.j&&(c.src=null,b[Km]=null)):Fm(a);return!0}function Sm(a){return a in Lm?Lm[a]:Lm[a]="on"+a}function Xm(a,b,c,d){var e=1;if(a=Qm(a))if(b=a.g[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.Sf==c&&!g.removed&&(e&=!1!==Ym(g,d))}return Boolean(e)}
function Ym(a,b){var c=a.listener,d=a.Pc||a.src;a.Hj&&Wm(a);return c.call(d,b)}
function Tm(a,b){if(a.removed)return!0;if(!xm){var c=b||s("window.event"),d=new Am(c,this),e=!0;if(!(0>c.keyCode||void 0!=c.returnValue)){t:{var g=!1;if(0==c.keyCode)try{c.keyCode=-1;break t}catch(h){g=!0}if(g||void 0==c.returnValue)c.returnValue=!0}c=[];for(g=d.currentTarget;g;g=g.parentNode)c.push(g);for(var g=a.type,k=c.length-1;!d.j&&0<=k;k--)d.currentTarget=c[k],e&=Xm(c[k],g,!0,d);for(k=0;!d.j&&k<c.length;k++)d.currentTarget=c[k],e&=Xm(c[k],g,!1,d)}return e}return Ym(a,new Am(b,this))}
function Qm(a){a=a[Km];return a instanceof Gm?a:null}var Zm="__closure_events_fn_"+(1E9*Math.random()>>>0);function Om(a){if(ia(a))return a;a[Zm]||(a[Zm]=function(b){return a.handleEvent(b)});return a[Zm]};function U(){Q.call(this);this.yd=new Gm(this);this.ma=this;this.W=null}z(U,Q);U.prototype[Bm]=!0;f=U.prototype;f.gi=function(a){this.W=a};f.addEventListener=function(a,b,c,d){Nm(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Vm(this,a,b,c,d)};
f.T=function(a){var b,c=this.W;if(c){b=[];for(var d=1;c;c=c.W)b.push(c),++d}c=this.ma;d=a.type||a;if(w(a))a=new vm(a,c);else if(a instanceof vm)a.target=a.target||c;else{var e=a;a=new vm(d,c);jc(a,e)}var e=!0,g;if(b)for(var h=b.length-1;!a.j&&0<=h;h--)g=a.currentTarget=b[h],e=$m(g,d,!0,a)&&e;a.j||(g=a.currentTarget=c,e=$m(g,d,!0,a)&&e,a.j||(e=$m(g,d,!1,a)&&e));if(b)for(h=0;!a.j&&h<b.length;h++)g=a.currentTarget=b[h],e=$m(g,d,!1,a)&&e;return e};
f.K=function(){U.H.K.call(this);this.removeAllListeners();this.W=null};f.listen=function(a,b,c,d){return this.yd.add(String(a),b,!1,c,d)};f.Ga=function(a,b,c,d){return this.yd.remove(String(a),b,c,d)};f.removeAllListeners=function(a){return this.yd?this.yd.removeAll(a):0};
function $m(a,b,c,d){b=a.yd.g[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.removed&&h.Sf==c){var k=h.listener,m=h.Pc||h.src;h.Hj&&Im(a.yd,h);e=!1!==k.call(m,d)&&e}}return e&&0!=d.rs};function an(a,b){this.j=new Ff(a);this.g=b?Cf:Bf}an.prototype.stringify=function(a){return Ef(this.j,a)};an.prototype.parse=function(a){return this.g(a)};function bn(a){this.j=0;this.k=a||100;this.g=[]}f=bn.prototype;f.add=function(a){var b=this.g[this.j];this.g[this.j]=a;this.j=(this.j+1)%this.k;return b};f.get=function(a){a=cn(this,a);return this.g[a]};f.set=function(a,b){a=cn(this,a);this.g[a]=b};f.Sa=function(){return this.g.length};f.isEmpty=function(){return 0==this.g.length};f.clear=function(){this.j=this.g.length=0};f.Wa=function(){for(var a=this.Sa(),b=this.Sa(),c=[],a=this.Sa()-a;a<b;a++)c.push(this.get(a));return c};
f.La=function(){for(var a=[],b=this.Sa(),c=0;c<b;c++)a[c]=c;return a};f.ig=function(a){for(var b=this.Sa(),c=0;c<b;c++)if(this.get(c)==a)return!0;return!1};function cn(a,b){if(b>=a.g.length)throw Error("Out of bounds exception");return a.g.length<a.k?b:(a.j+Number(b))%a.k};function dn(a){l.setTimeout(function(){throw a;},0)}var en;
function fn(){var a=l.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&(a=function(){var a=document.createElement("iframe");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,a=x(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},
this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!oc("Trident")&&!oc("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(n(c.next)){c=c.next;var a=c.tu;c.tu=null;a()}};return function(a){d.next={tu:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("script")?function(a){var b=document.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=
null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){l.setTimeout(a,0)}};function gn(a,b){hn||jn();kn||(hn(),kn=!0);ln.push(new mn(a,b))}var hn;function jn(){if(l.Promise&&l.Promise.resolve){var a=l.Promise.resolve();hn=function(){a.then(nn)}}else hn=function(){var a=nn;!ia(l.setImmediate)||l.Window&&l.Window.prototype.setImmediate==l.setImmediate?(en||(en=fn()),en(a)):l.setImmediate(a)}}var kn=!1,ln=[];function nn(){for(;ln.length;){var a=ln;ln=[];for(var b=0;b<a.length;b++){var c=a[b];try{c.g.call(c.scope)}catch(d){dn(d)}}}kn=!1}
function mn(a,b){this.g=a;this.scope=b};function on(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0}function pn(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};function qn(a,b){this.j=0;this.B=void 0;this.g=this.k=null;this.o=this.A=!1;try{var c=this;a.call(b,function(a){rn(c,2,a)},function(a){rn(c,3,a)})}catch(d){rn(this,3,d)}}function sn(){var a=tn;return new qn(function(b,c){var d=a.length,e=[];if(d)for(var g=function(a,c){d--;e[a]=c;0==d&&b(e)},h=function(a){c(a)},k=0,m;m=a[k];k++)m.then(pa(g,k),h);else b(e)})}qn.prototype.then=function(a,b,c){return un(this,ia(a)?a:null,ia(b)?b:null,c)};on(qn);
qn.prototype.cancel=function(a){0==this.j&&gn(function(){var b=new vn(a);wn(this,b)},this)};function wn(a,b){if(0==a.j)if(a.k){var c=a.k;if(c.g){for(var d=0,e=-1,g=0,h;h=c.g[g];g++)if(h=h.nh)if(d++,h==a&&(e=g),0<=e&&1<d)break;0<=e&&(0==c.j&&1==d?wn(c,b):(d=c.g.splice(e,1)[0],xn(c,d,3,b)))}}else rn(a,3,b)}function yn(a,b){a.g&&a.g.length||2!=a.j&&3!=a.j||zn(a);a.g||(a.g=[]);a.g.push(b)}
function un(a,b,c,d){var e={nh:null,ut:null,vt:null};e.nh=new qn(function(a,h){e.ut=b?function(c){try{var e=b.call(d,c);a(e)}catch(p){h(p)}}:a;e.vt=c?function(b){try{var e=c.call(d,b);!n(e)&&b instanceof vn?h(b):a(e)}catch(p){h(p)}}:h});e.nh.k=a;yn(a,e);return e.nh}qn.prototype.C=function(a){this.j=0;rn(this,2,a)};qn.prototype.D=function(a){this.j=0;rn(this,3,a)};
function rn(a,b,c){if(0==a.j){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{if(pn(c)){a.j=1;c.then(a.C,a.D,a);return}if(ja(c))try{var d=c.then;if(ia(d)){An(a,c,d);return}}catch(e){b=3,c=e}}a.B=c;a.j=b;zn(a);3!=b||c instanceof vn||Bn(a,c)}}function An(a,b,c){function d(b){g||(g=!0,a.D(b))}function e(b){g||(g=!0,a.C(b))}a.j=1;var g=!1;try{c.call(b,e,d)}catch(h){d(h)}}function zn(a){a.A||(a.A=!0,gn(a.F,a))}
qn.prototype.F=function(){for(;this.g&&this.g.length;){var a=this.g;this.g=[];for(var b=0;b<a.length;b++)xn(this,a[b],this.j,this.B)}this.A=!1};function xn(a,b,c,d){if(2==c)b.ut(d);else{if(b.nh)for(;a&&a.o;a=a.k)a.o=!1;b.vt(d)}}function Bn(a,b){a.o=!0;gn(function(){a.o&&Cn.call(null,b)})}var Cn=dn;function vn(a){sa.call(this,a)}z(vn,sa);vn.prototype.name="cancel";function Dn(a,b){U.call(this);this.g=a||1;this.j=b||l;this.k=x(this.Lz,this);this.o=y()}z(Dn,U);f=Dn.prototype;f.enabled=!1;f.vc=null;function En(a,b){a.g=b;a.vc&&a.enabled?(a.stop(),a.start()):a.vc&&a.stop()}f.Lz=function(){if(this.enabled){var a=y()-this.o;0<a&&a<.8*this.g?this.vc=this.j.setTimeout(this.k,this.g-a):(this.vc&&(this.j.clearTimeout(this.vc),this.vc=null),this.T("tick"),this.enabled&&(this.vc=this.j.setTimeout(this.k,this.g),this.o=y()))}};
f.start=function(){this.enabled=!0;this.vc||(this.vc=this.j.setTimeout(this.k,this.g),this.o=y())};f.stop=function(){this.enabled=!1;this.vc&&(this.j.clearTimeout(this.vc),this.vc=null)};f.K=function(){Dn.H.K.call(this);this.stop();delete this.j};function Fn(a,b,c){if(ia(a))c&&(a=x(a,c));else if(a&&"function"==typeof a.handleEvent)a=x(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:l.setTimeout(a,b||0)}function Gn(a){l.clearTimeout(a)};function Hn(a,b,c){Q.call(this);this.o=a;this.k=b;this.j=c;this.g=x(this.Nz,this)}z(Hn,Q);f=Hn.prototype;f.kg=!1;f.Oh=0;f.Re=null;function In(a){a.Re||a.Oh?a.kg=!0:Jn(a)}f.stop=function(){this.Re&&(Gn(this.Re),this.Re=null,this.kg=!1)};f.pause=function(){this.Oh++};f.resume=function(){this.Oh--;this.Oh||!this.kg||this.Re||(this.kg=!1,Jn(this))};f.K=function(){Hn.H.K.call(this);this.stop()};f.Nz=function(){this.Re=null;this.kg&&!this.Oh&&(this.kg=!1,Jn(this))};
function Jn(a){a.Re=Fn(a.g,a.k);a.o.call(a.j)};function Kn(a){Q.call(this);this.o=a;this.j={}}z(Kn,Q);var Ln=[];f=Kn.prototype;f.listen=function(a,b,c,d){return Mn(this,a,b,c,d)};function Nn(a,b,c,d,e){Mn(a,b,c,d,!1,e)}function Mn(a,b,c,d,e,g){fa(c)||(c&&(Ln[0]=c.toString()),c=Ln);for(var h=0;h<c.length;h++){var k=Nm(b,c[h],d||a.handleEvent,e||!1,g||a.o||a);if(!k)break;a.j[k.key]=k}return a}function On(a,b,c,d){Pn(a,b,c,d,void 0)}function Qn(a,b,c,d,e){Pn(a,b,c,d,!1,e)}
function Pn(a,b,c,d,e,g){if(fa(c))for(var h=0;h<c.length;h++)Pn(a,b,c[h],d,e,g);else(b=Um(b,c,d||a.handleEvent,e,g||a.o||a))&&(a.j[b.key]=b)}f.Ga=function(a,b,c,d,e){if(fa(b))for(var g=0;g<b.length;g++)this.Ga(a,b[g],c,d,e);else c=c||this.handleEvent,e=e||this.o||this,c=Om(c),d=!!d,b=Cm(a)?Jm(a.yd,String(b),c,d,e):a?(a=Qm(a))?Jm(a,b,c,d,e):null:null,b&&(Wm(b),delete this.j[b.key]);return this};f.removeAll=function(){Ob(this.j,Wm);this.j={}};f.K=function(){Kn.H.K.call(this);this.removeAll()};
f.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};function Rn(a){switch(a){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}};function Sn(){}Sn.prototype.g=null;function Tn(a){var b;(b=a.g)||(b={},Un(a)&&(b[0]=!0,b[1]=!0),b=a.g=b);return b};var Vn;function Wn(){}z(Wn,Sn);function Xn(a){return(a=Un(a))?new ActiveXObject(a):new XMLHttpRequest}function Un(a){if(!a.j&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.j=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.j}Vn=new Wn;function Yn(a,b,c,d,e){this.g=a;this.k=c;this.C=d;this.B=e||1;this.vb=45E3;this.o=new Kn(this);this.j=new Dn;En(this.j,250)}f=Yn.prototype;f.Ge=null;f.Mc=!1;f.fg=null;f.wn=null;f.qh=null;f.Vf=null;f.ae=null;f.ge=null;f.Fe=null;f.qb=null;f.Dh=0;f.Oc=null;f.Pj=null;f.Qe=null;f.Xg=-1;f.Yr=!0;f.Se=!1;f.Mm=0;f.pj=null;var Zn={},$n={};f=Yn.prototype;f.setTimeout=function(a){this.vb=a};function ao(a,b,c){a.Vf=1;a.ae=Ge(b.clone());a.Fe=c;a.A=!0;bo(a,null)}
function co(a,b,c,d,e){a.Vf=1;a.ae=Ge(b.clone());a.Fe=null;a.A=c;e&&(a.Yr=!1);bo(a,d)}function bo(a,b){a.qh=y();eo(a);a.ge=a.ae.clone();De(a.ge,"t",a.B);a.Dh=0;a.qb=a.g.ln(a.g.ph()?b:null);0<a.Mm&&(a.pj=new Hn(x(a.Cs,a,a.qb),a.Mm));a.o.listen(a.qb,"readystatechange",a.jD);var c=a.Ge?fc(a.Ge):{};a.Fe?(a.Pj="POST",c["Content-Type"]="application/x-www-form-urlencoded",a.qb.send(a.ge,a.Pj,a.Fe,c)):(a.Pj="GET",a.Yr&&!yc&&(c.Connection="close"),a.qb.send(a.ge,a.Pj,null,c));a.g.Lc(1)}
f.jD=function(a){a=a.target;var b=this.pj;b&&3==fo(a)?In(b):this.Cs(a)};
f.Cs=function(a){try{if(a==this.qb)t:{var b=fo(this.qb),c=this.qb.j,d=this.qb.getStatus();if(wc&&!Jc(10)||yc&&!Ic("420+")){if(4>b)break t}else if(3>b||3==b&&!vc&&!go(this.qb))break t;this.Se||4!=b||7==c||(8==c||0>=d?this.g.Lc(3):this.g.Lc(2));ho(this);var e=this.qb.getStatus();this.Xg=e;var g=go(this.qb);(this.Mc=200==e)?(4==b&&io(this),this.A?(jo(this,b,g),vc&&this.Mc&&3==b&&(this.o.listen(this.j,"tick",this.Xz),this.j.start())):ko(this,g),this.Mc&&!this.Se&&(4==b?this.g.oj(this):(this.Mc=!1,eo(this)))):
(this.Qe=400==e&&0<g.indexOf("Unknown SID")?3:0,lo(),io(this),mo(this))}}catch(h){this.qb&&go(this.qb)}finally{}};function jo(a,b,c){for(var d=!0;!a.Se&&a.Dh<c.length;){var e=no(a,c);if(e==$n){4==b&&(a.Qe=4,lo(),d=!1);break}else if(e==Zn){a.Qe=4;lo();d=!1;break}else ko(a,e)}4==b&&0==c.length&&(a.Qe=1,lo(),d=!1);a.Mc=a.Mc&&d;d||(io(a),mo(a))}f.Xz=function(){var a=fo(this.qb),b=go(this.qb);this.Dh<b.length&&(ho(this),jo(this,a,b),this.Mc&&4!=a&&eo(this))};
function no(a,b){var c=a.Dh,d=b.indexOf("\n",c);if(-1==d)return $n;c=Number(b.substring(c,d));if(isNaN(c))return Zn;d+=1;if(d+c>b.length)return $n;var e=b.substr(d,c);a.Dh=d+c;return e}
function oo(a,b){a.qh=y();eo(a);var c=b?window.location.hostname:"";a.ge=a.ae.clone();K(a.ge,"DOMAIN",c);K(a.ge,"t",a.B);try{a.Oc=new ActiveXObject("htmlfile")}catch(d){io(a);a.Qe=7;lo();mo(a);return}var e="<html><body>";b&&(e+='<script>document.domain="'+c+'"\x3c/script>');e+="</body></html>";a.Oc.open();a.Oc.write(e);a.Oc.close();a.Oc.parentWindow.m=x(a.AD,a);a.Oc.parentWindow.d=x(a.Ks,a,!0);a.Oc.parentWindow.rpcClose=x(a.Ks,a,!1);c=a.Oc.createElement("div");a.Oc.parentWindow.document.body.appendChild(c);
c.innerHTML='<iframe src="'+a.ge+'"></iframe>';a.g.Lc(1)}f.AD=function(a){po(x(this.PG,this,a),0)};f.PG=function(a){this.Se||(ho(this),ko(this,a),eo(this))};f.Ks=function(a){po(x(this.OG,this,a),0)};f.OG=function(a){this.Se||(io(this),this.Mc=a,this.g.oj(this),this.g.Lc(4))};f.cancel=function(){this.Se=!0;io(this)};function eo(a){a.wn=y()+a.vb;qo(a,a.vb)}function qo(a,b){if(null!=a.fg)throw Error("WatchDog timer not null");a.fg=po(x(a.iG,a),b)}
function ho(a){a.fg&&(l.clearTimeout(a.fg),a.fg=null)}f.iG=function(){this.fg=null;var a=y();0<=a-this.wn?(2!=this.Vf&&this.g.Lc(3),io(this),this.Qe=2,lo(),mo(this)):qo(this,this.wn-a)};function mo(a){a.g.Rs()||a.Se||a.g.oj(a)}function io(a){ho(a);Zh(a.pj);a.pj=null;a.j.stop();a.o.removeAll();if(a.qb){var b=a.qb;a.qb=null;ro(b);b.dispose()}a.Oc&&(a.Oc=null)}function ko(a,b){try{a.g.Ts(a,b),a.g.Lc(4)}catch(c){}};function so(a,b,c,d,e){if(0==d)c(!1);else{var g=e||0;d--;to(a,b,function(e){e?c(!0):l.setTimeout(function(){so(a,b,c,d,g)},g)})}}function to(a,b,c){var d=new Image;d.onload=function(){try{uo(d),c(!0)}catch(a){}};d.onerror=function(){try{uo(d),c(!1)}catch(a){}};d.onabort=function(){try{uo(d),c(!1)}catch(a){}};d.ontimeout=function(){try{uo(d),c(!1)}catch(a){}};l.setTimeout(function(){if(d.ontimeout)d.ontimeout()},b);d.src=a}
function uo(a){a.onload=null;a.onerror=null;a.onabort=null;a.ontimeout=null};function vo(a){this.g=a;this.j=new an(null,!0)}f=vo.prototype;f.Em=null;f.hc=null;f.Fj=!1;f.Xr=null;f.Ej=null;f.Ym=null;f.rn=null;f.wc=null;f.Cd=-1;f.wh=null;f.zh=null;f.connect=function(a){this.rn=a;a=wo(this.g,null,this.rn);lo();this.Xr=y();var b=this.g.D;null!=b?(this.wh=b[0],(this.zh=b[1])?(this.wc=1,xo(this)):(this.wc=2,yo(this))):(De(a,"MODE","init"),this.hc=new Yn(this,0,void 0,void 0,void 0),this.hc.Ge=this.Em,co(this.hc,a,!1,null,!0),this.wc=0)};
function xo(a){var b=wo(a.g,a.zh,"/mail/images/cleardot.gif");Ge(b);so(b.toString(),5E3,x(a.VD,a),3,2E3);a.Lc(1)}f.VD=function(a){if(a)this.wc=2,yo(this);else{lo();var b=this.g;b.Hc=b.be.Cd;zo(b,9)}a&&this.Lc(2)};
function yo(a){var b=a.g.F;if(null!=b)lo(),b?(lo(),Ao(a.g,a,!1)):(lo(),Ao(a.g,a,!0));else if(a.hc=new Yn(a,0,void 0,void 0,void 0),a.hc.Ge=a.Em,b=a.g,b=wo(b,b.ph()?a.wh:null,a.rn),lo(),!wc||Jc(10))De(b,"TYPE","xmlhttp"),co(a.hc,b,!1,a.wh,!1);else{De(b,"TYPE","html");var c=a.hc;a=Boolean(a.wh);c.Vf=3;c.ae=Ge(b.clone());oo(c,a)}}f.ln=function(a){return this.g.ln(a)};f.Rs=function(){return!1};
f.Ts=function(a,b){this.Cd=a.Xg;if(0==this.wc)if(b){try{var c=this.j.parse(b)}catch(d){c=this.g;c.Hc=this.Cd;zo(c,2);return}this.wh=c[0];this.zh=c[1]}else c=this.g,c.Hc=this.Cd,zo(c,2);else if(2==this.wc)if(this.Fj)lo(),this.Ym=y();else if("11111"==b){if(lo(),this.Fj=!0,this.Ej=y(),c=this.Ej-this.Xr,!wc||Jc(10)||500>c)this.Cd=200,this.hc.cancel(),lo(),Ao(this.g,this,!0)}else lo(),this.Ej=this.Ym=y(),this.Fj=!1};
f.oj=function(){this.Cd=this.hc.Xg;if(this.hc.Mc)0==this.wc?this.zh?(this.wc=1,xo(this)):(this.wc=2,yo(this)):2==this.wc&&(a=!1,(a=!wc||Jc(10)?this.Fj:200>this.Ym-this.Ej?!1:!0)?(lo(),Ao(this.g,this,!0)):(lo(),Ao(this.g,this,!1)));else{0==this.wc?lo():2==this.wc&&lo();var a=this.g;a.Hc=this.Cd;zo(a,2)}};f.ph=function(){return this.g.ph()};f.isActive=function(){return this.g.isActive()};f.Lc=function(a){this.g.Lc(a)};function Bo(a){U.call(this);this.headers=new Od;this.J=a||null;this.k=!1;this.I=this.g=null;this.P=this.D="";this.j=0;this.B="";this.o=this.M=this.C=this.N=!1;this.A=0;this.F=null;this.S="";this.G=this.O=!1}z(Bo,U);var Co=/^https?$/i,Do=["POST","PUT"];function Eo(a,b){a.A=Math.max(0,b)}f=Bo.prototype;
f.send=function(a,b,c,d){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+a);b=b?b.toUpperCase():"GET";this.D=a;this.B="";this.j=0;this.P=b;this.N=!1;this.k=!0;this.g=this.J?Xn(this.J):Xn(Vn);this.I=this.J?Tn(this.J):Tn(Vn);this.g.onreadystatechange=x(this.Yo,this);try{Pl(Fo(this,"Opening Xhr")),this.M=!0,this.g.open(b,String(a),!0),this.M=!1}catch(e){Pl(Fo(this,"Error opening Xhr: "+e.message));Go(this,e);return}a=c||"";var g=this.headers.clone();
d&&Wd(d,function(a,b){g.set(b,a)});d=E(g.La(),Ho);c=l.FormData&&a instanceof l.FormData;!lb(Do,b)||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.g.setRequestHeader(b,a)},this);this.S&&(this.g.responseType=this.S);"withCredentials"in this.g&&(this.g.withCredentials=this.O);try{Io(this),0<this.A&&(this.G=Jo(this.g),Pl(Fo(this,"Will abort after "+this.A+"ms if incomplete, xhr2 "+this.G)),this.G?(this.g.timeout=this.A,this.g.ontimeout=x(this.vb,
this)):this.F=Fn(this.vb,this.A,this)),Pl(Fo(this,"Sending request")),this.C=!0,this.g.send(a),this.C=!1}catch(h){Pl(Fo(this,"Send error: "+h.message)),Go(this,h)}};function Jo(a){return wc&&Ic(9)&&ha(a.timeout)&&n(a.ontimeout)}function Ho(a){return"content-type"==a.toLowerCase()}f.vb=function(){"undefined"!=typeof aa&&this.g&&(this.B="Timed out after "+this.A+"ms, aborting",this.j=8,Fo(this,this.B),this.T("timeout"),ro(this,8))};
function Go(a,b){a.k=!1;a.g&&(a.o=!0,a.g.abort(),a.o=!1);a.B=b;a.j=5;Ko(a);Lo(a)}function Ko(a){a.N||(a.N=!0,a.T("complete"),a.T("error"))}function ro(a,b){a.g&&a.k&&(Fo(a,"Aborting"),a.k=!1,a.o=!0,a.g.abort(),a.o=!1,a.j=b||7,a.T("complete"),a.T("abort"),Lo(a))}f.K=function(){this.g&&(this.k&&(this.k=!1,this.o=!0,this.g.abort(),this.o=!1),Lo(this,!0));Bo.H.K.call(this)};f.Yo=function(){this.$()||(this.M||this.C||this.o?Mo(this):this.KE())};f.KE=function(){Mo(this)};
function Mo(a){if(a.k&&"undefined"!=typeof aa)if(a.I[1]&&4==fo(a)&&2==a.getStatus())Fo(a,"Local request error detected and ignored");else if(a.C&&4==fo(a))Fn(a.Yo,0,a);else if(a.T("readystatechange"),4==fo(a)){Fo(a,"Request complete");a.k=!1;try{var b=a.getStatus(),c;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break t;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var g=Zd(String(a.D))[1]||null;if(!g&&self.location)var h=self.location.protocol,g=h.substr(0,h.length-
1);e=!Co.test(g?g.toLowerCase():"")}d=e}if(d)a.T("complete"),a.T("success");else{a.j=6;var k;try{k=2<fo(a)?a.g.statusText:""}catch(m){k=""}a.B=k+" ["+a.getStatus()+"]";Ko(a)}}finally{Lo(a)}}}function Lo(a,b){if(a.g){Io(a);var c=a.g,d=a.I[0]?u:null;a.g=null;a.I=null;b||a.T("ready");try{c.onreadystatechange=d}catch(e){}}}function Io(a){a.g&&a.G&&(a.g.ontimeout=null);ha(a.F)&&(Gn(a.F),a.F=null)}f.isActive=function(){return!!this.g};function fo(a){return a.g?a.g.readyState:0}
f.getStatus=function(){try{return 2<fo(this)?this.g.status:-1}catch(a){return-1}};function go(a){try{return a.g?a.g.responseText:""}catch(b){return""}}function Fo(a,b){return b+" ["+a.P+" "+a.D+" "+a.getStatus()+"]"};function No(a,b,c){this.C=a||null;this.g=1;this.j=[];this.o=[];this.A=new an(null,!0);this.D=b||null;this.F=null!=c?c:null}function Oo(a,b){this.g=a;this.map=b;this.context=null}f=No.prototype;f.Lh=null;f.Pb=null;f.hb=null;f.um=null;f.dj=null;f.Pr=null;f.wj=null;f.ih=0;f.cD=0;f.Bb=null;f.he=null;f.Bd=null;f.Te=null;f.be=null;f.vj=null;f.Af=-1;f.hs=-1;f.Hc=-1;f.eh=0;f.Xf=0;f.Ie=8;var Po=new U;function Qo(a){vm.call(this,"statevent",a)}z(Qo,vm);
function Ro(a,b){vm.call(this,"timingevent",a);this.size=b}z(Ro,vm);function So(a){vm.call(this,"serverreachability",a)}z(So,vm);f=No.prototype;f.connect=function(a,b,c,d,e){lo();this.um=b;this.Lh=c||{};d&&n(e)&&(this.Lh.OSID=d,this.Lh.OAID=e);this.be=new vo(this);this.be.Em=null;this.be.j=this.A;this.be.connect(a)};
f.disconnect=function(){To(this);if(3==this.g){var a=this.ih++,b=this.dj.clone();K(b,"SID",this.k);K(b,"RID",a);K(b,"TYPE","terminate");Uo(this,b);a=new Yn(this,0,this.k,a,void 0);a.Vf=2;a.ae=Ge(b.clone());(new Image).src=a.ae;a.qh=y();eo(a)}Vo(this)};function To(a){if(a.be){var b=a.be;b.hc&&(b.hc.cancel(),b.hc=null);b.Cd=-1;a.be=null}a.hb&&(a.hb.cancel(),a.hb=null);a.Bd&&(l.clearTimeout(a.Bd),a.Bd=null);Wo(a);a.Pb&&(a.Pb.cancel(),a.Pb=null);a.he&&(l.clearTimeout(a.he),a.he=null)}
function Xo(a,b){if(0==a.g)throw Error("Invalid operation: sending map when state is closed");a.j.push(new Oo(a.cD++,b));2!=a.g&&3!=a.g||Yo(a)}f.Rs=function(){return 0==this.g};f.getState=function(){return this.g};function Zo(a){var b=0;a.hb&&b++;a.Pb&&b++;return b}function Yo(a){a.Pb||a.he||(a.he=po(x(a.Hs,a),0),a.eh=0)}f.Hs=function(a){this.he=null;$o(this,a)};
function $o(a,b){if(1==a.g){if(!b){a.ih=Math.floor(1E5*Math.random());var c=a.ih++,d=new Yn(a,0,"",c,void 0);d.Ge=null;var e=ap(a),g=a.dj.clone();K(g,"RID",c);a.C&&K(g,"CVER",a.C);Uo(a,g);ao(d,g,e);a.Pb=d;a.g=2}}else 3==a.g&&(b?bp(a,b):0!=a.j.length&&(a.Pb||bp(a)))}
function bp(a,b){var c,d;b?6<a.Ie?(a.j=a.o.concat(a.j),a.o.length=0,c=a.ih-1,d=ap(a)):(c=b.C,d=b.Fe):(c=a.ih++,d=ap(a));var e=a.dj.clone();K(e,"SID",a.k);K(e,"RID",c);K(e,"AID",a.Af);Uo(a,e);c=new Yn(a,0,a.k,c,a.eh+1);c.Ge=null;c.setTimeout(Math.round(1E4)+Math.round(1E4*Math.random()));a.Pb=c;ao(c,e,d)}function Uo(a,b){if(a.Bb){var c=a.Bb.lu(a);c&&Ob(c,function(a,c){K(b,c,a)})}}
function ap(a){var b=Math.min(a.j.length,1E3),c=["count="+b],d;6<a.Ie&&0<b?(d=a.j[0].g,c.push("ofs="+d)):d=0;for(var e=0;e<b;e++){var g=a.j[e].g,h=a.j[e].map,g=6>=a.Ie?e:g-d;try{Wd(h,function(a,b){c.push("req"+g+"_"+b+"="+encodeURIComponent(a))})}catch(k){c.push("req"+g+"_type="+encodeURIComponent("_badmap"))}}a.o=a.o.concat(a.j.splice(0,b));return c.join("&")}function cp(a){a.hb||a.Bd||(a.B=1,a.Bd=po(x(a.Ut,a),0),a.Xf=0)}
function dp(a){if(a.hb||a.Bd||3<=a.Xf)return!1;a.B++;a.Bd=po(x(a.Ut,a),ep(a,a.Xf));a.Xf++;return!0}f.Ut=function(){this.Bd=null;this.hb=new Yn(this,0,this.k,"rpc",this.B);this.hb.Ge=null;this.hb.Mm=0;var a=this.Pr.clone();K(a,"RID","rpc");K(a,"SID",this.k);K(a,"CI",this.vj?"0":"1");K(a,"AID",this.Af);Uo(this,a);if(!wc||Jc(10))K(a,"TYPE","xmlhttp"),co(this.hb,a,!0,this.wj,!1);else{K(a,"TYPE","html");var b=this.hb,c=Boolean(this.wj);b.Vf=3;b.ae=Ge(a.clone());oo(b,c)}};
function Ao(a,b,c){a.vj=c;a.Hc=b.Cd;a.NF(1,0);a.dj=wo(a,null,a.um);Yo(a)}
f.Ts=function(a,b){if(0!=this.g&&(this.hb==a||this.Pb==a))if(this.Hc=a.Xg,this.Pb==a&&3==this.g)if(7<this.Ie){var c;try{c=this.A.parse(b)}catch(d){c=null}if(fa(c)&&3==c.length)if(0==c[0])t:{if(!this.Bd){if(this.hb)if(this.hb.qh+3E3<this.Pb.qh)Wo(this),this.hb.cancel(),this.hb=null;else break t;dp(this);lo()}}else this.hs=c[1],0<this.hs-this.Af&&37500>c[2]&&this.vj&&0==this.Xf&&!this.Te&&(this.Te=po(x(this.iC,this),6E3));else zo(this,11)}else"y2f%"!=b&&zo(this,11);else if(this.hb==a&&Wo(this),!A(b)){c=
this.A.parse(b);fa(c);for(var e=0;e<c.length;e++){var g=c[e];this.Af=g[0];g=g[1];2==this.g?"c"==g[0]?(this.k=g[1],this.wj=g[2],g=g[3],null!=g?this.Ie=g:this.Ie=6,this.g=3,this.Bb&&this.Bb.gs(this),this.Pr=wo(this,this.ph()?this.wj:null,this.um),cp(this)):"stop"==g[0]&&zo(this,7):3==this.g&&("stop"==g[0]?zo(this,7):"noop"!=g[0]&&this.Bb&&this.Bb.ds(this,g),this.Xf=0)}}};f.iC=function(){null!=this.Te&&(this.Te=null,this.hb.cancel(),this.hb=null,dp(this),lo())};
function Wo(a){null!=a.Te&&(l.clearTimeout(a.Te),a.Te=null)}
f.oj=function(a){var b;if(this.hb==a)Wo(this),this.hb=null,b=2;else if(this.Pb==a)this.Pb=null,b=1;else return;this.Hc=a.Xg;if(0!=this.g)if(a.Mc)1==b?(y(),Po.T(new Ro(Po,a.Fe?a.Fe.length:0)),Yo(this),this.o.length=0):cp(this);else{var c=a.Qe,d;if(!(d=3==c||7==c||0==c&&0<this.Hc)){if(d=1==b)this.Pb||this.he||1==this.g||2<=this.eh?d=!1:(this.he=po(x(this.Hs,this,a),ep(this,this.eh)),this.eh++,d=!0);d=!(d||2==b&&dp(this))}if(d)switch(c){case 1:zo(this,5);break;case 4:zo(this,10);break;case 3:zo(this,
6);break;case 7:zo(this,12);break;default:zo(this,2)}}};function ep(a,b){var c=5E3+Math.floor(1E4*Math.random());a.isActive()||(c*=2);return c*b}f.NF=function(a){if(!lb(arguments,this.g))throw Error("Unexpected channel state: "+this.g);};function zo(a,b){if(2==b||9==b){var c=null;a.Bb&&(c=null);var d=x(a.VF,a);c||(c=new J("//www.google.com/images/cleardot.gif"),Ge(c));to(c.toString(),1E4,d)}else lo();fp(a,b)}f.VF=function(a){a?lo():(lo(),fp(this,8))};
function fp(a,b){a.g=0;a.Bb&&a.Bb.Qs(a,b);Vo(a);To(a)}function Vo(a){a.g=0;a.Hc=-1;if(a.Bb)if(0==a.o.length&&0==a.j.length)a.Bb.Om(a);else{var b=tb(a.o),c=tb(a.j);a.o.length=0;a.j.length=0;a.Bb.Om(a,b,c)}}function wo(a,b,c){var d=He(c);if(""!=d.ob)b&&oe(d,b+"."+d.ob),pe(d,d.pd);else var e=window.location,d=Ie(e.protocol,b?b+"."+e.hostname:e.hostname,e.port,c);a.Lh&&Ob(a.Lh,function(a,b){K(d,b,a)});K(d,"VER",a.Ie);Uo(a,d);return d}
f.ln=function(a){if(a)throw Error("Can't create secondary domain capable XhrIo object.");a=new Bo;a.O=!1;return a};f.isActive=function(){return!!this.Bb&&this.Bb.isActive(this)};function po(a,b){if(!ia(a))throw Error("Fn must not be null and must be a function");return l.setTimeout(function(){a()},b)}f.Lc=function(){Po.T(new So(Po))};function lo(){Po.T(new Qo(Po))}f.ph=function(){return!(!wc||Jc(10))};function gp(){}f=gp.prototype;f.gs=function(){};f.ds=function(){};f.Qs=function(){};f.Om=function(){};
f.lu=function(){return{}};f.isActive=function(){return!0};function hp(a,b){Dn.call(this);if(ia(a))b&&(a=x(a,b));else if(a&&ia(a.handleEvent))a=x(a.handleEvent,a);else throw Error("Invalid listener argument");this.C=a;Nm(this,"tick",x(this.B,this));this.stop();En(this,5E3+2E4*Math.random())}z(hp,Dn);hp.prototype.A=0;hp.prototype.B=function(){if(500<this.g){var a=this.g;24E4>2*a&&(a*=2);En(this,a)}this.C()};hp.prototype.start=function(){hp.H.start.call(this);this.A=y()+this.g};hp.prototype.stop=function(){this.A=0;hp.H.stop.call(this)};function ip(a,b){this.I=a;this.o=b;this.k=new bi;this.j=new hp(this.Bw,this);this.g=null;this.G=!1;this.B=null;this.F="";this.D=this.A=0;this.C=[]}z(ip,gp);f=ip.prototype;f.subscribe=function(a,b,c){return this.k.subscribe(a,b,c)};f.unsubscribe=function(a,b,c){return this.k.unsubscribe(a,b,c)};f.Lb=function(a){return this.k.Lb(a)};f.publish=function(a,b){return this.k.publish.apply(this.k,arguments)};f.dispose=function(){this.G||(this.G=!0,this.k.clear(),this.disconnect(),Zh(this.k))};f.$=function(){return this.G};
function jp(a){return{firstTestResults:[""],secondTestResults:!a.g.vj,sessionId:a.g.k,arrayId:a.g.Af}}
f.connect=function(a,b,c){if(!this.g||2!=this.g.getState()){this.F="";this.j.stop();this.B=a||null;this.A=b||0;a=this.I+"/test";b=this.I+"/bind";var d=new No("1",c?c.firstTestResults:null,c?c.secondTestResults:null),e=this.g;e&&(e.Bb=null);d.Bb=this;this.g=d;e?(3!=e.getState()&&0==Zo(e)||e.getState(),this.g.connect(a,b,this.o,e.k,e.Af)):c?this.g.connect(a,b,this.o,c.sessionId,c.arrayId):this.g.connect(a,b,this.o)}};
f.disconnect=function(a){this.D=a||0;this.j.stop();this.g&&(3==this.g.getState()&&$o(this.g),this.g.disconnect());this.D=0};f.sendMessage=function(a,b){var c={_sc:a};b&&jc(c,b);this.j.enabled||2==(this.g?this.g.getState():0)?this.C.push(c):this.g&&3==this.g.getState()&&Xo(this.g,c)};f.gs=function(){var a=this.j;a.stop();En(a,5E3+2E4*Math.random());this.B=null;this.A=0;if(this.C.length){a=this.C;this.C=[];for(var b=0,c=a.length;b<c;++b)Xo(this.g,a[b])}this.publish("handlerOpened")};
f.Qs=function(a,b){var c=2==b&&401==this.g.Hc;if(4!=b&&!c){if(6==b||410==this.g.Hc)c=this.j,c.stop(),En(c,500);this.j.start()}this.publish("handlerError",b)};f.Om=function(a,b,c){if(!this.j.enabled)this.publish("handlerClosed");else if(c)for(a=0,b=c.length;a<b;++a)this.C.push(c[a].map)};f.lu=function(){var a={v:2};this.F&&(a.gsessionid=this.F);0!=this.A&&(a.ui=""+this.A);0!=this.D&&(a.ui=""+this.D);this.B&&jc(a,this.B);return a};
f.ds=function(a,b){if("S"==b[0])this.F=b[1];else if("gracefulReconnect"==b[0]){var c=this.j;c.stop();En(c,500);this.j.start();this.g.disconnect()}else this.publish("handlerMessage",new sl(b[0],b[1]))};function kp(a,b){(a.o.loungeIdToken=b)||a.j.stop()}f.getDeviceId=function(){return this.o.id};f.Bw=function(){this.j.stop();0!=Zo(this.g)?this.j.start():this.connect(this.B,this.A)};function lp(){this.g=[];this.j=[]}function mp(a){mb(a.g)&&(a.g=a.j,a.g.reverse(),a.j=[])}function np(a,b){a.j.push(b)}function op(a){mp(a);return a.g.pop()}f=lp.prototype;f.Sa=function(){return this.g.length+this.j.length};f.isEmpty=function(){return mb(this.g)&&mb(this.j)};f.clear=function(){this.g=[];this.j=[]};f.contains=function(a){return lb(this.g,a)||lb(this.j,a)};f.remove=function(a){var b=db(this.g,a);if(0>b)return pb(this.j,a);qb(this.g,b);return!0};
f.Wa=function(){for(var a=[],b=this.g.length-1;0<=b;--b)a.push(this.g[b]);for(var c=this.j.length,b=0;b<c;++b)a.push(this.j[b]);return a};function pp(a){qp(this,a)}function rp(a,b){if(a.j)throw Error(b+" is not allowed in V3.");}function sp(a){a.volume=-1;a.muted=!1;a.k=null;a.g=-1;a.o=null;a.A=0;a.B=y()}function qp(a,b){a.videoIds=[];a.j="";tp(a);b&&(a.videoIds=b.videoIds,a.index=b.index,a.j=b.listId,a.videoId=b.videoId,a.g=b.playerState,a.o=b.errorReason,a.volume=b.volume,a.muted=b.muted,a.k=b.trackData,a.A=b.playerTime,a.B=b.playerTimeAt)}function tp(a){a.index=-1;a.videoId="";sp(a)}f=pp.prototype;f.kb=function(){return 1==this.g};
function up(a){return a.j?a.videoId:a.videoIds[a.index]}function vp(a,b){a.A=b;a.B=y()}function wp(a){switch(a.g){case 1:return(y()-a.B)/1E3+a.A;case -1E3:return 0}return a.A}f.setVideoId=function(a){rp(this,"setVideoId");var b=this.index;this.index=cb(this.videoIds,a);b!=this.index&&sp(this);return-1!=b};function xp(a,b,c){var d=a.videoId;a.videoId=b;a.index=c;b!=d&&sp(a)}function yp(a,b,c){rp(a,"setPlaylist");c=c||up(a);Db(a.videoIds,b)&&c==up(a)||(a.videoIds=tb(b),a.setVideoId(c))}
f.add=function(a){rp(this,"add");return a&&!lb(this.videoIds,a)?(this.videoIds.push(a),!0):!1};f.remove=function(a){rp(this,"remove");var b=up(this);return pb(this.videoIds,a)?(this.index=cb(this.videoIds,b),!0):!1};function zp(a){var b={};b.videoIds=tb(a.videoIds);b.index=a.index;b.listId=a.j;b.videoId=a.videoId;b.playerState=a.g;b.errorReason=a.o;b.volume=a.volume;b.muted=a.muted;b.trackData=gc(a.k);b.playerTime=a.A;b.playerTimeAt=a.B;return b}f.clone=function(){return new pp(zp(this))};function Ap(a,b){T.call(this);this.k=0;this.o=a;this.C=[];this.B=new lp;this.A=NaN;this.j=this.g=null;this.G=x(this.Lw,this);this.D=x(this.Gg,this);this.F=x(this.Kw,this);var c=0;a?(c=a.getProxyState(),3!=c&&(a.subscribe("proxyStateChange",this.Pk,this),Bp(this))):c=3;0!=c&&(b?this.Pk(c):L(x(function(){this.Pk(c)},this),0));Cp(this,ll())}z(Ap,T);f=Ap.prototype;f.getState=function(){return this.k};function Dp(a){return new pp(a.o.getPlayerContextData())}
f.play=function(){1==this.getState()?(this.g?this.g.play(null,u,x(function(){this.Oa("Failed to play video with cast v2 channel.");Ep(this,"play")},this)):Ep(this,"play"),Fp(this,1,wp(Dp(this))),Gp(this)):Hp(this,this.play)};f.pause=function(){1==this.getState()?(this.g?this.g.pause(null,u,x(function(){this.Oa("Failed to pause video with cast v2 channel.");Ep(this,"pause")},this)):Ep(this,"pause"),Fp(this,2,wp(Dp(this))),Gp(this)):Hp(this,this.pause)};
f.Os=function(a){if(1==this.getState()){if(this.g){var b=Dp(this),c=new chrome.cast.media.SeekRequest;c.currentTime=a;c.resumeState=b.kb()||3==b.g?chrome.cast.media.ResumeState.PLAYBACK_START:chrome.cast.media.ResumeState.PLAYBACK_PAUSE;this.g.seek(c,u,x(function(){this.Oa("Failed to seek in video with cast v2 channel.");Ep(this,"seekTo",{newTime:a})},this))}else Ep(this,"seekTo",{newTime:a});Fp(this,3,a);Gp(this)}else Hp(this,pa(this.Os,a))};
f.stop=function(){if(1==this.getState()){this.g?this.g.stop(null,u,x(function(){this.Oa("Failed to stop video with cast v2 channel.");Ep(this,"stopVideo")},this)):Ep(this,"stopVideo");var a=Dp(this);tp(a);Ip(this,a);Gp(this)}else Hp(this,this.stop)};
f.setVolume=function(a,b){if(1==this.getState()){var c=Dp(this);if(this.j){if(c.volume!=a){var d=Math.round(a)/100;this.j.setReceiverVolumeLevel(d,x(function(){Jp("set receiver volume: "+d)},this),x(function(){this.Oa("failed to set receiver volume.")},this))}c.muted!=b&&this.j.setReceiverMuted(b,x(function(){Jp("set receiver muted: "+b)},this),x(function(){this.Oa("failed to set receiver muted.")},this))}else{var e={volume:a,muted:b};-1!=c.volume&&(e.delta=a-c.volume);Ep(this,"setVolume",e)}c.muted=
b;c.volume=a;Ip(this,c);Gp(this)}else Hp(this,pa(this.setVolume,a,b))};f.Wl=function(a,b){if(1==this.getState()){var c=Dp(this);if(b){c.k={trackName:b.name,languageCode:b.languageCode,sourceLanguageCode:b.translationLanguage?b.translationLanguage.languageCode:"",languageName:b.languageName,format:b.format,kind:b.kind};var d={videoId:a,style:Df(b.style)};jc(d,c.k);Ep(this,"setSubtitlesTrack",d)}else d={videoId:a},Ep(this,"setSubtitlesTrack",d);Ip(this,c)}else Hp(this,pa(this.Wl,a,b))};
function Kp(a,b,c,d,e){var g=Dp(a);d=d||0;var h={videoId:b,currentIndex:d,listId:e||g.j};xp(g,b,d);n(c)&&(vp(g,c),h.currentTime=c);Ep(a,"setPlaylist",h);e||Ip(a,g)}
f.wi=function(a,b){if(1==this.getState()){var c=Dp(this);if(a!=up(c)){var d;rp(c,"insert");a&&!lb(c.videoIds,a)?(-1<c.index&&c.index>=c.videoIds.length-1?c.videoIds.push(a):c.videoIds.splice(c.index+1,0,a),d=!0):d=!1;d&&(d={videoId:a},Ep(this,"insertVideo",d));c.setVideoId(a);d={videoId:a};n(b)&&(vp(c,b),d.currentTime=b);Ep(this,"setVideo",d);Ip(this,c)}}else Hp(this,pa(this.wi,a,b))};
f.Lk=function(a,b,c){if(1==this.getState()){var d=Dp(this),e=a==up(d),d=Db(b,d.videoIds);e?d||(Ep(this,"updatePlaylist",{videoIds:b.join(",")}),a=Dp(this),yp(a,b),Ip(this,a)):d?this.wi(a,c):(Ep(this,"setPlaylist",{videoIds:b.join(","),videoId:a,currentTime:c}),e=Dp(this),vp(e,c),yp(e,b,a),Ip(this,e))}else Hp(this,pa(this.Lk,a,b,c))};f.dispose=function(){if(3!=this.k){var a=this.k;this.k=3;this.publish("proxyStateChange",a,this.k)}Ap.H.dispose.call(this)};
f.K=function(){M(this.A);this.A=NaN;Lp(this);this.o=null;this.B.clear();Cp(this,null);Ap.H.K.call(this)};function Bp(a){C(["remotePlayerChange","remoteQueueChange"],function(a){this.C.push(this.o.subscribe(a,pa(this.LE,a),this))},a)}function Lp(a){C(a.C,function(a){this.o.unsubscribeByKey(a)},a);a.C.length=0}function Hp(a,b){50>a.B.Sa()&&np(a.B,b)}function Fp(a,b,c){var d=Dp(a);vp(d,c);-1E3!=d.g&&(d.g=b);Ip(a,d)}function Ep(a,b,c){a.o.sendMessage(b,c)}
function Ip(a,b){Lp(a);a.o.setPlayerContextData(zp(b));Bp(a)}f.Pk=function(a){if((a!=this.k||2==a)&&3!=this.k&&0!=a){var b=this.k;this.k=a;this.publish("proxyStateChange",b,a);if(1==a)for(;!this.B.isEmpty();)op(this.B).apply(this);else 3==a&&this.dispose()}};function Gp(a){M(a.A);a.A=L(x(function(){this.publish("remotePlayerChange");this.A=NaN},a),2E3)}f.LE=function(a){("remotePlayerChange"!=a||isNaN(this.A))&&this.publish(a)};
function Cp(a,b){a.j&&(a.j.removeUpdateListener(a.G),a.j.removeMediaListener(a.D),a.Gg(null));a.j=b;a.j&&(Jp("Setting cast session: "+a.j.sessionId),a.j.addUpdateListener(a.G),a.j.addMediaListener(a.D),a.j.media.length&&a.Gg(a.j.media[0]))}
f.Lw=function(a){if(!a)this.Gg(null),Cp(this,null);else if(this.j.receiver.volume){a=this.j.receiver.volume;var b=Dp(this);if(b.volume!=a.level||b.muted!=a.muted)Jp("Cast volume update: "+a.level+(a.muted?" muted":"")),b.volume=Math.round(100*a.level||0),b.muted=!!a.muted,Ip(this,b),Gp(this)}};f.Gg=function(a){Jp("Cast media: "+!!a);this.g&&this.g.removeUpdateListener(this.F);if(this.g=a)this.g.addUpdateListener(this.F),Mp(this),Gp(this)};
function Mp(a){var b=a.g.customData;if(a.g.media){var c=a.g.media,d=Dp(a);c.contentId!=d.videoId&&Jp("Cast changing video to: "+c.contentId);var e=c.customData;d.index=e.currentIndex;d.j=e.listId;d.videoId=c.contentId;d.g=b.playerState;vp(d,a.g.getEstimatedTime());Ip(a,d)}else Jp("No cast media video. Ignoring state update.")}f.Kw=function(a){a?(Mp(this),Gp(this)):this.Gg(null)};function Jp(a){Mh("CP",a)}f.Oa=function(a){Mh("CP",a)};function Np(a,b,c){T.call(this);this.O=a;this.D=[];this.D.push(P(window,"beforeunload",x(this.DB,this)));this.j=[];this.ba=new pp;3==c["mdx-version"]&&(this.ba.j="RQ"+b.token);this.F=b.id;this.g=Op(this,c);this.g.subscribe("handlerOpened",this.IB,this);this.g.subscribe("handlerClosed",this.EB,this);this.g.subscribe("handlerError",this.FB,this);this.ba.j?this.g.subscribe("handlerMessage",this.GB,this):this.g.subscribe("handlerMessage",this.HB,this);kp(this.g,b.token);this.subscribe("remoteQueueChange",
function(){var a=this.ba.videoId;Qj()&&Ei("yt-remote-session-video-id",a)},this)}z(Np,T);f=Np.prototype;f.Fh=NaN;f.hn=!1;f.cj=NaN;f.Fn=NaN;f.aj=NaN;
f.connect=function(a,b){if(b){if(this.ba.j){var c=b.listId,d=b.videoId,e=b.index,g=b.currentTime||0;5>=g&&(g=0);h={videoId:d,currentTime:g};c&&(h.listId=c);n(e)&&(h.currentIndex=e);c&&(this.ba.j=c);this.ba.videoId=d;this.ba.index=e||0}else{var d=b.videoIds[b.index],g=b.currentTime||0;5>=g&&(g=0);var h={videoIds:d,videoId:d,currentTime:g};this.ba.videoIds=[d];this.ba.index=0}this.ba.state=3;vp(this.ba,g);this.oa("Connecting with setPlaylist and params: "+Df(h));this.g.connect({method:"setPlaylist",
params:Df(h)},a,Uj())}else this.oa("Connecting without params"),this.g.connect({},a,Uj());Pp(this)};f.dispose=function(){this.$()||(this.publish("beforeDispose"),Qp(this,3));Np.H.dispose.call(this)};f.K=function(){Rp(this);Sp(this);Tp(this);M(this.aj);this.aj=NaN;this.o=null;ch(this.D);this.D.length=0;this.g.dispose();Np.H.K.call(this);this.j=this.ba=this.g=null};f.oa=function(a){Mh("conn",a)};f.DB=function(){this.A(2)};function Op(a,b){return new ip(oj(a.O,"/bc",void 0,!1),b)}
function Qp(a,b){a.publish("proxyStateChange",b)}function Pp(a){a.Fh=L(x(function(){this.oa("Connecting timeout");this.A(1)},a),2E4)}function Rp(a){M(a.Fh);a.Fh=NaN}function Tp(a){M(a.cj);a.cj=NaN}function Up(a){Sp(a);a.Fn=L(x(function(){this.k("getNowPlaying")},a),2E4)}function Sp(a){M(a.Fn);a.Fn=NaN}function Vp(a){var b=a.g;return!!b.g&&3==b.g.getState()&&isNaN(a.Fh)}
f.IB=function(){this.oa("Channel opened");this.hn&&(this.hn=!1,Tp(this),this.cj=L(x(function(){this.oa("Timing out waiting for a screen.");this.A(1)},this),15E3));dk(jp(this.g),this.F)};f.EB=function(){this.oa("Channel closed");isNaN(this.Fh)?ek(!0):ek();this.dispose()};f.FB=function(a){ek();isNaN(this.B())?(this.oa("Channel error: "+a+" without reconnection"),this.dispose()):(this.hn=!0,this.oa("Channel error: "+a+" with reconnection in "+this.B()+" ms"),Qp(this,2))};
function Wp(a,b){b&&(Rp(a),Tp(a));b==Vp(a)?b&&(Qp(a,1),a.k("getSubtitlesTrack")):b?(a.C()&&qp(a.ba),Qp(a,1),a.k("getNowPlaying")):a.A(1)}function Xp(a,b){var c=b.params.videoId;delete b.params.videoId;c==a.ba.videoId&&(bc(b.params)?a.ba.k=null:a.ba.k=b.params,a.publish("remotePlayerChange"))}function Yp(a,b){var c=b.params.videoId||b.params.video_id,d=parseInt(b.params.currentIndex,10);a.ba.j=b.params.listId;xp(a.ba,c,d);a.publish("remoteQueueChange")}
function Zp(a,b){b.params=b.params||{};Yp(a,b);$p(a,b)}function $p(a,b){var c=parseInt(b.params.currentTime||b.params.current_time,10);vp(a.ba,isNaN(c)?0:c);c=parseInt(b.params.state,10);c=isNaN(c)?-1:c;-1==c&&-1E3==a.ba.g&&(c=-1E3);a.ba.g=c;var d=null;-1E3==c&&(d=a.ba.o||"unknown",n(b.params.currentError)&&(d=Bf(b.params.currentError).reason||d));a.ba.o=d;1==a.ba.g?Up(a):Sp(a);a.publish("remotePlayerChange")}
function aq(a,b){var c="true"==b.params.muted;a.ba.volume=parseInt(b.params.volume,10);a.ba.muted=c;a.publish("remotePlayerChange")}
f.GB=function(a){a.params?this.oa("Received: action="+a.action+", params="+Df(a.params)):this.oa("Received: action="+a.action+" {}");switch(a.action){case "loungeStatus":a=Bf(a.params.devices);this.j=D(a,function(a){return new Gj(a)});a=!!E(this.j,function(a){return"LOUNGE_SCREEN"==a.type});Wp(this,a);break;case "loungeScreenConnected":Wp(this,!0);break;case "loungeScreenDisconnected":rb(this.j,function(a){return"LOUNGE_SCREEN"==a.type});Wp(this,!1);break;case "remoteConnected":var b=new Gj(Bf(a.params.device));
E(this.j,function(a){return a.equals(b)})||ob(this.j,b);break;case "remoteDisconnected":b=new Gj(Bf(a.params.device));rb(this.j,function(a){return a.equals(b)});break;case "gracefulDisconnect":break;case "playlistModified":Yp(this,a);break;case "nowPlaying":Zp(this,a);break;case "onStateChange":$p(this,a);break;case "onVolumeChanged":aq(this,a);break;case "onSubtitlesTrackChanged":Xp(this,a);break;default:this.oa("Unrecognized action: "+a.action)}};
f.HB=function(a){a.params?this.oa("Received: action="+a.action+", params="+Df(a.params)):this.oa("Received: action="+a.action);bq(this,a);cq(this,a);if(Vp(this)){var b=this.ba.clone(),c=!1,d,e,g,h,k,m,p;a.params&&(d=a.params.videoId||a.params.video_id,e=a.params.videoIds||a.params.video_ids,g=a.params.state,h=a.params.currentTime||a.params.current_time,k=a.params.volume,m=a.params.muted,n(a.params.currentError)&&(p=Bf(a.params.currentError)));if("onSubtitlesTrackChanged"==a.action)d==up(this.ba)&&
(delete a.params.videoId,bc(a.params)?this.ba.k=null:this.ba.k=a.params,this.publish("remotePlayerChange"));else if(up(this.ba)||"onStateChange"!=a.action)"playlistModified"!=a.action&&"nowPlayingPlaylist"!=a.action||e?(d||"nowPlaying"!=a.action&&"nowPlayingPlaylist"!=a.action?d||(d=up(this.ba)):this.ba.setVideoId(""),e&&(e=e.split(","),yp(this.ba,e,d))):yp(this.ba,[]),this.ba.add(d)&&this.k("getPlaylist"),d&&this.ba.setVideoId(d),b.index==this.ba.index&&Db(b.videoIds,this.ba.videoIds)||this.publish("remoteQueueChange"),
n(g)&&(b=parseInt(g,10),b=isNaN(b)?-1:b,-1==b&&-1E3==this.ba.g&&(b=-1E3),0==b&&"0"==h&&(b=-1),c=c||b!=this.ba.g,this.ba.g=b,d=null,-1E3==b&&(d=this.ba.o||"unknown",p&&(d=p.reason||d)),c=c||this.ba.o!=d,this.ba.o=d,1==this.ba.g?Up(this):Sp(this)),"onError"!=a.action||-1!=this.ba.g&&-1E3!=this.ba.g||(a=Bf(a.params.errors)||[],1==a.length&&"PLAYER_ERROR"==a[0].error&&a[0].videoId==up(this.ba)&&(this.ba.g=-1E3,this.ba.o=a[0].reason||"unknown",c=!0)),h&&(b=parseInt(h,10),vp(this.ba,isNaN(b)?0:b),c=!0),
n(k)&&(b=parseInt(k,10),isNaN(b)||(c=c||this.ba.volume!=b,this.ba.volume=b),n(m)&&(m="true"==m,c=c||this.ba.muted!=m,this.ba.muted=m)),c&&this.publish("remotePlayerChange")}};
function bq(a,b){switch(b.action){case "loungeStatus":var c=Bf(b.params.devices);a.j=D(c,function(a){return new Gj(a)});break;case "loungeScreenDisconnected":rb(a.j,function(a){return"LOUNGE_SCREEN"==a.type});break;case "remoteConnected":var d=new Gj(Bf(b.params.device));E(a.j,function(a){return a.equals(d)})||ob(a.j,d);break;case "remoteDisconnected":d=new Gj(Bf(b.params.device)),rb(a.j,function(a){return a.equals(d)})}}
function cq(a,b){var c=!1;if("loungeStatus"==b.action)c=!!E(a.j,function(a){return"LOUNGE_SCREEN"==a.type});else if("loungeScreenConnected"==b.action)c=!0;else if("loungeScreenDisconnected"==b.action)c=!1;else return;if(!isNaN(a.cj))if(c)Tp(a);else return;c==Vp(a)?c&&Qp(a,1):c?(Rp(a),a.C()&&qp(a.ba),Qp(a,1),a.k("getNowPlaying")):a.A(1)}f.Jz=function(){if(this.o){var a=this.o;this.o=null;this.ba.videoId!=a&&this.k("getNowPlaying")}};Np.prototype.subscribe=Np.prototype.subscribe;
Np.prototype.unsubscribeByKey=Np.prototype.Lb;Np.prototype.J=function(){var a=3;this.$()||(a=0,isNaN(this.B())?Vp(this)&&(a=1):a=2);return a};Np.prototype.getProxyState=Np.prototype.J;Np.prototype.A=function(a){this.oa("Disconnecting with "+a);Rp(this);this.publish("beforeDisconnect",a);1==a&&ek();this.g.disconnect(a);this.dispose()};Np.prototype.disconnect=Np.prototype.A;Np.prototype.I=function(){var a=this.ba;this.o&&(a=this.ba.clone(),xp(a,this.o,a.index));return zp(a)};
Np.prototype.getPlayerContextData=Np.prototype.I;
Np.prototype.M=function(a){var b=new pp(a);b.videoId&&b.videoId!=this.ba.videoId&&(this.o=b.videoId,M(this.aj),this.aj=L(x(this.Jz,this),5E3));var c=[];this.ba.j==b.j&&this.ba.videoId==b.videoId&&this.ba.index==b.index&&Db(this.ba.videoIds,b.videoIds)||c.push("remoteQueueChange");this.ba.g==b.g&&this.ba.volume==b.volume&&this.ba.muted==b.muted&&wp(this.ba)==wp(b)&&Df(this.ba.k)==Df(b.k)||c.push("remotePlayerChange");qp(this.ba,a);C(c,function(a){this.publish(a)},this)};
Np.prototype.setPlayerContextData=Np.prototype.M;Np.prototype.G=function(){return this.g.o.loungeIdToken};Np.prototype.getLoungeToken=Np.prototype.G;Np.prototype.C=function(){var a=this.g.getDeviceId(),b=E(this.j,function(b){return"REMOTE_CONTROL"==b.type&&b.id!=a});return b?b.id:""};Np.prototype.getOtherConnectedRemoteId=Np.prototype.C;Np.prototype.B=function(){var a=this.g;return a.j.enabled?a.j.A-y():NaN};Np.prototype.getReconnectTimeout=Np.prototype.B;
Np.prototype.P=function(){if(!isNaN(this.B())){var a=this.g.j;a.enabled&&(a.stop(),a.start(),a.B())}};Np.prototype.reconnect=Np.prototype.P;Np.prototype.k=function(a,b){b?this.oa("Sending: action="+a+", params="+Df(b)):this.oa("Sending: action="+a);this.g.sendMessage(a,b)};Np.prototype.sendMessage=Np.prototype.k;function dq(a){T.call(this);this.o=a;this.Ic=eq();this.oa("Initializing local screens: "+Xh(this.Ic));this.k=fq();this.oa("Initializing account screens: "+Xh(this.k));this.Vl=null;this.g=[];this.j=[];gq(this,Hl()||[]);this.oa("Initializing DIAL devices: "+rj(this.j));a=Vh(ak());hq(this,a);this.oa("Initializing online screens: "+Xh(this.g));this.A=y()+3E5;iq(this)}z(dq,T);var jq=[2E3,2E3,1E3,1E3,1E3,2E3,2E3,5E3,5E3,1E4];f=dq.prototype;f.Jh=NaN;f.Vj="";f.oa=function(a){Mh("RM",a)};
f.Oa=function(a){Mh("RM",a)};function fq(){var a=eq(),b=Vh(ak());return eb(b,function(b){return!yj(a,b)})}function eq(){var a=Vh(Wj());return eb(a,function(a){return!a.uuid})}function iq(a){hi("yt-remote-cast-device-list-update",function(){var a=Hl();gq(this,a||[])},a);hi("yt-remote-cast-device-status-update",a.VE,a);a.Tt();var b=y()>a.A?2E4:1E4;gf(x(a.Tt,a),b)}f.publish=function(a,b){if(this.$())return!1;this.oa("Firing "+a);return this.N.publish.apply(this.N,arguments)};
f.Tt=function(){var a=Hl()||[];mb(a)||gq(this,a);a=kq(this);mb(a)||(gb(a,function(a){return!yj(this.k,a)},this)&&Yj()?lq(this):mq(this,a))};function nq(a,b){var c=kq(a);return eb(b,function(a){return a.uuid?(a=xj(this.j,a.uuid),!!a&&"RUNNING"==a.status):!!yj(c,a)},a)}
function gq(a,b){var c=!1;C(b,function(a){var b=zj(this.Ic,a.id);b&&b.name!=a.name&&(this.oa("Renaming screen id "+b.id+" from "+b.name+" to "+a.name),b.name=a.name,c=!0)},a);c&&(a.oa("Renaming due to DIAL."),oq(a));bk(uj(b));var d=!Db(a.j,b,wj);d&&a.oa("Updating DIAL devices: "+rj(a.j)+" to "+rj(b));a.j=b;hq(a,a.g);d&&a.publish("onlineReceiverChange")}
f.VE=function(a){var b=xj(this.j,a.id);b&&(this.oa("Updating DIAL device: "+b.id+"("+b.name+") from status: "+b.status+" to status: "+a.status+" and from activityId: "+b.activityId+" to activityId: "+a.activityId),b.activityId=a.activityId,b.status=a.status,bk(uj(this.j)));hq(this,this.g)};function hq(a,b,c){var d=nq(a,b),e=!Db(a.g,d,Sh);if(e||c)mb(b)||Zj(D(d,Th));e&&(a.oa("Updating online screens: "+Xh(a.g)+" -> "+Xh(d)),a.g=d,a.publish("onlineReceiverChange"))}
function mq(a,b){var c=[],d={};C(b,function(a){a.token&&(d[a.token]=a,c.push(a.token))});var e={method:"POST",ab:{lounge_token:c.join(",")},context:a,Ma:function(a,b){var c=[];C(b.screens||[],function(a){"online"==a.status&&c.push(d[a.loungeToken])});var e=this.Vl?pq(this,this.Vl):null;e&&!yj(c,e)&&c.push(e);hq(this,c,!0)}};fj(oj(a.o,"/pairing/get_screen_availability"),e)}
function lq(a){var b=kq(a),c=D(b,function(a){return a.id});mb(c)||(a.oa("Updating lounge tokens for: "+Df(c)),fj(oj(a.o,"/pairing/get_lounge_token_batch"),{ab:{screen_ids:c.join(",")},method:"POST",context:a,Ma:function(a,c){qq(this,c.screens||[]);this.Ic=eb(this.Ic,function(a){return!!a.token});oq(this);mq(this,b)}}))}function qq(a,b){C(sb(a.Ic,a.k),function(a){var d=E(b,function(b){return a.id==b.screenId});d&&(a.token=d.loungeToken)})}
function oq(a){var b=eq();Db(a.Ic,b,Sh)||(a.oa("Saving local screens: "+Xh(b)+" to "+Xh(a.Ic)),Vj(D(a.Ic,Th)),hq(a,a.g,!0),gq(a,Hl()||[]),a.publish("managedScreenChange",kq(a)))}function rq(a,b,c){var d=ib(b,function(a){return Rh(c,a)}),e=0>d;0>d?b.push(c):b[d]=c;yj(a.g,c)||a.g.push(c);return e}f.Pt=function(a,b){for(var c=kq(this),c=D(c,function(a){return a.name}),d=a,e=2;lb(c,d);)d=b.call(l,e),e++;return d};
f.qt=function(a,b,c){var d=!1;b>=jq.length&&(this.oa("Pairing DIAL device "+a+" with "+c+" timed out."),d=!0);var e=xj(this.j,a);if(!e)this.oa("Pairing DIAL device "+a+" with "+c+" failed: no device for "+a),d=!0;else if("ERROR"==e.status||"STOPPED"==e.status)this.oa("Pairing DIAL device "+a+" with "+c+" failed: launch error on "+a),d=!0;d?(sq(this),this.publish("screenPair",null)):fj(oj(this.o,"/pairing/get_screen"),{method:"POST",ab:{pairing_code:c},context:this,Ma:function(a,b){if(c==this.Vj){sq(this);
var d=new Ph(b.screen);d.name=e.name;d.uuid=e.id;this.oa("Pairing "+c+" succeeded.");var m=rq(this,this.Ic,d);this.oa("Paired with "+(m?"a new":"an old")+" local screen:"+Wh(d));oq(this);this.publish("screenPair",d)}},onError:function(){c==this.Vj&&(this.oa("Polling pairing code: "+c),M(this.Jh),this.Jh=L(x(this.qt,this,a,b+1,c),jq[b]))}})};
function tq(a,b,c){var d=uq,e="";sq(d);if(xj(d.j,a)){if(!e){var g=e=sj();zl();var h=Jl(a),k=wl();if(k&&h){var m=new cast.Receiver(h.id,h.name),m=new cast.LaunchRequest("YouTube",m);m.parameters="pairingCode="+g;m.description=new cast.LaunchDescription;m.description.text=document.title;b&&(m.parameters+="&v="+b,c&&(m.parameters+="&t="+Math.round(c)),m.description.url="http://i.ytimg.com/vi/"+b+"/default.jpg");"UNKNOWN"!=h.status&&(h.status="UNKNOWN",Fl(h),ki("yt-remote-cast-device-status-update",h));
ul("Sending a cast launch request with params: "+m.parameters);k.launch(m,pa(Kl,a))}else ul("No cast API or no cast device. Dropping cast launch.")}d.Vj=e;d.Jh=L(x(d.qt,d,a,0,e),jq[0])}else d.oa("No DIAL device with id: "+a)}function sq(a){M(a.Jh);a.Jh=NaN;a.Vj=""}function pq(a,b){var c=zj(kq(a),b);a.oa("Found screen: "+Wh(c)+" with key: "+b);return c}function vq(a){var b=uq,c=zj(b.g,a);b.oa("Found online screen: "+Wh(c)+" with key: "+a);return c}
function wq(a){var b=uq,c=xj(b.j,a);if(!c){var d=zj(b.Ic,a);d&&(c=xj(b.j,d.uuid))}b.oa("Found DIAL: "+(c?c.toString():"null")+" with key: "+a);return c}function kq(a){return sb(a.k,eb(a.Ic,function(a){return!yj(this.k,a)},a))};function xq(a){Aj.call(this,"ScreenServiceProxy");this.Db=a;this.g=[];this.g.push(this.Db.$_s("screenChange",x(this.UD,this)));this.g.push(this.Db.$_s("onlineScreenChange",x(this.TD,this)))}z(xq,Aj);f=xq.prototype;f.Cb=function(a){return this.Db.$_gs(a)};f.contains=function(a){return!!this.Db.$_c(a)};f.get=function(a){return this.Db.$_g(a)};f.start=function(a){this.Db.$_st(a)};f.add=function(a,b,c){this.Db.$_a(a,b,c)};f.remove=function(a,b,c){this.Db.$_r(a,b,c)};
f.ee=function(a,b,c,d){this.Db.$_un(a,b,c,d)};f.K=function(){for(var a=0,b=this.g.length;a<b;++a)this.Db.$_ubk(this.g[a]);this.g.length=0;this.Db=null;xq.H.K.call(this)};f.UD=function(){this.publish("screenChange")};f.TD=function(){this.publish("onlineScreenChange")};yk.prototype.$_st=yk.prototype.start;yk.prototype.$_gspc=yk.prototype.UG;yk.prototype.$_c=yk.prototype.contains;yk.prototype.$_g=yk.prototype.get;yk.prototype.$_a=yk.prototype.add;yk.prototype.$_un=yk.prototype.ee;yk.prototype.$_r=yk.prototype.remove;
yk.prototype.$_gs=yk.prototype.Cb;yk.prototype.$_gos=yk.prototype.As;yk.prototype.$_s=yk.prototype.subscribe;yk.prototype.$_ubk=yk.prototype.Lb;function yq(a,b,c){a?q("yt.mdx.remote.castv2_",!0,void 0):zl();Di&&Ci();Nj();zq||(zq=new nj,fk()&&(zq.g="/api/loungedev"));uq||a||(uq=new dq(zq),uq.subscribe("screenPair",Aq),uq.subscribe("managedScreenChange",Bq),uq.subscribe("onlineReceiverChange",function(){ki("yt-remote-receiver-availability-change")}));Cq||(Cq=s("yt.mdx.remote.deferredProxies_")||[],q("yt.mdx.remote.deferredProxies_",Cq,void 0));Dq(b);b=Eq();if(a&&!b){var d=new yk(zq,!!Gi("yt-remote-load-account-screens"));q("yt.mdx.remote.screenService_",
d,void 0);b=Eq();Yk(c,d,function(a){a?ql()&&pl():d.subscribe("onlineScreenChange",function(){ki("yt-remote-receiver-availability-change")})})}}function Fq(){ji(Gq);Gq.length=0;Zh(Hq);Hq=null;Cq&&(C(Cq,function(a){a(null)}),Cq.length=0,Cq=null,q("yt.mdx.remote.deferredProxies_",null,void 0));uq&&(Zh(uq),uq=null);zq=null;El()}
function Iq(){if(Jq()&&jl()){var a=[];if(Gi("yt-remote-cast-available")||s("yt.mdx.remote.cloudview.castButtonShown_")||Kq())a.push({key:"cast-selector-receiver",name:Lq()}),q("yt.mdx.remote.cloudview.castButtonShown_",!0,void 0);return a}if(s("yt.mdx.remote.cloudview.initializing_"))return[];var b=[],b=Mq()?Eq().Db.$_gos():Vh(ak());(a=Nq())&&Kq()&&(yj(b,a)||b.push(a));Mq()||(a=vj(ck()),a=eb(a,function(a){return!zj(b,a.id)}),b=sb(b,a));return tj(b)}
function Oq(){if(Jq()&&jl()){var a=kl();return a?{key:"cast-selector-receiver",name:a}:null}var a=Iq(),b=Pq(),c=Nq();c||(c=Qq());return E(a,function(a){return c&&Qh(c,a.key)||b&&(a=wq(a.key))&&a.id==b?!0:!1})}function Lq(){if(Jq()&&jl())return kl();var a=Nq();return a?a.name:null}function Nq(){var a=ql();if(!a)return null;if(!uq){var b=Eq().Cb();return zj(b,a)}return pq(uq,a)}
function Rq(a,b){Sq("Connecting to: "+Df(a));if("cast-selector-receiver"==a.key)Tq(b||null),ol(b||null);else{Uq();Tq(b||null);var c=null;uq?c=vq(a.key):(c=Eq().Cb(),c=zj(c,a.key));if(c)Vq(c);else{if(uq&&(c=wq(a.key))){Wq(c);return}L(function(){Xq(null)},0)}}}
function Uq(){uq&&sq(uq);t:{var a=Kq();if(a&&(a=a.getOtherConnectedRemoteId())){Sq("Do not stop DIAL due to "+a);Yq("");break t}(a=Pq())?(Sq("Stopping DIAL: "+a),Ll(a),Yq("")):(a=Nq())&&a.uuid&&(Sq("Stopping DIAL: "+a.uuid),Ll(a.uuid))}nl()?fl().stopSession():cl("stopSession called before API ready.");(a=Kq())?a.disconnect(1):(li("yt-remote-before-disconnect",1),li("yt-remote-connection-change",!1));Xq(null)}function Zq(){var a=$q(),a=a?a.currentTime:0,b=ar();0==a&&b&&(a=wp(Dp(b)));return a}
function ar(){var a=Kq();return a&&3!=a.getProxyState()?new Ap(a,void 0):null}function Sq(a){Mh("remote",a)}function Jq(){return!!s("yt.mdx.remote.castv2_")}function Mq(){return s("yt.mdx.remote.screenService_")}function Eq(){if(!Hq){var a=Mq();a&&(Hq=new xq(a))}return Hq}function ql(){return s("yt.mdx.remote.currentScreenId_")}function br(a){q("yt.mdx.remote.currentScreenId_",a,void 0);if(uq){var b=uq;b.A=y()+3E5;if((b.Vl=a)&&(a=pq(b,a))&&!yj(b.g,a)){var c=tb(b.g);c.push(a);hq(b,c,!0)}}}
function Pq(){return s("yt.mdx.remote.currentDialId_")}function Yq(a){q("yt.mdx.remote.currentDialId_",a,void 0)}function $q(){return s("yt.mdx.remote.connectData_")}function Tq(a){q("yt.mdx.remote.connectData_",a,void 0)}function Kq(){return s("yt.mdx.remote.connection_")}
function Xq(a){var b=Kq();Tq(null);a?$a(!Kq()):(br(""),Yq(""));q("yt.mdx.remote.connection_",a,void 0);Cq&&(C(Cq,function(b){b(a)}),Cq.length=0);b&&!a?li("yt-remote-connection-change",!1):!b&&a&&ki("yt-remote-connection-change",!0)}function Qq(){var a=Qj();if(!a)return null;if(Mq()){var b=Eq().Cb();return zj(b,a)}return uq?pq(uq,a):null}
function Vq(a){$a(!ql());br(a.id);a=new Np(zq,a,cr());a.connect(1,$q());a.subscribe("beforeDisconnect",function(a){li("yt-remote-before-disconnect",a)});a.subscribe("beforeDispose",function(){Kq()&&(Kq(),Xq(null))});Xq(a)}function Wq(a){Pq();Sq("Connecting to: "+(a?a.toString():"null"));Yq(a.id);var b=$q();b?tq(a.id,b.videoIds[b.index],b.currentTime):tq(a.id)}function Aq(a){Sq("Paired with: "+Wh(a));a?Vq(a):Xq(null)}
function Bq(){var a=ql();a&&!Nq()&&(Sq("Dropping current screen with id: "+a),Uq());Qq()||ek()}var zq=null,Cq=null,Hq=null,uq=null;function Dq(a){var b=cr();if(bc(b)){var b=Pj(),c=Gi("yt-remote-session-name")||"",d=Gi("yt-remote-session-app")||"",b={device:"REMOTE_CONTROL",id:b,name:c,app:d};a&&(b["mdx-version"]=3);q("yt.mdx.remote.channelParams_",b,void 0)}}function cr(){return s("yt.mdx.remote.channelParams_")||{}}var Gq=[];function dr(a,b,c){Q.call(this);this.g=a;this.o=b||0;this.j=c;this.k=x(this.Mz,this)}z(dr,Q);f=dr.prototype;f.xa=0;f.K=function(){dr.H.K.call(this);this.stop();delete this.g;delete this.j};f.start=function(a){this.stop();this.xa=Fn(this.k,n(a)?a:this.o)};f.stop=function(){this.isActive()&&Gn(this.xa);this.xa=0};f.isActive=function(){return 0!=this.xa};f.Mz=function(){this.xa=0;this.g&&this.g.call(this.j)};var er={hG:function(a){a.reverse()},xY:function(a,b){a.splice(0,b)},z7:function(a,b){var c=a[0];a[0]=a[b%a.length];a[b]=c}};function fr(a){a=a.split("");er.z7(a,1);er.hG(a,63);er.xY(a,3);er.hG(a,30);er.xY(a,2);er.z7(a,10);er.xY(a,3);er.hG(a,30);return a.join("")};function gr(){};var hr={160:"h",133:"h",134:"h",135:"h",136:"h",137:"h",264:"h",266:"h",138:"h",298:"h",299:"h",304:"h",305:"h",140:"a",161:"H",142:"H",143:"H",144:"H",222:"H",223:"H",145:"H",224:"H",225:"H",146:"H",226:"H",147:"H",149:"A",261:"M",278:"9",394:"9",242:"9",395:"9",243:"9",396:"9",244:"9",397:"9",247:"9",398:"9",248:"9",399:"9",271:"9",400:"9",313:"9",401:"9",272:"9",302:"9",303:"9",308:"9",315:"9",571:"9",171:"v",250:"o",251:"o",194:"*",195:"*",220:"*",221:"*",196:"*",197:"*",198:"V",279:"(",280:"(",273:"(",274:"(",275:"(",276:"(",314:"(",277:"("};function ir(a,b,c,d,e,g,h){this.id=""+a;this.j=0<=b.indexOf("/mp4")?1:0<=b.indexOf("/webm")?2:0<=b.indexOf("/x-flv")?3:0<=b.indexOf("/vtt")?4:0;this.mimeType=b;this.ra=h||0;this.k=c||null;this.video=d||null;this.g=e||null;this.A=g||null;this.o=hr[this.id.split(";")[0]]||""}function jr(a){return 2==a.j}function kr(a){return!(a.k&&a.video)}function lr(a){return 0<=a.indexOf("opus")||0<=a.indexOf("vorbis")||0<=a.indexOf("mp4a")}
function mr(a){return 0<=a.indexOf("vp9")||0<=a.indexOf("vp8")||0<=a.indexOf("avc1")||0<=a.indexOf("av01")};function nr(a,b,c,d){this.name=a;this.language=b;this.isDefault=d}nr.prototype.toString=function(){return this.name};var ac={tG:"auto",bK:"tiny",EI:"light",SMALL:"small",EG:"medium",LARGE:"large",fI:"hd720",dI:"hd1080",eI:"hd1440",qI:"highres",xI:"hd2880",UNKNOWN:"unknown"},or={auto:0,tiny:144,light:144,small:240,medium:360,large:480,hd720:720,hd1080:1080,hd1440:1440,highres:2160,hd2880:2880};function pr(a,b,c,d,e){this.width=a;this.height=b;if(!e)t:{for(e=2;e<qr.length;e++){var g=rr[qr[e]];if(a>g[0]&&b>=g[1]||a>=g[0]&&b>g[1]){e=qr[e-1];break t}}e="tiny"}this.quality=e;this.fps=c||0;this.g=d||0}var qr="auto hd2880 highres hd1440 hd1080 hd720 large medium small tiny".split(" "),rr={auto:[0,0],tiny:[256,144],light:[426,240],small:[426,240],medium:[640,360],large:[854,480],hd720:[1280,720],hd1080:[1920,1080],hd1440:[2560,1440],highres:[3840,2160],hd2880:[5120,2880]};function sr(a){this.j=a;this.B=this.o=this.A="";this.g={};this.k=""}sr.prototype.set=function(a,b){this.g[a]!==b&&(this.g[a]=b,this.k="")};sr.prototype.get=function(a){tr(this);return this.g[a]||null};function ur(a){a.k||(a.k=vr(a));return a.k}function wr(a){tr(a);return Rb(a.g,function(a){return null!==a})}
function tr(a){if(a.j){var b=a.j;if(!b||-1==b.search(Xe))throw Error("Untrusted URL: "+a.j);b=He(a.j);a.A=b.Ib;a.B=b.ob+(null!=b.pd?":"+b.pd:"");var c=b.Kb;if(0==c.indexOf("/videoplayback"))a.o="/videoplayback",c=c.substr(14);else if(0==c.indexOf("/api/manifest/")){var d=c.indexOf("/",14);0<d?(a.o=c.substr(0,d),c=c.substr(d+1)):(a.o=c,c="")}d=a.g;a.g=xr(c);qa(a.g,yr(b.Ip()));qa(a.g,d);a.j="";a.k=""}}
function vr(a){tr(a);var b=a.A+(a.A?"://":"//")+a.B+a.o;if(wr(a)){var c=[];Ob(a.g,function(a,b){null!==a&&c.push(b+"="+a)});a=c.join("&");b+="?"+a}return b}function xr(a){a=a.split("/");var b=0;a[0]||b++;for(var c={};b<a.length;b+=2)a[b]&&(c[a[b]]=a[b+1]);return c}function yr(a){a=a.split("&");for(var b={},c=0;c<a.length;c++){var d=a[c],e=d.indexOf("=");0<e?b[d.substr(0,e)]=d.substr(e+1):d&&(b[d]="")}return b};function zr(a,b){this.start=a;this.end=b;this.length=b-a+1}function Ar(a){a=a.split("-");return 2==a.length&&(a=new zr(parseInt(a[0],10),parseInt(a[1],10)),!isNaN(a.start)&&!isNaN(a.end)&&!isNaN(a.length)&&0<a.length)?a:null}function Br(a,b){return new zr(a,a+b-1)}zr.prototype.toString=function(){return this.start+"-"+(null==this.end?"":this.end)};function Cr(a,b){for(var c=a;c;c=c.parentNode)if(c.attributes){var d=c.attributes[b];if(d)return d.value}return""}function Dr(a,b){for(var c=a;c;c=c.parentNode){var d=c.getElementsByTagName(b);if(0<d.length)return d[0]}return null};function Er(a,b,c,d,e){this.duration=c;this.endTime=b+c;this.g=a;this.sourceURL=d;this.startTime=b;this.aa=e||null};function Fr(){this.ga=[]}f=Fr.prototype;f.sj=function(a){return(a=Gr(this,a))?a.duration:0};f.Al=function(a){return this.sj(a)};f.Wg=function(){return this.ga[0].g};f.Hb=function(){return this.ga[this.ga.length-1].g};f.pf=function(){return this.ga[this.ga.length-1].endTime};f.$s=function(){return this.ga[0].startTime};f.Xs=function(){return this.ga.length};f.Rj=function(){return 0};f.Ch=function(a){return(a=Hr(this,a))?a.g:-1};f.Gt=function(a){return Gr(this,a).sourceURL};
f.If=function(a){return(a=Gr(this,a))?a.startTime:0};f.yn=function(){return 0<this.ga.length};function Gr(a,b){var c=yb(a.ga,new Er(b,0,0,""),function(a,b){return a.g-b.g});return 0<=c?a.ga[c]:null}function Hr(a,b){var c=yb(a.ga,{startTime:b},function(a,b){return a.startTime-b.startTime});return 0<=c?a.ga[c]:a.ga[Math.max(0,-c-2)]}
f.append=function(a){if(0!=a.length)if(a=tb(a),0==this.ga.length)this.ga=a;else{var b=this.ga.length?ab(this.ga).endTime:0,c=a[0].g-this.Hb();1<c&&nb(this.ga);for(c=0<c?0:-c+1;c<a.length;c++){var d=a[c];d.startTime=b;d.endTime=d.startTime+d.duration;b+=a[c].duration;this.ga.push(a[c])}}};function Ir(a,b){var c=ib(a.ga,function(a){return a.g>=b},a);0<c&&a.ga.splice(0,c)};function Jr(a){this.g=a;this.j={};this.k=""}Jr.prototype.set=function(a,b){this.g.get(a);this.j[a]=b;this.k=""};Jr.prototype.get=function(a){return this.j[a]||this.g.get(a)};function Kr(a,b){var c=b.indexOf("?");if(0<c){var d=yr(b.substr(c+1));Ob(d,function(a,b){this.set(b,a)},a);b=b.substr(0,c)}d=xr(b);Ob(d,function(a,b){this.set(b,a)},a)}function Lr(a){a.k||(a.k=Mr(a));return a.k}
function Mr(a){var b=ur(a.g),c=[];Ob(a.j,function(a,b){c.push(b+"="+a)});if(!c.length)return b;var d=c.join("&");a=wr(a.g)?"&":"?";return b+a+d}function Nr(a,b){var c=new sr(b);Ob(a.j,function(a,b){c.set(b,null)});return c};function Or(a){this.g=a;this.j=0;this.k=-1}var Pr=0;function Qr(a,b){this.index=null;this.info=b;this.g=null;this.A=this.k=!1;this.B=new Or(a)}Qr.prototype.Ml=function(){return!1};Qr.prototype.Bc=function(){return!1};Qr.prototype.Es=function(a){return[a]};Qr.prototype.Ai=function(a){return[a]};function Rr(a,b,c,d,e,g,h,k,m){this.g=b;this.aa=c;this.type=a;this.o=0<=d?d:-1;this.startTime=e||0;this.duration=g||0;this.k=h||0;this.j=0<=k?k:this.aa?this.aa.length:NaN;this.D=!!m;this.aa?(this.B=this.k+this.j==this.aa.length,this.A=this.startTime+this.duration*this.k/this.aa.length,this.F=this.duration*this.j/this.aa.length):(this.B=0!=this.j,this.A=this.startTime,this.F=this.duration);this.C=this.A+this.F}function Tr(a){return 1==a.type||2==a.type}
function Ur(a,b){return a.g==b.g&&a.aa.start+a.k+a.j==b.aa.start+b.k}function Vr(a){$a(1==a.length||hb(a,function(a){return!!a.aa}));for(var b=1;b<a.length;b++);b=a[a.length-1];return new zr(a[0].aa.start+a[0].k,b.aa.start+b.k+b.j-1)}function Wr(a){var b="i="+a.g.info.id+",s="+a.o;a.aa&&(b=b+",r="+(a.aa.start+a.k)+"-"+(a.aa.start+a.k+a.j-1));return b=b+",t="+a.A.toFixed(1)+","+(a.A+a.F).toFixed(1)};function Xr(a,b){this.k=a[0].g.B;this.j=b||"";this.g=a;this.aa=this.g[0].aa&&0<this.g[0].j?Vr(this.g):null}function Yr(a){var b;/http[s]?:\/\//.test(a.j)?b=new Jr(new sr(a.j)):(b=new Jr(a.k.g),a.j&&Kr(b,a.j));a.aa&&b.set("range",a.aa.toString());return b}function Zr(a){if(a.aa)return a.aa.length;a=a.g[0];return Math.round(a.F*a.g.info.ra)};function $r(a,b,c,d,e){Qr.call(this,a,b);this.index=e||new Fr;this.o=d||null;this.C=c;this.j=!0}z($r,Qr);f=$r.prototype;f.Dl=function(){return!1};f.ur=function(){var a=new Rr(1,this,this.o);return[new Xr([a],this.C)]};function as(a,b){a.Hg(b);return bs(a,b.B?b.o+1:b.o,!1)}f.Ri=function(a,b){var c=this.index.Ch(a);b&&(c=Math.min(this.index.Hb(),c+1));return bs(this,c,!0)};f.Xp=function(a){this.g=new Uint8Array(cs(a).buffer)};f.Ml=function(){return!1};f.Bc=function(){return null!==this.g&&this.index.yn()};
f.Hg=function(a){return this.index.Hb()>a.o&&this.index.Wg()<=a.o+1};f.update=function(a,b,c){this.index.append(a);Ir(this.index,c);this.j=b};function bs(a,b,c){var d=a.index.Gt(b),e=a.index.If(b),g=a.index.sj(b);c?g=c=0:c=0<a.info.ra?a.info.ra*g:1E3;a=new Rr(3,a,null,b,e,g,0,c,b==a.index.Hb()&&!a.j&&0<c);return new Xr([a],d)};function ds(a,b){var c=es(a,0,1836019558);if(!c)return null;var d=es(a,c.offset+8,1835427940),e=es(a,c.offset+8,1953653094);if(!d||!e)return null;var g=es(a,e.offset+8,1952868452),h=es(a,e.offset+8,1953658222),k=es(a,e.offset+8,1952867444);if(!g||!h||!k)return null;var m=es(a,e.offset+8,1935763823),e=es(a,e.offset+8,1935763834);if(m){var p=fs(m),r=fs(m);if(0!=p||1!=r)return null;p=fs(m)}for(var t=fs(g),v=fs(g),I=t&2,R=t&1?gs(g):0,ea=I?fs(g):0,ta=t&8?fs(g):0,r=t&16?fs(g):0,Ve=t&32?fs(g):0,t=fs(h),
dh=t&1,Sr=t&4,ez=t&256,g=t&512,jZ=t&1024,kZ=t&2048,t=fs(h),lZ=dh?fs(h):0,mZ=Sr?fs(h):0,dh=[],WJ=[],fz=[],gz=[],XJ=0,We=0,Yb=0;Yb<t;Yb++){var nZ=ez?fs(h):ta;g&&dh.push(fs(h));var vd=Ve;Sr&&0==Yb?vd=mZ:jZ&&(vd=fs(h));WJ.push(vd);vd=kZ?fs(h):0;0==Yb&&(XJ=vd);fz.push(We+vd);gz.push(Yb);We+=nZ}Ab(gz,function(a,b){return fz[a]-fz[b]});h=[];for(Yb=0;Yb<t;Yb++)h[gz[Yb]]=Yb;We=I?4:0;Yb=16*t;vd=68+We+k.size+Yb+(m?m.size:0)+(e?e.size:0);c=vd-c.size;ta=new hs(vd);is(ta,vd);is(ta,1836019558);js(ta,d);is(ta,vd-
24);is(ta,1953653094);is(ta,16+We);is(ta,1952868452);is(ta,131072|(I?2:0));is(ta,v);I&&is(ta,ea);js(ta,k);is(ta,20+Yb);is(ta,1953658222);is(ta,16781057);is(ta,t);is(ta,R+lZ+c);for(Yb=We=0;Yb<t;Yb++)k=h[Yb],d=Math.round(b*k/t),k=Math.round(b*(k+1)/t)-d,vd=d-We+XJ,is(ta,k),is(ta,g?dh[Yb]:r),is(ta,WJ[Yb]),is(ta,vd),We+=k;m&&(is(ta,m.size),is(ta,1935763823),is(ta,0),is(ta,1),is(ta,p+c));e&&js(ta,e);return ta.data.buffer}
function es(a,b,c){for(;ks(a,b);){var d=ls(a,b);if(d.type==c)return d;b+=d.size}return null}function ls(a,b){var c=a.getUint32(b),d=a.getUint32(b+4);return new ms(a,b,c,d)}function ns(a,b){return 4294967296*a.getUint32(b)+a.getUint32(b+4)}function ks(a,b){if(8>a.byteLength-b)return!1;var c=a.getUint32(b);if(8>c)return!1;for(var d=4;8>d;d++){var e=a.getInt8(b+d);if(97>e||122<e)return!1}return a.byteLength-b>=c}function ms(a,b,c,d){this.data=a;this.offset=b;this.size=c;this.type=d;this.g=8}
function fs(a){var b=a.data.getInt32(a.offset+a.g);a.g+=4;return b}function gs(a){var b=ns(a.data,a.offset+a.g);a.g+=8;return b}ms.prototype.skip=function(a){this.g+=a};function hs(a){this.data=new DataView(new ArrayBuffer(a));this.g=0}function is(a,b){a.data.setInt32(a.g,b);a.g+=4}function js(a,b){for(var c=0;c+4<=b.size;)is(a,b.data.getUint32(b.offset+c)),c+=4;for(;c<b.size;)a.data.setUint8(a.g++,b.data.getUint8(b.offset+c++))};function os(a,b,c,d){this.info=a;this.buffer=b;this.aa=c;this.g=d}function cs(a){return a.aa?new DataView(a.buffer,a.aa.start,a.aa.length):new DataView(a.buffer)}function ps(a){if(a.info.j!=a.aa.length)return!1;if(1==a.info.g.info.j){if(8>a.info.j||4==a.info.type)return!0;var b=cs(a),c=b.getUint32(0,!1),b=b.getUint32(4,!1);if(2==a.info.type)return c==a.info.j&&1936286840==b;if(3==a.info.type&&0==a.info.k)return 1836019558==b||1936286840==b||1937013104==b||1718909296==b}return!0}
function qs(a){var b;if(1==a.info.g.info.j){var c=NaN,d=NaN;b=0;for(a=new DataView(a.buffer);ks(a,b);){var e=ls(a,b);if(1936286840==e.type)d=e.data.getUint32(e.offset+16);else if(1836476516==e.type)var d=e,g=d.data.getUint8(d.offset+8)?28:20,d=d.data.getUint32(d.offset+g);else 1952867444==e.type&&(c=e,c=c.data.getUint8(c.offset+8)?ns(c.data,c.offset+12):c.data.getUint32(c.offset+12));g=e.type;b=1836019558==g||1836019574==g||1953653094==g?b+8:b+e.size}b=c/d}else b=NaN;return b};function rs(){this.ja=0;this.g=new Float64Array(128);this.j=new Float64Array(128);this.o=1;this.k=!1}f=rs.prototype;f.Rj=function(a){return this.g[a]};f.If=function(a){return this.j[a]/this.o};f.sj=function(a){a=this.Al(a);return 0<=a?a/this.o:-1};f.Al=function(a){return a+1<this.ja||this.k?this.j[a+1]-this.j[a]:-1};f.Wg=function(){return 0};f.Hb=function(){return this.ja-1};f.pf=function(){return this.k?this.j[this.ja]/this.o:NaN};f.$s=function(){return 0};f.Xs=function(){return this.ja};f.Gt=function(){return""};
f.Ch=function(a){a=yb(this.j.subarray(0,this.ja),a*this.o);return 0<=a?a:Math.max(0,-a-2)};f.yn=function(){return 0<=this.Hb()};function ss(a){if(a.g.length<a.ja+1){var b=2*a.g.length,b=b+2,c=a.g;a.g=new Float64Array(b+1);var d=a.j;a.j=new Float64Array(b+1);for(b=0;b<a.ja+1;b++)a.g[b]=c[b],a.j[b]=d[b]}}function ts(a,b){this.j=a;this.g=0;this.k=b||0}function us(a){for(var b=vs(a,!1);236==b;)ws(a),b=vs(a,!1);return b}
function xs(a){var b=vs(a,!0),c=a.j.byteOffset+a.g,d=Math.min(b,a.j.buffer.byteLength-c),c=new DataView(a.j.buffer,c,d),c=new ts(c,a.k+a.g);a.g+=b;return c}function ys(a){for(var b=vs(a,!0),c=zs(a),d=1;d<b;d++)c=(c<<8)+zs(a);return c}function ws(a){var b=vs(a,!0);a.g+=b}function vs(a,b){var c=zs(a);if(1==c){for(var d=c=0;7>d;d++)c=256*c+zs(a);return c}for(var e=128,d=0;6>d&&e>c;d++)c=256*c+zs(a),e*=128;return b?c-e:c}function zs(a){return a.j.getUint8(a.g++)};function As(a,b,c,d,e,g){Qr.call(this,a,b);this.initRange=c;this.indexRange=d;this.o=null;this.index=new rs;this.j=e;this.lastModified=g}z(As,Qr);f=As.prototype;f.Bc=function(){return!(!this.g||!this.index.yn())};
f.ur=function(a){var b=new Rr(1,this,this.initRange),c=new Rr(2,this,this.indexRange),d=[],e=[b];Ur(b,c)?e.push(c):(d.push(new Xr([c])),a=0);isNaN(this.j)?a=0:a>this.j&&(a=this.j);b=e[e.length-1];c=b.aa.end-e[0].aa.start+1;a>c&&(a=Br(b.aa.end+1,a-c),e.push(new Rr(4,this,a)));d.push(new Xr(e));return d};
f.Xp=function(a){if(1==a.info.type){if(this.g)return;this.g=new Uint8Array(a.buffer,a.aa.start,a.aa.length)}else if(2==a.info.type){if(this.o||0<=this.index.Hb())return;if(1==this.info.j){var b=this.index,c=cs(a),d=a.info.aa.start;a=0;var e=c.getUint32(0,!1),g=c.getUint8(a+8);a+=12;var h=c.getUint32(a+4,!1);b.o=h;a+=8;0==g?(g=c.getUint32(a,!1),h=c.getUint32(a+4,!1),a+=8):(g=4294967296*c.getUint32(a,!1)+c.getUint32(a+4,!1),h=4294967296*c.getUint32(a+8,!1)+c.getUint32(a+12,!1),a+=16);b.g[0]=h+(e+d);
b.j[0]=g;b.k=!0;d=c.getUint16(a+2,!1);a+=4;for(e=0;e<d;e++){var k=c.getUint32(a,!1),h=c.getUint32(a+4,!1);a+=12;g=b;g.ja++;ss(g);g.g[g.ja]=g.g[g.ja-1]+k;g.j[g.ja]=g.j[g.ja-1]+h}}else this.o=cs(a)}if(jr(this.info)&&this.g&&this.o){c=new DataView(this.g.buffer,this.g.byteOffset,this.g.byteLength);b=this.index;g=this.o;c=new ts(c);if(440786851==us(c)&&(ws(c),408125543==us(c))){d=c;e=d.g;a=vs(d,!0);d.g=e;for(var c=xs(c),d=c.k+c.g,m=us(c);357149030!=m;)ws(c),m=us(c);c=xs(c);h=1E6;k=1E9;for(e=0;!(c.g>=
c.j.byteLength);)if(m=us(c),2807729==m)h=ys(c);else if(2807730==m)k=ys(c);else if(17545==m){var e=c,m=vs(e,!0),p=0;4==m?p=e.j.getFloat32(e.g):8==m&&(p=e.j.getFloat64(e.g));e.g+=m;e=p}else ws(c);b.o=k/h;c=new ts(g);if(475249515==us(c)){for(c=xs(c);!(c.g>=c.j.byteLength);)if(m=us(c),187==m){g=xs(c);h=d;if(179!=us(g))k=null;else if(k=ys(g),183!=us(g))k=null;else{g=xs(g);for(m=h;!(g.g>=g.j.byteLength);)241==us(g)?m=ys(g)+h:ws(g);k=[m,k]}g=b;h=k[0];k=k[1];ss(g);g.g[g.ja]=h;g.j[g.ja]=k;g.ja++}else ws(c);
c=a+d;a=e;ss(b);b.k=!0;b.j[b.ja]=a;b.g[b.ja]=c}}this.o=null}};function Bs(a,b,c,d){for(var e=[];b<=a.index.Hb();b++){var g;g=a.index;var h=b;g=Br(g.Rj(h),h+1<g.ja||g.k?g.g[h+1]-g.g[h]:-1);var h=a.index.If(b),k=a.index.sj(b),m=Math.max(0,c-g.start),p=Math.min(g.end+1,c+d)-(g.start+m);e.push(new Rr(3,a,g,b,h,k,m,p,b==a.index.Hb()&&m+p==g.length));if(g.start+m+p>=c+d)break}return new Xr(e)}
f.Es=function(a){for(var b=this.Ai(a.info),c=[],d=a.g,e=0;e<b.length;e++){var g=Br(b[e].aa.start+b[e].k-a.info.aa.start+a.aa.start,b[e].j);c.push(new os(b[e],a.buffer,g,d));d=!1}return c};f.Ai=function(a){for(var b=0;b<this.index.Hb()&&a.aa.start>=this.index.Rj(b+1);)b++;return Bs(this,b,a.aa.start,a.aa.length).g};f.Hg=function(a){return this.Bc()?!0:isNaN(this.j)?!1:a.aa.end+1<this.j};
function Cs(a,b,c){a.Hg(b);if(!a.Bc())return c=Br(b.aa.end+1,c),c.end+1>a.j&&(c=new zr(c.start,a.j-1)),a=[new Rr(4,b.g,c)],new Xr(a);4==b.type&&(b=a.Ai(b),b=b[b.length-1]);var d=0,e=b.aa.start+b.k+b.j;3==b.type&&(d=b.o,e==b.aa.end+1&&(d+=1));return Bs(a,d,e,c)}f.Ri=function(a,b){var c=this.index.Ch(a);b&&(c=Math.min(this.index.Hb(),c+1));return Bs(this,c,this.index.Rj(c),0)};f.Ml=function(){var a;if(a=this.Bc()&&!isNaN(this.j))a=this.index,a=(a.k?a.g[a.ja]:-1)!=this.j;return a};f.Dl=function(){return!0};function Ds(a,b){T.call(this);this.J=!!b;this.C=this.duration=0;this.isLive=this.o=!1;this.F=y();this.A=Infinity;this.g={};this.G=a||"";this.I=this.D=0;this.B=!1;this.j=this.k=0}z(Ds,T);Ds.prototype.getErrorCode=function(){return 3>this.j?"manifest.net":"manifest.net.retryexhausted"};function Es(a){return Rb(a.g,function(a){return!!a.info.A},a)}var Fs=/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/;
function Gs(a,b){var c=new Ds;C(a,function(a){var e=a.type,g=a.itag,h=null;mr(e)&&(h=a.size.split("x"),h=new pr(+h[0],+h[1],+a.fps));var k=null,m=null;lr(e)&&(k=new gr,a.name&&(m=new nr(a.name,a.lang,0,"1"==a.isDefault)));a.xtags&&(g=a.itag+";"+a.xtags);var p=parseInt(a.bitrate,10)/8,r=null;b&&a.drm_families&&(r={},C(a.drm_families.split(","),function(a){r[a]=b[a]}));e=new ir(g,e,k,h,m,r,p);h=Ar(a.init);k=Ar(a.index);m=Hs(a.url,e,a.s);p=parseInt(a.clen,10);a=parseInt(a.lmt,10);m&&(c.g[g]=new As(m,
e,h,k,p,a))});return c}function Is(a){if(!a)return 0;var b=Fs.exec(a);return b?3600*parseFloat(b[2]||0)+60*parseFloat(b[4]||0)+parseFloat(b[6]||0):parseFloat(a)}function Hs(a,b,c){a=new sr(a);a.set("alr","yes");a.set("keepalive","yes");a.set("mime",encodeURIComponent(b.mimeType.split(";")[0]));a.set("ratebypass","yes");a.set("ir","1");a.set("rr","1");a.set("rn","3");a.set("rbuf","0");a.set("c","WEB");c&&a.set("signature",fr(c));return a}
function Js(a){var b=Cr(a,"id"),b=b.replace(":",";");"captions"==b&&(b=Cr(a,"lang"));var c=Cr(a,"mimeType"),d=Cr(a,"codecs"),c=d?c+'; codecs="'+d+'"':c,d=parseInt(Cr(a,"bandwidth"),10)/8,e=null;mr(c)&&(e=new pr(parseInt(Cr(a,"width"),10),parseInt(Cr(a,"height"),10),parseInt(Cr(a,"frameRate"),10)));var g=null,h=null;if(lr(c)){g=new gr;var h=Cr(a,"lang")||"",k=Dr(a,"Role");if(k){var k=Cr(k,"value")||"",m="invalid";"main"==k?m="original":"dub"==k?m="dubbed":"descriptive"==k?m="descriptive":"commentary"==
k&&(m="commentary");h="invalid"!=m&&h?new nr(Cr(a,"yt:langName")||h+" - "+m,h,0,"original"==m):null}else h=null}k=null;if(a=Dr(a,"ContentProtection"))if((k=a.attributes.schemeIdUri)&&"http://youtube.com/drm/2012/10/10"==k.textContent)for(k={},a=a.firstChild;null!=a;a=a.nextSibling)"yt:SystemURL"==a.nodeName&&(k[a.attributes.type.textContent]=a.textContent.trim());else k=null;return new ir(b,c,g,e,h,k,d)}
function Ks(a,b,c,d){a.k=1;b=b||a.G;c={format:"RAW",method:"GET",Ab:x(a.M,a,c,d||null)};a.J&&(c.timeout=15E3);fj(b,c)}
Ds.prototype.M=function(a,b,c){this.I=c.status;if(200<=c.status&&400>c.status){b=c.responseText;c=(new DOMParser).parseFromString(b,"text/xml").getElementsByTagName("MPD")[0];b=c.getElementsByTagName("Representation");if(0<c.getElementsByTagName("SegmentList").length)for(this.A=1E3*Is(Cr(c,"minimumUpdatePeriod"))||Infinity,this.isLive=Infinity>this.A,this.o=!0,this.C=parseInt(Cr(c,"yt:earliestMediaSequence"),10),c=0;c<b.length;c++){var d=Js(b[c]);if(!this.g[d.id]){var e=Hs(Dr(b[c],"BaseURL").textContent,
d),g=Dr(b[c],"Initialization"),h=Cr(g,"sourceURL"),g=Ar(Cr(g,"range"));this.g[d.id]=new $r(e,d,h,null===g?void 0:g)}var h=Dr(b[c],"SegmentList"),k=Dr(h,"SegmentTimeline"),e=k.getElementsByTagName("S"),h=h.getElementsByTagName("SegmentURL"),g=0,m;m=parseInt(Cr(k,"startNumber"),10)||0;var p=parseInt(Cr(k,"yt:earliestMediaSequence"),10);m<p&&(m=p);for(var k=parseInt(Cr(k,"timescale"),10)||1,p=[],r=0;r<h.length;r++){var t;t=m+r;var v=g,I=k,R=h[r],I=parseFloat(e[r].getAttribute("d"))/I,ea=R.getAttribute("media"),
ta=null,R=R.getAttribute("mediaRange");null!=R&&(0<=parseInt(R.split("-")[1],10)?ta=Ar(R):ea=ea+"?range="+R);t=new Er(t,v,I,ea,ta);p.push(t);g+=t.duration}this.g[d.id].update(p,this.isLive,this.C)}else i:for(this.duration=Is(Cr(c,"mediaPresentationDuration")),c=0;c<b.length;c++){g=b[c];d=Js(g);h=Dr(g,"BaseURL");e=Hs(h.textContent,d);m=Dr(g,"SegmentBase");g=Ar(m.attributes.indexRange.value);m=Ar(m.getElementsByTagName("Initialization")[0].attributes.range.value);h=parseInt(h.getAttribute("yt:contentLength"),
10);d=new As(e,d,m,g,h,NaN);if(!d)break i;this.g[d.info.id]=d}this.F=y();this.k=2;this.B=!1;this.j=0;a&&a(this);this.publish("loaded")}else this.k=3,this.B?this.j+=1:this.B=!0,b&&b(c),this.publish("load_error")};function Ls(a){for(var b in a.g)if(a.g[b].index)return a.g[b].index.pf();return NaN}function Ms(a){for(var b in a.g)if(a.g[b].index)return a.g[b].index.$s();return 0}function Ns(a,b){Ob(a.g,function(a){Ob(b,function(b,e){a.B.g.set(e,b)})})};function Os(a,b,c,d){this.id=a;this.name=b;this.language=c;this.isDefault=d}Os.prototype.toString=function(){return this.name};function Ps(a,b,c){this.j=a||0;this.g=b||0;this.k=c}Ps.prototype.equals=function(a){return this.j==a.j&&this.g==a.g&&this.k==a.k};function Qs(a,b,c){return new Ps(or[a]||0,or[b]||0,c)}var Rs=Qs("auto","large",!1),Ss=Qs("auto","auto",!1);function Ts(a){var b=or.auto;return a.j==b&&a.g==b}function Us(a){return a.k&&!!a.j&&a.j==a.g}
function Vs(a,b){if(b.k&&Ts(b))return Ss;if(b.k||Ts(a))return b;if(a.k||Ts(b))return a;var c=a.j&&b.j?Math.max(a.j,b.j):a.j||b.j,d=a.g&&b.g?Math.min(a.g,b.g):a.g||b.g,c=Math.min(c,d);return c==a.j&&d==a.g?a:new Ps(c,d,!1)}function Ws(a){var b=a.g||a.j;return $b(function(a){return or[a]==b})||"auto"}Ps.prototype.o=function(a){if(!a.video)return!1;a=or[a.video.quality];return this.j<=a&&(!this.g||this.g>=a)};function Xs(a,b){this.j=a;this.g=b||null}function Ys(a,b){var c=b||Ss,c=eb(a.j,x(c.o,c)),c=D(c,function(a){return a.video.quality});xb(c);return c}function Zs(a){var b={};D(a.j,function(a){b[a.video.quality]=a.video.fps});return b}function $s(a){if(!a.g)return[];var b=[];C(a.g,function(a){a.g&&b.push(new Os(a.id,a.g.name,a.g.language,a.g.isDefault))});xb(b);return b};function at(a,b,c,d){this.k={};this.J=a;this.G=b;a=c.split("#");this.D=parseInt(a[0],10);this.C=parseInt(a[1],10);this.j=parseInt(a[2],10);this.zb=parseInt(a[3],10);this.rows=parseInt(a[4],10);this.A=parseInt(a[5],10);this.o=a[6];this.B=a[7];this.I=d}f=at.prototype;f.getHeight=function(){return this.C};f.Je=function(){return this.j};f.isDefault=function(){return-1!=this.o.indexOf("default")};
function bt(a,b){var c=a.G,c=c.replace("$N",a.o),c=c.replace("$L",a.J.toString()),c=c.replace("$M",b.toString());a.B&&(c=ie(c,{sigh:a.B}));return c}function ct(a,b){var c=Math.floor(b/(a.zb*a.rows)),d=a.zb*a.rows,e=b%d,g=e%a.zb,e=Math.floor(e/a.zb),h=a.rows,k=a.Vm()+1-d*c;k<d&&(h=Math.ceil(k/a.zb));return{url:bt(a,c),UE:g,zb:a.zb,row:e,rows:h,Rt:a.D*a.zb,Qt:a.C*h}}f.er=function(a){var b=this.Je()-1;a=0==this.A?Math.round(a*this.j/this.I):Math.round(1E3*a/this.A);return Ib(a,0,b)};
f.Vm=function(){return this.j-1};f.Fs=function(){return this.j?0:-1};f.bt=function(){};function dt(a,b){this.g=this.j(a,b);this.k={};1<this.g.length&&this.g[0].isDefault()&&this.g.splice(0,1)}dt.prototype.j=function(a,b){for(var c=[],d=a.split("|"),e=d[0],g=1;g<d.length;g++){var h=this.o(g-1,e,d[g],b);180>h.getHeight()&&c.push(h)}return c};dt.prototype.o=function(a,b,c,d){return new at(a,b,c,d)};function et(a,b){var c=Ib(b,0,1),d=a.g[0].Je()-1;return Ib(Math.round(d*c),0,d)}
function ft(a,b){var c=a.k[b];if(c)return c;for(var c=a.g.length,d=0;d<c;d++)if(a.g[d].D>=b)return a.k[b]=d;a.k[b]=c-1;return c-1}dt.prototype.A=function(){};function gt(a,b,c,d){c=c.split("#");c=[c[1],c[2],0,c[3],c[4],-1,c[0],""].join("#");at.call(this,a,b,c,0);this.g=null;this.F=d?3:0}z(gt,at);f=gt.prototype;f.Je=function(){return this.g?this.g.Xs():-1};f.er=function(a){var b=this.rows*this.zb*this.F,c=-1,d=-1,e=this.g;e&&(c=e.Hb(),d=e.Ch(a));return d>c-b?-1:d};f.Vm=function(){return this.g?this.g.Hb():-1};f.Fs=function(){return this.g?this.g.Wg():-1};f.bt=function(a){this.g=a?a.index:null};function ht(a,b){this.B=b;dt.call(this,a,0)}z(ht,dt);ht.prototype.j=function(a,b){return ht.H.j.call(this,"$N|"+a,b)};ht.prototype.o=function(a,b,c){return new gt(a,b,c,this.B.isLive)};ht.prototype.A=function(a){for(var b=0;b<this.g.length;b++)this.g[b].bt(a)};var it={0:"MONO",1:"LEFT_RIGHT",2:"RIGHT_LEFT",3:"TOP_BOTTOM",4:"BOTTOM_TOP"};var jt={JI:1,KI:2,LI:3};var kt,lt;var mt=lc,mt=mt.toLowerCase();if(Ia(mt,"android")){var nt=mt.match(/android\D*(\d\.\d)[^\;|\)]*[\;\)]/);if(nt)kt=Number(nt[1]);else{var ot={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1},pt=mt.match("("+Vb(ot).join("|")+")");kt=pt?ot[pt[0]]:0}}else kt=void 0;lt=0<=kt;var qt=yh||zh;function rt(){return st("(ps3; leanback shell)")}function tt(){return st("safari/")&&st(" version/8")}function st(a){var b=lc;return b?0<=b.toLowerCase().indexOf(a):!1};var ut,vt;function wt(){var a=s("yt.player.utils.videoElement_");a||(a=document.createElement("video"),q("yt.player.utils.videoElement_",a,void 0));return a}function xt(){if(2.2==kt)return!0;var a=wt();try{return!(!a||!a.canPlayType||!a.canPlayType('video/mp4; codecs="avc1.42001E, mp4a.40.2"')&&!a.canPlayType('video/webm; codecs="vp8.0, vorbis"'))}catch(b){return!1}};function zt(){if(void 0==ut&&(ut=!1,window.crypto&&window.crypto.getRandomValues))try{var a=new Uint8Array(1);window.crypto.getRandomValues(a);ut=!0}catch(b){}if(ut){var a=Array(16),c=new Uint8Array(16);window.crypto.getRandomValues(c);for(var d=0;d<a.length;d++)a[d]=c[d]}else for(a=Array(16),c=0;16>c;c++){for(var d=y(),e=0;e<d%23;e++)a[c]=Math.random();a[c]=Math.floor(256*Math.random())}return a}
function At(){for(var a=zt(),b=[],c=0;c<a.length;c++)b.push("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_".charAt(a[c]&63));return b.join("")}function Bt(){return D(zt(),function(a){return(a&15).toString(16)}).join("")};function Ct(a,b,c){b={cpn:b};c&&(b.ibw="1369843");return{url:ie(a,b),type:"application/x-mpegURL",quality:"auto",itag:"93"}};function Dt(a,b){return void 0==b?a:"1"==b?!0:!1}function Et(a,b,c){for(var d in c)if(c[d]==b)return c[d];return a}function Ft(a,b){return void 0==b?a:Number(b)}function Gt(a,b){return void 0==b?a:b.toString()}function Ht(a,b){var c=Gt(a,b);c&&(c=uf(c));return c}var It=/^([0-9\.]+)\:([0-9\.]+)$/;function Jt(a){if(a&&(a=a.match(It))){var b=parseFloat(a[2]);if(0<b)return parseFloat(a[1])/b}return NaN}function Kt(a,b){var c=or.auto,d=or[b];return d>=or.medium?new Ps(d,c,!1):d>=c?new Ps(c,d,!1):a};var Lt=[.25,.5,1,1.25,1.5,2];function Mt(a,b){return window.location.protocol+"//i1.ytimg.com/vi/"+escape(a)+"/"+(b||"hqdefault.jpg")};var Nt,Ot,Pt;var Qt=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{},Rt=x(Qt.clearResourceTimings||Qt.webkitClearResourceTimings||Qt.mozClearResourceTimings||Qt.msClearResourceTimings||Qt.oClearResourceTimings||u,Qt),St=Qt.mark?function(a){Qt.mark(a)}:u;function Tt(a,b,c){Ut(c).tick[a]=b||y();b||St(a)}function Vt(a,b){var c=Ut(b).tick;return a in c}function Wt(a,b,c){Ut(c).info[a]=b}
function Xt(a){ef("EXP_DEFER_CSI_PING")&&(M(Pt),Ot=null);var b="https:"==window.location.protocol?"https://gg.google.com/csi":"http://csi.gstatic.com/csi",c="",d;for(d in a)c+="&"+d+"="+a[d];zf(b+"?"+c.substring(1))}function Yt(a){Ot&&(a&&(Ot.yt_fss=a),Xt(Ot))}function Ut(a){return s("ytcsi."+(a||"")+"data_")||Zt(a)}function Zt(a){var b={tick:{},span:{},info:{}};q("ytcsi."+(a||"")+"data_",b,void 0);return b};var $t,au;var bu=lc,cu=bu.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!cu||2>cu.length)$t=void 0;else{var du=bu.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d_\d)[_ ]/);$t=du&&6==du.length?Number(du[5].replace("_",".")):0}(au=0<=$t)&&0<=lc.search("Safari")&&lc.search("Version");var eu={FI:0,UH:1,xI:2};function fu(a,b,c){c=c||{};mj(c.Xa,c.pageId,x(gu,l,a,b,c),c.onError)}
function gu(a,b,c){var d={};0===b?d.action_like_video=1:1===b?d.action_dislike_video=1:d.action_indifferent_video=1;d.video_id=a;d.plid=c.Mb;c.playlistId&&(d.list=c.playlistId);c.Xa&&(d.authuser=c.Xa);c.pageId&&(d.pageid=c.pageId);a={screen:ge({h:screen.height,w:screen.width,d:screen.colorDepth}),session_token:ef("XSRF_TOKEN")};c.uF&&(a.station_id=c.uF);fj("/watch_actions_ajax",{format:"XML",method:"POST",Me:d,ab:a,Ma:c.Ma,onError:c.onError,Ab:c.Ab})};function hu(a,b,c){this.errorCode=a;this.j=b;this.g=c||""};function iu(a){this.experimentIds=(a||"").split(",");var b={};C(this.experimentIds,function(a){b[a]=!0});this.S=!!b["913424"];this.F=!!b["932250"];this.Ia=!!b["945066"];this.G=!!b["945069"];this.ha=!!b["945073"];this.Fa=!!b["945074"];this.Ta=!!b["945078"];this.N=!!b["945079"];this.I=!!b["945080"];this.A=!!b["945081"];this.M=!!b["945082"];this.J=!!b["945083"];this.B=!!b["938697"];this.O=!!b["960600"];this.na=!!b["945089"];this.ta=!!b["945090"];this.Z=!!b["945091"];this.pa=!!b["927845"];this.D=!!b["936926"];
this.P=!!b["913430"];this.g=!(!b["926304"]&&!b["932404"]);this.k=!!(b["926301"]||b["926305"]||this.g);this.Aa=!!b["927877"];this.ma=!!b["939937"];this.C=!!b["913436"]||!!b["934933"]||!!b["934934"]||!!b["934936"]||!!b["934937"]||!!b["934938"]||!!b["934939"]||!!b["934941"]||!!b["934942"]||!!b["934943"]||!!b["934944"]||!!b["934945"]||!!b["934946"]||!!b["934947"]||!!b["934948"]||!!b["934949"]||!!b["934950"]||!!b["934951"]||!!b["934952"]||!!b["934953"]||!!b["934954"]||!!b["948904"]||!!b["948905"]||!!b["948906"]||
!!b["948907"]||!!b["948908"];this.j=!!b["934947"];this.V=!!b["953500"];this.Ea=!!b["941004"];this.o=!!b["907259"];this.W=!!b["953903"]||!!b["953916"]||!!b["953914"]||!!b["953912"];this.Ka=!b["953916"]&&(!!b["921094"]||!!b["943909"]||!!b["943915"]||!!b["943917"]);this.eb=!!b["951502"];this.spherical=!!b["951503"];this.wa=!!b["930676"]||!!b["930677"];this.ka=!!b["943603"]||!!b["943604"]||!!b["943605"]||!!b["943606"]||!!b["943607"];this.jb=!!b["909722"];this.ia=!!b["939977"];this.Ca=!!b["957105"];this.U=
!!b["959800"];this.ib=!!b["953914"]||!!b["953916"];this.ya=!!b["937222"];this.ea=!!b["959801"]};function ju(a,b){this.g=a;this.j=b}ju.prototype.clone=function(){return new ju(this.g,this.j)};function ku(a){this.g=[];if(a)t:{var b,c;if(a instanceof ku){if(b=a.La(),c=a.Wa(),0>=a.Sa()){a=this.g;for(var d=0;d<b.length;d++)a.push(new ju(b[d],c[d]));break t}}else b=Vb(a),c=Ub(a);for(d=0;d<b.length;d++)lu(this,b[d],c[d])}}function lu(a,b,c){var d=a.g;d.push(new ju(b,c));b=d.length-1;a=a.g;for(c=a[b];0<b;)if(d=b-1>>1,a[d].g>c.g)a[b]=a[d],b=d;else break;a[b]=c}f=ku.prototype;
f.remove=function(){var a=this.g,b=a.length,c=a[0];if(!(0>=b)){if(1==b)nb(a);else{a[0]=a.pop();for(var a=0,b=this.g,d=b.length,e=b[a];a<d>>1;){var g=2*a+1,h=2*a+2,g=h<d&&b[h].g<b[g].g?h:g;if(b[g].g>e.g)break;b[a]=b[g];a=g}b[a]=e}return c.j}};f.Wa=function(){for(var a=this.g,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].j);return b};f.La=function(){for(var a=this.g,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].g);return b};f.ig=function(a){return gb(this.g,function(b){return b.j==a})};f.clone=function(){return new ku(this)};
f.Sa=function(){return this.g.length};f.isEmpty=function(){return mb(this.g)};f.clear=function(){nb(this.g)};function mu(){ku.call(this)}z(mu,ku);function nu(a,b){T.call(this);this.g=a;this.k=new mu;this.A={};this.o=b||""}z(nu,T);nu.prototype.j=!1;function ou(a,b,c){var d;for(c=ft(a.g,c);0<=c;){d=a.g.g[c];if(d=d.k[Math.floor(b/(d.zb*d.rows))]?ct(d,b):null)return d;c--}return ct(a.g.g[0],b)}function pu(a,b,c){c=ft(a.g,c);for(var d,e;0<=c;c--)if(d=a.g.g[c],e=Math.floor(b/(d.zb*d.rows)),!d.k[e]){d=a;var g=c,h=g+"-"+e;d.A[h]||(d.A[h]=!0,lu(d.k,g,{Kp:g,Lp:e}))}qu(a)}
function qu(a){if(!a.j)if(a.k.isEmpty())a.j=!1;else{a.j=!0;var b=a.k.remove(),c=new Image;a.o&&(c.crossOrigin=a.o);c.src=bt(a.g.g[b.Kp],b.Lp);c.onload=x(a.B,a,b.Kp,b.Lp)}}nu.prototype.B=function(a,b){this.j=!1;var c=this.g.g[a];c.k[b]=!0;qu(this);var d,e=c.zb*c.rows;d=b*e;c=Math.min(d+e-1,c.Je()-1);d=[d,c];this.publish("l",d[0],d[1])};function ru(a,b,c){this.j=a;this.g=b;this.k=c}var su={playready:["com.youtube.playready","com.microsoft.playready"],widevine:["com.widevine.alpha"],clearkey:["org.w3.clearkey","webkit-org.w3.clearkey"]},tu=["widevine","playready"];function uu(){var a=window.MediaKeys||window.MSMediaKeys;return a&&a.isTypeSupported?a:null}function vu(a,b,c,d){return!(0!=b.indexOf("audio/mp4")||"widevine"!=c||!a.canPlayType(b)||!a.canPlayType('video/mp4; codecs="avc1"',d))}
function wu(a,b,c){var d,e=uu();if(e)d=function(a,b){return e.isTypeSupported(b,a)};else if(a.addKey||a.webkitAddKey)d=function(b,c){return a.canPlayType(b,c)};else return null;for(var g=0;g<tu.length;g++){var h=tu[g];if(c[h])for(var k=su[h],m=0;m<k.length;m++){var p=k[m];if(d(b,p)||vu(a,b,h,p))return new ru(h,p,c[h])}}return null};function xu(a){return(a=a.exec(lc))?a[1]:""}var yu=function(){if(wh)return xu(/Firefox\/([0-9.]+)/);if(wc||vc)return Gc;if(Bh)return xu(/Chrome\/([0-9.]+)/);if(Ch)return xu(/Version\/([0-9.]+)/);if(yh||zh){var a;if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(lc))return a[1]+"."+a[2]}else{if(Ah)return(a=xu(/Android\s+([0-9.]+)/))?a:xu(/Version\/([0-9.]+)/);if(xh)return xu(/Camino\/([0-9.]+)/)}return""}();function zu(a,b){this.g=a;this.k=b;this.o=0;Object.defineProperty(this,"timestampOffset",{get:this.fC,set:this.gC});Object.defineProperty(this,"buffered",{get:this.eC})}f=zu.prototype;f.append=function(a){this.g.webkitSourceAppend(this.k,a)};f.abort=function(){this.g.webkitSourceAbort(this.k)};f.eC=function(){return this.g.webkitSourceState==this.g.SOURCE_CLOSED?new Au:this.g.webkitSourceBuffered(this.k)};f.fC=function(){return this.o};
f.gC=function(a){this.o=a;this.g.webkitSourceTimestampOffset(this.k,a)};function Au(){this.length=0};function Bu(a){this.activeSourceBuffers=this.sourceBuffers=[];this.g=a;this.j=NaN;this.k=0;Object.defineProperty(this,"duration",{get:this.eB,set:this.hB});Object.defineProperty(this,"readyState",{get:this.fB});this.g.addEventListener("webkitsourceclose",x(this.gB,this),!0)}f=Bu.prototype;f.addEventListener=function(a,b,c){this.g.addEventListener(a,b,c)};f.kC=function(){return this.g.webkitMediaSourceURL};
f.addSourceBuffer=function(a){var b=(this.k++).toString();this.g.webkitSourceAddId(b,a);a=new zu(this.g,b);this.sourceBuffers.push(a);return a};f.fB=function(){switch(this.g.webkitSourceState){case this.g.SOURCE_CLOSED:return"closed";case this.g.SOURCE_OPEN:return"open";case this.g.SOURCE_ENDED:return"ended"}return""};f.endOfStream=function(a){var b=this.g.EOS_NO_ERROR;"network"==a?b=this.g.EOS_NETWORK_ERR:"decode"==a&&(b=this.g.EOS_DECODE_ERR);this.g.webkitSourceEndOfStream(b)};f.gB=function(){nb(this.sourceBuffers)};
f.eB=function(){return this.j};f.hB=function(a){this.j=a;this.g.webkitSourceSetDuration&&this.g.webkitSourceSetDuration(a)};function Cu(a){this.o=[];this.G=a||null}function Du(a,b,c,d){for(var e=0;e<c.length;e++)a.listen(b,c[e],d)}Cu.prototype.listen=function(a,b,c){c=x(c,this.G||this);a.addEventListener(b,c,!1);this.o.push(a,b,c)};Cu.prototype.removeAll=function(){if(this.o)for(;this.o.length;){var a=this.o.shift(),b=this.o.shift(),c=this.o.shift();a.removeEventListener&&a.removeEventListener(b,c)}};Cu.prototype.$=function(){return null===this.o};Cu.prototype.dispose=function(){this.removeAll();this.o=null};function Eu(a,b,c,d){Cu.call(this);this.j=this.g=null;this.B=b;this.k=window.MediaSource?new window.MediaSource:window.WebKitMediaSource?new window.WebKitMediaSource:new Bu(a);this.A="";this.C=null;Du(this,this.k,["sourceopen","webkitsourceopen"],pa(this.F,d,c));Du(this,this.k,["sourceclose","webkitsourceclose"],this.D)}z(Eu,Cu);function Fu(a,b){a.C=b}function Gu(a){if(!a.A){var b;b=a.k;b=b.kC?b.g.webkitMediaSourceURL:window.URL.createObjectURL(b);a.A=b}return a.A}
Eu.prototype.lf=function(a){Hu(this)?this.k.duration=a:this.B=a};function Hu(a){return"open"==a.k.readyState}function Iu(a){return"closed"==a.k.readyState}function Ju(a){return a.g.updating||a.j.updating}function Ku(a){return a.g?!!a.g.appendBuffer:!(!window.MediaSource||!window.MediaSource.isTypeSupported)}Eu.prototype.F=function(a,b){isNaN(this.B)||(this.k.duration=this.B,this.B=NaN,this.g=this.k.addSourceBuffer(a),this.j=this.k.addSourceBuffer(b),this.C&&(this.C(this),this.C=null))};
Eu.prototype.D=function(){this.dispose()};Eu.prototype.dispose=function(){var a=this.A;if(a)try{window.URL.revokeObjectURL(a)}catch(b){}this.A="";Eu.H.dispose.call(this)};function Lu(a){if(/opus/.test(a)&&Bh&&!(0<=Ra(yu,"38")))return!1;if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(a);if(/webm/.test(a)&&!st("(ps4; leanback shell)"))return!1;'audio/mp4; codecs="mp4a.40.2"'==a&&(a='video/mp4; codecs="avc1.4d401f"');return!!wt().canPlayType(a)};function Mu(a,b){this.k=a;this.g=b;this.j={}}function Nu(a){return a.g?a.k:ie(a.k,a.j)};function Ou(a,b){this.j=new Mu(a,!1);this.g=b}var Pu="9h8(H*".split(""),Qu="h98H(*".split(""),Ru="oMavAV".split("");Ou.prototype.getInfo=function(){return this.g};Ou.prototype.Jn=function(){return this.g.video.quality};var Su={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},Tu={"application/x-mpegURL":"maybe"},Uu={"application/x-mpegURL":"maybe"};
function Vu(a,b){if(!xt())return[];var c=Wu(a,b);a=!c.length&&b?Wu(a,!1):c;for(var d={},c=wt(),e=0;e<a.length;e++){var g=a[e];if(Xu(c,g.getInfo().mimeType)&&!Yu(g)){var h=g.Jn();if(!d[h]||jr(d[h].getInfo()))d[h]=g}}var k=[];C(qr,function(a){(g=d[a])&&k.push(g)});return k}function Xu(a,b){var c;if(!(c=a.canPlayType(b))){var d;zh?d=Uu[b]:2.2==kt?d=Su[b]:st("android")&&st("chrome")&&(d=Tu[b]);c=d||""}return c}function Yu(a){return a.g.id in Zu||rt()&&"5"==a.g.id}
function $u(){return st("android")&&st("chrome")&&!Ic(29)?!1:!!(window.MediaSource||window.WebKitMediaSource||window.HTMLMediaElement&&HTMLMediaElement.prototype.webkitSourceAddId)}var Zu={52:!0,53:!0,54:!0,55:!0,60:!0,79:!0,87:!0};function av(a){var b=[];C(a,function(a){a.url&&b.push(bv(a.url,a.type,"medium","0"))});return b}function bv(a,b,c,d,e){var g=new gr,h=rr[c];h||(c="small",h=rr.small);c=new pr(h[0],h[1],0,e?-1:0,c);b=unescape(b.replace(/"/g,'"'));return new Ou(a,new ir(d,b,g,c))}
function Wu(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d],g;if(g=xc&&0!=e.g.video.g)g=1==e.getInfo().j;g||0!=e.g.video.g==b&&c.push(e)}return c}function cv(a,b){for(var c=[],d=0;d<a.length;d++){var e=a[d];if(e.sig||e.s){var g=e.sig||fr(e.s);e.url=Yi(e.url,{signature:g})}e.url&&c.push(bv(e.url,e.type,e.quality,e.itag,e.stereo3d))}return Vu(c,!!b)}function dv(a){a=av(a);return Vu(a,!1)}
function ev(a,b){if(!b.g)return a[0];for(var c=0;c<a.length;c++){var d=a[c].getInfo();if(or[d.video.quality]<=b.g)return a[c]}return a[a.length-1]}
function fv(a){function b(a){return!!c[a]}var c={},d,e;for(e in a.g){var g=a.g[e];if(Lu(g.info.mimeType)){if(g.info.A){d||(d=wt());if(!wu(d,g.info.mimeType,g.info.A))continue;if(261==g.info.id&&(rt()||!d.canPlayType('audio/mp4; codecs="aac51"',"com.widevine.alpha")))continue}c[g.info.o]=c[g.info.o]||[];c[g.info.o].push(g.info)}}a=Pu;if(st("cros armv7")||st("windows nt 5.1"))a=Qu;d=E(a,b);a=E(Ru,b);if(!d||!a)return null;"9"==d&&c.h&&(e=function(a,b){return Math.max(a,b.video.height)},g=fb(c["9"],e,
0),fb(c.h,e,0)>1.5*g&&(d="h"));d=c[d];a=c[a];Ab(d,function(a,b){return b.video.width-a.video.width||b.ra-a.ra});Ab(a,function(a,b){return b.ra-a.ra});return new Xs(d,a)};function gv(a){T.call(this);this.Ta=new F(0,0);this.Ea=this.ia=!1;this.Kd="";this.Jd=this.ta=!1;this.Ka={};this.Bt=new dr(this.At,5E3,this);S(this,this.Bt);this.G=[];this.o={};this.keywords={};this.A={};hv(this,a)}z(gv,T);gv.C=/\/img\/watermark\/youtube_(hd_)?watermark(-vfl\S{6})?.png$/;gv.g=1;gv.o=-21;gv.A=18E3;gv.B="author cc_asr cc_load_policy iv_load_policy iv_new_window keywords oauth_token requires_purchase rvs sentiment subscribed title ttsurl ypc_buy_url ypc_full_video_length ypc_item_thumbnail ypc_item_title ypc_item_url ypc_offer_button_text ypc_offer_description ypc_offer_headline ypc_offer_id ypc_preview ypc_price_string ypc_video_rental_bar_text".split(" ");
gv.j={iurl:"default.jpg",iurlmq:"mqdefault.jpg",iurlhq:"hqdefault.jpg",iurlsd:"sddefault.jpg",iurlmaxres:"maxresdefault.jpg"};gv.k=["www.youtube.com","manifest.googlevideo.com"];f=gv.prototype;f.pm=!1;f.adaptiveFormats="";f.Uq=null;f.Bp=!0;f.wb=!1;f.uh="";f.Im="";f.rk=!1;f.Ap=gv.g;f.Vh=null;f.Nr=null;f.author="";f.Qh=0;f.Mk=!1;f.Iq=3;f.Tq=!1;f.xf="";f.Ba="";f.contentCheckOk=!1;f.je=0;f.Nk=!1;f.di=!1;f.Ak=!1;f.ef=0;f.Ef=!1;f.zo=!1;f.Sh=0;f.Sn=!1;f.og=!1;f.ro=!0;f.$h=!1;f.Jm=!1;f.fm=!1;f.$a=!1;
f.Km=!1;f.nm=!1;f.Ld=!1;f.zp=!1;f.Lm=!1;f.ky=0;f.lengthSeconds=0;f.dk=0;f.xt=!1;f.racyCheckOk=!1;f.Mi=!1;f.Bl=Ss;f.wp=0;f.zk=!1;f.startSeconds=0;f.bk=null;f.Bn=2;f.ti=Ss;f.Tr=!1;f.lh=!1;f.ne=null;f.title="";f.se="";f.Wj=null;f.ek="vvt";f.zt=!1;f.to=!1;f.clipStart=0;f.clipEnd=Infinity;
function iv(a,b){
var c=b||{};
c.iv_invideo_url&&(a.uh=uf(c.iv_invideo_url));
c.iv_cta_url&&(a.Im=uf(c.iv_cta_url));
c.cta_conversion_urls&&(a.jc=c.cta_conversion_urls);
a.author=Gt(a.author,c.author);a.Mk=Dt(a.Mk,c.cc_asr);
var d=c.ttsurl||a.xf;d&&pf(d)?a.xf=d:a.xf=Ht(a.xf,c.ttsurl);
a.Ba=Gt(a.Ba,c.cpn);
a.subscribed=Gt(a.subscribed,c.subscribed);
a.Bn=Et(a.Bn,c.sentiment,eu);
a.title=Gt(a.title,c.title);
a.na=Gt(a.na,c.ypc_preview);
a.xt=Dt(a.xt,c.paygated);
a.zt=Dt(a.zt,c.requires_purchase);
c.keywords&&(a.keywords=jv(c.keywords));c.rvs&&(a.V=kv(c.rvs));
a.contentCheckOk=Dt(a.contentCheckOk,"1"==c.cco);
a.racyCheckOk=Dt(a.racyCheckOk,"1"==c.rco);
a.C=Gt(a.C,c.oauth_token);
C(gv.B,function(a){a in c&&(this.o[a]=c[a])},a)
}
function hv(a,b){var c=b||{};a.wb="1"!=c.hlsdvr||Ch||zh&&5>$t?!1:!0;a.rk="1"==c.infringe||"1"==c.muted;a.xc=c.authkey;a.Xa=c.authuser;a.Ba||(a.Ba=c.cpn||At());a.Gv=y();a.Yu=c.t;a.Nk=Dt(a.Nk,c.cenchd);a.di=Dt(a.di,c.enable_cardio);a.Ak=Dt(a.Ak,c.enable_cardio_before_playback);a.ef=Ft(a.ef,c.end||c.endSeconds);a.ya=Gt(a.ya,c.itct);a.ro="1"!=c.no_get_video_log;a.$h="1"==c.tmi;a.Jm=Dt(a.Jm,c.noiba);a.fm="1"==c.livemonitor;a.$a="1"==c.live_playback;a.Km=Dt(a.Km,c.mdx);a.nm=Dt(a.nm,c.on3g);a.Lm=Dt(a.Lm,
c.utpsa);for(var d in gv.j){var e=c[d+"_webp"]||c[d];sf(e)&&(a.Ka[gv.j[d]]=e)}a.D=Gt(a.D,c.vvt);a.mB=c.osig;a.lo=c.ptchn;a.no=c.oid;a.J=c.ptk;a.oo=c.pltype;a.Mb=c.plid;a.F=c.eventid;a.eb=c.osid;a.yu=c.vm;a.xu=c.of;a.playlistId=Gt(a.playlistId,c.list);a.Jo=c.pyv_view_beacon_url;a.Jv=c.pyv_quartile25_beacon_url;a.Kv=c.pyv_quartile50_beacon_url;a.Lv=c.pyv_quartile75_beacon_url;a.Iv=c.pyv_quartile100_beacon_url;c.remarketing_url&&(a.remarketingUrl=c.remarketing_url);c.ppv_remarketing_url&&(a.ppvRemarketingUrl=
c.ppv_remarketing_url);a.purchaseId=c.purchase_id;a.hp=c.sdetail;!a.Fa&&c.session_data&&(a.Fa=Si(c.session_data,"&").feature);a.Id=1==Ft(a.Id?1:0,c.is_fling);a.ib=Gt(a.ib,c.ctrl);a.rb=Gt(a.rb,c.ytr);a.to="1"==c.skip_kansas_logging;a.Eb=Gt(a.Eb,c.cl);a.Bl=Kt(a.Bl,c.vq);a.ti=Kt(a.ti,c.suggestedQuality);a.ka=c.approx_threed_layout||0;a.Tr="1"==c.threed_converted;a.startSeconds=Ft(a.startSeconds,c.start||c.startSeconds);a.Rn=Dt(a.Rn,c.ssrt);a.videoId=c.docid||c.video_id||c.videoId||a.videoId;a.Qn=Gt(a.Qn,
c.vss_credentials_token);a.ek=Gt(a.ek,c.vss_credentials_token_type);lv(a,c.watermark);a.Bo=Gt(a.Bo,c.ypc_gid);a.Co=Gt(a.Co,c.ypc_license_session_token);a.heartbeatToken=Gt(a.heartbeatToken,c.heartbeat_token);a.Fd=Ft(a.Fd,c.heartbeat_interval);a.Gd=Ft(a.Gd,c.heartbeat_retries);if(c.ad3_module||c.ad_module)"1"==c.allow_html5_ads?(a.pm=!0,"1"==c.ad_preroll&&a.G.push("ad")):"1"!=c.supported_without_ads&&(a.zo=!0);c.adaptive_fmts&&(a.adaptiveFormats=c.adaptive_fmts);void 0!=c.atc&&(a.Z=c.atc);c.license_info&&
(a.Uq=mv(c.license_info));c.allow_embed&&(a.Bp="1"==c.allow_embed);c.autonav&&(a.Sn="1"==c.autonav);c.autoplay&&(a.og="1"==c.autoplay);c.iv_load_policy&&(a.pa=nv(c.iv_load_policy,a.pa));c.cc_load_policy&&(a.Iq=nv(c.cc_load_policy,2));"0"==c.dash&&(a.Tq=!0);c.dashmpd&&(a.M=ie(c.dashmpd,{cpn:a.Ba}),d=/\/s\/([0-9A-F.]+)/,e=d.exec(a.M))&&(e=fr(e[1]),a.M=a.M.replace(d,"/signature/"+e));c.delay&&(a.je=Wa(c.delay));void 0!=c.end&&(a.clipEnd=c.end);c.fresca_preroll&&a.G.push("fresca");c.idpj&&(a.Sh=Wa(c.idpj));
c.url_encoded_fmt_stream_map&&(a.se=c.url_encoded_fmt_stream_map);c.hlsvp&&(a.S=c.hlsvp);c.length_seconds&&(a.lengthSeconds=Wa(c.length_seconds));c.ldpj&&(a.dk=Wa(c.ldpj));c.loudness&&(a.perceptualLoudnessDb=c.loudness,a.Ap=ov(a));c.partnerid&&(a.P=Wa(c.partnerid));c.probe_url&&(a.probeUrl=vf(ie(c.probe_url,{cpn:a.Ba})));c.pyv_billable_url&&-1!=c.pyv_billable_url.search(Te)&&(a.ea=c.pyv_billable_url);c.pyv_conv_url&&-1!=c.pyv_conv_url.search(Te)&&(a.ha=c.pyv_conv_url);c.video_masthead_ad_quartile_urls&&
(d=c.video_masthead_ad_quartile_urls,a.Aa=d.quartile_0_url,a.$e=d.quartile_25_url,a.bf=d.quartile_50_url,a.af=d.quartile_75_url,a.Hd=d.quartile_100_url);c.spacecast_address&&(a.G.push("spacecast"),a.Ia=c.spacecast_address);void 0==c.start||"1"==c.resume||a.$a||(a.clipStart=c.start);c.threed_module&&!c.threed_converted&&(a.ma=c.threed_module,a.Yw=6);c.two_stage_token&&(a.Vh=c.two_stage_token);c.url_encoded_third_party_media&&(a.ne=kv(c.url_encoded_third_party_media));c.watch_ajax_token&&(a.Nr=c.watch_ajax_token);
c.ypc_module&&a.G.push("ypc");c.ypc_clickwrap_module&&a.G.push("ypc_clickwrap");a.qo=Gt(a.qo,c.ucid);C("baseUrl uid oeid ieid ppe engaged subscribed".split(" "),function(a){c[a]&&(this.A[a]=c[a])},a);a.A.focEnabled=Dt(a.A.focEnabled,c.focEnabled);a.A.rmktEnabled=Dt(a.A.rmktEnabled,c.rmktEnabled);a.o=c;iv(a,c);pv(a)}function pv(a){(a.$a||a.fm)&&"1"==a.o.as3fb||!$u()||a.Tq||(a.adaptiveFormats?a.k=Gs(qv(a,a.adaptiveFormats),a.Uq):a.M&&(a.Ef=!0,a.ia=!0))}
f.mz=function(a){this.$()||(this.k=a,Tt("mrc"),this.k&&(this.lengthSeconds=this.k.duration||Ls(this.k)||this.lengthSeconds),this.am())};f.am=function(){this.$()||(this.Ef=!1,this.ta&&!rv(this)?this.publish("dataloaderror",new hu("fmt.noneavailable",!0)):this.publish("dataloaded",this.o))};
function sv(a){if(!a.$()){a.j=null;a.O=null;a.I=null;if(a.U){var b=qv(a,a.U);a.I=cv(b,!1);a.j=new Xs(D(a.I,function(a){return a.getInfo()}))}!a.j&&a.k&&(a.j=fv(a.k));if(!a.j){if(a.ne&&a.zp)a.I=dv(a.ne);else{b=qv(a,a.se);if(a.S){var c=Ct(a.S,a.Ba,!a.nm);b.push(c)}a.I=cv(b,!!a.ma||a.lh)}a.I.length&&(a.j=new Xs(D(a.I,function(a){return a.getInfo()})))}a.wp=Math.min(.8*a.lengthSeconds,180)}}function tv(a){return a.g&&a.g.A||null}f.zc=function(a){return w(this.keywords[a])?this.keywords[a]:null};
function uv(a){a.Wj||(a.o.storyboard_spec?a.Wj=new dt(a.o.storyboard_spec,Wa(a.o.length_seconds)):a.o.live_storyboard_spec&&a.k&&(a.Wj=new ht(a.o.live_storyboard_spec,a.k)));return a.Wj}function vv(a){var b=uv(a);!a.bk&&b&&(a.bk=new nu(b),S(a,a.bk));return a.bk}function wv(a){return a.k&&!isNaN(Ms(a.k))?Ms(a.k):0}function xv(a){return!a.$()&&!(!a.videoId&&!a.ne)}function rv(a){return xv(a)&&!a.Ef&&!a.ia&&(!!(a.k||a.se||a.ne||a.U||a.S)||lb(a.G,"fresca")||lb(a.G,"ypc"))}
function yv(a,b,c){a.$()||(a.Kd=b,a.ta=!!c,a.Ef=!0,a.At())}f.At=function(){fj(this.Kd,{format:"RAW",method:"GET",context:this,Ma:this.MF,onError:this.Yt});Tt("vir")};function zv(a,b){if(30==a.P){var c=a.Ka["default.jpg"];return c?c:a.videoId?ie("//docs.google.com/vt",{id:a.videoId,authuser:a.Xa,authkey:a.xc}):"//docs.google.com/images/doclist/cleardot.gif"}b||(b="hqdefault.jpg");return(c=a.Ka[b])||"sddefault.jpg"==b||"maxresdefault.jpg"==b?c:Mt(a.videoId,b)}
f.MF=function(a){if(!this.$()){var b=a.responseText;b?(this.Ef=!1,a=Ui(b),"fail"==a.status?this.publish("onStatusFail",a):(Tt("virc"),hv(this,a),this.am())):this.Yt(a)}};f.Yt=function(a){if(!this.$()){var b="manifest.net",c=!0,d="rc."+a.status;this.ta&&(this.Jd?b="manifest.net.retryexhausted":(this.Jd=!0,c=!1,b=a.status?"manifest.net.badstatus":"manifest.net.connect",this.Bt.start()));this.publish("dataloaderror",new hu(b,c,d))}};
function ov(a){return a.perceptualLoudnessDb?(a=Math.min(gv.o-a.perceptualLoudnessDb,0),Math.pow(10,a/20)):gv.g}function nv(a,b){var c=parseInt(a,10);return Xb(jt,c)?c:b}function kv(a){a=a.split(",");return a=a.map(function(a){return Ui(a)})}function qv(a,b){var c=kv(b);C(c,function(a){a.url&&(a.url=ie(a.url,{cpn:this.Ba}))},a);return c}function jv(a){var b={};C(a.split(","),function(a){var d=a.split("=");2==d.length?b[d[0]]=d[1]:b[a]=!0});return b}
function lv(a,b){if(b){var c=b.split(",");2<=c.length&&(a.W=c[1],sf(a.W)&&-1==a.W.search(gv.C)||(a.W=""))}}function mv(a){a=kv(a);var b={};C(a,function(a){var d=a.family;a=a.url;d&&a&&(b[d]=a)});return b}function Av(a,b){return!!a.o[b]}function Bv(a){return a.$a&&!a.wb}function Cv(a){return a.$a&&a.wb};function Dv(a,b){this.type=a||"";this.id=b||""}function Ev(a){return new Dv(a.substr(0,2),a.substr(2))}Dv.prototype.toString=function(){return this.type+this.id};function Fv(a){T.call(this);this.views=0;this.g=[];this.j=[];this.Na=Math.max(0,a.index||0);this.Rf=!!a.loop;this.startSeconds=a.startSeconds||0;this.sr="1"==a.mob;this.title=a.playlist_title||"";this.description=a.playlist_description||"";this.author=a.author||"";a.video_id&&(this.g[this.Na]=a);a.api&&("string"==typeof a.api&&16==a.api.length?a.list="PL"+a.api:a.playlist=a.api);if(a.list)switch(a.listType){case "user_uploads":Gv(this,a.list);break;case "user_favorites":Hv(this,a.list);break;case "search":Iv(this,
a.list);break;default:a.playlist_length&&(this.uc=a.playlist_length),this.k=Ev(a.list),0==a.fetch&&a.videoList?Jv(this,a.videoList):Kv(this)}else if(a.playlist){var b=a.playlist.toString().split(",");0<this.Na&&(this.g=[]);C(b,function(a){a&&this.g.push({video_id:a})},this);this.uc=this.g.length;b=D(this.g,function(a){return a.video_id});Lv(this,"/list_ajax?style=json&action_get_templist=1",{video_ids:b.join(",")});this.Xd=!0}else a.videoList&&Jv(this,a.videoList);Mv(this,!!a.shuffle);a.suggestedQuality&&
(this.quality=a.suggestedQuality)}z(Fv,T);f=Fv.prototype;f.Rf=!1;f.startSeconds=0;f.ws=!1;f.Na=0;f.title="";f.uc=0;f.sr=!1;f.Xd=!1;f.Eh=!1;f.Le=null;function Nv(a){return a.Rf||a.Na+1<a.uc}function Ov(a){var b=a.Na+1;b>=a.uc&&(b=a.Rf?0:-1);return b}function Pv(a){var b=Ov(a);if(-1==b)return null;Qv(a,b);return Rv(a,b)}function Sv(a){if(0>--a.Na)if(a.Rf)a.Na=a.uc-1;else return null;Qv(a,a.Na);return Rv(a,a.Na)}
function Rv(a,b){var c=void 0!=b?b:a.Na,c=a.g&&c in a.g?a.g[a.j[c]]:null,d=null;c&&(d=new gv(c),d.startSeconds=a.startSeconds||d.clipStart||0,a.k&&(d.playlistId=a.k.toString()));return d}function Mv(a,b){a.ws=b;var c=a.j&&null!=a.j[a.Na]?a.j[a.Na]:a.Na;a.j=[];for(var d=0;d<a.g.length;d++)a.j.push(d);a.Na=c;if(a.ws){c=a.j[a.Na];for(d=1;d<a.j.length;d++){var e=Math.floor(Math.random()*(d+1)),g=a.j[d];a.j[d]=a.j[e];a.j[e]=g}for(d=0;d<a.j.length;d++)a.j[d]==c&&(a.Na=d)}a.publish("shuffle")}
function Qv(a,b){a.Na=Ib(b,0,a.uc-1);a.startSeconds=0}function Gv(a,b){a.Eh||(a.k=new Dv("UU","PLAYER_"+b),Lv(a,"/list_ajax?style=json&action_get_user_uploads_by_user=1",{username:b}))}function Hv(a,b){a.Eh||(a.k=new Dv("FL","PLAYER_"+b),Lv(a,"/list_ajax?style=json&action_get_favorited_by_user=1",{username:b}))}function Iv(a,b){if(!a.Eh){a.k=new Dv("SR",b);var c={search_query:b};a.sr&&(c.mob="1");Lv(a,"/search_ajax?style=json&embeddable=1",c)}}
function Kv(a){if(!a.Eh){var b={list:a.k},c=Rv(a);c&&c.videoId&&(b.v=c.videoId);Lv(a,"/list_ajax?style=json&action_get_list=1",b)}}function Lv(a,b,c){fj(ie(b,c),{format:"JSON",Ma:function(a,b){Tv(this,b)},context:a})}function Tv(a,b){if(b.video&&b.video.length){a.title=b.title;a.description=b.description;a.views=b.views;a.author=b.author;var c=Rv(a);a.g=[];C(b.video,function(a){a&&(a.video_id=a.encrypted_id,this.g.push(a))},a);a.uc=a.g.length;Uv(a,c);Mv(a,!1);a.Eh=!1;a.Xd=!0;a.Le&&a.Le()}}
function Jv(a,b){0<a.Na&&(a.g=[]);C(b,function(a){this.g.push(a)},a);a.uc=a.g.length;a.Xd=!0}function Uv(a,b){if(b){var c=b.videoId;if(!a.g[a.Na]||a.g[a.Na].video_id!=c)for(var d=0;d<a.g.length;d++)if(a.g[d].video_id==c){a.Na=d;break}}}f.K=function(){this.Le=null;ai(this.g);Fv.H.K.call(this)};function Vv(){var a={volume:100,muted:!1},b=Gi("yt-player-volume")||{};a.volume=isNaN(b.volume)?100:Ib(b.volume,0,100);a.muted=void 0==b.muted?!1:b.muted;return a}function Wv(a){Ei("yt-player-bandwidth",a,2592E3)};function Xv(a,b,c){w(a)&&(a={mediaContentUrl:a,startSeconds:b,suggestedQuality:c});b=a;c=/\/([ve]|embed)\/([^#?]+)/.exec(a.mediaContentUrl);b.videoId=c&&c[2]?c[2]:null;return Yv(a)}function Yv(a,b,c){if(ja(a)){b="endSeconds startSeconds mediaContentUrl suggestedQuality videoId two_stage_token".split(" ");c={};for(var d=0;d<b.length;d++){var e=b[d];a[e]&&(c[e]=a[e])}return c}return{videoId:a,startSeconds:b,suggestedQuality:c}};function Zv(a,b){Q.call(this);this.app=a;this.Wd=null;this.kf={};this.Vg={};this.k={};this.j={};this.g=null;this.playerType=b;V(this,"cueVideoById",this.iA);V(this,"loadVideoById",this.Am);V(this,"cueVideoByUrl",this.jA);V(this,"loadVideoByUrl",this.zA);V(this,"playVideo",this.rj);V(this,"pauseVideo",this.pauseVideo);V(this,"stopVideo",this.Uk);V(this,"clearVideo",this.gA);V(this,"getVideoBytesLoaded",this.tA);V(this,"getVideoBytesTotal",this.uA);V(this,"getVideoLoadedFraction",this.Dm);V(this,"getVideoStartBytes",
this.wA);V(this,"cuePlaylist",this.hA);V(this,"loadPlaylist",this.kr);V(this,"nextVideo",this.lr);V(this,"previousVideo",this.mr);V(this,"playVideoAt",this.Cm);V(this,"setShuffle",this.HA);V(this,"setLoop",this.EA);V(this,"getPlaylist",this.Vc);V(this,"getPlaylistIndex",this.gr);V(this,"getPlaylistId",this.jr);V(this,"loadModule",this.Oq);V(this,"unloadModule",this.Qq);V(this,"setOption",this.Pq);V(this,"getOption",this.ri);V(this,"getOptions",this.pA);V(this,"mute",this.dq);V(this,"unMute",this.fq);
V(this,"isMuted",this.cq);V(this,"setVolume",this.setVolume);V(this,"getVolume",this.bq);V(this,"seekTo",this.Of);V(this,"getPlayerState",this.getPlayerState);V(this,"getPlaybackRate",this.rA);V(this,"setPlaybackRate",this.GA);V(this,"getAvailablePlaybackRates",this.lA);V(this,"getPlaybackQuality",this.qA);V(this,"setPlaybackQuality",this.dr);V(this,"getAvailableQualityLevels",this.mA);V(this,"getCurrentTime",this.getCurrentTime);V(this,"getDuration",this.Pg);V(this,"addEventListener",this.addEventListener);
V(this,"removeEventListener",this.removeEventListener);V(this,"getVideoUrl",this.getVideoUrl);V(this,"getDebugText",this.nA);V(this,"getVideoEmbedCode",this.vA);V(this,"getVideoData",this.getVideoData);V(this,"addCueRange",this.ir);V(this,"removeCueRange",this.AA);V(this,"setSize",this.IA);V(this,"getApiInterface",this.kA);V(this,"destroy",this.destroy);V(this,"showVideoInfo",this.JA);V(this,"hideVideoInfo",this.xA);$v(this,"getInternalApiInterface",this.oA);$v(this,"getAdState",this.getAdState);
$v(this,"isNotServable",this.yA);$v(this,"getUpdatedConfigurationData",this.sA);$v(this,"updateRemoteReceivers",this.KA);$v(this,"sendAbandonmentPing",this.BA);$v(this,"setAutonav",this.CA);$v(this,"setAutonavState",this.DA);$v(this,"setMinimized",this.FA);$v(this,"channelSubscribed",u);$v(this,"channelUnsubscribed",u)}z(Zv,Q);function V(a,b,c){a.kf[b]=x(c,a)}function $v(a,b,c){a.Vg[b]=x(c,a)}f=Zv.prototype;f.kA=function(){return Vb(this.kf)};f.oA=function(){return Vb(this.Vg)};f.L=function(){return this.Wd};
f.addEventListener=function(a,b){if(w(b)){var c=function(){s(b).apply(window,arguments)};this.k[b]=c;this.app.subscribe(a,c)}else this.app.subscribe(a,b)};f.kw=function(a,b){var c=w(b)?a+b:a+ka(b);if(!this.j[c]){var d;w(b)?d=function(){s(b).apply(window,arguments)}:d=b;var e=x(function(a){d({target:this.g,data:a})},this);this.j[c]=e;this.addEventListener(a,e)}};f.removeEventListener=function(a,b){if(w(b)){var c=this.k[b];dc(this.k,b);this.app.unsubscribe(a,c)}else this.app.unsubscribe(a,b)};
f.lw=function(a,b){var c=w(b)?a+b:a+ka(b),d=this.j[c];d&&(this.removeEventListener(a,d),dc(this.j,c))};f.getPlayerState=function(){return this.app.na};f.Of=function(a,b){aw(this.app,!0,this.playerType);bw(this.app,a,b,void 0,this.playerType)};f.getCurrentTime=function(){return this.app.getCurrentTime(this.playerType)};f.Pg=function(){return cw(this.app,1)};f.bq=function(){return dw(this.app)};f.setVolume=function(a){this.app.setVolume(a)};f.cq=function(){return this.app.F.muted};f.dq=function(){ew(this.app)};
f.fq=function(){fw(this.app)};f.rj=function(){aw(this.app,!0,this.playerType);gw(this.app,this.playerType)};f.pauseVideo=function(){hw(this.app,this.playerType)};f.Uk=function(){var a=this.app,b=this.playerType;iw(a.g)&&jw(a,!1);kw(a,"play_pause")||lw(a,b)};f.gA=function(){};f.rA=function(){return this.app.ea};f.GA=function(a){mw(this.app,a)};f.lA=function(){return this.app.g.N?Lt:[1]};f.qA=function(){return nw(this.app,this.playerType)};
f.dr=function(a){var b=this.app,c=ow(b,this.playerType);c&&(b=b.g.J,"mobile"!=b&&"tablet"!=b&&(a=Qs(a,a,!0),pw(c,"p",a)))};f.mA=function(){var a=ow(this.app,this.playerType);return a?qw(a):[]};f.tA=function(){return this.Dm()};f.uA=function(){return 1};f.Dm=function(){return rw(this.app.Z)};f.wA=function(){return 0};f.IA=function(){this.app.j.lj()};f.CA=function(a){var b=this.app;b.getVideoData().Mi=a;b.Za("autonavchange",a)};f.DA=function(){};f.FA=function(a){this.app.g.Qr=a};
f.Oq=function(a){this.app.C.isAvailable(a)&&(a=sw(this.app.C,a))&&!a.loaded&&a.load()};f.Qq=function(a){this.app.C.isAvailable(a)&&(a=sw(this.app.C,a))&&a.loaded&&a.unload()};f.Am=function(a,b,c){a=tw(this.app,Yv(a,b,c),this.playerType);aw(this.app,a,this.playerType)};f.iA=function(a,b,c){uw(this.app,Yv(a,b,c),this.playerType)};f.zA=function(a,b,c){a=Xv(a,b,c);b=tw(this.app,a,this.playerType);aw(this.app,b,this.playerType);b=this.app;(a=Ce(new J(a.mediaContentUrl)))&&vw(b.g,a)};
f.jA=function(a,b,c){b=Xv(a,b,c);uw(this.app,b,this.playerType);a=this.app;(b=Ce(new J(b.mediaContentUrl)))&&vw(a.g,b)};f.getVideoUrl=function(){return ww(this.app)};f.nA=function(){return xw(this.app)};f.vA=function(){return""};f.ir=function(a,b,c){return yw(this.app,a,b,c)};f.AA=function(a){t:{for(var b=this.app,c=b.k.C.k||[],d=0;d<c.length;d++){var e=c[d];if(e.getId()==a){e.Ra.clear();b.k.C.Ig(e);b.publish("cuerangesremoved",[e]);a=!0;break t}}a=!1}return a};
f.kr=function(a,b,c,d){var e=this.app;e.S=!1;zw(e,a,b,c,d);aw(this.app,!0,this.playerType)};f.hA=function(a,b,c,d){var e=this.app;e.S=!0;zw(e,a,b,c,d)};f.lr=function(){Aw(this.app);aw(this.app,!0,this.playerType)};f.mr=function(){Bw(this.app);aw(this.app,!0,this.playerType)};f.Cm=function(a){Cw(this.app,a);aw(this.app,!0,this.playerType)};f.HA=function(a){var b=this.app;b.o&&Mv(b.o,a)};f.EA=function(a){var b=this.app;b.o&&(b.o.Rf=a)};
f.Vc=function(){var a=this.app.o;if(!a)return null;for(var b=[],c=0;c<a.uc;c++){var d=Rv(a,c);d&&b.push(d.videoId)}return b};f.gr=function(){var a;a=this.app;a=a.o?a.o.Na:null;return null==a?-1:a};f.jr=function(){return Dw(this.app)};f.Pq=function(a,b,c){return Ew(this.app,a,b,c)};f.ri=function(a,b,c){return Ew(this.app,a,b,c)};f.pA=function(a){var b;b=this.app;a?b=b.D&&a==b.D.va?b.D.Sj():Fw(b.C,a):(a=Fw(b.C),b.D&&a.push(b.D.va),b=a);return b};
f.getVideoData=function(){var a=ow(this.app,this.playerType),a=a?a.getVideoData():{},a={video_id:a.videoId,author:a.author,title:a.title},b=this.jr();b&&(a.list=b);return a};f.JA=function(){Gw(this.app.j)};f.xA=function(){this.app.j.Yl()};f.getAdState=function(){return this.app.getAdState()};f.yA=function(){var a=this.app.getPlayerState();return!(!a||!W(a,128)||5!=Hw[a.g.errorCode])};
f.sA=function(){var a=this.app,b=a.P.clone(),c=b.args,a=Iw(a),d=fc(a.o);!a.$a&&0<a.startSeconds&&(d.start=a.startSeconds);qa(c,d);return b};f.KA=function(a,b){var c=this.app;c.M&&Jw(c.M,a,b);Kw(c.g)&&6!=c.G&&(c.g.Qg=!mb(a),c.g.Qg?(1!=c.G&&3!=c.G||!b||Lw(c.D),a.length&&1!=c.G&&Mw(c)):Lw(c.M))};f.destroy=function(){this.app.dispose()};f.BA=function(){var a=ow(this.app);a&&!W(a.getPlayerState(),128)&&(Nw(a),Ow(a))};
f.K=function(){if(this.Wd){for(var a in this.kf)this.Wd[a]=null;for(a in this.Vg)this.Wd[a]=null;this.Wd=null}this.k=this.j=null;Zv.H.K.call(this)};function Pw(a,b){Zv.call(this,a,b);V(this,"addInfoCardXml",this.xF);V(this,"cueVideoByPlayerVars",this.yF);V(this,"loadVideoByPlayerVars",this.Mp);V(this,"preloadVideoByPlayerVars",this.DF);V(this,"seekBy",this.au);V(this,"enableLicenseIntercept",this.zF);V(this,"updatePlaylist",this.IF);V(this,"resumeLicenseSession",this.EF);V(this,"updateLastActiveTime",this.HF);V(this,"updateVideoData",this.JF);V(this,"getStoryboardFormat",this.BF);V(this,"getProgressState",this.Lg);V(this,"hideUserInterface",
this.CF);V(this,"showUserInterface",this.GF);V(this,"getHousebrandProperties",this.AF);V(this,"setPlaybackQualityRange",this.FF);V(this,"getCurrentPlaylistSequence",this.wF);V(this,"canPlayType",this.canPlayType)}z(Pw,Zv);f=Pw.prototype;f.ir=function(a,b,c,d,e){return yw(this.app,a,b,c,d,e)};f.xF=function(a,b){var c=this.app;c.g.wa=a;c.g.$e=b};f.yF=function(a){uw(this.app,a,this.playerType)};f.getPlayerState=function(a){var b=this.app;return 2==a?b.Aa:b.na};f.Mp=function(a){tw(this.app,a,this.playerType)};
f.DF=function(a){var b=this.app,c=this.playerType;c&&1!=c||b.J&&b.J.getVideoData().videoId==a.videoId||(a=new gv(a),Qw(b,a))};f.rj=function(){gw(this.app,this.playerType)};f.Of=function(a,b){bw(this.app,a,b,void 0,this.playerType)};f.kr=function(a,b,c,d){var e=this.app;e.S=!1;zw(e,a,b,c,d)};f.lr=function(){Aw(this.app)};f.mr=function(){Bw(this.app)};f.Cm=function(a){Cw(this.app,a)};f.au=function(a,b,c){var d=this.app,e=this.playerType;bw(d,d.getCurrentTime()+a,b,c,e)};
f.zF=function(){var a=this.app;a.Ka||(a.Ka=!0,a.pa={})};f.IF=function(){var a=this.app;Rw(a);a.Za("onPlaylistUpdate")};f.EF=function(a,b){var c=this.app,d=c.pa[a];d&&(Sw(d,b),d.start(),delete c.pa[a])};f.HF=function(){Tw()};f.JF=function(a){var b=ow(this.app,this.playerType||1);b&&(b=b.g,iv(b,a),b.publish("dataupdated"))};f.BF=function(){var a=this.app.getVideoData();return a.o.storyboard_spec||a.o.live_storyboard_spec};f.CF=function(){this.app.j.oh(!1)};f.GF=function(){this.app.j.oh(!0)};
f.AF=function(){var a=this.app.R();return{Yb:a.Yb,Fb:a.Fb(),kc:a.kc}};f.getVideoData=function(){var a=Pw.H.getVideoData.call(this),b=ow(this.app,this.playerType),b=b?b.getVideoData():{};a.cpn=b.Ba;a.isLive=b.$a;return a};f.getCurrentTime=function(a){return a?this.app.getCurrentTime(a):Pw.H.getCurrentTime.call(this)};f.Pg=function(a){return a?cw(this.app,a):Pw.H.Pg.call(this)};
f.Lg=function(){var a=this.app.getVideoData(),b=a.$a&&!a.wb?this.getCurrentTime():a.k&&!isNaN(Ls(a.k))?Ls(a.k):a.lengthSeconds,c=!a.$a||a.wb,d=a.clipEnd,e=a.clipStart,g=this.getCurrentTime(),h=this.Pg(),k;k=(k=ow(this.app,void 0))?Uw(k.j):0;return{allowSeeking:c,clipEnd:d,clipStart:e,current:g,displayedStart:-1,duration:h,loaded:k,seekableEnd:b,seekableStart:wv(a)}};f.Dm=function(a){var b=this.app;return(b.B&&2==b.B.getPlayerType())==(2==a)?rw(b.Z):0};f.canPlayType=function(a){return this.app.canPlayType(a)};
f.FF=function(a,b){Vw(this.app,a,this.playerType,b)};f.wF=function(){var a;var b=this.app.getVideoData();a=this.app.getCurrentTime();if(b.k&&b.$a){var c=b.k.g[b.g.id];c&&c.index?(b=c.index.Ch(a),c=c.index.If(b),a={sequence:b,elapsed:a-c}):a=null}else a=null;return a};function Ww(a,b){Pw.call(this,a,b)}z(Ww,Pw);f=Ww.prototype;f.getPlayerType=function(){return this.playerType};f.Am=function(a,b,c){tw(this.app,Yv(a,b,c),this.playerType)};f.rj=function(){gw(this.app,this.playerType)};f.Of=function(a,b){bw(this.app,a,b,void 0,this.playerType)};function Xw(a,b){a.app.j.k.appendChild(b)}f.Qa=function(){return this.app.j.element};f.R=function(){return this.app.R()};f.Vc=function(){return this.app.o};
f.getVideoData=function(){var a=ow(this.app,this.playerType);return a&&a.getVideoData()};f.isFullscreen=function(){return this.app.R().Ya};f.addEventListener=function(a,b,c){this.app.subscribe(a,b,c)};f.removeEventListener=function(a,b,c){this.app.unsubscribe(a,b,c)};function Yw(a,b){this.start=a;this.end=b;this.g=ka(this)}function Zw(a,b){return a.start!=b.start?a.start-b.start:a.end!=b.end?a.end-b.end:a.g!=b.g?a.g-b.g:0}Yw.prototype.contains=function(a,b){return a>=this.start&&(a<this.end||a==this.end&&this.start==this.end)&&(null==b||a<b&&b<=this.end)};Yw.prototype.toString=function(){return"Interval["+this.start+", "+this.end+"]"};function $w(){this.g=[]}function ax(a,b){for(var c=[],d=0;d<a.g.length;++d){var e=a.g[d];e.contains(b)&&c.push(e);if(e.start>b)break}return c}function bx(a,b,c){for(var d=[],e=0;e<a.g.length;++e){var g=a.g[e];if(null!=c&&g.start>c)break;g.start>b&&d.push(g)}return d}function cx(a,b){for(var c=[],d=0;d<a.g.length;++d){var e=a.g[d];e.contains(b)&&c.push(e.end);if(e.start>b){c.push(e.start);break}}c.sort(zb);return c[0]};function dx(a){var b="";if(a)for(var c=0;c<a.length;c++)b+=a.start(c).toFixed(3)+"-"+a.end(c).toFixed(3)+",";return b}function ex(a,b){if(!a)return-1;for(var c=0;c<a.length;c++)if(a.start(c)<=b&&a.end(c)>=b)return c;return-1}function fx(a,b){var c=ex(a,b);return 0<=c?a.end(c):NaN}function gx(a){return a&&a.length?a.end(a.length-1):NaN}function hx(a,b){var c=fx(a,b);return 0<=c?c-b:0};function ix(){}var jx=au&&4>$t?.1:0,kx=new ix;f=ix.prototype;f.rd=null;f.Xl=!1;function lx(a,b){var c="";b&&(a.rd=b,c=Nu(b));a.src&&""==c||(c&&a.src!=c&&(a.src=c),b&&b.g||a.load())}function mx(a,b){0<a.readyState&&(a.currentTime=Math.max(jx,b))}f.getCurrentTime=function(){return this.currentTime||0};function Uw(a){return 0<gx(a.buffered)&&a.duration?fx(a.buffered,a.currentTime):0}function rw(a){var b=a.duration||0;return Infinity==b?1:b?Uw(a)/b:0}function nx(a){return a.paused||a.ended}
function ox(a){a.ended&&mx(a,0);!a.hasAttribute("src")&&a.rd&&(a.src=Nu(a.rd),a.rd.g||a.load());a.play();au&&7<=$t&&bh(a,x(function(){L(x(this.Us,this,this.currentTime,0),500)},a))}f.Us=function(a,b){this.paused||this.currentTime>a||10<b||(this.play(),L(x(this.Us,this,this.currentTime,b+1),500))};f.pauseVideo=function(){this.pause()};function px(a){a.currentSrc&&(qt&&mx(a,0),jd(a),a.removeAttribute("src"),a.load(),a.rd&&a.rd.g&&(a.rd=null))}function qx(a){px(a);a.rd=null}
f.setVolume=function(a,b){this.volume=a/100;this.muted=b};function rx(a,b){a.defaultPlaybackRate=b;a.playbackRate=b}f.CE=function(){this.hasAttribute("controls")&&this.setAttribute("controls","true")};f.DE=function(){this.Xl&&!this.muted&&(this.muted=!0)};
ix.prototype.getDebugInfo=function(){return{vct:this.currentTime.toFixed(3),vd:this.duration.toFixed(3),vpl:dx(this.played),vbu:dx(this.buffered),vpa:this.paused,vsk:this.seeking,vpr:this.playbackRate,vrs:this.readyState,vns:this.networkState,vec:this.error?this.error.errorCode:null}};function sx(a,b){this.j=a||64;this.g=b||null}
function tx(a,b,c,d){if(W(a,128))return a;var e=a.j,g=a.g,h=b.target;switch(b.type){case "ended":if(0>=h.networkState||!h.src)break;e=14;g=null;break;case "pause":W(a,256)?e^=256:W(a,32)||W(a,2)||(e=4,W(a,1)&&W(a,8)&&(e|=1),g=null);break;case "playing":e=8;d&&W(a,1)&&(e|=1);g=null;break;case "abort":if(64==e)break;case "error":t:if((b=h.error)&&b.code){switch(b.code){case b.MEDIA_ERR_NETWORK:b="progressive.net";break;case b.MEDIA_ERR_DECODE:b="fmt.decode";break;case b.MEDIA_ERR_SRC_NOT_SUPPORTED:b=
"fmt.unplayable";break;default:b=null;break t}b={errorCode:b}}else b=null;b&&(g=b,e|=128);break;case "canplay":e&=-2;break;case "progress":W(a,8)&&ux(c,h)&&(e|=1);break;case "seeked":e&=-17;d||(e&=-2);break;case "seeking":e|=16;0>=hx(h.buffered,h.currentTime)&&(e|=1);e&=-3;break;case "waiting":W(a,2)||(e|=1);break;case "timeupdate":W(a,16)||(e=ux(c,h)?e|1:e&-2);1<h.readyState&&0<h.currentTime&&(e&=-65);break;default:return a}return vx(a,e,g)}
function ux(a,b){if(!a)return!1;var c=hx(b.buffered,b.currentTime);return wx(a,b.currentTime,y(),c)}function vx(a,b,c){return b==a.j&&c==a.g||b&128&&!c||b&2&&b&16?a:new sx(b,c)}function xx(a,b){return vx(a,a.j|b)}function yx(a,b){return vx(a,a.j&~b)}function W(a,b){return!!(a.j&b)}function zx(a){return W(a,128)?-1:W(a,2)?0:W(a,1)&&!W(a,32)?3:W(a,64)?-1:W(a,8)?1:W(a,4)?2:-1};function Ax(a,b,c){Yw.call(this,a,b);a=c||{};this.xa=a.id||"";void 0!=a.priority&&(this.Nh=a.priority);this.namespace=a.namespace||"";this.Ra=new bi;this.tooltip=a.tooltip;a.style&&(this.style=a.style);a.visible&&(this.visible=a.visible)}z(Ax,Yw);f=Ax.prototype;f.xa="";f.Nh=7;f.active=!0;f.visible=!1;f.style="ytp-ad-progress";f.Ra=null;f.namespace="";f.getId=function(){return this.xa};function Bx(a){switch(a.style){case "ytp-chapter-marker":return 8;case "ytp-ad-progress":return 6}}
function Cx(a,b){return a.start==b.start?a.Nh==b.Nh?0:a.Nh<b.Nh?-1:1:a.start<b.start?-1:1}f.toString=function(){return Ax.H.toString.call(this)};function Dx(a,b,c){T.call(this);this.D=a;this.C=b;this.F=c;this.A=new Dn(250);Nm(this.A,"tick",this.oc,!1,this);S(this,this.A);this.k=[];this.g=[];this.j=new $w}z(Dx,T);f=Dx.prototype;f.vi=!1;f.Dg=!1;f.lm=!1;f.km=!1;f.Jg=null;f.Li=function(a){this.oc();C(arguments,function(a){this.k.push(a);var c=this.j.g;!c.length||0<Zw(a,c[c.length-1])?c.push(a):Fb(c,a,Zw);this.publish("onAdd",a)},this);this.oc()};f.Ig=function(a){C(arguments,function(a){a=this.k.indexOf(a);0<=a&&Ex(this,a)},this);this.oc()};
function Ex(a,b){var c=a.k.splice(b,1)[0],d=a.j.g,e=yb(d,c,Zw);0<=e&&qb(d,e);b=a.g.indexOf(c);0<=b&&a.g.splice(b,1);a.publish("onRemove",c)}f.Mg=function(){this.o=Fx(this);this.Dg=!0;this.oc()};function Gx(a,b){var c=[];if(!b.length)return c;b.sort(Cx);for(var d=0;d<b.length;d++){var e=b[d];e.active&&-1==a.g.indexOf(e)&&(a.g.push(e),c.push(["onEnter",e]))}return c}
function Hx(a,b){var c=[];if(!b.length)return c;b.sort(Cx);for(var d=0;d<b.length;d++){var e=b[d],g=a.g.indexOf(e);0>g||(a.g.splice(g,1),c.push(["onExit",e]))}return c}
f.oc=function(){this.km=!0;if(!this.lm)for(var a=3;this.km&&a;){this.km=!1;this.lm=!0;if(this.Dg&&!this.vi){Ix(this);for(var b=Fx(this),c=[],d=[],e=0;e<this.g.length;e++){var g=this.g[e];g.active&&!g.contains(b)&&d.push(g)}c=c.concat(Hx(this,d));d=ax(this.j,b);e=this.C();!W(e,48)&&b>this.o&&(d=d.concat(bx(this.j,this.o,b)));c=c.concat(Gx(this,d));this.o=b;!this.vi&&this.B&&(c.unshift(["onLockBlockExit",this.B]),this.B=null,W(e,2)&&(this.o=2147483647));this.F()&&(b=cx(this.j,this.o),null!=b&&(this.Jg=
Fn(x(this.oc,this),b-this.o)));Jx(this,c)}this.lm=!1;a--}};function Jx(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d[1];"onLockBlockExit"==d[0]||"onLockBlockEnter"==d[0]?a.publish.apply(a,d):e.Ra.publish.apply(e.Ra,d)}}function Ix(a){null!=a.Jg&&(Gn(a.Jg),a.Jg=null)}function Fx(a){return W(a.C(),2)?2147483647:1E3*a.D()}f.K=function(){Vm(this.A,"tick",this.oc,!1,this);Ix(this);this.B=this.j=this.g=this.k=null;Dx.H.K.call(this)};function Kx(a){T.call(this);this.g=a;this.vn&&(a=Fj("yt-html5-player-modules::"+this.vn))&&(this.Z=new ti(a))}z(Kx,T);f=Kx.prototype;f.va="";f.nc="";f.Qd=!1;f.loaded=!1;f.Qi=!1;f.Ob=null;f.ye=function(a){var b=tb(arguments),c=x(this.Gc,this),d=x(this.ad,this);C(b,function(a){a.namespace=this.va;a.Ra.subscribe("onEnter",c);a.Ra.subscribe("onExit",d)},this);this.publish("command_add_cuerange",b,this.g.getPlayerType())};f.Wp=function(a){var b=tb(arguments);this.publish("command_remove_cuerange",b,this.g.getPlayerType())};
function Lx(a){a.publish("command_remove_cuerange_all",a.va,a.g.getPlayerType())}function Mx(a){a.publish("command_preroll_ready",a.va,a.g.getPlayerType())}function Nx(a,b){N(b,a.va);a.g.app.j.pa.appendChild(b)}function Ox(a,b){a.publish("command_show_dialog",b)}f.qg=function(){Ox(this)};f.create=function(){this.Qd||(this.Ha(this.g),N(this.g.Qa(),this.va+"-created"),this.Qd=!0)};f.destroy=function(){this.loaded&&this.unload();Dg(this.g.Qa(),this.va+"-created");this.Qd=!1};
f.load=function(){this.loaded=!0;N(this.g.Qa(),this.va+"-loaded");this.publish("loaded",this.va)};f.unload=function(){this.loaded=!1;Dg(this.g.Qa(),this.va+"-loaded");this.publish("unloaded",this.va)};f.Gc=function(){};f.ad=function(){};f.fe=function(){};function Px(a,b,c){a.publish("command_navigate_to_url",b,c)}f.log=function(a){this.publish("command_log",this.nc,a)};
function Qx(a,b,c){var d={},e;for(e in b)d[a.va+"_"+e]=b[e];b={};for(var g in c)b[a.va+"_"+g]=c[g];a.publish("command_log_timing",d,b)}f.mh=function(){return null};function Rx(a,b){if(!a.Z)return null;var c;try{c=a.Z.get(b)}catch(d){a.Z&&a.Z.remove(b)}return c}function Sx(a,b,c){if(a.Z)try{a.Z.set(b,c)}catch(d){}}function Tx(a,b){a.publish("command_disable_controls",b,a.va)}function Ux(a,b){a.publish("command_enable_controls",b,a.va)}function Vx(a){a.publish("command_stop_redirect_controls")}
function Wx(a){a.publish("command_play",!1,a.g.getPlayerType())}f.pauseVideo=function(){this.publish("command_pause",!1,this.g.getPlayerType())};function Xx(a,b){a.publish("command_redirected_show_is_playing",b)}function Yx(a){return a.g.app.j.j}function Zx(a,b,c){a.publish("module_menu_button_add",b,c)}function $x(a,b){a.publish("module_menu_button_remove",b)}function ay(a,b){a.publish("module_menu_item_add",b)}function by(a,b){a.publish("module_menu_item_remove",b)}
function cy(a){a.publish("module_menu_show")}f.Xj=function(){};f.Sj=function(){return[]};f.Ha=function(){return!1};f.Fm=function(){return!0};f.xj=function(a,b){this.Ob&&this.Ob.fe&&this.Ob.fe.apply(this.Ob,arguments)};f.jj=function(){};var dy={sH:"YTP_ERROR_ALREADY_PINNED_ON_A_DEVICE",wH:"ERROR_AUTHENTICATION_EXPIRED",xH:"ERROR_AUTHENTICATION_MALFORMED",yH:"ERROR_AUTHENTICATION_MISSING",zH:"ERROR_BAD_REQUEST",CH:"YTP_ERROR_CANNOT_ACTIVATE_RENTAL",KH:"ERROR_CGI_PARAMS_MALFORMED",LH:"ERROR_CGI_PARAMS_MISSING",TH:"YTP_DEVICE_FALLBACK",ZH:"YTP_ERROR_LICENSE",bI:"YTP_HTML5_NO_AVAILABLE_FORMATS_FALLBACK_FLASH",cI:"YTP_ERROR_GEO_FAILURE",sI:"YTP_ERROR_GENERIC",tI:"YTP_HTML5_NO_AVAILABLE_FORMATS_FALLBACK",zI:"YTP_ERROR_INVALID_DRM_MESSAGE",
DI:"LEARN_MORE",cJ:"YTP_ERROR_NOT_SIGNED_IN",tJ:"YTP_ERROR_PURCHASE_NOT_FOUND",uJ:"YTP_ERROR_PURCHASE_REFUNDED",xJ:"YTP_ERROR_RENTAL_EXPIRED",EH:"YTP_ERROR_CAST_SESSION_DEVICE_MISMATCHED",FH:"YTP_ERROR_CAST_SESSION_VIDEO_MISMATCHED",HH:"YTP_ERROR_CAST_TOKEN_FAILED",GH:"YTP_ERROR_CAST_TOKEN_EXPIRED",IH:"YTP_ERROR_CAST_TOKEN_MALFORMED",IJ:"YTP_ERROR_SERVER_ERROR",TJ:"YTP_ERROR_STOPPED_BY_ANOTHER_PLAYBACK",VJ:"YTP_ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",WJ:"YTP_ERROR_STREAMING_NOT_ALLOWED",XJ:"YTP_ERROR_STREAMING_UNAVAILABLE",
AJ:"YTP_ERROR_RETRYABLE_ERROR",gK:"YTP_ERROR_TOO_MANY_STREAMS_PER_USER",fK:"YTP_ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",nK:"YTP_ERROR_UNSUPPORTED_DEVICE",oK:"YTP_ERROR_UNUSUAL_ACTIVITY",xK:"YTP_ERROR_VIDEO_FORBIDDEN",zK:"YTP_ERROR_VIDEO_NOT_FOUND"},ey={300:"YTP_ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",301:"YTP_ERROR_ALREADY_PINNED_ON_A_DEVICE",303:"YTP_ERROR_STOPPED_BY_ANOTHER_PLAYBACK",304:"YTP_ERROR_TOO_MANY_STREAMS_PER_USER",305:"YTP_ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",400:"YTP_ERROR_VIDEO_NOT_FOUND",
401:"YTP_ERROR_GEO_FAILURE",402:"YTP_ERROR_STREAMING_NOT_ALLOWED",403:"YTP_ERROR_UNSUPPORTED_DEVICE",405:"YTP_ERROR_VIDEO_FORBIDDEN",500:"YTP_ERROR_PURCHASE_NOT_FOUND",501:"YTP_ERROR_RENTAL_EXPIRED",502:"YTP_ERROR_PURCHASE_REFUNDED",5E3:"ERROR_BAD_REQUEST",5001:"ERROR_CGI_PARAMS_MISSING",5002:"ERROR_CGI_PARAMS_MALFORMED",5100:"ERROR_AUTHENTICATION_MISSING",5101:"ERROR_AUTHENTICATION_MALFORMED",5102:"ERROR_AUTHENTICATION_EXPIRED",5200:"YTP_ERROR_CAST_TOKEN_MALFORMED",5201:"YTP_ERROR_CAST_TOKEN_EXPIRED",
5202:"YTP_ERROR_CAST_TOKEN_FAILED",5203:"YTP_ERROR_CAST_SESSION_VIDEO_MISMATCHED",5204:"YTP_ERROR_CAST_SESSION_DEVICE_MISMATCHED",6E3:"YTP_ERROR_INVALID_DRM_MESSAGE",7E3:"YTP_ERROR_SERVER_ERROR",8E3:"YTP_ERROR_RETRYABLE_ERROR"};function fy(a){return(a=ey[a.toString()])?a:"YTP_ERROR_LICENSE"};var gy={created:1,ready:2,testing:4,"testing-starting":3,live:6,"live-starting":5,complete:8,"complete-starting":7};/*
Portions of this code are from MochiKit, received by
The Closure Authors under the MIT license. All other code is Copyright
2005-2009 The Closure Authors. All Rights Reserved.
*/
function hy(a,b){this.A=[];this.J=a;this.I=b||null;this.o=this.g=!1;this.k=void 0;this.F=this.N=this.C=!1;this.B=0;this.j=null;this.D=0}hy.prototype.cancel=function(a){if(this.g)this.k instanceof hy&&this.k.cancel();else{if(this.j){var b=this.j;delete this.j;a?b.cancel(a):(b.D--,0>=b.D&&b.cancel())}this.J?this.J.call(this.I,this):this.F=!0;this.g||iy(this,new jy)}};hy.prototype.G=function(a,b){this.C=!1;ky(this,a,b)};function ky(a,b,c){a.g=!0;a.k=c;a.o=!b;ly(a)}
function my(a){if(a.g){if(!a.F)throw new ny;a.F=!1}}function iy(a,b){my(a);ky(a,!1,b)}function oy(a,b,c){py(a,b,null,c)}function py(a,b,c,d){a.A.push([b,c,d]);a.g&&ly(a)}hy.prototype.then=function(a,b,c){var d,e,g=new qn(function(a,b){d=a;e=b});py(this,d,function(a){a instanceof jy?g.cancel():e(a)});return g.then(a,b,c)};on(hy);function qy(a){return gb(a.A,function(a){return ia(a[1])})}
function ly(a){if(a.B&&a.g&&qy(a)){var b=a.B,c=ry[b];c&&(l.clearTimeout(c.xa),delete ry[b]);a.B=0}a.j&&(a.j.D--,delete a.j);for(var b=a.k,d=c=!1;a.A.length&&!a.C;){var e=a.A.shift(),g=e[0],h=e[1],e=e[2];if(g=a.o?h:g)try{var k=g.call(e||a.I,b);n(k)&&(a.o=a.o&&(k==b||k instanceof Error),a.k=b=k);pn(b)&&(d=!0,a.C=!0)}catch(m){b=m,a.o=!0,qy(a)||(c=!0)}}a.k=b;d&&(k=x(a.G,a,!0),d=x(a.G,a,!1),b instanceof hy?(py(b,k,d),b.N=!0):b.then(k,d));c&&(b=new sy(b),ry[b.xa]=b,a.B=b.xa)}
function ny(){sa.call(this)}z(ny,sa);ny.prototype.message="Deferred has already fired";ny.prototype.name="AlreadyCalledError";function jy(){sa.call(this)}z(jy,sa);jy.prototype.message="Deferred was canceled";jy.prototype.name="CanceledError";function sy(a){this.xa=l.setTimeout(x(this.j,this),0);this.g=a}sy.prototype.j=function(){delete ry[this.xa];throw this.g;};var ry={};function ty(a,b){var c=b||{},d=c.document||document,e=fd("SCRIPT"),g={gu:e,vb:void 0},h=new hy(uy,g),k=null,m=null!=c.timeout?c.timeout:5E3;0<m&&(k=window.setTimeout(function(){vy(e,!0);iy(h,new wy(1,"Timeout reached for loading script "+a))},m),g.vb=k);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(vy(e,c.mC||!1,k),my(h),ky(h,!0,null))};e.onerror=function(){vy(e,!0,k);iy(h,new wy(0,"Error while loading script "+a))};Wc(e,{type:"text/javascript",
charset:"UTF-8",src:a});xy(d).appendChild(e);return h}function xy(a){var b=a.getElementsByTagName("HEAD");return!b||mb(b)?a.documentElement:b[0]}function uy(){if(this&&this.gu){var a=this.gu;a&&"SCRIPT"==a.tagName&&vy(a,!0,this.vb)}}function vy(a,b,c){null!=c&&l.clearTimeout(c);a.onload=u;a.onerror=u;a.onreadystatechange=u;b&&window.setTimeout(function(){ld(a)},0)}function wy(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);sa.call(this,c);this.code=a}z(wy,sa);function yy(a,b){this.j=new J(a);this.g=b?b:"callback";this.vb=5E3}var zy=0;yy.prototype.send=function(a,b,c,d){a=a||null;d=d||"_"+(zy++).toString(36)+y().toString(36);l._callbacks_||(l._callbacks_={});var e=this.j.clone();if(a)for(var g in a)a.hasOwnProperty&&!a.hasOwnProperty(g)||De(e,g,a[g]);b&&(l._callbacks_[d]=Ay(d,b),De(e,this.g,"_callbacks_."+d));b=ty(e.toString(),{timeout:this.vb,mC:!0});py(b,null,By(d,a,c),void 0);return{xa:d,os:b}};
yy.prototype.cancel=function(a){a&&(a.os&&a.os.cancel(),a.xa&&Cy(a.xa,!1))};function By(a,b,c){return function(){Cy(a,!1);c&&c(b)}}function Ay(a,b){return function(c){Cy(a,!0);b.apply(void 0,arguments)}}function Cy(a,b){l._callbacks_[a]&&(b?delete l._callbacks_[a]:l._callbacks_[a]=u)};function Dy(a,b){T.call(this);this.k=b+"feeds/api/users/live/broadcasts/"+a+"/states?v=2&alt=json-in-script";this.g=new Dn(15E3+Math.floor(3E4*Math.random()));Nm(this.g,"tick",x(this.j,this));this.j();this.g.start()}z(Dy,T);Dy.prototype.K=function(){this.g.dispose();Dy.H.K.call(this)};Dy.prototype.j=function(){(new yy(this.k)).send(null,x(this.A,this),x(this.o,this))};Dy.prototype.A=function(a){this.publish("payload",a);En(this.g,15E3+Math.floor(3E4*Math.random()))};
Dy.prototype.o=function(){this.publish("error");var a=this.g.g;192E4>a&&En(this.g,2*a)};function Ey(a){Q.call(this);this.g={};this.k={};this.o={};this.j=Fy(this,a)}z(Ey,Q);function Fy(a,b,c){var d=0,e=fd(b[d++]);if(w(b[d])||fa(b[d])||null===b[d]){var g=b[d++];fa(g)&&(g=g.join(" "));if(g=Gy(a,e,"className",g))Hy(a,e,"className",g),Iy(a,g,e)}for(;d<b.length;d++){var h=b[d];if(fa(h))Fy(a,h,e);else if(ja(h)){var g=a,k=e,m=void 0;for(m in h)h[m]&&Hy(g,k,m,Gy(g,k,m,h[m]))}else w(h)&&(g=Gy(a,e,"child",h),null!=g&&e.appendChild(gd(g)))}c&&c.appendChild(e);return e}f=Ey.prototype;f.L=function(){return this.j};
function Iy(a,b,c){var d=b.split(" ");if(1<d.length)for(b=0;b<d.length;b++)Iy(a,d[b],c);else a.g[b]=c}f.X=function(a,b){n(b)?kd(a,this.j,b):a.appendChild(this.j)};f.Zc=function(){ld(this.j)};function Gy(a,b,c,d){return w(d)&&"{{"==d.substr(0,2)?(a.k[d]=[b,c],null):d}f.update=function(a){for(var b in a)Jy(this,b,a[b])};function Jy(a,b,c){if(c!=a.o[b]){var d=a.k["{{"+b+"}}"];d&&(a.o[b]=c,Hy(a,d[0],d[1],c))}}function Ky(a){return fa(a)&&w(a[0])}
function Hy(a,b,c,d){if("child"==c){jd(b);if(!fa(d)||Ky(d))d=[d];c=[];for(var e=0;e<d.length;e++){var g=d[e];if(ha(g)||w(g)||ja(g))!g.nodeType||1!=g.nodeType&&3!=g.nodeType?Ky(g)?c.push(Fy(a,g)):g.L?c.push(g.L()):c.push(gd(g.toString())):c.push(g)}for(a=0;a<c.length;a++)b.appendChild(c[a])}else"className"==c?b.className=d:null===d?b.removeAttribute(c):b.setAttribute(c,d.toString())}f.K=function(){this.g={};this.k={};this.o={};this.Zc();delete this.j;Ey.H.K.call(this)};function Ly(a){var b=Math.abs(Math.floor(a)),c=Math.floor(b/86400),d=Math.floor(b%86400/3600),e=Math.floor(b%3600/60),b=Math.floor(b%60),g="";0<c&&(g+=c+":",10>d&&(g+="0"));if(0<c||0<d)g+=d+":",10>e&&(g+="0");g+=e+":";10>b&&(g+="0");g+=b;return 0<=a?g:"-"+g}function My(a){return Math.round(1E3*a)/10}function Ny(a){return(!ha(a.button)||0==a.button)&&!a.shiftKey&&!a.altKey&&!a.metaKey&&!a.ctrlKey};var Oy={UJ:"html5-stop-propagation",dJ:"ytp-no-controls",GI:"html5-live-dvr-disabled",HI:"html5-live-dvr-engaged",II:"html5-live-playback",BI:"ytp-iv-drawer-open",TI:"html5-mobile",VI:"modest-branding",aJ:"html5-native-controls",ZJ:"html5-tablet",YJ:"html5-tablet-body",OI:"html5-main-video",sK:"html5-video-container",tK:"html5-video-content",uK:"html5-video-controls",vK:"ytp-fallback",wK:"ytp-fallback-content",yK:"html5-video-loader",FK:"html5-watermark",BH:"html5-branded-watermark",OH:"html5-context-menu",
NA:"html5-context-menu-copy-debug-info",OA:"html5-context-menu-copy-embed-html",PA:"html5-context-menu-copy-video-url",QA:"html5-context-menu-copy-video-url-at-current-time",RA:"html5-context-menu-link",SA:"html5-context-menu-report-playback-issue",TA:"html5-context-menu-show-video-info",PH:"html5-show-video-info-template",UI:"html5-modal-panel",uI:"ideal-aspect",hI:"autohide-controls",jI:"autohide-controls-aspect",iI:"autohide-controls-fullscreen",RI:"autominimize-progress-bar",SI:"autominimize-progress-bar-non-aspect",
kI:"hide-info-bar",lI:"html5-hide-share",mI:"html5-hide-volume",BK:"video-thumbnail",oJ:"ytp-dialog",uH:"html5-async-progress",vH:"html5-async-success",tH:"html5-async-error",JH:"html5-center-overlay",DJ:"ytp-scalable-icon-shrink",CJ:"ytp-scalable-icon-grow",rI:"house-brand",HJ:"sentiment-like",GJ:"sentiment-dislike"};function Py(){this.k=new Ey(["div","html5-fresca-module",["div","html5-fresca-band-slate",["hgroup","html5-fresca-message",["h2","html5-fresca-heading","{{heading}}"],["h3","html5-fresca-subheading","{{subheading}}"],["h4","html5-fresca-long-test","{{long_text}}"]],["span","html5-fresca-countdown","{{countdown}}"]]]);S(this,this.k);this.j=this.k.g["html5-fresca-module"];N(this.j,"html5-stop-propagation");this.o=0;this.g=null}z(Py,Q);Py.prototype.L=function(){return this.j};
Py.prototype.update=function(a){this.B&&this.g.state==a.state&&this.g.startTime==a.startTime&&this.g.imageUrl==a.imageUrl&&this.g.messageText.join()==a.messageText.join()||(this.g=a,this.j.style.backgroundImage=this.g.imageUrl||"none",a=this.g.getMessage(),this.k.update({heading:a[0]||"",subheading:a[1]||"",long_text:a[2]||""}),this.A())};function Qy(a){var b=Math.floor((new Date).valueOf()/1E3);return b>a?lf("YTP_FRESCA_STARTING_SOON_MESSAGE"):Ly(a-b)}
Py.prototype.A=function(){var a;a=this.g;a.startTime?(a=a.state,a=6==a||8==a||7==a?!1:!0):a=!1;O(this.j,"html5-fresca-show-countdown",a);a&&(this.k.update({countdown:Qy(this.g.startTime)}),M(this.o),this.o=L(x(this.A,this),1E3))};Py.prototype.K=function(){M(this.o);this.j=null;Py.H.K.call(this)};function Ry(a){this.messageText=[];this.g=!1;a&&Sy(this,a)}Ry.prototype.state=-1;function Ty(a){return{imageUrl:a.imageUrl,messageText:a.getMessage(),startTime:a.startTime,state:a.state}}
function Sy(a,b){var c=b.feed;if(c){var d=c.yt$lifeCycleState;d&&(a.state=gy[d.$t]||-1);(d=c.yt$when)&&d.start&&(d=new Date(d.start),a.startTime=Math.floor(d.valueOf()/1E3));if(d=c.yt$slate)d.imgUrl&&(a.imageUrl="url("+d.imgUrl+")"),(d=d.content)&&d.length&&(d=d.splice(0,3),a.messageText=D(d,function(a){return a.$t}));if(c=c.entry)a.g=0<=ib(c,function(a){a=a.yt$status;return!!a&&"inactive"!=a.$t})}}Ry.prototype.getMessage=function(){return this.messageText.length?this.messageText:Uy(this)};
function Uy(a){switch(a.state){case 6:return a.g?[]:[lf("YTP_FRESCA_STAND_BY_MESSAGE"),lf("YTP_FRESCA_TECHNICAL_DIFFICULTIES_MESSAGE")];case 8:return[lf("YTP_FRESCA_EVENT_OVER_MESSAGE")];case 7:return[lf("YTP_FRESCA_EVENT_OVER_MESSAGE"),lf("YTP_FRESCA_COMPLETE_MESSAGE")];default:return[lf("YTP_FRESCA_STAND_BY_MESSAGE")]}};function Vy(a){Kx.call(this,a);kf({YTP_FRESCA_STARTING_SOON_MESSAGE:"Starting soon...",YTP_FRESCA_EVENT_OVER_MESSAGE:"This live event is over.",YTP_FRESCA_COMPLETE_MESSAGE:"Thanks for watching!",YTP_FRESCA_STAND_BY_MESSAGE:"Please stand by.",YTP_FRESCA_TECHNICAL_DIFFICULTIES_MESSAGE:"We're experiencing technical difficulties."})}z(Vy,Kx);f=Vy.prototype;f.va="fresca";f.nc="fresca";f.ej=!1;f.hh=!1;f.Ha=function(){return Av(this.g.getVideoData(),"fresca_module")};
f.create=function(a){Vy.H.create.call(this);Xu(wt(),"application/x-mpegURL")||$u()?(this.ej=this.hh=!1,Tx(this,["play_pause","seek"]),this.k=new Py,Xw(this.g,this.k.L()),this.o=a||new Dy(this.g.getVideoData().videoId,this.g.R().xo),this.o.subscribe("payload",this.KB,this),this.o.subscribe("error",this.JB,this),this.subscribe("onStateChange",this.Or,this)):Wy(this.g.app.k,"fmt.noneavailable","YTP_HTML5_NO_AVAILABLE_FORMATS_FALLBACK",void 0)};
f.destroy=function(){this.unsubscribe("onStateChange",this.Or,this);ai(this.o,this.k);Vy.H.destroy.call(this)};f.Or=function(a){this.j&&(this.ej=W(a.state,2),(Xy(a,16)||this.ej)&&Yy(this,this.j))};f.JB=function(){this.hh||(Zy(this,new Ry),Yy(this,this.j))};f.KB=function(a){Zy(this,new Ry(a));a=this.g.getVideoData();6!=this.j.state||a.S||a.M?Yy(this,this.j):this.g.Am(a.videoId)};
function Yy(a,b){var c=6>b.state;!c&&a.g.app.k.na&&(b.imageUrl||b.messageText.length)&&(c=!0);a.ej&&!a.g.R().yc&&(c=!0);b.g||(c=!0);if(!a.hh)switch(b.state){case 6:b.g&&(a.hh=!0,Ux(a,["play_pause","seek"]),Mx(a));break;case 8:case 7:c=a.hh=!0}c&&a.k.update(b);c&&!a.loaded?a.load():!c&&a.loaded&&a.unload()}function $y(a){return Av(a.getVideoData(),"fresca_module")?new Vy(a):null}function Zy(a,b){a.j!=b&&(a.j=b,a.g.R().Fb()&&a.publish("publish_external_event","onFrescaStateChange",Ty(a.j)))};function az(a){this.Pn=a||window;this.mg=[]}f=az.prototype;f.Pn=null;f.mg=null;f.listen=function(a,b,c,d){c=x(c,d||this.Pn);a=P(a,b,c);this.mg.push(a);return a};function bz(a,b,c,d,e,g){d=x(d,g||a.Pn);b=eh(b,c,d,e);a.mg.push(b)}f.Ga=function(a){ch(a);pb(this.mg,a)};f.removeAll=function(){ch(this.mg);this.mg=[]};function cz(){U.call(this);this.g=0;this.endTime=this.startTime=null}z(cz,U);f=cz.prototype;f.kb=function(){return 1==this.g};f.ac=function(){this.Sb("begin")};f.Kc=function(){this.Sb("end")};f.Ab=function(){this.Sb("finish")};f.onStop=function(){this.Sb("stop")};f.Sb=function(a){this.T(a)};function dz(){cz.call(this);this.j=[]}z(dz,cz);dz.prototype.add=function(a){lb(this.j,a)||(this.j.push(a),Nm(a,"finish",this.o,!1,this))};dz.prototype.remove=function(a){pb(this.j,a)&&Vm(a,"finish",this.o,!1,this)};dz.prototype.K=function(){C(this.j,function(a){a.dispose()});this.j.length=0;dz.H.K.call(this)};function hz(){dz.call(this);this.k=0}z(hz,dz);
hz.prototype.play=function(a){if(0==this.j.length)return!1;if(a||0==this.g)this.k=0,this.ac();else if(this.kb())return!1;this.Sb("play");-1==this.g&&this.Sb("resume");var b=-1==this.g&&!a;this.startTime=y();this.endTime=null;this.g=1;C(this.j,function(c){b&&-1!=c.g||c.play(a)});return!0};hz.prototype.pause=function(){this.kb()&&(C(this.j,function(a){a.kb()&&a.pause()}),this.g=-1,this.Sb("pause"))};
hz.prototype.stop=function(a){C(this.j,function(b){0==b.g||b.stop(a)});this.g=0;this.endTime=y();this.onStop();this.Kc()};hz.prototype.o=function(){this.k++;this.k==this.j.length&&(this.endTime=y(),this.g=0,this.Ab(),this.Kc())};var iz=/#(.)(.)(.)/;function jz(a){if(!kz.test(a))throw Error("'"+a+"' is not a valid hex color");4==a.length&&(a=a.replace(iz,"#$1$1$2$2$3$3"));a=a.toLowerCase();return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16)]}var kz=/^#(?:[0-9a-f]{3}){1,2}$/i;var lz={},mz=null;function nz(a){a=ka(a);delete lz[a];bc(lz)&&mz&&mz.stop()}function oz(){mz||(mz=new dr(function(){pz()},20));var a=mz;a.isActive()||a.start()}function pz(){var a=y();Ob(lz,function(b){qz(b,a)});bc(lz)||oz()};function rz(a,b,c,d){cz.call(this);if(!fa(a)||!fa(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.k=a;this.B=b;this.duration=c;this.A=d;this.j=[]}z(rz,cz);f=rz.prototype;f.ms=0;f.bd=0;f.Gm=null;
f.play=function(a){if(a||0==this.g)this.bd=0,this.j=this.k;else if(this.kb())return!1;nz(this);this.startTime=a=y();-1==this.g&&(this.startTime-=this.duration*this.bd);this.endTime=this.startTime+this.duration;this.Gm=this.startTime;this.bd||this.ac();this.Sb("play");-1==this.g&&this.Sb("resume");this.g=1;var b=ka(this);b in lz||(lz[b]=this);oz();qz(this,a);return!0};f.stop=function(a){nz(this);this.g=0;a&&(this.bd=1);sz(this,this.bd);this.onStop();this.Kc()};
f.pause=function(){this.kb()&&(nz(this),this.g=-1,this.Sb("pause"))};f.K=function(){0==this.g||this.stop(!1);this.Sb("destroy");rz.H.K.call(this)};f.destroy=function(){this.dispose()};function qz(a,b){a.bd=(b-a.startTime)/(a.endTime-a.startTime);1<=a.bd&&(a.bd=1);a.ms=1E3/(b-a.Gm);a.Gm=b;sz(a,a.bd);1==a.bd?(a.g=0,nz(a),a.Ab(),a.Kc()):a.kb()&&a.un()}function sz(a,b){ia(a.A)&&(b=a.A(b));a.j=Array(a.k.length);for(var c=0;c<a.k.length;c++)a.j[c]=(a.B[c]-a.k[c])*b+a.k[c]}f.un=function(){this.Sb("animate")};
f.Sb=function(a){this.T(new tz(a,this))};function tz(a,b){vm.call(this,a);this.x=b.j[0];this.y=b.j[1];this.duration=b.duration;this.fps=b.ms;this.state=b.g}z(tz,vm);function uz(a,b,c,d,e){rz.call(this,b,c,d,e);this.element=a}z(uz,rz);uz.prototype.Ye=u;uz.prototype.un=function(){this.Ye();uz.H.un.call(this)};uz.prototype.Kc=function(){this.Ye();uz.H.Kc.call(this)};uz.prototype.ac=function(){this.Ye();uz.H.ac.call(this)};function vz(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");uz.apply(this,arguments)}z(vz,uz);
vz.prototype.Ye=function(){this.element.style.left=Math.round(this.j[0])+"px";this.element.style.top=Math.round(this.j[1])+"px"};function wz(a,b,c,d){vz.call(this,a,[a.offsetLeft,a.offsetTop],b,c,d)}z(wz,vz);wz.prototype.ac=function(){this.k=[this.element.offsetLeft,this.element.offsetTop];wz.H.ac.call(this)};function xz(a,b,c,d,e){if(2!=b.length||2!=c.length)throw Error("Start and end points must be 2D");uz.apply(this,arguments)}z(xz,uz);
xz.prototype.Ye=function(){this.element.style.width=Math.round(this.j[0])+"px";this.element.style.height=Math.round(this.j[1])+"px"};function yz(a,b,c,d,e){uz.call(this,a,[b],[c],d,e)}z(yz,uz);yz.prototype.Ye=function(){this.element.style.width=Math.round(this.j[0])+"px"};function zz(a,b,c,d,e){ha(b)&&(b=[b]);ha(c)&&(c=[c]);uz.call(this,a,b,c,d,e);if(1!=b.length||1!=c.length)throw Error("Start and end points must be 1D");this.o=-1}z(zz,uz);var Az=1/1024;f=zz.prototype;
f.Ye=function(){var a=this.j[0];Math.abs(a-this.o)>=Az&&(pg(this.element,a),this.o=a)};f.ac=function(){this.o=-1;zz.H.ac.call(this)};f.Kc=function(){this.o=-1;zz.H.Kc.call(this)};f.show=function(){this.element.style.display=""};f.hide=function(){this.element.style.display="none"};function Bz(a,b,c){zz.call(this,a,1,0,b,c)}z(Bz,zz);Bz.prototype.ac=function(){this.show();Bz.H.ac.call(this)};Bz.prototype.Kc=function(){this.hide();Bz.H.Kc.call(this)};function Cz(a,b,c){zz.call(this,a,0,1,b,c)}z(Cz,zz);
Cz.prototype.ac=function(){this.show();Cz.H.ac.call(this)};function Dz(a){return Math.pow(a,3)}function Ez(a){return 1-Math.pow(1-a,3)}function Fz(a){return 3*a*a-2*a*a*a};function Gz(a){return fa(a)&&a.length?a[0]:a}function Hz(a){var b=/.+/;return w(a)&&null!=b&&null!=a&&a.match(b)?a:""}function Iz(a,b){if(null==a)return b;var c=parseInt(a,0);if(isNaN(c))return b;c=c.toString(16);return"#"+"000000".substring(0,6-c.length)+c}function Jz(a){return w(a)?a:""}function Kz(a,b,c){for(var d in b)if(b[d]==a)return a;return c}function Lz(a,b){return"true"==a||"false"==a?"true"==a:b}function Mz(a,b){return w(a)?parseFloat(a):b}
function Nz(a,b,c,d,e,g){a=10==b?parseFloat(a):parseInt(a,b);if(null!=a&&!isNaN(a)){if(e)return Ib(a,c,d);if(a>=c&&a<=d)return a}return g}function Oz(a){if(null==a)return 0;if("never"==a)return-1;a=a.split(":");if(3<a.length)return 0;var b=0,c=1;C(a,function(a){a=parseFloat(a);0>a&&(c=-c);b=60*b+Math.abs(a)});return c*b}function Pz(a,b){if(null==a)return null;if(ga(a)){var c=[];C(a,function(a){(a=b(a))&&c.push(a)});return c}var d=b(a);return d?[d]:[]}
function Qz(a){function b(a){return null!=a&&!isNaN(a)}return(a=a?new Kf(parseFloat(a.top),parseFloat(a.right),parseFloat(a.bottom),parseFloat(a.left)):null)&&b(a.top)&&b(a.right)&&b(a.bottom)&&b(a.left)?a:null}function Rz(a){function b(a){return eb(a.split(/ +/),function(a){return""!=a})}return null==a?[]:b(a)};function Sz(a,b,c){this.value=a;this.target=b;this.showLinkIcon=c}var Tz={SH:"current",bJ:"new"};function Uz(a){if(!a)return null;var b=Jz(a.value);if(!b||null==Vi(b))return null;var c=Kz(a.target,Tz,"current");return null==c?null:new Sz(b,c,Lz(a.show_link_icon,!0))}function Vz(a){return a.value?a.value:null};function Wz(a){if(!a)return!1;var b=Xz(a);return("com"==b[0]&&"youtube"==b[1]||"be"==b[0]&&"youtu"==b[1])&&-1==a.indexOf("/redirect?")}function Xz(a){a=a.replace(/https?:\/\//g,"");a=a.split("/",1);return!a||1>a.length||!a[0]?[]:a[0].toLowerCase().split(".").reverse()}
function Yz(a,b){if("new"==a.target)return-1;var c=Vz(a);if(!c)return-1;var c=c.replace(/https?:\/\//g,""),d;(d=!Wz(c))||(d=be(Zd(c)[5]||null)||"",d=d.split("/"),d="/"+(1<d.length?d[1]:""),d="/watch"!=d);if(d)return-1;d=Vi(c);if(!d||d.v!=b||d.list||d.p)return-1;c=c.split("#",2);if(!c||2>c.length)return-1;(c=Ui(c[1]))&&c.t?(d=c.t,c=0,-1!=d.indexOf("h")&&(d=d.split("h"),c=3600*d[0],d=d[1]),-1!=d.indexOf("m")&&(d=d.split("m"),c=60*d[0]+c,d=d[1]),-1!=d.indexOf("s")?(d=d.split("s"),c=1*d[0]+c):c=1*d+c):
c=-1;return c}function Zz(a,b,c,d){(a=Vz(a))?Wz(a)?d=Yi(a,{src_vid:c,feature:"iv",annotation_id:b}):(a?(b=Xz(a),b="com"==b[0]&&"google"==b[1]&&"plus"==b[2]):b=!1,b&&d?(d=pa($z,d.pageId,d.Xa),a=new J(a),qe(a,d(a.Kb)),d=a.toString()):d=a):d=null;return d}function $z(a,b,c){c=c.replace(/\/(u|b)\/[0-9]+/g,"");var d=/^[0-9]+$/;a&&d.test(a)&&(c="/b/"+a+c);b&&d.test(b)&&(c="/u/"+b+c);return c}function aA(a){return a.target?"new"==a.target?"_blank":"_top":Wz(Vz(a))?"_top":"_blank"};function bA(a,b){this.k=a;this.j=b;this.g={}}function cA(a,b,c,d){if(b){var e=dA(a,b);a.g[b]=e["p-time"];e["iv-event"]=e.link||e["l-class"]||e["link-id"]?2:7;jc(e,c||{});b=tb(d||[]);30==e["a-type"]&&(c=eA(a,e["a-id"],"cta_annotation_shown"))&&b.push(c);fA(a,e,b)}}function gA(a,b,c,d,e){if(b){var g=dA(a,b);g["iv-event"]=3;g["i-time"]=a.g[b]||"";jc(g,d||{});b=tb(e||[]);30==g["a-type"]&&(d=eA(a,g["a-id"],"cta_annotation_clicked"))&&b.push(d);fA(a,g,b,c)}}
function hA(a,b,c,d){if(b){var e=dA(a,b);e["iv-event"]=4;e["i-time"]=a.g[b]||"";jc(e,c||{});b=tb(d||[]);30==e["a-type"]&&(c=eA(a,e["a-id"],"cta_annotation_closed"))&&b.push(c);fA(a,e,b)}}function eA(a,b,c){a=a.j.getVideoData();if(a.jc){if((c=a.jc[c])&&-1!=c.search(Te))return a=xa("[ANNOTATION_ID]"),0<=c.indexOf("[ANNOTATION_ID]")?c=c.replace("[ANNOTATION_ID]",b):0<=c.indexOf(a)&&(c=c.replace(a,b)),c}else if(a.ha)return Yi(a.ha,{label:c,value:"a_id="+b});return""}
function fA(a,b,c,d){var e=1,g;if(d){var h=!1;g=function(){e--;e||h||(h=!0,d())};setTimeout(function(){h=!0;d()},1E3)}C(c||[],function(a){e++;zf(a,g)});a.oa(b,g)}function dA(a,b){var c={},d=new te(b);C(d.La(),function(a){c[a]=escape(d.get(a,""))});c["p-time"]=a.j.getCurrentTime().toFixed(2);c.ps=a.j.R().j;return c}function iA(a,b,c,d,e){b&&(b=dA(a,b),b["iv-event"]=c,null===d||(b["a-type"]=d),fA(a,b,e))}bA.prototype.oa=function(a,b){this.k.publish("command_log","iv",a,b)};function jA(a,b){this.Ca=a;this.context=b;this.O=this.N=this.I=null;this.D=0}function kA(a,b,c,d,e,g){b=new Ax(b,c,{id:d});b.namespace="iv-module";e&&b.Ra.subscribe("onEnter",e,a);g&&b.Ra.subscribe("onExit",g,a);a.context.Ra.publish("command_add_cuerange",[b],a.context.j.getPlayerType())}f=jA.prototype;f.uj=function(){this.context.Ra.subscribe("onResize",this.xe,this)};f.L=function(){return this.Ca};
f.Rd=function(a,b,c,d,e){bz(this.context.g,a,"click",pa(this.vf,a,b,c,d,e||[]),"iv-click-target",this);bz(this.context.g,a,"touchend",pa(this.vf,a,b,c,d,e||[]),"iv-click-target",this)};f.vf=function(a,b,c,d,e,g){g.stopPropagation();g.preventDefault();var h=Zz(b,c,this.context.o.videoId);a=x(function(){this.context.j.pauseVideo();window.open(h,aA(b))},this);Wz(Vz(b))&&"new"!=b.target||(a(),a=null);c={};c.interval=y()-this.D;gA(this.context.logger,d,a,c,e);return!1};f.show=function(){this.D=y()};
f.hide=function(){};f.destroy=function(){ld(this.L())};function lA(a){a.O||(a.O=Fd(a.L(),"html5-video-player"));return a.O}
function mA(a){var b=a.context.k.qf;if(!b)return null;var c=a.context.k.wf||new Lf(0,0,b.width,b.height),d=-c.top,e=b.height-c.top,g;a.N||(a.N=G("html5-video-container",lA(a)));g=a.N;if(!g)return null;g=35-(parseInt(Wf(g,"bottom"),10)||0);var h;a.I||(a.I=G("html5-info-bar",lA(a)));(h=a.I)&&a.context.k.tk&&"none"!=Wf(h,"display")&&(d+=mg(h).height);return new Kf(d,b.width-c.left,e-g,-c.left)}f.xe=function(){};function nA(a,b){fa(b)||(b=[b]);var c=D(b,function(a){return w(a)?a:a.property+" "+a.duration+"s "+a.timing+" "+a.qp+"s"});oA(a,c.join(","))}
var pA=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}}(function(){if(wc)return Ic("10.0");var a=document.createElement("div"),b=Sf(),c={transition:"opacity 1s linear"};b&&(c[b+"-transition"]="opacity 1s linear");b={style:c};if(!pm.test("div"))throw Error("Invalid tag name <div>.");if("div"in rm)throw Error("Tag name <div> is not allowed for SafeHtml.");var c=null,d="<div";if(b)for(var e in b){if(!pm.test(e))throw Error('Invalid attribute name "'+e+'".');var g=b[e];if(null!=g){var h;
h=e;if(g instanceof $l)g=bm(g);else if("style"==h.toLowerCase()){if(!ja(g))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+typeof g+" given: "+g);if(!(g instanceof cm)){var k="",m=void 0;for(m in g){if(!/^[-_a-zA-Z0-9]+$/.test(m))throw Error("Name allows only [-_a-zA-Z0-9], got: "+m);var p=g[m];null!=p&&(p instanceof $l?p=bm(p):gm.test(p)||(p="zClosurez"),k+=m+":"+p+";")}g=k?em(k):fm}k=void 0;k=g instanceof cm&&g.constructor===cm&&g.j===dm?g.g:"type_error:SafeStyle";
g=k}else{if(/^on/i.test(h))throw Error('Attribute "'+h+'" requires goog.string.Const value, "'+g+'" given.');if(h.toLowerCase()in qm)if(g instanceof km)g=g instanceof km&&g.constructor===km&&g.g===lm?"":"type_error:TrustedResourceUrl";else if(g instanceof hm)g=jm(g);else throw Error('Attribute "'+h+'" on tag "div" requires goog.html.SafeUrl or goog.string.Const value, "'+g+'" given.');}g.dg&&(g=g.cg());h=h+'="'+za(String(g))+'"';d=d+(" "+h)}}e=void 0;n(e)?fa(e)||(e=[e]):e=[];!0===Ql.div?d+=">":(c=
sm(e),d+=">"+om(c)+"</div>",c=c.ag());(b=b&&b.dir)&&(/^(ltr|rtl|auto)$/i.test(b)?c=0:c=null);b=tm(d,c);a.innerHTML=om(b);a=a.firstChild;b=a.style[Xa("transition")];return""!=("undefined"!==typeof b?b:a.style[Vf(a,"transition")]||"")});function oA(a,b){Uf(a,"transition",b)};function qA(a,b){(a=Tc(a))&&a.style&&(qg(a,b),O(a,"hid",!b))}function rA(a){return(a=Tc(a))?!("none"==a.style.display||Bg(a,"hid")):!1}function sA(a){C(arguments,function(a){qA(a,!0)})}function tA(a){C(arguments,function(a){qA(a,!1)})}var uA={};function vA(a,b,c){if((a=Tc(a))&&a.style){if(b in uA)b=uA[b];else{var d=Tf(b,document.body.style);b=uA[b]=d}b&&(a.style[b]=c)}};function wA(a,b,c){this.id=a;this.type=b.card_type;this.C=b.teaser_text||b.title;this.B=b.teaser_image_url||b.image_url;this.teaserDurationMs=b.teaser_duration_ms||4E3;this.startMs=b.start_ms;this.endMs=b.end_ms;this.za=c;a=b.tracking||{};this.g={xp:a.impression,click:a.click,close:a.close,Vp:a.teaser_impression,ep:a.teaser_click}};function xA(a,b,c){wA.call(this,a,b,c);this.o=b.banner_image_url;this.D=b.image_url;this.A=b.g_plus_url;this.title=b.title;this.description=b.description;this.j=b.meta_info;this.k=b.html_blobs;this.url=Uz({target:"new",value:b.url})}z(xA,wA);function yA(a,b,c){wA.call(this,a,b,c);this.A=b.profile_image_url;this.o=b.intro;this.k=b.image_url;this.playlistVideoCount=b.playlist_video_count;this.title=b.title;this.j=b.meta_info;this.url=Uz({target:"new",value:b.url})}z(yA,wA);function zA(a,b,c){wA.call(this,a,b,c);this.imageUrl=b.image_url;this.title=b.title;this.description=b.description;this.options=b.options}z(zA,wA);function AA(a,b,c){wA.call(this,a,b,c);this.imageUrl=b.image_url;this.displayDomain=b.display_domain;this.showLinkIcon=b.show_link_icon;this.k=b.button_icon_url;this.title=b.title;this.description=b.description;this.o=b.custom_message;this.url=Uz({target:"new",value:b.url})}z(AA,wA);function BA(a,b,c){AA.call(this,a,b,c);this.F=b.ypc_item_type;this.D=b.ypc_item_id;this.A=b.ypc_flow_type}z(BA,AA);function CA(a,b,c){wA.call(this,a,b,c);this.D=b.profile_image_url;this.A=b.intro;this.o=b.image_url;this.k=b.video_duration;this.title=b.title;this.j=b.meta_info;this.description=b.description;this.url=Uz({target:"new",value:b.url})}z(CA,wA);function DA(a){EA(a,"none")}function EA(a,b){a&&(a.style.display=b)}function FA(a,b){var c=Qg("requestAnimationFrame",window);return L(function(){c?c.call(window,a):a()},b||0)};function X(a){Q.call(this);this.template=new Ey(a);S(this,this.template);this.element=this.template.L();this.ia="block";this.D=!0;this.eb=[]}z(X,Q);f=X.prototype;f.L=function(){return this.element};f.X=function(a,b){this.template.X(a,b)};f.Zc=function(){this.template.Zc()};f.ua=function(a,b){Jy(this.template,b||"content",a)};f.show=function(){EA(this.element,this.ia);this.D=!0;this.element.removeAttribute("aria-hidden")};
f.hide=function(){DA(this.element);this.D=!1;this.element.setAttribute("aria-hidden","true")};function GA(a,b){a.element.setAttribute("role",b)}f.fb=function(a){this.element.setAttribute("aria-label",a)};f.Qb=function(a){hh(this.element,a)};f.listen=function(a,b,c){return HA(this,this.element,a,b,c)};function HA(a,b,c,d,e,g){b=P(b,c,x(d,e||a),g);a.eb.push(b);return b}f.Ga=function(a){ch(a)};f.K=function(){this.Ga(this.eb);delete this.element;X.H.K.call(this)};wc&&8<=document.documentMode||xc&&Ic("1.9.2")||yc&&Ic("532.1");window.history.pushState&&(!yc||yc&&Ic("534.11"));function IA(a,b){var c=JA(a),d=document.getElementById(c),e=d&&Ig(d,"loaded"),g=d&&!e;e?b&&b():(b&&(hi(c,b),ka(b)),g||(d=KA(a,c,function(){Ig(d,"loaded")||(Gg(d,"loaded","true"),ki(c),L(pa(ni,c),0))})))}
function KA(a,b,c){var d=document.createElement("script");d.id=b;d.onload=function(){c&&setTimeout(c,0)};d.onreadystatechange=function(){switch(d.readyState){case "loaded":case "complete":d.onload()}};d.src=a;a=document.getElementsByTagName("head")[0]||document.body;a.insertBefore(d,a.firstChild);return d}function JA(a){var b=document.createElement("a");b.href=a;a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"js-"+Ta(a)}var LA=/\.vflset|-vfl[a-zA-Z0-9_+=-]+/,MA=/-[a-zA-Z]{2,3}_[a-zA-Z]{2,3}(?=(\/|$))/;function NA(a,b){var c=OA(a),d=document.getElementById(c),e=d&&Ig(d,"loaded"),g=d&&!e;e?b&&b():(b&&(hi(c,b),ka(b)),g||(d=PA(a,c,function(){Ig(d,"loaded")||(Gg(d,"loaded","true"),ki(c),L(pa(ni,c),0))})))}function PA(a,b,c){var d=document.createElement("link");d.id=b;d.rel="stylesheet";d.onload=function(){c&&setTimeout(c,0)};d.href=a;(document.getElementsByTagName("head")[0]||document.body).appendChild(d);return d}
function OA(a){var b=document.createElement("a");b.href=a;a=b.href.replace(/^[a-zA-Z]+:\/\//,"//");return"css-"+Ta(a)}var QA=/cssbin\/(?:debug-)?([a-zA-Z0-9_-]+?)(?:-2x|-web|-rtl|-vfl|.css)/;function RA(){return!!s("yt.scheduler.instance")}function SA(a,b){void 0===b&&(b=NaN);var c=s("yt.scheduler.instance.addJob");return c?(isNaN(b)&&(b=0),c(a,0,b)):isNaN(b)?(a(),NaN):L(a,b||0)}function TA(a,b){return SA(a,b)}function UA(a){var b=s("yt.scheduler.instance.cancelJob");b?b(a):M(a)}function VA(){var a=s("yt.scheduler.instance.start");a&&(Vt("jsp")&&!Vt("jsr")&&Tt("jsr"),M(WA),a())}var WA=0;
function XA(){var a=s("yt.scheduler.instance.pause");a&&(a(),Vt("jsp")||Tt("jsp"),M(WA),WA=L(VA,800))};function YA(a,b){this.version=a;this.args=b}function ZA(a){this.g=a}ZA.prototype.toString=function(){return this.g};var $A=s("yt.pubsub2.instance_")||new bi;bi.prototype.subscribe=bi.prototype.subscribe;bi.prototype.unsubscribeByKey=bi.prototype.Lb;bi.prototype.publish=bi.prototype.publish;bi.prototype.clear=bi.prototype.clear;q("yt.pubsub2.instance_",$A,void 0);var aB=s("yt.pubsub2.subscribedKeys_")||{};q("yt.pubsub2.subscribedKeys_",aB,void 0);var bB=s("yt.pubsub2.topicToKeys_")||{};q("yt.pubsub2.topicToKeys_",bB,void 0);var cB=s("yt.pubsub2.isAsync_")||{};q("yt.pubsub2.isAsync_",cB,void 0);
q("yt.pubsub2.skipSubKey_",null,void 0);function dB(a,b){var c=s("yt.pubsub2.instance_");c&&c.publish.call(c,a.toString(),a,b)};function eB(a){zf("/gen_204?"+a,void 0)}function fB(a,b,c,d,e,g){var h={};b&&(h.v=b);c&&(h.list=c);d&&(h.url=d);a={name:a,locale:e,feature:g};for(var k in h)a[k]=h[k];h=ie("/sharing_services",a);zf(h)};function gB(a){window.location=ie(a,{})+""}
function hB(a,b,c){b||(b={});var d=c||window;c="undefined"!=typeof a.href?a.href:String(a);a=b.target||a.target;var e=[],g;for(g in b)switch(g){case "width":case "height":case "top":case "left":e.push(g+"="+b[g]);break;case "target":case "noreferrer":break;default:e.push(g+"="+(b[g]?1:0))}g=e.join(",");if(b.noreferrer){if(b=d.open("",a,g))wc&&-1!=c.indexOf(";")&&(c="'"+c.replace(/'/g,"%27")+"'"),b.opener=null,c=za(c),b.document.write('<META HTTP-EQUIV="refresh" content="0; url='+c+'">'),b.document.close()}else b=
d.open(c,a,g);return b}function iB(a,b){var c;c=b||{};c.target=c.target||a.target||"YouTube";c.width=c.width||600;c.height=c.height||600;(c=hB(a,c))?(c.opener||(c.opener=window),c.focus()):c=null;return!c};function jB(){var a=ef("PLAYER_CONFIG");return a&&a.args&&void 0!==a.args.authuser?!0:!(!ef("SESSION_INDEX")&&!ef("LOGGED_IN"))};var tn=[],kB=!1;function lB(a,b,c){if(jB())mB(function(){s("yt.www.ypc.checkout.showYpcOverlay")(a,b,c)});else{var d=nB({ypc_it:a,ypc_ii:b,ypc_ft:c});gB(d)}}function oB(a){kB||(C(ef("YPC_LOADER_CALLBACKS"),function(a){(a=s(a))&&a()}),kB=!0);a&&a()}function nB(a){a=Yi(window.location.href,a);var b=ef("YPC_SIGNIN_URL"),c=Vi(b)["continue"],c=Yi(c,{next:a});return Yi(b,{"continue":c})}
function mB(a){if(!tn.length){var b=ef("YPC_LOADER_CSS");tn.push(new qn(function(a){if(window.spf){var c=b.match(QA);spf.style.load(b,c?c[1]:"",a)}else NA(b,a)}));var c=ef("YPC_LOADER_JS");tn.push(new qn(function(a){if(window.spf){var b="";if(c){var d=c.indexOf("jsbin/"),k=c.lastIndexOf(".js"),m=d+6;-1<d&&-1<k&&k>m&&(b=c.substring(m,k),b=b.replace(LA,""),b=b.replace(MA,""),b=b.replace("debug-",""),b=b.replace("tracing-",""))}spf.script.load(c,b,a)}else IA(c,a)}));var d=ef("YPC_LOADER_CONFIGS");tn.push(new qn(function(a){fj(d,
{Ma:function(b,c){cf(c.configs);kf(c.messages);a()}})}))}sn().then(function(){oB(a)})};function pB(a){this.g=a}
function qB(a,b){var c=rB(a,b.url,b.id),d=["div","iv-card-channel-banner",""];b.o&&(d=["div",["iv-card-channel-banner","iv-card-channel-banner-custom"],{style:"background-image: url("+b.o+");"}]);var e=b.A?["a","iv-card-gplus",{href:b.A,target:"_blank",title:lf("YTP_ON_GOOGLE_PLUS")}]:null,c=new X(["article","iv-card-channel",d,["a",["iv-card-image","iv-click-target"],{href:c},["img",{src:b.D}]],["div","iv-card-content",e,["h1","iv-click-target",b.title],["div",["iv-blob-subscribe","iv-card-subscribe"],
""],["p","",b.description]]]),g=c.L();g&&Ob(b.k,function(a,b){var c=Uc(b,g);C(c,function(b){b.innerHTML=a})},c);return c}
function sB(a,b){var c=rB(a,b.url,b.id),d=["ul","iv-card-meta-info"];C(b.j,function(a){d.push(["li","",a])});c=["article",["iv-card-watchable","iv-card-playlist"],["h1",{style:"background-image: url("+b.A+");"},b.o],["div","iv-click-target",["a",["iv-card-image","iv-click-target"],{href:c},["img",{src:b.k}],["div","iv-card-image-overlay",["span","iv-card-playlist-video-count",b.playlistVideoCount.toString()],["span","iv-card-playlist-play-all",lf("YTP_PLAY_ALL")]]],["div",["iv-card-content","iv-click-target"],
["h2","",b.title],d]]];return new X(c)}
function tB(a,b){var c=rB(a,b.url,b.id),d=["iv-click-target","yt-uix-button","yt-uix-button-primary","yt-uix-button-size-large"],e="";b.k&&(d.push("yt-uix-button-has-icon"),e=["span","yt-uix-button-icon-wrapper",["img",["yt-uix-button-icon","iv-card-button-icon"],{src:b.k}]]);return new X(["article","iv-card-simple",["div","iv-card-image",{style:"background-image: url("+b.imageUrl+");"}],["div","iv-card-content",["h1","",b.title],["p","",b.description],["a",d,{href:c,role:"button"},e,["span","yt-uix-button-content",
b.o]]]])}function uB(a,b,c){var d=tB(a,b),e=d.L();bz(a.g.g,e,"click",pa(a.k,b,c),"iv-click-target",a);return d}
function vB(a,b){var c=rB(a,b.url,b.id),d=["ul","iv-card-meta-info"];C(b.j,function(a){d.push(["li","",a])});return new X(["article",["iv-card-watchable","iv-card-video"],["h1",{style:"background-image: url("+b.D+");"},b.A],["div","iv-click-target",["a",["iv-card-image","iv-click-target"],{href:c},["img",{src:b.o}],["span","iv-card-video-duration",b.k]],["div",["iv-card-content","iv-click-target"],["h2","",b.title],d]]])}
function wB(a,b){var c=["ul","yt-uix-form-list-option"];ub(c,D(b.options,function(a){return["li","iv-card-option",{"data-index":a.index.toString()},["label","",["span","yt-uix-form-input-radio-container",["input","yt-uix-form-input-radio",{type:"radio",name:"radio"}],["span","yt-uix-form-input-radio-element"]]," ",a.desc]]}));var c=new X(["article",["iv-card-poll","iv-card-simple"],["div","iv-card-image",{style:"background-image: url("+b.imageUrl+");"}],["div","iv-card-content",["h1","",b.title],
["fieldset",["yt-uix-form-fieldset","iv-card-options"],c]]]),d=c.L();bz(a.g.g,d,"click",pa(a.j,b),"iv-card-option",a);bz(a.g.g,d,"touchend",pa(a.j,b),"iv-card-option",a);return c}pB.prototype.j=function(a,b){b.stopPropagation();b.preventDefault();var c={poll_id:a.id,index:Ig(b.currentTarget,"index")};ej(this.g.o.uh,{Me:{action_poll_vote:1},ab:c})};
pB.prototype.k=function(a,b,c){c.stopPropagation();c.preventDefault();ef("YPC_LOADER_ENABLED")?(this.g.j.pauseVideo(),this.g.j.isFullscreen()&&xB(this.g.j.app),this.g.Ra.publish("external_overlay_activated"),gA(this.g.logger,a.za),lB(a.F,a.D,a.A)):b(c.target,a.url,a.id,a.za,a.g.click,c)};function rB(a,b,c){return b?Zz(b,c,a.g.o.videoId,a.g.k):null};function yB(a,b){jA.call(this,a,b);this.S=!1;this.G=H("div",["iv-cards-thumbnails","hid"]);this.P=H("button",void 0,H("div"));this.A=H("div","iv-cards-background",H("div"),this.P);this.we=H("div");this.o=H("div",["iv-cards-notif","iv-cards-notif-inactive"],void 0,this.we,H("button",{type:"button"},H("div")));this.j=H("div","iv-cards-details");this.B=new pB(this.context);this.g=[];this.M=null;this.J=0;this.k=-1;this.Zb=null;this.F=this.C=!1;N(this.L(),"iv-cards");kA(this,1E3*this.context.o.lengthSeconds-
1200,2147483647,"",this.Aw);this.context.j.addEventListener("onStateChange",x(this.Tc,this));this.context.j.addEventListener("onAdStateChange",x(this.Tc,this))}z(yB,jA);var zB={associated:AA,channel:xA,fundraising:AA,merch:AA,playlist:yA,poll:zA,product:AA,tip:BA,video:CA};function AB(a,b){return new wz(a,[b,a.offsetTop],200,Fz)}function BB(a,b,c){a=new Bz(a,200,Fz);b&&Um(a,"end",b,!1,c);return a}
function CB(a){var b=new Cz(a,200,Fz);Um(b,"end",pa(function(a,b){Uf(a,"opacity","");b.target.K()},a));return b}
function DB(a){qg(a.A,!1);a.L().appendChild(a.A);Nm(a.A,"click",a.Vi,!1,a);Nm(a.A,"touchend",a.Vi,!1,a);a.L().appendChild(a.G);qg(a.j,!1);a.L().appendChild(a.j);a.L().appendChild(a.o);EB(a);a.context.g.listen(a.o,"click",a.Mq,a);a.context.g.listen(a.o,"touchend",a.Mq,a);a.context.g.listen(a.o,"mouseover",function(){FB(this);this.Zb&&this.Zb.He.stop()},a);a.context.g.listen(a.o,"mouseout",function(){this.Zb&&this.Zb.He.start(200)},a);a.context.Ra.subscribe("external_overlay_activated",a.Vi,a);GB(a,
mA(a))}f=yB.prototype;f.as=function(a){var b=a&&a.data&&a.data.card_type;b&&zB[b]&&this.add(new zB[b](a.id,a.data,a.za))};
f.add=function(a){this.S||(DB(this),this.S=!0);var b=(new X(["button",{type:"button",style:"background-image: url("+a.B+");"}])).L();qg(b,!1);var c,d;switch(a.type){case "associated":case "fundraising":case "merch":case "product":if(c=tB(this.B,a))d=c.L(),this.Rd(d,a.url,a.id,a.za,a.g.click);break;case "tip":(c=uB(this.B,a,x(this.vf,this)))&&(d=c.L());break;case "video":if(c=vB(this.B,a))d=c.L(),this.Rd(d,a.url,a.id,a.za,a.g.click);break;case "playlist":if(c=sB(this.B,a))d=c.L(),this.Rd(d,a.url,a.id,
a.za,a.g.click);break;case "channel":if(c=qB(this.B,a))d=c.L(),this.Rd(d,a.url,a.id,a.za,a.g.click);break;case "poll":(c=wB(this.B,a))&&(d=c.L())}if(d){var e={nb:a,Cg:d,Fg:b},g=yb(this.g,e,function(a,b){return a.nb.startMs-b.nb.startMs});0>g&&(g=-(g+1));vb(this.g,g,0,e);kd(this.G,b,g);1<this.g.length&&sA(this.G);c.X(this.j,g);c=pa(this.nB,e);this.context.g.listen(b,"click",c,this);this.context.g.listen(d,"click",c,this);this.context.g.listen(b,"touchend",c,this);this.context.g.listen(d,"touchend",
c,this);kA(this,a.startMs,a.endMs,a.id,pa(this.oB,a),this.pB);GB(this,mA(this))}};f.vf=function(a,b,c,d,e,g){Dd(a,"article","iv-card-active")?yB.H.vf.call(this,a,b,c,d,e,g):g.preventDefault()};f.nB=function(a,b){var c=ib(this.g,function(b){return b===a});HB(this,c,!0);Dd(b.target,"button","yt-uix-button")||b.stopPropagation()};f.oB=function(){++this.J;IB(this)?FB(this):this.F=!0;Dg(this.o,"iv-cards-notif-inactive")};f.pB=function(){--this.J;0==this.J&&N(this.o,"iv-cards-notif-inactive")};
function JB(a,b){if(!a.Zb){a.xe();var c=new X(["div","",["span","",b.C],["span","iv-card-image",{style:"background-image: url("+b.B+");"}]]);a.we.innerHTML="";id(a.we,nd(c.L()))}}function FB(a){if(!a.Zb){var b=KB(a);if(!(0>b)){var c=a.g[b].nb;JB(a,c);kg(a.we,"");var d=a.we.offsetWidth;(new yz(a.we,0,d,400,Fz)).play();iA(a.context.logger,c.za,8,null,c.g.Vp);a.Zb={He:new dr(function(){this.Zb&&((new yz(this.we,d,0,200,Fz)).play(),this.Zb=null)},c.teaserDurationMs,a),mp:b};a.Zb.He.start()}}}
function EB(a){a.xe();CB(a.o)}
f.Mq=function(a){a&&a.stopPropagation();if(!this.C){a=new hz;jg(this.L(),this.context.k.qf);for(var b=0;b<this.g.length;++b){var c=this.g[b].Fg;a.add(CB(c));pg(c,0);qg(c,!0);a.add(AB(c,b*(c.offsetWidth+15)))}a.add(BB(this.o));a.add(CB(this.A));for(b=0;b<this.g.length;++b)a.add(CB(this.g[b].Cg));this.C=!0;Um(a,"end",this.np,!1,this);a.play();this.D=y();this.j.style.width=445*this.g.length+"px";qg(this.j,!0);pg(this.j,1);this.xe();a=this.Zb?this.Zb.mp:Math.max(0,KB(this));HB(this,a,!1);a=this.g[a].nb;
this.Zb?iA(this.context.logger,a.za,9,null,a.g.ep):iA(this.context.logger,a.za,9,50,void 0);this.M=this.context.g.listen(this.L(),"keydown",this.fx,this)}};f.np=function(){this.C=!1};f.fx=function(a){switch(a.keyCode){case 27:this.Vi();a.preventDefault();break;case 37:0<this.k&&HB(this,this.k-1,!0);a.preventDefault();break;case 39:this.k+1<this.g.length&&HB(this,this.k+1,!0);a.preventDefault();break;case 9:HB(this,this.k+1<this.g.length?this.k+1:0,!0),a.preventDefault()}return!1};
f.Vi=function(a){a&&a.stopPropagation();if(!this.C){var b=new hz;C(this.g,function(a){b.add(BB(a.Fg));b.add(AB(a.Fg,0))});b.add(BB(this.A));b.add(CB(this.o));b.add(BB(this.j,function(){jg(this.L(),"","")},this));this.C=!0;Um(b,"end",this.np,!1,this);b.play();a={};a.interval=y()-this.D;var c=this.g[this.k];c&&hA(this.context.logger,c.nb.za,a,c.nb.g.close);this.M&&this.context.g.Ga(this.M)}};f.Aw=function(){"none"!=this.j.style.display&&this.context.j.pauseVideo()};
function HB(a,b,c){var d=a.g[b];a.P.focus();if(a.k!=b){if(0<=a.k){var e=a.g[a.k];Dg(e.Fg,"yt-uix-button-toggled");Dg(e.Cg,"iv-card-active")}a.k=b;N(d.Fg,"yt-uix-button-toggled");N(d.Cg,"iv-card-active");AB(a.j,LB(a).x).play();b={};b.nav=c?"1":"0";cA(a.context.logger,d.nb.za,b,d.nb.g.xp)}}function LB(a){var b=mA(a),c=b.right-b.left,b=b.bottom-b.top,d=mg(a.j);return new Kb(445*-(isNaN(void 0)?a.k||0:NaN)+(c-445)/2,(b-d.height+(1<a.g.length?63:0))/2)}
f.xe=function(){var a=mA(this);a&&(GB(this,a),rA(this.j)&&(jg(this.L(),this.context.k.qf),Yf(this.j,LB(this))),Yf(this.L(),a.left,a.top))};f.Tc=function(a){IB(this,a)&&this.F&&(this.F=!1,FB(this))};function GB(a,b){var c=(b?445<b.right-b.left&&243<b.bottom-b.top:!1)&&!!a.g.length;qA(a.L(),c)}function IB(a,b){return 2==ow(a.context.j.app).getPlayerType()?1==(isNaN(b)?a.context.j.getAdState():b):1==(isNaN(b)?a.context.j.getPlayerState():b)}
function KB(a){var b=1E3*a.context.j.getCurrentTime();return kb(a.g,function(a){return a.nb.startMs<=b&&b<a.nb.endMs})};function MB(a,b,c){this.g=a;this.A=b;this.j=c}function NB(a,b){var c=OB(a,b.url,b.id),d=b.k&&b.k["iv-blob-subscribe"]?["div","iv-blob-subscribe"]:PB(b),c=new X(["article","",["div",["iv-card-image","iv-click-target"],{style:"background-image: url("+b.D+");"}],["div",["iv-card-content","iv-click-target"],["h2","",["a",{href:c},b.title]],d]]),e=c.L();Ob(b.k,function(a,b){var c=Uc(b,e);C(c,function(b){b.innerHTML=a})},c);bz(a.g.g,e,"click",pa(a.k,b),"iv-click-target",a);return c}
function QB(a,b){var c=OB(a,b.url,b.id),c=["article","iv-card-playlist",["div",["iv-card-image","iv-click-target"],["img",{src:b.k,alt:""}],["div","iv-card-image-overlay",["span","iv-card-playlist-video-count",b.playlistVideoCount.toString()],["span","iv-card-playlist-play-all",lf("YTP_PLAY_ALL")]]],["div",["iv-card-content","iv-click-target"],["h2","",["a",{href:c},b.title]],PB(b)]],c=new X(c),d=c.L();RB(a,d,b);return c}
function SB(a,b){var c=["ul","yt-uix-form-list-option"];ub(c,D(b.options,function(a){return["li","",["label","iv-click-target",["span","yt-uix-form-input-radio-container",["input","yt-uix-form-input-radio",{type:"radio",name:"radio",value:a.index.toString()}],["span","yt-uix-form-input-radio-element"]]," ",a.desc]]}));var c=["article","iv-card-poll",["div","iv-card-content",["h2","",b.title],["form","",c,["button",["yt-uix-button","yt-uix-button-size-default","yt-uix-button-primary"],["span","yt-uix-button-content",
lf("YTP_DRAWER_POLL_SUBMIT")]]]]],c=new X(c),d=c.L();bz(a.g.g,d,"click",pa(a.o,b),"yt-uix-button",a);return c}function TB(a,b){var c=OB(a,b.url,b.id),c=new X(UB(b,c)),d=c.L();RB(a,d,b);return c}function VB(a,b){var c=OB(a,b.url,b.id),c=new X(UB(b,c)),d=c.L();bz(a.g.g,d,"click",pa(a.B,b),"iv-click-target",a);return c}
function WB(a,b){var c=OB(a,b.url,b.id),c=["article","iv-card-video",["div",["iv-card-image","iv-click-target"],["img",{src:b.o,alt:""}],["span","iv-card-video-duration",b.k]],["div",["iv-card-content","iv-click-target"],["h2","",["a",{href:c},b.title]],PB(b)]],c=new X(c),d=c.L();RB(a,d,b);return c}function PB(a){var b=["ul","iv-card-meta-info"];C(a.j,function(a){b.push(["li","",a])});return b}
function UB(a,b){var c={href:b},d={href:b};a.showLinkIcon&&(c["class"]="iv-card-link-icon",d["class"]="iv-card-link-icon");a.k&&(d["class"]="iv-card-button-icon",d.style="background-image: url("+a.k+");");return["article","",["div",["iv-card-image","iv-click-target"],{style:"background-image: url("+a.imageUrl+");"},a.displayDomain?["a",c,a.displayDomain]:""],["div",["iv-card-content","iv-click-target"],["h2","",a.title],["a",d,a.o]]]}
MB.prototype.k=function(a,b){Dd(b.target,"","iv-blob-subscribe")?b.preventDefault():this.j(b.target,a.url,a.id,a.za,a.g.click,b)};MB.prototype.o=function(a,b){b.stopPropagation();b.preventDefault();var c=a.id,d;t:{if(d=b.currentTarget.form.elements.radio){if(d.type){d=Ri(d);break t}for(var e=0;e<d.length;e++){var g=Ri(d[e]);if(g){d=g;break t}}}d=null}ej(this.g.o.uh,{Me:{action_poll_vote:1},ab:{poll_id:c,index:d}})};
MB.prototype.B=function(a,b){b.stopPropagation();b.preventDefault();ef("YPC_LOADER_ENABLED")?(this.g.j.pauseVideo(),this.g.j.isFullscreen()&&xB(this.g.j.app),gA(this.g.logger,a.za,a.g.click),lB(a.F,a.D,a.A)):this.j(b.target,a.url,a.id,a.za,a.g.click,b)};function OB(a,b,c){return b?Zz(b,c,a.g.o.videoId,a.g.k):null}function RB(a,b,c){a.A(b,c.url,c.id,c.za,c.g.click)};function XB(a,b){jA.call(this,a,b);this.o=this.C=this.F=!1;this.Qk=!0;this.A=new MB(b,x(this.Rd,this),x(this.vf,this));var c=["header","iv-drawer-header",lf("YTP_DRAWER_HEADER_TEXT"),["button","iv-drawer-close-button"]];this.B=(new X(c)).L();this.ze=(new X(["section","iv-drawer"])).L();this.j=(new X(["div","iv-drawer-teaser",["div","iv-drawer-teaser-background"],["div","iv-drawer-teaser-text"],["button","",["span"]]])).L();this.G=G("iv-drawer-teaser-text",this.j);this.Cc=null;this.g=[];this.k=-1;
kA(this,1E3*b.o.lengthSeconds-1200,2147483647,"",this.Ow)}z(XB,jA);var YB={associated:AA,channel:xA,fundraising:AA,merch:AA,playlist:yA,poll:zA,product:AA,tip:BA,video:CA};function ZB(a){a=Fd(a.L(),"ytp-iv-player-content");if(!a)return!1;a=mg(a);return 177<a.width&&177<a.height}
function $B(a){Cg(a.L(),["html5-stop-propagation","iv-drawer-manager"]);a.L().appendChild(a.j);a.L().appendChild(a.B);a.L().appendChild(a.ze);bz(a.context.g,a.B,"click",a.LB,"iv-drawer-close-button",a);a.context.g.listen(a.ze,"scroll",a.MB,a);a.context.g.listen(a.j,"click",a.NB,a);a.context.g.listen(a.j,"mouseover",function(){this.Cc&&this.Cc.He.stop()},a);a.context.g.listen(a.j,"mouseout",function(){this.Cc&&this.Cc.He.start()},a);a.context.Ra.subscribe("onHideControls",function(){this.Qk=!0},a);
a.context.Ra.subscribe("onShowControls",function(){this.Qk=!1},a)}f=XB.prototype;f.as=function(a){var b=a&&a.data&&a.data.card_type;b&&YB[b]&&this.add(new YB[b](a.id,a.data,a.za))};
f.add=function(a){this.F||($B(this),this.F=!0);var b,c;switch(a.type){case "associated":case "fundraising":case "merch":case "product":b=TB(this.A,a);break;case "tip":b=VB(this.A,a);break;case "video":b=WB(this.A,a);break;case "playlist":b=QB(this.A,a);break;case "channel":b=NB(this.A,a);break;case "poll":b=SB(this.A,a)}if(b){c=b.L();c={nb:a,Cg:c,Bs:!1,Bq:!1};var d=yb(this.g,c,function(a,b){return a.nb.startMs-b.nb.startMs});0>d&&(d=-(d+1));vb(this.g,d,0,c);b.X(this.ze,d);kA(this,a.startMs,a.startMs+
1,a.id,pa(this.rD,c));this.xe()}};function aC(a){if(!(a.Cc||a.o||0>a.k)){N(a.j,"iv-drawer-teaser-active");var b=a.g[a.k].nb;a.Cc={He:new dr(a.jq,b.endMs-b.startMs,a),mp:a.k};a.Cc.He.start();b=bC(a);iA(a.context.logger,b.za,8,null,b.g.Vp)}}f.jq=function(){this.Cc&&(Dg(this.j,"iv-drawer-teaser-active"),L(x(function(){this.Cc=null},this),330))};
function cC(a,b){b&&b.stopPropagation();a.jq();N(a.L(),"iv-drawer-open");a.o=!0;N(a.context.j.Qa(),"ytp-iv-drawer-open");a.D=y();var c=bC(a);iA(a.context.logger,c.za,7,51,void 0);C(a.g,function(a){a.Bq||(a.Bq=!0,cA(this.context.logger,a.nb.za,null,a.nb.g.xp))},a)}f.MB=function(){O(this.L(),"iv-drawer-scrolled",0<this.ze.scrollTop)};
f.LB=function(a){var b=bC(this);iA(this.context.logger,b.za,4,51,b.g.close);a&&a.stopPropagation();Dg(this.L(),"iv-drawer-open");this.o=!1;Dg(this.context.j.Qa(),"ytp-iv-drawer-open");a=bC(this);iA(this.context.logger,a.za,10,51,void 0)};f.NB=function(a){if(!this.o){var b=bC(this);this.Cc?iA(this.context.logger,b.za,9,null,b.g.ep):iA(this.context.logger,b.za,9,50,void 0);cC(this,a)}};f.Ow=function(){this.o&&this.context.j.pauseVideo()};
f.rD=function(a){if(!this.Cc){var b=ib(this.g,function(b){return b===a});this.k!=b&&(this.k=b,td(this.G,a.nb.C));rA(this.L())&&(2==ow(this.context.j.app).getPlayerType()?1==(isNaN(void 0)?this.context.j.getAdState():void 0):1==(isNaN(void 0)?this.context.j.getPlayerState():void 0))&&aC(this);this.o&&!this.Qk||dC(this,b)}};
function dC(a,b){var c=new rz([0,a.ze.scrollTop],[0,a.g[b].Cg.offsetTop],600,Ez);a.context.g.listen(c,"animate",function(a){this.ze.scrollTop=a.y},a);a.context.g.listen(c,"finish",function(a){this.ze.scrollTop=a.y},a);c.play()}f.xe=function(){var a=ZB(this)&&!!this.g.length;qA(this.L(),a);a&&(this.C||(a=bC(this),iA(this.context.logger,a.za,11,51,void 0),this.C=!0),C(this.g,function(a){a.Bs||(a.Bs=!0,iA(this.context.logger,a.nb.za,11,null,void 0))},this))};
function bC(a){var b=Math.max(0,a.k);return a.g[b].nb};function eC(a,b,c){jA.call(this,a,b);this.annotation=c;this.isActive=!1}z(eC,jA);eC.prototype.uj=function(){eC.H.uj.call(this);var a=this.annotation.data;"start_ms"in a&&"end_ms"in a&&kA(this,this.annotation.data.start_ms,this.annotation.data.end_ms,this.annotation.id,this.show,this.hide)};function fC(a,b,c){eC.call(this,a,b,c);this.g=null;this.k=!1;this.qj=null;this.ud=!1;this.j=0}z(fC,eC);
function gC(a){N(a.L(),"iv-branding");var b=a.annotation.data;a.j=b.image_width;a.g=H("img",{src:b.image_url,"class":"branding-img iv-click-target iv-view-target hid",width:b.image_width,height:b.image_height});var c=H("div","branding-img-container",a.g);a.L().appendChild(c);var d=H("div","iv-branding-context-name");td(d,b.channel_name);var e=H("div","iv-branding-context-subscribe");a.annotation.k?e.innerHTML=a.annotation.k:b.num_subscribers&&td(e,b.num_subscribers);c=H("div","iv-branding-context-subscribe-caret");
d=H("div",["branding-context-container-inner","iv-view-target"],c,d,e);e=H("div","branding-context-container-outer",d);Uf(e,"right",a.j+"px");a.L().appendChild(e);a.Rd(a.L(),hC(a.annotation),a.annotation.id,a.annotation.za);a.qj=new dr(pa(function(a){var b=mg(a.parentElement);(new xz(a.parentElement,[b.width,b.height],[0,0],200,Dz)).play();this.ud=!1},d),500,a);bz(a.context.g,a.L(),"mouseover",pa(function(a,b,c){this.qj.stop();if(!this.ud){var d=mg(a);kg(a,d.width);c=Math.min(d.height,c);c=Math.max(c/
2-10,0);Yf(b,d.width,c);this.ud=!0;b=9;d=mg(a);c=mg(a.parentElement);(new xz(a.parentElement,[c.width,c.height],[d.width+b,d.height],200,Dz)).play()}},d,c,b.image_height),"iv-view-target",a);bz(a.context.g,a.L(),"mouseout",x(a.qj.start,a.qj),"iv-view-target",a)}
fC.prototype.show=function(){if(!this.isActive){fC.H.show.call(this);this.k||(gC(this),this.k=!0);cA(this.context.logger,this.annotation.za);sA(this.L());this.isActive=!0;var a=this.g,b,c=og(a).width,d=ha(void 0)?void 0:c;b=b||0;Yf(a,d);b=new vz(a,[d,a.offsetTop],[d-c-b,a.offsetTop],200,Dz);Nm(b,"begin",pa(sA,a));b.play()}};fC.prototype.hide=function(){this.isActive&&(tA(this.L()),this.isActive=!1)};function iC(a,b,c,d,e,g){this.g=a;this.k=b;this.o=c;this.logger=d;this.j=e;this.Ra=g};function jC(a){this.value=a};function kC(a,b,c,d){this.type=a;this.trigger=b;this.url=c;this.duration=d}var lC={CLOSE:"close",jJ:"openUrl",PAUSE:"pause",KG:"subscribe"},mC={CLICK:"click",CLOSE:"close",gI:"hidden",BJ:"rollOut",HG:"rollOver",IG:"shown"};function nC(a){if(!a)return null;var b=Kz(a.type,lC),c=Kz(a.trigger,mC),d=Uz(Gz(a.url));Gz(a.subscribeData);(a=Gz(a.duration))?(a=Oz(a.value),a=new jC(a)):a=null;return b?new kC(b,c,d,a):null};function oC(a,b,c,d,e,g,h,k,m,p,r,t,v,I){this.B=a;this.A=b;this.C=c;this.D=d;this.k=e;this.I=g;this.o=h;this.textAlign=k;this.J=m;this.F=p;this.G=r;this.g=t;this.j=v;this.N=I}
function pC(a){if(!a)return null;var b=Iz(a.fgColor,"#1A1A1A"),c=Iz(a.bgColor,"#FFF"),d=Iz(a.borderColor,"#000"),e=Nz(a.borderWidth,10,0,5,!1,0),g=Nz(a.bgAlpha,10,0,1,!1,.8);Nz(a.borderAlpha,10,0,1,!1,.2);Nz(a.gloss,16,0,255,!1,0);var h=Iz(a.highlightFontColor,"#F2F2F2"),k=Nz(a.highlightWidth,10,0,5,!1,3),m=Jz(a.textAlign),p=Nz(a.textSize,10,3.3,30.1,!0,3.6107),r=Jz(a.fontWeight),t=Qz(a.padding),v=Rz(a.effects),I=Nz(a.cornerRadius,10,0,10,!0,0);var R=Gz(a.gradient);if(R){a=Nz(R.x1,10,0,100,!0,0);
var ea=Nz(R.y1,10,0,100,!0,0),ta=Nz(R.x2,10,0,100,!0,100),Ve=Nz(R.y2,10,0,100,!0,100),dh=Iz(R.color1,"#FFF"),Sr=Iz(R.color2,"#000"),ez=Nz(R.opacity1,10,0,100,!0,100),R=Nz(R.opacity2,10,0,100,!0,0);a=new qC(a,ea,ta,Ve,dh,Sr,ez,R)}else a=null;return new oC(b,c,d,e,g,h,k,m,p,r,t,v,I,a)}function qC(a,b,c,d,e,g,h,k){this.A=a;this.C=b;this.B=c;this.D=d;this.g=e;this.j=g;this.k=h;this.o=k};function rC(a,b){this.g=a;this.videoId=b};var sC={KK:"xx",LK:"xy",PK:"yx",QK:"yy"};function tC(a,b,c){var d=a.C,e=a.D,g=a.g?a.g:"xy",h=uC(c,a.o,g);a=vC(c,a.k,g);var g=640*b.width*h/100,k=360*b.height*a/100;return new Lf(0==d?640*b.left*h/100:0<d?d:c.width+d-g,0==e?360*b.top*a/100:0<e?e:c.height+e-k,g,k)}function uC(a,b,c){var d=(c="xx"==c||"xy"==c)?640:360;return(d+((c?a.width:a.height)-d)*b)/d}function vC(a,b,c){var d=(c="xy"==c||"yy"==c)?360:640;return(d+((c?a.height:a.width)-d)*b)/d};function wC(a,b,c,d,e,g,h,k,m,p,r){this.x=a;this.y=b;this.A=c;this.h=d;this.j=e;this.B=g;this.C=h;this.D=k;this.o=m;this.k=p;this.g=r}function xC(a,b){if(!a)return null;var c=Mz(a.x,0),d=Mz(a.y,0),e=Mz(a.w,0),g=Mz(a.h,0),h=Oz(a.t),k=Mz(a.scaleSlope,1);return b(c,d,e,g,h,Mz(a.d,0),Mz(a.px,0),Mz(a.py,0),Mz(a.scaleSlopeX,k),Mz(a.scaleSlopeY,k),Kz(a.scaleDimension,sC,"xy"))}
function yC(a,b,c){c=c?yC(c,b):null;a=tC(a,new Lf(a.x,a.y,a.A,a.h),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);c=a.clone();b&&!b.contains(a)&&(a.width<b.width?c.left=Ib(a.left,b.left,b.left+b.width-a.width):(c.left=b.left,c.width=b.width),a.height<b.height?c.top=Ib(a.top,b.top,b.top+b.height-a.height):(c.top=b.top,c.height=b.height));return c}function zC(a){return a?xC(a,function(a,c,d,e,g,h,k,m,p,r,t){return new wC(a,c,d,e,g,h,k,m,p,r,t)}):null};function AC(a,b,c,d,e,g,h,k,m,p,r,t,v){wC.call(this,a,b,c,d,e,k,m,p,r,t,v);this.F=g;this.G=h}z(AC,wC);function BC(a){if(!a)return null;var b=Mz(a.sx,0),c=Mz(a.sy,0);return xC(a,function(a,e,g,h,k,m,p,r,t,v,I){return new AC(a,e,g,h,k,b,c,m,p,r,t,v,I)})};function CC(a,b,c,d){this.type=a;this.j=b;this.g=c;this.k=d}var DC={sG:"anchored",vJ:"rect",JJ:"shapeless"};function EC(a){if(!a)return null;var b=Kz(a.type,DC,"rect"),c=Pz(a.rectRegion,zC),d=Pz(a.anchoredRegion,BC);a=Pz(a.shapelessRegion,zC);return new CC(b,c,d,a)}function FC(a){return a.j&&a.j.length?a.j[0]:a.g&&a.g.length?a.g[0]:a.k&&a.k.length?a.k[0]:null};function GC(a,b){this.j=a;this.g=b};function HC(a,b){this.state=a;this.g=b}var IC={CLOSED:"closed",kJ:"playerControlShow",HG:"rollOver",IG:"shown"};function JC(a){if(!a)return null;var b=Kz(a.state,IC);a=Hz(a.ref);return b?new HC(b,a):null};function KC(a,b,c,d){this.g=a||[];this.k=b||[];this.o=c;this.j=d;this.value=!1}function LC(a){if(!a)return null;var b=Pz(a.condition,JC),c=Pz(a.notCondition,JC),d=Lz(a.show_delay,!1);a=Lz(a.hide_delay,!1);return b||c?new KC(b,c,d,a):null}function MC(a,b,c){C(a.g,pa(b,!1),c);C(a.k,pa(b,!0),c)};function NC(a,b,c,d,e,g,h,k,m,p,r,t,v,I,R,ea){this.id=a;this.author=b;this.type=c;this.style=d;this.B=e;this.j=g;this.A=h||[];this.D=k||[];this.g=m;this.F=p;this.o=r;this.C=t;this.k=I;this.data=R;this.za=ea}
var OC={sG:"anchored",uG:"branding",MH:"channel",RH:"cta",pI:"highlightText",CI:"label",mJ:"playlist",nJ:"popup",PJ:"speech",KG:"subscribe",cK:"title",VIDEO:"video",EK:"vote",HK:"website"},PC={uG:"branding",DH:"card",oI:"highlight",qu:"image",MARKER:"marker",PAUSE:"pause",sJ:"promotion",vs:"survey",TEXT:"text",IK:"widget"},QC={AK:"video_relative",lJ:"player_relative"};
function RC(a){if(!a)return null;var b=Hz(a.id),c=Hz(a.author),d=Kz(a.type,PC),e=Kz(a.style,OC),g=Jz(Gz(a.TEXT)),h=Jz(a.data),h=0!=h.length?Bf(h):{},k;var m=Gz(a.segment);m?(Hz(m.timeRelative),k=Hz(m.spaceRelative),k=(m=Pz(m.movingRegion,EC))?new GC(k,m):null):k=null;var m=Pz(a.action,nC),p=Pz(a.trigger,LC),r=pC(Gz(a.appearance));r||(r=pC({}));var t=Kz(a.coordinate_system,QC,"video_relative"),v;v=(v=Gz(a.image_source))?new rC(Jz(v.standard_url),Jz(v.video_id)):null;var I=Lz(a.closeable,!0),R=Jz(a.html_blob);
a=Jz(a.log_data);return b&&d?new NC(b,c,d,e,g,k,m,p,r,t,v,I,0,R,h,a):null}function hC(a){return(a=SC(a,function(a){return"openUrl"==a.type&&null!=a.url}))?a.url:null}NC.prototype.showLinkIcon=function(){return TC(this,function(a){return null!=a.url&&a.url.showLinkIcon})};function UC(a){return TC(a,function(a){return"click"==a.trigger})}function TC(a,b){return gb(a.A,b,void 0)}function VC(a,b,c){C(a.A,b,c)}function SC(a,b){return E(a.A,b,void 0)}function WC(a,b,c){C(a.D,b,c)}
function XC(a,b){D(a.D,b,void 0)}function YC(a){return(a=ZC(a))?FC(a):null}function ZC(a){a.j?(a=a.j,a=a.g.length?a.g[0]:null):a=null;return a}function $C(a,b){var c=YC(a);return c&&b?vC(b,c.k,c.g?c.g:"xy"):1};function aD(a,b,c){eC.call(this,a,b,c);this.Xi=this.j=this.o=!1;this.k=5E3;this.g=null;this.Mf=H("div","iv-promo-contents")}z(aD,eC);
function bD(a){var b=a.annotation.data;a.k=b.collapse_delay_ms||a.k;var c=["iv-promo","iv-promo-inactive"],d;if(b.image_url){d=H("div","iv-promo-img");var e=H("img",{src:b.image_url,"class":"iv-click-target"});d.appendChild(e);b.video_duration&&!b.is_live?(e=H("span",["iv-promo-video-duration","iv-click-target"],b.video_duration),d.appendChild(e)):b.playlist_length&&(e=H("span",["iv-promo-playlist-length","iv-click-target"],b.playlist_length.toString()),d.appendChild(e))}var e=H("div","iv-promo-txt"),
g,h,k;switch(a.annotation.style){case "cta":case "website":g=H("p","iv-click-target",H("strong",null,b.text_line_1));h=H("p",["iv-promo-link","iv-click-target"],b.text_line_2);N(e,"iv-click-target");break;case "playlist":case "video":g=H("p","iv-click-target",b.text_line_1);h=H("p","iv-click-target",H("strong",null,b.text_line_2));b.is_live&&(g=h,h=H("span",["yt-badge","iv-promo-badge-live","iv-click-target"],lf("YTP_LIVE_NOW")));N(e,"iv-click-target");c.push("iv-promo-video");break;case "vote":g=
H("p",null,H("strong",null,b.text_line_1)),h=H("p",null,b.text_line_2),k=H("div","iv-promo-button"),b=H("button",["yt-uix-button","yt-uix-button-primary"],H("span","yt-uix-button-content",b.button_text)),a.context.g.listen(b,"click",function(a){a.stopPropagation();gA(this.context.logger,this.annotation.za,null,{contest_vote:"1"});var b=this.annotation.data;a=G("iv-promo-txt",this.Mf);var c=G("iv-promo-button",this.Mf),d=H("div",["iv-promo-txt","iv-click-target"]),e=H("p","iv-click-target",H("strong",
null,b.text_line_3)),b=H("p","iv-click-target",b.text_line_4);id(d,e,b);ld(c);md(d,a);Dg(this.L(),"iv-promo-with-button");this.Rd(this.Mf,hC(this.annotation),this.annotation.id,this.annotation.za)},a),k.appendChild(b),c.push("iv-promo-with-button")}g&&e.appendChild(g);h&&e.appendChild(h);a.Mf.appendChild(e);k&&a.Mf.appendChild(k);g=H("div","iv-promo-actions");h=H("div","iv-promo-expand");g.appendChild(h);a.context.g.listen(a.L(),"mouseover",a.$r,a);a.context.g.listen(h,"touchend",function(a){a.stopPropagation();
this.$r();this.Xi=!1},a);a.context.g.listen(a.L(),"mouseout",a.A,a);h=H("div","iv-promo-close");g.appendChild(h);cD(a,x(function(){this.hide()},a),h);Cg(a.L(),c);d&&hd(a.L(),d);hd(a.L(),a.Mf);hd(a.L(),g);a.Rd(a.L(),hC(a.annotation),a.annotation.id,a.annotation.za)}
aD.prototype.show=function(){this.isActive||(aD.H.show.call(this),this.o||(bD(this),this.o=!0),sA(this.L()),this.annotation&&this.annotation.za&&cA(this.context.logger,this.annotation.za),Dg(this.L(),"iv-promo-inactive"),this.isActive=!0,this.g&&(Gn(this.g),this.g=null),dD(this),eD(this,this.k))};aD.prototype.hide=function(){this.isActive&&(N(this.L(),"iv-promo-inactive"),this.isActive=!1)};aD.prototype.$r=function(){this.Xi=!0;dD(this);eD(this,500)};aD.prototype.A=function(){this.Xi=!1;fD(this)};
function fD(a){a.j||a.Xi||a.g||(N(a.L(),"iv-promo-collapsed"),a.j=!0)}function dD(a){a.j&&(Dg(a.L(),"iv-promo-collapsed"),a.j=!1)}function eD(a,b){a.g||(a.g=Fn(function(){this.g&&(Gn(this.g),this.g=null);fD(this)},b,a))}function cD(a,b,c){function d(a){hA(this.context.logger,this.annotation.za);b(a);a.stopPropagation()}a.context.g.listen(c,"click",x(d,a));a.context.g.listen(c,"touchend",x(d,a))};function gD(a,b,c){this.g={};this.j=!1;this.A="ivTrigger:"+a;this.k=c;MC(b,function(a,b){var c=hD(b.state,b.g);this.k.subscribe(c,x(this.o,this,c,a));this.g[c]=a},this)}gD.prototype.o=function(a,b,c,d){this.g[a]=b?!c:c;a=Sb(this.g,function(a){return a});this.j!=a&&(this.j=a,this.k.publish(this.A,a,d))};function hD(a,b){var c="ivTriggerCondition:"+a;return b?c+":"+b:c};function iD(a,b,c){this.k=a;this.annotation=b;this.g=c;this.j=null;this.A=this.isVisible=!1;jD(b,a)}function jD(a,b){XC(a,function(c){return new gD(a.id,c,b)})}iD.prototype.hide=function(){this.isVisible=!1;this.k.unsubscribe("onResize",this.o,this);this.g&&this.g.hide()};iD.prototype.show=function(){this.isVisible=!0;this.g&&this.g.show();this.k.subscribe("onResize",this.o,this)};
iD.prototype.destroy=function(){this.k.unsubscribe("onResize",this.o,this);if(this.g){var a=this.g;a.D.removeAll();a.j&&ld(a.j);a.k&&a.k.L()&&ld(a.k.L())}kD(this)};function kD(a){a.j&&(a.j.stop(),a.j=null)}iD.prototype.o=function(){this.g&&lD(this.g)};function mD(){};function nD(a,b,c,d,e,g,h,k){this.A=a;this.C=b;this.B=c;this.D=d;this.g=e;this.j=g;this.k=n(h)?h:null;this.o=n(k)?k:null}z(nD,mD);function oD(){this.ga=[];this.ja=[];this.Dd=[]}oD.prototype.hg=null;oD.prototype.ed=null;oD.prototype.Zj=!0;var pD=[2,2,6,6,0];f=oD.prototype;f.clear=function(){this.ga.length=0;this.ja.length=0;this.Dd.length=0;delete this.hg;delete this.ed;delete this.Zj;return this};function qD(a,b,c){0==ab(a.ga)?a.Dd.length-=2:(a.ga.push(0),a.ja.push(1));a.Dd.push(b,c);a.ed=a.hg=[b,c]}
f.bb=function(a){var b=ab(this.ga);if(null==b)throw Error("Path cannot start with lineTo");1!=b&&(this.ga.push(1),this.ja.push(0));for(b=0;b<arguments.length;b+=2){var c=arguments[b],d=arguments[b+1];this.Dd.push(c,d)}this.ja[this.ja.length-1]+=b/2;this.ed=[c,d]};f.close=function(){var a=ab(this.ga);if(null==a)throw Error("Path cannot start with close");4!=a&&(this.ga.push(4),this.ja.push(1),this.ed=this.hg);return this};
function rD(a,b,c,d,e){var g=a.ed[0]-b*Math.cos(d*Math.PI/180),h=a.ed[1]-c*Math.sin(d*Math.PI/180),g=g+b*Math.cos((d+e)*Math.PI/180),h=h+c*Math.sin((d+e)*Math.PI/180);a.ga.push(3);a.ja.push(1);a.Dd.push(b,c,d,e,g,h);a.Zj=!1;a.ed=[g,h]}function sD(a,b){for(var c=a.Dd,d=0,e=0,g=a.ga.length;e<g;e++){var h=a.ga[e],k=pD[h]*a.ja[e];b(h,c.slice(d,d+k));d+=k}}
f.clone=function(){var a=new this.constructor;a.ga=this.ga.concat();a.ja=this.ja.concat();a.Dd=this.Dd.concat();a.hg=this.hg&&this.hg.concat();a.ed=this.ed&&this.ed.concat();a.Zj=this.Zj;return a};f.isEmpty=function(){return 0==this.ga.length};function tD(a,b){this.F=a;this.G=null==b?1:b}z(tD,mD);function uD(a,b){this.g=a;this.j=b};function vD(){}ba(vD);vD.prototype.g=0;function wD(a){U.call(this);this.J=a||Qc();this.xa=null;this.Ke=!1;this.g=null;this.A=void 0;this.B=this.D=this.F=null}z(wD,U);f=wD.prototype;f.PD=vD.getInstance();f.getId=function(){return this.xa||(this.xa=":"+(this.PD.g++).toString(36))};f.L=function(){return this.g};f.gi=function(a){if(this.F&&this.F!=a)throw Error("Method not supported");wD.H.gi.call(this,a)};f.wt=function(){this.g=this.J.createElement("div")};
f.xh=function(){xD(this,function(a){a.Ke&&a.xh()});this.A&&this.A.removeAll();this.Ke=!1};f.K=function(){this.Ke&&this.xh();this.A&&(this.A.dispose(),delete this.A);xD(this,function(a){a.dispose()});this.g&&ld(this.g);this.F=this.g=this.B=this.D=null;wD.H.K.call(this)};f.Jc=function(){return this.g};function xD(a,b){a.D&&C(a.D,b,void 0)}
f.removeChild=function(a,b){if(a){var c=w(a)?a:a.getId();a=this.B&&c?ec(this.B,c)||null:null;if(c&&a){dc(this.B,c);pb(this.D,a);b&&(a.xh(),a.g&&ld(a.g));c=a;if(null==c)throw Error("Unable to set parent component");c.F=null;wD.H.gi.call(c,null)}}if(!a)throw Error("Child is not in parent component");return a};function yD(a,b,c,d,e){wD.call(this,e);this.width=a;this.height=b;this.o=c||null;this.G=d||null}z(yD,wD);yD.prototype.k=null;yD.prototype.Kh=function(){return this.Ke?lg(this.L()):ha(this.width)&&ha(this.height)?new F(this.width,this.height):null};function zD(a){var b=a.Kh();return b?b.width/(a.o?new F(a.o,a.G):a.Kh()).width:0}yD.prototype.resume=function(){};function AD(a,b){U.call(this);this.Hh=a;this.Ok=b;this[Bm]=!1}z(AD,U);f=AD.prototype;f.Ok=null;f.Hh=null;f.L=function(){return this.Hh};f.addEventListener=function(a,b,c,d){Nm(this.Hh,a,b,c,d)};f.removeEventListener=function(a,b,c,d){Vm(this.Hh,a,b,c,d)};f.K=function(){AD.H.K.call(this);var a=this.Hh;if(a)if(Cm(a))a.removeAllListeners(void 0);else if(a=Qm(a)){var b=0,c;for(c in a.g)for(var d=a.g[c].concat(),e=0;e<d.length;++e)Wm(d[e])&&++b}};function BD(a,b,c,d){AD.call(this,a,b);a=this.Ok;b=this.L();c?(b.setAttribute("stroke",c.j),b.setAttribute("stroke-opacity",1),c=c.g,w(c)&&-1!=c.indexOf("px")?b.setAttribute("stroke-width",parseFloat(c)/zD(a)):b.setAttribute("stroke-width",c)):b.setAttribute("stroke","none");c=this.Ok;a=this.L();if(d instanceof tD)a.setAttribute("fill",d.F),a.setAttribute("fill-opacity",d.G);else if(d instanceof nD){b="lg-"+d.A+"-"+d.C+"-"+d.B+"-"+d.D+"-"+d.g+"-"+d.j;var e=CD(c,b);if(!e){var e=DD(c,"linearGradient",
{x1:d.A,y1:d.C,x2:d.B,y2:d.D,gradientUnits:"userSpaceOnUse"}),g="stop-color:"+d.g;ha(d.k)&&(g+=";stop-opacity:"+d.k);g=DD(c,"stop",{offset:"0%",style:g});e.appendChild(g);g="stop-color:"+d.j;ha(d.o)&&(g+=";stop-opacity:"+d.o);d=DD(c,"stop",{offset:"100%",style:g});e.appendChild(d);e=ED(c,b,e)}a.setAttribute("fill","url(#"+e+")")}else a.setAttribute("fill","none")}z(BD,AD);function FD(a,b){AD.call(this,a,b)}z(FD,AD);function GD(a,b){AD.call(this,a,b)}z(GD,AD);function HD(a,b,c,d){BD.call(this,a,b,c,d)}z(HD,BD);function ID(a,b){AD.call(this,a,b)}z(ID,FD);ID.prototype.clear=function(){jd(this.L())};function JD(a,b,c,d){BD.call(this,a,b,c,d)}z(JD,HD);function KD(a,b){AD.call(this,a,b)}z(KD,GD);function LD(a,b,c,d,e){yD.call(this,a,b,c,d,e);this.j={};this.N=yc&&!Ic(526);this.I=new Kn(this)}var MD;z(LD,yD);var ND=0;function DD(a,b,c){a=a.J.g.createElementNS("http://www.w3.org/2000/svg",b);if(c)for(var d in c)a.setAttribute(d,c[d]);return a}f=LD.prototype;
f.wt=function(){var a=DD(this,"svg",{width:this.width,height:this.height,overflow:"hidden"}),b=DD(this,"g");this.C=DD(this,"defs");this.k=new ID(b,this);a.appendChild(this.C);a.appendChild(b);this.g=a;this.o&&(this.L().setAttribute("preserveAspectRatio","none"),this.N?this.Wq():this.L().setAttribute("viewBox","0 0 "+(this.o?this.o+" "+this.G:"")))};
f.Wq=function(){if(this.Ke){var a=this.Kh();if(0==a.width)this.L().style.visibility="hidden";else{this.L().style.visibility="";var b=a.width/this.o,a=a.height/this.G;this.k.L().setAttribute("transform","scale("+b+" "+a+") translate(0 0)")}}};
f.Kh=function(){if(!xc)return this.Ke?lg(this.L()):LD.H.Kh.call(this);var a=this.width,b=this.height,c=w(a)&&-1!=a.indexOf("%"),d=w(b)&&-1!=b.indexOf("%");if(!this.Ke&&(c||d))return null;var e,g;c&&(e=this.L().parentNode,g=mg(e),a=parseFloat(a)*g.width/100);d&&(e=e||this.L().parentNode,g=g||mg(e),b=parseFloat(b)*g.height/100);return new F(a,b)};f.clear=function(){this.k.clear();jd(this.C);this.j={}};function OD(a,b,c,d){b=DD(a,"path",{d:PD(b)});c=new JD(b,a,c,d);a.k.L().appendChild(c.L())}
function PD(a){var b=[];sD(a,function(a,d){switch(a){case 0:b.push("M");Array.prototype.push.apply(b,d);break;case 1:b.push("L");Array.prototype.push.apply(b,d);break;case 2:b.push("C");Array.prototype.push.apply(b,d);break;case 3:var e=d[3];b.push("A",d[0],d[1],0,180<Math.abs(e)?1:0,0<e?1:0,d[4],d[5]);break;case 4:b.push("Z")}});return b.join(" ")}function ED(a,b,c){if(b in a.j)return a.j[b];var d="_svgdef_"+ND++;c.setAttribute("id",d);a.j[b]=d;a.C.appendChild(c);return d}
function CD(a,b){return b in a.j?a.j[b]:null}f.xh=function(){LD.H.xh.call(this);this.N&&this.I.Ga(QD(),"tick",this.Wq)};f.K=function(){delete this.j;delete this.C;delete this.k;this.I.dispose();delete this.I;LD.H.K.call(this)};function QD(){MD||(MD=new Dn(400),MD.start());return MD};function RD(a,b,c){this.g=a;this.j=0;this.C=b;this.D=c||70;this.k=!1}RD.prototype.start=function(a){this.B=y();this.j=a;this.A=this.B+this.j;this.k=!0;sA(this.g);hf(this.o);this.o=gf(x(this.F,this),this.D)};RD.prototype.stop=function(){this.k=!1;tA(this.g);this.o&&hf(this.o)};
RD.prototype.F=function(){if(this.k){var a=y(),b;b=0==this.j||a>=this.A?0:1-(a-this.B)/this.j;var c=G("countdowntimer-diminishing-pieslice",this.g),d=Pg("svg",this.g);!d&&this.g.querySelectorAll&&(d=this.g.querySelectorAll("svg"),d=d.length?d[0]:null);var d=parseInt(d.getAttribute("width"),10),e=new oD,g=d/2-5;qD(e,d/2,d/2);e.bb(d/2,5);rD(e,g,g,-90,360*-b);e.bb(d/2,d/2);e.close();c.setAttribute("d",PD(e));a>=this.A&&(this.stop(),this.C&&this.C())}};function SD(){Q.call(this);this.element=this.label=null;this.priority=0;this.o=this.A=!1;this.j=null}z(SD,Q);SD.prototype.listen=function(a,b,c){return this.element.listen(a,b,c||this)};SD.prototype.Ga=function(a){this.element.Ga(a)};function TD(a,b,c,d){X.call(this,["div",{className:"ytp-button","aria-disabled":"{{disabled}}",tabindex:"{{tabindex}}"},"{{content}}"]);this.ia="inline-block";this.G=a;this.J=this.j=this.A=null;this.o=!1;this.listen("click",this.xD);this.listen("keypress",this.yD);this.G.zf(this.element,x(this.wD,this));GA(this,"button");b&&UD(this,b);c&&this.fb(c);d&&(this.j=d)}z(TD,X);function UD(a,b){b&&""!=b&&(a.A&&Dg(a.element,a.A),a.A=b,N(a.element,b))}function VD(a,b){a.J=b;Jy(a.template,"tabindex",b)}f=TD.prototype;
f.wD=function(){return this.o?null:this.j?this.j:null};f.enable=function(){this.o=!1;this.template.update({disabled:null,tabindex:this.J});Dg(this.element,"ytp-disabled")};f.disable=function(){this.o=!0;this.template.update({disabled:"true",tabindex:null});N(this.element,"ytp-disabled")};f.xD=function(a){this.o&&(a.stopImmediatePropagation(),a.preventDefault())};f.yD=function(a){if(13==a.keyCode||32==a.keyCode)a.preventDefault(),this.Qb("click")};
f.K=function(){this.G.tn(this.element);this.G=null;TD.H.K.call(this)};function WD(a,b,c){X.call(this,["div","ytp-segmented-control"]);this.o=a;this.j=-1;this.g=[];if(null!=b)for(ai(this.g),this.g=[],a=0;a<b.length;a++){var d=new TD(this.o);GA(d,"radio");this.g.push(d);c?d.ua(["div",b[a]]):d.ua(b[a]);0!=a&&N(d.L(),"ytp-segmented-control-other");XD(d,a==this.j);d.listen("click",pa(this.k,a),this);d.X(this.element)}GA(this,"radiogroup")}z(WD,X);
WD.prototype.X=function(a,b){WD.H.X.call(this,a,b);for(var c=0,d=0;d<this.g.length;d++)c=Math.max(c,lg(this.g[d].L()).width);if(c)for(d=0;d<this.g.length;d++)kg(this.g[d].L(),c)};function YD(a,b){a.j=b;for(var c=0;c<a.g.length;c++)XD(a.g[c],c==b)}WD.prototype.getSelected=function(){return this.j};function ZD(a,b){for(var c=0;c<a.g.length;c++)VD(a.g[c],b)}
function XD(a,b){var c=a.L();b?(Dg(c,"ytp-segmented-control-deselected"),N(c,"ytp-segmented-control-selected"),c.setAttribute("aria-checked",!0)):(Dg(c,"ytp-segmented-control-selected"),N(c,"ytp-segmented-control-deselected"),c.setAttribute("aria-checked",!1))}WD.prototype.k=function(a){a!=this.j&&(YD(this,a),this.Qb("change"))};WD.prototype.K=function(){ai(this.g);this.g=[];WD.H.K.call(this)};function $D(a){SD.call(this);this.label=Y(0,"YTP_ANNOTATIONS");this.element=new WD(a,[Y(0,"YTP_ON"),Y(0,"YTP_OFF")]);S(this,this.element);this.element.fb(this.label);ZD(this.element,2200);this.priority=3;YD(this.element,1)}z($D,SD);$D.prototype.getSelected=function(){return this.element.getSelected()};function aE(a,b){this.start=a<b?a:b;this.end=a<b?b:a}aE.prototype.clone=function(){return new aE(this.start,this.end)};function bE(){this.g=!1;this.A=this.k=null}function cE(a,b,c){a.k?(jg(a.k.L(),b,c),a.k.clear()):(b=new LD(b,c,void 0,void 0,void 0),a.k=b,a.k.wt(),a.A=H("div"),b=a.k.L(),a.A.appendChild(b));return a.k}bE.prototype.L=function(){return this.A};bE.prototype.j=function(){};function dE(a,b,c){var d=document.createElementNS("http://www.w3.org/2000/svg",a);b&&Ob(b,function(a,b){d.setAttribute(b,a)});for(var e=2;e<arguments.length;e++)d.appendChild(arguments[e]);return d}function eE(a,b){var c;c=":"+(vD.getInstance().g++).toString(36);b.setAttribute("result",c);a.appendChild(b);return c};function fE(a,b){var c=eE(a,dE("feGaussianBlur",{"in":b,stdDeviation:"1.8"})),c=eE(a,dE("feDiffuseLighting",{"in":c,surfaceScale:"4",diffuseConstant:"1"},dE("feDistantLight",{azimuth:"270",elevation:"15","lighting-color":"white"}))),c=eE(a,dE("feComposite",{"in":c,in2:b,operator:"in"}));return eE(a,dE("feComposite",{in2:c,"in":b,operator:"arithmetic",k2:1,k3:.5,k4:0}))}
function gE(a,b){var c=eE(a,dE("feOffset",{"in":b,dx:"-7",dy:"-7"})),c=eE(a,dE("feGaussianBlur",{"in":c,stdDeviation:"3"})),c=eE(a,dE("feColorMatrix",{"in":c,type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"})),d=eE(a,dE("feColorMatrix",{"in":b,type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0"})),d=eE(a,dE("feGaussianBlur",{"in":d,stdDeviation:"1"})),c=eE(a,dE("feComposite",{operator:"out","in":c,in2:d}));return eE(a,dE("feComposite",{operator:"over","in":b,in2:c}))}
function hE(a,b){return b}function iE(a){var b=dE("filter",{filterUnits:"userSpaceOnUse"}),c="SourceGraphic";C(a,function(a){t:{switch(a){case "bevel":a=fE;break t;case "dropshadow":a=gE;break t}a=hE}c=a(b,c)});return b}function jE(a){a=eb(a,function(a){return a in kE});Ab(a,function(a,c){return kE[a]-kE[c]});return a}function lE(a){return E(a,function(a){return"dropshadow"==a})?new Kf(0,7,7,0):new Kf(0,0,0,0)}var kE={bevel:1,dropshadow:2};function mE(a,b,c,d,e){b=nE(b,c,d?d.g/2+1:0);OD(a,b,d,e)}function nE(a,b,c){var d=new oD;qD(d,a.left+b+c,a.top+c);d.bb(a.left+a.width-b-c,a.top+c);rD(d,b,b,-90,90);d.bb(a.left+a.width-c,a.top+a.height-b-c);rD(d,b,b,0,90);d.bb(a.left+b+c,a.top+a.height-c);rD(d,b,b,90,90);d.bb(a.left+c,a.top+b+c);rD(d,b,b,180,90);d.close();return d}function oE(a,b,c,d){var e=a.N;e?a=new nD(e.A*b/100,e.C*c/100,e.B*b/100,e.D*c/100,e.g,e.j,e.k,e.o):(b=pE(d,a.k),a=new tD(a.A,b));return a}
function pE(a,b){return a?Math.max(b,.9):b}function qE(a,b){var c=new Kf(a.top,a.left+a.width,a.top+a.height,a.left),d=lE(b);ja(d)?(c.top-=d.top,c.right+=d.right,c.bottom+=d.bottom,c.left-=d.left):(c.top-=d,c.right+=void 0,c.bottom+=void 0,c.left-=NaN);return Mf(c)}
function rE(a,b,c){if(c.length&&(b=Vc("g",void 0,b),b.length)){var d=jE(c);if(d){c="effects:"+(d?d.join("|"):"");var e=CD(a,c);e?a=e:(d=iE(d),a=0<d.childNodes.length?ED(a,c,d):null)}else a=null;a&&b[0].setAttribute("filter","url(#"+a+")")}};function sE(){bE.call(this);this.o=0}z(sE,bE);
sE.prototype.j=function(a,b,c){var d=a.g,e=d.D,g=this.g&&UC(a),e=(e+=g?1:0)?new uD(e,g?d.B:d.C):null;if(g=YC(a)){var h=yC(g,b,c);if(!(0>=h.width||0>=h.height)){var k;if(k=(a=(a=ZC(a))&&a.g?a.g:null)&&a.length?a[0]:null){var m;c=c?yC(c,b):null;a=tC(k,new Lf(k.F,k.G,k.A,k.h),b);c?(a.top+=c.top,a.left+=c.left):(a.top+=b.top,a.left+=b.left);m=new Kb(a.left,a.top);c=h.clone();a=new Lf(m.x,m.y,1,1);var g=Math.max(c.left+c.width,a.left+a.width),p=Math.max(c.top+c.height,a.top+a.height);c.left=Math.min(c.left,
a.left);c.top=Math.min(c.top,a.top);c.width=g-c.left;c.height=p-c.top;c=qE(c,d.g);a=cE(this,c.width,c.height);var g=oE(d,c.width,c.height,this.g),h=new Lf(h.left-c.left,h.top-c.top,h.width,h.height),r=new Kb(m.x-c.left,m.y-c.top);this.o=17*vC(b,k.k,k.g?k.g:"xy");b=d.j;k=e?e.g/2:0;m=tE(h,r);var p=this.B(h,b,r,m),t=r.x,r=r.y,v=h.width,I=h.height,R=h.left,h=h.top,ea=new oD;qD(ea,R+b+k,h+k);"t"==m&&(ea.bb(p.start,h+k),ea.bb(t,r),ea.bb(p.end,h+k));ea.bb(R+v-b-k,h+k);rD(ea,b,b,-90,90);"r"==m&&(ea.bb(R+
v-k,p.start),ea.bb(t,r),ea.bb(R+v-k,p.end));ea.bb(R+v-k,h+I-b-k);rD(ea,b,b,0,90);"b"==m&&(ea.bb(p.end,h+I-k),ea.bb(t,r),ea.bb(p.start,h+I-k));ea.bb(R+b+k,h+I-k);rD(ea,b,b,90,90);"l"==m&&(ea.bb(R+k,p.end),ea.bb(t,r),ea.bb(R+k,p.start));ea.bb(R+k,h+b+k);rD(ea,b,b,180,90);ea.close();OD(a,ea,e,g);if(e=this.L())N(e,"annotation-shape"),N(e,"annotation-speech-shape"),Yf(e,c.left,c.top),jg(e,c.width,c.height),rE(a,e,d.g)}}}};
function tE(a,b){var c=a.top-b.y,d=b.x-a.left-a.width,e=b.y-a.top-a.height,g=a.left-b.x,h=Math.max(c,d,e,g);if(0>h)return"i";switch(h){case c:return"t";case d:return"r";case e:return"b";case g:return"l"}return"i"}sE.prototype.B=function(a,b,c,d){function e(a,c,d,e){a=Math.min(Math.max(e-2*b,0),a);c=Ib(c-a/2,d+b,d+e-a-b);return new aE(c,c+a)}return"t"==d||"b"==d?e(this.o,c.x,a.left,a.width):"l"==d||"r"==d?e(this.o,c.y,a.top,a.height):new aE(0,0)};function uE(){bE.call(this)}z(uE,bE);uE.prototype.j=function(a,b,c){var d=YC(a);d&&(b=yC(d,b,c),0>=b.width||0>=b.height||(a=a.g,c=qE(b,a.g),d=cE(this,c.width,c.height),mE(d,new Lf(0,0,b.width,b.height),a.j,new uD(!a.o&&this.g?1:a.o,a.A),new tD("#000",0)),b=this.L(),N(b,"annotation-shape"),pg(b,pE(this.g,a.k)),Yf(b,c.left,c.top),jg(b,c.width,c.height)))};function vE(a,b,c){bE.call(this);this.o=a||0;this.C=b||0;this.B=c||!1}z(vE,bE);function wE(a,b){var c=a.width,d=a.height,e=0,g=0;0<b&&(a.width/a.height>b?(d=a.width/b,g=(a.height-d)/2):(c=a.height*b,e=(a.width-c)/2));return new Lf(e,g,c,d)}
vE.prototype.j=function(a,b,c){var d=yC(YC(a),b,c);if(!(0>=d.width||0>=d.height)){var e=wE(d,this.C);e.left+=d.left;e.top+=d.top;b=a.g;c=qE(e,b.g);var g=cE(this,c.width,c.height),h=new tD("#000",0),e=wE(e,this.o);a=a.o?a.o.g?a.o.g:a.o.videoId?Mt(a.o.videoId,"hqdefault.jpg"):"":"";e=DD(g,"image",{x:e.left,y:e.top,width:e.width,height:e.height,"image-rendering":"optimizeQuality",preserveAspectRatio:"none"});e.setAttributeNS("http://www.w3.org/1999/xlink","href",a);e=new KD(e,g);g.k.L().appendChild(e.L());
if(a=this.L()){var k=pE(this.g,b.k);pg(a,k);if(this.B&&0<b.o){var k=new uD(b.o,b.A),d=new Lf(0,0,d.width,d.height),m;m=nE(d,b.j,k.g/2+1);var p=CD(g,"mask");if(p)m=p;else{var p=document.createElementNS("http://www.w3.org/2000/svg","mask"),r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",PD(m));r.setAttribute("fill","#FFF");p.appendChild(r);m=ED(g,"mask",p)}e=e.L();m&&e.setAttribute("mask","url(#"+m+")");mE(g,d,b.j,k,h)}N(a,"annotation-shape");N(a,"annotation-image-shape");
Yf(a,c.left,c.top);jg(a,c.width,c.height);rE(g,a,b.g)}}};function xE(){bE.call(this)}z(xE,bE);xE.prototype.j=function(a,b,c){var d=YC(a);if(d){var e=yC(d,b,c);if(!(0>=e.width||0>=e.height)){b=a.g;c=qE(e,b.g);var d=cE(this,c.width,c.height),g=b.D;a=this.g&&UC(a);a=(g+=a?1:0)?new uD(g,a?b.B:b.C):null;g=new Lf(0,0,e.width,e.height);e=oE(b,e.width,e.height,this.g);mE(d,g,b.j,a,e);if(a=this.L())N(a,"annotation-shape"),N(a,"annotation-popup-shape"),Yf(a,c.left,c.top),jg(a,c.width,c.height),rE(d,a,b.g)}}};function yE(){sE.call(this)}z(yE,sE);yE.prototype.B=function(a,b,c,d){function e(a,c,d,e){a=Math.min(Math.max(e-2*b,0),a);c=c<=d+e/2?Math.max(d+e/4-a/2,d+b):Math.min(d+3*e/4-a/2,d+e-a-b);return new aE(c,c+a)}return"t"==d||"b"==d?e(this.o,c.x,a.left,a.width):"l"==d||"r"==d?e(this.o,c.y,a.top,a.height):new aE(0,0)};function zE(a,b,c,d,e){this.g=a;this.G=b;this.C=c;this.J=d;this.I=e;this.D=new az(this);this.F=this.k=this.A=this.o=this.B=this.j=null}function AE(a,b){var c=x(function(a,c,g){c=g?BE(this,c,x(g,this)):BE(this,c);this.D.listen(b,a,c)},a);c("mouseover","d",a.M);c("mouseout","c",a.N);c("click","a");c("touchend","a")}
function CE(a){if(a.g.C){var b;TC(a.g,function(a){return"close"==a.type})?b=a.j:(a.A=H("div",["annotation-close-button","hid"]),Gg(a.A,"annotation_id",a.g.id),a.j.appendChild(a.A),b=a.A);var c=function(a){a.stopPropagation()};a.D.listen(b,"click",BE(a,"b",c));a.D.listen(b,"touchend",BE(a,"b",c))}}
function BE(a,b,c){return x(function(a){if(this.I)c&&c(a);else if(a.target instanceof Element){var e=a.target;tA(e);try{var g=document.elementFromPoint(a.clientX,a.clientY);if(Fd(g,"annotation")){var h=document.createEvent("MouseEvent");h.initMouseEvent(a.type,a.bubbles,a.cancelable,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget);g.dispatchEvent(h)}}finally{sA(e)}}e=og(a.target);a=new Kb(a.clientX,a.clientY);"c"==b&&e.contains(a)||
this.J.publish(b,this.g)},a)}zE.prototype.M=function(){this.A&&sA(this.A);this.o&&pg(this.o,1);var a=DE(this);this.k&&(this.k.g=!0,pg(this.j,EE(this)?1:0),a&&this.k.j(this.g,a,FE(this)))};zE.prototype.N=function(){this.A&&tA(this.A);this.o&&pg(this.o,0);var a=DE(this);this.k&&(this.k.g=!1,pg(this.j,EE(this)?1:0),a&&this.k.j(this.g,a,FE(this)))};function FE(a){return a.F?YC(a.F):null}
function lD(a){if(a.j||a.k){var b=YC(a.g);if(b){var c=DE(a),d=FE(a);if(a.j&&c){b=yC(b,c,d);jg(a.j,b.width,b.height);Yf(a.j,b.left,b.top);var e=a.C.wf;if(e){var g;g=(g=YC(a.g))&&e?uC(e,g.o,g.g?g.g:"xy"):1;var e=$C(a.g,e),h;h=a.g.g;h.G?h=h.G:(h="speech"==a.g.style?1.6:.8,h=new Kf(h,h,h,h));h=new Kf(360*h.top*e/100,640*h.right*g/100,360*h.bottom*e/100,640*h.left*g/100);a.o&&(h.right+=1.5*c.height/100);a.j.style.padding=h.top+"px "+h.right+"px "+h.bottom+"px "+h.left+"px";"label"==a.g.style&&a.B&&(a.B.style.padding=
a.j.style.padding);a.o&&(g=g/e*c.height*4.2/100,g=new F(g,g),jg(a.o,g),"highlight"==a.g.type||"label"==a.g.style?(e=1.5*c.height/100,g=new Kb(b.width-g.width-e,b.height-g.height-e)):g=new Kb(b.width-g.width-3*c.height/100,(b.height-g.height)/2),Yf(a.o,g));a.A&&(g=9<=c.left+c.width-(b.left+b.width),e=9<=b.top-c.top,Yf(a.A,g&&e?new Kb(b.width-9,-9):g?new Kb(b.width-9,45<b.height?9:b.height-9):e?new Kb(45<b.width?b.width-9-18:-9,-9):b.width/c.width>b.height/c.height?new Kb(45<b.width?b.width-9-18:-9,
b.height-9):new Kb(-9,45<b.height?9:b.height-9)))}}a.k&&c&&a.k.j(a.g,c,d);if(a.j){c=a.j;d=a.g.g;c.style.color="highlightText"==a.g.style?d.I:d.B;c.style.fontSize=360*d.J*$C(a.g,a.C.wf)/100+"px";b=a.g.style;c.style.textAlign=d.textAlign?d.textAlign:"title"==b||"highlightText"==b?"center":"left";d.F&&(c.style.fontWeight=d.F);a=a.j;c=a.style.overflow;d=G("annotation-link-icon",a);b=rA(d);g=G("annotation-close-button",a);e=rA(g);d&&b&&tA(d);g&&e&&tA(g);var k=h="",m=G("inner-text",a);m&&(h=m.style.overflow,
k=m.style.position,m.style.overflow="visible",m.style.position="static");a.style.overflow="scroll";if(a.scrollHeight>a.offsetHeight||a.scrollWidth>a.offsetWidth){for(var p=zg(a),r=p,t=5,v=Math.floor(p/2);v;)a.scrollHeight<=a.offsetHeight&&a.scrollWidth<=a.offsetWidth?(t=r,r=Math.min(r+v,p)):r=Math.max(r-v,t),v=Math.floor(v/2),a.style.fontSize=r+"px";r!=t&&(a.scrollHeight>a.offsetHeight||a.scrollWidth>a.offsetWidth)&&(a.style.fontSize=t+"px")}a.style.overflow=c;m&&(m.style.overflow=h,m.style.position=
k);g&&e&&sA(g);d&&b&&sA(d)}}}}
zE.prototype.show=function(){var a=this.g.g,a=(a&&0==a.k||"title"==this.g.style||"highlightText"==this.g.style||"pause"==this.g.type?!1:!0)&&!this.k,b=!this.j,c="widget"==this.g.type;if(a){var d=DE(this);if(d){var e=null;"highlight"==this.g.type||"label"==this.g.style?e=new uE:"popup"==this.g.style?e=new xE:"anchored"==this.g.style?e=new sE:"speech"==this.g.style?e=new yE:"image"==this.g.type&&("video"==this.g.style?e=new vE(4/3,16/9,!0):"channel"==this.g.style&&(e=new vE));e&&(e.j(this.g,d,FE(this)),
this.k=e,d=e.L())&&(tA(d),N(d,"annotation-type-"+this.g.type.toLowerCase()),this.G(d))}}if(b){d=["annotation","hid"];"highlightText"!=this.g.style||d.push("annotation-no-mouse");d.push("annotation-type-"+this.g.type.toLowerCase());this.j=H("div",d);this.g.B&&(this.B=H("div","inner-text"),"label"==this.g.style&&(N(this.B,"label-text"),this.B.style.backgroundColor=this.g.g.A),td(this.B,this.g.B),this.j.appendChild(this.B));Gg(this.j,"annotation_id",this.g.id);this.G(this.j);AE(this,this.j);if(UC(this.g)&&
"image"!=this.g.type&&this.g.showLinkIcon()){if(d=hC(this.g))this.j.title=Vz(d);this.o=H("span","annotation-link-icon");this.j.appendChild(this.o)}CE(this);UC(this.g)||(this.j.style.cursor="default")}c&&("subscribe"==this.g.style?G("yt-uix-subscription-button",this.j)||(this.j.innerHTML=this.g.k):this.g.k&&(this.j.innerHTML=this.g.k));if(a||b){t:{a=this.g.j.g;if(a.length&&(a=FC(a[0]))){a=a.B;break t}a=0}this.j&&(this.j.style.zIndex=a);this.k&&this.k.L()&&(this.k.L().style.zIndex=a)}sA(this.j);pg(this.j,
EE(this)?1:0);lD(this);this.k&&sA(this.k.L())};zE.prototype.hide=function(){tA(this.j);this.k&&tA(this.k.L())};function EE(a){return"label"!=a.g.style||a.k.g}function DE(a){var b=a.C.wf;return b?"player_relative"==a.g.F?(a=a.C.qf)?new Lf(-b.left,-b.top,a.width,a.height):null:new Lf(0,0,b.width,b.height):null};function GE(a){Kx.call(this,a);this.Qi=!0;this.va="iv-module";this.nc="iv";this.M=!1;this.W=!0;this.D=!1;this.o=0;this.j={};this.I={};this.F=null;this.C=new bA(this.N,a);a=HE;this.A=new $D(Yx(this));S(this,this.A);this.A.listen("change",this.Yy,this);this.subscribe("onHideControls",this.Vy,this);this.subscribe("onShowControls",this.Xy,this);this.subscribe("onStateChange",this.Wy,this);this.subscribe("d",this.$y,this);this.subscribe("c",this.Zy,this);this.subscribe("a",this.Ty,this);this.subscribe("b",
this.Uy,this);this.subscribe("videodatachange",this.kk,this);var b=new Ey(["div",[a.Qy,"hid"],["svg",{width:"60",height:"60"},["g","",["circle","countdowntimer-background-circle",{cx:"30",cy:"30",r:"15"}],["path","countdowntimer-diminishing-pieslice",{d:"M30,30 z"}],["circle","countdowntimer-middle-dot",{cx:"30",cy:"30",r:"4"}]]]]);S(this,b);b=b.L();this.P=H("DIV",[a.Sy,"html5-stop-propagation"]);this.S=H("DIV",a.Ry);this.B=null;Nx(this,H("DIV",a.Py,this.P,this.S));Nx(this,b);this.G=new RD(b,x(this.lk,
this));this.k=null;this.O=[];this.J=null}z(GE,Kx);GE.A="AnnotationsModule";var HE={Py:"video-annotations",Qy:"countdowntimer",Ry:"video-custom-annotations",Sy:"video-legacy-annotations"};GE.o=function(a){switch(a.type){case "branding":case "promotion":case "survey":return!0}return!1};GE.k=function(a){return"card"==a.type};GE.j=function(a){return GE.Ha(a)?new GE(a):null};GE.Ha=function(a){var b=a.R();return"leanback"==b.ca?!1:b.wa?!0:Av(a.getVideoData(),"iv3_module")};
GE.g=function(){return H("div",["annotation","annotation-type-custom","hid"])};f=GE.prototype;f.Ha=function(){return GE.Ha(this.g)};f.create=function(){GE.H.create.call(this);this.B=new X(["div",["ytp-player-content","ytp-iv-player-content"]]);this.B.X(this.g.Qa());ay(this,this.A);var a=this.g.R();(1==(a.Aa||this.g.getVideoData().pa)||a.wa)&&this.load()};f.destroy=function(){this.B.Zc();this.B.dispose();by(this,this.A);this.unsubscribe("videodatachange",this.kk,this);GE.H.destroy.call(this)};
f.Yy=function(){var a=this.D||this.o,b=0==this.A.getSelected();a&&!b?(this.unload(),this.log({toggle:0})):!a&&b&&(this.load(),this.log({toggle:1}))};f.Wy=function(a){this.W=W(a.state,8);0>Xy(a,4)&&this.G.stop()};
f.load=function(){GE.H.load.call(this);var a=this.g.getVideoData(),b=x(this.ks,this,a.videoId);RA()&&(b=IE(this,b));var b={format:"XML",method:"GET",Ab:b},c=this.g.R().wa,d=this.g.R().$e;if(c||d)b.method="POST",b.ab={},c&&(b.ab.ic_xml=c),d&&(b.ab.ic_track=d);a.uh&&(this.o++,fj(a.uh,b));a.Im&&(b=x(this.ks,this,a.videoId),RA()&&(b=IE(this,b)),b={format:"XML",method:"GET",Ab:b},this.o++,fj(a.Im,b));YD(this.A.element,0)};
f.unload=function(){YD(this.A.element,1);this.C.oa({"iv-event":1});this.lk();Lx(this);Ob(this.j,function(a){a.destroy()});Ob(this.I,function(a){a.destroy()});this.k&&(this.k.destroy(),this.k=null);this.o=0;this.D=!1;this.j={};this.I={};GE.H.unload.call(this)};
function JE(a,b){for(var c={},d=0;d<b.attributes.length;d++){var e=b.attributes[d];c[e.name]=e.nodeValue}for(d=0;d<b.childNodes.length;d++)if(e=b.childNodes[d],e.tagName){var g;if(c[e.tagName])g=c[e.tagName];else if("html_blob"==e.tagName||"data"==e.tagName){0<e.childNodes.length&&(g=e.childNodes[0].nodeValue,c[e.tagName]="string"==typeof g?g.trim():g);continue}else g=[],c[e.tagName]=g;e&&"TEXT"==e.tagName?1==e.childNodes.length&&3==e.childNodes[0].nodeType?g.push(e.childNodes[0].nodeValue):g.push(""):
e&&g.push(JE(a,e))}return c}
f.ks=function(a,b){if(this.o&&!this.D&&this.g.getVideoData().videoId==a){this.o--;var c=b.responseXML?b.responseXML.getElementsByTagName("annotations"):null;if(aj(b)&&c){KE(this,c[0]);N(this.g.Qa(),this.va+"-loaded");0==this.o&&(this.D=!0);var c=[],d;for(d in this.j){var e=this.j[d].annotation,g;if(e.j)if(g=e.j,g.g.length)if(g=g.g[0].j||g.g[0].g||g.g[0].k,!g||2>g.length)g=null;else{var h=g.length-1;g=0>=g[0].j&&0>=g[h].j?null:{start:g[0].j,end:g[h].j}}else g=null;else g=null;if(h=g)if(g=1E3*h.start,
h=1E3*h.end,0==g&&(g++,h++),g==h&&h++,!(h<g)){var k={id:d};"marker"==e.type&&(k.style="ytp-chapter-marker",k.tooltip=e.B,k.visible=!0);e=new Ax(g,h,k);c.push(e)}}this.ye.apply(this,c)}}};function LE(a,b){var c=ME(a,b);if(!c&&"marker"!=b.type)return null;WC(b,function(a){a=x(this.tF,this,b.id,a);this.subscribe("ivTrigger:"+b.id,a)},a);return new iD(a.N,b,c)}
function NE(a,b){var c=a.B.L(),d=GE.g(),e=null;switch(b.type){case "branding":c.appendChild(d);e=new fC(d,OE(a),b);break;case "promotion":a.g.R().experiments.V&&"video"==b.style?(c=Vi(hC(b).value).v,d=Oz(b.data.video_duration),c&&d&&(a.F={id:c,ZG:d,$G:"feature=endscreen",author:b.data.text_line_1,title:b.data.text_line_2,YG:1},a.kk())):(c.appendChild(d),e=new aD(d,OE(a),b))}e&&e.uj();return e}
f.kk=function(){if(this.F){var a=this.g.getVideoData().V;!a||1>=a.length||a[1].id==this.F.id||(vb(a,1,0,this.F),qb(a,a.length-1))}};function PE(a,b){if(!a.k){var c=OE(a),d=c.k.experiments.ka||!1,e=GE.g();d?(a.B.L().appendChild(e),a.k=new XB(e,c)):(a.S.appendChild(e),a.k=new yB(e,c));a.k.uj()}a.k.as(b)}function OE(a){a.J||(a.J=new iC(new az(a),a.g.R(),a.g.getVideoData(),a.C,a.g,a.N));return a.J}
function KE(a,b){for(var c=b.getElementsByTagName("annotation"),d=0;d<c.length;d++){var e=JE(a,c[d]),g=null;try{g=RC(e)}catch(h){}g&&(GE.o(g)?(e=NE(a,g))&&(a.I[g.id]=e):GE.k(g)?PE(a,g):(e=LE(a,g))&&(a.j[g.id]=e))}Ob(a.j,function(a){var b=a.annotation;b.j&&b.j.j&&(b=this.j[b.j.j])&&(a.g.F=b.annotation)},a)}f.Gc=function(a){GE.H.Gc.call(this,a);a=a.getId();var b=this.j[a];b&&!b.A&&(b=b.annotation,"pause"==b.type?QE(this,b):(RE(this,a),cA(this.C,b.za)))};
f.ad=function(a){GE.H.ad.call(this,a);SE(this,a.getId())};function QE(a,b){if(a.W){var c=SC(b,function(a){return"pause"==a.type&&!!a.duration&&!!a.duration.value});c&&(a.M=!0,a.publish("command_pause"),a.G.start(1E3*c.duration.value))}}function TE(a,b,c,d){d?RE(a,b,c):SE(a,b,c)}function SE(a,b,c){if(b=a.j[b])kD(b),c&&c.j?(a=x(a.Jt,a,b),b.j=new dr(a,2E3),b.j.start()):a.Jt(b)}f.Jt=function(a){a&&(a.hide(),UE(this,"shown",!1,a.annotation.id),VE(this,a.annotation,"hidden"))};
function RE(a,b,c){if(b=a.j[b])kD(b),c&&c.o?(a=x(a.tt,a,b),b.j=new dr(a,2E3),b.j.start()):a.tt(b)}f.tt=function(a){a&&(a.show(),UE(this,"shown",!0,a.annotation.id),VE(this,a.annotation,"shown"))};f.tF=function(a,b,c){var d=this.j[a];if(d&&b.value!=c){b.value=c;var e=!1;WC(d.annotation,function(a){e|=a.value});TE(this,a,b,e)}};f.Ty=function(a){if(a&&a.id){var b=hC(a);if(b){var c=x(function(){VE(this,a,"click")},this);Wz(Vz(b))&&"new"!=b.target||(c(),c=null);gA(this.C,a.za,c)}}};
function VE(a,b,c){VC(b,function(a){if(a.trigger==c&&"openUrl"==a.type){var e=this.g.getVideoData(),g=Yz(a.url,e.videoId);if(-1!=g)this.publish("command_seek",g),this.lk();else if(e=Zz(a.url,b.id,e.videoId,this.g.R()))this.pauseVideo(),window.open(e,aA(a.url))}},a)}f.Vy=function(){UE(this,"playerControlShow",!1)};f.Xy=function(){UE(this,"playerControlShow",!0)};f.$y=function(a){UE(this,"rollOver",!0,a.id)};f.Zy=function(a){UE(this,"rollOver",!1,a.id)};
f.Uy=function(a){if(a||a.id)this.j[a.id].A=!0,SE(this,a.id),a&&(hA(this.C,a.za),VE(this,a,"close")),UE(this,"closed",!0,a.id)};f.lk=function(){this.G.stop();this.M&&(this.M=!1,this.publish("command_play"))};function ME(a,b){if(WE(b)){var c=b.C||TC(b,function(a){return"click"==a||"rollOut"==a||"rollOut"==a});return new zE(b,x(a.P.appendChild,a.P),a.g.R(),a.N,c)}return null}
function WE(a){if("highlight"==a.type||"image"==a.type||"widget"==a.type)return!0;if("text"==a.type)for(var b in OC)if(a.style==OC[b])return!0;return!1}function UE(a,b,c,d){a.publish(hD(b,d),c,d)}function IE(a,b){return x(function(){if(!this.$()){var a=Array.prototype.slice.call(arguments,0);a.unshift(b);b=pa.apply(window,a);this.O.push(SA(b,void 0))}},a)}f.K=function(){for(var a=this.O,b=0,c=a.length;b<c;b++)UA(a[b]);this.O.length=0;GE.H.K.call(this)};var XE=/^#(?:[0-9a-f]{3}){1,2}$/i,YE="default monoSerif propSerif monoSans propSans casual cursive smallCaps".split(" "),ZE=["none","raised","depressed","uniform","dropShadow"],$E=["sub","inherit","super"],aF=["left","right","center"],bF={id:0,priority:0,anchorPoint:7,kj:50,xC:80,$d:100,od:15,xm:100,isVisible:!0,textAlign:2,Hf:0,backgroundColor:"#080808",foregroundColor:"#fff",Nq:1,wC:1},cF={id:98},dF={id:99,priority:1,anchorPoint:0,kj:5,$d:5,od:2,xm:32,textAlign:0},eF=["en_CA","en_US","es_MX","fr_CA"];var fF=[{option:"#fff",message:"YTP_COLOR_WHITE"},{option:"#ff0",message:"YTP_COLOR_YELLOW"},{option:"#0f0",message:"YTP_COLOR_GREEN"},{option:"#0ff",message:"YTP_COLOR_CYAN"},{option:"#00f",message:"YTP_COLOR_BLUE"},{option:"#f0f",message:"YTP_COLOR_MAGENTA"},{option:"#f00",message:"YTP_COLOR_RED"},{option:"#080808",message:"YTP_COLOR_BLACK"}],gF=[{option:0,text:"0%"},{option:.25,text:"25%"},{option:.5,text:"50%"},{option:.75,text:"75%"},{option:1,text:"100%"}],hF=[{option:.25,text:"25%"},{option:.5,
text:"50%"},{option:.75,text:"75%"},{option:1,text:"100%"}],iF=[{option:"fontFamily",message:"YTP_FONT_FAMILY",options:[{option:1,message:"YTP_FONT_FAMILY_MONO_SERIF"},{option:2,message:"YTP_FONT_FAMILY_PROP_SERIF"},{option:3,message:"YTP_FONT_FAMILY_MONO_SANS"},{option:4,message:"YTP_FONT_FAMILY_PROP_SANS"},{option:5,message:"YTP_FONT_FAMILY_CASUAL"},{option:6,message:"YTP_FONT_FAMILY_CURSIVE"},{option:7,message:"YTP_FONT_FAMILY_SMALL_CAPS"}]},{option:"color",message:"YTP_FONT_COLOR",options:fF},
{option:"fontSizeIncrement",message:"YTP_FONT_SIZE",options:[{option:-2,text:"50%"},{option:-1,text:"75%"},{option:0,text:"100%"},{option:1,text:"150%"},{option:2,text:"200%"},{option:3,text:"300%"},{option:4,text:"400%"}]},{option:"background",message:"YTP_BACKGROUND_COLOR",options:fF},{option:"backgroundOpacity",message:"YTP_BACKGROUND_OPACITY",options:gF},{option:"windowColor",message:"YTP_WINDOW_COLOR",options:fF},{option:"windowOpacity",message:"YTP_WINDOW_OPACITY",options:gF},{option:"charEdgeStyle",
message:"YTP_CHAR_EDGE_STYLE",options:[{option:0,message:"YTP_EDGE_STYLE_NONE"},{option:4,message:"YTP_EDGE_STYLE_DROP_SHADOW"},{option:1,message:"YTP_EDGE_STYLE_RAISED"},{option:2,message:"YTP_EDGE_STYLE_DEPRESSED"},{option:3,message:"YTP_EDGE_STYLE_OUTLINE"}]},{option:"textOpacity",message:"YTP_FONT_OPACITY",options:hF}];var jF;function kF(a,b){fa(b)&&(b=b.join(" "));if(""===b||void 0==b){var c;jF||(jF={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"});c=jF;"pressed"in c?a.setAttribute("aria-pressed",c.pressed):a.removeAttribute("aria-pressed")}else a.setAttribute("aria-pressed",b)};function lF(a,b,c,d,e){TD.call(this,a,b,c,c);this.I=b;this.M=this.N=c;this.B=d||null;this.C=e||null;this.F=e||null;this.g=!1}z(lF,TD);lF.prototype.update=function(){UD(this,this.g&&this.B?this.B:this.I);this.fb(this.g&&this.C?this.C:this.N);this.j=this.g&&this.F?this.F:this.M;O(this.element,"ytp-button-pressed",this.g)};function mF(a){a.g=!0;kF(a.element,!0);a.update()}function nF(a){a.g=!1;kF(a.element,!1);a.update()}function oF(a,b){a.I=b;a.update()}
lF.prototype.K=function(){this.F=this.C=this.B=null;lF.H.K.call(this)};function pF(a){lF.call(this,a,"ytp-subtitles-button",Y(0,"YTP_SUBTITLES"),"ytp-subtitles-button-active");VD(this,6500);this.element.setAttribute("aria-haspopup",!0);this.element.id="subtitles_button"}z(pF,lF);function qF(a){X.call(this,a)}z(qF,X);qF.prototype.cs=function(){};qF.prototype.Ah=function(){};function rF(a,b,c,d){X.call(this,["li","ytp-subtitles-settings-dialog-list-option","{{content}}"]);var e=b.text||(b.message?Y(0,b.message):""),e=[new Ey(["div","ytp-subtitles-settings-dialog-list-text",e])];d&&(d=new Ey(["div","ytp-subtitles-settings-dialog-list-swatch"]),d.L().style.background=b.option,e.unshift(d));c?e.unshift(new Ey(["div","ytp-subtitles-settings-dialog-list-caret"])):e.unshift(new Ey(["div","ytp-subtitles-settings-dialog-list-check"]));this.g=new TD(a);S(this,this.g);this.g.ua(e);
this.ua(this.g)}z(rF,X);rF.prototype.setEnabled=function(a){O(this.g.L(),"ytp-subtitles-settings-dialog-list-selected",a)};function sF(a){X.call(this,["div",["ytp-subtitles-settings-dialog","ytp-dialog","html5-stop-propagation"],["div","ytp-dialog-body",["div","ytp-subtitles-settings-dialog-top-level","{{top}}"],["div","ytp-subtitles-settings-dialog-sub-level","{{sub}}"]],["div","ytp-dialog-buttons","{{buttons}}"]]);this.o=a;this.j=null;var b=Y(0,"YTP_DONE"),c=new TD(a,"ytp-dialog-button",b);S(this,c);c.ua(b);c.listen("click",pa(this.Qb,"cancel"),this);VD(c,1400);b=Y(0,"YTP_RESET");a=new TD(a,"ytp-dialog-button",b);S(this,
a);a.ua(b);N(a.L(),"ytp-dialog-button-left");a.listen("click",pa(this.Qb,"select"),this);VD(a,1300);this.k={};this.g={};this.template.update({top:tF(this,iF),buttons:[a,c]})}z(sF,qF);
function tF(a,b,c){var d=new X(["ul","ytp-subtitles-settings-dialog-list"]),e,g=!1;n(c)?(a.g={},e=a.g):(a.k={},e=a.k,g=!0);for(var h=0;h<b.length;h++){var k=b[h],m=new rF(a.o,k,g,b==fF);g?(m.listen("click",x(a.Fq,a,k.options,k.option)),VD(m.g,1100)):c&&(m.listen("click",x(a.XB,a,c,k.option)),VD(m.g,1200));e[k.option]=m;m.X(d.L())}return d}f=sF.prototype;f.Fq=function(a,b){this.template.update({sub:tF(this,a,b)});uF(this,this.k,b);uF(this,this.g,this.j[b]);vF(this.template.g["ytp-subtitles-settings-dialog-sub-level"])};
function vF(a){(a=G("ytp-subtitles-settings-dialog-list-selected",a))&&a.focus()}f.Ah=function(){vF(this.template.g["ytp-subtitles-settings-dialog-top-level"])};function uF(a,b,c){Ob(b,function(a,b){a.setEnabled(b==c)},a)}f.setProperties=function(a){this.j=a;(a=iF[0])&&a.options&&this.Fq(a.options,a.option)};f.XB=function(a,b){this.j&&(this.j[a]=b,this.Qb("change"));uF(this,this.g,b);this.Ah()};
f.cs=function(){var a=this.o.Gb(),b=2*Math.floor(Math.min(560,Math.max(230,.65*a.width))/2);this.L().style.width=b+"px";this.template.g["ytp-dialog-body"].style.height=a.height-140+"px"};f.K=function(){this.k=[];this.g=[];sF.H.K.call(this)};function wF(a,b,c){X.call(this,["div","ytp-drop-down","{{content}}"]);this.A=!1;this.F=0;this.I=this.G=null;this.C=new az(this);this.j=new X(["div","ytp-drop-down-menu","{{content}}",{tabindex:-1}]);S(this,this.j);GA(this.j,"listbox");this.g=new TD(a,"ytp-drop-down-label");S(this,this.g);this.g.listen("click",this.J,this);this.B=new X(["div","ytp-drop-down-label-content","{{content}}"]);S(this,this.B);this.g.ua([this.B,["div","ytp-drop-down-arrow"]]);this.ua([this.j,this.g]);n(b)&&this.k(b);n(c)&&
this.I!=c&&(this.j.ua(c),this.I=c,xF(this));xF(this)}z(wF,X);wF.prototype.k=function(a){this.G!=a&&(this.B.ua(a),this.G=a,xF(this))};wF.prototype.o=function(){this.A=!1;xF(this)};wF.prototype.N=function(a){a.target&&(rd(this.j.L(),a.target)||rd(this.g.L(),a.target))||this.o()};wF.prototype.J=function(){this.A=!this.A;xF(this);this.A&&this.j.L().focus()};function yF(a,b){b>a.F&&(a.F=b,a.element.style.minWidth=a.F+"px")}
function xF(a){a.A?(a.j.show(),a.C.listen(window,"blur",a.o),a.C.listen(document,"click",a.N)):(a.j.hide(),a.C.removeAll());var b=lg(a.g.L());a.j.L().style.bottom=b.height-1+"px";yF(a,b.width)};function zF(a,b){TD.call(this,a,"ytp-drop-down-menu-button");GA(this,"option");this.g=new X(["div","ytp-drop-down-menu-button-check"]);S(this,this.g);this.k=!!b}z(zF,TD);zF.prototype.ua=function(a){zF.H.ua.call(this,[this.g,a])};function AF(a,b){O(a.element,"ytp-drop-down-menu-button-selected",b);a.k||O(a.element,"ytp-drop-down-menu-button-checked",b);a.element.setAttribute("aria-checked",b)}function BF(a,b){O(a.element,"ytp-drop-down-menu-button-checked",b)};function CF(a,b,c,d){X.call(this,["div","ytp-drop-down-menu-content",{tabindex:"{{tabindex}}"},"{{content}}"]);this.F=a;this.A=!!d;this.k={};this.o=[];this.g=this.j=null;this.B=b;this.C=c}z(CF,X);function DF(a,b){Db(a.o,b)||(Ob(a.k,function(a){a.Zc()}),a.o=[],b&&C(b,function(a){this.o.push(a);var b=EF(this,a);this.A&&BF(b,a==this.g);AF(b,a==this.j);b.X(this.element)},a))}function FF(a,b){null!=a.j&&AF(EF(a,a.j),!1);null!=b&&AF(EF(a,b),!0);a.j=b;a.A||(a.g=b)}CF.prototype.getSelected=function(){return this.j};
function GF(a,b){var c=EF(a,"translate");b?c.disable():c.enable()}function HF(a,b){Ob(a.k,function(a){VD(a,b)})}function EF(a,b){var c=a.k[b.toString()];if(c)return c.ua(a.B(b)),c;c=new zF(a.F,a.A);S(a,c);a.k[b.toString()]=c;c.ua(a.B(b));c.listen("click",x(a.C,a,b));return c};function IF(a,b,c,d,e,g){SD.call(this);this.J=b;this.N=c;this.I=d;this.M=e;this.F=g;this.k={};this.k.off=Y(0,"YTP_LANGUAGE_OFF");this.k.translate=Y(0,"YTP_TRANSLATE_MENU_ITEM");this.k.contribute=Y(0,"YTP_CONTRIBUTE_MENU_ITEM");this.label=Y(0,"YTP_SUBTITLES");this.g=new CF(a,x(this.D,this),x(this.O,this));S(this,this.g);this.element=new wF(a,void 0,this.g);S(this,this.element);yF(this.element,150);this.element.fb(this.label);this.priority=1;this.A=!0;this.C=this.B=!1;JF(this,[]);this.off()}z(IF,SD);
IF.prototype.G=function(){this.I()};function JF(a,b){for(var c=["off"],d=0;d<b.length;d++){var e=b[d],g=e.toString();a.k[g]||(a.k[g]=KF(e));c.push(g)}c.push("translate");a.C&&c.push("contribute");DF(a.g,c);GF(a.g,!a.B);c=EF(a.g,"translate");O(c.element,"ytp-drop-down-menu-button-separated",!1);O(c.element,"ytp-drop-down-menu-button-separated-above",!0);c=2500;HF(a.g,c++);c=c++;VD(a.element.g,c)}function LF(a,b){a.k[b]&&(FF(a.g,b),a.element.k(a.D(b)))}IF.prototype.off=function(){LF(this,"off")};
IF.prototype.D=function(a){return this.k[a]};IF.prototype.O=function(a){this.element.o();"off"==a?this.J():"translate"==a?this.M():"contribute"==a?this.F():this.N(a,!0)};function MF(a){var b=["div",["ytp-dialog","html5-stop-propagation"],["div","ytp-dialog-title",Y(0,"YTP_TRANSLATE_DIALOG_TITLE")],["div","ytp-dialog-body","{{content}}"],["div","ytp-dialog-buttons","{{buttons}}"]];X.call(this,b);var c=Y(0,"YTP_DISMISS"),b=new TD(a,"ytp-dialog-button",c);S(this,b);b.ua(c);b.listen("click",pa(this.Qb,"change"),this);VD(b,1400);var c=Y(0,"YTP_CANCEL"),d=new TD(a,"ytp-dialog-button",c);S(this,d);d.ua(c);d.listen("click",pa(this.Qb,"cancel"),this);VD(d,1500);this.j=new CF(a,
x(this.k,this),x(this.A,this),!0);S(this,this.j);this.j.element.style.maxHeight="100px";this.g=new wF(a,void 0,this.j);S(this,this.g);yF(this.g,200);this.g.fb(Y(0,"YTP_TRANSLATE_DIALOG_TITLE"));this.o=null;this.template.update({content:this.g,buttons:[b,d]})}z(MF,qF);function NF(a,b){a.o=b;a.g.k(b?a.k(b):null)}MF.prototype.getSelected=function(){return this.o};MF.prototype.A=function(a){this.g.o();NF(this,a)};MF.prototype.k=function(a){return a.languageName+" -- "+a.Vk};MF.prototype.Ah=function(){this.g.g.L().focus()};function OF(a){lF.call(this,a,"ytp-settings-button",Y(0,"YTP_SETTINGS"),"ytp-settings-button-active");VD(this,6600);this.element.setAttribute("aria-haspopup",!0);this.element.id="settings_button";this.k=new X(["div","{{content}}"]);S(this,this.k);this.ua(this.k);PF(this,"")}z(OF,lF);function PF(a,b){"hd2880"==b?a.k.ua("ytp-settings-hdp-quality-badge"):"highres"==b?a.k.ua("ytp-settings-4k-quality-badge"):"hd1440"==b?a.k.ua("ytp-settings-2k-quality-badge"):-1!=b.indexOf("hd")?a.k.ua("ytp-settings-hd-quality-badge"):a.k.ua("")};function QF(a){this.anchorPoint=7;this.kj=50;this.$d=100;this.xC=80;this.Hf=0;this.textAlign=2;this.backgroundColor="#080808";this.color="#fff";this.wC=this.Nq=1;this.od=15;this.xm=32;this.isVisible=!0;this.j=0;this.bold=!1;this.offset=1;this.g=3;a=a||bF;qa(this,a)};function RF(a,b){this.id=a;this.Da=new QF(b);var c="caption-window";0==this.id&&(c="standard-caption-window");this.Ja=H("div",{id:"caption-window-"+this.id,"class":c});this.Xb=H("span",{"class":"captions-text",style:"visibility: hidden"});this.Xb.innerHTML="C";this.Pa=H("span",{"class":"captions-text",tabindex:7E3,"aria-live":"assertive"});this.Ih=H("div",{"class":"caption-window-transform"});this.Ih.appendChild(this.Pa);this.Ja.appendChild(this.Ih);this.g=1}RF.prototype.id=0;f=RF.prototype;
f.Da=null;f.gh="";f.Qc=null;f.Ja=null;f.Ih=null;f.Pa=null;f.Xb=null;f.type=0;
f.kd=function(a,b){a&&qa(this.Da,a);var c=this.Da.charEdgeStyle,d=this.Da.textOpacity,e="";if(0!=c){var g="rgba(34, 34, 34, "+d+")",h="rgba(204, 204, 204, "+d+")";this.Da.charEdgeColor&&(h=g=this.Da.charEdgeColor);switch(c){case 4:e="2px 2px 3px "+g+", 2px 2px 4px "+g+", 2px 2px 5px "+g;break;case 1:e="1px 1px "+g+", 2px 2px "+g+", 3px 3px "+g;break;case 2:e="1px 1px "+h+", 0 1px "+h+", -1px -1px "+g+", 0 -1px "+g;break;case 3:e="0 0 4px "+g+", 0 0 4px "+g+", 0 0 4px "+g+", 0 0 4px "+g}}c=this.Da.fontFamily;
g="";switch(c){case 1:g='"Courier New", Courier, "Nimbus Mono L", "Cutive Mono", monospace';break;case 2:g='"Times New Roman", Times, Georgia, Cambria, "PT Serif Caption", serif';break;case 3:g='"Deja Vu Sans Mono", "Lucida Console", Monaco, Consolas, "PT Mono", monospace';break;case 5:g='"Comic Sans MS", Impact, Handlee, fantasy';break;case 6:g='"Monotype Corsiva", "URW Chancery L", "Apple Chancery", "Dancing Script", cursive';break;case 7:g='"Arial Unicode Ms", Arial, Helvetica, Verdana, "Marcellus SC", sans-serif';
break;case 0:case 4:g='"Arial Unicode Ms", Arial, Helvetica, Verdana, "PT Sans Caption", sans-serif'}var k=jz(this.Da.color),h=jz(this.Da.background),k="rgba("+k[0]+","+k[1]+","+k[2]+","+d+")",d=this.Da.offset||1;Uf(this.Pa,{color:k,fill:k,"background-color":"rgba("+h[0]+","+h[1]+","+h[2]+","+this.Da.backgroundOpacity+")","text-shadow":e,"font-variant":7==c?"small-caps":"","font-family":g,"font-weight":this.Da.bold?"bold":"","font-style":this.Da.italic?"italic":"","text-decoration":this.Da.underline?
"underline":"","vertical-align":$E[d]});b&&(this.g=b.height/360);e=jz(this.Da.windowColor);c=this.Da.windowOpacity;g=this.Da.fontSizeIncrement||0;1!=d&&(g*=.8);Uf(this.Ih,{"background-color":"rgba("+e[0]+","+e[1]+","+e[2]+","+c+")","font-size":Math.round(16*(1+.25*g)*this.g)+"px"})};f.Cj=function(){var a;this.Xb.style.fontFamily=this.Pa.style.fontFamily;this.Ja.appendChild(this.Xb);a=this.Xb.offsetHeight;this.Ja.removeChild(this.Xb);return a};
f.Xe=function(){this.Pa&&(0!=this.id&&(kg(this.Ja,"100%"),kg(this.Ja,this.Pa.offsetWidth+1)),SF(this),qA(this.Ja,this.Da.isVisible))};function SF(a){Yf(a.Ja,a.Da.kj+"%",a.Da.$d+"%");for(var b=0;8>=b;b++)Dg(a.Ja,"anchor-point-"+b);N(a.Ja,"anchor-point-"+a.Da.anchorPoint)}f.Ct=function(a){var b=[];C(a,function(a){a.j?b[b.length-1]+=a.g:b.push(a.g)});if(a.length){var c=a[a.length-1].bn;c&&this.kd(TF(c))}this.Td(b.join("\n"));this.Qc=a};
f.Td=function(a){this.gh=a=UF(a);this.Pa.innerHTML=this.gh;this.Ja.style.textAlign=aF[this.Da.textAlign];1==this.Da.Hf?this.Pa.setAttribute("dir","rtl"):this.Pa.removeAttribute("dir");this.Xe()};f.toString=function(){var a="Caption window ("+this.id+"): "+this.gh,b;for(b in this.Da)a+=b+" "+this.Da[b]+" | ";return a};function UF(a){a=a.split("\n");for(var b=0,c=a.length;b<c;b++)a[b]=a[b]?" "+a[b]+" ":"";return a.join("<br>")}f.$j=function(){this.Qc=[];this.Td("")};function VF(){this.D=1;this.B=20971520;this.A=8388608;this.g=5242880;this.ra=NaN;this.I=2;this.P=25;this.G=2097152;this.k=!1;this.j=1800;this.o=or.auto;this.O=!0;this.liveChunkReadahead=3;this.S=st("xboxone");this.N=this.Ca=!1;this.F=0;this.J=!1;this.M=this.C=0};function WF(){this.ga=[]}WF.prototype.contains=function(a){a=yb(this.ga,a);return 0<=a||0>a&&1==(-a-1)%2};WF.prototype.length=function(){return this.ga.length/2};function XF(a){if("undefined"!=typeof DOMParser)return(new DOMParser).parseFromString(a,"application/xml");if("undefined"!=typeof ActiveXObject){var b=YF();b.loadXML(a);return b}throw Error("Your browser does not support loading xml documents");}function ZF(a){if("undefined"!=typeof XMLSerializer)return(new XMLSerializer).serializeToString(a);if(a=a.xml)return a;throw Error("Your browser does not support serializing XML documents");}
function $F(a,b){if("undefined"!=typeof a.selectSingleNode){var c=Sc(a);"undefined"!=typeof c.setProperty&&c.setProperty("SelectionLanguage","XPath");return a.selectSingleNode(b)}if(document.implementation.hasFeature("XPath","3.0")){var c=Sc(a),d=c.createNSResolver(c.documentElement);return c.evaluate(b,a,d,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}return null}
function aG(a){if("undefined"!=typeof a.selectNodes){var b=Sc(a);"undefined"!=typeof b.setProperty&&b.setProperty("SelectionLanguage","XPath");return a.selectNodes('vmap:Extensions/vmap:Extension[@type = "YTBreakTime"]/*[name() = "yt:BreakTime"]')}if(document.implementation.hasFeature("XPath","3.0")){var b=Sc(a),c=b.createNSResolver(b.documentElement);a=b.evaluate('vmap:Extensions/vmap:Extension[@type = "YTBreakTime"]/*[name() = "yt:BreakTime"]',a,c,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=
[],c=a.snapshotLength,d=0;d<c;d++)b.push(a.snapshotItem(d));return b}return[]}function YF(){var a=new ActiveXObject("MSXML2.DOMDocument");if(a){a.resolveExternals=!1;a.validateOnParse=!1;try{a.setProperty("ProhibitDTD",!0),a.setProperty("MaxXMLSize",2048),a.setProperty("MaxElementDepth",256)}catch(b){}}return a};function bG(){this.j=[];this.g=[]};function cG(a){this.k=a.startMs||0;this.o=a.priority||0;this.durationMs=a.durationMs||0}cG.prototype.Jb=function(){return this.k};cG.prototype.toString=function(){return this.k+", "+this.durationMs};function dG(a){cG.call(this,a);this.windowId=a.windowId||0;this.g=a.text||"";this.j=a.params.append||!1;this.bn=a.bn||null}z(dG,cG);dG.prototype.toString=function(){return this.k+", "+this.durationMs+": "+this.g};
function eG(a){var b=a.firstChild&&a.firstChild.nodeValue||"",c=1E3*parseFloat(a.getAttribute("start")||0);a.getAttribute("t")&&(c=parseInt(a.getAttribute("t"),10));var d=1E3*parseFloat(a.getAttribute("dur")||0);a.getAttribute("d")&&(d=parseFloat(a.getAttribute("d")));var e=parseInt(a.getAttribute("w"),10)||0,b={startMs:c,durationMs:d,text:b,windowId:e,priority:5,params:{}};a.getAttribute("r")&&(b.params.row=parseInt(a.getAttribute("r"),10));a.getAttribute("c")&&(b.params.col=parseInt(a.getAttribute("c"),
10));a.getAttribute("append")&&(b.priority=6,b.params.append=!0);return new dG(b)}function fG(a){cG.call(this,a);this.id=a.windowId||0;this.params=a.params||{};this.Jj=a.Jj||null;this.Kj=a.Kj||null;this.g="";this.j=!1;gG(this)}z(fG,cG);function hG(a){return a.params.GE?a.params.GE:a.params.Rz?2:a.j?1:0}function iG(){return new fG({startMs:0,durationMs:2147483647,params:bF})}function gG(a){a.Jj&&qa(a.params,TF(a.Jj));a.Kj&&qa(a.params,TF(a.Kj))};function jG(a){bG.call(this);this.g.push(iG());a=a.firstChild.childNodes;for(var b=0,c=a.length;b<c;b++){var d=eG(a[b]);this.j.push(d)}}z(jG,bG);function kG(a){bG.call(this);this.k={};a=a.firstChild.childNodes;for(var b=0,c=a.length;b<c;b++)switch(a[b].tagName){case "window":var d=a[b],e=parseInt(d.getAttribute("id"),10);t:{var g=this.k[e];if(d.getAttribute("t")||d.getAttribute("start")){var h=parseInt(d.getAttribute("t"),10);d.getAttribute("start")&&(h=1E3*parseFloat(d.getAttribute("start")));g&&(g.Jb()+g.durationMs>=h?g.durationMs=h:g=null);switch(d.getAttribute("op")){case "kill":d=null;break t;case "define":g=null}g?g.A=!0:g=iG();var k=
{};qa(k,g?g.params:bF);d.getAttribute("id")&&(k.id=d.getAttribute("id"));d.getAttribute("op")&&(k.XG=d.getAttribute("op"));d.getAttribute("rc")&&(k.od=parseInt(d.getAttribute("rc"),10));d.getAttribute("cc")&&(k.xm=parseInt(d.getAttribute("cc"),10));d.getAttribute("ap")&&(g=parseInt(d.getAttribute("ap"),10),k.anchorPoint=0>g||8<g?7:g);d.getAttribute("ah")&&(k.kj=parseInt(d.getAttribute("ah"),10));d.getAttribute("av")&&(k.$d=parseInt(d.getAttribute("av"),10));d.getAttribute("id")&&(k.id=parseInt(d.getAttribute("id"),
10)||0);d.getAttribute("vs")&&(k.isVisible=Boolean(d.getAttribute("vs")));d.getAttribute("ju")&&(k.textAlign=parseInt(d.getAttribute("ju"),10));d.getAttribute("pd")&&(k.Hf=1,0==parseInt(d.getAttribute("pd"),10)&&(k.Hf=0));d.getAttribute("bc")&&(k.backgroundColor=parseInt(d.getAttribute("bc"),16));d.getAttribute("bo")&&(k.Nq=parseInt(d.getAttribute("bo"),10)/100);d.getAttribute("fc")&&(k.color=parseInt(d.getAttribute("fc"),16));d.getAttribute("sd")&&(k.Rz=parseInt(d.getAttribute("sd"),10));g=parseInt(d.getAttribute("d"),
10)||1E3*parseFloat(d.getAttribute("dur"))||2147483647;d={startMs:h,durationMs:g,params:k,windowId:parseInt(d.getAttribute("id"),10)};d=new fG(d)}else d=null}this.k[e]=d;this.g.push(d);break;case "text":e=eG(a[b]),this.j.push(e),d=e.windowId,this.k[d]&&(d=this.k[d],e=e.g,""!=d.g&&(d.j=!0),d.g+=e)}}z(kG,bG);function lG(a){this.parent=a||null;this.g={}}function mG(a,b,c){var d=a.g[b];if(void 0!=d)return d;if(a.parent&&(void 0==c||c))return mG(a.parent,b)}function nG(a,b,c){void 0!=c&&(a.g[b]=c)}function oG(a,b,c){void 0!=c&&(a.g[b]=c)}function TF(a){var b=a.parent?TF(a.parent):{};qa(b,a.g);return b};function pG(a){bG.call(this);var b={Bh:{},fn:{},gn:{}},c,d;a=a.firstChild.childNodes;for(var e=0;e<a.length;e++){var g=a[e];switch(g.tagName){case "head":c=g;break;case "body":d=g}}if(c)for(c=c.childNodes,a=0;a<c.length;a++)switch(e=c[a],e.tagName){case "pen":var g=b,h=qG(e,"p"),k=void 0;h&&g.Bh[h]&&(k=g.Bh[h]);g=new lG(k);nG(g,"id",qG(e,"id"));h=rG(e,"b");void 0!=h&&(g.g.bold=h);h=rG(e,"i");void 0!=h&&(g.g.italic=h);h=rG(e,"u");void 0!=h&&(g.g.underline=h);nG(g,"charEdgeStyle",sG(e,"et"));nG(g,"offset",
sG(e,"of"));nG(g,"textType",sG(e,"tt"));oG(g,"background",tG(e,"bc"));oG(g,"charEdgeColor",tG(e,"ec"));oG(g,"color",tG(e,"fc"));h=sG(e,"fs");void 0!=h&&0!=h&&nG(g,"fontFamily",h);h=qG(e,"sz");void 0!=h&&nG(g,"fontSizeIncrement",h/100-1);h=qG(e,"bo");void 0!=h&&nG(g,"backgroundOpacity",h/255);e=qG(e,"fo");void 0!=e&&nG(g,"textOpacity",e/255);e=mG(g,"id",!1);b.Bh[e]=g;break;case "ws":g=uG(b,e);e=mG(g,"id",!1);b.gn[e]=g;break;case "wp":g=vG(b,e),e=mG(g,"id",!1),b.fn[e]=g}if(d)for(c={},a=-1,d=d.childNodes,
e=0;e<d.length;e++)switch(g=d[e],g.tagName){case "w":k=wG(b,g);if(g=c[k.id])g.durationMs=k.Jb()-g.Jb();c[k.id]=k;this.g.push(k);break;case "p":var h=b,m=g,p={},k={startMs:qG(m,"t"),durationMs:qG(m,"d"),text:m.textContent,params:p},r=qG(m,"w");void 0!=r&&(k.windowId=r);rG(m,"a")?(k.priority=6,p.append=!0):k.priority=5;(m=qG(m,"p"))&&h.Bh[m]&&(k.bn=h.Bh[m]);h=new dG(k);k=c[h.windowId];k||(k=wG(b,g),k.id=a--,h.windowId=k.id,this.g.push(k));g=k;k=h.g;""!=g.g&&(g.j=!0);g.g+=k;this.j.push(h)}}z(pG,bG);
function qG(a,b){var c=a.getAttribute(b);if(null!=c)return parseFloat(c)}function rG(a,b){var c=a.getAttribute(b);if(null!=c)return"1"==c}function sG(a,b){var c=qG(a,b);if(void 0!=c)return c}function tG(a,b){var c=a.getAttribute(b);if(null!=c)return XE.test(c),c}
function uG(a,b){var c=qG(b,"ws"),d;c&&a.gn[c]&&(d=a.gn[c]);c=new lG(d);nG(c,"id",qG(b,"id"));nG(c,"modeHint",sG(b,"mh"));nG(c,"textAlign",qG(b,"ju"));nG(c,"textPrintDirection",sG(b,"pd"));nG(c,"textScrollDirection",sG(b,"sd"));nG(c,"windowBorderType",sG(b,"et"));oG(c,"windowBorderColor",tG(b,"wbc"));oG(c,"windowColor",tG(b,"wfc"));d=qG(b,"wfo");void 0!=d&&nG(c,"windowOpacity",d/255);return c}
function vG(a,b){var c=qG(b,"wp"),d;c&&a.fn[c]&&(d=a.fn[c]);c=new lG(d);nG(c,"anchorPoint",sG(b,"ap"));nG(c,"colCount",qG(b,"cc"));nG(c,"id",qG(b,"id"));nG(c,"leftPercentage",qG(b,"ah"));nG(c,"rowCount",qG(b,"rc"));nG(c,"topPercentage",qG(b,"av"));return c}function wG(a,b){var c={windowId:qG(b,"id"),startMs:qG(b,"t"),durationMs:qG(b,"d")||2147483647,Jj:vG(a,b),Kj:uG(a,b)};return new fG(c)};function xG(a){this.g=a.languageCode;this.languageName=a.languageName||null;this.Vk=a.languageOriginal||null;this.id=a.id||null;this.isDefault=a.is_default||!1}xG.prototype.toString=function(){return this.g+"_"+this.languageName+"_"+this.Vk+"_"+this.id+"_"+this.isDefault};function yG(a){a=a||{};this.F=a.formats||"";this.A=a.format||1;if(1==this.A)for(var b=this.F.split(","),c=0;c<b.length;c++){var d=parseInt(b[c],10);isNaN(d)||(this.A=Math.max(d,this.A))}this.j=a.languageCode||"";this.B=a.languageName;this.k=a.kind||"";this.o=a.name;this.xa=a.id;this.G=a.is_servable;this.isDefault=a.is_default;this.C=a.is_translateable;this.D=a.vss_id||"";this.g=null;a.translationLanguage&&(this.g=new xG(a.translationLanguage))}
function zG(a){var b={format:a.A,languageCode:a.j,languageName:a.B,displayName:KF(a),kind:a.k,name:a.o,id:a.xa,is_servable:a.G,is_default:a.isDefault,is_translateable:a.C};a.g&&(a=a.g,b.translationLanguage={languageCode:a.g,languageName:a.languageName,languageOriginal:a.Vk,id:a.id,is_default:a.isDefault});return b}function KF(a){var b=[a.B];if("asr"==a.k){var c=lf("YTP_ASR_SETTINGS_LABEL");b.push(" (",c,")")}a.o&&b.push(" - ",a.o);a.g&&b.push(" >> ",a.g.languageName);return b.join("")}
yG.prototype.toString=function(){var a=[this.j,": ",this.o," (",this.k,")"];this.g&&a.push(" >> ",this.g.g);return a.join("")};yG.prototype.equals=function(a){if(!a)return!1;var b=this.g,c=a.g;if(b&&c){if(b.g!=c.g)return!1}else if(b||c)return!1;return this.j==a.j&&this.o==a.o&&this.k==a.k};function AG(a,b){bG.call(this);this.g.push(iG());for(var c=a.split(BG),d=1;d<c.length;d++){var e;e=c[d];var g=b;if(""==e||0==e.search(CG))e=null;else{var h=e.split(DG),k=0,m=h[k++].match(EG);m||(m=h[k++].match(EG));m?(e=FG(m[1],g),g=FG(m[3],g),h=h.slice(k).join("\n"),e=new dG({startMs:e,durationMs:g-e,text:h,windowId:0,priority:5,params:{}})):e=null}e&&this.j.push(e)}}z(AG,bG);var CG=/NOTE/,BG=/(?:\r\n|\r|\n){2,}/,DG=/\r\n|\r|\n/,EG=/(([\d]{2}:)?[\d]{2}:[\d]{2}\.[\d]{3})[\t ]+--\x3e[\t ]+(([\d]{2}:)?[\d]{2}:[\d]{2}\.[\d]{3})/;
function FG(a,b){for(var c=a.split(":"),d=0,e=0;e<c.length;e++)d=60*d+parseFloat(c[e]);return 1E3*d+b};function GG(a,b){this.g=[];this.j=[];var c;c=a?"WEBVTT"==a.substring(0,6)?new AG(a,b||0):(c=XF(a))&&c.firstChild?"timedtext"==c.firstChild.tagName?3==parseInt(c.firstChild.getAttribute("format"),10)?new pG(c):new kG(c):new jG(c):null:null;c&&(this.j=c.g,this.g=c.j)};function HG(a,b){Q.call(this);this.Y=b;this.C=new WF;this.k=!0;this.D=this.o=this.A=this.B=this.g=null;this.j=0}z(HG,Q);HG.prototype.K=function(){hf(this.j);this.j=0;this.k=!0;this.o&&this.o.abort()};HG.prototype.resume=function(){this.k=!1;hf(this.j);this.seek(this.Y.getCurrentTime());IG(this)};HG.prototype.seek=function(a){this.g=ab(this.D.Ri(a).g)};function JG(a,b){a.B=b}function KG(a){var b;if(b=!a.k&&null!==a.g)b=a.g,b=b.g.Hg(b);return b&&!a.o&&!(a.g&&30<a.g.startTime-a.Y.getCurrentTime())}
function LG(a){var b;b=a.g;b=as(b.g,b);if(!a.C.contains(b.g[0].o)){var c=Lr(Yr(b));a.o=fj(c,{format:"RAW",Ab:x(a.F,a),withCredentials:!0});a.A=b;var c=a.C,d=a.A.g[0].o,e=yb(c.ga,d);0<=e||0>e&&1==(-e-1)%2||(e=-e-1,0<e&&1==d-c.ga[e-1]&&e<c.ga.length&&1==c.ga[e]-d?(qb(c.ga,e),qb(c.ga,e-1)):0<e&&1==d-c.ga[e-1]?c.ga[e-1]=d:e<c.ga.length&&1==c.ga[e]-d?c.ga[e]=d:(vb(c.ga,e,0,d),vb(c.ga,e+1,0,d)))}a.g=ab(b.g)}
HG.prototype.F=function(a){null==a.responseText||400<=a.status||this.k||null===this.B||(a=new GG(a.responseText,1E3*this.A.g[0].startTime),this.B(a));this.o=this.A=null};function IG(a){a.j=gf(x(function(){KG(this)&&LG(this)},a),1E3);KG(a)&&LG(a)};function MG(){this.j=[];this.g=[];this.k=-1}function NG(a,b){return b?a.g.concat(a.j):a.g}function OG(a,b){switch(b.k){case "asr":return PG(b,a.j);default:if(b.isDefault||0>a.k)a.k=a.g.length;return PG(b,a.g)}}function PG(a,b){return E(b,x(a.equals,a))?!1:(b.push(a),!0)};function QG(a){this.Jp=!!a;this.g=new MG;this.k=[]}z(QG,Q);function RG(a,b){return E(NG(a.g,!0),function(a){return a.toString()==b})}QG.prototype.seek=function(){};QG.prototype.wm=function(){};QG.prototype.K=function(){QG.H.K.call(this);this.wm()};function SG(a,b){QG.call(this);this.o=a;this.j=new HG(new VF,b)}z(SG,QG);f=SG.prototype;f.ct=function(a,b){JG(this.j,function(c){b(c,a)});this.j.D=this.o.g[a.j];this.j.resume()};f.St=function(a){OG(this.g,new yG({format:1,languageCode:"en",languageName:"English",name:"",is_servable:!0,is_default:!0,is_translateable:!1}));a()};f.seek=function(a){this.j.seek(a)};f.wm=function(){var a=this.j;hf(a.j);a.j=0;a.k=!0};f.K=function(){this.j.dispose();SG.H.K.call(this)};function TG(a,b){RF.call(this,a,b);this.Pa.style.display="block";this.Pa.style.padding="0";this.bc=[];var c=this.Pa;Dg(c,"captions-text");N(c,"caption-painton-text-rows")}z(TG,RF);f=TG.prototype;f.type=1;f.pq="";f.Kn="";f.fh=!1;f.Ub=null;f.bc=null;f.Cj=function(){return this.bc[0]?this.bc[0].offsetHeight:0};function UG(a){return a.bc.reduce(function(a,c){return Math.max(a,c.offsetWidth)},0)}
f.Xe=function(){0!=this.id&&(kg(this.Ja,"100%"),kg(this.Ja,this.fh?UG(this):this.Ub.width));var a=Math.round(this.Da.od*this.Cj());this.Ja.style.maxHeight=a+"px";SF(this);qA(this.Ja,this.Da.isVisible)};
f.Td=function(a){this.$j();a=UF(a);this.fh||(this.gh=a);a=a.split("<br>");for(var b=0,c=a.length;b<c;b++)if(a[b]){var d=H("div",{"class":"caption-row-holder"}),e=H("span",{"class":"caption-row captions-text"});e.style.backgroundColor=this.Kn;d.appendChild(e);e.innerHTML=a[b];this.fh||(this.Pa.style.height=this.Ub.height+"px",this.Pa.style.width=this.Ub.width+"px",d.style.position="absolute",d.style.top=this.Ub.lq[b]+"px",d.style.left=this.Ub.kq[b]+"px");this.Pa.appendChild(d);this.bc.push(e)}this.Xe()};
f.$j=function(){for(var a=0,b=this.bc.length;a<b;a++){var c=Fd(this.bc[a],"caption-row-holder");ld(c)}this.bc=[]};f.kd=function(a){TG.H.kd.call(this,a);this.Kn=this.Pa.style.backgroundColor;this.Pa.style.backgroundColor="";a=0;for(var b=this.bc.length;a<b;a++)this.bc[a].style.backgroundColor=this.Kn};function VG(a,b){RF.call(this,a,b);this.Qc=[];this.ce=[];this.Wb=[];this.Zf=new Dn(433);this.Zf.stop();P(this.Zf,"tick",x(this.KF,this))}z(VG,RF);f=VG.prototype;f.type=2;f.LF=32;f.Wb=null;f.de=0;f.ce=null;f.Zf=null;f.Xe=function(){kg(this.Ja,"100%");var a=this.Ja.offsetWidth,a=Math.min(WG(this),a);kg(this.Ja,a+"px");kg(this.Ih,"100%");this.Pa.style.whiteSpace="nowrap";SF(this);qA(this.Ja,this.Da.isVisible)};
f.Ct=function(a){var b=a.length;if(0>=b)this.$j();else{for(var c=0;c<b&&0<=this.Qc.indexOf(a[c]);)c++;this.Qc=this.Qc.concat(a.slice(c));XG(this)}};f.$j=function(){this.Qc=[];this.Wb=[];this.de=0;this.Wb=[];this.ce=[];YG(this)};
function XG(a){if(!ZG(a))if(a.de>=a.Qc.length)YG(a);else{var b=a.Wb.length-1;0>b&&(a.ce.push(0),a.de=0,a.Wb.push(""),b=0);for(var c=a.Qc.length,d=a.de;d<c;d++){var e=a.Qc[d];if("\n"==e.g){a.de++;a.ce[b]++;break}if(e.j||0==a.Wb[b].length)a.Wb[b]+=e.g,a.de++,a.ce[b]++;else break}YG(a);d<c&&!ZG(a)&&(b=a.Cj(),N(a.Pa,"caption-rollup"),a.Ja.style.overflow="hidden",a.Pa.style.top=-b+"px",a.Zf.start())}}function ZG(a){return a.Zf.enabled||Bg(a.Pa,"caption-rollup")}
f.KF=function(){this.Ja.style.overflow="visible";this.Pa.style.top=0;this.Zf.stop();Dg(this.Pa,"caption-rollup");this.Wb.push("");this.ce.push(0);XG(this)};function YG(a){if(!ZG(a)){for(;a.Wb.length<a.Da.od;)a.Wb.unshift(""),a.ce.unshift(0);for(;a.Wb.length>a.Da.od;){a.Wb.shift();var b=a.ce.shift();0<b&&(a.de-=b,a.Qc.splice(0,b))}a.Td(a.Wb.join("\n"))}}
function WG(a){a.Xb.style.fontFamily=a.Pa.style.fontFamily;a.Xb.style.fontSize=a.Pa.style.fontSize;a.Pa.appendChild(a.Xb);a.Xb.innerHTML="\u2014";var b=a.Xb.offsetWidth;a.Xb.innerHTML=" ";b=2*a.Xb.offsetWidth+b*a.LF;a.Pa.removeChild(a.Xb);return b};function $G(a,b,c,d){QG.call(this,d);c||(c=Vi(a).hl||"",c=c.split("_").join("-"));this.o=Yi(a,{hl:c});this.A=b;this.B={};this.j=null}z($G,QG);$G.prototype.ct=function(a,b){var c=aH(this,a),d=x(function(c){this.j=null;c=new GG(c.responseText);b(c,a)},this);this.j&&this.j.abort();this.j=fj(c,{format:"RAW",Ma:d,withCredentials:!0})};
$G.prototype.St=function(a,b,c){var d=this.o;b={type:"list",tlangs:1,v:this.A,fmts:Number(b||!1),vssids:1};this.Jp&&(b.asrs=1);d=Yi(d,b);b=x(function(b){this.j=null;if(window.bakend)b=bakend.createAutogenTranscript(b);if((b=b.responseXML)&&b.firstChild){for(var d=this.g,h=b.getElementsByTagName("track"),k=h.length,m=0;m<k;m++){var p=h[m].getAttribute("formats"),r=c,t=h[m].getAttribute("lang_code"),v=h[m].getAttribute("lang_translated"),I=h[m].getAttribute("name"),R=h[m].getAttribute("kind"),ea=h[m].getAttribute("id"),ta="true"==h[m].getAttribute("lang_default"),
Ve="true"==h[m].getAttribute("cantran"),dh=h[m].getAttribute("vss_id"),p=new yG({formats:p,format:r,languageCode:t,languageName:v,name:I,kind:R,id:ea,is_servable:!0,is_default:ta,is_translateable:Ve,vss_id:dh});OG(d,p)}b=b.getElementsByTagName("target");d=b.length;for(h=0;h<d;h++)k=b[h].getAttribute("lang_code"),m=b[h].getAttribute("lang_translated"),p=b[h].getAttribute("lang_original"),r=b[h].getAttribute("id"),t="true"==b[h].getAttribute("lang_default"),k={languageCode:k,languageName:m,languageOriginal:p,
id:r,is_default:t},this.B[k.languageCode]=k.languageName,this.k.push(new xG(k))}a()},this);this.j&&this.j.abort();this.j=fj(d,{format:"RAW",Ma:b,withCredentials:!0})};function aH(a,b){var c=a.o,d={v:a.A,type:"track",lang:b.j,name:b.o,kind:b.k,fmt:b.A};b.g&&(d.tlang=b.g.g);return c=Yi(c,d)}$G.prototype.K=function(){this.j&&this.j.abort();$G.H.K.call(this)};function bH(a){Kx.call(this,a);kf({YTP_TRANSLATE_MENU_ITEM:"Translate captions",YTP_CONTRIBUTE_MENU_ITEM:"Add subtitles/CC",YTP_TRANSLATE_DIALOG_TITLE:"Translate...",YTP_ASR_SETTINGS_LABEL:"Automatic Captions",YTP_LANGUAGE_OFF:"Off",YTP_FONT_FAMILY:"Font family",YTP_FONT_SIZE:"Font size",YTP_FONT_COLOR:"Font color",YTP_FONT_OPACITY:"Font opacity",YTP_BACKGROUND_COLOR:"Background color",YTP_BACKGROUND_OPACITY:"Background opacity",YTP_WINDOW_COLOR:"Window color",YTP_WINDOW_OPACITY:"Window opacity",
YTP_COLOR_WHITE:"White",YTP_COLOR_YELLOW:"Yellow",YTP_COLOR_GREEN:"Green",YTP_COLOR_CYAN:"Cyan",YTP_COLOR_BLUE:"Blue",YTP_COLOR_MAGENTA:"Magenta",YTP_COLOR_RED:"Red",YTP_COLOR_BLACK:"Black",YTP_FONT_FAMILY_MONO_SERIF:"Monospaced Serif",YTP_FONT_FAMILY_PROP_SERIF:"Proportional Serif",YTP_FONT_FAMILY_MONO_SANS:"Monospaced Sans-Serif",YTP_FONT_FAMILY_PROP_SANS:"Proportional Sans-Serif",YTP_FONT_FAMILY_CASUAL:"Casual",YTP_FONT_FAMILY_CURSIVE:"Cursive",YTP_FONT_FAMILY_SMALL_CAPS:"Small Capitals",YTP_CHAR_EDGE_STYLE:"Character edge style",
YTP_EDGE_STYLE_NONE:"None",YTP_EDGE_STYLE_RAISED:"Raised",YTP_EDGE_STYLE_DEPRESSED:"Depressed",YTP_EDGE_STYLE_OUTLINE:"Outline",YTP_EDGE_STYLE_DROP_SHADOW:"Drop Shadow",YTP_CLICK_FOR_SETTINGS:"Click $GEAR_ICON for settings"});this.Qi=!0;this.wa=this.S=this.na=!1;this.Ia=new az(this);this.D=a.R();this.B=null;this.O=a.app.j;this.ma=this.ha=null;this.ta={};this.ia=[];this.Fa=0;this.J={};this.V={};this.pa=this.Aa=this.I=this.ya=!1;this.ka=new RF(99,dF);this.o=this.A=this.C=null;this.Ea=!1;this.F=this.G=
0;this.W=new pF(Yx(this));S(this,this.W);this.W.listen("click",this.oy,this);this.M=this.va+"-mdx";this.ea=new OF(Yx(this));S(this,this.ea);N(this.ea.L(),"ytp-mdx-settings-button");this.ea.listen("click",this.By,this);this.k=new IF(Yx(this),x(this.Tp,this),x(this.ko,this),x(this.zy,this),x(this.Ay,this),x(this.qy,this));this.P=new sF(Yx(this));S(this,this.P);this.P.listen("change",x(this.Md,this,!0));this.P.listen("cancel",this.ny,this);this.P.listen("select",this.Sp,this);this.U=new MF(Yx(this));
S(this,this.U);this.U.listen("change",this.vy,this);this.U.listen("cancel",this.qg,this);this.subscribe("onResize",x(this.Up,this));this.subscribe("onBackgroundChange",x(this.wy,this));this.subscribe("onTextOpacityChange",x(this.xy,this));this.subscribe("onWindowOpacityChange",x(this.yy,this));this.subscribe("onFontSizeIncrease",x(this.ty,this));this.subscribe("onFontSizeDecrease",x(this.ry,this));this.subscribe("onCaptionsToggle",x(this.uy,this))}z(bH,Kx);bH.prototype.va="captions";
bH.prototype.nc="cc";bH.prototype.vn="subtitlesModuleData";var cH={background:"#080808",backgroundOpacity:1,charEdgeStyle:3,color:"#fff",fontFamily:4,fontSizeIncrement:0,textOpacity:1,windowColor:"#080808",windowOpacity:0};function dH(a){return"3"!=a.D.g?!1:!!a.O.g.textTracks}function eH(a,b,c,d,e){w(a.j[b])&&(a.j[c]=d.indexOf(a.j[b]),-1==a.j[c]&&(a.j[c]=e),delete a.j[b])}f=bH.prototype;
f.create=function(){bH.H.create.call(this);this.B=this.g.getVideoData();-1==eF.indexOf(this.D.O)&&N(this.g.Qa(),"cc-international");this.j=fc(cH);qa(this.j,Rx(this,"display-settings"));eH(this,"fontFamilyOption","fontFamily",YE,cH.fontFamily);eH(this,"charEdgeStyle","charEdgeStyle",ZE,cH.charEdgeStyle);this.P.setProperties(this.j);this.ma=new X(["div",["ytp-player-content","ytp-subtitles-player-content"]]);this.ma.X(this.g.Qa());this.ha=this.ma.L();dH(this)||(Zx(this,this.va,this.W),ay(this,this.k));
fH(this)&&this.load()};f.destroy=function(){this.ma.Zc();this.ma.dispose();this.ha=null;by(this,this.k);$x(this,this.va);bH.H.destroy.call(this)};function fH(a){if(1==a.D.k.cc_load_policy||1==a.B.Iq||"alwayson"==a.B.zc("yt:cc")||dH(a))return!0;var b=Rx(a,"module-enabled");return null!=b?!!b:"on"==a.B.zc("yt:cc")}function gH(a){a.A.St(x(a.Lt,a),!0,dH(a)?"vtt":void 0)}
f.load=function(){this.pa="alwayson"==this.B.zc("yt:cc");this.Aa="1"==this.B.o.cc_auto_caps||"1"==this.D.k.cc_auto_caps;this.k.C="1"==this.B.o.cc_contribute||"1"==this.D.k.cc_contribute;this.Ob?(Zx(this,this.M,this.ea),this.k.j=this.M):($x(this,this.M),this.k.j=null);bH.H.load.call(this);this.na=!0;if(this.B.$a)this.A=new SG(this.B.k,this.g),this.subscribe("seekto",this.To,this);else{var a=this.B.o.cc_lang_pref||this.D.k.cc_lang_pref||this.B.zc("yt:cc_default_lang")||this.D.O,a=a&&a.split("_").join("-");
this.A=new $G(this.B.xf,this.B.videoId,a,this.B.Mk)}gH(this)};f.By=function(){this.loaded||this.load()};f.unload=function(){this.Ob&&($x(this,this.M),this.k.j=null,hH(this,!1),this.xj("control_subtitles_set_track"));if(dH(this)){var a;a=Vc("track",void 0,void 0);for(var b=0;b<a.length;b++)ld(a[b])}else iH(this,!1),jH(this),this.unsubscribe("seekto",this.To,this),this.A.dispose(),this.A=null,this.qg();this.I=this.wa=this.S=this.na=!1;bH.H.unload.call(this)};f.oa=function(){};
f.Lt=function(){this.na=!1;if(dH(this)){for(var a=this.O.g,b=this.A,c=[],d=NG(b.g,void 0),e=0;e<d.length;e++){var g=d[e],h=aH(b,g),h={kind:"subtitles",label:g.o,srclang:g.j,src:h};g.isDefault&&(h["default"]=1);c.push(H("track",h))}for(b=0;b<c.length;b++)a.appendChild(c[b])}else a=this.U,c=this.A.k,DF(a.j,c),HF(a.j,1E3),Jy(a.j.template,"tabindex",1E3),VD(a.g.g,1001),c.length?NF(a,c[0]):NF(a,null),a=this.I||fH(this)||kH(this.D),c=NG(this.A.g,!0),0<c.length?(this.oa("Caption track list loaded, found "+
c.length+" tracks."),this.wa=!0,JF(this.k,c),a&&(c=this.A,a=c.g.k,c=NG(c.g,!0),(a=0>a?null:c[a])?(this.ya=!0,lH(this,a)):(this.S||mH(this),a=this.A.g.j,a.length&&(a=a[0].toString(),(this.I||this.Aa)&&this.ko(a)))),this.publish("publish_external_event","onCaptionsTrackListChanged")):(this.oa("No captions found."),by(this,this.k),$x(this,this.va),this.unload())};function mH(a){a.S=!0;dH(a)||(a.Md(),a.Up())}
f.lE=function(a,b){this.S||mH(this);this.ya&&(this.ya=!1,this.publish("publish_external_event","onCaptionsTrackListChanged"));if(b&&(!this.o||!b.equals(this.o))){jH(this);this.o=b;this.Ea=Xl.test(b.j);var c={trackName:b.o,trackKind:b.k};b.g?(c.trackLangCode=b.g.g,c.fromLangCode=b.j):c.trackLangCode=b.j;this.log(c);this.I&&(c=KF(b)||"",(c=c.replace(/<[^>]*>?/g,""))&&(c+="\n"),c+=lf("YTP_CLICK_FOR_SETTINGS",{GEAR_ICON:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="15px" height="15px" viewBox="0 0 15 15"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.25,5.7C8.783,5.233,8.2,5,7.5,5S6.2,5.233,5.7,5.7C5.233,6.2,5,6.8,5,7.5s0.233,1.283,0.7,1.75C6.2,9.75,6.8,10,7.5,10s1.283-0.25,1.75-0.75C9.75,8.783,10,8.2,10,7.5S9.75,6.2,9.25,5.7z M8.75,2.15c0.6,0.1,1.15,0.317,1.65,0.65l1.5-1.5l1.75,1.75l-1.5,1.5c0.333,0.534,0.583,1.1,0.75,1.7H15v2.5h-2.1c-0.133,0.6-0.367,1.15-0.7,1.65l1.5,1.5l-1.75,1.75l-1.5-1.5c-0.534,0.333-1.1,0.583-1.7,0.75V15h-2.5v-2.1c-0.6-0.167-1.167-0.417-1.7-0.75l-1.5,1.5L1.3,11.9l1.5-1.5C2.467,9.9,2.25,9.35,2.15,8.75H0v-2.5h2.15c0.133-0.6,0.367-1.167,0.7-1.7l-1.5-1.5L3.1,1.3l1.5,1.5c0.5-0.333,1.05-0.55,1.65-0.65V0h2.5V2.15z"/></svg>'}),
this.ha.appendChild(this.ka.Ja),this.ka.Td(c),this.ka.kd(this.j,this.O.gb()),this.F||(this.F=L(x(this.Cp,this),2E3)));this.publish("publish_external_event","captionschanged",zG(b));oF(this.W,"ytp-subtitles-button-active");c=this.k;c.B=!0;GF(c.g,!1);LF(this.k,b.toString());Sx(this,"module-enabled",!0);this.publish("vss_segment")}nH(this,a.j.concat(a.g))};
function nH(a,b){a.oa("Caption track loaded with "+b.length+" events.");var c=[];C(b,function(a){a.Jb();var b;this.Fa++;b="caption"+this.Fa.toString();c.push(new Ax(a.Jb(),a.Jb()+a.durationMs,{id:b}));this.ta[b]=a},a);a.ye.apply(a,c)}f.Gc=function(a){if(a=oH(this,a))this.ia.push(a),this.G||(this.G=L(x(this.Bi,this),0))};f.ad=function(a){if(a=oH(this,a))pb(this.ia,a),this.G||(this.G=L(x(this.Bi,this),0))};function oH(a,b){var c=b.getId();return 0!=c.indexOf("caption")?null:a.ta[c]}
f.sE=function(a){if(a instanceof fG){var b=this.J[a.id];qa(a.params,this.j);gG(a);b&&b.type!=hG(a)&&(ld(b.Ja),delete this.J[a.id],b=null);if(!b){var b=this.J,c=a.id,d;t:{d=a.id;var e=a.params;switch(hG(a)){case 1:d=new TG(d,e);break t;case 2:d=new VG(d,e);break t;default:d=new RF(d,e)}}b=b[c]=d;c=b.Ja;O(c,"captions-asr","asr"==this.o.k);null!=a.params.Hf&&(a.params.Hf=this.Ea?1:0);0==b.id?this.ha.appendChild(c):Nx(this,c)}b.kd(a.params,this.O.gb());if(1==hG(a)){b.pq=a.g;b.Ub={};b.fh=!0;b.Td(b.pq);
b.Ub.od=b.bc.length;b.Ub.width=b.Ja.offsetWidth;b.Ub.height=b.Ja.offsetHeight;b.Ub.kq=[];b.Ub.lq=[];for(a=0;a<b.Ub.od;a++)b.Ub.lq.push(b.bc[a].offsetTop),b.Ub.kq.push(b.bc[a].offsetLeft);b.fh=!1;b.Td(b.gh)}}else b=a.windowId,this.V[b]||(this.V[b]=[]),this.V[b].push(a)};f.Up=function(){this.S&&(this.Md(),Ob(this.J,function(a){a.Xe()},this))};
function pH(a){var b=[];Ob(a.J,function(a){a instanceof TG&&b.push(a)});if(0!=b.length){b.sort(function(a,b){return b.Da.$d-a.Da.$d});var c=qH(a.O).height,d=b[0].Da.$d;C(b,function(a){a.Da.$d=d;var b=Math.round(a.Da.od*a.Cj());d-=Math.round(b/c*100);a.Xe()},a)}}f.Cp=function(){this.F=0;ld(this.ka.Ja)};
f.Bi=function(){this.G=0;this.S&&(cc(this.V),this.ia.sort(function(a,b){return a.Jb()==b.Jb()?a.o-b.o:a.Jb()-b.Jb()}),C(this.ia,this.sE,this),Ob(this.J,function(a,b){this.V[b]?a.Ct(this.V[b]):(ld(a.Ja),delete this.J[b])},this),pH(this),this.C&&this.C.Xe(),this.oa("Refreshing caption display..."))};function rH(a,b,c){if(c&&c.length){for(var d=a.j[b],e=0,g=0;g<c.length;g++)if(d==c[g].option){e=(g+1)%c.length;break}a.j[b]=c[e].option;a.Md(!0)}}f.wy=function(){rH(this,"backgroundOpacity",gF)};
f.xy=function(){rH(this,"textOpacity",hF)};f.yy=function(){rH(this,"windowOpacity",gF)};f.ry=function(){sH(this,-1)};f.ty=function(){sH(this,1)};function sH(a,b){var c=a.j.fontSizeIncrement+b,c=Math.max(-2,Math.min(4,c));a.j.fontSizeIncrement=c;a.Md()}function jH(a){if(a.o){a.o=null;Lx(a);a.ia=[];a.ta={};a.o=null;a.Bi();oF(a.W,"ytp-subtitles-button");a.k.off();var b=a.k;b.B=!1;GF(b.g,!0);a.A.wm()}}
function lH(a,b,c){!b||a.o&&b.equals(a.o)||(null!=c&&(a.I=c),a.Ob?(a.o=b,hH(a,!0),a.xj("control_subtitles_set_track",zG(b)),a.S||mH(a)):(a.A.ct(b,x(a.lE,a)),a.na=!0,LF(a.k,b.toString())))}f.ko=function(a,b){var c=RG(this.A,a);lH(this,c,b);cy(this)};f.Ay=function(){this.pa||(Ox(this,this.U),cy(this))};
f.vy=function(){if(!this.pa){this.qg();var a=this.U.getSelected();if(a){var b=this.o,c=new yG;c.j=b.j;c.B=b.B;c.o=b.o;c.k=b.k;c.isDefault=!1;c.C=b.C;c.D=b.D;c.g=a;OG(this.A.g,c)&&(a=c.toString(),JF(this.k,NG(this.A.g,!0)),LF(this.k,a));lH(this,c,!0)}}};f.ny=function(){this.qg();this.Ob&&this.o&&this.xj("control_subtitles_set_track",zG(this.o))};f.Sp=function(){delete this.j;this.j=fc(cH);this.P.setProperties(this.j);Sx(this,"display-settings",this.j);this.Md()};
f.Md=function(a){var b=this.O.gb();Ob(this.J,function(a){a.kd(this.j,b)},this);this.C&&this.C.kd(this.j,b);this.ka.kd(this.j,b);this.Bi();n(a)&&!a||Sx(this,"display-settings",this.j)};f.oy=function(){this.I=!0;tH(this)};function tH(a){a.loaded?a.o?a.Tp():a.Lt():a.load()}f.Tp=function(){this.F&&(M(this.F),this.Cp());Sx(this,"module-enabled",!1);this.publish("vss_segment");jH(this);cy(this);this.I=!1;this.Ob&&(hH(this,!1),this.xj("control_subtitles_set_track"))};f.zy=function(){Ox(this,this.P);cy(this)};
f.qy=function(){Px(this,this.D.tb+"timedtext_video?v="+this.B.videoId);cy(this)};function uH(a){return bH.prototype.Ha(a)?new bH(a):null}
f.Xj=function(a,b){switch(a){case "fontSize":return isNaN(b)||(this.j.fontSizeIncrement=Math.max(-2,Math.min(4,b)),this.Md()),this.j.fontSizeIncrement;case "reload":b&&gH(this);break;case "stickyLoading":this.D.Fb()&&Sx(this,"module-enabled",!!b);break;case "track":if(b){if(!ja(b))break;var c=new yG(b);c.equals(this.o)||(lH(this,c,!0),LF(this.k,c.toString()))}else return this.o?zG(this.o):{};return"";case "tracklist":return this.wa?D(NG(this.A.g,b&&b.includeAsr),function(a){return zG(a)}):[];case "displaySettings":return b&&
ja(b)&&vH(this,b),c=fc(this.j),c.fontFamily=YE[c.fontFamily],c.charEdgeStyle=ZE[c.charEdgeStyle],c;case "sampleSubtitles":iH(this,!!b)}};function iH(a,b){if(b&&!a.C){a.C=new RF(98,cF);a.ha.appendChild(a.C.Ja);var c=a.C,d=Y(Yx(a),"YTP_SAMPLE_SUBTITLES");d&&(d=d.replace(/<[^>]*>?/g,""),c.Td(d));a.C.kd(a.j,a.O.gb())}else!b&&a.C&&(ld(a.C.Ja),a.C=null)}f.Sj=function(){var a="reload fontSize track tracklist displaySettings sampleSubtitle".split(" ");this.D.Fb()&&a.push("stickyLoading");return a};
f.Cn=function(a,b){return a&&w(a)&&XE.test(a)?a:b};f.Dn=function(a,b){return ha(a)&&!isNaN(a)?Math.max(0,Math.min(1,parseFloat(a))):b};f.nE=function(a,b){if(a&&w(a)){var c=ZE.indexOf(a);return-1!=c?c:b}return b};f.oE=function(a,b){if(a&&w(a)){var c=YE.indexOf(a);return-1!=c?c:b}return b};f.pE=function(a,b){return ha(a)&&!isNaN(a)?Math.max(-2,Math.min(4,a)):b};var wH=null;
function vH(a,b){if(b)if(ec(b,"reset"))a.Sp();else{if(!wH){var c={};c.color=a.Cn;c.textOpacity=a.Dn;c.background=a.Cn;c.backgroundOpacity=a.Dn;c.windowColor=a.Cn;c.windowOpacity=a.Dn;c.charEdgeStyle=a.nE;c.fontFamilyOption=a.oE;c.fontSizeIncrement=a.pE;wH=c}var c=wH,d;for(d in c)switch(d){case "fontFamilyOption":a.j.fontFamily=c[d](b[d],a.j.fontFamily);break;default:a.j[d]=c[d](b[d],a.j[d])}a.Md(kH(a.D))}}f=bH.prototype;f.Ha=function(a){return!!a.getVideoData().xf};
f.jj=function(a){by(this,this.k);a?(this.k.j=this.M,Zx(this,this.M,this.ea)):(this.k.j=null,$x(this,this.M));ay(this,this.k);a?jH(this):this.loaded&&(this.unload(),this.load())};function hH(a,b){b?(oF(a.W,"ytp-subtitles-button-active"),LF(a.k,a.o.toString())):(oF(a.W,"ytp-subtitles-button"),a.k.off())}f.To=function(){this.A.seek(this.g.getCurrentTime())};f.mh=function(){var a=this.o;return a?{cc:a.D}:null};f.uy=function(){this.I=!0;tH(this)};
f.K=function(){this.Ia.removeAll();this.G&&(M(this.G),this.G=0);this.F&&(hf(this.F),this.F=0);bH.H.K.call(this)};function xH(a){Kx.call(this,a);this.va="ypc_license_checker";this.nc="ypc_license";this.B=!1;this.A=0;this.o=!1;this.j=NaN;this.C=Bt();this.k=null}z(xH,Kx);
var yH={LICENSE_DENIED_CANNOT_ACTIVATE_RENTAL:"YTP_ERROR_CANNOT_ACTIVATE_RENTAL",LICENSE_DENIED_NOT_SIGNED_IN:"YTP_ERROR_NOT_SIGNED_IN",LICENSE_DENIED_VIDEO_NOT_FOUND:"YTP_ERROR_VIDEO_NOT_FOUND",LICENSE_DENIED_NO_ACTIVE_PURCHASE_AGREEMENT:"YTP_ERROR_PURCHASE_REFUNDED",LICENSE_DENIED_PURCHASE_NOT_FOUND:"YTP_ERROR_PURCHASE_NOT_FOUND",LICENSE_DENIED_PURCHASE_EXPIRED:"YTP_ERROR_RENTAL_EXPIRED",LICENSE_DENIED_STREAMING_UNAVAILABLE:"YTP_ERROR_STREAMING_UNAVAILABLE",LICENSE_DENIED_ALREADY_PINNED_ON_A_DEVICE:"YTP_ERROR_ALREADY_PINNED_ON_A_DEVICE",
LICENSE_DENIED_CONCURRENT_PLAYBACK:"YTP_ERROR_STOPPED_BY_ANOTHER_PLAYBACK",LICENSE_DENIED_TOO_MANY_STREAMS_PER_USER:"YTP_ERROR_TOO_MANY_STREAMS_PER_USER",LICENSE_DENIED_TOO_MANY_STREAMS_PER_ENTITLEMENT:"YTP_ERROR_TOO_MANY_STREAMS_PER_ENTITLEMENT",LICENSE_DENIED_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED:"YTP_ERROR_STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",LICENSE_DENIED_UNUSUAL_ACTIVITY:"YTP_ERROR_UNUSUAL_ACTIVITY",LICENSE_DENIED_UNKNOWN:"YTP_ERROR_RETRYABLE_ERROR",LICENSE_DENIED_PLAYBACK_CAP:"YTP_ERROR_LICENSE"};
function zH(a){return Av(a.getVideoData(),"ypc_license_checker_module")}f=xH.prototype;f.Ha=function(){return zH(this.g)};f.create=function(){xH.H.create.call(this);var a=new Ax(1E3,2147483646,{priority:0});this.ye(a);this.subscribe("heartbeatparams",this.nF,this);this.subscribe("onStateChange",this.oF,this)};function AH(a){return zH(a)?new xH(a):null}f.Gc=function(){this.B=!0;BH(this,2E3)};f.nF=function(a){this.k=a;BH(this,2E3)};
f.oF=function(a){W(a.state,2)||W(a.state,64)?(this.A=0,this.j&&(M(this.j),this.j=NaN),this.o=!1):(W(a.state,1)||W(a.state,8))&&BH(this,2E3)};function BH(a,b){if(!a.j&&a.B){var c=a.g.getVideoData();if(!tv(c)||a.k)if(tv(c)||!kH(a.g.R()))c=b,void 0==c&&(c=a.o?(c=a.g.getVideoData().Fd)?c:a.k?1E3*a.k.g:6E4:1E3),a.j=L(x(a.Ly,a),c)}}
f.Ly=function(){var a,b,c;c=this.g.R().tb;var d=this.g.getVideoData();tv(d)?(b="GET",a={},c=ie(this.k.url,{request_id:Bt()}),d.D&&(c=ie(c,{vvt:d.D})),d.C&&(c=ie(c,{access_token:d.C}))):d.heartbeatToken?(b="GET",a={},c=ie(c+"heartbeat",{video_id:d.videoId,heartbeat_token:d.heartbeatToken}),d.D&&(c=ie(c,{vvt:d.D})),d.C&&(c=ie(c,{access_token:d.C}))):(b="POST",a={video_id:d.videoId,player_id:this.C,request_id:Bt(),purchase_id:d.purchaseId,version:"4",player_time_seconds:this.g.getCurrentTime().toString(),
gid:d.Bo,ypc_token:d.Co},d.D&&(a.vvt=d.D),d.C&&(a.access_token=d.C),c+="ypc_license_server");c=ie(c,{cpn:d.Ba});fj(c,{format:"RAW",method:b,ab:a,timeout:3E4,Ma:x(this.$B,this),onError:x(this.ZB,this),Ud:x(this.aC,this),withCredentials:!0})};
f.$B=function(a){if(this.j){a=a.responseText;var b;t:if(b=a,this.g.getVideoData().heartbeatToken)b=Bf(b),b="ok"==b.status?0:"stop"==b.status?1:-1;else{var c=b.match(CH);if(c){if("0"!=c[1]){b=1;break t}b=c[3]}b=b in yH?1:64<=b.length&&b.match(/[0-9a-fA-f]+/)?0:-1}-1==b?DH(this,"decode"):(this.A=0,this.j=NaN,1==b?(this.o=!1,b="YTP_ERROR_LICENSE",this.g.getVideoData().heartbeatToken?a=Bf(a).reason||lf(b):((c=a.match(CH))?(a=parseInt(c[1],10))&&(b=fy(a)):a in yH&&(b=yH[a]),a=lf(b)),Wy(this.g.app.k,"heartbeat",
a,void 0)):(this.o=!0,BH(this)))}};f.ZB=function(a){DH(this,"net-"+a.status)};f.aC=function(){DH(this,"timeout")};function DH(a,b){if(a.j){a.log({errorType:b});a.j=NaN;var c=++a.A,d=a.g.getVideoData().Gd;c>(d?d:a.k?a.k.j:5)?(c=lf("YTP_ERROR_LICENSE"),Wy(a.g.app.k,"heartbeat",c,void 0)):BH(a)}}var CH=/^GLS\/1.0 (\d+) (\w+).*?\r\n\r\n([^]*)$/;function EH(a){X.call(this,a);this.S=new T;S(this,this.S)}z(EH,X);EH.prototype.subscribe=function(a,b,c){return this.S.subscribe(a,b,c)};EH.prototype.unsubscribe=function(a,b,c){return this.S.unsubscribe(a,b,c)};EH.prototype.Lb=function(a){return this.S.Lb(a)};EH.prototype.publish=function(a,b){return this.S.publish.apply(this.S,arguments)};function FH(a,b,c){EH.call(this,["div",["html5-endscreen","ytp-player-content",c||"base-endscreen"]]);this.g=a;this.Ra=b;this.A=!1}z(FH,EH);FH.prototype.create=function(){this.A=!0};FH.prototype.destroy=function(){this.A=!1};FH.prototype.Ki=function(){return!1};function GH(){X.call(this,["div","ytp-channel-banner-container",["img","ytp-channel-banner",{src:"{{banner}}"}]])}z(GH,X);function HH(){X.call(this,["div","ytp-subscribe-card",["img","ytp-author-image",{src:"{{image}}"}],["div","ytp-subscribe-card-right",["div","ytp-author-name","{{author}}"],["div","html5-subscribe-button-container"]]])}z(HH,X);function IH(a,b){EH.call(this,b);this.F=a;this.videoId=null}z(IH,EH);
IH.prototype.zi=function(a,b){this.videoId=a?a.id||a.video_id:"";O(this.element,"ytp-suggestion-set",!!this.videoId);if(this.videoId){var c,d=a.list?a.playlist_iurlhq:a.iurlhq_webp||a.iurlhq,e=a.list?a.playlist_iurlmq:a.iurlmq_webp||a.iurlmq;b&&d?c=d:!b&&e?c=e:c=Mt(a.thumbnail_ids?a.thumbnail_ids.split(",")[0]:this.videoId,b?"hqdefault.jpg":"mqdefault.jpg");d=fc(a);d.playlist_length=d.playlist_length||0;d.title=d.title||d.playlist_title;d.author=d.author||d.playlist_author;d.image=c;d.background=
"background-image: url("+c+")";d.duration=Ly(a.length_seconds);d.episodic_title=d.title;d.episodic_index=parseInt(d.index,10)+1;d.episodic_length=d.playlist_length;this.template.update(d)}};function JH(a){var b=["div","ytp-watch-next-card",["div","ytp-watch-next-content",["div","ytp-watch-next-header",Y(0,"YTP_WATCH_NEXT")],["img","ytp-watch-next-thumbnail",{src:"{{image}}"}],["div","ytp-watch-next-title","{{title}}"],["div","ytp-watch-next-views","{{view_count_string}}"],["div","ytp-watch-next-uploaded","{{uploaded}}"]]];IH.call(this,a,b)}z(JH,IH);function KH(a,b,c,d,e,g,h){a&&(a={video_id:a,html5:1,page_subscribe:b?1:0},g&&(a.authuser=g),h&&(a.pageid=h),fj("/get_video_metadata",{method:"GET",onError:d,Ma:c,Me:a,context:e}))};function LH(a,b,c){FH.call(this,a,b,"subscribecard-endscreen");this.o=new GH;S(this,this.o);this.B=new Ey(["div","ytp-channel-curtain"]);S(this,this.B);this.k=new HH;S(this,this.k);(this.j=c?new JH(this.g.app.j.j):null)&&S(this,this.j);this.hide()}z(LH,FH);LH.prototype.create=function(){LH.H.create.call(this);jd(this.L());this.o.X(this.L());this.B.X(this.L());this.k.X(this.L());KH(this.g.getVideoData().videoId,!0,this.C,u,this,this.g.R().Xa,this.g.R().pageId)};
LH.prototype.C=function(a,b){if(this.A){var c=b.user_info,d=this.g.getVideoData();d&&(d.wa=c.external_id);d=c.channel_banner_url;sf(d)||(d="");var e=c.channel_logo_url||c.image_url;sf(e)||(e="");Jy(this.o.template,"banner",d);Jy(this.k.template,"image",e);Jy(this.k.template,"author",c.channel_title||c.username);this.j&&b.watch_next&&(this.j.zi(b.watch_next),this.j.X(this.L()));c=c.subscription_button_html;this.k.template.g["html5-subscribe-button-container"].innerHTML=c?c:""}};function MH(a,b){return lb(a.experiments.experimentIds,b)}function NH(a,b){return gb(wb(arguments,1),pa(lb,a.experiments.experimentIds))};function OH(a,b){var c=["div",["video-ads","html5-stop-propagation"],["div","video-ad-interstitial",["span","",Y(0,"YTP_AD_INTERRUPT_MESSAGE")]],["div","video-ad-status-bar",["div","video-ad-label",Y(0,"YTP_ADVERTISEMENT")],["div","video-ad-time-left"],["div",["html5-progress-bar","html5-stop-propagation"],["div",["html5-ad-progress-list","html5-progress-list"]]]],["div","ad-container"]];X.call(this,c);this.Y=b}z(OH,X);OH.prototype.k=null;OH.prototype.j=null;OH.prototype.g=null;
function PH(a){if(!a.k&&(a.k=a.template.g["ad-container"],a.Y.R().A)){var b=MH(a.Y.R(),"927622")?"ad-container-single-media-element-annotations":"ad-container-single-media-element";N(a.k,b)}return a.k}function QH(a){a.g&&(a.Y.R().A?(Dg(a.g,"ad-video"),RH(a.Y.app,a.g),a.g=null):(ld(a.g),qx(a.g)))}
function SH(a){if(!a.j){if(a.Y.R().B){var b=fd("button");N(b,"video-click-tracking");id(b,lf("YTP_VISIT_ADVERTISERS_SITE"));var c=fd("div");N(c,"video-click-tracking-container");c.appendChild(b);PH(a).appendChild(c)}else b=fd("div"),Cg(b,["video-click-tracking","ad-video"]),PH(a).appendChild(b);a.j=b}return a.j}OH.prototype.K=function(){OH.H.K.call(this);this.g&&(RH(this.Y.app,this.g),this.g=null);QH(this);jd(PH(this));jd(SH(this));this.j=this.k=null;delete this.Y};
function TH(a){if(!a.g){var b;b=a.Y.app;if(b.g.A){var c=$f(b.A),d=mg(b.A);b.V=new Lf(c.x,c.y,d.width,d.height);UH(b.B);rx(b.A,1);qx(b.A);b=b.A}else b=VH.getTag(void 0);a.g=b;Cg(a.g,["video-stream","ad-video"])}return a.g};function WH(a,b){X.call(this,["canvas"]);this.element.width=a;this.element.height=b;this.width=a;this.height=b;this.context=this.element.getContext("2d");this.g=0;this.A=null}z(WH,X);WH.prototype.k=function(a,b){M(this.g);this.context&&(this.g=FA(x(this.k,this,a,b),b),a.call(this,new Date-this.A))};WH.prototype.K=function(){M(this.g);this.context=null;WH.H.K.call(this)};function XH(a,b){WH.call(this,2*(a+2),2*(a+2));this.C=a;this.j=b;this.B=this.width/2;this.o=this.height/2}z(XH,WH);var YH=3*Math.PI/2,ZH=2*Math.PI;function $H(a,b){IH.call(this,a.app.j.j,["a","videowall-still",{tabIndex:0,style:"{{background}}",href:"{{linkurl}}"},["span","videowall-still-featured-label",Y(0,"YTP_FEATURED")],["span","videowall-still-info",["span","videowall-still-info-bg",["span","videowall-still-info-content",["span","videowall-still-info-upnext",Y(0,"YTP_PLAYLIST_UP_NEXT")],["span","videowall-still-info-title","{{title}}"],["span","videowall-still-info-author","{{author}}"],["span","videowall-still-info-duration","{{duration}}"]]]],
["div",["videowall-still-listlabel-episodic","videowall-still-listlabel"],["div","videowall-still-listlabel-episodic-heading",Y(0,"YTP_PLAYLIST_UP_NEXT")],["span","videowall-still-listlabel-episodic-icon"],["div","videowall-still-listlabel-episodic-info",["span","videowall-still-listlabel-episodic-index",["span","","{{episodic_index}}"]," / ",["span","","{{episodic_length}}"]],["span","","{{episodic_title}}"]]],["span",["videowall-still-listlabel-regular","videowall-still-listlabel"],["span","videowall-still-listlabel-icon"],
Y(0,"YTP_PLAYLIST"),["span","videowall-still-listlabel-length"," (",["span","","{{playlist_length}}"],")"]],["span",["videowall-still-listlabel-mix","videowall-still-listlabel"],["span","videowall-still-listlabel-mix-icon"],Y(0,"YTP_MIX"),["span","videowall-still-listlabel-length"," (50+)"]]]);this.Y=a;this.G=b;this.B={};this.C=this.o=this.A=null;this.j=0;this.g=this.k=null;this.listen("click",this.Zw);this.listen("keypress",this.$w)}z($H,IH);f=$H.prototype;
f.zi=function(a,b){$H.H.zi.call(this,a,b);this.B=a.session_data?Si(a.session_data,"&"):null;if(this.A=a.endscreen_autoplay_session_data?Si(a.endscreen_autoplay_session_data,"&"):null){if(!this.g){this.g=new Ey(["div","videowall-still-listlabel-autoplay",["div","videowall-still-listlabel-autoplay-label",["span","videowall-still-listlabel-autoplay-label-message",Y(0,"YTP_AUTOPLAY")]," ",["span","videowall-still-listlabel-autoplay-countdown","{{autoplay}}"]]]);S(this,this.g);this.g.X(this.element);var c=
new TD(this.F);S(this,c);c.listen("click",this.fp,this);this.Y.R().experiments.j?(c.X(this.template.g["videowall-still-info-content"]),UD(c,"videowall-still-info-cancel")):(c.X(this.g.g["videowall-still-listlabel-autoplay"],0),UD(c,"videowall-still-listlabel-autoplay-cancel"));c.ua(Y(0,"YTP_CANCEL"));c=new TD(this.F);S(this,c);c.listen("click",this.fp,this);c.X(this.template.g["videowall-still-info-bg"],0);UD(c,"videowall-still-info-close");this.Y.R().experiments.j?this.k=new XH(48,48):this.k=new XH(40,
35);S(this,this.k);N(this.k.L(),"autoplay-play-canvas");this.k.X(this.element)}Jy(this.g,"autoplay_title",a.title||a.playlist_title||"");Jy(this.g,"autoplay_author",a.author||a.playlist_author||"")}this.o=a.list;Jy(this.template,"linkurl",aI(this.Y.R(),this.videoId,this.o));var d=c=!1,e=!1;"1"==a.is_episodic?d=!0:this.o&&"RD"==Ev(this.o).type?e=!0:this.o&&(c=!0);O(this.element,"videowall-still-featured",!!a.featured);O(this.element,"videowall-still-list",c);O(this.element,"videowall-still-episodic",
d);O(this.element,"videowall-still-mix",e)};f.select=function(a){this.j&&(hf(this.j),this.j=0);var b=this.Y.app,c=this.videoId;a=a?this.A:this.B;var d=this.o||void 0;if(!c&&!d)throw Error("Playback source is invalid");c={video_id:c,list:d};if(b.g.Ya||"detailpage"!=b.g.ca){a=b.I;var e=a.j;e.o={};e.k={};a.k=!1;Zt(b.I.g);Rt();d?(b.S=!1,zw(b,c,void 0,void 0,void 0)):tw(b,c,1)}else d=new gv(c),d=b.g.getVideoUrl(d,{}),(a||{}).lact=bI(),s("yt.player.exports.navigate")(d,a,!0),b.gk(d,void 0)};
f.Fp=function(){var a=new Date-this.C,b=this.k,c=a/1E4;b.context.clearRect(0,0,b.width,b.height);b.context.beginPath();b.context.arc(b.B,b.o,b.C+2,0,ZH);b.context.fillStyle="rgba(0, 0, 0, 0.6)";b.context.fill();var d=Math.sqrt(3)/2*b.j;b.context.save();b.context.fillStyle="#fff";b.context.translate(b.B-b.j/3,b.o);b.context.beginPath();b.context.lineTo(0,d/2);b.context.lineTo(b.j/1.25,0);b.context.lineTo(0,-d/2);b.context.closePath();b.context.fill();b.context.restore();b.context.beginPath();b.context.arc(b.B,
b.o,b.C,YH,c*ZH+YH,!1);b.context.lineWidth=4;b.context.strokeStyle="#fff";b.context.stroke();b=Math.max(1E4-a,0);Jy(this.g,"autoplay",lf("YTP_AUTOPLAY_COUNTDOWN_2",{SECONDS_LEFT:Math.ceil(b/1E3)}));1E4<=a&&this.select(!0)};f.fp=function(a){a.preventDefault();this.j&&(this.G.log({cancelButtonClick:"1"}),this.publish("autonavchangerequest",!1))};function cI(a){a.j&&(hf(a.j),a.j=0);O(a.element,"videowall-still-autoplay",!1);a.publish("autonavchangerequest",!1)}
f.Zw=function(a){!1!==a.Vb.returnValue&&Ny(a)&&(this.select(!1),a.preventDefault())};f.$w=function(a){switch(a.keyCode){case 13:case 32:this.select(),a.preventDefault()}};f.K=function(){cI(this);$H.H.K.call(this)};function dI(a,b,c){FH.call(this,a,b,"videowall-endscreen");this.I=c;this.j=[];this.o=this.k=null;this.B=!1;this.G=new dr(pa(N,this.element,"ytp-animate-tiles"),0);S(this,this.G);this.C=new Ey(["div","ytp-endscreen-content"]);S(this,this.C);this.C.X(this.element);this.hide()}z(dI,FH);dI.B=96;dI.A=54;dI.j=1;dI.g=2;f=dI.prototype;
f.create=function(){dI.H.create.call(this);var a=this.g.getVideoData();a&&(this.k=a.V);this.uf();this.Ra.subscribe("onResize",this.uf,this);this.Ra.subscribe("videodatachange",this.J,this);this.Ra.subscribe("autonavchange",this.F,this)};f.destroy=function(){this.Ra.unsubscribe("onResize",this.uf,this);this.Ra.unsubscribe("videodatachange",this.J,this);ai(this.j);this.k=[];this.j=[];dI.H.destroy.call(this)};f.Ki=function(){return this.g.getVideoData().Mi};
function eI(a){a=a.g.R();return a.experiments.C&&"detailpage"==a.ca}function fI(a){return eI(a)&&a.g.R().experiments.j&&a.Ki()&&!a.o}
f.show=function(){dI.H.show.call(this);this.G.start();if(this.B||this.o&&this.o!=this.g.getVideoData().Ba)this.o=null,this.B=!1,this.uf();var a=!this.o&&!!this.j[0].A&&eI(this)&&this.Ki();eI(this)&&this.I.log({cancelButtonShow:a?"1":"0",state:this.Ki()?"enabled":"disabled"});a?(a=this.j[0],cI(a),O(a.element,"videowall-still-autoplay",!0),a.C=new Date,a.j=gf(x(a.Fp,a),50),a.Fp(),this.j[0].subscribe("autonavchangerequest",this.F,this)):this.o=this.g.getVideoData().Ba};
f.hide=function(){dI.H.hide.call(this);this.A&&(cI(this.j[0]),this.j[0].unsubscribe("autonavchangerequest",this.F,this))};
f.uf=function(){if(this.k&&this.k.length){var a=this.element,b;t:{if(Bg(this.g.Qa(),"ad-showing")&&(b=G("ad-container"))){b=mg(b).height+20;break t}b=0}vA(a,"marginBottom",b+"px");var c=mg(this.element),d=dI.B,e=dI.A,g=c.width/c.height,h=d/e;b=a=0;var k=Math.max(c.width/d,2),m=Math.max(c.height/e,2);fI(this)&&(k=m=Math.min(k,m));for(var p=this.k.length,r=Math.pow(dI.g,2),t=p*r,v=gI(this,0,m,k),I=gI(this,1,m,k),t=t+(Math.pow(v,2)-r),t=t+(Math.pow(I,2)-r);0<t&&(a<k||b<m);){var R=a/dI.g,ea=b/dI.g,ta=
a<=k-dI.g&&t>=ea*r,Ve=b<=m-dI.g&&t>=R*r;if(R/ea*h>g&&Ve)t-=R*r,b+=dI.g;else if(ta)t-=ea*r,a+=dI.g;else if(Ve)t-=R*r,b+=dI.g;else break}h=!1;k=dI.g+v;t>=3*r&&6>=p*r-t&&(b>=k||a>=k)&&I<=dI.g&&(h=!0);d*=a;e*=b;p=1;p=d/e<g?c.height/e:c.width/d;p=Math.min(p,dI.o);console.log(d,e);d*=p;e*=p;console.log(d,e);d*=Ib(c.width/d||1,1,dI.k);e*=Ib(c.height/e||1,1,dI.k);console.log(d,e);d=Math.floor(Math.min(c.width,d));e=Math.floor(Math.min(c.height,e));/*console.log(d,e);*/c=this.C.L();jg(c,d,e);vA(c,"marginLeft",
d/-2+"px");vA(c,"marginTop",e/-2+"px");g=d+dI.j;p=e+dI.j;e=0;r=!1;for(t=0;t<a;t++)for(k=0;k<b;k++)R=I>dI.g&&1<=e&&!r?e+1:e,m=0,h&&t>=a-dI.g&&k>=b-dI.g?m=1:0==k%dI.g&&0==t%dI.g&&(k<v&&t<v?0==k&&0==t&&(m=v):I>dI.g&&k>=b-I&&t>=a-I?k==b-I&&t==a-I&&(r=!0,R=1,m=I):m=dI.g),0!=m&&(d=this.j[e],d||(d=new $H(this.g,this.I),this.j[e]=d,ea=d.L(),c.appendChild(ea)),d.zi(this.k[R],2<m),R=Math.floor(p*k/b),ea=Math.floor(g*t/a),ta=Math.floor(p*(k+m)/b)-R-dI.j,Ve=Math.floor(g*(t+m)/a)-ea-dI.j,Yf(d.L(),ea,R),jg(d.L(),
Ve,ta),vA(d.L(),"transitionDelay",(k+t)/50+"s"),O(d.L(),"videowall-still-mini",1==m),O(d.L(),"videowall-still-takeover",0==e&&fI(this)),e++);for(a=this.j.length-1;a>=e;a--)d=this.j[a],ld(d.L()),Zh(d);this.j.length=e}};dI.o=1.42;dI.k=1.21;dI.prototype.J=function(){var a=this.g.getVideoData().V;this.k!=a&&(this.k=a,this.uf())};dI.prototype.F=function(a){this.B=a;!a&&this.j[0]&&Bg(this.j[0].element,"videowall-still-autoplay")&&(cI(this.j[0]),this.o=this.g.getVideoData().Ba,this.uf())};
function gI(a,b,c,d){var e=a.g.R().experiments,g=a.k.length;return 0==b&&fI(a)?dI.g*Math.floor(Math.min(c,d)/dI.g):0==b&&eI(a)&&!e.j&&c>=2*dI.g&&d>2*dI.g||0==b&&c>=3*dI.g&&d>=3*dI.g&&1<=g&&1==a.k[0].episodic?2*dI.g:dI.g};function hI(a){Kx.call(this,a);kf({});this.va="endscreen";this.nc="end";this.j=null;var b=a.R();iI(a)?this.j=new dI(this.g,this.N,this):b.wg?(a=b.experiments.P,b=new LH(this.g,this.N,a),a&&P(b.j.L(),"click",x(this.RB,this)),this.j=b):this.j=new FH(this.g,this.N);this.j.X(this.g.Qa())}z(hI,Kx);function jI(a){return kI(a.R())&&1==ow(a.app).getPlayerType()}function iI(a){a=a.R();return a.yc&&!a.wg}f=hI.prototype;f.Ha=function(a){return jI(a)};
f.create=function(){hI.H.create.call(this);lI(this);this.g.getVideoData().subscribe("dataupdated",this.Kr,this)};f.destroy=function(){this.g.getVideoData().unsubscribe("dataupdated",this.Kr,this);Lx(this);this.j.A&&this.j.destroy();hI.H.destroy.call(this)};f.load=function(){hI.H.load.call(this);this.j.show();if(this.g.R().wg&&.01>Math.random()){var a=this.g.R().experiments.P;this.log({trailerEndscreenShow:1,watchNext:a?1:0})}};f.unload=function(){hI.H.unload.call(this);this.j.hide()};
f.Gc=function(a){hI.H.Gc.call(this,a);var b=this.g.getVideoData(),c=!iI(this.g)||!(!b.V||!b.V.length);this.g.R();var b=Av(b,"ypc_module"),d=mI(this.g.app);!c||b||d||(this.j.A||this.j.create(),"load"==a.getId()&&this.load())};f.ad=function(a){"load"==a.getId()&&this.loaded&&this.unload();hI.H.ad.call(this,a)};f.Kr=function(){Lx(this);lI(this)};f.RB=function(a){var b=this.j.j.videoId,b=aI(this.g.R(),b,null);Px(this,b,a.ctrlKey)};
function lI(a){var b=Math.max(1E3*(a.g.getVideoData().lengthSeconds-10),0),b=new Ax(b,2147483647,{id:"preload"}),c=new Ax(2147483647,2147483647,{id:"load",priority:6});a.ye(b,c)}function nI(a){return jI(a)?new hI(a):null};function oI(){X.call(this,["div","ytp-playlist-tray-index-length",["span","ytp-playlist-tray-index","{{index}}"]," / ",["span","ytp-playlist-tray-length","{{length}}"]])}z(oI,X);oI.prototype.Zi=function(a){Jy(this.template,"index",a+1)};function pI(a){lF.call(this,a,"ytp-button-expand",Y(0,"YTP_ST_EXPAND"),"ytp-button-collapse",Y(0,"YTP_ST_COLLAPSE"));VD(this,3050);this.element.setAttribute("aria-haspopup",!0);this.ua([["div","ytp-button-playlist-icon"],["div","ytp-button-playlist-text",Y(0,"YTP_PLAYLIST")]])}z(pI,lF);function qI(a){X.call(this,["div","ytp-playlist-tray-controller"]);this.g=new pI(a);this.g.X(this.template.L());S(this,this.g);this.j=new oI;this.j.X(this.template.L());S(this,this.j)}z(qI,X);function rI(a,b){var c=zv(a,"default.jpg");X.call(this,["div","ytp-playlist-tray-item",{tabIndex:3910,"aria-label":a.title,role:"menuitemradio"},["span","ytp-playlist-tray-item-index",b+1],["span","ytp-playlist-tray-item-now-playing","\u25b6"],["img","ytp-playlist-tray-item-thumbnail",{src:c}],["span","ytp-playlist-tray-item-title",a.title],["span","ytp-playlist-tray-item-author",a.author]]);this.g=b;this.listen("keypress",this.j)}z(rI,X);
rI.prototype.Zi=function(a){a=this.g==a;O(this.element,"ytp-playlist-tray-item-current",a);this.element.setAttribute("aria-checked",a)};rI.prototype.j=function(a){if(13==a.keyCode||32==a.keyCode)a.preventDefault(),this.Qb("click")};function sI(){EH.call(this,["div","ytp-playlist-tray-tray",{role:"menu"}]);this.g=null;this.j=[]}z(sI,EH);function tI(a,b){a.g&&a.g.unsubscribe("shuffle",a.k,a);a.g=b;a.g.subscribe("shuffle",a.k,a);a.k()}sI.prototype.k=function(){ai(this.j);this.j=[];jd(this.element);for(var a=0;a<=this.g.uc-1;++a){var b=Rv(this.g,a);b&&(b=new rI(b,a),b.Zi(this.g.Na),this.j.push(b),b.listen("click",x(this.o,this,a)),b.X(this.element))}};sI.prototype.o=function(a){this.publish("playvideoat",a)};
sI.prototype.K=function(){ai(this.j);this.j=[];jd(this.element);sI.H.K.call(this)};function uI(a){Kx.call(this,a);var b=a.Qa();this.D=a.app.j.j;this.B=!1;this.k=this.o=null;this.C=G("ytp-button-playlist",b);P(this.C,"click",x(this.dp,this));this.j=this.A=null}z(uI,Kx);f=uI.prototype;f.va="playlist";
f.create=function(){uI.H.create.call(this);vI(this,this.g.Vc());this.A=new Ey(["div",["ytp-playlist-tray-container","ytp-player-content"]]);this.A.X(this.g.Qa());this.k=new sI;this.k.subscribe("playvideoat",this.Rp,this);this.k.X(this.A.L(),0);this.j=new qI(this.D);this.j.X(G("html5-title",void 0),0);this.j.g.listen("click",this.dp,this);this.subscribe("fullscreentoggled",this.mq,this);this.subscribe("videodatachange",this.oq,this);this.subscribe("clearvideooverlays",this.nq,this);this.Ci()};
f.Ci=function(){var a=this.g.gr(),b=this.j.j;null!=a?b.show():b.hide();this.j.j.Zi(a);a=this.j.j;b=this.g.Vc();Jy(a.template,"length",b.uc)};f.destroy=function(){uI.H.destroy.call(this);vI(this,null);this.unsubscribe("fullscreentoggled",this.mq,this);this.unsubscribe("videodatachange",this.oq,this);this.unsubscribe("clearvideooverlays",this.nq,this);ld(this.A.L());this.k.dispose();this.k=null;this.A.dispose();this.A=null;ld(this.j.L());this.j.dispose();this.j=null};
f.load=function(){this.publish("command_clear_video_overlays",!0);uI.H.load.call(this);this.B||(tI(this.k,this.o),this.B=!0);for(var a=this.k,b=0;b<a.j.length;b++)a.j[b].Zi(a.g.Na);mF(this.j.g)};f.unload=function(){uI.H.unload.call(this);this.B=!1;nF(this.j.g)};f.nq=function(){this.loaded&&this.unload()};f.Rp=function(a){this.g.Cm(a);this.publish("command_clear_video_overlays",!1)};f.dp=function(){this.loaded?this.publish("command_clear_video_overlays",!1):this.load()};
f.mq=function(a){var b=this.g.R().ca;this.loaded&&!a&&"detailpage"==b&&this.publish("command_clear_video_overlays",!1)};f.oq=function(){vI(this,this.g.Vc());this.B&&tI(this.k,this.o);this.Ci()};function vI(a,b){a.o&&a.o.unsubscribe("shuffle",a.Ci,a);a.o=b;a.o&&a.o.subscribe("shuffle",a.Ci,a)}uI.Ha=function(a){return!!a.Vc()};uI.prototype.Ha=function(a){return uI.Ha(a)};uI.prototype.Fm=function(a){return!uI.Ha(a)};uI.g=function(a){return uI.Ha(a)?new uI(a):null};
uI.prototype.K=function(){this.k.unsubscribe("playvideoat",this.Rp,this);gh(this.C);uI.H.K.call(this)};function wI(a,b){Q.call(this);this.g=a;this.j=!!b}z(wI,Q);
function xI(a,b,c){if(c)if(a.j)yI(b,c);else{var d;a.g&&(d=zI(a.g));d&&b.length?(d=[d,"/cache/videos?q=",b.join("&q=")].join(""),fj(d,{format:"JSON",method:"GET",context:a,timeout:2E3,Ma:function(a,d){var h=0;d&&d.ids&&(h=d.ids.length);AI("search","success",{"num-requested":b.length,"num-cached":h});c(d)},onError:function(){AI("search","error",{"num-requested":b.length});c({})},Ud:function(){AI("search","timeout",{"num-requested":b.length});BI("__notfound__");c({})}})):c({})}}
function CI(a,b,c){if(c)if(a.j)c({id:b,fmt_list:[{itag:18,lmt:14200992E5}]});else{var d;a.g&&(d=zI(a.g));d&&b?(d=[d,"cache/videos",b,"metadata"].join("/"),fj(d,{format:"JSON",method:"GET",context:a,timeout:600,Ma:function(a,d){c(d);AI("meta","success",{v:b})},onError:function(){AI("meta","error",{v:b});c({})},Ud:function(){AI("meta","timeout",{v:b});BI("__notfound__");c({})}})):c({})}}function AI(a,b,c){a={a:"spacecast",module:"cache",request:a,status:b};jc(a,c);eB(ge(a))}
function yI(a,b){a.length?b({ids:a}):b({})}wI.prototype.K=function(){this.g=null;wI.H.K.call(this)};function DI(a){Q.call(this);(this.g=a)&&BI("http://"+a)}z(DI,Q);function zI(a){var b;(b=(b=Gi("yt-spacecast-uri"))&&b.hasOwnProperty("uri")?b.uri:null)?"__notfound__"==b&&(b=null):b=a.g?"http://"+a.g:null;return b}function BI(a){var b=Gi("yt-spacecast-uri");b||(b={});a?b.uri=a:delete b.uri;Ei("yt-spacecast-uri",b)};var EI=s("yt.prefs.UserPrefs.prefs_")||{};q("yt.prefs.UserPrefs.prefs_",EI,void 0);var FI={},GI="ontouchstart"in document;function HI(a,b,c){var d;switch(a){case "mouseover":case "mouseout":d=3;break;case "mouseenter":case "mouseleave":d=9}return Ed(c,function(a){return Bg(a,b)},!0,d)}
function II(a){var b="mouseover"==a.type&&"mouseenter"in FI||"mouseout"==a.type&&"mouseleave"in FI,c=a.type in FI||b;if("HTML"!=a.target.tagName&&c){if(b){var b="mouseover"==a.type?"mouseenter":"mouseleave",c=FI[b],d;for(d in c.ic){var e=HI(b,d,a.target);e&&!Ed(a.relatedTarget,function(a){return a==e},!0)&&c.publish(d,e,b,a)}}if(b=FI[a.type])for(d in b.ic)(e=HI(a.type,d,a.target))&&b.publish(d,e,a.type,a)}}P(document,"blur",II,!0);P(document,"change",II,!0);P(document,"click",II);
P(document,"focus",II,!0);P(document,"mouseover",II);P(document,"mouseout",II);P(document,"mousedown",II);P(document,"keydown",II);P(document,"keyup",II);P(document,"keypress",II);P(document,"cut",II);P(document,"paste",II);GI&&(P(document,"touchstart",II),P(document,"touchend",II),P(document,"touchcancel",II));function JI(){this.o={};this.A=[]}f=JI.prototype;f.Nc=function(a){return Fd(a,Z(this))};function Z(a,b){return"yt-uix"+(a.Ed?"-"+a.Ed:"")+(b?"-"+b:"")}f.init=u;f.dispose=u;function KI(a,b,c){b=hi(b,c,a);a.A.push(b)}function LI(a,b,c,d){d=Z(a,d);var e=x(c,a);b in FI||(FI[b]=new bi);FI[b].subscribe(d,e);a.o[c]=e}f.Yf=function(a,b,c){var d=this.da(a,b);if(d&&(d=s(d))){var e=wb(arguments,2);vb(e,0,0,a);d.apply(null,e)}};f.da=function(a,b){return Ig(a,b)};function MI(a,b){Gg(a,"tooltip-text",b)}
f.removeData=function(a,b){Jg(a,b)};function NI(a,b,c,d,e,g,h){var k,m;if(k=c.offsetParent){var p="HTML"==k.tagName||"BODY"==k.tagName;p&&"static"==Xf(k,"position")||(m=dg(k),p||(p=(p=eg(k))&&xc?-k.scrollLeft:!p||wc&&Ic("8")||"visible"==Xf(k,"overflowX")?k.scrollLeft:k.scrollWidth-k.clientWidth-k.scrollLeft,m=Mb(m,new Kb(p,k.scrollTop))))}k=m||new Kb;m=og(a);if(p=cg(a)){var r=Mf(p),p=Math.max(m.left,r.left),t=Math.min(m.left+m.width,r.left+r.width);if(p<=t){var v=Math.max(m.top,r.top),r=Math.min(m.top+m.height,r.top+r.height);v<=r&&
(m.left=p,m.top=v,m.width=t-p,m.height=r-v)}}p=Qc(a);v=Qc(c);p.g!=v.g&&(t=p.g.body,v=fg(t,Hd(v)),v=Mb(v,dg(t)),!wc||Jc(9)||Gd(p)||(v=Mb(v,Id(p))),m.left+=v.x,m.top+=v.y);a=OI(a,b);b=new Kb(a&2?m.left+m.width:m.left,a&1?m.top+m.height:m.top);b=Mb(b,k);e&&(b.x+=(a&2?-1:1)*e.x,b.y+=(a&1?-1:1)*e.y);var I;h&&(I=cg(c))&&(I.top-=k.y,I.right-=k.x,I.bottom-=k.y,I.left-=k.x);return PI(b,c,d,g,I,h,void 0)}
function PI(a,b,c,d,e,g,h){a=a.clone();var k=OI(b,c);c=mg(b);h=h?h.clone():c.clone();a=a.clone();h=h.clone();var m=0;if(d||0!=k)k&2?a.x-=h.width+(d?d.right:0):d&&(a.x+=d.left),k&1?a.y-=h.height+(d?d.bottom:0):d&&(a.y+=d.top);g&&(e?(d=a,k=h,m=0,65==(g&65)&&(d.x<e.left||d.x>=e.right)&&(g&=-2),132==(g&132)&&(d.y<e.top||d.y>=e.bottom)&&(g&=-5),d.x<e.left&&g&1&&(d.x=e.left,m|=1),d.x<e.left&&d.x+k.width>e.right&&g&16&&(k.width=Math.max(k.width-(d.x+k.width-e.right),0),m|=4),d.x+k.width>e.right&&g&1&&(d.x=
Math.max(e.right-k.width,e.left),m|=1),g&2&&(m=m|(d.x<e.left?16:0)|(d.x+k.width>e.right?32:0)),d.y<e.top&&g&4&&(d.y=e.top,m|=2),d.y<=e.top&&d.y+k.height<e.bottom&&g&32&&(k.height=Math.max(k.height-(e.top-d.y),0),d.y=e.top,m|=8),d.y>=e.top&&d.y+k.height>e.bottom&&g&32&&(k.height=Math.max(k.height-(d.y+k.height-e.bottom),0),m|=8),d.y+k.height>e.bottom&&g&4&&(d.y=Math.max(e.bottom-k.height,e.top),m|=2),g&8&&(m=m|(d.y<e.top?64:0)|(d.y+k.height>e.bottom?128:0)),e=m):e=256,m=e);g=new Lf(0,0,0,0);g.left=
a.x;g.top=a.y;g.width=h.width;g.height=h.height;e=m;if(e&496)return e;Yf(b,new Kb(g.left,g.top));h=Of(g);Nb(c,h)||(c=h,h=Sc(b),g=Gd(Qc(h)),!wc||Ic("10")||g&&Ic("8")?(b=b.style,xc?b.MozBoxSizing="border-box":yc?b.WebkitBoxSizing="border-box":b.boxSizing="border-box",b.width=Math.max(c.width,0)+"px",b.height=Math.max(c.height,0)+"px"):(h=b.style,g?(wc?(g=sg(b,"paddingLeft"),a=sg(b,"paddingRight"),d=sg(b,"paddingTop"),k=sg(b,"paddingBottom"),g=new Kf(d,a,k,g)):(g=Wf(b,"paddingLeft"),a=Wf(b,"paddingRight"),
d=Wf(b,"paddingTop"),k=Wf(b,"paddingBottom"),g=new Kf(parseFloat(d),parseFloat(a),parseFloat(k),parseFloat(g))),b=vg(b),h.pixelWidth=c.width-b.left-g.left-g.right-b.right,h.pixelHeight=c.height-b.top-g.top-g.bottom-b.bottom):(h.pixelWidth=c.width,h.pixelHeight=c.height)));return e}function OI(a,b){return(b&4&&eg(a)?b^2:b)&-5};function QI(){JI.call(this)}z(QI,JI);f=QI.prototype;f.Nc=function(a){var b=JI.prototype.Nc.call(this,a);return b?b:a};f.register=function(){KI(this,"yt-uix-kbd-nav-move-out-done",this.hide)};f.da=function(a,b){var c=QI.H.da.call(this,a,b);return c?c:(c=QI.H.da.call(this,a,"card-config"))&&(c=s(c))&&c[b]?c[b]:null};
f.show=function(a){var b=this.Nc(a);if(b){N(b,Z(this,"active"));var c=RI(this,a,b);if(c){c.cardTargetNode=a;c.cardRootNode=b;SI(this,a,c);var d=Z(this,"card-visible"),e=this.da(a,"card-delegate-show")&&this.da(b,"card-action");this.Yf(b,"card-action",a);this.j=a;tA(c);L(x(function(){e||(sA(c),ki("yt-uix-card-show",b,a,c));TI(c);N(c,d);ki("yt-uix-kbd-nav-move-in-to",c)},this),10)}}};
function RI(a,b,c){var d=c||b,e=Z(a,"card");c=a.Jc(d);var g=Tc(Z(a,"card")+Mg(d));if(g)return a=G(Z(a,"card-body"),g),rd(a,c)||(ld(c),a.appendChild(c)),g;g=document.createElement("div");g.id=Z(a,"card")+Mg(d);g.className=e;(d=a.da(d,"card-class"))&&Cg(g,d.split(/\s+/));d=document.createElement("div");d.className=Z(a,"card-border");b=a.da(b,"orientation")||"horizontal";e=document.createElement("div");e.className="yt-uix-card-border-arrow yt-uix-card-border-arrow-"+b;var h=document.createElement("div");
h.className=Z(a,"card-body");a=document.createElement("div");a.className="yt-uix-card-body-arrow yt-uix-card-body-arrow-"+b;ld(c);h.appendChild(c);d.appendChild(a);d.appendChild(h);g.appendChild(e);g.appendChild(d);document.body.appendChild(g);return g}
function SI(a,b,c){var d=a.da(b,"orientation")||"horizontal",e=a.da(b,"position"),g=!!a.da(b,"force-position"),h=a.da(b,"position-fixed"),d="horizontal"==d,k="bottomright"==e||"bottomleft"==e,m="topright"==e||"bottomright"==e,p,r;m&&k?(r=7,p=4):m&&!k?(r=6,p=5):!m&&k?(r=5,p=6):(r=4,p=7);var t=eg(document.body),e=eg(b);t!=e&&(r^=2);var v;d?(e=b.offsetHeight/2-12,v=new Kb(-12,b.offsetHeight+6)):(e=b.offsetWidth/2-6,v=new Kb(b.offsetWidth+6,-12));var I=mg(c),e=Math.min(e,(d?I.height:I.width)-24-6);6>
e&&(e=6,d?v.y+=12-b.offsetHeight/2:v.x+=12-b.offsetWidth/2);var R=null;g||(R=10);I=Z(a,"card-flip");a=Z(a,"card-reverse");O(c,I,m);O(c,a,k);R=NI(b,r,c,p,v,null,R);!g&&R&&(R&48&&(m=!m,r^=2,p^=2),R&192&&(k=!k,r^=1,p^=1),O(c,I,m),O(c,a,k),NI(b,r,c,p,v));h&&(b=parseInt(c.style.top,10),g=$c(document).y,vA(c,"position","fixed"),vA(c,"top",b-g+"px"));t&&(c.style.right="",b=og(c),b.left=b.left||parseInt(c.style.left,10),g=Yc(window),c.style.left="",c.style.right=g.width-b.left-b.width+"px");b=G("yt-uix-card-body-arrow",
c);g=G("yt-uix-card-border-arrow",c);d=d?k?"top":"bottom":!t&&m||t&&!m?"left":"right";b.setAttribute("style","");g.setAttribute("style","");b.style[d]=e+"px";g.style[d]=e+"px";k=G("yt-uix-card-arrow",c);m=G("yt-uix-card-arrow-background",c);k&&m&&(c="right"==d?mg(c).width-e-13:e+11,e=c/Math.sqrt(2),k.style.left=c+"px",k.style.marginLeft="1px",m.style.marginLeft=-e+"px",m.style.marginTop=e+"px")}
f.hide=function(a){if(a=this.Nc(a)){var b=Tc(Z(this,"card")+Mg(a));b&&(Dg(a,Z(this,"active")),Dg(b,Z(this,"card-visible")),tA(b),this.j=null,b.cardTargetNode=null,b.cardRootNode=null,b.cardMask&&(ld(b.cardMask),b.cardMask=null))}};function UI(a){a.j&&a.hide(a.j)}f.oD=function(a,b){var c=this.Nc(a);if(c){if(b){var d=this.Jc(c);if(!d)return;d.innerHTML=b}Bg(c,Z(this,"active"))&&(c=RI(this,a,c),SI(this,a,c),sA(c),TI(c))}};f.isActive=function(a){return(a=this.Nc(a))?Bg(a,Z(this,"active")):!1};
f.Jc=function(a){var b=a.cardContentNode;if(!b){var c=Z(this,"content"),d=Z(this,"card-content");(b=(b=this.da(a,"card-id"))?Tc(b):G(c,a))||(b=document.createElement("div"));var e=b;Dg(e,c);N(e,d);a.cardContentNode=b}return b};
function TI(a){var b=a.cardMask;b||(b=document.createElement("iframe"),b.src='javascript:""',Cg(b,["yt-uix-card-iframe-mask"]),a.cardMask=b);b.style.position=a.style.position;b.style.top=a.style.top;b.style.left=a.offsetLeft+"px";b.style.height=a.clientHeight+"px";b.style.width=a.clientWidth+"px";document.body.appendChild(b)};function VI(){JI.call(this);this.g={};this.k={}}z(VI,QI);ba(VI);f=VI.prototype;f.Ed="clickcard";f.register=function(){VI.H.register.call(this);LI(this,"click",this.sF,"target");LI(this,"click",this.rF,"close")};f.sF=function(a,b,c){b=Dd(c.target,"button");b&&b.disabled||(a=(b=this.da(a,"card-target"))?Tc(b):a,b=this.Nc(a),this.da(b,"disabled")||(Bg(b,Z(this,"active"))?(this.hide(a),Dg(b,Z(this,"active"))):(this.show(a),N(b,Z(this,"active")))))};
f.show=function(a){VI.H.show.call(this,a);var b=this.Nc(a);if(!Ig(b,"click-outside-persists")){var c=ka(a);if(this.g[c])return;var b=P(document,"click",x(this.Ds,this,a)),d=P(window,"blur",x(this.Ds,this,a));this.g[c]=[b,d]}a=P(window,"resize",x(this.oD,this,a,void 0));this.k[c]=a};f.hide=function(a){VI.H.hide.call(this,a);a=ka(a);var b=this.g[a];b&&(ch(b),this.g[a]=null);if(b=this.k[a])ch(b),this.k[a]=null};f.Ds=function(a,b){Fd(b.target,"yt-uix"+(this.Ed?"-"+this.Ed:"")+"-card")||this.hide(a)};
f.rF=function(a){(a=Fd(a,Z(this,"card")))&&this.hide(a.cardTargetNode)};function WI(){JI.call(this)}z(WI,QI);ba(WI);f=WI.prototype;f.Ed="hovercard";f.register=function(){LI(this,"mouseenter",this.$F,"target");LI(this,"mouseleave",this.bG,"target");LI(this,"mouseenter",this.aG,"card");LI(this,"mouseleave",this.cG,"card")};
f.$F=function(a){if(XI!=a){XI&&(this.hide(XI),XI=null);var b=x(this.show,this,a),c=parseInt(this.da(a,"delay-show"),10),b=L(b,-1<c?c:200);Gg(a,"card-timer",b.toString());XI=a;a.alt&&(Gg(a,"card-alt",a.alt),a.alt="");a.title&&(Gg(a,"card-title",a.title),a.title="")}};
f.bG=function(a){var b=parseInt(this.da(a,"card-timer"),10);M(b);this.Nc(a).isCardHidable=!0;b=parseInt(this.da(a,"delay-hide"),10);b=-1<b?b:200;L(x(this.vF,this,a),b);if(b=this.da(a,"card-alt"))a.alt=b;if(b=this.da(a,"card-title"))a.title=b};f.vF=function(a){this.Nc(a).isCardHidable&&(this.hide(a),XI=null)};f.aG=function(a){a&&(a.cardRootNode.isCardHidable=!1)};f.cG=function(a){a&&this.hide(a.cardTargetNode)};var XI=null;function YI(a,b,c,d){this.Dc=a;this.A=!1;this.j=new bi;this.B=eh(this.Dc,"click",x(this.bB,this),"yt-dialog-dismiss");ZI(this);this.C=b;this.F=c;this.D=d;this.k=this.o=null}var $I={LOADING:"loading",vG:"content",JK:"working"};function aJ(a,b){a.$()||a.j.subscribe("post-all",b)}function ZI(a){a=G("yt-dialog-fg-content",a.Dc);var b=[];Ob($I,function(a){b.push("yt-dialog-show-"+a)});Eg(a,b);N(a,"yt-dialog-show-content")}f=YI.prototype;
f.show=function(){if(!this.$()){document.activeElement&&document.activeElement!=document.body&&document.activeElement.blur&&document.activeElement.blur();if(!this.D){this.g||(this.g=Tc("yt-dialog-bg"),this.g||(this.g=fd("div"),this.g.id="yt-dialog-bg",this.g.className="yt-dialog-bg",document.body.appendChild(this.g)));var a;t:{var b=window,c=b.document;a=0;if(c){a=c.body;var d=c.documentElement;if(!d||!a){a=0;break t}b=Yc(b).height;if(Zc(c)&&d.scrollHeight)a=d.scrollHeight!=b?d.scrollHeight:d.offsetHeight;
else{var c=d.scrollHeight,e=d.offsetHeight;d.clientHeight!=e&&(c=a.scrollHeight,e=a.offsetHeight);a=c>b?c>e?c:e:c<e?c:e}}}this.g.style.height=a+"px";sA(this.g)}Sg(this.Dc);a=bJ(this);cJ(a);this.C||(this.o=P(document,"keydown",x(this.eA,this)));a=this.Dc;d=hi("player-added",this.dA,this);Gg(a,"player-ready-pubsub-key",d);this.F&&(this.k=P(document,"click",x(this.fA,this)));sA(this.Dc);N(document.body,"yt-dialog-active");UI(VI.getInstance());UI(WI.getInstance())}};
function dJ(){var a=Uc("yt-dialog");return gb(a,function(a){return rA(a)})}f.dA=function(){Sg(this.Dc)};function bJ(a){var b=Vc("iframe",null,a.Dc);C(b,function(a){var b=Ig(a,"onload");b&&(b=s(b))&&P(a,"load",b);if(b=Ig(a,"src"))a.src=b},a);return tb(b)}function cJ(a){C(document.getElementsByTagName("iframe"),function(b){-1==cb(a,b)&&N(b,"iframe-hid")})}function eJ(){var a=Uc("iframe-hid");C(a,function(a){Dg(a,"iframe-hid")})}
f.bB=function(a){a=a.currentTarget;a.disabled||(a=Ig(a,"action")||"",fJ(this,a))};
function fJ(a,b){if(!a.$()){a.j.publish("pre-all");a.j.publish("pre-"+b);tA(a.Dc);UI(VI.getInstance());UI(WI.getInstance());dJ()||(tA(a.g),Dg(document.body,"yt-dialog-active"),Tg(),eJ());a.o&&(ch(a.o),a.o=null);a.k&&(ch(a.k),a.k=null);var c=a.Dc;if(c){var d=Ig(c,"player-ready-pubsub-key");d&&(ji(d),Jg(c,"player-ready-pubsub-key"))}a.j.publish("post-all");ki("yt-ui-dialog-hide-complete",a);"cancel"==b&&ki("yt-ui-dialog-cancelled",a);a.j&&a.j.publish("post-"+b)}}
f.eA=function(a){L(x(function(){27==a.keyCode&&fJ(this,"cancel")},this),0)};f.fA=function(a){"yt-dialog-base"==a.target.className&&fJ(this,"cancel")};f.$=function(){return this.A};f.dispose=function(){rA(this.Dc)&&fJ(this,"dispose");ch(this.B);this.j.dispose();this.j=null;this.A=!0};q("yt.ui.Dialog",YI,void 0);function gJ(){JI.call(this);this.g=[];this.j={}}z(gJ,JI);ba(gJ);f=gJ.prototype;f.Ed="button";f.$f=null;f.register=function(){LI(this,"click",this.dG);LI(this,"keydown",this.YF);LI(this,"keypress",this.ZF);KI(this,"page-scroll",this.XF)};f.dG=function(a){a&&!a.disabled&&(hJ(this,a),this.click(a))};
f.YF=function(a,b,c){if(!(c.altKey||c.ctrlKey||c.shiftKey)&&(b=iJ(this,a))){var d=function(a){var b="";a.tagName&&(b=a.tagName.toLowerCase());return"ul"==b||"table"==b},e;d(b)?e=b:e=ud(b,d);if(e){e=e.tagName.toLowerCase();var g;"ul"==e?g=this.oG:"table"==e&&(g=this.nG);g&&jJ(this,a,b,c,x(g,this))}}};f.XF=function(){var a=this.j;if(0!=Tb(a))for(var b in a){var c=a[b],d=Fd(c.activeButtonNode||c.parentNode,Z(this));if(void 0==d||void 0==c)break;kJ(this,d,c,!0)}};
function jJ(a,b,c,d,e){var g=rA(c),h=9==d.keyCode;h||32==d.keyCode||13==d.keyCode?(d=lJ(a,c))?(b=od(d),"a"==b.tagName.toLowerCase()?window.location=b.href:hh(b,"click")):h&&mJ(a,b):g?27==d.keyCode?(lJ(a,c),mJ(a,b)):e(b,c,d):(a=Bg(b,Z(a,"reverse"))?38:40,d.keyCode==a&&(hh(b,"click"),d.preventDefault()))}f.ZF=function(a,b,c){c.altKey||c.ctrlKey||c.shiftKey||(a=iJ(this,a),rA(a)&&c.preventDefault())};function lJ(a,b){var c=Z(a,"menu-item-highlight"),d=G(c,b);d&&Dg(d,c);return d}
function nJ(a,b,c){N(c,Z(a,"menu-item-highlight"));var d=c.getAttribute("id");d||(d=Z(a,"item-id-"+ka(c)),c.setAttribute("id",d));b.setAttribute("aria-activedescendant",d)}f.nG=function(a,b,c){var d=lJ(this,b);b=Pg("table",b);var e=Pg("tr",b),e=Vc("td",null,e).length;b=Vc("td",null,b);d=oJ(d,b,e,c);-1!=d&&(nJ(this,a,b[d]),c.preventDefault())};f.oG=function(a,b,c){if(40==c.keyCode||38==c.keyCode){var d=lJ(this,b);b=eb(Vc("li",null,b),rA);d=oJ(d,b,1,c);nJ(this,a,b[d]);c.preventDefault()}};
function oJ(a,b,c,d){var e=b.length;a=cb(b,a);if(-1==a)if(38==d.keyCode)a=e-c;else{if(37==d.keyCode||38==d.keyCode||40==d.keyCode)a=0}else 39==d.keyCode?(a%c==c-1&&(a-=c),a+=1):37==d.keyCode?(0==a%c&&(a+=c),--a):38==d.keyCode?(a<c&&(a+=e),a-=c):40==d.keyCode&&(a>=e-c&&(a-=e),a+=c);return a}function pJ(a,b){var c=b.iframeMask;c||(c=document.createElement("iframe"),c.src='javascript:""',c.className=Z(a,"menu-mask"),b.iframeMask=c);return c}
function kJ(a,b,c,d){var e=Fd(b,Z(a,"group")),g=!!a.da(b,"button-menu-ignore-group"),e=e&&!g?e:b,g=5,h=4,k=og(b);if(Bg(b,Z(a,"reverse"))){g=4;h=5;k=k.top+"px";try{c.style.maxHeight=k}catch(m){}}Bg(b,"flip")&&(Bg(b,Z(a,"reverse"))?(g=6,h=7):(g=7,h=6));var p;a.da(b,"button-has-sibling-menu")?p=bg(e):a.da(b,"button-menu-root-container")&&(p=qJ(a,b));wc&&!Ic("8")&&(p=null);var r;p&&(r=og(p),r=new Kf(-r.top,r.left,r.top,-r.left));p=new Kb(0,1);Bg(b,Z(a,"center-menu"))&&(p.x-=Math.round((mg(c).width-mg(b).width)/
2));d&&(p.y+=$c(document).y);if(a=pJ(a,b))b=mg(c),a.style.width=b.width+"px",a.style.height=b.height+"px",NI(e,g,a,h,p,r,197),d&&vA(a,"position","fixed");NI(e,g,c,h,p,r,197)}function qJ(a,b){if(a.da(b,"button-menu-root-container")){var c=a.da(b,"button-menu-root-container");return Fd(b,c)}return document.body}
f.pu=function(a){if(a){var b=iJ(this,a);if(b){a.setAttribute("aria-pressed","true");a.setAttribute("aria-expanded","true");b.originalParentNode=b.parentNode;b.activeButtonNode=a;b.parentNode.removeChild(b);var c;this.da(a,"button-has-sibling-menu")?c=a.parentNode:c=qJ(this,a);c.appendChild(b);b.style.minWidth=a.offsetWidth-2+"px";var d=pJ(this,a);d&&c.appendChild(d);(c=!!this.da(a,"button-menu-fixed"))&&(this.j[Mg(a).toString()]=b);kJ(this,a,b,c);li("yt-uix-button-menu-before-show",a,b);sA(b);this.Yf(a,
"button-menu-action",!0);N(a,Z(this,"active"));b=x(this.ls,this,a,!1);c=x(this.ls,this,a,!0);d=x(this.jC,this,a,void 0);this.$f&&iJ(this,this.$f)==iJ(this,a)||rJ(this);ki("yt-uix-button-menu-show",a);ch(this.g);this.g=[P(document,"click",c),P(document,"contextmenu",b),P(window,"resize",d)];this.$f=a}}};
function mJ(a,b){if(b){var c=iJ(a,b);if(c){a.$f=null;b.setAttribute("aria-pressed","false");b.setAttribute("aria-expanded","false");b.removeAttribute("aria-activedescendant");tA(c);a.Yf(b,"button-menu-action",!1);var d=pJ(a,b),e=Mg(c).toString();delete a.j[e];L(function(){d&&d.parentNode&&d.parentNode.removeChild(d);c.originalParentNode&&(c.parentNode.removeChild(c),c.originalParentNode.appendChild(c),c.originalParentNode=null,c.activeButtonNode=null)},1)}var e=Fd(b,Z(a,"group")),g=[Z(a,"active")];
e&&g.push(Z(a,"group-active"));Eg(b,g);ki("yt-uix-button-menu-hide",b);ch(a.g);a.g.length=0}}f.jC=function(a,b){var c=iJ(this,a);if(c){b&&(c.innerHTML=b);var d=!!this.da(a,"button-menu-fixed");kJ(this,a,c,d)}};f.getContent=function(a){return G(Z(this,"content"),a)};
f.ls=function(a,b,c){c=c||window.event;c=c.target||c.srcElement;3==c.nodeType&&(c=c.parentNode);var d=Fd(c,Z(this));if(d){var d=iJ(this,d),e=iJ(this,a);if(d==e)return}var d=Fd(c,Z(this,"menu")),e=d==iJ(this,a),g=Bg(c,Z(this,"menu-item")),h=Bg(c,Z(this,"menu-close"));if(!d||e&&(g||h))if(mJ(this,a),d&&b&&this.da(a,"button-menu-indicate-selected")){if(a=G(Z(this,"content"),a))Oc&&"innerText"in c?b=c.innerText.replace(/(\r\n|\r|\n)/g,"\n"):(b=[],Cd(c,b,!0),b=b.join("")),b=b.replace(/ \xAD /g," ").replace(/\xAD/g,
""),b=b.replace(/\u200B/g,""),Oc||(b=b.replace(/ +/g," "))," "!=b&&(b=b.replace(/^\s*/,"")),td(a,b);sJ(this,d,c)}};function sJ(a,b,c){var d=Z(a,"menu-item-selected");a=Uc(d,b);C(a,function(a){Dg(a,d)});N(c.parentNode,d)}function iJ(a,b){if(!b.widgetMenu){var c=a.da(b,"button-menu-id"),c=c&&Tc(c),d=Z(a,"menu");c?Cg(c,[d,Z(a,"menu-external")]):c=G(d,b);b.widgetMenu=c}return b.widgetMenu}
function hJ(a,b){if(a.da(b,"button-toggle")){var c=Fd(b,Z(a,"group")),d=Z(a,"toggled"),e=Bg(b,d);if(c&&a.da(c,"button-toggle-group")){var g=a.da(c,"button-toggle-group"),c=Uc(Z(a),c);C(c,function(a){a!=b||"optional"==g&&e?(Dg(a,d),a.removeAttribute("aria-pressed")):(N(b,d),a.setAttribute("aria-pressed","true"))})}else e?b.removeAttribute("aria-pressed"):b.setAttribute("aria-pressed","true"),Fg(b,d)}}
f.click=function(a){if(iJ(this,a)){var b=iJ(this,a),c=Fd(b.activeButtonNode||b.parentNode,Z(this));c&&c!=a?(mJ(this,c),L(x(this.pu,this,a),1)):rA(b)?mJ(this,a):this.pu(a);a.focus()}this.Yf(a,"button-action")};function rJ(a){a.$f&&mJ(a,a.$f)};function tJ(){JI.call(this)}z(tJ,JI);ba(tJ);f=tJ.prototype;f.Rc=null;f.Dj=null;f.Ed="overlay";f.register=function(){LI(this,"click",this.vu,"target");LI(this,"click",this.hide,"close");uJ(this)};
f.vu=function(a){if(!this.Rc||!rA(this.Rc.Dc)){var b=this.Nc(a);a=vJ(b,a);b||(b=a?a.overlayParentNode:null);if(b&&a){var c=!!this.da(b,"disable-shortcuts")||!1;this.Rc=new YI(a,c);this.Dj=b;var d=G("yt-dialog-fg",a);if(d){var e=this.da(b,"overlay-class")||"",g=this.da(b,"overlay-style")||"default",h=this.da(b,"overlay-shape")||"default",e=e?e.split(" "):[];e.push(Z(this,g));e.push(Z(this,h));Cg(d,e)}this.Rc.show();ki("yt-uix-kbd-nav-move-to",a);uJ(this);c||(c=x(function(a){Bg(a.target,"yt-dialog-base")&&
wJ(this)},this),a=G("yt-dialog-base",a),this.g=P(a,"click",c));this.Yf(b,"overlay-shown");UI(VI.getInstance());rJ(gJ.getInstance())}}};function uJ(a){a.j||(a.j=hi("yt-uix-overlay-hide",xJ));a.Rc&&aJ(a.Rc,function(){var a=tJ.getInstance();a.Dj=null;a.Rc.dispose();a.Rc=null})}function wJ(a){if(a.Rc){var b=a.Dj;fJ(a.Rc,"overlayhide");a.Yf(b,"overlay-hidden");a.Dj=null;a.g&&(ch(a.g),a.g=null);a.Rc=null}}
function vJ(a,b){var c;if(a)if(c=G("yt-dialog",a)){var d=Tc("body-container");d&&(d.appendChild(c),a.overlayContentNode=c,c.overlayParentNode=a)}else c=a.overlayContentNode;else b&&(c=Fd(b,"yt-dialog"));return c}f.Jc=function(a){return G("yt-dialog-content",a.overlayContentNode||a)};f.hide=function(){ki("yt-uix-overlay-hide")};function xJ(){wJ(tJ.getInstance())}f.show=function(a){this.vu(a)};function yJ(a){Q.call(this);this.j=a;this.g=[];this.g.push(hi("yt-uix-load-more-success",this.k,this))}z(yJ,Q);var zJ=!1;yJ.prototype.k=function(){var a={},b=sb(tb(Uc("spacecast-item")),tb(Uc("yt-lockup-video")));C(b,function(b){var c=b.getAttributeNode("data-context-item-id");if(c&&c.value){var c=c.value,g=a[c];g||(g=[],a[c]=g);g.push(b)}});var b=Vb(a),c=y();xI(this.j,b,x(this.o,this,a,c))};
yJ.prototype.o=function(a,b,c){b=y()-b;var d=0;c&&c.ids&&(AJ(),C(c.ids,function(b){C(a[b],function(a){N(a,"spacecast-cached")})}),d=c.ids.length);eB(ge({a:"spacecast",module:"highlight",count:Vb(a).length,cached:d,"cache-latency":b}));d&&BJ()};function BJ(){if(ef("INIT_SPACECAST_PROMO")&&!zJ){var a=G("spacecast-promo-overlay");a&&(zJ=!0,tJ.getInstance().show(a))}}function AJ(){var a=s("yt.player.getPlayerByElement");a&&a("player-api")}
yJ.prototype.K=function(){this.j=null;this.g.length&&(ji(this.g),this.g=[]);yJ.H.K.call(this)};function CJ(){Q.call(this);this.k=this.j=this.g=null}z(CJ,Q);ba(CJ);CJ.prototype.init=function(a){this.g||(this.g=new DI(a||null),this.j=new wI(this.g),this.k=new yJ(this.j))};CJ.prototype.K=function(){this.o&&(this.k.dispose(),this.k=null);this.j&&(this.j.dispose(),this.j=null);this.g&&(this.g.dispose(),this.g=null);CJ.H.K.call(this);delete CJ.Db};function DJ(a){Kx.call(this,a);this.nc=this.va="spacecast";this.j=null}z(DJ,Kx);f=DJ.prototype;f.Ha=function(){return!!this.g.getVideoData().Ia};function EJ(a){return a.getVideoData().Ia?new DJ(a):null}f.create=function(){DJ.H.create.call(this);var a=this.g.getVideoData().Ia,b=CJ.getInstance();b&&b.init(a);this.j=b;this.load()};f.destroy=function(){DJ.H.destroy.call(this);this.j=null};
f.load=function(){DJ.H.load.call(this);var a=this.g.getVideoData().videoId,b=this.j.j,c=y(),c=x(this.hC,this,a,c),d=window.spacecastMeta;d&&d.id&&d.id==a?(c(d),AI("meta","prefetch",{v:a})):CI(b,a,c)};f.hC=function(a,b,c){b=y()-b;var d=0;if(c){var e=c.id;c=c.fmt_list;if(e&&c){var g={};C(c,function(a){a.itag&&(g[a.itag.toString()]=!0)});if(c=FJ(this,zI(this.j.g),e,g))d=this.g.getVideoData(),d.U=c,sv(d),this.g.dr("auto"),d=1}}Mx(this);eB(ge({a:"spacecast",module:"player",v:a,docid:a,cached:d,"cache-latency":b}))};
function FJ(a,b,c,d){if(!b)return null;a=a.g.getVideoData();a=kv(a.se);a=eb(a,function(a){return!!d[a.itag]});if(!a.length)return null;var e=Wi(b)||"",g=Number(Zd(b)[4]||null)||null;return D(a,function(a){var b=K(K(pe(oe(ne(He(a.url),"http"),e),g),"orig_host",Xi(a.url)),"scid",c);a.url=b.toString();return ge(a)}).join(",")};function GJ(){var a=lc,b;if(b=xt())t:{if(navigator.plugins&&0<navigator.plugins.length)for(b=0;b<navigator.plugins.length;b++)if(0<=navigator.plugins[b].name.indexOf("NVIDIA 3D Vision")){b=!0;break t}b=!1}if(b)t:{var c=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);if(c&&1<c.length&&4<=c[1]){c=document.createElement("embed");c.setAttribute("id","NvImageDetectionFFID");c.setAttribute("style","visibility: hidden");c.setAttribute("width",25);c.setAttribute("height",25);c.setAttribute("type","image/jps");
id(document.documentElement,c);c=Tc("NvImageDetectionFFID");try{if(null!=c){b=27527<=c.NvGetDriverVersion();break t}}catch(d){}}b=!1}return b||!(!a||-1==a.indexOf("Sony"))};function HJ(a){SD.call(this);this.label=Y(0,"YTP_THREED_SHORT");this.element=new WD(a,[Y(0,"YTP_ON"),Y(0,"YTP_OFF")]);S(this,this.element);this.element.fb(this.label);ZD(this.element,2100);this.priority=10;this.A=!0;YD(this.element,1)}z(HJ,SD);HJ.prototype.G=function(){this.element.Qb("select")};HJ.prototype.getSelected=function(){return this.element.getSelected()};function IJ(a){X.call(this,["span"]);this.element.innerHTML=a}z(IJ,X);function JJ(a){var b=["div",["ytp-dialog","html5-stop-propagation"],["div","ytp-dialog-title",Y(0,"YTP_THREED_HTML5_WARNING_DIALOG_TITLE")],["div","ytp-dialog-body","{{content}}"],["div","ytp-dialog-buttons","{{buttons}}"]];X.call(this,b);b=Y(0,"YTP_THREED_HTML5_WARNING_DIALOG_CHANGE_MODE");this.g=new TD(a,"ytp-dialog-button",b);S(this,this.g);this.g.ua(b);b=Y(0,"YTP_CLOSE");this.j=new TD(a,"ytp-dialog-button",b);this.j.ua(b);S(this,this.j);this.template.update({content:new IJ(Y(0,"YTP_THREED_HTML5_WARNING_DIALOG_MESSAGE",
{BEGIN_LINK:'<a href="//support.google.com/youtube/bin/answer.py?answer=1229982">',END_LINK:"</a>"})),buttons:[this.g,this.j]})}z(JJ,qF);function KJ(a){Kx.call(this,a);kf({YTP_THREED_HTML5_WARNING_DIALOG_TITLE:"No HTML5 3D hardware detected",YTP_THREED_HTML5_WARNING_DIALOG_MESSAGE:"Get $BEGIN_LINKhelp setting up HTML5 3D$END_LINK, or change 3D viewing modes.",YTP_THREED_HTML5_WARNING_DIALOG_CHANGE_MODE:"Change 3D viewing mode"});this.j=new HJ(Yx(this));S(this,this.j);YD(this.j.element,1);this.j.listen("change",this.cB,this);this.j.listen("select",this.dB,this);this.k=new JJ(Yx(this));S(this,this.k);this.k.g.listen("click",this.wr,
this);this.k.j.listen("click",this.qg,this)}z(KJ,Kx);f=KJ.prototype;f.vn="threeDModuleData";f.va="threed";f.nc="threed";f.create=function(){LJ(this.g.app,void 0);ay(this,this.j);KJ.H.create.call(this)};f.destroy=function(){by(this,this.j);LJ(this.g.app,!0);KJ.H.destroy.call(this)};function MJ(a){return KJ.prototype.Ha(a)?new KJ(a):null}f.Ha=function(a){a=a.getVideoData();return GJ()?!!a.ma||!!a.Tr:!1};
function NJ(a,b){if(a.g.getVideoData().lh!=b)if(Ox(a),GJ()){var c=a.g.app,d=ow(c);d.g.j&&d.g.j.g||(d.g.lh=!d.g.lh,sv(d.g),pw(d,"r"));LJ(c)}else b&&(Ox(a,a.k),YD(a.j.element,1),cy(a))}f.wr=function(){Px(this,"/select_3d_mode?video_id="+this.g.getVideoData().videoId)};f.cB=function(){0==this.j.getSelected()?NJ(this,!0):NJ(this,!1)};f.dB=function(){cy(this);this.wr()};function OJ(a){SD.call(this);this.g=2;this.label=Y(0,"YTP_THREED_SHORT");this.menu=new CF(a,x(this.k,this),x(this.B,this));S(this,this.menu);this.element=new wF(a,Y(0,"YTP_WEBGL_ANAGLYPH"),this.menu);S(this,this.element);yF(this.element,100);DF(this.menu,[0,1,2]);a=2100;HF(this.menu,a++);a=a++;VD(this.element.g,a);PJ(this,this.g);this.priority=1;this.o=!0}z(OJ,SD);function PJ(a,b){a.g=b;FF(a.menu,b);a.element.k(a.k(b))}
OJ.prototype.k=function(a){switch(a){case 0:return Y(0,"YTP_OFF");case 1:return Y(0,"YTP_WEBGL_3D_2D");case 2:return Y(0,"YTP_WEBGL_3D_ANAGLYPH")}return"."};OJ.prototype.B=function(a){this.element.o();PJ(this,a);this.element.Qb("change")};function QJ(a,b,c){this.A=null;this.o=-1;this.k=a.getVideoData().ka;0!=this.k||"LR"!=a.getVideoData().zc("yt3d:enable")&&"true"!=a.getVideoData().zc("yt3d:enable")||(this.k=1);this.g=new OJ(a.app.j.j);this.g.listen("change",this.hy,this);this.g.listen("change",c,this);this.j=null;this.B=!0;ay(b,this.g);S(b,this.g)}function RJ(a){if(GJ())return!1;a=a.getVideoData();var b;(b=1==a.ka||2==a.ka)||(b=a.zc["3D"])||(a=a.zc("yt3d:enable"),b="true"==a||"LR"==a||"RL"==a);return b?!0:!1}f=QJ.prototype;f.Nj=function(){return"attribute vec3 aVertPos;attribute vec2 aTexCrd;varying vec2 vTexCrd;void main(void) { vTexCrd = aTexCrd; gl_Position = vec4(aVertPos, 1.0);}"};
f.Mj=function(){return"precision mediump float;\nuniform sampler2D uSplr;\nuniform int mode;\nvarying vec2 vTexCrd;\nuniform mat4 mLt;\nuniform mat4 mRt;\nvoid anaglyph(float x, float y) {\n x *= 0.5;\n vec4 cLt = texture2D(uSplr, vec2(x, y));\n vec4 cRt = texture2D(uSplr, vec2(0.5 + x, y));\n gl_FragColor = mLt * cLt + mRt * cRt;\n}\nvoid main(void) {\n if (mode == 2)\n anaglyph(vTexCrd.x, vTexCrd.y);\n else if (mode == 0)\n gl_FragColor = texture2D(uSplr, vTexCrd);\n else if (mode == 1)\n gl_FragColor = texture2D(uSplr, vec2(vTexCrd.x * 0.5, vTexCrd.y));\n}"};
f.Oj=function(a,b){b.g=a.getUniformLocation(b,"uSplr");a.uniform1i(b.g,0);this.o=a.getAttribLocation(b,"aTexCrd");a.enableVertexAttribArray(this.o);this.j=a.getUniformLocation(b,"mode");a.uniform1i(this.j,this.g.g);var c=1==this.k;a.uniformMatrix4fv(a.getUniformLocation(b,c?"mLt":"mRt"),!1,new Float32Array([.456,-.04,-.015,0,.5,-.038,-.021,0,.176,-.016,-.005,0,0,0,0,1]));a.uniformMatrix4fv(a.getUniformLocation(b,c?"mRt":"mLt"),!1,new Float32Array([-.043,.378,-.072,0,-.088,.734,-.113,0,0,-.018,1.226,
0,0,0,0,1]))};f.Si=function(a){var b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b);a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,1,1,1,0,0,1,0]),a.STATIC_DRAW);b.g=2;b.j=4;this.A=b};f.Ti=function(a){a.bindBuffer(a.ARRAY_BUFFER,this.A);a.vertexAttribPointer(this.o,this.A.g,a.FLOAT,!1,0,0)};f.ij=function(){};f.bj=function(a,b){this.B&&a.uniform1i(this.j,this.g.g);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);a.drawArrays(a.TRIANGLE_STRIP,0,4)};f.hj=function(){return!0};
f.hy=function(){this.B=!0};f.destroy=function(a){by(a,this.g)};function SJ(){this.g=new Float32Array(16);this.k=new Float32Array(16);this.j=new Float32Array(16);this.identity()}SJ.prototype.identity=function(){this.g.set([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};SJ.prototype.get=function(){return this.g};
function TJ(a,b){for(var c=0;16>c;c+=4)a.j[c+0]=a.g[c+0]*b[0]+a.g[c+1]*b[4]+a.g[c+2]*b[8]+a.g[c+3]*b[12],a.j[c+1]=a.g[c+0]*b[1]+a.g[c+1]*b[5]+a.g[c+2]*b[9]+a.g[c+3]*b[13],a.j[c+2]=a.g[c+0]*b[2]+a.g[c+1]*b[6]+a.g[c+2]*b[10]+a.g[c+3]*b[14],a.j[c+3]=a.g[c+0]*b[3]+a.g[c+1]*b[7]+a.g[c+2]*b[11]+a.g[c+3]*b[15];c=a.g;a.g=a.j;a.j=c};function UJ(){this.j=new SJ;this.C=this.A=this.o=null;this.B=!1;this.g=this.k=0}f=UJ.prototype;f.Nj=function(){return"attribute vec3 aVertPos;\nvarying vec3 pos;\nvoid main() {\n gl_Position = vec4(aVertPos.xyz, 1.0);\n pos = aVertPos;\n}"};f.Mj=function(){return"precision mediump float;varying vec3 pos;uniform sampler2D uSplr;uniform mat4 uVMat;uniform float tanFOVx;uniform float tanFOVy;\n#define INV_PI 0.3183\nvoid main() { vec3 ray = vec3(pos.x * tanFOVx, pos.y * tanFOVy, -1); ray = (uVMat * vec4(ray, 1.0)).xyz; ray = normalize(ray); vec2 texCrd = vec2(0.5 - atan(ray.x, ray.z) * INV_PI * 0.5, acos(ray.y) * INV_PI); gl_FragColor = vec4(texture2D(uSplr, texCrd).xyz, 1.0);}"};
f.Oj=function(a,b){this.o=a.getUniformLocation(b,"uVMat");a.uniformMatrix4fv(this.o,!1,this.j.get());a.uniform1f(a.getUniformLocation(b,"tanFOVx"),Math.tan(16/9*.35));a.uniform1f(a.getUniformLocation(b,"tanFOVy"),Math.tan(.35));this.C=a.getUniformLocation(b,"uSplr");a.uniform1i(this.C,0)};f.Si=function(a){this.A=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.A);a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,1,2,3]),a.STATIC_DRAW)};f.Ti=function(){};
f.ij=function(a){var b=!1;switch(a.keyCode){case 37:case 97:this.k+=.1;b=!0;a.preventDefault();break;case 39:case 100:this.k-=.1;b=!0;a.preventDefault();break;case 38:case 119:this.g+=.1;b=!0;a.preventDefault();break;case 40:case 115:this.g-=.1,b=!0,a.preventDefault()}if(b){this.j.identity();var b=this.j,c=this.g,d=Math.sin(c),c=Math.cos(c);b.k.set([1,0,0,0,0,c,d,0,0,-d,c,0,0,0,0,1]);TJ(b,b.k);b=this.j;c=this.k;d=Math.sin(c);c=Math.cos(c);b.k.set([c,0,-d,0,0,1,0,0,d,0,c,0,0,0,0,1]);TJ(b,b.k);a.preventDefault();
this.B=!0}};f.bj=function(a,b,c,d){this.B&&(a.uniformMatrix4fv(this.o,!1,this.j.get()),this.B=!1);a.clearColor(0,0,0,1);a.clear(a.DEPTH_BUFFER_BIT|a.COLOR_BUFFER_BIT);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,d);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.A);a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)};f.hj=function(){return!1};f.destroy=function(){};function VJ(){this.j=null;this.g=-1}f=VJ.prototype;f.Nj=function(){return"attribute vec3 aVertPos;\nattribute vec2 aTexCrd;\nvarying vec2 vTexCrd;\nvoid main(void) {\n vTexCrd = aTexCrd;\n gl_Position = vec4(aVertPos, 1.0);\n}"};f.Mj=function(){return"precision mediump float;\nuniform sampler2D uSplr;\nuniform float seed;\nvarying vec2 vTexCrd;\nvoid main(void) {\n gl_FragColor = vec4(texture2D(uSplr, vTexCrd.xy)).xyz, 1.0);\n}"};
f.Oj=function(a,b){b.g=a.getUniformLocation(b,"uSplr");a.uniform1i(b.g,0);this.g=a.getAttribLocation(b,"aTexCrd");a.enableVertexAttribArray(this.g)};f.Si=function(a){var b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b);a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,1,1,1,0,0,1,0]),a.STATIC_DRAW);b.g=2;b.j=4;this.j=b};f.Ti=function(a){a.bindBuffer(a.ARRAY_BUFFER,this.j);a.vertexAttribPointer(this.g,this.j.g,a.FLOAT,!1,0,0)};f.ij=function(){};
f.bj=function(a,b){a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);a.drawArrays(a.TRIANGLE_STRIP,0,4)};f.hj=function(){return!0};f.destroy=function(){};function YJ(){this.o=null;this.k=-1;this.g=43758.5453;this.j=null}f=YJ.prototype;f.Nj=function(){return"attribute vec3 aVertPos;\nattribute vec2 aTexCrd;\nvarying vec2 vTexCrd;\nvoid main(void) {\n vTexCrd = aTexCrd;\n gl_Position = vec4(aVertPos, 1.0);\n}"};f.Mj=function(){return"precision mediump float;\nuniform sampler2D uSplr;\nuniform float seed;\nvarying vec2 vTexCrd;\nfloat noise(float n)\n{\n return fract(sin(n) * seed);\n}\nvoid main(void) {\n vec4 col = vec4(texture2D(uSplr,\n vec2(vTexCrd.x, 1.0 - vTexCrd.y)).xyz, 1.0);\n float amt = 0.035;\n float maxCol = max(max(col.x, col.y), col.z);\n amt = amt * smoothstep(0.0, 0.1, maxCol);\n amt = amt * smoothstep(0.0, 0.1, 1.0 - maxCol);\n float noiseL = noise(gl_FragCoord.x + gl_FragCoord.y * 2000.0) * amt;\n col.xyz = col.xyz + noiseL;\n gl_FragColor = col;\n}"};
f.Oj=function(a,b){b.g=a.getUniformLocation(b,"uSplr");a.uniform1i(b.g,0);this.j=a.getUniformLocation(b,"seed");a.uniform1f(this.j,this.g);this.k=a.getAttribLocation(b,"aTexCrd");a.enableVertexAttribArray(this.k)};f.Si=function(a){var b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b);a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),a.STATIC_DRAW);b.g=2;b.j=4;this.o=b};f.Ti=function(a){a.bindBuffer(a.ARRAY_BUFFER,this.o);a.vertexAttribPointer(this.k,this.o.g,a.FLOAT,!1,0,0)};f.ij=function(){};
f.bj=function(a,b){this.g+=1;a.uniform1f(this.j,this.g);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);a.drawArrays(a.TRIANGLE_STRIP,0,4)};f.hj=function(){return!0};f.destroy=function(){};function ZJ(a,b,c,d){this.O=c;this.j=a.app.j.g;this.D=10;this.A=!0;this.N=this.G=this.I=this.k=this.o=null;this.C=b;this.g=null;this.M=a;this.F=d}
function $J(a){a.o=document.createElement("canvas");if(!a.o)return 1;a.O(a.o);try{a.k=a.o.getContext("webgl")}catch(b){return 2}if(null==a.k)return 3;aK(a);var c=bK(a);if(0!=c)return c;var c=a.k,d=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,d);c.bufferData(c.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),c.STATIC_DRAW);a.G=d;a.g.Si(c);c=a.k;d=c.createTexture();c.bindTexture(c.TEXTURE_2D,d);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.NEAREST);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,
c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);a.I=d;c=a.k;c.clearColor(0,0,0,1);c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT);c.bindBuffer(c.ARRAY_BUFFER,a.G);c.vertexAttribPointer(a.J,3,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,a.I);a.g.Ti(c);a.B();a.j.crossOrigin="use-credentials";return 0}
function bK(a){var b=a.k,c=b.createShader(b.VERTEX_SHADER);b.shaderSource(c,a.g.Nj());b.compileShader(c);if(!b.getShaderParameter(c,b.COMPILE_STATUS))return 4;var d=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d,a.g.Mj());b.compileShader(d);if(!b.getShaderParameter(c,b.COMPILE_STATUS))return 5;var e=b.createProgram();b.attachShader(e,c);if(1!=b.getProgramParameter(e,b.ATTACHED_SHADERS))return 6;b.attachShader(e,d);if(2!=b.getProgramParameter(e,b.ATTACHED_SHADERS))return 7;b.linkProgram(e);if(0==
b.getProgramParameter(e,b.LINK_STATUS))return 8;b.validateProgram(e);b.useProgram(e);if(0==b.getProgramParameter(e,b.VALIDATE_STATUS))return 9;a.J=b.getAttribLocation(e,"aVertPos");b.enableVertexAttribArray(a.J);a.N=e;a.g.Oj(b,a.N);return 0}ZJ.prototype.B=function(){this.A&&(this.j.videoWidth||this.j.videoHeight)&&(aK(this),this.g.bj(this.k,this.j,this.G,this.I));this.A&&requestAnimationFrame(this.B.bind(this))};
function aK(a){if(0==a.D&&null!=a.j.offsetParent){if(a.g.hj())var b=a.j.offsetWidth,c=a.j.offsetHeight,d=a.j.offsetTop;else b=a.j.offsetParent.offsetWidth,d=a.j.offsetParent.offsetHeight;c=9*b/16;a.o.top=d;a.o.width=b;a.o.height=c;a.k.j=b;a.k.g=c;a.k.viewport(0,0,b,c)}}ZJ.prototype.P=function(){this.A||requestAnimationFrame(this.B.bind(this));cy(this.F)};function cK(a){a.o&&(ld(a.o),a.o=null);a.k=null;a.A=!1;a.g&&a.g.destroy(a.F);a.g=null;a.j.removeAttribute("crossorigin");a.j.hidden=!1;a.D=10};function dK(a){Kx.call(this,a);this.Qi=!0;this.va="webgl";this.subscribe("onResize",this.gD,this);this.subscribe("onKeyPress",this.fD,this);this.subscribe("onStateChange",this.Tc,this);this.o=H("DIV",eK.eD);Nx(this,this.o);this.A=a;a=window.localStorage["yt-html5-player-module-webgl-shadertype"];if(void 0==a||null==a)a="",RJ(this.A)?a="Anaglyph3D":this.A.R().experiments.spherical&&(a="Spherical");this.j=new ZJ(this.A,a.toString(),x(this.o.appendChild,this.o),this);this.k=!1}z(dK,Kx);var eK={eD:"video-annotations"};
dK.g=function(a){return dK.Ha(a)?new dK(a):null};dK.prototype.Ha=function(){return dK.Ha(this.g)};dK.Ha=function(a){return RJ(a)&&a.R().experiments.eb||a.R().experiments.spherical?!0:!1};f=dK.prototype;f.gD=function(){this.k&&aK(this.j)};f.fD=function(a){if(this.k){var b=this.j;b.g&&(b.g.ij(a),b.A||requestAnimationFrame(b.B.bind(b)))}};f.Tc=function(a){if(this.k){var b=this.j,c=b.A;b.A=W(a.state,8);b.A&&!c&&requestAnimationFrame(b.B.bind(b))}};f.K=function(){dK.H.K.call(this)};
f.create=function(){var a=this.j;a.g=null;null!=a.C&&("Anaglyph3D"==a.C?a.g=new QJ(a.M,a.F,a.P.bind(a)):"Spherical"==a.C?a.g=new UJ:"WhiteNoise"==a.C?a.g=new YJ:"NoOp"==a.C&&(a.g=new VJ));a.g&&(a.D=$J(a),0==a.D?a.j.hidden=!0:(a.M.app.k.Zh(new hu("html5.missingapi.webgl",!1)),cK(a)));this.k=null!=this.j.g;dK.H.create.call(this)};f.destroy=function(){cK(this.j);this.k=!1;dK.H.destroy.call(this)};function fK(a){Kx.call(this,a);kf({YTP_YPC_START_RENTAL_HEADER:"Would you like to start this rental?",YTP_YPC_START_RENTAL_BUTTON:"Start rental period"});this.j=new Ey(["div","ytp-ypc-clickwrap-overlay",["h2","header",lf("YTP_YPC_START_RENTAL_HEADER")],["div","description",this.g.getVideoData().o.ypc_clickwrap_message],["button","confirm-button",lf("YTP_YPC_START_RENTAL_BUTTON")]]);DA(this.j.L());Xw(this.g,this.j.L());S(this,this.j);this.k=this.j.g["confirm-button"]}z(fK,Kx);f=fK.prototype;f.va="ypc_clickwrap";
f.nc="ypc-clickwrap";f.Ha=function(){return Av(this.g.getVideoData(),"ypc_clickwrap_module")};function gK(a){return Av(a.getVideoData(),"ypc_clickwrap_module")?new fK(a):null}f.create=function(){fK.H.create.call(this);this.load()};f.load=function(){fK.H.load.call(this);var a=this.j.L();EA(a,"block");P(this.k,"click",x(this.JD,this))};f.unload=function(){DA(this.j.L());gh(this.k);fK.H.unload.call(this)};f.JD=function(){Mx(this);this.destroy()};function hK(a){a=a.o;this.k=a.ypc_offer_button_text;this.description=a.ypc_offer_description;this.A=a.ypc_offer_headline;this.o=a.ypc_full_video_message;this.offerId=a.ypc_offer_id;this.g=a.ypc_buy_url;this.thumbnail=a.ypc_item_thumbnail;sf(this.thumbnail)||(this.thumbnail="");this.title=a.ypc_item_title;this.j=a.ypc_item_url;this.videoId=a.ypc_vid};function iK(){X.call(this,["div",["ytp-drawer","html5-stop-propagation"],["div","ytp-drawer-content","{{content}}"],["a","ytp-drawer-close-button"],["a","ytp-drawer-open-button"]]);this.k=this.template.g["ytp-drawer-close-button"];HA(this,this.k,"click",this.hide);this.g=this.template.g["ytp-drawer-open-button"];HA(this,this.g,"click",this.show);this.j=new dr(pa(Dg,this.element,"ytp-drawer-closed"),0);S(this,this.j);this.ua(null);this.hide()}z(iK,X);
iK.prototype.hide=function(){this.j.stop();N(this.element,"ytp-drawer-closed")};iK.prototype.ua=function(a){a?(iK.H.ua.call(this,a),EA(this.element,"block")):DA(this.element)};iK.prototype.show=function(){this.j.start()};iK.prototype.K=function(){gh(this.k);gh(this.g);this.g=this.k=null;iK.H.K.call(this)};function jK(a,b){T.call(this);this.g=new iK;S(this,this.g);this.j=document.createElement("div");Cg(this.j,["html5-ypc-endscreen"]);this.o=document.createElement("div");N(this.o,"html5-ypc-overlay");this.k=new Ey(["div","html5-ypc-module",["div","html5-ypc-action-heading","{{heading}}"],["div","html5-ypc-thumbnail","{{thumbnail_element}}"],["div","html5-ypc-title","{{title}}"],["div","html5-ypc-description","{{description}}"],["button","html5-ypc-purchase","{{button_label}}"]]);S(this,this.k);this.A=
this.k.g["html5-ypc-purchase"];P(this.A,"click",x(this.B,this));td(this.o,b.o);var c=b.title;b.j&&(c=["a",{href:b.j,target:"blank_"},b.title]);var d="";b.thumbnail&&(d=["img",{src:b.thumbnail}]);this.k.update({heading:b.A,title:c,thumbnail_element:d,description:b.description,button_label:b.k});this.X(a)}z(jK,T);jK.prototype.K=function(){jK.H.K.call(this);this.A&&gh(this.A);ld(this.j);ld(this.o);this.o=this.j=this.g=null};jK.prototype.X=function(a){this.g.X(a);this.g.ua(this.k.L());a.appendChild(this.j)};
function kK(a){var b=a.k.L();a.j.appendChild(b);a.g.ua(null);EA(a.j,"block")}jK.prototype.B=function(){this.publish("ypcContentRequest")};function lK(a){Kx.call(this,a);this.k=this.j=null;this.A=NaN;this.o=null}z(lK,Kx);f=lK.prototype;f.va="ypc";f.nc="ypc";f.Ha=function(){return Av(this.g.getVideoData(),"ypc_module")};function mK(a){return Av(a.getVideoData(),"ypc_module")?new lK(a):null}f.create=function(){lK.H.create.call(this);this.j=new hK(this.g.getVideoData());L(x(this.kB,this),0);this.o=new X(["div",["ytp-player-content","ytp-ypc-player-content"]]);this.o.X(this.g.Qa())};
f.destroy=function(){lK.H.destroy.call(this);this.j=null;this.o.Zc();this.o.dispose();this.o=null};f.kB=function(){this.Qd&&!this.loaded&&this.load()};
f.load=function(){lK.H.load.call(this);var a=this.g.getVideoData();if(this.j.videoId&&!a.na)this.g.Mp({video_id:this.j.videoId,ypc_preview:1});else{this.k=new jK(this.o.L(),this.j);this.k.subscribe("ypcContentRequest",this.ly,this);this.j.videoId&&hd(this.o.L(),this.k.o);if(kI(this.g.R())){var b=new Ax(2147483647,2147483647,{priority:2});this.ye(b)}this.k.g.show();M(this.A);this.A=L(x(function(){this.k.g.hide()},this),1E4);this.j.videoId?a.na&&Mx(this):kK(this.k)}};
f.unload=function(){Lx(this);ai(this.k);this.k=null;lK.H.unload.call(this)};f.Gc=function(a){lK.H.Gc.call(this,a);kK(this.k)};f.ad=function(a){lK.H.ad.call(this,a);a=this.k;DA(a.j);a.g.ua(a.k.L())};f.ly=function(){if(this.j.g)"embedded"==this.g.R().ca?hB(this.j.g):gB(this.j.g);else if(this.j.offerId){var a=s("yt.www.watch.player.handleEndPreview");a&&(this.g.isFullscreen()&&xB(this.g.app),a(this.j.offerId))}};function nK(a){this.o=Math.exp(Math.log(.5)/a);this.g=this.k=0}nK.prototype.j=function(a,b){var c=Math.pow(this.o,a);this.g=b*(1-c)+c*this.g;this.k+=a};nK.prototype.A=function(){return this.g/(1-Math.pow(this.o,this.k))};function oK(a){this.j=window.Float32Array?new Float32Array(a):Array(a);this.g=a-1}oK.prototype.add=function(a){this.g=(this.g+1)%this.j.length;this.j[this.g]=a};oK.prototype.forEach=function(a){for(var b=this.g+1;b<this.j.length;b++)a(this.j[b]||0);for(b=0;b<=this.g;b++)a(this.j[b]||0)};function pK(a,b,c){this.F=0;this.C=a;this.o=b||.5;this.B=c||0;this.D="index";this.g=0;this.k=[]}pK.prototype.j=function(a,b){qK(this,"index");this.k.push({index:this.F++,weight:a,value:b});this.g+=a;for(qK(this,"index");this.g>this.C;){var c=this.g-this.C,d=this.k[0];d.weight<=c?(this.g-=d.weight,this.k.shift()):(this.g-=c,d.weight-=c)}};function rK(a,b){qK(a,"value");var c=b*a.g,d=0,e=NaN;a.k.some(function(a){d+=a.weight;e=a.value;if(d>=c)return!0});return e}
pK.prototype.A=function(){return this.B?(rK(this,this.o-this.B)+rK(this,this.o)+rK(this,this.o+this.B))/3:rK(this,this.o)};function qK(a,b){a.D!=b&&(a.D=b,Cb(a.k,b))};function sK(a){this.policy=a;this.j=this.A=this.B=0;this.D=new oK(100);this.C=0;this.F=y();this.o=new pK(16,.6);this.k=new nK(4);this.policy.j?this.g=new nK(17):this.g=new pK(17,.5,.1);a=Gi("yt-player-bandwidth")||{};this.g.j(this.policy.g,0<a.byterate?a.byterate:13E4);0<a.delay&&this.o.j(1,Math.min(+a.delay,2));0<a.tailDelay&&this.k.j(1,+a.tailDelay);this.j=y()}function tK(a,b,c){b=Math.max(b,.05);a.g.j(b,c/b);uK(a)}function vK(a,b,c){isNaN(c)||(a.A+=c);isNaN(b)||(a.B+=b/1E3);uK(a)}
function wK(a){a=a.o.A();a=isNaN(a)?.5:a;return a=Math.min(a,5)}function xK(a){return a.k.A()||0}function yK(a){a=a.g.A();return 0<a?a:1}function zK(a){var b={};b.delay=wK(a);b.tailDelay=xK(a);b.byterate=yK(a);return b}function AK(a){1E4<y()-a.j&&(Wv(zK(a)),a.j=y())}function uK(a){var b=y();a.F=b;500<b-a.C&&(a.D.add(1/(1/yK(a)+xK(a))),a.C=b)}function BK(a){return 4E3<=y()-a.F};function CK(){this.g=.5;this.j=!1};function DK(){Q.call(this);this.g=[];this.B={};this.k={};this.o={};this.j=this.C=null;this.A=[];this.D=null}z(DK,Q);DK.prototype.nr=function(a){if(this.j){var b;var c=ka(a);b=this.B[c];if(!b)if(this.j){if(b=a(this.j)){a=this.B[c]=b;for(var d in this.C)a.subscribe(d,this.C[d]);a.subscribe("command_log_timing",this.F,this);S(this,b)}}else b=null;b&&b.Ha(this.j)&&!lb(this.g,b)&&(b.create(),this.g.push(b),lb(this.A,b.va)&&(b.Ob=this.D,b.jj(!!b.Ob)))}};
function EK(a){a.g=eb(a.g,function(a){if(!this.j||a.Fm(this.j)){try{a.destroy()}catch(c){jf(c)}return!1}return!0},a)}function FK(a,b,c){GK(a);a.D=b;a.A=tb(c);C(a.g,function(a){0<=cb(c,a.va)&&(a.Ob=b,a.jj(!!a.Ob))})}function GK(a){C(a.A,function(a){if(a=sw(this,a))a.Ob=null,a.jj(!1)},a);a.D=null;a.A=[]}function Fw(a,b){if(!b)return D(a.g,function(a){return a.va});var c=sw(a,b);return c?c.Sj():[]}function sw(a,b){return E(a.g,function(a){return a.va==b})}
DK.prototype.G=function(a,b){C(this.g,function(c){c.publish(a,b)})};function HK(a){var b={};C(a.g,function(a){qa(b,a.mh())});return b}DK.prototype.F=function(a,b){qa(this.o,a||null);qa(this.k,b||null)};DK.prototype.isAvailable=function(a){return(a=sw(this,a))?a.Qi:!1};function IK(a,b,c){this.o=b;this.g=c;this.k=a}IK.prototype.getMessage=function(){return this.o};IK.prototype.getErrorCode=function(){return this.g};IK.prototype.toString=function(){return"AdError "+this.getErrorCode()+": "+this.getMessage()+(null!=this.j?" Caused by: "+this.j:"")};function JK(a,b){vm.call(this,"adError");this.k=a;this.o=b?b:null}z(JK,vm);var KK="acceptinvitation acceptinvitationlinear click close collapse complete creativeview engagedview exitfullscreen expand firstquartile fullscreen midpoint mute pause progress replay resume rewind skipshown skip start stop thirdquartile unmute userClose videoShareClicked videoShareShown viewable_impression".split(" "),LK="acceptinvitation click collapse creativeview expand progress close".split(" ");function MK(a,b,c){vm.call(this,a);this.o=b;this.k=null!=c?c:null}z(MK,vm);MK.prototype.getAd=function(){return this.o};
var NK={CONTENT_PAUSE_REQUESTED:"contentPauseRequested",CONTENT_RESUME_REQUESTED:"contentResumeRequested",CLICK:"click",rK:"videoClicked",YH:"engagedview",aI:"expandedChanged",STARTED:"start",us:"impression",su:"viewable_impression",PAUSED:"pause",zJ:"resume",FIRST_QUARTILE:"firstquartile",MIDPOINT:"midpoint",THIRD_QUARTILE:"thirdquartile",COMPLETE:"complete",USER_CLOSE:"userClose",LOADED:"loaded",ALL_ADS_COMPLETED:"allAdsCompleted",SKIPPED:"skip",JG:"skipshown",NJ:"skippableStateChanged",kH:"adMetadata",
jH:"adBreakReady",MI:"log",VOLUME_CHANGED:"volumeChange",DK:"mute",NH:"companionBackfill",NK:"youTubeVideoMetadata",MK:"youTubeChannelMetadata",pK:"urlNavigationRequested"};var OK=["://secure-...imrworldwide.com/","://cdn.imrworldwide.com/","://aksecure.imrworldwide.com/","www.google.com/pagead/sul","www.youtube.com/gen_204\\?a=sul"],PK=0,QK={};function RK(a){return A(B(a))?!1:null!=E(OK,function(b){return null!=a.match(b)})}
function SK(a){if(a){var b=H("iframe",{src:'javascript:"data:text/html,<body><img src=\\"'+a+'\\"></body>"',style:"display:none"});a=Sc(b).body;var c,d=Fn(function(){Wm(c);ld(b)},15E3);c=Um(b,["load","error"],function(){Fn(function(){Gn(d);ld(b)},5E3)});a.appendChild(b)}}function TK(a){if(a){var b=new Image,c=""+PK++;QK[c]=b;b.onload=b.onerror=function(){delete QK[c]};b.src=a}};var UK={"application/flash":"Flash","application/shockwave-flash":"Flash","application/x-shockwave-flash":"Flash","image/jpeg":"Image","image/jpg":"Image","image/png":"Image","image/gif":"Image",text:"Text"},VK=["ADSENSE","ADSENSE/ADX"],WK=["DART","DART_DFA","DART_DFP"],XK=["FREEWHEEL"],YK=["GDFP"],ZK={XI:"video/mp4",ZI:"video/mpeg",NI:"application/x-mpegURL",gJ:"video/ogg",$J:"video/3gpp",GK:"video/webm",WI:"audio/mpeg",YI:"audio/mp4"};var $K=["google-developers.appspot.com","devsite.googleplex.com"],aL=["*.googlesyndication.com"],bL=["*.youtu.be","*.youtube.com"],cL="ad.doubleclick.net bid.g.doubleclick.net corp.google.com ggpht.com google.co.uk google.com googleads.g.doubleclick.net googleads4.g.doubleclick.net googleadservices.com googlesyndication.com googleusercontent.com gstatic.com prod.google.com pubads.g.doubleclick.net s0.2mdn.net static.doubleclick.net static.doubleclick.net surveys.g.doubleclick.net youtube.com ytimg.com".split(" "),
dL=["googleads.g.doubleclick.net","pubads.g.doubleclick.net"];function eL(a,b){try{var c=ze(new J(b)),c=c.replace(/^www./i,"");return gb(a,function(a){return fL(a,c)})}catch(d){return!1}}function fL(a,b){if(A(B(b)))return!1;a=a.toLowerCase();b=b.toLowerCase();return"*."==a.substr(0,2)?(a=a.substr(2),a.length>b.length?!1:b.substr(-a.length)==a&&(b.length==a.length||"."==b.charAt(b.length-a.length-1))):a==b}
function gL(a){var b;if(b="https:"==window.location.protocol)b=(new RegExp("^https?://([a-z0-9-]{1,63}\\.)*("+cL.join("|").replace(/\./g,".")+")(:[0-9]+)?([/?#]|$)","i")).test(a);return b?(a=new J(a),ne(a,"https"),a.toString()):a};function hL(a){window.open(gL(a),"_blank")}function iL(a,b,c){null!=b&&(a=jL(a,b));null!=c&&(A(B(c))||(b=new J(a),Me(b.g,"label")&&(K(b,"acvw",c),a=b.toString().replace(/%2C/g,","))));(c=a=gL(a))&&(RK(c)?SK(c):TK(c))}function kL(a,b){null!=a&&C(a,function(a){iL(a,b)})}function jL(a,b){return a.replace(/\[[a-zA-Z0-9_]+\]/g,function(a){try{var d=ec(b,a),d=d.toString();if(!A(B(d)))return encodeURIComponent(d).replace(/%2C/g,",")}catch(e){}return a})}
function lL(a,b,c){if(null==a)return"";K(a,"label",b);null!=c&&K(a,"value",c.join(";"));return a.toString()};function mL(a,b){this.message=a;this.errorCode=b}mL.prototype.getErrorCode=function(){return this.errorCode};mL.prototype.getMessage=function(){return this.message};
var nL=new mL("Unable to request ads from server. Cause: {0}.",1005),oL=new mL("Unable to request ads from server due to network error.",1012),pL=new mL("Cannot parse the {0} value for the adslist response: {1}.",900),qL=new mL("Invalid usage of the API. Cause: {0}",900),rL=new mL("Unable to display one or more required companions.",602),sL=new mL("There was a problem requesting ads from the server.",1005),tL=new mL("Ad tag URI {0} is invalid. It must be properly encoded before being passed.",1013),
uL=new mL("The provided ad type: {0} is not supported.",1005),vL=new mL("The provided {0} information: {1} is invalid.",1101),wL=new mL("The response does not contain any valid ads.",1009),xL=new mL("The overlay ad content could not be displayed since creative dimensions do not align with display area.",501),yL=new mL("The ad playlist response was malformed or empty.",1010),zL=new mL("The ad response was not understood and cannot be parsed.",1010),AL=new mL("An unexpected error occurred and the cause is not known. Refer to the inner error for more info.",
900),BL=new mL("The ad response contains unexpected element. Cause {0}.",1010),CL=new mL("No assets were found in the VAST ad response.",200),DL=new mL("Duplicate node in <{0}>: {1}",101),EL=new mL("The VAST response document is empty.",1009),FL=new mL("Linear assets were found in the VAST ad response, but none of them matched the video player's capabilities.",403),GL=new mL("Ad request reached a timeout.",301),HL=new mL("VAST response was malformed and could not be parsed.",100),IL=new mL("VAST media file loading reached a timeout of {0} seconds.",
402),JL=new mL("Ad request could not be completed due to a network error.",301),KL=new mL("Non linear assets were found in the VAST ad response, but none of them matched the video player's capabilities.",503),LL=new mL("The maximum number of VAST wrappers ({0}) has been reached.",302),ML=new mL("VAST media file duration differs from the VAST response duration by {0} seconds.",202),NL=new mL("Video player received an ad with unexpected or incompatible linearity",201),OL=new mL("Unknown node in <{0}>: {1}",
101),PL=new mL("Invalid VAST resource type: {0}",101),QL=new mL("Invalid VAST version",102),RL=new mL("No additional VAST wrappers allowed.",300),SL=new mL("No Ads VAST response after one or more Wrappers",303),TL=new mL("There was an error playing the video ad.",400),UL=new mL("VMAP unsupported node in <{0}>: {1}",1010),VL=new mL("An unexpected error occurred within the VPAID creative. Refer to the inner error for more info.",901);
function WL(a,b,c){return XL("adLoadError",a,b||null,wb(arguments,2))}function YL(a,b,c){return XL("adPlayError",a,b||null,wb(arguments,2))}function ZL(a,b,c,d,e){var g=a.apply(null,sb([c,d],wb(arguments,3)));b.T(new MK("log",null,g))}function XL(a,b,c,d){if(c instanceof IK)return c;var e=b.errorCode;b=b.message;if(0<d.length)for(var g=0;g<d.length;g++)b=b.replace(new RegExp("\\{"+g+"\\}","ig"),d[g]);a=new IK(a,b,e);a.j=c;return a}
function $L(a,b,c,d){var e=YL.apply(null,sb([b,c],wb(arguments,3)));a.T(new JK(e))};function aM(a,b,c,d){this.xa=a;this.g=Ib(c||0,0,1);this.j=null!=d?d:!0}aM.prototype.getId=function(){return this.xa};function bM(a){this.xa=a;this.j=new Od;this.g=null}function cM(a){var b=Math.random(),c=0,d=a.j.Wa();C(d,function(a){c+=a.g},a);var e=1<c?c:1;a.g=null;for(var g=0,h=0;h<d.length;++h)if(g+=d[h].g,g/e>=b){a.g=d[h];break}};function dM(){this.g=new Od;eM(this,41351021,.25);eM(this,41351022,.25);eM(this,41351068,.01);eM(this,41351069,.01);fM(this)}var gM=null;function hM(){gM||(gM=new dM);return gM}function eM(a,b,c){A(B("GvnExternalLayer"))||isNaN(b)||0>=b||(b=new aM(b,0,c),iM(a,"GvnExternalLayer").j.set(b.getId(),b))}function fM(a){C(a.g.Wa(),function(a){cM(a)},a)}function jM(a,b,c){C(b,function(a){var b=Number(a),g="forcedLayer"+a;isNaN(b)||0>=b||A(B(g))||(a=null!=c?c:!0,g=iM(this,g),b=new aM(b,0,0,a),g.g=b)},a)}
function kM(a){var b=hM();return gb(b.g.Wa(),function(b){return!!b.g&&b.g.getId()==a})}function lM(a){var b=[];C(a.g.Wa(),function(a){(a=a.g)&&a.j&&b.push(a.getId())});return b.sort().join(",")}function iM(a,b){var c=a.g.get(b);null==c&&(c=new bM(b),a.g.set(b,c));return c};function mM(a){return(a=a.match(/^\w{2,3}([-_]|$)/))?a[0].replace(/[_-]/g,""):""};function nM(){this.k="always";this.g=this.j=this.A=!1}nM.prototype.getPlayerType=function(){return""};var $=new nM;var oM={},pM="",qM=/OS (\S+) like/,rM=/Android (\S+);/;function sM(){return rc||Ma(lc,"Mobile")}function tM(){return sc&&!tc||Ma(lc,"iPod")}function uM(){return tM()||tc}function vM(a,b){if(null==oM[b]){var c=wM(a);c?(c=c.replace(/_/g,"."),oM[b]=0<=Ra(c,b)):oM[b]=!1}return oM[b]}function wM(a){A(pM)&&(a=a.exec(lc))&&(pM=a[1]);return pM}
function xM(){var a=lc;return a?Ma(a,"AppleTV")||Ma(a,"GoogleTV")||Ma(a,"HbbTV")||Ma(a,"NetCast.TV")||Ma(a,"POV_TV")||Ma(a,"SMART-TV")||Ma(a,"SmartTV")||rc&&Ma(a,"AFT"):!1}function yM(){return Ma(lc,"PlayStation")}function zM(){return tM()&&sM()&&Ma(lc,"Safari")||rc&&(!rc||!vM(rM,4))||!$.g&&(Ma(lc,"CrKey")||yM()||Ma(lc,"Roku")||xM()||Ma(lc,"Xbox"))?!1:!0};function AM(){this.j=.05>Math.random();this.g=Math.floor(4503599627370496*Math.random())}ba(AM);function BM(a,b,c,d){if(a.j||d){c=c||{};c.lid=b;c=CM(a,c);var e=new J("http://pagead2.googlesyndication.com/pagead/gen_204");Ob(c,function(a,b){K(e,b,null!=a?"boolean"==typeof a?a?"t":"f":""+a:"")},a);a=DM();ne(e,a.Ib);iL(e.toString())}}function CM(a,b){b.id="";var c=DM();b.c=a.g;b.domain=c.ob;return b}function DM(){var a=bd(),b=document;return new J(a.parent==a?a.location.href:b.referrer)};function EM(){}f=EM.prototype;f.ID=!1;f.Ms=!1;f.Rr=!0;f.baseYouTubeUrl=null;f.bitrate=-1;f.contentId=null;f.vD=!1;f.Ck=!1;f.mimeTypes=null;f.surveyCreativeData=null;f.Fo=!1;f.useShareButton=!1;f.useStyledNonLinearAds=!1;f.useVideoAdUi=!0;f.Do=!1;f.Xo=!1;f.youTubeAdNamespace=0;f.showContentThumbnail=!0;f.Eo=!1;f.loadVideoTimeout=15E3;function FM(a){try{return!!a&&null!=a.location.href&&Qf(a,"foo")}catch(b){return!1}};var GM=document,HM=window;function IM(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(e){b=c}}return b}function JM(a){HM.google_image_requests||(HM.google_image_requests=[]);var b=HM.document.createElement("img");b.src=a;HM.google_image_requests.push(b)};function KM(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(null,a[c],c,a)}function LM(a){return"function"==typeof encodeURIComponent?encodeURIComponent(a):escape(a)};var MM=!0,NM={};function OM(a,b,c,d){var e=PM,g,h=MM;try{g=b()}catch(k){try{var m=IM(k);b="";k.fileName&&(b=k.fileName);var p=-1;k.lineNumber&&(p=k.lineNumber);h=e(a,m,b,p,c)}catch(r){try{var t=IM(r);a="";r.fileName&&(a=r.fileName);c=-1;r.lineNumber&&(c=r.lineNumber);PM("pAR",t,a,c,void 0,void 0)}catch(v){QM({context:"mRE",msg:v.toString()+"\n"+(v.stack||"")},void 0)}}if(!h)throw k;}finally{if(d)try{d()}catch(I){}}return g}
function PM(a,b,c,d,e,g){var h={};if(e)try{e(h)}catch(k){}h.context=a;h.msg=b.substring(0,512);c&&(h.file=c);0<d&&(h.line=d.toString());h.url=GM.URL.substring(0,512);h.ref=GM.referrer.substring(0,512);RM(h);QM(h,g);return MM}function QM(a,b){try{if(Math.random()<(b||.01)){var c="/pagead/gen_204?id=jserror"+SM(a),d="http"+("http:"==HM.location.protocol?"":"s")+"://pagead2.googlesyndication.com"+c,d=d.substring(0,2E3);JM(d)}}catch(e){}}function RM(a){var b=a||{};KM(NM,function(a,d){b[d]=HM[a]})}
function TM(a,b,c,d,e){return function(){var g=arguments;return OM(a,function(){return b.apply(c,g)},d,e)}}function UM(a,b){return TM(a,b,void 0,void 0,void 0)}function SM(a){var b="";KM(a,function(a,d){if(0===a||a)b+="&"+d+"="+LM(a)});return b};function VM(){for(var a=HM,b=a,c=0;a!=a.parent;)a=a.parent,c++,FM(a)&&(b=a);return b};var WM={ru:"start",FIRST_QUARTILE:"firstquartile",MIDPOINT:"midpoint",THIRD_QUARTILE:"thirdquartile",COMPLETE:"complete",METRIC:"metric",PAUSE:"pause",GG:"resume",SKIPPED:"skip",su:"viewable_impression",FG:"mute",LG:"unmute",FULLSCREEN:"fullscreen",xG:"exitfullscreen"},XM={UNKNOWN:-1,ru:0,FIRST_QUARTILE:1,MIDPOINT:2,THIRD_QUARTILE:3,COMPLETE:4,METRIC:5,PAUSE:6,GG:7,SKIPPED:8,su:9,FG:10,LG:11,FULLSCREEN:12,xG:13};var YM=!1,ZM="";function $M(a){a=a.match(/[\d]+/g);if(!a)return"";a.length=3;return a.join(".")}
if(navigator.plugins&&navigator.plugins.length){var aN=navigator.plugins["Shockwave Flash"];aN&&(YM=!0,aN.description&&(ZM=$M(aN.description)));navigator.plugins["Shockwave Flash 2.0"]&&(YM=!0,ZM="2.0.0.11")}else if(navigator.mimeTypes&&navigator.mimeTypes.length){var bN=navigator.mimeTypes["application/x-shockwave-flash"];(YM=bN&&bN.enabledPlugin)&&(ZM=$M(bN.enabledPlugin.description))}else try{var cN=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),YM=!0,ZM=$M(cN.GetVariable("$version"))}catch(dN){try{cN=
new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),YM=!0,ZM="6.0.21"}catch(eN){try{cN=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),YM=!0,ZM=$M(cN.GetVariable("$version"))}catch(fN){}}}var gN=YM,hN=ZM;if(GM&&GM.URL)var iN=GM.URL,MM=!(iN&&(0<iN.indexOf("?google_debug")||0<iN.indexOf("&google_debug")));function jN(a,b,c,d){c=TM(d||"osd_or_lidar::"+b,c,void 0,void 0,void 0);a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c);return c};function kN(a,b){this.F=a||3E3;this.D=b||3E3;this.j="u";this.A=null;this.g=[];this.B=!1;this.k=-1;this.o=0}function lN(a,b,c){this.snapshot=a;this.j=b;this.g=c}
function mN(a,b,c){if(!(b&&b.getBoundingClientRect&&0<=Ra(hN,"11")&&c)||wc&&9>Gc||0<a.g.length)return!1;try{var d=b.getBoundingClientRect()}catch(e){return!1}var g="DIV"==b.tagName||"INS"==b.tagName,h=Sc(b),k=[];g?(b.style.position="relative",d=nN(d),C(d,function(a,d){var e=new oN("e",h,c,String(d));this.g.push(e);k.push(x(e.D,e,b,a))},a)):(d=pN(a,d),C(d,function(a,d){var e=new oN("e",h,c,String(d));this.g.push(e);k.push(x(e.C,e,b,a))},a));var m=!0;C(k,function(a){m=m&&a()});m?(a.j="l",a.A=b,a.B=
!g):(C(a.g,function(a){a.remove()}),a.g=[]);return m}function nN(a){return[new Kb(Math.floor((a.right-a.left)/2),Math.floor((a.bottom-a.top)/2))]}function pN(a,b){var c;try{c=b||a.A.getBoundingClientRect()}catch(d){c=new Kf(0,0,0,0)}var e=nN(c);C(e,function(a){a.x+=c.left;a.y+=c.top});return e}function qN(a){if(a.A&&a.B){var b=pN(a);C(b,function(a,b){this.g[b]&&rN(this.g[b],a)},a)}}function sN(a){C(a.g,function(a){a.remove()});a.g=[];a.j="d"}
function tN(a){var b=(new Date).getTime(),c=a.C?b-a.C:0,d=-1;4==a.g.length?(d=D(a.g,function(a){return uN(a,b)}),d=vN(d)):1==a.g.length&&(d=[-1,0,1,2,3,5][uN(a.g[0],b)+1]);a.o=d==a.k?a.o+c:0;c=new lN(d,a.k,c);a.k=d;a.C=b;wN(a,d);qN(a);return c}function vN(a){var b=Gb(Tb(xN));C(a,function(a){0<=a&&++b[a]});return 4==b[4]?6:3<=b[4]?5:0<b[4]?4:4==b[2]?2:4==b[1]?1:4==b[0]?0:3}function wN(a,b){0==b&&yN(a)?a.j="n":a.j="dlfcrrrr".split("")[b+1]}kN.prototype.getStatus=function(){return this.j};
function yN(a){return"n"==a.j?!0:"l"==a.j&&a.o>=a.D}
function oN(a,b,c,d){this.module=null;this.o=a;this.xa="e"==a?String(c)+"~"+String(d):"";this.g=[];this.j=-1;this.A=0;this.k=Gb(Tb(zN));this.F=Gb(Tb(xN));"e"==this.o&&(AN[this.xa]=x(this.B,this));wc?(a=b.createElement("div"),a.innerHTML='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" style="opacity:0;-ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=0)\';filter:alpha(opacity=0)"><param name="movie" value="'+BN(this,!0)+'"></param><param name="allowscriptaccess" value="always"></param><param name="wmode" value="transparent"></param></object>',a=
a.firstChild,a.id=String(Math.random())):a=CN(this,b);a.width=1;a.height=1;a.style.zIndex=-999999;this.module=a}var xN={mK:-1,LOADING:0,CG:1,wG:2,AI:3,VISIBLE:4},zN={LOADING:0,CG:1,wG:2,eK:3,fJ:4,jK:5,kK:6,iK:7,iJ:8,dK:9},AN={};
function CN(a,b){function c(a,c,d){var e=b.createElement("param");e.name=c;e.value=d;a.appendChild(e)}var d=BN(a),e=b.createElement("object");e.type="application/x-shockwave-flash";e.data=d;c(e,"movie",d);c(e,"allowscriptaccess","always");c(e,"wmode","opaque");e.style.visibility="hidden";e.style.opacity=0;return e}function BN(a,b){var c="//www.gstatic.com/osd/hbt.swf";"e"==a.o&&(c=he("//www.gstatic.com/osd/hbe.swf","id",a.xa));b&&(c=he(c,"delay","1"));return c}
oN.prototype.D=function(a,b){if(!this.module)return!1;this.module.style.position="absolute";rN(this,b);var c=!0;try{a.appendChild(this.module)}catch(d){c=!1}return c};oN.prototype.C=function(a,b){if(!this.module||!a.parentNode)return!1;this.module.style.position="fixed";rN(this,b);var c=!0;try{a.parentNode&&a.parentNode.insertBefore(this.module,a.nextSibling)}catch(d){c=!1}return c};function rN(a,b){a.module&&!Lb(b,$f(a.module))&&Yf(a.module,b)}
oN.prototype.remove=function(){if(this.module)try{ld(this.module)}catch(a){}this.module=null};oN.prototype.B=function(a){this.j=a?3:4};
function uN(a,b){if("e"==a.o){var c=null;try{c=a.module.it()}catch(d){}null===c?(c=0,0<a.j&&(c=2)):c=c?3:4;++a.F[c+1];a.j=c}else{var e=Number(b),g=null;try{g=a.module.fc()}catch(h){}DN(a,g,e);c=a.g[a.g.length-1];if(null===g){if(g=e=0,0<a.j||ha(c.Wi))g=e=2}else null===c.Wi||c.Ll>=e?(e=10<=g?4:0,g=0):g>c.Wi?(c=(g-c.Wi)/(e-c.Ll)*1E3,e=10<=c?4:3,c=0==c?1:1>c?3:4>c?4:23>c?6:26>c?8:9,6==a.A&&6==c&&(c=7),g=c):g=e=1;6==a.A&&(--a.k[6],4==g||8==g?++a.k[5]:++a.k[7]);++a.k[g];a.j=e;a.A=g}return a.j}
function DN(a,b,c){var d=c-1E3,e=a.g.length;C(a.g,function(a,b){a.Ll<=d&&(e=Math.min(e,b+1))});var g=a.g.length-e;0<g&&a.g.splice(e,g);a.g.unshift({Wi:b,Ll:c})}q("gteh",TM("osd_or_lidar::gteh_ex",function(a,b){var c=AN[a];ia(c)&&c(b)}),void 0);function EN(a,b){var c=a||HM;c.top!=c&&(c=c.top);try{return c.document&&!c.document.body?new F(-1,-1):b?new F(c.innerWidth,c.innerHeight):Yc(c||window)}catch(d){return new F(-12245933,-12245933)}}var FN=0;function GN(){var a=0<=HN?IN()-HN:-1,b=JN?IN()-KN:-1,c=0<=LN?IN()-LN:-1,d,e;d=[2E3,4E3];e=[250,500,1E3];var g=a;-1!=b&&b<a&&(g=b);for(var h,a=0;a<d.length;++a)if(g<d[a]){h=e[a];break}void 0===h&&(h=e[d.length]);return-1!=c&&1500<c&&4E3>c?500:h}var MN=(new Date).getTime(),HN=-1,JN=!1,KN=-1,LN=-1;
function IN(){return(new Date).getTime()-MN}function NN(a){var b=[];Ob(a,function(a,d){d in Object.prototype||"undefined"==typeof a||(fa(a)&&(a=a.join(",")),b.push([d,"=",a].join("")))});return b.join("&")};function ON(a,b,c,d,e,g,h,k,m){this.g=PN.clone();this.k=this.N=0;this.ib=this.rb=this.Fa=-1;this.Z=[0,0,0,0,0];this.B=[0,0,0,0,0];this.A=[0,0,0,0,0];this.ma=[0,0,0,0,0];this.J=d;this.M=this.W=-1;this.O=e;this.Ea=function(){};this.Eb=function(){};this.S=this.element=c;this.Kd=0;this.Jd=-1;this.U=m||PN;this.D="";this.Gd=null;this.Hd="";this.o={};this.o.le=0;this.o.nt=2;this.o.Fr=3;this.j=this.pa=null;this.ta=!1;this.C=this.Ta=this.Ka=null;this.ha=0;this.ea=!1;this.na=null;this.Fd=this.ya=this.wa=!1;
this.Id=void 0;this.jc=!1;this.ka=[];this.ia=void 0;this.jb=!1;this.G=void 0;this.Ia=0;this.V=-1;this.Aa=this.P=0;this.Ca=void 0;this.F=0;this.I=!1;this.eb=5==e?.02>Math.random():Boolean(c&&c._tos_);QN(this,a,g)}var PN=new Kf(0,0,0,0);
function RN(a,b,c,d,e){if(!(0>a.J)){var g=HM.innerWidth,h=HM.innerHeight,k=new Kf(Math.round(HM.mozInnerScreenY),Math.round(HM.mozInnerScreenX+g),Math.round(HM.mozInnerScreenY+h),Math.round(HM.mozInnerScreenX));c=new Kf(HM.screenY+d,HM.screenX+c.width,HM.screenY+c.height,HM.screenX);e||(d=new Kf(k.top-c.top,k.right-c.left,k.bottom-c.top,k.left-c.left),d.top>a.g.top?a.g=d:(a.g.right=a.g.left+g,a.g.bottom=a.g.top+h),a.N=g*h);SN(a,k,c,b,e,!0)}}
function TN(a,b,c){var d=UN(a,HM&&HM.document);if(d){c||QN(a,HM,!0);var e=Math.floor((a.g.left+a.g.right)/2),g=Math.floor((a.g.top+a.g.bottom)/2),h=$c(document),d=d(e-h.x,g-h.y)?.5:0;SN(a,a.g,d,b,c,!0)}}function UN(a,b){VN(a);if(!a.pa){var c=[];C(Vb(a.o),function(a){c[this.o[a]+1]=a},a);var d=c.join(""),d=b&&b[d];a.pa=d&&x(d,b)}return a.pa}function VN(a){a.o.e=-1;a.o.i=6;a.o.n=7;a.o.t=8}
ON.prototype.update=function(a,b,c,d,e){if(0>this.J)return null;c||QN(this,d,e);Boolean(null)&&c&&(d.clearInterval(this.Ka),this.Ka=null);Boolean(null)&&c&&(d.clearInterval(this.Ta),this.Ta=null);null!=this.na&&(c?(d.clearInterval(this.C),this.C=null,this.ea=!1):this.wa&&!this.C&&(this.C=d.setInterval(UM("osd_or_lidar::adblock::iem_int",x(this.xc,this,d,1E3)),1E3),this.xc(d)));return SN(this,this.g,b,a,c,!1)};
function SN(a,b,c,d,e,g){var h=d-a.J||1,k=null;ha(c)?b=WN(a,c):(k=c,b=WN(a,b,k));a.ia||XN(a,b,h,a.W,g,e,k);a.W=e?-1:b;a.J=d;-1!=b&&(0>a.Fa&&(a.Fa=d),a.ib=d);-1==a.rb&&1E3<=Math.max(a.A[2],a.B[2])&&(a.rb=d);a.Ea(a,k||PN);return a.k}
function WN(a,b,c){if(a.I&&7==a.O)return a.k=1,YN(a.k);var d=null;if(ha(b))a.k=b;else{c=new Kf(Math.max(b.top,c.top),Math.min(b.right,c.right),Math.min(b.bottom,c.bottom),Math.max(b.left,c.left));if(0>=a.N||c.top>=c.bottom||c.left>=c.right)return a.k=0,-1;var d=c.clone(),e=-b.left;b=-b.top;e instanceof Kb?(d.left+=e.x,d.right+=e.x,d.top+=e.y,d.bottom+=e.y):(d.left+=e,d.right+=e,ha(b)&&(d.top+=b,d.bottom+=b));d=(c.bottom-c.top)*(c.right-c.left);a.k=d/a.N}return YN(a.k)}
function YN(a){var b=-1;1<=a?b=0:.75<=a?b=1:.5<=a?b=2:.25<=a?b=3:0<a&&(b=4);return b}
function XN(a,b,c,d,e,g,h){e=e&&-1!=d&&2>=d;var k=-1==d||-1==b?-1:Math.max(d,b);d=e?k:d;-1!=d&&(a.Z[d]+=c);(h=h||null)?(-1!=d&&2>=d&&-1!=a.M&&(a.ma[a.M]+=c),h=100*a.N/((h.bottom-h.top)*(h.right-h.left)),a.M=20<=h?0:10<=h?1:5<=h?2:2.5<=h?3:4):a.M=-1;if(7==a.O){h=ZN(a);e=-1!=d&&2>=d;!e&&n(a.Ca)&&0<a.Ca&&(a.P+=c);a.P>a.Aa&&(a.Aa=a.P);if(e||!n(h)||0>=h)a.P=0;a.Ca=h}for(h=d;0<=h&&4>=h;h++)a.A[h]+=c,a.A[h]>a.B[h]&&(a.B[h]=a.A[h]);for(h=0;h<a.A.length;++h)if(h<b||g||-1==b)a.A[h]=0}
function $N(a,b,c){if(!Boolean(Boolean(a.S&&!!c&&!Ch)&&!Ch))return a.ta=!0,!1;var d=new kN;(c=mN(d,a.S,c))?(a.Eb=b,a.j=d):a.ta=!0;return c}
ON.prototype.xc=function(a,b){var c=UN(this,a&&a.document);if(c){QN(this,a,!0);var d=Math.floor((this.g.left+this.g.right)/2),e=Math.floor((this.g.top+this.g.bottom)/2),g=$c(document),c=Boolean(c(d-g.x,e-g.y)),d=b||0;c?(this.ha+=this.ea?d:0,this.ea=!0):(this.ha=0,this.ea=!1);1E3<=this.ha&&(a.clearInterval(this.C),this.C=null,this.wa=!1,this.na="v");QN(this,a,!1)}else a.clearInterval(this.C),this.C=null,this.wa=!1,this.na="i"};
function QN(a,b,c){b=c?b:b.top;try{var d=PN.clone(),e=new Kb(0,0);a.S&&(d=a.S.getBoundingClientRect(),e=fg(a.S,b));var g=d.right-d.left,h=d.bottom-d.top,k=e.x+a.U.left,m=e.y+a.U.top,p=a.U.right||g,r=a.U.bottom||h;a.g=new Kf(Math.round(m),Math.round(k+p),Math.round(m+r),Math.round(k))}catch(t){a.g=a.U}finally{a.o.Po=5,a.o.me=1,a.o.om=4}a.N=(a.g.bottom-a.g.top)*(a.g.right-a.g.left);a.Fd=2!=a.O&&3!=a.O&&6!=a.O||0!=a.N?!1:!0}function aO(a,b){var c=a.Ia;JN||a.ia||-1==a.V||(c+=b-a.V);return c}
function ZN(a){if("as"==a.G&&ia(a.element.sdkVolume))try{return Number(a.element.sdkVolume())}catch(b){return-1}if("h"==a.G&&(a=s("ima.common.sdkVolume"),ia(a)))try{return Number(a())}catch(c){return-1}}function bO(a,b){ub(a.ka,Gb(b-a.ka.length+1));a.ka[b]=(100*a.k|0)/100}
function cO(a){if(a.ya)return{"if":0};var b=a.g.clone();b.round();var c=D(a.ka,function(a){return 100*a|0}),b={"if":dO?1:void 0,sdk:a.G?a.G:void 0,p:[b.top,b.left,b.bottom,b.right],tos:a.Z,mtos:a.B,ps:void 0,pt:c,vht:aO(a,IN()),mut:a.Aa};eO&&(b.ps=[eO.width,eO.height]);a.jb&&(b.ven="1");a.F&&(b.vds=a.F);fO()?b.c=(100*a.k|0)/100:b.tth=IN()-FN;return b};function gO(){return!hO()&&(oc("iPod")||oc("iPhone")||oc("Android")||oc("IEMobile"))}function hO(){return oc("iPad")||oc("Android")&&!oc("Mobile")||oc("Silk")};var iO=null,jO=null,kO=null,lO=!1;function mO(){if(!lO){lO=!0;iO=iO||jN(HM,"scroll",nO,"osd_or_lidar::scroll");jO=jO||jN(HM,"resize",oO,"osd_or_lidar::resize");var a=pO,b;GM.mozVisibilityState?b="mozvisibilitychange":GM.webkitVisibilityState?b="webkitvisibilitychange":GM.visibilityState&&(b="visibilitychange");b&&(kO=kO||jN(GM,b,a,"osd_or_lidar::visibility"));pO()}}function oO(){qO(!1);nO()}function nO(){rO(sO,!1)}
function tO(){uO&&(vO=EN(HM,uO));var a=vO,b=wO,c=xO;if(yO){a=b;qO(!1);var d=zO,e=d.height-a;0>=e&&(e=d.height,a=0);vO=new F(d.width,e);e=new AO;e.B=!0;e.o=vO;e.k=d;e.j=a;return e}if(c)return a=new AO,a.A=!0,a;if(BO)return a=new AO,a.C=!0,a;if(CO)return a=new AO,a.F=!0,a;t:{b=new AO;b.o=a;b.g=!1;if(null!=a&&-1!=a.width&&-1!=a.height&&-12245933!=a.width&&-12245933!=a.height){try{var c=uO,g=HM||HM,g=g.top,e=a||EN(g,c),h=Id(Qc(g.document)),d=-1==e.width||-12245933==e.width?new Kf(e.width,e.width,e.width,
e.width):new Kf(h.y,h.x+e.width,h.y+e.height,h.x)}catch(k){a=b;break t}b.D=d;b.g=!0}a=b}return a}
function rO(a,b){if(!DO)if(window.clearTimeout(EO),EO=null,0==a.length)b||FO();else{var c=tO();try{var d=IN();if(c.B)for(var e=0;e<a.length;e++)RN(a[e],d,c.k,c.j,b);else if(c.A)for(e=0;e<a.length;e++)TN(a[e],d,b);else if(CO)C(a,function(){});else if(c.C)C(a,function(a){if(b){if(a.j){var c=a.j;3<=c.k&&(c.k=3);a.W=-1}}else if(a.j&&"d"!=a.j.getStatus()){var c=tN(a.j),d=[-1,-1,-1,-1,-1,4,2,0],e=d[c.snapshot+1];XN(a,e,c.g,d[c.j+1],!0,!1);a.W=e;a.Ea(a,PN);7==a.O?2E3<=Math.max(a.A[2],a.B[2])&&a.j&&sN(a.j):
1E3<=Math.max(a.A[2],a.B[2])&&!a.eb&&a.j&&sN(a.j);(c=2==c.snapshot||yN(a.j))||(c=a.j,c="f"==c.j&&c.o>=c.F);c&&(a.Eb(a),a.eb=!1,a.j&&sN(a.j))}});else if(c.g)for(e=0;e<a.length;e++)a[e].update(d,c.D,b,HM,dO);++GO}finally{b?C(a,function(a){a.k=0}):FO()}}}function pO(){var a=fO();if(a){if(!JN){var b=IN();KN=b;C(sO,function(a){a.Ia=aO(a,b)})}JN=!0;qO(!0)}else b=IN(),JN=!1,FN=b,C(sO,function(a){0<=a.J&&(a.V=b)});rO(sO,!a)}
function fO(){if(HO())return!0;var a;a=HM.document;a={visible:1,hidden:2,prerender:3,preview:4}[a.webkitVisibilityState||a.mozVisibilityState||a.visibilityState||""]||0;return 1==a||0==a}function FO(){HM&&(EO=HM.setTimeout(UM("osd_or_lidar::psamp_to",function(){rO(sO,!1)}),GN()))}function IO(a){return null!=E(sO,function(b){return b.element==a})}var sO=[],DO=!1,vO=null,zO=null,eO=null,EO=null,dO=!FM(HM.top),wO=0,yO=!1,xO=!1,BO=!1,CO=!1,uO=hO()||gO(),GO=0;
function JO(){var a=HM.document;return a.body&&a.body.getBoundingClientRect?!0:!1}
function qO(a){vO=EN(HM,uO);if(!a){zO=HM.outerWidth?new F(HM.outerWidth,HM.outerHeight):new F(-12245933,-12245933);a=HM;a.top!=a&&(a=a.top);var b=0,c=0,d=vO;try{var e=a.document,g=e.body,h=e.documentElement;if("CSS1Compat"==e.compatMode&&h.scrollHeight)b=h.scrollHeight!=d.height?h.scrollHeight:h.offsetHeight,c=h.scrollWidth!=d.width?h.scrollWidth:h.offsetWidth;else{var k=h.scrollHeight,m=h.scrollWidth,p=h.offsetHeight,r=h.offsetWidth;h.clientHeight!=p&&(k=g.scrollHeight,m=g.scrollWidth,p=g.offsetHeight,
r=g.offsetWidth);k>d.height?k>p?(b=k,c=m):(b=p,c=r):k<p?(b=k,c=m):(b=p,c=r)}eO=new F(c,b)}catch(t){eO=new F(-12245933,-12245933)}}}function KO(){var a=LO,b=!1;C(sO,function(c,d){if(.01>Math.random()){var e=$N(c,a,String(d));b=b||e}});(BO=b)&&C(sO,function(b){Boolean(b.j)||a(b)});return b}function MO(a){C(a,function(a){IO(a.element)||sO.push(a)})}function HO(){return gb(sO,function(a){return a.I})}function AO(){this.k=this.o=null;this.j=0;this.D=null;this.g=this.F=this.C=this.A=this.B=!1};function NO(a,b){return a.dataset?b in a.dataset?a.dataset[b]:null:a.getAttribute("data-"+String(b).replace(/([A-Z])/g,"-$1").toLowerCase())};var OO=null,PO="",QO=!1;function RO(){var a=OO||HM;if(!a)return"";var b=a.document,c=[];c.push("url="+LM(a.location.href.substring(0,512)));b&&b.referrer&&c.push("referrer="+LM(b.referrer.substring(0,512)));b=a.location&&a.location.ancestorOrigins;if(dO&&b&&1<b.length){for(var d=[],a=b.length,e=a-1;0<=e;--e)d.push(LM(b[e]));b=d.join(",");b=b.substring(0,512);c.push("anc="+b);c.push("adep="+a)}return c.join("&")};var SO=!1,TO=!1;function UO(){SO=!0;try{HN=IN(),OO=VM(),qO(!1),JO()?(window.setTimeout(function(){},1),dO?VO():mO()):QO=!0}catch(a){throw sO=[],a;}}
function VO(){var a;if(xc&&ha(HM.screenX)&&ha(HM.mozInnerScreenX)&&ha(HM.outerWidth)&&1>Math.random()){var b=HM.navigator.userAgent,c=b.indexOf("Firefox/");a=-1;if(0<=c){a=Math.floor(b.substr(c+8))||-1;var d=b.indexOf("Mac OS X 10."),c=-1;0<=d&&(c=Number(b.substr(d+12,1))||-1);var e=0<c?-1:b.indexOf("Windows NT "),d=-1;0<=e&&(d={"6.0":0,"6.1":1,"6.2":2}[b.substr(e+11,3)]||-1);b=148;5<=c?b=4<=a?108:3<=a?127:108:0<=d&&(16==a||17==a||18==a)&&(b=[[146,146,146],[148,147,148],[131,130,136]][d][a-16]);a=
b}else a=null;null!==a&&(wO=a,yO=!0);a=!0}else a=!1;a?mO():(a=wc&&Ic(8)&&1>Math.random()?xO=!0:!1,a?mO():KO()?(mO(),TO=!0):(window.clearTimeout(EO),EO=null,PO="i",DO=!0))}function LO(a){if(a){if(!a.jc){var b=[];b.push("v=239v");b.push("r=fp");b.push("efm="+(TO?1:0));b.push(ge(cO(a)));b.push(RO());b="&"+b.join("&");JM(("//pagead2.googlesyndication.com/pagead/gen_204?id=lidarvf"+b).substring(0,2E3));a.jc=!0}a.ya=!0}}
function WO(a,b,c){var d={};jc(d,{opt_videoAdElement:void 0,opt_VideoAdLength:void 0,opt_fullscreen:void 0},c||{});var e=a.toLowerCase();if(a=Zb(WM,function(a){return a==e})){a={e:XM[a],hd:DO?"1":"0",v:"239v",hdr:PO||void 0,a:void 0};if(QO)return a.msg="ue",NN(a);b=XO(b,d);if(!b)return a.msg="nf",NN(a);"i"==PO&&(b.ya=!0);SO||UO();c=d.opt_fullscreen;n(c)&&(b.I=Boolean(c));a.a=ZN(b);n(b.Ca)&&(a.la=b.Ca);c={};c.start=YO;c.firstquartile=ZO;c.midpoint=$O;c.thirdquartile=aP;c.complete=bP;c.metric=cP;c.pause=
dP;c.resume=eP;c.skip=fP;c.viewable_impression=cP;c.mute=gP;c.unmute=hP;c.fullscreen=iP;c.exitfullscreen=jP;if(c=c[e]){d=c(b,d);if(!n(d)||w(d))return d;jc(a,d);return NN(a)}}}function YO(a,b){"i"!=PO&&(DO=!1);!TO||Boolean(a.j)||a.ta||$N(a,LO,String(cb(sO,a)));kP(a,b);bO(a,0);return cO(a)}function ZO(a){bO(a,1);rO([a],!fO());return cO(a)}function $O(a){bO(a,2);rO([a],!fO());return cO(a)}function aP(a){bO(a,3);rO([a],!fO());return cO(a)}
function bP(a){bO(a,4);rO([a],!fO());var b=cO(a);a.I=!1;lP(a.D);return b}function dP(a){a.Ia=aO(a,IN());var b=!fO();rO([a],b);a.ia=!0;return cO(a)}function eP(a){var b=fO();a.ia&&!b&&(a.V=IN());rO([a],!b);a.ia=!1;return cO(a)}function cP(a){return cO(a)}function fP(a){var b=!fO();rO([a],b);b=cO(a);a.I=!1;lP(a.D);return b}function gP(a){rO([a],!fO());return cO(a)}function hP(a){rO([a],!fO());return cO(a)}function iP(a){a.I=!0;rO([a],!fO());return cO(a)}
function jP(a){a.I=!1;rO([a],!fO());return cO(a)}function kP(a,b){b&&b.opt_VideoAdLength&&(a.Id=b.opt_VideoAdLength);var c=IN();LN=c;a.Z=[0,0,0,0,0];a.B=[0,0,0,0,0];a.A=[0,0,0,0,0];a.ma=[0,0,0,0,0];a.J=-1;a.Fa=-1;a.ib=-1;a.Kd=0;a.Jd=-1;a.W=-1;a.M=-1;a.k=0;a.J=c;var d=!1;fO()||(d=!0,a.V=c);rO([a],d)}function lP(a){if(w(a)){var b=ib(sO,function(b){return b.D==a});0<=b&&qb(sO,b)}}
function XO(a,b){if(b.opt_videoAdElement)return mP(a,b.opt_videoAdElement);var c=nP(a);return c?c:c=E(sO,function(b){return b.D==a})}function mP(a,b){var c=E(sO,function(a){return a.element==b});c||(c=oP(b),c.D=a,c.G="h");return c}function nP(a){var b=E(sO,function(b){return b.element?pP(b.element)==a:!1});if(b)return b;b=qP();b=E(b,function(b){return pP(b)==a});if(!b)return null;b=oP(b);b.G="as";rP(b);return b}function rP(a){var b=pP(a.element);w(b)&&(a.D=b)}
function qP(){var a=HM.document,b=Hb(D(["embed","object"],function(b){return tb(a.getElementsByTagName(b))}));return b=eb(b,function(a){if(!a||!ja(a)||1!=a.nodeType)return!1;var b=a.getBoundingClientRect();return 0!=b.width&&0!=b.height&&a.metricID&&ia(a.metricID)?!0:!1})}function pP(a){if(!a||!a.metricID||!ia(a.metricID))return null;var b;try{b=a.metricID()}catch(c){return null}return b.queryID}
function oP(a){var b=IN();NO(a,"admeta")||NO(a,"admetaDfp");var c=NO(a,"ord")||"",d;t:if(c){d=HM.document.getElementsByTagName("script");for(var c=new RegExp(".doubleclick.net/(N.+/)?(pf)?(ad[ijx])/.*;ord="+Na(c)),e=0;e<d.length;e++){var g=d[e];if(g&&g.src&&c.test(g.src)){d=g.src;break t}}d=HM!=HM.top&&c.test(HM.location.href)?HM.location.href:""}else d="";a=new ON(HM,0,a,b,7,dO);b=d.match(/.doubleclick.net\/(N.+\/)?(pf)?(ad[ijx])\//);a.Gd=b?{adi:"adi",adj:"adj",adx:"adx"}[b[3]]:"";if(d){t:{if(d&&
(b=d.match(/\/\/.*(;u=xb[^;\?]*)/i))&&(b=b[b.length-1].split("="))&&2==b.length){b=b[1];break t}b=null}a.Hd=b}a.Ea=sP;MO([a]);mO();return a}function sP(a){if(2E3<=Math.max(a.A[2],a.B[2])&&!a.jb){var b="as"==a.G,c="h"==a.G,d=s("ima.common.triggerViewEvent"),e=cO(a);e.e=9;try{var g=NN(e);c?ia(d)?(d(a.D,g),a.jb=!0):a.F=4:b?a.element&&a.element.triggerViewEvent?(a.element.triggerViewEvent(g),a.jb=!0):a.F=1:a.F=5}catch(h){a.F=a.F||2}}else a.F=3}
q("Goog_AdSense_Lidar_startMetricMeasurement",TM("lidar::startmm_ex",function(a,b){var c=b||{};if(!w(a)){var d=XO(a,c);d&&kP(d,c)}}),void 0);q("Goog_AdSense_Lidar_stopMetricMeasurement",TM("lidar::stopmm_ex",lP),void 0);q("Goog_AdSense_Lidar_getMetric",TM("lidar::getmetric_ex",function(a){var b=E(sO,function(b){return b.D===a});if(!b)return"-1";var c={xsj:b.Z,mkdj:b.B};fO()?c.c7=(100*b.k|0)/100:c.ftr=IN()-FN;return Df(c)}),void 0);
q("Goog_AdSense_Lidar_sendVastMessage",TM("lidar::handlevast_ex",WO),void 0);function tP(){U.call(this);this.g=null;this.A=new Kn(this);S(this,this.A);this.C=new Od;this.o=null;this.k=!1}z(tP,U);var uP=null;function vP(){null!=uP||(uP=new tP);return uP}tP.prototype.j=null;tP.prototype.destroy=function(){this.A.Ga(this.g,"activityMonitor",this.B);this.k=!1};tP.prototype.init=function(a){this.k||((this.g=a||null)&&this.A.listen(this.g,"activityMonitor",this.B),this.k=!0)};
function wP(a){if(null==a)return!1;if(tM()&&null!=a.webkitDisplayingFullscreen)return a.webkitDisplayingFullscreen;var b=window.screen.availWidth||window.screen.width,c=window.screen.availHeight||window.screen.height;a=xP(a);return 0>=b-a.width&&42>=c-a.height}function xP(a){return ia(a.getBoundingClientRect)?a.getBoundingClientRect():{left:a.offsetLeft,top:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}
function yP(a,b,c,d,e,g){if(a.k){var h={};if(d=d?a.C.get(d):$.o)h.opt_videoAdElement=d,h.opt_fullscreen=wP(d);e&&(h.opt_fullscreen=e);g?h.opt_offset=g:a.o&&(h.opt_offset=xP(a.o));return WO(b,c,h)||""}return""}
tP.prototype.B=function(a){var b=a.sd,c=b.queryId,d={};d.timeoutId=b.timeoutId;switch(a.tc){case "getViewability":d.viewabilityString=yP(this,"metric",c)||"";this.g.send("activityMonitor","viewability",d);break;case "reportVastEvent":d.viewabilityString=yP(this,b.vastEvent,c,b.osdId,b.isFullscreen,b.isOverlay?{left:b.left,top:b.top,width:b.width,height:b.height}:void 0),this.g.send("activityMonitor","viewability",d)}};
q("ima.common.sdkVolume",function(){var a=-1;null!=vP().j&&(a=vP().j());return a},void 0);q("ima.common.triggerViewEvent",function(a,b){var c={};c.queryId=a;c.viewabilityString=b;var d;(d=vP().g)?d.send("activityMonitor","viewableImpression",c):vP().T(new MK("viewable_impression",null,c))},void 0);function zP(a,b,c){if(mb(a))return null;a=eb(a,function(a){var b=a.k;return"application/x-mpegurl"==B(a.g).toLowerCase()||"progressive"==b});mb(c)||(c=D(c,function(a){return a.toLowerCase()}),a=eb(a,function(a){return lb(c,B(a.g).toLowerCase())}));if(!ha(b)||0>=b)b=gO()?500:1E3;return AP(a,b)}function AP(a,b){return BP(a,b)||CP(a,b)||DP(a,b)}function BP(a,b){var c=null;C(a,function(a){var e=a.Oe,g=a.Yd;e>b||g<b||!(null==c||c.Oe>e)||(c=a)});return c}
function CP(a,b){var c=null;C(a,function(a){var e=a.Oe,g=a.Yd;g>b||(null==c||c.Yd<g?c=a:null!=c&&c.Yd==g&&c.Oe>e&&(c=a))});return c}function DP(a,b){var c=null;C(a,function(a){var e=a.Oe,g=a.Yd;if(!(e<b))if(null!=c&&c.Oe==e&&c.Yd<g)c=a;else if(null==c||c.Oe>e)c=a});return c};function EP(){U.call(this);this.o=this.C=this.B=!1;this.g=0;this.j=[];this.D=!1;this.A={}}z(EP,U);function FP(a,b){null==b||a.B||(a.k=b,GP(a),a.B=!0)}function HP(a){null!=a.k&&a.B&&(IP(a),a.B=!1,a.C=!1,a.o=!1,a.g=0,a.j=[],a.D=!1)}function GP(a){IP(a);a.A=a.k instanceof U||!uM()?{click:x(a.uE,a)}:{touchstart:x(a.xE,a),touchmove:x(a.wE,a),touchend:x(a.vE,a)};Ob(a.A,function(a,c){this.k.addEventListener(c,a,!1)},a)}function IP(a){Ob(a.A,function(a,c){this.k.removeEventListener(c,a,!1)},a);a.A={}}f=EP.prototype;
f.xE=function(a){this.C=!0;this.g=a.touches.length;this.D=JP(this,a.touches)||1!=a.touches.length;KP(this,a.touches)};f.wE=function(a){this.o=!0;this.g=a.touches.length};f.vE=function(a){this.C&&1==this.g&&!this.o&&!this.D&&JP(this,a.changedTouches)&&this.T(new vm("click"));this.g=a.touches.length;0==this.g&&(this.o=this.C=!1,this.j=[])};f.uE=function(){this.T(new vm("click"))};function KP(a,b){a.j=[];C(b,function(a){ob(this.j,a.identifier)},a)}
function JP(a,b){return gb(b,function(a){return lb(this.j,a.identifier)},a)}f.K=function(){HP(this);EP.H.K.call(this)};function LP(a,b,c,d,e,g,h,k,m){this.k=a;this.g=b;isNaN(c)&&isNaN(d)&&isNaN(e)?e=d=0:isNaN(d)&&!isNaN(e)?d=e:!isNaN(d)&&isNaN(e)?e=d:!isNaN(c)&&isNaN(d)&&isNaN(e)&&(d=e=c);this.Oe=d;this.Yd=e;this.A=h;this.j=k;this.o=m}LP.prototype.getHeight=function(){return this.A};function MP(){U.call(this)}z(MP,U);var NP={AH:"beginFullscreen",CLICK:"click",VH:"end",XH:"endFullscreen",ERROR:"error",QI:"mediaLoadTimeout",PAUSE:"pause",PLAY:"play",MJ:"skip",JG:"skipShown",ru:"start",aK:"timeUpdate",CK:"volumeChange"};MP.prototype.fr=u;function OP(a){U.call(this);this.g=a;this.N=new bn(4);this.o=0;this.J=this.k=this.D=!1;this.G=this.zg();this.F=this.qe();this.O=15E3;this.I=!1}z(OP,MP);f=OP.prototype;
f.Rq=function(a,b,c){a=eb(a,function(a){var b=a.g;A(B(a.j))||"progressive"!=a.k&&"application/x-mpegurl"!=B(b).toLowerCase()?a=!1:(b=B(b).toLowerCase(),a=A(b)||rc&&vM(rM,2.3)&&Ia(b,"application/ogg")?!1:rc&&(Ia(b,"video/mp4")||Ia(b,"video/3gpp"))||uM()&&(Ia(b,"application/x-mpegurl")||Ia(b,"application/vnd.apple.mpegurl"))?!0:!A(this.g.canPlayType(b)));return a},this);return zP(a,b,c)};f.Vr=function(){return eb(Ub(ZK),function(a){return!A(this.g.canPlayType(a))},this)};
f.Gk=function(a){this.O=0<a.vb?a.vb:15E3};f.load=function(a){PP(this);this.g.src=a;this.g.load()};f.getVideoUrl=function(){return this.g.src};f.setVolume=function(a){this.g.volume=a};f.md=function(){return this.g.volume};f.play=function(){this.I=!1;Fn(this.g.play,0,this.g);this.M=Fn(this.HD,this.O,this)};f.pause=function(){this.I=!0;this.g.pause()};f.Og=function(){return this.g.paused?uM()||Bh?this.g.currentTime<this.g.duration:!0:!1};f.Rg=function(){return this.g.muted};
f.jn=function(){tM()&&this.g.webkitDisplayingFullscreen&&this.g.webkitExitFullscreen()};f.qe=function(){return wP(this.g)};f.sh=function(a){var b;t:{for(b=this.N.Wa();b.length;){var c=b.pop();if(0<c){b=c;break t}}b=-1}return b>=a};f.Kf=function(a){this.g.currentTime=a};f.getCurrentTime=function(){return this.g.currentTime};f.bs=function(){return QP(this)};f.nd=function(){return isNaN(this.g.duration)?-1:this.g.duration};f.Ce=function(){return this.g.ended};
f.zg=function(){return new F(this.g.offsetWidth,this.g.offsetHeight)};f.Br=function(){return this.g.seeking};f.K=function(){this.Gf();this.g=null;OP.H.K.call(this)};f.Ys=function(){return this.g.error};
f.oi=function(){this.Gf();this.j=new Kn(this);this.j.listen(this.g,"canplay",this.yB);this.j.listen(this.g,"ended",this.uB);this.j.listen(this.g,"webkitbeginfullscreen",this.Sl);this.j.listen(this.g,"webkitendfullscreen",this.ar);this.j.listen(this.g,"pause",this.wB);this.j.listen(this.g,"playing",this.zB);this.j.listen(this.g,"timeupdate",this.AB);this.j.listen(this.g,"volumechange",this.xB);this.j.listen(this.g,"error",this.yp);this.B=new EP;this.j.listen(this.B,"click",this.tB);FP(this.B,this.g);
this.C=new Dn(1E3);this.j.listen(this.C,"tick",this.vB);this.C.start()};f.Gf=function(){null!=this.B&&(HP(this.B),this.B=null);null!=this.C&&this.C.dispose();null!=this.j&&(this.j.dispose(),this.j=null);PP(this)};function PP(a){a.k=!1;a.D=!1;a.o=0;a.J=!1;a.N.clear();Gn(a.M);Zh(a.A)}function RP(a){a.k||(a.k=!0,Gn(a.M),a.T("start"),zM()||!rc||rc&&vM(rM,3)||tM()&&(!uM()||!vM(qM,4))||a.Sl())}
f.yB=function(){var a;if(a=Ch)a=lc,a=!(a&&(Ma(a,"SMART-TV")||Ma(a,"SmartTV")));a&&!this.J&&(this.Kf(.001),this.J=!0)};f.zB=function(){this.T("play");uM()||Ah||RP(this)};f.AB=function(){if(!this.k&&(uM()||Ah)){if(0>=this.getCurrentTime())return;if(Ah&&this.Ce()&&1==this.nd()){this.yp();return}RP(this)}if(uM()){if(1.5<this.getCurrentTime()-this.o){this.D=!0;this.Kf(this.o);return}this.D=!1;this.getCurrentTime()>this.o&&(this.o=this.getCurrentTime())}this.N.add(this.g.currentTime);this.T("timeUpdate")};
f.xB=function(){this.T("volumeChange")};f.wB=function(){var a;this.k&&uM()&&!this.I&&2>QP(this)-this.g.currentTime?(this.A=new Dn(250),this.j.listen(this.A,"tick",this.Kz),this.A.start(),a=!0):a=!1;a||this.T("pause")};f.uB=function(){var a=!0;uM()&&(a=this.o>=this.g.duration-1.5);!this.D&&a&&this.T("end")};f.Sl=function(){this.T("beginFullscreen")};f.ar=function(){this.T("endFullscreen")};f.yp=function(){Gn(this.M);this.T("error")};f.tB=function(){this.T("click")};
f.vB=function(){var a=this.zg(),b=this.qe();if(a.width!=this.G.width||a.height!=this.G.height)!this.F&&b?this.Sl():this.F&&!b&&this.ar(),this.G=a,this.F=b};f.HD=function(){if(!this.k){try{BM(AM.getInstance(),16)}catch(a){}PP(this);this.T("mediaLoadTimeout")}};f.Kz=function(){if(this.Ce()||!this.Og())Zh(this.A);else{var a=this.g.duration-this.g.currentTime,b=QP(this)-this.g.currentTime;0<b&&(2<=b||2>a)&&(Zh(this.A),this.play())}};
function QP(a){for(var b=a.g.buffered.length-1;0<=b;){if(a.g.buffered.start(b)<=a.g.currentTime)return a.g.buffered.end(b);b--}return 0};function SP(a,b){if(null==a||!rd(Sc(a),a))throw YL(vL,null,"containerElement","element");this.A=a;this.j=this.g=null;this.o=b;this.k=null;this.g=H("div",{style:"display:none;"});var c=H("video",{style:"background-color:#000;position:absolute;width:100%;height:100%;"});c.setAttribute("webkit-playsinline",!0);this.j=c;this.k=H("div",{style:"position:absolute;width:100%;height:100%;"});this.A.appendChild(this.g);this.g.appendChild(this.j);this.o&&(c=H("div",{id:this.o,style:"display:none;background-color:#000;position:absolute;width:100%;height:100%;"}),
this.g.appendChild(c));this.g.appendChild(this.k)}z(SP,Q);SP.prototype.initialize=function(){sM()&&this.j.load()};SP.prototype.dispose=function(){ld(this.g)};SP.prototype.show=function(){var a=this.g;null!=a&&(a.style.display="block")};SP.prototype.hide=function(){var a=this.g;null!=a&&(a.style.display="none")};function TP(a){null!=a?eL(aL,a)?(a=a.match(/yt_vid\/([a-zA-Z0-9_-]{11})/),a=null!=a&&1<a.length?a[1]:null):a=null!=a&&eL(bL,a)?UP(a):null:a=null;return a}function VP(a,b,c){if(null==a)return null;c=new J((null!=c?c:"//www.youtube.com/")+"watch");var d=c.g;d.set("v",a);d.set("feature",b?"trueview-instream":"instream");re(c,d);return c.toString()}
function UP(a){if(A(B(a)))return null;var b=a.match(/^https?:\/\/[^\/]*youtu\.be\/([a-zA-Z0-9_-]+)$/);if(null!=b&&2==b.length)return b[1];b=a.match(/^https?:\/\/[^\/]*youtube.com\/video\/([a-zA-Z0-9_-]+)$/);if(null!=b&&2==b.length)return b[1];b=a.match(/^https?:\/\/[^\/]*youtube.com\/watch\/([a-zA-Z0-9_-]+)$/);if(null!=b&&2==b.length)return b[1];a=Ce(new J(a));return Me(a,"v")?a.get("v").toString():Me(a,"video_id")?a.get("video_id").toString():null};function WP(a){U.call(this);this.F="ima-chromeless-video";var b=null;null!=a&&(w(a)?this.F=a:b=a);this.G=new Kn(this);this.o=null;this.j=!1;this.S=this.zg();this.P=this.qe();this.B=-1;this.N=!1;this.A=-1;this.g=this.J=this.C=null;this.O="";this.ub=!1;this.V=null!=b;this.D=this.M=this.Y=null;this.k=void 0;this.U=null;null!=b?(this.ub=!0,this.Y=b,this.k=2):(a=x(this.Ev,this),XP?a():(YP.push(a),a=fd("script"),a.src="https://www.youtube.com/iframe_api",b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(a,
b)))}z(WP,MP);var ZP=["video/mp4","video/webm"],$P={el:"adunit",controls:0,html5:1,playsinline:1,showinfo:0},YP=[],XP=!1;f=WP.prototype;f.Rq=function(a,b,c){var d=E(a,function(a){return null!==TP(a.j)});return null!==d||!mb(c)&&(c=eb(c,function(a){return lb(ZP,a)}),d=zP(a,b,c),null!==d)?d:E(a,function(a){a=a.g;return this.ub?this.Y.canPlayType(a):lb(ZP,a)})};f.Gk=function(a){this.g=a};f.load=function(a,b){null!==a&&(this.O=a,this.ub?aQ(this,a,b):(this.C=a,this.J=b))};f.getVideoUrl=function(){return this.O};
f.setVolume=function(a){this.V?this.T("volumeChange"):this.ub?(a=Ib(100*a,0,100),this.Y.setVolume(a),this.A=-1,this.T("volumeChange")):this.A=a};f.md=function(){return this.ub?this.Y.getVolume()/100:this.A};
f.play=function(){if(!A(B(this.O))){if(!this.j){bQ(this);var a=15E3;null!=this.g&&0<this.g.vb&&(a=this.g.vb);this.Z=Fn(this.$z,a,this)}this.ub?(this.N=!1,cQ(this),this.o=new Dn(100),this.G.listen(this.o,"tick",this.Xq),this.o.start(),!this.j&&this.g&&this.g.g?this.Y.loadVideoByPlayerVars(this.U):this.Y.playVideo()):this.N=!0}};f.pause=function(){this.ub&&this.j&&(cQ(this),this.Y.pauseVideo())};f.Og=function(){return this.ub?2==this.Y.getPlayerState(this.k):!1};
f.Rg=function(){return this.ub?this.Y.isMuted():0==this.md()};f.jn=function(){};f.qe=function(){var a=$.j?$.o:document.getElementById(this.F);return a?wP(a):!1};f.sh=function(a){return this.ub?this.Y.getCurrentTime(this.k)>=a:!1};f.Kf=function(a){this.ub?this.Y.seekTo(a,!1):this.B=a};f.getCurrentTime=function(){return this.ub?this.Y.getCurrentTime(this.k):-1};f.bs=function(){return this.ub&&this.j?this.Y.getVideoLoadedFraction(this.k)*this.Y.getDuration(this.k):0};
f.nd=function(){return this.ub&&this.j?this.Y.getDuration(this.k):-1};f.Ys=function(){return null};f.Vr=function(){return Ub(ZK)};f.Ce=function(){return this.ub?0==this.Y.getPlayerState(this.k):!1};f.zg=function(){var a=$.j?$.o:document.getElementById(this.F);return a?new F(a.offsetWidth,a.offsetHeight):new F(0,0)};f.Br=function(){return!1};
f.NE=function(){var a=this.zg(),b=this.qe();if(a.width!=this.S.width||a.height!=this.S.height)!this.P&&b?this.T("beginFullscreen"):this.P&&!b&&this.T("endFullscreen"),this.S=a,this.P=b};f.oi=function(){this.M=x(this.Nt,this);this.D=x(this.En,this);this.V&&(this.Y.addEventListener("onAdStateChange",this.D),this.Y.addEventListener("onReady",this.M),this.Y.addEventListener("onStateChange",this.D));this.I=new Dn(1E3);this.G.listen(this.I,"tick",this.NE);this.I.start()};
f.Gf=function(){this.V&&(this.Y.removeEventListener("onAdStateChange",this.D),this.Y.removeEventListener("onReady",this.M),this.Y.removeEventListener("onStateChange",this.D));null!=this.I&&this.I.dispose()};f.Ev=function(){var a=this.F,b={playerVars:fc($P),events:{onError:x(this.hF,this),onReady:x(this.Nt,this),onAdStateChange:x(this.En,this),onStateChange:x(this.En,this)}},c=s("YT");this.Y=null!=c&&null!=c.Player?new c.Player(a,b):null};
function aQ(a,b,c){var d={};if(null!=a.g){var e=a.g.j;null!=e&&(d.agcid=e);e=a.g.A;null!=e&&(d.adformat=e);(e=a.g.k)&&(d.cta_conversion_urls=e);d.iv_load_policy=a.g.B?1:3;a.g.o&&(d.noiba=1);a.g.C&&(d.utpsa=1)}e=TP(b);null===e?d.url_encoded_third_party_media="url="+encodeURIComponent(b)+"&type="+encodeURIComponent(null===c?"":c):d.videoId=e;a.j=!1;a.g&&a.g.g?(a.U=d,a.Y.preloadVideoByPlayerVars(a.U)):a.Y.cueVideoByPlayerVars(d)}f.hF=function(){this.T("error")};
f.Nt=function(){this.ub=!0;-1!=this.A&&(this.setVolume(this.A),this.A=-1);null!=this.C&&(aQ(this,this.C,this.J),this.J=this.C=null);-1!=this.B&&(this.Kf(this.B),this.B=-1);this.N&&this.play()};f.En=function(a){switch(a.data){case 0:this.j?this.T("end"):this.T("error");break;case 1:this.j||(bQ(this),this.j=!0,this.T("start"));this.T("play");break;case 2:this.T("pause")}};function cQ(a){a.G.Ga(a.o,"tick",a.Xq);null!=a.o&&(a.o.stop(),a.o=null)}function bQ(a){null!=a.Z&&Gn(a.Z)}f.Xq=function(){this.T("timeUpdate")};
f.$z=function(){this.T("mediaLoadTimeout")};f.fr=function(a,b){this.ub&&this.Y.addInfoCardXml(a,b)};f.K=function(){cQ(this);bQ(this);this.Gf();this.ub=!1;this.G.dispose();this.B=-1;this.J=null;this.N=!1;this.C=null;this.A=-1;this.M=this.Y=this.g=null;this.j=!1;this.O="";WP.H.K.call(this)};q("onYouTubeIframeAPIReady",function(){XP=!0;C(YP,function(a){a()});nb(YP)},window);function dQ(a){U.call(this);this.g=a||Va();this.j=[]}z(dQ,U);dQ.prototype.k=!1;dQ.prototype.connect=function(){for(this.k=!0;!mb(this.j);){var a=this.j.shift();this.sendMessage(a.name,a.type,a.data)}};dQ.prototype.send=function(a,b,c){this.k?this.sendMessage(a,b,c):this.j.push({name:a,type:b,data:c})};function eQ(a,b,c,d,e){vm.call(this,a);this.tc=b;this.sd=c;this.Hq=d;this.o=e}z(eQ,vm);eQ.prototype.getOrigin=function(){return this.o};eQ.prototype.toString=function(){return""};function fQ(a,b){dQ.call(this,b);this.o=a;this.Ec=null;this.A=new Kn(this);this.logger=null;this.A.listen(bd(),"message",this.receive)}z(fQ,dQ);function gQ(a){if(null==a||!w(a)||0!=a.lastIndexOf("ima://",0))return null;a=a.substr(6);try{return Bf(a)}catch(b){return null}}fQ.prototype.sendMessage=function(a,b,c){null!=this.Ec&&null!=this.Ec.postMessage&&this.Ec.postMessage(hQ(this,a,b,c),"*");null!=this.Ec&&null==this.Ec.postMessage&&BM(AM.getInstance(),11)};
fQ.prototype.K=function(){this.A.dispose();fQ.H.K.call(this)};fQ.prototype.receive=function(a){a=a.g;var b=gQ(a.data);if(null!=b){if(null==this.Ec)this.Ec=a.source;else if(this.Ec!=a.source)return;var c=b.channel;null!=c&&c==this.o&&(c=b.sid,null!=c&&("*"!=this.g&&c!=this.g||this.T(new eQ(b.name,b.type,b.data||{},b.sid,a.origin))))}};function hQ(a,b,c,d){var e={};e.name=b;e.type=c;null!=d&&(e.data=d);e.sid=a.g;e.channel=a.o;return"ima://"+Df(e)};function iQ(a,b){U.call(this);this.o=a;this.k=b;this.g={};this.j=new Kn(this);this.j.listen(bd(),"message",this.A)}z(iQ,U);iQ.prototype.send=function(a){var b=a.getChannelId();this.g.hasOwnProperty(b)?this.g[b].send(a.type,a.tc,a.sd):a.getChannelId()};function jQ(a,b,c,d){a.g.hasOwnProperty(b)||(c=new fQ(b,c),a.j.listen(c,a.o,function(a){a=new kQ(a.type,a.tc,a.sd,a.Hq,a.getOrigin(),b);this.T(a)}),c.Ec=d,c.connect(),a.g[b]=c)}
iQ.prototype.K=function(){this.j.dispose();for(var a in this.g)Zh(this.g[a]);iQ.H.K.call(this)};iQ.prototype.A=function(a){a=a.g;var b=gQ(a.data);if(null!=b){var c=b.channel;if(this.k&&!this.g.hasOwnProperty(c)){var d=b.sid;jQ(this,c,d,a.source);this.T(new kQ(b.name,b.type,b.data||{},d,a.origin,c))}}};function kQ(a,b,c,d,e,g){eQ.call(this,a,b,c,d,e);this.k=g}z(kQ,eQ);kQ.prototype.getChannelId=function(){return this.k};function lQ(){var a=s("google.ima.gptProxyInstance",bd());if(null!=a)return a;Kn.call(this);this.k=new iQ("gpt",!0);S(this,this.k);this.listen(this.k,"gpt",this.B);this.g=null;mQ()||bd().top===bd()||(this.g=new iQ("gpt",!1),S(this,this.g),this.listen(this.g,"gpt",this.A))}z(lQ,Kn);function mQ(){return!!s("googletag.cmd",bd())}function nQ(){var a=s("googletag.console",bd());return null!=a?a:null}
lQ.prototype.B=function(a){var b=a.getOrigin(),c=Zd("//imasdk.googleapis.com"),b=Zd(b);if(c[3]==b[3]&&c[4]==b[4])if(null!=this.g)jQ(this.g,a.getChannelId(),a.Hq,bd().parent),null!=this.g&&this.g.send(a);else if(c=a.sd,null!=c&&n(c.scope)){var b=c.scope,c=c.args,d;if("proxy"==b)c=a.tc,"isGptPresent"==c?d=mQ():"isConsolePresent"==c&&(d=null!=nQ());else if(mQ())if("pubads"==b||"companionAds"==b){d=a.tc;var e,g=bd().googletag;if(null!=g&&null!=g[b]&&(g=g[b](),null!=g&&(d=g[d],null!=d)))try{e=d.apply(g,
c)}catch(h){}d=e}else if("console"==b){if(g=a.tc,e=nQ(),null!=e&&(g=e[g],null!=g))try{g.apply(e,c)}catch(k){}}else if(null===b){e=a.tc;d=bd();if(lb(["googleGetCompanionAdSlots","googleSetCompanionAdContents"],e)&&(e=d[e],null!=e))try{g=e.apply(d,c)}catch(m){}d=g}n(d)&&(a.sd.returnValue=d,this.k.send(a))}};lQ.prototype.A=function(a){this.k.send(a)};function oQ(a,b,c,d,e,g,h,k){this.A=a;this.j=b;this.k=c;this.o=h;this.B=d;this.C=e;this.vb=g;this.g=k};function pQ(a,b){var c=Array.prototype.slice.call(arguments),d=c.shift();if("undefined"==typeof d)throw Error("[goog.string.format] Template required");return d.replace(/%([0\-\ \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g,function(a,b,d,k,m,p,r,t){if("%"==p)return"%";var v=c.shift();if("undefined"==typeof v)throw Error("[goog.string.format] Not enough arguments");arguments[0]=v;return qQ[p].apply(null,arguments)})}
var qQ={s:function(a,b,c){return isNaN(c)||""==c||a.length>=c?a:a=-1<b.indexOf("-",0)?a+Oa(" ",c-a.length):Oa(" ",c-a.length)+a},f:function(a,b,c,d,e){d=a.toString();isNaN(e)||""==e||(d=a.toFixed(e));var g;g=0>a?"-":0<=b.indexOf("+")?"+":0<=b.indexOf(" ")?" ":"";0<=a&&(d=g+d);if(isNaN(c)||d.length>=c)return d;d=isNaN(e)?Math.abs(a).toString():Math.abs(a).toFixed(e);a=c-d.length-g.length;return d=0<=b.indexOf("-",0)?g+d+Oa(" ",a):g+Oa(0<=b.indexOf("0",0)?"0":" ",a)+d},d:function(a,b,c,d,e,g,h,k){return qQ.f(parseInt(a,
10),b,c,d,0,g,h,k)}};qQ.i=qQ.d;qQ.u=qQ.d;function rQ(a,b){U.call(this);this.o=new Kn(this);this.D=!1;this.F=Va();this.B=new Od;var c=this.F,c=H("iframe",{src:("https:"==document.location.protocol?"https:":"http:")+pQ("//imasdk.googleapis.com/js/core/bridge0.0.0_%s.html","en")+"#"+c,style:"border:0; opacity:0; margin:0; padding:0; position:relative;"});On(this.o,c,"load",this.Pw);a.appendChild(c);this.j=c;c=this.B.get("*");null==c&&(c=new fQ(this.F,"*"),this.D&&(c.Ec=sd(this.j),c.connect()),this.B.set("*",c));this.A=c;this.C=b;this.g=this.C.k;
this.k=null;this.o.listen(this.A,"mouse",this.Rw);this.o.listen(this.A,"touch",this.Tw);null!=this.g&&(this.o.listen(this.A,"displayContainer",this.Qw),this.o.listen(this.A,"videoDisplay",this.Sw),this.o.listen(this.g,Ub(NP),this.Uw));var c=bd(),d=s("google.ima.gptProxyInstance",c);null==d&&(d=new lQ,q("google.ima.gptProxyInstance",d,c))}z(rQ,U);f=rQ.prototype;
f.K=function(){this.o.dispose();null!==this.k&&(this.k.dispose(),this.k=null);Md(this.B.$b(!1),function(a){a.dispose()});this.B.clear();ld(this.j);rQ.H.K.call(this)};f.Rw=function(a){var b=a.sd,c=dg(this.j),d=document.createEvent("MouseEvent");d.initMouseEvent(a.tc,!0,!0,window,b.detail,b.screenX,b.screenY,b.clientX+c.x,b.clientY+c.y,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,null);if(!Ch||uM()||0==document.webkitIsFullScreen)this.j.blur(),window.focus();this.j.dispatchEvent(d)};
function sQ(a,b){var c=dg(a.j),d=D(b,function(a){return document.createTouch(window,this.j,a.identifier,a.pageX+c.x,a.pageY+c.y,a.screenX,a.screenY)},a);return document.createTouchList.apply(document,d)}
f.Tw=function(a){var b=a.sd,c=dg(this.j),d=document.createEvent("TouchEvent");d.initTouchEvent(a.tc,!0,!0,window,b.detail,b.screenX,b.screenY,b.clientX+c.x,b.clientY+c.y,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,sQ(this,b.touches),sQ(this,b.targetTouches),sQ(this,b.changedTouches),b.scale,b.rotation);this.j.dispatchEvent(d)};
f.Sw=function(a){if(null!=this.g){var b=a.sd;switch(a.tc){case "startTracking":this.g.oi();break;case "stopTracking":this.g.Gf();break;case "exitFullscreen":this.g.jn();break;case "play":this.g.play();break;case "pause":this.g.pause();break;case "load":this.g.load(b.videoUrl,b.mimeType);break;case "setCurrentTime":this.g.Kf(b.currentTime);break;case "setPlaybackOptions":a=b.playbackOptions,this.g.Gk(new oQ(a.adFormat,a.adSenseAgcid,a.ctaAnnotationTrackingEvents,a.showAnnotations,a.viewCountsDisabled,
a.loadVideoTimeout,a.ibaDisabled,a.enablePreloading))}}};
f.Uw=function(a){var b={};switch(a.type){case "beginFullscreen":a="fullscreen";break;case "endFullscreen":a="exitFullscreen";break;case "click":a="click";break;case "end":a="end";break;case "error":a="error";break;case "mediaLoadTimeout":a="mediaLoadTimeout";break;case "pause":a="pause";b.ended=this.g.Ce();break;case "play":a="play";break;case "skip":a="skip";break;case "start":a="start";break;case "timeUpdate":a="timeupdate";b.currentTime=this.g.getCurrentTime();b.duration=this.g.nd();break;case "volumeChange":a=
"volumeChange";b.volume=this.g.md();break;default:return}this.A.send("videoDisplay",a,b)};f.Qw=function(a){switch(a.tc){case "showVideo":null!=this.k?HP(this.k):(this.k=new EP,this.o.listen(this.k,"click",this.OB));FP(this.k,tQ(this.C));a=this.C;null!=a.g&&a.g.show();break;case "hide":null!==this.k&&(this.k.dispose(),this.k=null),this.C.hide()}};f.OB=function(){this.A.send("displayContainer","videoClick")};f.Pw=function(){Md(this.B.$b(!1),function(a){a.Ec=sd(this.j);a.connect()},this);this.D=!0};function uQ(a,b,c,d){kM(41351021)&&($.A=!0);if(null==a||!rd(Sc(a),a))throw YL(vL,null,"containerElement","element");this.C=a;var e=null!=b||null!=d,g=e,h=!1;if(!($.j||(uM()||rc||Ma(lc,"CrKey")||yM()||Ma(lc,"Roku")||xM()||Ma(lc,"Xbox"))&&e)){if(e=$.A)e=sM()||Ma(lc,"CrKey")||yM()||Ma(lc,"Roku")||xM()||Ma(lc,"Xbox")?!1:!0;e&&(h=!0);g=!1}this.A=g;this.D=h||g&&null!=d;$.j?a=null:(h=H("div",{style:"position:absolute"}),a.insertBefore(h,a.firstChild),a=h);this.j=a;this.g=!this.A&&this.j&&!$.j&&sM()?new SP(this.j,
null):null;a=null;this.A?b?a=new OP(b):d&&(a=new WP(d)):this.g&&(a=new OP(this.g.j));this.o=(this.k=a)?c||null:null;this.F=null!=this.o;BM(AM.getInstance(),8,{enabled:this.A,yt:null!=d,customClick:null!=this.o});$.j&&(b=this.C,$.o=b);this.B=null==this.j||$.j?null:new rQ(this.j,this)}uQ.prototype.initialize=function(){null!=this.g&&this.g.initialize()};uQ.prototype.destroy=function(){Zh(this.g);Zh(this.B);Zh(this.k);ld(this.j)};uQ.prototype.hide=function(){null!=this.g&&this.g.hide()};
function tQ(a){return a.F&&a.o?a.o:null!=a.g?a.g.k:null};function vQ(){U.call(this);this.currentTime=0}z(vQ,U);function wQ(a){vQ.call(this);this.currentTime=a.currentTime;if(!("currentTime"in a)||isNaN(a.currentTime))throw YL(vL,null,"content","currentTime");this.j=a;this.g=new Dn(250);this.k=new Kn(this);Nn(this.k,this.g,"tick",this.o,this)}z(wQ,vQ);wQ.prototype.start=function(){this.g.start()};wQ.prototype.stop=function(){this.g.stop()};wQ.prototype.K=function(){wQ.H.K.call(this);this.k.dispose();this.g.dispose()};
wQ.prototype.o=function(){if("currentTime"in this.j&&!isNaN(this.j.currentTime)){var a=this.currentTime;this.currentTime=this.j.currentTime;a!=this.currentTime&&this.T(new vm("currentTimeUpdate"))}else this.T(new vm("contentWrapperError")),this.stop()};function xQ(){this.g=0;this.j=null};var yQ;
yQ={A:["BC","AD"],o:["Before Christ","Anno Domini"],C:"JFMAMJJASOND".split(""),M:"JFMAMJJASOND".split(""),B:"January February March April May June July August September October November December".split(" "),N:"January February March April May June July August September October November December".split(" "),G:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),P:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),U:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ca:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
J:"Sun Mon Tue Wed Thu Fri Sat".split(" "),S:"Sun Mon Tue Wed Thu Fri Sat".split(" "),D:"SMTWTFS".split(""),O:"SMTWTFS".split(""),I:["Q1","Q2","Q3","Q4"],F:["1st quarter","2nd quarter","3rd quarter","4th quarter"],g:["AM","PM"],j:["EEEE, MMMM d, y","MMMM d, y","MMM d, y","M/d/yy"],W:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],k:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],zG:6,V:[5,6],AG:5};function zQ(a,b,c,d,e,g){w(a)?(this.k="y"==a?b:0,this.j="m"==a?b:0,this.g="d"==a?b:0,this.o="h"==a?b:0,this.A="n"==a?b:0,this.B="s"==a?b:0):(this.k=a||0,this.j=b||0,this.g=c||0,this.o=d||0,this.A=e||0,this.B=g||0)}zQ.prototype.equals=function(a){return a.k==this.k&&a.j==this.j&&a.g==this.g&&a.o==this.o&&a.A==this.A&&a.B==this.B};zQ.prototype.clone=function(){return new zQ(this.k,this.j,this.g,this.o,this.A,this.B)};
zQ.prototype.add=function(a){this.k+=a.k;this.j+=a.j;this.g+=a.g;this.o+=a.o;this.A+=a.A;this.B+=a.B};function AQ(a,b,c){ha(a)?(this.g=BQ(a,b||0,c||1),CQ(this,c||1)):ja(a)?(this.g=BQ(a.getFullYear(),a.getMonth(),a.getDate()),CQ(this,a.getDate())):(this.g=new Date(y()),this.g.setHours(0),this.g.setMinutes(0),this.g.setSeconds(0),this.g.setMilliseconds(0))}function BQ(a,b,c){b=new Date(a,b,c);0<=a&&100>a&&b.setFullYear(b.getFullYear()-1900);return b}f=AQ.prototype;f.Vs=yQ.zG;f.Ws=yQ.AG;
f.clone=function(){var a=new AQ(this.g);a.Vs=this.Vs;a.Ws=this.Ws;return a};f.getFullYear=function(){return this.g.getFullYear()};f.getMonth=function(){return this.g.getMonth()};f.getDate=function(){return this.g.getDate()};f.getTime=function(){return this.g.getTime()};f.set=function(a){this.g=new Date(a.getFullYear(),a.getMonth(),a.getDate())};
f.add=function(a){if(a.k||a.j){var b=this.getMonth()+a.j+12*a.k,c=this.getFullYear()+Math.floor(b/12),b=b%12;0>b&&(b+=12);var d;t:{switch(b){case 1:d=0!=c%4||0==c%100&&0!=c%400?28:29;break t;case 5:case 8:case 10:case 3:d=30;break t}d=31}d=Math.min(d,this.getDate());this.g.setDate(1);this.g.setFullYear(c);this.g.setMonth(b);this.g.setDate(d)}a.g&&(a=new Date((new Date(this.getFullYear(),this.getMonth(),this.getDate(),12)).getTime()+864E5*a.g),this.g.setDate(1),this.g.setFullYear(a.getFullYear()),
this.g.setMonth(a.getMonth()),this.g.setDate(a.getDate()),CQ(this,a.getDate()))};f.equals=function(a){return!(!a||this.getFullYear()!=a.getFullYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())};f.toString=function(){return[this.getFullYear(),Pa(this.getMonth()+1),Pa(this.getDate())].join("")+""};function CQ(a,b){a.getDate()!=b&&a.g.setUTCHours(a.g.getUTCHours()+(a.getDate()<b?1:-1))}f.valueOf=function(){return this.g.valueOf()};function DQ(){this.j=this.g=null};function EQ(){this.g=FQ();this.D=-1;this.J=this.N=this.k=this.C=this.o=null;this.I=FQ();this.j=null;this.O=this.F=this.G="";this.B=this.M=this.A=null}function FQ(){return Math.floor(4503599627370496*Math.random())}var GQ=new EQ;EQ.prototype.clear=function(){this.g=FQ();this.k=this.C=this.o=null;this.I=FQ();this.j=null;this.O=this.F=this.G="";this.B=this.M=this.A=null};function HQ(a){if($.j)return"h.3.0.0";var b="h."+a.O;null!=a.A&&(b+="/n."+a.A,null!=a.o&&(b+="/"+a.o));return b};function IQ(a,b){this.B=a;this.A=D(b,function(a){return a.clone()});this.o="";this.g=this.k=0;this.j=!0}function JQ(a){a.o="";a.k=0;a.g=0;a.j=!0}IQ.prototype.getContent=function(){return this.o};IQ.prototype.clone=function(){var a=new IQ(this.B,this.A),b=this.k,c=this.g,d=this.j;a.o=this.o;a.k=b;a.g=c;a.j=d;return a};function KQ(){U.call(this);this.o=!1;this.impressionUrls=[]}z(KQ,U);function LQ(a){vm.call(this,a)}z(LQ,vm);function MQ(){KQ.call(this);this.D=[];this.A=!1;this.k="not_loaded";this.j=null;this.B=0;this.g=null;this.F=new Rc}z(MQ,KQ);ba(MQ);function NQ(a){var b=["googletag","googletag.cmd"];return E(a,function(a){return hb(b,function(b){return!da(s(b,a))})})||null}f=MQ.prototype;f.K=function(){this.j&&this.j.dispose()};f.initialize=function(){if(!this.o){var a;var b=Hd(new Rc);try{s("googletag"),NQ([b,b.top]),a=!0}catch(c){a=!1}a?OQ(this):(this.o=!0,this.k="not_available")}};
function PQ(a){return a.o?D(a.D,function(a){return a.clone()}):[]}function QQ(a){a=PQ(a);return null!=a?D(a,function(a){return a.A}):void 0}function RQ(a,b,c){var d=0,e=0;null!=b&&(b=new J(b.adTagUrl),d=Number(Fe(b,"pod")||0),e=Number(Fe(b,"ppos")||0));if(null!=a.setVideoSessionInfo)try{a.setVideoSessionInfo(GQ.g,"","","",d,e,c)}catch(g){}}function SQ(a,b){var c=TQ(a);if(null!==c){RQ(c,b,!0);try{c.refreshAllSlots()}catch(d){}}}
f.setVideoContent=function(a,b){var c=UQ(this);if(null!=c)try{c.setVideoContent(a,b)}catch(d){}};function VQ(a,b){a.C=b;a.setVideoContent("","");var c=TQ(a);RQ(c,null,!1)}function TQ(a){null==a.g&&WQ(a);return null!=a.g&&null!=a.g.googletag&&null!=a.g.googletag.companionAds?a.g.googletag.companionAds():null}function UQ(a){null==a.g&&WQ(a);return null!=a.g&&null!=a.g.googletag&&null!=a.g.googletag.pubads?a.g.googletag.pubads():null}
f.gp=function(){0<this.B&&y()>=this.B?(this.o=!0,XQ(this),YQ(this)):OQ(this)};function XQ(a){a.j&&(a.j.stop(),a.j.Ga("tick",a.gp,!1,a),a.j.dispose(),a.j=null)}
function OQ(a){var b;if(b=!a.A)WQ(a),b=null!=a.g&&null!=a.g.googleGetCompanionAdSlots;if(b){var c;try{if(null==a.g)a.A=!0,c=[];else{var d=a.g.googleGetCompanionAdSlots();c=D(d,a.Xw,a)}}catch(e){a.A=!0,c=[]}a.D=c;a.A=!0}if("retrieved"!=a.k&&"not_available"!=a.k&&!da(TQ(a))){var g;b=TQ(a);if(null!==b&&null!=b.getDisplayAdsCorrelator)try{g=b.getDisplayAdsCorrelator()}catch(h){g=null}else g=null;switch(g){case "not_loaded":case "not_available":a.k=g;break;default:g=Number(g),isNaN(g)?a.k="not_available":
(a.C=g,a.k="retrieved")}}a.A&&"retrieved"==a.k?(a.o=!0,XQ(a),a.T(new LQ("companions_success"))):a.A&&"not_available"==a.k?(a.o=!0,XQ(a),YQ(a)):a.j||(a.B=y()+5E3,a.j=new Dn(100),a.j.listen("tick",a.gp,!1,a),a.j.start())}function WQ(a){var b=Hd(a.F);try{a.g=NQ([b,b.top])}catch(c){a.g=null}}function YQ(a){a.T(new LQ("companion_initialization_failed"))}f.Xw=function(a){var b=D(a.adSizes,function(a){return new F(a.adWidth,a.adHeight)});return new IQ(a.slotId,b)};
f.Vz=function(a){var b={};b.slotId=a.B;b.adContent=a.getContent();b.adWidth=a.k;b.adHeight=a.g;b.friendlyIframeRendering=a.j;return b};f.sendImpressionUrls=function(a){kL(this.impressionUrls,a)};function ZQ(a){vm.call(this,a)}z(ZQ,vm);function $Q(){U.call(this);this.k=[]}z($Q,U);$Q.prototype.Vt=function(){return!0};function aR(){return new bR("empty-ad","GDFP","GDFP","",0,0,0,[],[],[],[],new Od)}$Q.prototype.ve=function(){return null};function cR(a){$Q.call(this);this.g=a;this.B=null;this.C=!1;this.j=null;this.A=new Kn;Nn(this.A,this.g,["companions_success","companion_initialization_failed"],this.fz,this);Nn(this.A,this.g,"companion_display_error",this.ez,this);this.g.o?this.C=!0:this.g.initialize()}z(cR,$Q);f=cR.prototype;f.destroy=function(){null!=this.A&&this.A.dispose();this.j=null};function dR(a,b){a.j=b;a.o=!0;a.C?eR(a):(a.o=fR(gR(b),[]),a.o||(a.j=null))}
function eR(a){var b=a.j;a.j=null;if(null!=a.g)if(mb(a.k))hR(a);else if(null!=b){var c=iR(a,b),d=a.g;try{d.g.googleSetCompanionAdContents(D(a.k,d.Vz,d)),d.sendImpressionUrls()}catch(e){d.T(new LQ("companion_display_error"))}if(0<c.length&&b.ea&&(d=a.g,0!=c.length&&"GDFP"==jR(b)[0])){a=[];for(var g=0;g<c.length;g++)a.push(c[g].B);b=b.k;c=TQ(d);if(null!==c){RQ(c,b,!1);try{c.notifyUnfilledSlots(a)}catch(h){}}}}else hR(a)}function hR(a){a.T(new ZQ("companion_display_error"))}f.Vt=function(){return this.o};
f.fz=function(){null!=this.B&&(this.B.stop(),this.B.dispose(),this.B=null);if(null!=this.g){var a=PQ(this.g);null!=a&&(this.k=a)}this.C=!0;null!=this.j&&eR(this);this.T(new vm("initialized"))};f.ez=function(){hR(this)};
function iR(a,b){var c=[],d=[];C(a.k,function(a){JQ(a);gb(a.A,function(d){t:{var e=kR(b);d=lR(new mR(new F(d.width,d.height)),e);if(!mb(d)&&(d=nR(d,c),null!=d)){e=d.k;if(null!=e&&0!=a.B.indexOf(e)){d=!1;break t}c.push(d);var e=d.getContent(),m=d.g.ld(),p=d.getHeight();d="IFrame"!=d.g.S;a.o=e;a.k=m;a.g=p;a.j=d;d=!0;break t}d=!1}return d},this)||d.push(a)},a);var e=gR(b);a.o=fR(e,c);a.o||C(a.k,function(a){JQ(a)},a);return d}
function fR(a,b){if(null==a)return!0;var c=a.g;return"all"==a.j?oR(c,b):"any"==a.j?pR(c,b):!0}function gR(a){return null==a||null==a.g||isNaN(a.g.g)?null:E(qR(a,!0),function(a){a=a.g;return mb(a)?!1:isNaN(a[0].g.g)?!1:a[0].g.g==rR(a[0])})}function oR(a,b){return hb(a,function(a){return lb(b,a)})}function pR(a,b){return gb(a,function(a){return lb(b,a)})}function nR(a,b){return E(a,function(a){return!lb(b,a)})}f.ve=function(){return this.g};function sR(a){vm.call(this,a);this.B=[];this.A={};this.k=null;this.o=!0}z(sR,vm);function tR(){this.j=new Od;this.g=.01>Math.random()&&!$.g}ba(tR);tR.prototype.start=function(a){this.g&&this.j.set(a,y())};tR.prototype.end=function(a){if(this.g&&Qd(this.j,a)){var b=y()-this.j.get(a);iL("https://csi.gstatic.com/csi?v=2&s=ima_sdk&action=html5&it="+a+"."+b);this.j.remove(a)}};function uR(a,b,c){this.B=b;this.o=c;this.A=null;this.j=new Kn(this);this.G=a;this.k=this.g=null;this.C=!1}uR.prototype.start=function(a,b){this.A=a;this.F=b;vR(this);this.B.C?this.D():Qn(this.j,this.B,"initialized",this.D,this)};uR.prototype.D=function(){var a=this.B.ve(),b;b=a.o?"retrieved"!=a.k?void 0:a.C:void 0;a=QQ(a);null!=b&&(this.o.I=b);null!=a&&(this.o.B=a);wR(this)};
function wR(a){if(null===a.A)xR(a);else{var b=new J(a.A.adTagUrl),c=B(Fe(b,"vid")),b=B(Fe(b,"cmsid")),d=a.o.G,e=a.o.F;a.o.G=c;a.o.F=b;if(A(B(c))||A(B(b)))xR(a);else if(c==d&&b==e)xR(a);else{var g=a.B.ve();g.setVideoContent(c,b);SQ(g,a.A);a.k=new Dn(100);Nn(a.j,a.k,"tick",function(){var a;t:{var b=UQ(g);if(null!=b)try{a=!1!==b.isAdRequestFinished();break t}catch(c){a=!0;break t}a=!1}a&&xR(this)},a);a.k.start()}}}
function vR(a){a.g=new Dn;Qn(a.j,a.g,"tick",function(){xR(this)},a);En(a.g,a.G);a.g.start()}function xR(a){null!=a.j&&(a.j.dispose(),a.j=null);null!=a.g&&(a.g.stop(),a.g=null);null!=a.k&&(a.k.stop(),a.k=null);a.C=!0;null===a.F||a.F()};function yR(){};function zR(a){return WL(OL,null,a.parentNode.nodeName,a.nodeName)}function AR(a){return WL(DL,null,a.parentNode.nodeName,a.nodeName)}function BR(a,b){return null!=a?eb(nd(a),function(a){return a.nodeName==b}):[]}function CR(a,b){var c=a.getAttribute(b);return null!=c?c.toLowerCase():null}function DR(a,b){if(null==a)return null;var c="";C(a.childNodes,function(a){if(4==a.nodeType||3==a.nodeType)c+=a.nodeValue});c=wa(c);return b?Ha(c):c}
function ER(a,b,c,d){null!=a&&C(nd(a),function(a){if(a.nodeName==b)c.call(d,a);else throw zR(a);})}function FR(a){return A(B(a))?NaN:Wa(B(a))}function GR(a,b){if(null!=a){var c=a.split(":");if(3==c.length)return c=new zQ(0,0,0,Wa(c[0]),Wa(c[1]),Wa(c[2])),60*(60*(24*c.g+c.o)+c.A)+c.B}return null!=b?b:-1}function HR(a,b){if(!A(B(a)))switch(a.toLowerCase()){case "true":case "1":return!0;case "false":case "0":return!1}return null!=b?b:!1};function IR(a,b,c){this.j=a;this.g=c;this.k=b};function JR(a){this.k=a};function KR(a){this.k=a;this.j=this.g=!1}z(KR,JR);function LR(a,b,c){this.g=a;this.j=b;this.k=c};function MR(){this.g=new Od}function NR(a,b,c){if(isNaN(c))throw Error("Incorrect time offset.");var d=[];Qd(a.g,c)&&(d=a.g.get(c,[]));C(b,function(a){null!=a&&ob(d,a)});a.g.set(c,d)};function OR(a,b){this.g=a;this.j=b}z(OR,yR);OR.prototype.k=function(){return new IR(this.g,null,PR(this))};
function PR(a){var b=new MR;C(nd(od(a.g)),function(a){switch(a.nodeName){case "Preroll":a=QR(this,a);NR(b,a,0);break;case "Midroll":var d=CR(a,"timeOffset"),e=GR(d);if(-1==e)throw WL(pL,null,"timeOffset",B(d));a=QR(this,a);NR(b,a,e);break;case "Postroll":a=QR(this,a);NR(b,a,-1);break;default:throw WL(zL,null,a.parentNode.nodeName,a.nodeName);}},a);if(0==b.g.La().length)throw WL(yL);return b}
function QR(a,b){var c=[];C(nd(b),function(a){switch(a.nodeName){case "Ad":var b=B(DR(a));if(!A(b)){a=CR(a,"bumper");var g=this.j.clone();g.adTagUrl=b;b=new KR(g);b.g=null!=a;b.j="always"==a;ob(c,b)}break;default:throw WL(zL,null,a.parentNode.nodeName,a.nodeName);}},a);return c};function RR(a){a=0>a?0:Math.round(a);return 3600<=a?""+Math.floor(a/3600)+":"+("0"+Math.floor(a/60)%60).slice(-2)+":"+("0"+a%60).slice(-2):""+Math.floor(a/60)%60+":"+("0"+a%60).slice(-2)}function SR(a){var b={};C(a.split(","),function(a){var d=a.split("=");2==d.length&&(a=wa(d[0]),d=wa(d[1]),0<a.length&&(b[a]=d))});return b};var TR=["ai","sigh"];function UR(a,b){if(b)return a;var c;c=null!=a&&/(doubleclick.net|googleadservices.com)/.test(a)?Ia(a,"/pagead/adview")?VR(a)?0:2:Ia(a,"/pagead/conversion")?VR(a)?1:2:2:2;if(0==c||1==c){c="&sdkv="+HQ(GQ);var d=a.indexOf("&adurl=");c=-1!=d?Qa(a.substr(0,d),c,a.substr(d,a.length)):a+c}else c=a;return c}function VR(a){return hb(TR,function(b){var c=a||"";return 0<=je(c,0,b,c.search(ke))})};function WR(a,b){this.g=a;this.j=b}function XR(a){return a.j?-1:a.g}function YR(a,b){a.j&&(a.j=!1,a.g=a.g*b/100)};function ZR(){this.g=new Od}function $R(a,b){this.k=a;this.g=b}function aS(a,b){$R.call(this,"progress",a);this.j=b}z(aS,$R);function bS(a,b){C(b,function(a){var b=a.k.toLowerCase(),e=cS(this,b);e.push(a);this.g.set(b,e)},a)}function dS(a,b,c,d){b=b.toLowerCase();var e=cS(a,b);null!=d?(d=new aS(c,d),null!=d?e.push(d):e.push(new $R(b,c))):e.push(new $R(b,c));a.g.set(b,e)}function cS(a,b){return null!=b?a.g.get(b.toLowerCase())||[]:[]}
function eS(a,b){var c=cS(a,"progress");C(c,function(a){YR(a.j,b)});Ab(c,function(a,b){return XR(a.j)-XR(b.j)})}ZR.prototype.isEmpty=function(){return this.g.isEmpty()};function fS(a,b){return D(cS(a,b)||[],function(a){return a.g})};function gS(a,b){var c=new ZR;ER(a,"Tracking",function(a){var e=CR(a,"event"),g=UR(DR(a),b);hS(g)&&null!=e&&("progress"==e?(a=CR(a,"offset"),a=iS(a),null!=a&&dS(c,e,g,a)):dS(c,e,g))});return c}function jS(a){if(A(B(a)))return null;a=new J(a);if("thismessage"!=a.Ib||"extensions"!=a.ob)return null;a=a.Kb;if(0!=a.lastIndexOf("/",0))return null;a=a.substr(1);return A(B(a))?null:a}
function iS(a){if(A(B(a)))return null;var b=null;0<a.indexOf("%")?(a=Number(a.substr(0,a.indexOf("%"))),!isNaN(a)&&0<=a&&(b=new WR(a,!0))):(a=GR(a),0<=a&&(b=new WR(a,!1)));return b}function hS(a){var b=!0;if(A(B(a)))b=!1;else try{new J(a)}catch(c){b=!1}return b};function kS(a){this.g=null!=a?a:new ZR}function lS(a,b){var c=b.g;C(c.La(),function(a){bS(this.g,c.get(a))},a)}function mS(a,b){var c=fS(a.g,b);return null!=c?c:[]};function nS(){this.g="Ads by Google";this.j="http://www.google.com/adsense/support";this.k=0};function oS(a,b,c,d,e,g,h,k,m){kS.call(this,m);this.o=a;this.A=b;this.j=c;this.k=e;this.B=g;this.C=h}z(oS,kS);function pS(){}pS.prototype.parse=function(a){var b;ER(a,"config",function(a){null!=b||(b=qS(this,a))},this);return b};function qS(a,b){var c;C(nd(b),function(a){switch(a.nodeName){case "context":c="default"==a.getAttribute("data")?new nS:null;break;case "params":null!=c&&rS(this,c,a)}},a);return c}function rS(a,b,c){C(nd(c),function(a){var c=a.attributes[0].value;switch(a.nodeName){case "attribution_url":b.j=c;break;case "attribution_text":b.g=c;break;case "signals":b.k=parseInt(c,10)}},a)};function sS(){}
sS.prototype.parse=function(a){if(null==a)return null;var b,c,d,e,g,h,k=!1;C(nd(a),function(a){switch(a.nodeName){case "AttributionText":b=DR(a);break;case "AttributionUrl":c=DR(a);break;case "ConversionUrl":e=DR(a);break;case "CustomTracking":null!=nd(a)&&(d=gS(a));break;case "PreviousAdInformation":DR(a);break;case "VisibleUrl":g=DR(a);break;case "UI":h=(new pS).parse(a);break;case "ShowYouTubeAnnotations":var p=DR(a);k=HR(B(p),!1);case "QueryId":DR(a)}},this);null!=h||(h=new nS);return new oS(b,
c,e,0,g,h,k,0,d)};function tS(a,b){kS.call(this,b);this.j=a}z(tS,kS);function uS(){}uS.prototype.parse=function(a){if(null==a)return null;var b;C(nd(a),function(a){switch(a.nodeName){case "CustomTracking":null!=nd(a)&&(b=gS(a))}});a=null;null!=b&&0<cS(b,"skip").length&&(a="Generic");return new tS(a,b)};function vS(){}vS.prototype.parse=function(a){if(null==a)return null;var b,c;C(nd(a),function(a){switch(a.nodeName){case "SkippableAdType":b=DR(a);break;case "CustomTracking":null!=nd(a)&&(c=gS(a))}});return new tS(b,c)};function wS(){}wS.prototype.parse=function(a){if(null==a)return null;var b;C(nd(a),function(a){switch(a.nodeName){case "CustomTracking":null!=nd(a)&&(b=gS(a))}},this);return new kS(b)};function xS(a){kS.call(this);this.j=a}z(xS,kS);function yS(){}yS.prototype.parse=function(a){a=ZF(a);return A(B(a))?null:new xS(a)};function zS(a){kS.call(this);this.j=a}z(zS,kS);function AS(){kS.call(this)}z(AS,kS);function BS(){}BS.prototype.g={iE:"TEMPLATE_PARAMETERS",jE:"TEMPLATE_URL"};BS.prototype.parse=function(a){if(null==a)return null;C(nd(a),function(a){switch(a.nodeName){case this.g.iE:CS(this,a)}},this);return new AS};function CS(a,b){C(nd(b),function(a){a.nodeName==this.g.jE&&DR(a)},a)};function DS(a,b,c,d){kS.call(this);this.k=a;this.o=b;this.A=c;this.j=d}z(DS,kS);function ES(){}ES.prototype.g={aE:"Line1",bE:"Line2",cE:"Line3",$D:"ImageUrl"};ES.prototype.parse=function(a){if(null==a)return null;var b,c,d,e;C(nd(a),function(a){switch(a.nodeName){case this.g.aE:b=DR(a,!0);break;case this.g.bE:c=DR(a,!0);break;case this.g.cE:d=DR(a,!0);break;case this.g.$D:e=DR(a)}},this);return new DS(b,c,d,e)};function FS(a){kS.call(this);this.j=a}z(FS,kS);function GS(){}GS.prototype.parse=function(a){if(null==a)return null;a=a.getAttribute("sequence");a=null!=a?Wa(a):NaN;a=isNaN(a)?-1:a;return new FS(a)};function HS(){kS.call(this)}z(HS,kS);function IS(){}IS.prototype.parse=function(a){return null!=a?new HS:null};function JS(a){kS.call(this);this.j=isNaN(a)?-1:a}z(JS,kS);function KS(){}KS.prototype.parse=function(a){if(null==a)return null;a=a.getAttribute("fallback_index");a=null!=a?Wa(a):NaN;return new JS(a)};function LS(a){if(kM(947225)){if(a&&a.items&&a.items.length){a=a.items[0];this.channelId=a.id;var b=a.snippet;b&&(this.j=b.title,this.g=Wb(b,"thumbnails","default","url"));if(a=a.statistics)this.videoCount=a.videoCount}}else MS(this,a)}LS.prototype.videoCount=0;
function MS(a,b){if(b){var c=b.entry;if(c){var d=c.id;d&&gb(d.$t.split(":"),function(a,b,c){return"channel"==a?(this.channelId=c[b+1],!0):!1},a);(d=c.author)&&d[0]&&d[0].name&&(a.j=d[0].name.$t);(c=c.media$thumbnail)&&c[0]&&(a.g=c[0].url)}}};function NS(a){if(kM(947225)){if(a&&a.items&&a.items.length){a=a.items[0];this.videoId=a.id;var b=a.snippet;a.snippet&&(this.channelId=b.channelId,this.title=b.title);if(a=a.status)this.g="unlisted"!=a.privacyStatus}}else OS(this,a)}NS.prototype.g=!0;
function OS(a,b){if(b){var c=b.entry;if(c){var d=c.id;d&&gb(d.$t.split(":"),function(a,b,c){return"video"==a?(this.videoId=c[b+1],!0):!1},a);if(d=c.title)a.title=d.$t;if(d=c.media$group)if(d=d.yt$uploaderId)a.channelId=d.$t;c.yt$accessControl&&(c=E(c.yt$accessControl,function(a){return"list"==a.action}))&&(a.g="denied"!=c.permission)}}};function PS(){}var QS={qu:"Image",BG:"Flash",rG:"All"},RS={HTML:"Html",vI:"IFrame",RJ:"Static",rG:"All"},SS={wI:"IgnoreSize",EJ:"SelectExactMatch",FJ:"SelectNearMatch"};function TS(){U.call(this);this.j=new Od;this.k=null;this.A=new Kn(this);S(this,this.A);this.g=null;this.o=!1}z(TS,U);var US=null;function VS(){null!=US||(US=new TS);return US}TS.prototype.init=function(a){this.o||(this.k=a,this.A.listen(this.k,"activityMonitor",this.B),this.o=!0)};
function WS(a,b,c,d){if(a.o){var e=a.j,g=window.setTimeout(function(){d("");C(e.La(),function(a){e.get(a)===d&&e.remove(a)})},200);a.j.set(g,d);var h={};h.isFullscreen=a.C.qe();h.osdId=a.D;h.queryId=c;h.timeoutId=g;h.vastEvent=b;h.isOverlay=null!=a.g;a.g&&(b=xP(a.g),h.left=b.left,h.top=b.top,h.width=b.width,h.height=b.height);a.k.send("activityMonitor","reportVastEvent",h)}else d("")}TS.prototype.destroy=function(){this.A.Ga(this.k,"activityMonitor",this.B);this.o=!1};
TS.prototype.B=function(a){var b=a.sd,c=b.viewabilityString;switch(a.tc){case "viewableImpression":a={};a.queryId=b.queryId;a.viewabilityString=c;VS().T(new MK("viewable_impression",null,a));break;case "viewability":if(b=b.timeoutId,window.clearTimeout(b),a=this.j.get(b))this.j.remove(b),a(c)}};function mR(a){if(null==a||0>=a.width||0>=a.height)throw YL(vL,null,"ad slot size",a.toString());this.j=a;this.g=new PS;this.A=XS(RS,this.g.k)?this.g.k:"All";this.o=XS(QS,this.g.creativeType)?this.g.creativeType:"All";this.C=XS(SS,this.g.o)?this.g.o:"SelectExactMatch";this.k=null!=this.g.j?this.g.j:[];this.B=ha(this.g.g)&&0<this.g.g&&100>=this.g.g?this.g.g:90}
function lR(a,b){var c=[];C(b,function(a){!A(B(a.g.o))&&(isNaN(a.g.g)||isNaN(rR(a))||rR(a)==a.g.g)&&YS(this,a)?c.push(a):(a=ZS(this,a),null!=a&&!A(B(a.g.o))&&c.push(a))},a);return c}
function YS(a,b){var c;if(c="Flash"!=b.getContentType()||gN){if(c="All"==a.A||a.A==b.g.S)c=b.getContentType(),c=null!=c?"All"==a.o||a.o==c:!0;c&&(c=b.k,c=mb(a.k)?!0:null!=c?0<=cb(a.k,c):!1)}c?(c=b.g.Fc(),c="IgnoreSize"==a.C||Nb(a.j,c)?!0:"SelectNearMatch"==a.C&&(c.width>a.j.width||c.height>a.j.height||c.width<a.B/100*a.j.width||c.height<a.B/100*a.j.height?!1:!0)):c=!1;return c}function ZS(a,b){var c=b.j;return null!=c?E(c,function(a){return YS(this,a)},a):null}
function XS(a,b){return null!=b&&Xb(a,b)};function $S(a){J.call(this,a);this.j=new Od;a=this.Kb;var b=a.indexOf(";"),c=null;0<=b?(qe(this,a.substring(0,b)),c=a.substring(b+1)):qe(this,a);aT(this,c)}z($S,J);$S.prototype.toString=function(){return bT(this,$S.H.toString.call(this))};$S.prototype.Ip=function(){return""};$S.prototype.Ag=function(){return""};
function aT(a,b){A(B(b))||C(b.split(";"),function(a){var b=a.indexOf("=");if(0<b){var e=ya(a.substring(0,b));a=ya(a.substring(b+1));b=this.j.get(e);null!=b?lb(b,a)||b.push(a):b=[B(a)];this.j.set(e,b)}},a)}function cT(a){if(A(B("ord")))return null;a=a.j.get("ord");return null!=a?a:null}function dT(a,b,c){A(B(b))||(c=D(c,B),a.j.set(b,c))}function bT(a,b){var c=[B(b)];ub(c,eT(a));return c.join(";")}
function eT(a){var b=cT(a);null!=b?A(B("ord"))||a.j.remove("ord"):b=[B(y())];var c=[];C(a.j.La(),function(a){C(this.j.get(a),function(b){ub(c,a+"="+b)})},a);ub(c,"ord="+b[0]);dT(a,"ord",b);return c}$S.prototype.clone=function(){return new $S(this.toString())};function fT(a){a=a.adTagUrl;if(null==a)return!1;a=new J(a);var b=a.Kb;return va(a.ob,"googleads.g.doubleclick.net")&&gT("/pagead/ads",b)}function hT(a){a=a.adTagUrl;if(null==a)return!1;a=new J(a);var b=a.Kb;return va(a.ob,"doubleclick.net")&&gT("/gampad/ads",b)}function iT(a){a=a.adTagUrl;if(null==a)return!1;var b=new $S(a);a=b.ob;b=bT(b,b.Kb);return!va(a,".g.doubleclick.net")&&va(a,"doubleclick.net")&&gT("/(ad|pfad)[x|i|j]?/",b)}
function jT(a){a=a.adTagUrl;return null!=a?"bid.g.doubleclick.net"==ze(new J(a)):!1}function gT(a,b){return A(B(b))?!1:(new RegExp(a)).test(b)};function kT(){this.g=this.k=1;this.A=this.j=0;this.o=1};function lT(){this.D={};this.W="";this.Tf=new ZR}lT.prototype.zn=function(){return null};function mT(a,b,c){a.W=b;a.D=c}lT.prototype.vg=function(a){this.Z=a};lT.prototype.getAd=function(){return this.Z};function nT(a,b){var c=[],d=a.J();C(d,function(a){a=cS(a.Tf,b)||[];c=sb(a,c)},a);return c}lT.prototype.J=function(){for(var a=[this],b=this.Z.j;b;){var c=oT(this,b)||oT(this,b,!0);null!=c&&a.push(c);b=b.j}return a};
function oT(a,b,c){var d=c||!1;return E(b.o,function(a){var b=a.g==this.g;return a instanceof this.constructor&&(d||b)},a)};function pT(a,b,c,d,e,g){lT.call(this);this.ia=a;this.k=b;this.j=c;this.G=tb(d);this.ha=this.ma=null;this.o=e;this.ea=tb(g);xb(this.ea,null,function(a){return a.F})}z(pT,lT);pT.prototype.Xc=function(){return this.k};function qT(a){var b=new Od,c=a.J();C(c,function(a){if(a instanceof pT){var c=a.j;C(c.La(),function(a){b.set(a,sb(c.get(a),b.get(a)||[]))},this)}},a);return b}
pT.prototype.getMediaUrl=function(a){var b="";gb(this.G,function(c){var d=c.j;return!A(B(a))&&a!=c.g||null==d||A(B(d))?!1:(b=d,!0)},this);return b};pT.prototype.setMediaUrl=function(a){this.ha=a};pT.prototype.zn=function(){var a=E(this.G,function(a){return!A(B(a.g))&&-1!=a.g.indexOf("javascript")&&("VPAID"==a.o||"surveys"==a.o)});return null!=a?a.j:null};function rT(a,b,c){Q.call(this);this.j=a;this.k=b;this.o=c;this.B=0;this.g=new Kn(this);sT(this)}z(rT,Q);function sT(a){a.o.forEach(function(a,c){this.g.listen(c,"mousedown",this.C);this.g.listen(c,"mouseup",this.F)},a);a.g.listen(a.k,"mouseover",a.D)}rT.prototype.C=function(){this.A=y()};
rT.prototype.F=function(a){var b=null!=a.target.href?a.target:a.target.parentNode,c=[];this.j&1&&c.push("nm="+this.B);this.j&2&&c.push("nb="+this.o.get(b));if(this.j&8){var d=dg(this.k);c.push("nx="+(a.clientX-d.x));c.push("ny="+(a.clientY-d.y))}this.j&16&&null!=this.A&&c.push("clkt="+(y()-this.A));0<c.length&&(b.href+=0<=b.href.indexOf("?")?"&"+c.join("&"):"?"+c.join("&"))};rT.prototype.D=function(){this.B++};rT.prototype.K=function(){rT.H.K.call(this);this.g.dispose()};function tT(a,b,c,d,e){lT.call(this);A(B(a))&&(a=Va()+"_ima");this.xa=B(a);this.na=b;this.S=c;this.P=d;this.o=e;this.U=[];null!=this.P?this.V=UK[this.P]||"Other":this.V=null}z(tT,lT);f=tT.prototype;f.getContent=function(){var a;a=this.Jc();if("outerHTML"in a)a=a.outerHTML;else{var b=Sc(a).createElement("div");b.appendChild(a.cloneNode(!0));a=b.innerHTML}return a};f.getContentType=function(){return this.V};f.Fc=function(){return this.na};f.ld=function(){return this.Fc().width};f.getHeight=function(){return this.Fc().height};
f.zn=function(){return"VPAID"==this.F?this.o:null};f.Xc=function(){return this.N};function uT(a,b,c,d,e){tT.call(this,a,b,c,d,e);this.jb=-2;this.k=null;this.M=this.I=u;this.O=[];this.ka=!0;this.Ca=[];this.C=!1}z(uT,tT);function vT(a,b){a.k=b;null!=a.j&&null!=b&&(wT(a,a.I),xT(a,a.M))}function wT(a,b){null!=a.k&&null!=a.j&&C(a.O,function(a){this.k.Ga(a,"click",this.I);A(B(this.Xc()))||this.k.listen(a,"click",b)},a);a.I=b}function xT(a,b){null!=a.k&&null!=a.j&&(a.k.Ga(a.j,"creativeview",a.M),a.k.listen(a.j,"creativeview",b));a.M=b}
function yT(a){C(a.Ca,function(a){ld(Tc(a))},a);a.Ca=[]}uT.prototype.A=function(a){null==this.k||A(B(this.Xc()))||(this.k.listen(a,"click",this.I),this.O.push(a))};uT.prototype.Jc=function(){null==this.j&&(this.j=this.Df(),id(this.j,zT(this)));null!=this.k&&this.k.listen(this.j,"creativeview",this.M);return this.j};