This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.js
1854 lines (1844 loc) · 113 KB
/
index.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
var a2a_config = a2a_config || {};
a2a_config.vars = {
vars: [ "menu_type", "static_server", "linkmedia", "linkname", "linkurl", "linkname_escape", [ "http_s", "http:" != document.location.protocol ? "s" : "" ], "show_title", "onclick", "num_services", "hide_embeds", "prioritize", "exclude_services", "custom_services", [ "templates", {} ], "orientation", [ "track_links", !1 ],
[ "track_links_key", "" ], "tracking_callback", "track_pub", "color_main", "color_bg", "color_border", "color_link_text", "color_link_text_hover", "color_arrow", "color_arrow_hover", [ "add_services", !1, 1 ],
[ "thanks", {} ], "locale", "delay", "icon_color", "no_3p", "show_menu", "target"
],
process: function () {
for ( var a, e, t = a2a_config.vars.vars, n = 0, i = t.length; n < i; n++ ) void 0 !== ( e = "string" == typeof t[ n ] ? ( a = t[ n ], undefined ) : ( a = t[ n ][ 0 ], t[ n ][ 1 ] ) ) && "undefined" == typeof a2a_config[ a ] && ( a2a_config[ a ] = e )
}
}, a2a_config.vars.process(), a2a_config.localize = window.a2a_localize || "", a2a_config.static_server = a2a_config.static_server || "https://static.addtoany.com/menu";
var a2a = a2a || {
static_addtoany: "https://static.addtoany.com/menu",
total: 0,
kit_services: [],
icons_img_url: a2a_config.static_server + "/icons.36.png",
head_tag: document.getElementsByTagName( "head" )[ 0 ],
canonical_url: function () {
if ( !document.querySelector ) return !1;
var a, e = document.querySelector( 'meta[property="og:url"]' );
return e ? e.content : !!( a = document.querySelector( 'link[rel="canonical"]' ) ) && a.href
}(),
nonce: document.currentScript && document.currentScript.nonce ? document.currentScript.nonce : null,
ieo: function () {
for ( var a = -1, e = document.createElement( "b" ); e.innerHTML = "\x3c!--[if gt IE " + ++a + "]>1<![endif]--\x3e", +e.innerHTML; );
return a2a.ieo = function () {
return a
}, a
},
quirks: document.compatMode && "BackCompat" == document.compatMode ? 1 : null,
is_mobile: navigator.userAgent.match( /Mobi/ ) || "screen" in window && window.screen.width < 1366,
has_menter: document.documentElement && "onmouseenter" in document.documentElement,
has_touch: "ontouchend" in window,
has_pointer: window.PointerEvent || navigator.msPointerEnabled,
dom: {
isReady: !1,
ready: function ( a ) {
var e = function () {
if ( !document.body ) return setTimeout( a2a.dom.ready( a ) );
a(), a2a.dom.isReady = !0
},
t = function ( a ) {
( document.addEventListener || "load" === a.type || "complete" === document.readyState ) && ( n(), e() )
},
n = function () {
document.addEventListener ? ( document.removeEventListener( "DOMContentLoaded", t, !1 ), window.removeEventListener( "load", t, !1 ) ) : ( document.detachEvent( "onreadystatechange", t ), window.detachEvent( "onload", t ) )
};
if ( "complete" === document.readyState ) e();
else if ( document.addEventListener ) document.addEventListener( "DOMContentLoaded", t, !1 ), window.addEventListener( "load", t, !1 );
else {
document.attachEvent( "onreadystatechange", t ), window.attachEvent( "onload", t );
var i = !1;
try {
i = null == window.frameElement && document.documentElement
} catch ( o ) {}
i && i.doScroll && ! function l() {
if ( !a2a.dom.isReady ) {
try {
i.doScroll( "left" )
} catch ( o ) {
return setTimeout( l, 50 )
}
n(), e()
}
}()
}
}
},
ready: function () {
a2a.type = "page", a2a.cbs( "ready" ), a2a.ready = function () {}
},
init: function ( a, e ) {
var t, n, i, o, l = a2a.c,
r = ( e = e || {}, {} ),
s = null,
c = {},
d = location.href;
for ( var u in a2a.make_once( a ), e ) l[ u ] = e[ u ];
for ( var u in l ) r[ u ] = l[ u ];
if ( n = l.target )
if ( "string" == typeof n ) {
if ( i = n.substr( 0, 1 ), o = n.substr( 1 ), "." == i ) return a2a.multi_init( a2a.HTMLcollToArray( a2a.getByClass( o, document ) ), a, e ), void( l.target = !1 );
0 <= ( t = ( s = a2a.gEl( o ) ).className ).indexOf( "a2a_kit" ) && t.indexOf( "a2a_target" ) < 0 && ( s = null )
} else s = l.target;
( a = l.menu_type ? "mail" : a ) && ( a2a.type = a, l.vars.process() ), c.type = a2a.type, c.node = s, c.linkmedia = l.linkmedia, c.linkname = l.linkname || document.title || location.href, c.linkurl = l.linkurl || location.href, c.linkname_escape = l.linkname_escape, c.linkname_implicit = !l.linkname_escape && ( document.title || d ) == c.linkname, c.linkurl_implicit = d == c.linkurl, c.orientation = l.orientation || !1, c.track_links = l.track_links || !1, c.track_links_key = l.track_links_key || "", c.track_pub = l.track_pub || !1, l.linkmedia = l.linkname = l.linkurl = l.linkname_escape = l.show_title = l.custom_services = l.exclude_services = l.orientation = l.track_pub = l.target = !1, "custom" == l.track_links && ( l.track_links = !1, l.track_links_key = "" ), a2a.last_type = a2a.type, window[ "a2a" + a2a.type + "_init" ] = 1,
function ( a, e ) {
a2a.total++, a2a.n = a2a.total;
var t, n, i = ( a2a[ "n" + a2a.n ] = a ).node = a2a.set_this_index( a.node ),
o = document.createElement( "div" ),
l = a2a.getData( i )[ "a2a-media" ],
r = a2a.getData( i )[ "a2a-title" ],
s = a2a.getData( i )[ "a2a-url" ];
i ? ( a.linkname_escape && ( n = a2a.getByClass( "a2a_linkname_escape", i.parentNode )[ 0 ] || a2a.getByClass( "a2a_linkname_escape", i.parentNode.parentNode )[ 0 ] ) && ( a.linkname = n.textContent || n.innerText ), a.linkmedia = e.linkmedia = l || a.linkmedia, a.linkname = e.linkname = r || a.linkname, a.linkurl = e.linkurl = s || a.linkurl, r && ( a.linkname_implicit = !1 ), s && ( a.linkurl_implicit = !1 ), "textContent" in document ? o.textContent = a.linkname : o.innerText = a.linkname, ( t = o.childNodes[ 0 ] ) && ( a.linkname = t.nodeValue ), delete o, i.a2a_kit ? a2a.kit( a, e ) : a2a.button( a ) ) : a2a.c.show_menu || a2a.total--
}( c, r ), l.menu_type = !1, a2a.init_show()
},
init_all: function ( e ) {
a2a.unindexed( function ( a ) {
0 <= a.className.indexOf( "a2a_follow" ) ? a2a.init( "feed", {
target: a
} ) : a2a.init( e || "page", {
target: a
} )
}, !0 ) || !a2a.gEl( "a2a_menu_container" ) || a2a.init_show.a2a_done || a2a.init( e )
},
multi_init: function ( a, e, t ) {
for ( var n = 0, i = a.length; n < i; n++ ) t.target = a[ n ], a2a.init( e, t )
},
button: function ( a ) {
var n = a2a.gEl,
i = a.node,
o = a.type,
l = "a2a" + o,
r = n( l + "_dropdown" ),
e = n( l + "_full" ),
t = a2a.has_menter,
s = i.firstChild,
c = a2a[ o ].onclick;
i.getAttribute( "onclick" ) && -1 != ( i.getAttribute( "onclick" ) + "" ).indexOf( "a2a_" ) || i.getAttribute( "onmouseover" ) && -1 != ( i.getAttribute( "onmouseover" ) + "" ).indexOf( "a2a_" ) || ( a2a.add_event( i, "click", function ( a ) {
a2a.preventDefault( a ), a2a.stopPropagation( a );
var e = !!a2a.isDisplayed( r ),
t = document.activeElement;
if ( e ? a2a.toggle_dropdown( "none", o ) : 2 !== c && ( a2a.show_menu( i ), a2a[ o ].last_focus = t, r.focus() ), e && a2a.isDisplayed( n( l + "_show_more_less" ) ) || 2 === c ) {
if ( "mail" == o ) return;
a2a.show_full(), a2a[ o ].last_focus = t
}
} ), a2a.add_event( i, "click", a2a.stopPropagation ), a2a.add_event( i, "touchstart", a2a.stopPropagation, !!a2a.evOpts() && {
passive: !0
} ), !a2a[ a2a.type ].onclick && t && ( a2a.c.delay ? i.onmouseenter = function () {
a2a[ a2a.type ].over_delay = setTimeout( function () {
a2a.show_menu( i )
}, a2a.c.delay )
} : i.onmouseenter = function () {
a2a.show_menu( i )
}, i.onmouseleave = function () {
a2a.miniLeaveDelay(), a2a[ a2a.type ].over_delay && clearTimeout( a2a[ a2a.type ].over_delay )
} ), a2a.add_event( i, "mouseenter", function () {
e.style.willChange = "transform, opacity", n( "a2a_overlay" ).style.willChange = "backdrop-filter, opacity"
} ) ), "a" == i.tagName.toLowerCase() && "page" == a2a.type && ( i.href = "https://www.addtoany.com/share#url=" + encodeURIComponent( a.linkurl ) + "&title=" + encodeURIComponent( a.linkname ).replace( /'/g, "%27" ) ), s && "undefined" != typeof s.srcset && /\/share_save_171_16.(?:gif|png)$/.test( s.src ) && ( s.srcset = "https://static.addtoany.com/buttons/share_save_342_32.png 2x" )
},
kit: function ( o, a ) {
var e, t, n, i, l, m = o.type,
r = {
behance: {
name: "Behance",
icon: "behance",
color: "007EFF",
url: "https://www.behance.net/${id}"
},
facebook: {
name: "Facebook",
icon: "facebook",
color: "1877f2",
url: "https://www.facebook.com/${id}"
},
flickr: {
name: "Flickr",
icon: "flickr",
color: "FF0084",
url: "https://www.flickr.com/photos/${id}"
},
foursquare: {
name: "Foursquare",
icon: "foursquare",
color: "F94877",
url: "https://foursquare.com/${id}"
},
github: {
name: "GitHub",
icon: "github",
color: "2A2A2A",
url: "https://github.com/${id}"
},
instagram: {
name: "Instagram",
icon: "instagram",
color: "E4405F",
url: "https://www.instagram.com/${id}"
},
linkedin: {
name: "LinkedIn",
icon: "linkedin",
color: "007BB5",
url: "https://www.linkedin.com/in/${id}"
},
linkedin_company: {
name: "LinkedIn",
icon: "linkedin",
color: "007BB5",
url: "https://www.linkedin.com/company/${id}"
},
medium: {
name: "Medium",
icon: "medium",
color: "2A2A2A",
url: "https://medium.com/@${id}"
},
pinterest: {
name: "Pinterest",
icon: "pinterest",
color: "BD081C",
url: "https://www.pinterest.com/${id}"
},
snapchat: {
name: "Snapchat",
icon: "snapchat",
color: "2A2A2A",
url: "https://www.snapchat.com/add/${id}"
},
tumblr: {
name: "Tumblr",
icon: "tumblr",
color: "35465C",
url: "http://${id}.tumblr.com"
},
twitter: {
name: "Twitter",
icon: "twitter",
color: "55ACEE",
url: "https://twitter.com/${id}"
},
vimeo: {
name: "Vimeo",
icon: "vimeo",
color: "1AB7EA",
url: "https://vimeo.com/${id}"
},
youtube: {
name: "YouTube",
icon: "youtube",
color: "FF0000",
url: "https://www.youtube.com/user/${id}"
},
youtube_channel: {
name: "YouTube Channel",
icon: "youtube",
color: "FF0000",
url: "https://www.youtube.com/channel/${id}"
}
},
s = [ "facebook_like", "twitter_tweet", "pinterest_pin", "linkedin_share" ],
c = a2a.counters.avail,
d = function ( a, e ) {
if ( a && !a2a.in_array( a, s ) )
for ( var t = 0, n = e ? a2a[ m ].services.most.concat( a2a[ m ].services.email ) : a2a.services, i = n.length; t < i; t++ )
if ( a == n[ t ][ 1 ] ) return [ n[ t ][ 0 ], n[ t ][ 2 ], n[ t ][ 3 ], n[ t ][ 4 ], n[ t ][ 5 ] ];
return !e && [ a, a ]
},
u = function ( a, e ) {
for ( var t, n = 0, i = a.attributes.length, o = e; n < i; n++ )( t = a.attributes[ n ] ).name && "data-" == t.name.substr( 0, 5 ) && ( o[ t.name.substr( 5 ) ] = t.value );
return o
},
_ = function () {
E = o.linkurl = a2a.getData( h )[ "a2a-url" ] || E, S = o.linkname = a2a.getData( h )[ "a2a-title" ] || S, B = o.linkmedia = a2a.getData( h )[ "a2a-media" ] || B, a2a.linker( this )
},
p = function ( a, e, t ) {
var n = {
node: e,
service: a,
title: S,
url: E,
media: B,
mediaNode: h.a2a_mediaNode
},
i = a2a.cbs( "share", n );
return void 0 !== i && ( i.url && ( o.linkurl = i.url, o.linkurl_implicit = !1 ), i.title && ( o.linkname = i.title, o.linkname_implicit = !1 ), i.media && ( o.linkmedia = i.media ), a2a.linker( e ), i.stop && t && a2a.preventDefault( t ) ), i
},
f = a2a.c.templates,
g = a2a.in_array,
h = o.node,
v = a2a.getData( h ),
y = h.className,
k = h.a2a_follow,
w = a2a.HTMLcollToArray( h.getElementsByTagName( "a" ) ),
b = w.length,
x = document.createElement( "div" ),
A = encodeURIComponent,
E = o.linkurl,
C = A( o.linkurl ).replace( /'/g, "%27" ),
S = o.linkname,
B = ( A( o.linkname ).replace( /'/g, "%27" ), o.linkmedia ),
T = ( B && A( o.linkmedia ).replace( /'/g, "%27" ), v[ "a2a-icon-color" ] || a2a.c.icon_color ),
F = T ? T.split( ",", 2 ) : T,
L = F ? F[ 0 ] : F,
N = F ? F[ 1 ] : F,
z = y.match( /a2a_kit_size_([\w\.]+)(?:\s|$)/ ),
D = z ? z[ 1 ] : "16",
I = D + "px",
M = "a2a_svg a2a_s__default a2a_s_",
j = {},
P = {},
O = o.linkurl_implicit && a2a.canonical_url ? encodeURIComponent( a2a.canonical_url ).replace( /'/g, "%27" ) : C,
H = v[ "a2a-scroll-show" ],
R = 0 <= y.indexOf( "a2a_vertical_style" );
D && !isNaN( D ) && ( a2a.svg.load(), T && "unset" != T && a2a.svg.works() && ( L && "unset" != L && ( j.backgroundColor = L ), N && "unset" != N.trim() && ( N = N.trim() ) ), h.style.lineHeight = P.height = P.lineHeight = I, P.width = 2 * D + "px", P.fontSize = "16px", R && ( P.height = P.lineHeight = D / 2 + "px", P.fontSize = "10px", P.width = D + "px" ), H && a2a.scrollToggle( h, H ), 32 != D && ( j.backgroundSize = j.height = j.lineHeight = j.width = I, P.borderRadius = j.borderRadius = ( .14 * D ).toFixed() + "px", P.fontSize = ( parseInt( P.height, 10 ) + ( R ? 4 : 0 ) ) / 2 + "px" ) ), a2a.kit.facebook_like = function () {
ma.href = E, ma.width = "90", ma.layout = "button_count", ma.ref = "addtoany", ma = u( V, ma ), V.style.width = ma.width + "px";
var a, e, t, n, i = a2a.i18n();
for ( var o in 2 == ( i = i ? i.replace( /-/, "_" ) : "en_US" ).length && ( i += "_" + i.toUpperCase() ), ma ) ua += " data-" + o + '="' + ma[ o ] + '"';
window.fbAsyncInit || ( window.fbAsyncInit = function () {
FB.init( {
appId: "0",
status: !1,
xfbml: !0,
version: "v3.1"
} ), FB.Event.subscribe( "edge.create", function ( a, e ) {
a2a.GA.track( "Facebook Like", "facebook_like", a, "pages", "AddToAny Share/Save Button" ), p( "Facebook Like", V )
} )
}, ( U = document.createElement( "span" ) ).id = "fb-root", document.body.insertBefore( U, document.body.firstChild ) ), a2a.kit.facebook_like_script || ( a = document, e = "facebook-jssdk", n = a.getElementsByTagName( "script" )[ 0 ], a.getElementById( e ) || ( ( t = a.createElement( "script" ) ).id = e, t.src = "https://connect.facebook.net/" + i + "/sdk.js#xfbml=1&version=v3.1", n.parentNode.insertBefore( t, n ) ) ), a2a.kit.facebook_like_script = 1, V.innerHTML = '<div class="fb-like"' + ua + "></div>";
try {
FB.XFBML.parse( V )
} catch ( l ) {}
}, a2a.kit.twitter_tweet = function () {
ma.url = E, ma.lang = a2a.i18n() || "en", ma.related = "AddToAny,micropat";
var a = f.twitter,
e = "string" == typeof a ? a.lastIndexOf( "@" ) : null;
e && -1 !== e && ( e++, e = ( e = a.substr( e ).split( " ", 1 ) )[ 0 ].replace( /:/g, "" ).replace( /\//g, "" ).replace( /-/g, "" ).replace( /\./g, "" ).replace( /,/g, "" ).replace( /;/g, "" ).replace( /!/g, "" ), ma.related = e + ",AddToAny" ), ma = u( V, ma );
var t, n, i, o, l, r = document.createElement( "a" );
for ( var s in r.className = "twitter-share-button", ma ) r.setAttribute( "data-" + s, ma[ s ] );
V.appendChild( r ), a2a.kit.twitter_tweet_script || ( t = document, n = "twitter-wjs", l = t.getElementsByTagName( "script" )[ 0 ], t.getElementById( n ) || ( ( o = t.createElement( "script" ) ).id = n, o.src = "https://platform.twitter.com/widgets.js", l.parentNode.insertBefore( o, l ), window.twttr = window.twttr || ( i = {
_e: [],
ready: function ( a ) {
i._e.push( a )
}
} ) ) ), a2a.kit.twitter_tweet_script = 1;
try {
twttr.ready( function ( a ) {
a2a.twitter_bind || ( a.events.bind( "click", function ( l ) {
if ( l && "tweet" == l.region ) {
var a = function () {
var a = l.target.src.split( "#" )[ 1 ] || "";
if ( a && -1 < a.indexOf( "url=" ) ) {
for ( var e = {}, t = a.split( "&" ), n = t.length, i = 0; i < n; i++ ) {
var o = t[ i ].split( "=" );
e[ o[ 0 ] ] = o[ 1 ]
}
return e
}
return !1
}();
a && a.url && ( a2a.GA.track( "Twitter Tweet", "twitter_tweet", unescape( a.url ), "pages", "AddToAny Share/Save Button" ), p( "Twitter Tweet", V ) )
}
} ), a2a.twitter_bind = 1 ), a.widgets && a.widgets.load()
} )
} catch ( c ) {}
}, a2a.kit.pinterest_pin = function () {
ma[ "pin-config" ] = "beside", ma[ "pin-do" ] = "buttonPin", ma.media = B, ma.url = E, ma = u( V, ma );
var a, e, t, n = document.createElement( "a" );
for ( var i in ma ) n.setAttribute( "data-" + i, ma[ i ] );
"beside" == ma[ "pin-config" ] && "buttonPin" == ma[ "pin-do" ] && ( V.style.width = "76px" ), n.href = "https://www.pinterest.com/pin/create/button/?url=" + ma.url + ( ma.media ? "&media=" + ma.media : "" ) + ( ma.description ? "&description=" + encodeURIComponent( ma.description ).replace( /'/g, "%27" ) : "" ), a2a.add_event( V, "click", function () {
a2a.GA.track( "Pinterest Pin", "pinterest_pin", E, "pages", "AddToAny Share/Save Button" ), p( "Pinterest Pin", V )
} ), V.appendChild( n ), a2a.kit.pinterest_pin_script || ( a = document, e = a.createElement( "script" ), t = a.getElementsByTagName( "script" )[ 0 ], e.async = !0, e.src = "https://assets.pinterest.com/js/pinit.js", t.parentNode.insertBefore( e, t ) ), a2a.kit.pinterest_pin_script = 1
}, a2a.kit.linkedin_share = function () {
for ( var a in ma.onsuccess = "a2a.kit.linkedin_share_event", ma.url = E, ma = u( V, ma ) ) ua += " data-" + a + '="' + ma[ a ] + '"';
var e, t, n;
a2a.kit.linkedin_share_event = function () {
a2a.GA.track( "LinkedIn Share", "linkedin_share", E, "pages", "AddToAny Share/Save Button" ), p( "LinkedIn Share", V )
}, a2a.kit.linkedin_share_script || ( e = document, t = e.createElement( "script" ), n = e.getElementsByTagName( "script" )[ 0 ], t.type = "text/javascript", t.async = !0, t.src = "https://platform.linkedin.com/in.js", n.parentNode.insertBefore( t, n ) ), a2a.kit.linkedin_share_script = 1, V.innerHTML = '<script type="IN/Share"' + ua + "><\/script>"
};
for ( var $ = 0; $ < b; $++ ) {
var U, W, q, G, V = w[ $ ],
J = V.className,
Y = J.match( /a2a_button_([\w\.]+)(?:\s|$)/ ),
K = 0 <= J.indexOf( "a2a_dd" ),
X = 0 <= J.indexOf( "a2a_counter" ),
Q = !!Y && Y[ 1 ],
Z = V.childNodes,
aa = d( Q ),
ea = k && r[ Q ] ? r[ Q ].name : aa[ 0 ],
ta = " noopener",
na = "_blank",
ia = k && r[ Q ] ? r[ Q ].icon : aa[ 1 ],
oa = k && r[ Q ] ? r[ Q ].color : aa[ 2 ] || "CAE0FF",
la = aa[ 3 ] || {},
ra = la.type,
sa = aa[ 4 ],
ca = !1,
da = !1,
ua = "",
ma = {};
if ( K ) a.target = V, a2a.init( m, a ), oa = "0166FF", ia = Q = "a2a", da = X && 1, 0 <= y.indexOf( "a2a_floating_style" ) && ( V.a2a_floating = 1 );
else if ( "feed" == Q || "print" == Q ) ta = na = "";
else if ( "copy_link" == Q ) a2a.add_event( V, "mouseenter", function () {
a2a.gEl( "a2a_modal" ).style.willChange = "transform, opacity", a2a.gEl( "a2a_overlay" ).style.willChange = "backdrop-filter, opacity"
} );
else if ( X && Q && g( Q, c ) ) da = 1;
else if ( Q && g( Q, s ) ) {
if ( "1" === navigator.doNotTrack || "1" === window.doNotTrack ) continue;
a2a.kit[ Q ](), ca = 1
}
if ( Q && !g( Q, [ "google_plus", "stumbleupon" ] ) && !ca ) {
if ( K || ( V.target = na, !k || !r[ Q ] && d( Q, !0 ) ? "feed" == Q ? V.href = V.href || o.linkurl : ( V.href = "/#" + Q, "js" === ra ? a2a.add_event( V, "click", _ ) : ( a2a.add_event( V, "mousedown", _ ), a2a.add_event( V, "keydown", _ ) ), V.rel = "nofollow" + ta ) : V.href = ( t = Q, l = n = void 0, i = u( e = V, {} )[ "a2a-follow" ], l = r[ t ], i && l && ( n = l.url.replace( "${id}", i ) ), n || e.href ), V.a2a = {}, V.a2a.customserviceuri = sa, V.a2a.stype = ra, V.a2a.linkurl = o.linkurl, V.a2a.servicename = ea, V.a2a.safename = Q, la.src && ( V.a2a.js_src = la.src ), la.url && ( V.a2a.url = la.url ), la.pu && ( V.a2a.popup = 1 ), la.na && ( V.a2a.na = 1 ), la.media && ( V.a2a.media = 1 ), h.a2a_codes = h.a2a_codes || [], h.a2a_codes.push( Q ), k || a2a.add_event( V, "click", function ( r, s, c, d, u ) {
return function ( a ) {
var e, t, n, i = "js" === u.a2a.stype,
o = screen.height,
l = "event=service_click&url=" + A( location.href ) + "&title=" + A( document.title || "" ) + "&ev_service=" + A( r ) + "&ev_service_type=kit&ev_menu_type=" + m + "&ev_url=" + A( c ) + "&ev_title=" + A( d ).replace( /'/g, "%27" );
t = !( !( e = p( s, u, a ) ) || !e.stop ), n = u.a2a.js_skip, "feed" == m || u.a2a.url || u.a2a.js_src || a2a.postClick( h ), !u.a2a.popup || a2a.defaultPrevented( a ) || "_blank" !== u.target || i || ( a2a.preventDefault( a ), window.open( u.href, "_blank", "toolbar=0,personalbar=0,resizable,scrollbars,status,width=550,height=450,top=" + ( 450 < o ? Math.round( o / 2 - 225 ) : 40 ) + ",left=" + Math.round( screen.width / 2 - 275 ) ) ), !u.a2a.externalJS && !u.a2a.literalJS || t || n || a2a.runJS( u.a2a ), i && !n && a2a.preventDefault( a ), n && delete u.a2a.js_skip, a2a.util_frame_post( m, l ), a2a.GA.track( s, r, c, "pages", "AddToAny Share/Save Button" )
}
}( Q, ea, E, S, V ) ) ), Z.length ) {
for ( var _a, pa, fa, ga = 0, ha = Z.length; ga < ha; ga++ )
if ( fa = ( pa = "string" == typeof ( _a = Z[ ga ].className ) ) && ( "a2a_label" === _a || 0 <= _a.indexOf( "a2a_ignore" ) ), 1 == Z[ ga ].nodeType && ( fa || ( G = !0 ), pa && 0 <= _a.indexOf( "a2a_count" ) ) ) {
q = !0;
break
} if ( !G ) {
for ( var va in ( U = document.createElement( "span" ) ).className = M + ia + " a2a_img_text", oa && ( U.style.backgroundColor = "#" + oa ), "pending" !== ( W = a2a.svg.get( ia, U, N ) ) && ( U.innerHTML = W ), j ) U.style[ va ] = j[ va ];
V.insertBefore( U, Z[ 0 ] )
}
} else {
for ( var va in ( U = document.createElement( "span" ) ).className = M + ia, oa && ( U.style.backgroundColor = "#" + oa ), "pending" !== ( W = a2a.svg.get( ia, U, N ) ) && ( U.innerHTML = W ), j ) U.style[ va ] = j[ va ];
V.appendChild( U ), ( U = document.createElement( "span" ) ).className = "a2a_label", U.innerHTML = ea || ( "feed" == m ? a2a.c.localize.Subscribe : a2a.c.localize.Share ), ea || ( U.className += " a2a_localize", U.setAttribute( "data-a2a-localize", "inner," + ( "feed" == m ? "Subscribe" : "Share" ) ) ), V.appendChild( U )
}
if ( R && D && D < 20 && ( da = !1 ), da && !q ) {
for ( var va in ( U = document.createElement( "span" ) ).className = "a2a_count", U.a2a = {}, U.a2a.kit = h, P ) U.style[ va ] = P[ va ];
V.appendChild( U ), K ? ( U.a2a.is_a2a_dd_counter = 1, h.a2a_dd_counter = U, a2a.counters.get( "facebook", U, O ) ) : a2a.counters.get( Q, U, O )
}
"a2a_dd" != J && a2a.kit_services.push( V )
}
}
0 <= y.indexOf( "a2a_default_style" ) && ( x.style.clear = "both", h.appendChild( x ) )
},
counters: {
get: function ( i, o, a, l ) {
a2a_config.counts;
var r, e, t = decodeURIComponent( a ),
n = a2a.counters.bonus( i, t, a, o.a2a.kit ),
s = "",
c = a2a.counters[ i ],
d = c.api,
u = ( c.cb, o.a2a.is_a2a_dd_counter );
!l && n && ( s = "2", a2a.counters.get( i, o, n, !0 ) ), "string" != typeof ( r = c[ t ] = c[ t ] || {} ).num || l ? "number" != typeof r.num ? ( r.queued = r.queued || [], r.queued.push( o ), c.n = c.n || 0, c.n++, c[ "cb" + c.n ] = function ( a ) {
var e, t = a2a.counters[ i ].cb( a, o );
if ( void 0 !== t ) {
if ( "string" == typeof t && "facebook" == i ) return "empty" == t ? e = "Note: Facebook no longer provides public API access to share counts. AddToAny is soon launching a premium service to manage private API access to Facebook and display share counts." : "limit" == t && ( e = "Facebook's public share counts API has reached its request limit from your connection. Try again later." ), console && "function" == typeof console.log && console.log( "%c" + e, "color:#1877f2" ), l || ( o.style.display = "none" ), void( r.num = "error" );
for ( var n = 0; n < r.queued.length; n++ ) queued_count_element = r.queued[ n ], r.num = t, queued_count_element.a2a.is_a2a_dd_counter ? a2a.counters.sum( queued_count_element, t, i + s ) : a2a.counters.set( queued_count_element, t, i + s )
}
}, 1 == r.queued.length && ( e = d[ 0 ] + a + ( d[ 1 ] || "&callback" ) + "=a2a.counters." + i + ".cb" + c.n, a2a.dom.ready( function () {
a2a.loadExtScript( e )
} ) ) ) : u ? a2a.counters.sum( o, r.num, i + s ) : a2a.counters.set( o, r.num, i + s ) : o.style.display = "none"
},
set: function ( a, e, t ) {
var n = e;
e = "undefined" != typeof a.a2a.last_count ? a.a2a.last_count + e : e, a.innerHTML = "<span>" + a2a.counters.format( e ) + "</span>", "a2a" != t && ( a.a2a.last_count = n, a2a.counters.sum( a, n, t ) )
},
sum: function ( a, e, t ) {
var n = a.a2a.kit,
i = n.a2a_counts_sum || 0,
o = n.a2a_counts_summed || [];
"a2a" != t && -1 === o.indexOf( t ) && ( i = n.a2a_counts_sum = i + e, ( o = n.a2a_counts_summed = o || [] ).push( t ) ), n.a2a_dd_counter && a2a.counters.set( n.a2a_dd_counter, i, "a2a" )
},
format: function ( a ) {
var e = a2a.counters.format,
t = "localize";
return e[ t ] || ( e.locale = a2a.i18n(), e[ t ] = function n() {
return !( "object" != typeof Intl || !Intl || "function" != typeof Intl.NumberFormat )
}() ? function i( a ) {
return a.toLocaleString( e.locale, {
maximumFractionDigits: 1
} )
} : function o( a, e ) {
return e && "decimal" === e ? Math.round( 10 * a ) / 10 : a = ( a += "" ).charAt( 0 ) + "," + a.substring( 1 )
} ), 999 < a && ( a = a < 1e6 ? 1e4 < a ? e[ t ]( a / 1e3, "decimal" ) + "k" : e[ t ]( a ) : a < 1e9 ? e[ t ]( a / 1e6, "decimal" ) + "M" : "1B+" ), a
},
bonus: function ( a, e, t, n ) {
var i, o, l, r = a2a_config.counts,
s = "%3A%2F%2F";
return r && ( r.recover_protocol && "http" === r.recover_protocol && ( i = t.replace( /^https%/, "http%" ), e = decodeURIComponent( i ) ), r.recover_domain && ( i = encodeURIComponent( e.replace( /^(https?\:\/\/)(?:[^\/?#]+)([\/?#]|$)/i, "$1" + r.recover_domain + "$2" ) ), e = decodeURIComponent( i ) ), r.recover && "function" == typeof r.recover && ( l = {
url: ( o = document.createElement( "a" ) ).href = e,
pathParts: o.pathname.split( "/" ),
domain: o.hostname,
protocol: o.protocol,
kit: n
}, i = encodeURIComponent( r.recover( l ) ) ) ), !( !i || i === t || -1 !== [ "tumblr" ].indexOf( a ) && i.split( s ).pop() === t.split( s ).pop() ) && i
},
avail: [ "facebook", "pinterest", "reddit", "tumblr" ],
facebook: {
api: [ "https://graph.facebook.com/?fields=og_object%7Bengagement%7D&id=", "&callback" ],
cb: function ( a, e ) {
return a && a.og_object && a.og_object.engagement && !isNaN( a.og_object.engagement.count ) ? a.og_object.engagement.count : a && a.error && a.error.code && 4 === a.error.code ? "limit" : "empty"
}
},
pinterest: {
api: [ "https://widgets.pinterest.com/v1/urls/count.json?url=" ],
cb: function ( a, e ) {
if ( a && !isNaN( a.count ) ) return a.count
}
},
reddit: {
api: [ "https://www.reddit.com/api/info.json?url=", "&jsonp" ],
cb: function ( a, e ) {
var t = a.data;
if ( a && t && t.children ) {
for ( var n, i = 0, o = [], l = t.children; i < l.length; i++ )( n = l[ i ].data ) && !isNaN( n.ups ) && o.push( n.ups );
return 0 < o.length ? Math.max.apply( null, o ) : 0
}
}
},
tumblr: {
api: [ "https://api.tumblr.com/v2/share/stats?url=" ],
cb: function ( a, e ) {
if ( a && a.response && !isNaN( a.response.note_count ) ) return a.response.note_count
}
}
},
overlays: function () {
var a = a2a.c.overlays || [],
e = !!a2a.evOpts() && {
passive: !0
},
t = window,
n = t.innerWidth,
i = t.innerHeight,
k = n && ( n < 375 || i < 375 ) ? 150 : 200,
w = 200,
b = location.href,
x = document.title || b;
function o( a, e, t, n, i ) {
var o, l, r, s, c, d, u, m, _, p = function y( a ) {
return a.target ? 3 === a.target.nodeType ? a.target.parentNode : a.target : a.srcElement
}( a ),
f = p,
g = 0,
h = 0,
v = p.longDesc;
if ( a2a.matches( p, n ) && "false" !== p.getAttribute( "data-a2a-overlay" ) ) {
if ( r = p.width < k || p.height < k, s = "naturalWidth" in p && ( p.naturalWidth < w || p.naturalHeight < w ), r || s ) return;
if ( a2a.matches( p, "header img,footer img" ) ) return;
l = a2a.getPos( p, "scroll" ), e.style.display = "", c = e.clientHeight || e.offsetHeight, d = e.clientWidth || e.offsetWidth, t[ 0 ] && ( "bottom" === t[ 0 ] ? h = p.height - c : "center" === t[ 0 ] && ( h = A( ( p.height - c ) / 2 ) ) ), t[ 1 ] && ( "right" === t[ 1 ] ? g = p.width - d : "center" === t[ 1 ] && ( g = A( ( p.width - d ) / 2 ) ) ), u = l.left + g, m = l.top + h, e.style.left = u + "px", e.style.top = m + "px", e.setAttribute( "data-a2a-media", p.src ), ( e.a2a_mediaNode = p ).alt ? e.setAttribute( "data-a2a-title", p.alt ) : e.setAttribute( "data-a2a-title", x ), !v || "#" !== v.substr( 0, 1 ) && "http" !== v.substr( 0, 4 ) ? i ? e.setAttribute( "data-a2a-url", p.src ) : e.setAttribute( "data-a2a-url", b ) : ( _ = "#" === v.substr( 0, 1 ) ? b.split( "#" )[ 0 ] + p.longDesc : v, e.setAttribute( "data-a2a-url", _ ) )
} else if ( "none" !== e.style.display ) {
for ( ;
( o = f ) && "body" !== f.tagName.toLowerCase(); ) {
if ( o === e ) return;
f = f.parentNode
}
e.style.display = "none"
}
}
for ( var l = 0, r = a.length; l < r; l++ ) {
var s, c = a[ l ],
d = c.services || [ "pinterest", "facebook" ],
u = "",
m = c.html,
_ = c.position,
p = c.style,
f = c.size || 32,
g = c.target,
h = c.useImage,
A = Math.round;
if ( _ = _ && 2 < _.length ? _.split( " " ) : [ "top", "left" ], p = !p || "horizontal" !== p && "default" !== p ? "vertical" : "default", g = g || "img", m ) document.body.insertAdjacentHTML( "beforeend", m ), s = document.body.lastChild;
else {
for ( var v = 0, y = d.length; v < y; v++ ) {
u += '<a class="a2a_button_' + d[ v ] + '"></a>'
}( s = document.createElement( "div" ) ).className = "a2a_kit a2a_kit_size_" + f + " a2a_overlay_style a2a_" + p + "_style", s.innerHTML = u, document.body.insertBefore( s, null )
}
s.style.display = "none", s.style.position = "absolute", s.setAttribute( "data-a2a-title", x ), s.setAttribute( "data-a2a-url", b ), a2a.add_event( document.body, "mouseover", function ( e, t, n, i ) {
return function ( a ) {
o( a, e, t, n, i )
}
}( s, _, g, h ), e )
}
a2a.c.overlays = []
},
init_show: function () {
var a = a2a_config,
e = a2a[ a2a.type ],
t = a2a.show_menu,
n = a2a.init_show,
i = a2a.n;
a.bookmarklet && ( e.no_hide = 1, a2a.sole_index = i, t() ), a.show_menu && ( e.no_hide = 1, a2a.sole_index = i, t( !1, a.show_menu ), a.show_menu = !1 ), n.a2a_done = 1
},
unindexed: function ( o, a ) {
var e = document,
t = a2a.getByClass,
n = t( "a2a_kit", e ),
i = a2a.HTMLcollToArray( e.getElementsByName( "a2a_dd" ) ).concat( t( "a2a_dd", e ) );
function l( a ) {
for ( var e, t, n = 0, i = a.length; n < i; n++ )
if ( ( "undefined" == typeof ( e = a[ n ] ).a2a_index || "" === e.a2a_index ) && e.className.indexOf( "a2a_target" ) < 0 && e.parentNode.className.indexOf( "a2a_kit" ) < 0 && ( t = o( e ) ), t ) return t;
return null
}
if ( a ) return l( n ) || l( i );
l( n.concat( i ) )
},
set_this_index: function ( a ) {
var e = a2a.n;
function t( a ) {
if ( !( 0 <= a.className.indexOf( "a2a_kit" ) ) ) return !1;
a.a2a_kit = 1, 0 <= a.className.indexOf( "a2a_follow" ) && ( a.a2a_follow = 1 )
}
return a ? ( a.a2a_index = e, t( a ), a ) : a2a.unindexed( function ( a ) {
return a.a2a_index = e, t( a ), a
}, !0 )
},
gEl: function ( a ) {
return document.getElementById( a )
},
getByClass: function ( a, e, t ) {
return document.getElementsByClassName && /\{\s*\[native code\]\s*\}/.test( "" + document.getElementsByClassName ) ? a2a.getByClass = function ( a, e, t ) {
for ( var n, i = ( e = e || a2a.gEl( "a2a" + a2a.type + "_dropdown" ) ).getElementsByClassName( a ), o = t ? new RegExp( "\\b" + t + "\\b", "i" ) : null, l = [], r = 0, s = i.length; r < s; r += 1 ) n = i[ r ], o && !o.test( n.nodeName ) || l.push( n );
return l
} : document.evaluate ? a2a.getByClass = function ( a, e, t ) {
t = t || "*", e = e || a2a.gEl( "a2a" + a2a.type + "_dropdown" );
for ( var n, i, o = a.split( " " ), l = "", r = "http://www.w3.org/1999/xhtml", s = document.documentElement.namespaceURI === r ? r : null, c = [], d = 0, u = o.length; d < u; d += 1 ) l += "[contains(concat(' ',@class,' '), ' " + o[ d ] + " ')]";
try {
n = document.evaluate( ".//" + t + l, e, s, 0, null )
} catch ( m ) {
n = document.evaluate( ".//" + t + l, e, null, 0, null )
}
for ( ; i = n.iterateNext(); ) c.push( i );
return c
} : a2a.getByClass = function ( a, e, t ) {
t = t || "*", e = e || a2a.gEl( "a2a" + a2a.type + "_dropdown" );
for ( var n, i, o = a.split( " " ), l = [], r = "*" === t && e.all ? e.all : e.getElementsByTagName( t ), s = [], c = 0, d = o.length; c < d; c += 1 ) l.push( new RegExp( "(^|\\s)" + o[ c ] + "(\\s|$)" ) );
for ( var u = 0, m = r.length; u < m; u += 1 ) {
n = r[ u ], i = !1;
for ( var _ = 0, p = l.length; _ < p && ( i = l[ _ ].test( n.className ) ); _ += 1 );
i && s.push( n )
}
return s
}, a2a.getByClass( a, e, t )
},
HTMLcollToArray: function ( a ) {
for ( var e = [], t = a.length, n = 0; n < t; n++ ) e[ e.length ] = a[ n ];
return e
},
matches: function ( a, e ) {
var t, n = "MatchesSelector",
i = "ms" + n,
o = "webkit" + n;
if ( a.matches ) t = "matches";
else if ( a[ i ] ) t = i;
else {
if ( !a[ o ] ) return !( a2a.matches = function ( a, e ) {
return !1
} );
t = o
}
return a2a.matches = function ( a, e ) {
return a[ t ]( e )
}, a2a.matches( a, e )
},
evOpts: function () {
var a = !1;
try {
var e = Object.defineProperty( {}, "passive", {
get: function () {
a = !0
}
} );
window.addEventListener( "test", null, e )
} catch ( t ) {}
return a2a.evOpts = function () {
return a
}, a
},
add_event: function ( a, e, t, n ) {
if ( a.addEventListener ) {
if ( "object" == typeof n ) {
var i = !!n.useCapture;
n = a2a.evOpts() ? n : i
}
return a.addEventListener( e, t, n ), {
destroy: function () {
a.removeEventListener( e, t, n )
}
}
}
var o = function () {
t.call( a, window.event )
};
return a.attachEvent( "on" + e, o ), {
destroy: function () {
a.detachEvent( "on" + e, o )
}
}
},
stopPropagation: function ( a ) {
a || ( a = window.event ), a.cancelBubble = !0, a.stopPropagation && a.stopPropagation()
},
preventDefault: function ( a ) {
a.preventDefault ? a.preventDefault() : a.returnValue = !1
},
defaultPrevented: function ( a ) {
return !!( a.defaultPrevented || !1 === a.returnValue || "undefined" == typeof a.defaultPrevented && a.getPreventDefault && a.getPreventDefault() )
},
onLoad: function ( a ) {
var e = window.onload;
"function" != typeof window.onload ? window.onload = a : window.onload = function () {
e && e(), a()
}
},
in_array: function ( a, e, t, n, i ) {
if ( "object" == typeof e ) {
a = a.toLowerCase();
for ( var o, l = e.length, r = 0; r < l; r++ )
if ( o = n ? e[ r ][ n ] : e[ r ], o = i ? o[ i ] : o, t ) {
if ( a == o.toLowerCase() ) return e[ r ]
} else if ( -1 != a.indexOf( o.toLowerCase() ) && "" !== o ) return e[ r ]
}
return !1
},
serialize: function ( a, e ) {
var t = [];
for ( var n in a )
if ( a.hasOwnProperty( n ) ) {
var i = e ? e + "[" + n + "]" : n,
o = a[ n ];
t.push( "object" == typeof o ? a2a.serialize( o, i ) : encodeURIComponent( i ) + "=" + encodeURIComponent( o ) )
} return t.join( "&" )
},
throttle: function ( t, n, i ) {
var o, l, r, s;
previous = 0, i || ( i = {} );
var c = Date.now || function () {
return ( new Date ).getTime()
},
d = function () {
previous = !1 === i.leading ? 0 : c(), o = null, s = t.apply( l, r ), o || ( l = r = null )
},
a = function () {
var a = c();
previous || !1 !== i.leading || ( previous = a );
var e = n - ( a - previous );
return l = this, r = arguments, e <= 0 || n < e ? ( o && ( clearTimeout( o ), o = null ), previous = a, s = t.apply( l, r ), o || ( l = r = null ) ) : o || !1 === i.trailing || ( o = setTimeout( d, e ) ), s
};
return a.cancel = function () {
clearTimeout( o ), previous = 0, o = l = r = null
}, a
},
scrollToggle: function ( a, e ) {
( e = e.split( "," ) )[ 0 ] && e[ 0 ].trim(), e[ 1 ] && e[ 1 ].trim();
var n, o = window,
t = parseInt( e[ 0 ], 10 ) || 0,
i = parseInt( e[ 1 ], 10 ) || 0,
l = function ( a, e, t ) {
var n = o.pageYOffset,
i = document.documentElement.scrollHeight - o.innerHeight - n;
a.style.display = e <= n && t <= i ? "" : "none"
}.bind( null, a, t, i );
( t || i ) && ( a2a.scrollToggle.handlers = a2a.scrollToggle.handlers || [], ( n = a2a.scrollToggle.handlers ).push( l ), n.length < 2 && o.addEventListener( "scroll", a2a.throttle( function () {
for ( var a = 0, e = n, t = e.length; a < t; a++ ) e[ a ]()
}, 20 ) ), l() )
},
miniLeaveDelay: function () {
var a = a2a.type,
e = "a2a" + a,
t = a2a.gEl;
a2a.isDisplayed( t( e + "_dropdown" ) ) && "none" === a2a.getStyle( t( e + "_full" ), "display" ) && ( a2a[ a ].out_delay = setTimeout( function () {
a2a.toggle_dropdown( "none", a ), a2a[ a ].out_delay = null
}, 501 ) )
},
miniEnterStay: function () {
a2a.type = a2a[ "n" + ( a2a.sole_index || a2a.n ) ].type;
var a = a2a.type;
a2a[ a ] && a2a[ a ].out_delay && clearTimeout( a2a[ a ].out_delay )
},
toggle_dropdown: function ( a, e ) {
if ( "none" != a || !a2a[ e ].no_hide ) {
var t = ( 0, a2a.gEl )( "a2a" + e + "_dropdown" ),
n = ( document.activeElement, a2a.show_menu.key_listener );
t.style.display = a, a2a.miniEnterStay(), "none" == a && ( a2a.show_menu[ "doc_click_listener_" + e ].destroy(), delete a2a[ e ].doc_click_close_mini, n && n[ e ] && n[ e ].destroy() )
}
},
getData: function ( a ) {
if ( !a ) return {};
for ( var e, t = 0, n = a.attributes.length, i = {}; t < n; t++ )( e = a.attributes[ t ] ).name && "data-" == e.name.substr( 0, 5 ) && ( i[ e.name.substr( 5 ) ] = e.value );
return i
},
getStyle: function ( a, e ) {
return a ? a.currentStyle ? a.currentStyle[ e.replace( /-(\w)/gi, function ( a, e ) {
return e.toUpperCase()
} ) ] : window.getComputedStyle( a, null ).getPropertyValue( e ) : null
},
isDisplayed: function ( a ) {
var e = a2a.getStyle( a, "display" );
return !( !e || "none" === e )
},
getPos: function ( a, e ) {
var t, n = Math.round,
i = ( a2a.getScrollDocDims, "scroll" === e ? a2a.getScrollDocDims( "w" ) : 0 ),
o = "scroll" === e ? a2a.getScrollDocDims( "h" ) : 0;
return "undefined" == typeof a.getBoundingClientRect ? a2a.getPosOld( a ) : {
left: n( ( t = a.getBoundingClientRect() ).left + i ),
top: n( t.top + o )
}
},
getPosOld: function ( a ) {
for ( var e = 0, t = 0; e += a.offsetLeft || 0, t += a.offsetTop || 0, a = a.offsetParent; );
return {
left: e,
top: t
}
},
getDocDims: function ( a ) {
var e = 0,
t = 0;
return "number" == typeof window.innerWidth ? ( e = window.innerWidth, t = window.innerHeight ) : document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ? ( e = document.documentElement.clientWidth, t = document.documentElement.clientHeight ) : document.body && ( document.body.clientWidth || document.body.clientHeight ) && ( e = document.body.clientWidth, t = document.body.clientHeight ), "w" == a ? e : t
},
getScrollDocDims: function ( a ) {
var e = 0,
t = 0;
return "number" == typeof window.pageYOffset ? ( e = window.pageXOffset, t = window.pageYOffset ) : document.body && ( document.body.scrollLeft || document.body.scrollTop ) ? ( e = document.body.scrollLeft, t = document.body.scrollTop ) : document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) && ( e = document.documentElement.scrollLeft, t = document.documentElement.scrollTop ), "w" == a ? e : t
},
show_more_less: function ( a ) {
var e = "a2a" + a2a.type;
( 0, a2a.gEl )( e + "_show_more_less" );
a2a.show_full()
},
focus_find: function () {
var a = a2a.gEl( "a2a" + a2a.type + "_find" );
"none" != a.parentNode.style.display && a.focus()
},
default_services: function ( a ) {
for ( var e = a || a2a.type, t = a2a[ e ].main_services_col_1, n = t.length, i = 0; i < n; i++ ) t[ i ].style.display = ""
},
do_find: function () {
var a, e = a2a.type,
t = a2a[ e ].main_services,
n = t.length,
i = a2a.gEl( "a2a" + e + "_find" ).value,
o = a2a.in_array;
if ( "" !== i ) {
a = i.split( " " );
for ( var l = 0; l < n; l++ ) o( t[ l ].a2a.serviceNameLowerCase, a, !1 ) ? t[ l ].style.display = "" : t[ l ].style.display = "none"
} else a2a.default_services()
},
selection: function ( a ) {
var e, t, n = document.getElementsByTagName( "meta" ),
i = n.length;
if ( window.getSelection ) e = window.getSelection() + "";
else if ( document.selection ) {
try {
e = document.selection.createRange()
} catch ( s ) {
e = ""
}
e = e.text ? e.text : ""
}
if ( e && "" !== e ) return e;
if ( a2a[ "n" + a2a.n ].linkurl === location.href && -1 === [ "facebook", "twitter", "linkedin" ].indexOf( a ) )
for ( var o, l, r = 0; r < i; r++ )
if ( o = ( o = n[ r ].getAttribute( "name" ) ) ? o.toLowerCase() : "", l = ( l = n[ r ].getAttribute( "property" ) ) ? l.toLowerCase() : "", o && "description" === o || l && "og:description" === l ) {
t = n[ r ].getAttribute( "content" );
break
} return t ? t.substring( 0, 1200 ) : ""
},
collections: function ( a ) {
var e = a2a.gEl,
t = a2a[ a ],
n = "a2a" + a;
t.main_services_col_1 = a2a.getByClass( "a2a_i", e( n + "_full_services" ), "a" ), t.main_services = t.main_services_col_1, t.email_services = a2a.getByClass( "a2a_i", e( n + "_2_col1", "a" ) ), t.all_services = t.main_services.concat( t.email_services )
},
cbs: function ( a, e ) {
var t = a2a.c.callbacks || [],
n = a2a.c.tracking_callback,
i = {};
n && ( n[ a ] ? t.push( n ) : n[ 0 ] == a ? ( i[ a ] = n[ 1 ], t.push( i ) ) : "function" == typeof n && ( i[ a ] = n, t.push( i ) ), a2a.c.tracking_callback = null );
for ( var o, l = 0, r = t.length; l < r; l++ )
if ( "function" == typeof ( o = t[ l ][ a ] ) && ( returned = o( e ), "ready" == a && ( o = null ), "undefined" != typeof returned ) ) return returned
},
linker: function ( a ) {
var e, t, n = location.href,
i = document.title || n,
o = a.parentNode,
l = a2a[ "n" + ( o.a2a_index || o.parentNode.a2a_index || a2a.sole_index || a2a.n ) ],
r = l.type,
s = a.a2a.safename,
c = l.linkurl_implicit && n != l.linkurl ? n : l.linkurl,
d = encodeURIComponent( c ).replace( /'/g, "%27" ),
u = l.linkname_implicit && i != l.linkname ? i : l.linkname,
m = encodeURIComponent( u ).replace( /'/g, "%27" ),
_ = l.linkmedia,
p = !!_ && encodeURIComponent( _ ).replace( /'/g, "%27" ),
f = encodeURIComponent( a2a.selection( s ) ).replace( /'/g, "%27" ),
g = !l.track_links || "page" != r && "mail" != r ? "" : "&linktrack=" + l.track_links + "&linktrackkey=" + encodeURIComponent( l.track_links_key ),
h = a.a2a.customserviceuri || !1,
v = a.a2a.stype,
y = a.a2a.js_src,
k = a.a2a.url,
w = a.a2a.media,
b = a.a2a.na,
x = a2a.c.templates,
A = x[ s ],
E = "email",
C = navigator.userAgent,
S = -1 != C.indexOf( "Safari" ) && -1 == C.indexOf( "Chrome" ),
B = a2a.is_mobile;
function T( a ) {
return encodeURIComponent( a ).replace( /'/g, "%27" ).replace( /%24%7Blink%7D/g, "${link}" ).replace( /%24%7Blink_noenc%7D/g, "${link_noenc}" ).replace( /%24%7Blink_nohttp%7D/g, "${link_nohttp}" ).replace( /%24%7Bmedia%7D/g, "${media}" ).replace( /%24%7Btitle%7D/g, "${title}" ).replace( /%24%7Btitle_noenc%7D/g, "${title_noenc}" ).replace( /%24%7Bnotes%7D/g, "${notes}" )
}
if ( w && p ) a.a2a.js_skip = 1, a.target = "_blank";
else if ( v && "js" == v && y ) a.target = "", "javascript:" == y.substr( 0, 11 ) ? ( t = y.replace( "${link}", c.replace( /'/g, "\\'" ) ), a.a2a.literalJS = t.substr( 11 ) ) : a.a2a.externalJS = y, e = "#" + s;
else if ( k && ( s != E || s == E && ( B || S ) ) && !g ) {
if ( a.target = "", "object" == typeof A )
for ( var F in A ) k = a2a.urlParam( k, F, T( A[ F ] ) );
else "string" == typeof A && ( k = a2a.urlParam( k, "text", T( A ) ) );
e = k.replace( /\$\{link\}/g, d ).replace( /\$\{media\}/g, p ).replace( /\$\{link_noenc\}/g, c ).replace( /\$\{link_nohttp\}/g, c.replace( /^https?:\/\//, "" ) ).replace( /\$\{title\}/g, m )
} else h && "undefined" != h && ( e = h.replace( /A2A_LINKNAME_ENC/, m ).replace( /A2A_LINKURL_ENC/, d ).replace( /A2A_LINKNOTE_ENC/, f ) );
return B && b && ( a.target = "" ), a.href = e || "http" + a2a.c.http_s + "://www.addtoany.com/add_to/" + s + "?linkurl=" + d + "&linkname=" + m + ( p ? "&linkmedia=" + p : "" ) + g + function L() {
var a = "";
return A ? a = "&" + a2a.serialize( {
template: A
} ) : x[ E ] && v && v == E && ( a = "&" + a2a.serialize( {
template: x[ E ]
} ) ), a
}() + ( "feed" == r ? "&type=feed" : "" ) + "&linknote=" + f, !0
},
runJS: function ( a ) {
if ( a.literalJS ) {
var e = document.createElement( "script" ),
t = a2a.nonce;
t && e.setAttribute( "nonce", t ), e.textContent = a.literalJS, a2a.head_tag.appendChild( e )
} else a.externalJS && a2a.loadExtScript( a.externalJS )
},
animate: function ( a, e, t ) {
if ( e ) {
var n = a2a.isDisplayed( e ),
i = e.classList,
o = "a2a_starting",
l = "transitionend";
if ( "show" === a ) {
if ( n ) return;
! function r( a, e ) {
e && a2a.getStyle( a, "transition-duration" ) && e.add( o )
}( e, i ), e.style.display = "block", i && setTimeout( function () {
i.remove( o )
}, 1 )
} else i ? n ? ( e.addEventListener( l, function s() {
e.style.display = "show" === a ? "block" : "none", t && t(), e.removeEventListener( l, s, !1 )
}, !1 ), i.add( o ) ) : t && t() : t && ( e.style.display = "none", t() )
}
},
overlay: {
show: function () {
var a = a2a.gEl,
n = a2a.type,
e = "a2a" + n,
t = a( "a2a_overlay" ),
i = a( e + "_find" );
"none" === a2a.getStyle( t, "display" ) && ( a2a.animate( "show", t ), a2a.overlay.key_listener = a2a.add_event( document, "keydown", function ( a ) {
var e = ( a = a || window.event ).which || a.keyCode,
t = document.activeElement;
27 == e && i != t ? a2a.hide_modals( n ) : 40 < e && e < 91 && i != t && i.focus()
} ) )
},
hide: function ( a ) {
var e = a2a.gEl( "a2a_overlay" ),
t = a2a.overlay,
n = t.key_listener;
a2a.animate( "hide", e, a ), n && ( n.destroy(), setTimeout( function () {
delete t.key_listener
}, 1 ) )
}
},
hide_modals: function ( a ) {
var e = a2a.gEl,
t = "a2a" + a,
n = e( t + "_full" ),
i = e( "a2a_overlay" ),
o = e( "a2a_modal" );
a2a.show_full.full_shown = !1, a2a.animate( "hide", o ), a2a.animate( "hide", n ), a2a.overlay.hide( function l() {
i.style.display = o.style.display = "none", i.style.willChange = o.style.willChange = "", n && ( n.style.display = "none", n.style.willChange = "" ), a2a.thanks.showing = !1, a2a.isDisplayed( e( t + "_dropdown" ) ) && e( t + "_show_more_less" ).focus()
} )
},
show_modal: function () {
a2a.type;
for ( var a = a2a.gEl, e = ( a( "a2a_overlay" ), a( "a2a_modal" ) ), t = a2a.getByClass( "a2a_modal_body", e ), n = 0; n < t.length; n++ ) t[ n ].style.display = "none";
a2a.overlay.show(), a2a.animate( "show", e )
},
show_full: function () {
var a = a2a.type,
e = "a2a" + a,
t = a2a.gEl,
n = a2a.getByClass,
i = t( e + "_full" ),
o = n( "a2a_full_header", i )[ 0 ],
l = t( e + "_full_services" ),
r = n( "a2a_full_footer", i )[ 0 ];
a2a.fill_menus( a ), a2a.overlay.show(), a2a.animate( "show", i ), l.style.cssText = "height:calc(10px)", l.style.height.length && ( l.style.height = "calc(100% - " + ( o.offsetHeight + r.offsetHeight ) + "px)" ), i.focus(), a2a.stats( "full" )
},
show_menu: function ( a, e ) {
a ? a2a.n = a.a2a_index : a2a.sole_index && ( a2a.n = a2a.sole_index );
var t, n, i, o, l, r, s, c, d, u, m, _, p = a2a[ "n" + a2a.n ],
f = a2a.type = p.type,
g = "a2a" + f,
h = a2a.gEl( g + "_dropdown" ),
v = a2a.has_touch,
y = v ? "touchstart" : "click",
k = !( !v || !a2a.evOpts() ) && {
passive: !0
};
a2a.fill_menus( f ), a2a.gEl( g + "_title" ).value = p.linkname, a2a.toggle_dropdown( "block", f ), i = [ h.clientWidth, h.clientHeight ], o = a2a.getDocDims( "w" ), l = a2a.getDocDims( "h" ), a ? ( n = ( t = a.a2a_floating ) ? "viewport" : "scroll", h.style.position = t ? "fixed" : "", r = t ? 0 : a2a.getScrollDocDims( "w" ), s = t ? 0 : a2a.getScrollDocDims( "h" ), m = ( c = a.getElementsByTagName( "img" )[ 0 ] ) ? ( d = a2a.getPos( c, n ), u = c.clientWidth, c.clientHeight ) : ( d = a2a.getPos( a, n ), u = a.offsetWidth, a.offsetHeight ), d.left - r + i[ 0 ] + u > o && ( d.left = d.left - i[ 0 ] + u - 8 ), ( "up" == p.orientation || "down" != p.orientation && d.top - s + i[ 1 ] + m > l && d.top > i[ 1 ] ) && ( d.top = d.top - i[ 1 ] - m ), h.style.left = ( d.left < 0 ? 0 : d.left ) + 2 + "px", h.style.top = d.top + m + "px" ) : ( e || ( e = {} ), h.style.position = e.position || "absolute", h.style.left = e.left || o / 2 - i[ 0 ] / 2 + "px", h.style.top = e.top || l / 2 - i[ 1 ] / 2 + "px" ), a2a[ f ].doc_click_close_mini || a2a[ f ].no_hide || ( a2a[ f ].doc_click_close_mini = ( _ = f, function ( a ) {
!a2a.ieo() && "number" == typeof a.button && 0 < a.button || ( a2a[ f ].last_focus && a2a[ f ].last_focus.focus(), a2a.toggle_dropdown( "none", _ ) )
} ), a2a.show_menu[ "doc_click_listener_" + f ] = a2a.add_event( document, y, a2a[ f ].doc_click_close_mini, k ) ), a2a.show_menu.key_listener = a2a.show_menu.key_listener || {}, a2a.show_menu.key_listener[ f ] = a2a.add_event( document, "keydown", function ( a ) {
27 != ( ( a = a || window.event ).which || a.keyCode ) || a2a.overlay.key_listener || a2a.toggle_dropdown( "none", f )
} ), a2a.svg.load();
var w = encodeURIComponent,
b = "event=menu_show&url=" + w( location.href ) + "&title=" + w( document.title || "" ) + "&ev_menu_type=" + f;
a2a.util_frame_post( f, b )
},